OSDN Git Service

Wrap lines in ja.po again
[linuxjm/LDP_man-pages.git] / po4a / stdio / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:25+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:29+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/asprintf.3:27
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25
26 #: build/C/man3/fmtmsg.3:13 build/C/man3/stdio_ext.3:25
27 #, no-wrap
28 msgid "2013-06-21"
29 msgstr "2013-06-21"
30
31 #. type: TH
32 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
33 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
34 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
35 #: build/C/man3/fgetc.3:27 build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10
36 #: build/C/man3/fopen.3:44 build/C/man3/fputwc.3:16 build/C/man3/fread.3:45
37 #: build/C/man3/fseek.3:42 build/C/man3/getline.3:26 build/C/man3/gets.3:29
38 #: build/C/man3/getw.3:25 build/C/man3/popen.3:40 build/C/man3/printf.3:34
39 #: build/C/man3/puts.3:26 build/C/man3/remove.3:31 build/C/man3/scanf.3:52
40 #: build/C/man3/wprintf.3:16
41 #, no-wrap
42 msgid "GNU"
43 msgstr "GNU"
44
45 #. type: TH
46 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
47 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
48 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
49 #: build/C/man3/fflush.3:45 build/C/man3/fgetc.3:27 build/C/man3/fgetwc.3:18
50 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
51 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
52 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
53 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
54 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:29
55 #: build/C/man3/getw.3:25 build/C/man2/link.2:32 build/C/man2/llseek.2:28
56 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:51
57 #: build/C/man2/open_by_handle_at.2:25 build/C/man3/perror.3:31
58 #: build/C/man2/pipe.2:36 build/C/man3/popen.3:40 build/C/man3/printf.3:34
59 #: build/C/man3/puts.3:26 build/C/man2/read.2:35 build/C/man2/readlink.2:44
60 #: build/C/man2/readv.2:32 build/C/man3/remove.3:31 build/C/man2/rename.2:33
61 #: build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52 build/C/man3/setbuf.3:48
62 #: build/C/man3/stdin.3:13 build/C/man3/stdio.3:39 build/C/man3/stdio_ext.3:25
63 #: build/C/man2/symlink.2:33 build/C/man7/symlink.7:37
64 #: build/C/man3/tempnam.3:25 build/C/man3/tmpfile.3:31
65 #: build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:33
66 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
67 #: build/C/man2/write.2:39
68 #, no-wrap
69 msgid "Linux Programmer's Manual"
70 msgstr "Linux Programmer's Manual"
71
72 #. type: SH
73 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
74 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
75 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
76 #: build/C/man3/fflush.3:46 build/C/man3/fgetc.3:28 build/C/man3/fgetwc.3:19
77 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
78 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
79 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
80 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
81 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:30
82 #: build/C/man3/getw.3:26 build/C/man2/link.2:33 build/C/man2/llseek.2:29
83 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:52
84 #: build/C/man2/open_by_handle_at.2:26 build/C/man3/perror.3:32
85 #: build/C/man2/pipe.2:37 build/C/man3/popen.3:41 build/C/man3/printf.3:35
86 #: build/C/man3/puts.3:27 build/C/man2/read.2:36 build/C/man2/readlink.2:45
87 #: build/C/man2/readv.2:33 build/C/man3/remove.3:32 build/C/man2/rename.2:34
88 #: build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53 build/C/man3/setbuf.3:49
89 #: build/C/man3/stdin.3:14 build/C/man3/stdio.3:40 build/C/man3/stdio_ext.3:26
90 #: build/C/man2/symlink.2:34 build/C/man7/symlink.7:38
91 #: build/C/man3/tempnam.3:26 build/C/man3/tmpfile.3:32
92 #: build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:34
93 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
94 #: build/C/man2/write.2:40
95 #, no-wrap
96 msgid "NAME"
97 msgstr "名前"
98
99 #. type: Plain text
100 #: build/C/man3/asprintf.3:30
101 msgid "asprintf, vasprintf - print to allocated string"
102 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
103
104 #. type: SH
105 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
106 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
107 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
108 #: build/C/man3/fflush.3:48 build/C/man3/fgetc.3:30 build/C/man3/fgetwc.3:21
109 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
110 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
111 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
112 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
113 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:32
114 #: build/C/man3/getw.3:28 build/C/man2/link.2:35 build/C/man2/llseek.2:31
115 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:54
116 #: build/C/man2/open_by_handle_at.2:29 build/C/man3/perror.3:34
117 #: build/C/man2/pipe.2:39 build/C/man3/popen.3:43 build/C/man3/printf.3:38
118 #: build/C/man3/puts.3:29 build/C/man2/read.2:38 build/C/man2/readlink.2:47
119 #: build/C/man2/readv.2:35 build/C/man3/remove.3:34 build/C/man2/rename.2:36
120 #: build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55 build/C/man3/setbuf.3:51
121 #: build/C/man3/stdin.3:16 build/C/man3/stdio.3:42 build/C/man3/stdio_ext.3:30
122 #: build/C/man2/symlink.2:36 build/C/man3/tempnam.3:28
123 #: build/C/man3/tmpfile.3:34 build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:36
124 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
125 #: build/C/man2/write.2:42
126 #, no-wrap
127 msgid "SYNOPSIS"
128 msgstr "書式"
129
130 #. type: Plain text
131 #: build/C/man3/asprintf.3:32
132 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
133 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
134
135 #. type: Plain text
136 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
137 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
138 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
139 #: build/C/man3/remove.3:36 build/C/man3/stdio.3:44
140 #: build/C/man3/stdio_ext.3:32
141 msgid "B<#include E<lt>stdio.hE<gt>>"
142 msgstr "B<#include E<lt>stdio.hE<gt>>"
143
144 #. type: Plain text
145 #: build/C/man3/asprintf.3:36
146 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
147 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
148
149 #. type: Plain text
150 #: build/C/man3/asprintf.3:38
151 msgid ""
152 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
153 msgstr ""
154 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
155
156 #. type: SH
157 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
158 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
159 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
160 #: build/C/man3/fflush.3:52 build/C/man3/fgetc.3:44 build/C/man3/fgetwc.3:30
161 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
162 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
163 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
164 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
165 #: build/C/man3/fseeko.3:54 build/C/man3/getline.3:58 build/C/man3/gets.3:38
166 #: build/C/man3/getw.3:59 build/C/man2/link.2:66 build/C/man2/llseek.2:43
167 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:88
168 #: build/C/man2/open_by_handle_at.2:43 build/C/man3/perror.3:55
169 #: build/C/man2/pipe.2:51 build/C/man3/popen.3:64 build/C/man3/printf.3:76
170 #: build/C/man3/puts.3:43 build/C/man2/read.2:44 build/C/man2/readlink.2:86
171 #: build/C/man2/readv.2:58 build/C/man3/remove.3:38 build/C/man2/rename.2:72
172 #: build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87 build/C/man3/setbuf.3:73
173 #: build/C/man3/stdin.3:24 build/C/man3/stdio.3:50 build/C/man3/stdio_ext.3:54
174 #: build/C/man2/symlink.2:74 build/C/man7/symlink.7:40
175 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
176 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:66
177 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:58
178 #: build/C/man2/write.2:46
179 #, no-wrap
180 msgid "DESCRIPTION"
181 msgstr "説明"
182
183 #. type: Plain text
184 #: build/C/man3/asprintf.3:53
185 msgid ""
186 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of "
187 "B<sprintf>(3)  and B<vsprintf>(3), except that they allocate a string large "
188 "enough to hold the output including the terminating null byte (\\(aq"
189 "\\e0\\(aq), and return a pointer to it via the first argument.  This pointer "
190 "should be passed to B<free>(3)  to release the allocated storage when it is "
191 "no longer needed."
192 msgstr ""
193 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
194 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端のヌルバイト (\\(aq"
195 "\\e0\\(aq) も含めて)  保持するのに十分な大きさのメモリーを確保し、 最初の引数"
196 "にその文字列へのポインターを返す。 このポインターは、不要になったら "
197 "B<free>(3)  に渡し、割り当てられた記憶領域を解放すべきである。"
198
199 #. type: SH
200 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
201 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
202 #: build/C/man3/fflush.3:74 build/C/man3/fgetc.3:99 build/C/man3/fgetwc.3:55
203 #: build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:180
204 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
205 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
206 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
207 #: build/C/man3/fseeko.3:88 build/C/man3/getline.3:112 build/C/man3/gets.3:50
208 #: build/C/man3/getw.3:73 build/C/man2/link.2:187 build/C/man2/llseek.2:62
209 #: build/C/man2/lseek.2:179 build/C/man2/open.2:774
210 #: build/C/man2/open_by_handle_at.2:245 build/C/man2/pipe.2:133
211 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
212 #: build/C/man2/readlink.2:153 build/C/man2/readv.2:177
213 #: build/C/man3/remove.3:60 build/C/man2/rename.2:203 build/C/man2/rmdir.2:40
214 #: build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152
215 #: build/C/man2/symlink.2:140 build/C/man3/tempnam.3:94
216 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:79
217 #: build/C/man2/unlink.2:153 build/C/man3/wprintf.3:203
218 #: build/C/man2/write.2:89
219 #, no-wrap
220 msgid "RETURN VALUE"
221 msgstr "返り値"
222
223 #. type: Plain text
224 #: build/C/man3/asprintf.3:61
225 msgid ""
226 "When successful, these functions return the number of bytes printed, just "
227 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
228 "error occurs, these functions will return -1, and the contents of I<strp> is "
229 "undefined."
230 msgstr ""
231 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
232 "す。 メモリーの割り当てができなかったり、 その他エラーが生じると、 これらの関"
233 "数は -1 を返し、 I<strp> の内容は未定義となる。"
234
235 #. type: SH
236 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67
237 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
238 #: build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115
239 #: build/C/man3/fflush.3:98 build/C/man3/fgetc.3:124 build/C/man3/fgetwc.3:70
240 #: build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:199
241 #: build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246
242 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
243 #: build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:169
244 #: build/C/man3/fseeko.3:102 build/C/man3/getline.3:137 build/C/man3/gets.3:58
245 #: build/C/man3/getw.3:80 build/C/man2/link.2:338 build/C/man2/llseek.2:81
246 #: build/C/man2/lseek.2:217 build/C/man2/open.2:1020
247 #: build/C/man2/open_by_handle_at.2:352 build/C/man3/perror.3:111
248 #: build/C/man2/pipe.2:159 build/C/man3/popen.3:172 build/C/man3/printf.3:825
249 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:216
250 #: build/C/man2/readv.2:216 build/C/man3/remove.3:75 build/C/man2/rename.2:405
251 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:173
252 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
253 #: build/C/man2/symlink.2:228 build/C/man3/tempnam.3:105
254 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:96
255 #: build/C/man2/unlink.2:273 build/C/man3/unlocked_stdio.3:113
256 #: build/C/man3/wprintf.3:211 build/C/man2/write.2:189
257 #, no-wrap
258 msgid "CONFORMING TO"
259 msgstr "準拠"
260
261 #. type: Plain text
262 #: build/C/man3/asprintf.3:67
263 msgid ""
264 "These functions are GNU extensions, not in C or POSIX.  They are also "
265 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
266 "error."
267 msgstr ""
268 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
269 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
270 "る。"
271
272 #. type: SH
273 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77
274 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
275 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:126
276 #: build/C/man3/fflush.3:113 build/C/man3/fgetc.3:133 build/C/man3/fgetwc.3:87
277 #: build/C/man3/flockfile.3:141 build/C/man3/fmemopen.3:345
278 #: build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348
279 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
280 #: build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:171
281 #: build/C/man3/fseeko.3:106 build/C/man3/getline.3:172 build/C/man3/gets.3:90
282 #: build/C/man3/getw.3:87 build/C/man2/link.2:411 build/C/man2/llseek.2:87
283 #: build/C/man2/lseek.2:267 build/C/man3/lseek64.3:161
284 #: build/C/man2/open.2:1503 build/C/man2/open_by_handle_at.2:720
285 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:232 build/C/man3/popen.3:201
286 #: build/C/man3/printf.3:1106 build/C/man3/puts.3:112 build/C/man2/read.2:226
287 #: build/C/man2/readlink.2:328 build/C/man2/readv.2:320
288 #: build/C/man3/remove.3:86 build/C/man2/rename.2:443 build/C/man2/rmdir.2:132
289 #: build/C/man3/scanf.3:738 build/C/man3/setbuf.3:209 build/C/man3/stdin.3:154
290 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151
291 #: build/C/man2/symlink.2:260 build/C/man7/symlink.7:512
292 #: build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97
293 #: build/C/man3/tmpnam.3:172 build/C/man2/unlink.2:300
294 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:251
295 #: build/C/man2/write.2:254
296 #, no-wrap
297 msgid "SEE ALSO"
298 msgstr "関連項目"
299
300 #. type: Plain text
301 #: build/C/man3/asprintf.3:71
302 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
303 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
304
305 #. type: SH
306 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79
307 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
308 #: build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:131
309 #: build/C/man3/fflush.3:121 build/C/man3/fgetc.3:150 build/C/man3/fgetwc.3:92
310 #: build/C/man3/flockfile.3:143 build/C/man3/fmemopen.3:348
311 #: build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354
312 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
313 #: build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:174
314 #: build/C/man3/fseeko.3:108 build/C/man3/getline.3:178
315 #: build/C/man3/gets.3:108 build/C/man3/getw.3:93 build/C/man2/link.2:420
316 #: build/C/man2/llseek.2:90 build/C/man2/lseek.2:274
317 #: build/C/man3/lseek64.3:164 build/C/man2/open.2:1525
318 #: build/C/man2/open_by_handle_at.2:736 build/C/man3/perror.3:144
319 #: build/C/man2/pipe.2:239 build/C/man3/popen.3:211 build/C/man3/printf.3:1115
320 #: build/C/man3/puts.3:124 build/C/man2/read.2:239 build/C/man2/readlink.2:336
321 #: build/C/man2/readv.2:324 build/C/man3/remove.3:97 build/C/man2/rename.2:451
322 #: build/C/man2/rmdir.2:141 build/C/man3/scanf.3:745 build/C/man3/setbuf.3:217
323 #: build/C/man3/stdin.3:160 build/C/man3/stdio.3:257
324 #: build/C/man3/stdio_ext.3:154 build/C/man2/symlink.2:271
325 #: build/C/man7/symlink.7:530 build/C/man3/tempnam.3:173
326 #: build/C/man3/tmpfile.3:103 build/C/man3/tmpnam.3:177
327 #: build/C/man2/unlink.2:312 build/C/man3/unlocked_stdio.3:139
328 #: build/C/man3/wprintf.3:258 build/C/man2/write.2:266
329 #, no-wrap
330 msgid "COLOPHON"
331 msgstr "この文書について"
332
333 #. type: Plain text
334 #: build/C/man3/asprintf.3:79 build/C/man3/ctermid.3:87
335 #: build/C/man3/dprintf.3:105 build/C/man3/fclose.3:116
336 #: build/C/man3/fcloseall.3:76 build/C/man3/ferror.3:139
337 #: build/C/man3/fflush.3:129 build/C/man3/fgetc.3:158
338 #: build/C/man3/fgetwc.3:100 build/C/man3/flockfile.3:151
339 #: build/C/man3/fmemopen.3:356 build/C/man3/fmtmsg.3:320
340 #: build/C/man3/fopen.3:362 build/C/man3/fopencookie.3:450
341 #: build/C/man3/fpurge.3:93 build/C/man3/fputwc.3:97 build/C/man3/fread.3:119
342 #: build/C/man3/fseek.3:182 build/C/man3/fseeko.3:116
343 #: build/C/man3/getline.3:186 build/C/man3/gets.3:116 build/C/man3/getw.3:101
344 #: build/C/man2/link.2:428 build/C/man2/llseek.2:98 build/C/man2/lseek.2:282
345 #: build/C/man3/lseek64.3:172 build/C/man2/open.2:1533
346 #: build/C/man2/open_by_handle_at.2:744 build/C/man3/perror.3:152
347 #: build/C/man2/pipe.2:247 build/C/man3/popen.3:219 build/C/man3/printf.3:1123
348 #: build/C/man3/puts.3:132 build/C/man2/read.2:247 build/C/man2/readlink.2:344
349 #: build/C/man2/readv.2:332 build/C/man3/remove.3:105
350 #: build/C/man2/rename.2:459 build/C/man2/rmdir.2:149 build/C/man3/scanf.3:753
351 #: build/C/man3/setbuf.3:225 build/C/man3/stdin.3:168 build/C/man3/stdio.3:265
352 #: build/C/man3/stdio_ext.3:162 build/C/man2/symlink.2:279
353 #: build/C/man7/symlink.7:538 build/C/man3/tempnam.3:181
354 #: build/C/man3/tmpfile.3:111 build/C/man3/tmpnam.3:185
355 #: build/C/man2/unlink.2:320 build/C/man3/unlocked_stdio.3:147
356 #: build/C/man3/wprintf.3:266 build/C/man2/write.2:274
357 msgid ""
358 "This page is part of release 3.78 of the Linux I<man-pages> project.  A "
359 "description of the project, information about reporting bugs, and the latest "
360 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
361 "pages/."
362 msgstr ""
363 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
364 "である。プロジェクトの説明とバグ報告に関する情報は\n"
365 "http://www.kernel.org/doc/man-pages/ に書かれている。"
366
367 #. type: TH
368 #: build/C/man3/ctermid.3:26
369 #, no-wrap
370 msgid "CTERMID"
371 msgstr "CTERMID"
372
373 #. type: TH
374 #: build/C/man3/ctermid.3:26
375 #, no-wrap
376 msgid "2013-07-04"
377 msgstr "2013-07-04"
378
379 #. type: Plain text
380 #: build/C/man3/ctermid.3:29
381 msgid "ctermid - get controlling terminal name"
382 msgstr "ctermid - 制御端末名の取得"
383
384 #. type: Plain text
385 #: build/C/man3/ctermid.3:34 build/C/man3/fgetc.3:33 build/C/man3/fgetwc.3:24
386 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
387 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
388 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:35
389 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
390 #: build/C/man2/rename.2:39 build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54
391 #: build/C/man3/stdin.3:19 build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
392 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
393 #, no-wrap
394 msgid "B<#include E<lt>stdio.hE<gt>>\n"
395 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
396
397 #. type: Plain text
398 #: build/C/man3/ctermid.3:36
399 #, no-wrap
400 msgid "B<char *ctermid(char *>I<s>B<);>\n"
401 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
402
403 #. type: Plain text
404 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
405 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
406 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61 build/C/man3/fseeko.3:41
407 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man2/link.2:51
408 #: build/C/man2/open.2:73 build/C/man3/perror.3:50 build/C/man3/popen.3:55
409 #: build/C/man3/printf.3:63 build/C/man2/readlink.2:64 build/C/man2/readv.2:53
410 #: build/C/man2/rename.2:56 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
411 #: build/C/man2/symlink.2:52 build/C/man3/tempnam.3:38
412 #: build/C/man2/unlink.2:51 build/C/man3/unlocked_stdio.3:68
413 #: build/C/man3/wprintf.3:39
414 msgid ""
415 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
416 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
417
418 #.  From <unistd.h>: _XOPEN_SOURCE
419 #. type: Plain text
420 #: build/C/man3/ctermid.3:46
421 msgid ""
422 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
423 msgstr ""
424 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
425
426 #. type: Plain text
427 #: build/C/man3/ctermid.3:59
428 msgid ""
429 "B<ctermid>()  returns a string which is the pathname for the current "
430 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
431 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
432 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
433 "the returned pathname."
434 msgstr ""
435 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
436 "合、静的なバッファーを用いる。それ以外の場合、 I<s> は端末パス名を保持するの"
437 "に使用されるバッファーへのポインターとなる。 シンボル定数 B<L_ctermid> は返さ"
438 "れるパス名の最大文字数である。"
439
440 #. type: Plain text
441 #: build/C/man3/ctermid.3:61
442 msgid "The pointer to the pathname."
443 msgstr "パス名へのポインター。"
444
445 #. type: SH
446 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55
447 #: build/C/man3/ferror.3:106 build/C/man3/fflush.3:93
448 #: build/C/man3/flockfile.3:127 build/C/man3/fmtmsg.3:225
449 #: build/C/man3/lseek64.3:156 build/C/man3/remove.3:70
450 #: build/C/man3/setbuf.3:164 build/C/man3/stdio_ext.3:132
451 #: build/C/man3/tmpnam.3:86
452 #, no-wrap
453 msgid "ATTRIBUTES"
454 msgstr "属性"
455
456 #. type: SS
457 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
458 #: build/C/man3/ferror.3:107 build/C/man3/fflush.3:94
459 #: build/C/man3/flockfile.3:128 build/C/man3/fmtmsg.3:226
460 #: build/C/man3/lseek64.3:157 build/C/man3/remove.3:71
461 #: build/C/man3/setbuf.3:165 build/C/man3/stdio_ext.3:133
462 #: build/C/man3/tmpnam.3:87
463 #, no-wrap
464 msgid "Multithreading (see pthreads(7))"
465 msgstr "マルチスレッディング (pthreads(7) 参照)"
466
467 #. type: Plain text
468 #: build/C/man3/ctermid.3:67
469 msgid ""
470 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
471 "safe if called with a NULL parameter."
472 msgstr ""
473 "B<ctermid>() 関数は例外付きでスレッドセーフである。 NULL パラメーターで呼び出"
474 "された場合はスレッドセーフではない。"
475
476 #. type: Plain text
477 #: build/C/man3/ctermid.3:69
478 msgid "Svr4, POSIX.1-2001."
479 msgstr "SVr4, POSIX.1-2001."
480
481 #. type: SH
482 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:217
483 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:72 build/C/man3/getw.3:83
484 #: build/C/man2/link.2:405 build/C/man2/open.2:1484 build/C/man3/popen.3:178
485 #: build/C/man3/printf.3:951 build/C/man3/puts.3:105 build/C/man2/read.2:187
486 #: build/C/man2/readv.2:294 build/C/man3/remove.3:83 build/C/man2/rename.2:432
487 #: build/C/man2/rmdir.2:129 build/C/man3/scanf.3:669 build/C/man3/setbuf.3:179
488 #: build/C/man3/tempnam.3:165 build/C/man3/tmpnam.3:165
489 #: build/C/man2/unlink.2:297 build/C/man2/write.2:215
490 #, no-wrap
491 msgid "BUGS"
492 msgstr "バグ"
493
494 #. type: Plain text
495 #: build/C/man3/ctermid.3:73
496 msgid ""
497 "The path returned may not uniquely identify the controlling terminal; it "
498 "may, for example, be I</dev/tty>."
499 msgstr ""
500 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
501 "ように。"
502
503 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
504 #.  if ctermid() was given an argument; fixed in 2.4.
505 #. type: Plain text
506 #: build/C/man3/ctermid.3:77
507 msgid "It is not assured that the program can open the terminal."
508 msgstr "プログラムが端末をオープンできることは保証されていない。"
509
510 #. type: Plain text
511 #: build/C/man3/ctermid.3:79
512 msgid "B<ttyname>(3)"
513 msgstr "B<ttyname>(3)"
514
515 #. type: TH
516 #: build/C/man3/dprintf.3:26
517 #, no-wrap
518 msgid "DPRINTF"
519 msgstr "DPRINTF"
520
521 #. type: TH
522 #: build/C/man3/dprintf.3:26
523 #, no-wrap
524 msgid "2010-09-15"
525 msgstr "2010-09-15"
526
527 #. type: Plain text
528 #: build/C/man3/dprintf.3:29
529 msgid "dprintf, vdprintf - print to a file descriptor"
530 msgstr "dprintf, vdprintf - ファイルディスクリプターに文字出力する"
531
532 #. type: Plain text
533 #: build/C/man3/dprintf.3:33
534 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
535 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
536
537 #. type: Plain text
538 #: build/C/man3/dprintf.3:35
539 msgid ""
540 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
541 msgstr ""
542 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
543
544 #. type: Plain text
545 #: build/C/man3/dprintf.3:43
546 msgid "B<dprintf>(), B<vdprintf>():"
547 msgstr "B<dprintf>(), B<vdprintf>():"
548
549 #. type: TP
550 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
551 #: build/C/man3/getline.3:49 build/C/man2/link.2:57 build/C/man2/open.2:79
552 #: build/C/man2/readlink.2:77 build/C/man2/rename.2:62
553 #: build/C/man2/symlink.2:65 build/C/man2/unlink.2:57
554 #, no-wrap
555 msgid "Since glibc 2.10:"
556 msgstr "glibc 2.10 以降:"
557
558 #. type: Plain text
559 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40 build/C/man2/link.2:60
560 #: build/C/man2/open.2:82 build/C/man2/readlink.2:80 build/C/man2/rename.2:65
561 #: build/C/man2/symlink.2:68 build/C/man2/unlink.2:60
562 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
563 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
564
565 #. type: TP
566 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
567 #: build/C/man3/getline.3:52 build/C/man2/link.2:60 build/C/man2/open.2:82
568 #: build/C/man2/readlink.2:80 build/C/man2/rename.2:65
569 #: build/C/man2/symlink.2:68 build/C/man2/unlink.2:60
570 #, no-wrap
571 msgid "Before glibc 2.10:"
572 msgstr "glibc 2.10 より前:"
573
574 #. type: Plain text
575 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
576 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
577 msgid "_GNU_SOURCE"
578 msgstr "_GNU_SOURCE"
579
580 #. type: Plain text
581 #: build/C/man3/dprintf.3:69
582 msgid ""
583 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
584 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
585 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
586 msgstr ""
587 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
588 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
589 "れらは I<stdio> ストリームではなくファイルディスクリプター I<fd> に対して出力"
590 "を行う。"
591
592 #.  .SH NOTES
593 #.  These functions are GNU extensions, not in C or POSIX.
594 #.  Clearly, the names were badly chosen.
595 #.  Many systems (like MacOS) have incompatible functions called
596 #.  .BR dprintf (),
597 #.  usually some debugging version of
598 #.  .BR printf (3),
599 #.  perhaps with a prototype like
600 #.  .BI "void dprintf(int level, const char *" format ", ...);"
601 #.  where the first argument is a debugging level (and output is to
602 #.  .IR stderr ).
603 #.  Moreover,
604 #.  .BR dprintf ()
605 #.  (or
606 #.  .BR DPRINTF )
607 #.  is also a popular macro name for a debugging printf.
608 #.  So, probably, it is better to avoid this function in programs
609 #.  intended to be portable.
610 #.  A better name would have been
611 #.  .BR fdprintf ().
612 #. type: Plain text
613 #: build/C/man3/dprintf.3:95
614 msgid ""
615 "These functions are GNU extensions that are nowadays specified in "
616 "POSIX.1-2008."
617 msgstr ""
618 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
619 "る。"
620
621 #. type: Plain text
622 #: build/C/man3/dprintf.3:97
623 msgid "B<printf>(3)"
624 msgstr "B<printf>(3)"
625
626 #. type: TH
627 #: build/C/man3/fclose.3:44
628 #, no-wrap
629 msgid "FCLOSE"
630 msgstr "FCLOSE"
631
632 #. type: TH
633 #: build/C/man3/fclose.3:44 build/C/man3/fmemopen.3:10
634 #: build/C/man3/fopencookie.3:26 build/C/man3/getline.3:26
635 #: build/C/man2/open.2:51 build/C/man2/readv.2:32 build/C/man2/write.2:39
636 #, no-wrap
637 msgid "2015-01-22"
638 msgstr "2015-01-22"
639
640 #. type: Plain text
641 #: build/C/man3/fclose.3:47
642 msgid "fclose - close a stream"
643 msgstr "fclose - ストリームを閉じる"
644
645 #. type: Plain text
646 #: build/C/man3/fclose.3:51
647 msgid "B<int fclose(FILE *>I<stream>B<);>"
648 msgstr "B<int fclose(FILE *>I<stream>B<);>"
649
650 #. type: Plain text
651 #: build/C/man3/fclose.3:59
652 msgid ""
653 "The B<fclose>()  function flushes the stream pointed to by I<stream> "
654 "(writing any buffered output data using B<fflush>(3))  and closes the "
655 "underlying file descriptor."
656 msgstr ""
657 "B<fclose>() 関数は、 I<stream> が指すストリームを (バッファーリングされて\n"
658 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
659 "対応するファイルディスクリプターをクローズする。"
660
661 #. type: Plain text
662 #: build/C/man3/fclose.3:70
663 msgid ""
664 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
665 "I<errno> is set to indicate the error.  In either case any further access "
666 "(including another call to B<fclose>())  to the stream results in undefined "
667 "behavior."
668 msgstr ""
669 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
670 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
671 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
672 "は 未定義の動作を生じさせる。"
673
674 #. type: SH
675 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
676 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
677 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
678 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:97
679 #: build/C/man3/getline.3:127 build/C/man2/link.2:192 build/C/man2/llseek.2:69
680 #: build/C/man2/lseek.2:187 build/C/man2/open.2:783
681 #: build/C/man2/open_by_handle_at.2:256 build/C/man2/pipe.2:138
682 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:159
683 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:208
684 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:145
685 #: build/C/man3/tempnam.3:101 build/C/man3/tmpfile.3:56
686 #: build/C/man3/tmpnam.3:84 build/C/man2/unlink.2:158 build/C/man2/write.2:107
687 #, no-wrap
688 msgid "ERRORS"
689 msgstr "エラー"
690
691 #. type: TP
692 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
693 #: build/C/man3/fseek.3:137 build/C/man2/link.2:276 build/C/man2/llseek.2:70
694 #: build/C/man2/lseek.2:188 build/C/man2/open.2:1006
695 #: build/C/man2/open_by_handle_at.2:317 build/C/man2/read.2:114
696 #: build/C/man2/readlink.2:202 build/C/man2/rename.2:349
697 #: build/C/man3/scanf.3:553 build/C/man2/symlink.2:208
698 #: build/C/man2/unlink.2:248 build/C/man2/write.2:126
699 #, no-wrap
700 msgid "B<EBADF>"
701 msgstr "B<EBADF>"
702
703 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
704 #.   low-level file operations on the same stream. If you do get this error,
705 #.   you must have closed the stream's low-level file descriptor using
706 #.   something like close(fileno(stream)).
707 #. type: Plain text
708 #: build/C/man3/fclose.3:80
709 msgid "The file descriptor underlying I<stream> is not valid."
710 msgstr "I<stream> の基となるファイルディスクリプターが不正である。"
711
712 #. type: Plain text
713 #: build/C/man3/fclose.3:90
714 msgid ""
715 "The B<fclose>()  function may also fail and set I<errno> for any of the "
716 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
717 msgstr ""
718 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
719 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
720 "された値に設定される。"
721
722 #. type: Plain text
723 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:171 build/C/man3/puts.3:105
724 msgid "C89, C99."
725 msgstr "C89, C99."
726
727 #. type: SH
728 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
729 #: build/C/man3/fmemopen.3:211 build/C/man3/fmtmsg.3:252
730 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
731 #: build/C/man3/fseeko.3:104 build/C/man2/link.2:347 build/C/man2/llseek.2:84
732 #: build/C/man2/lseek.2:227 build/C/man2/open.2:1064
733 #: build/C/man2/open_by_handle_at.2:359 build/C/man3/perror.3:124
734 #: build/C/man3/printf.3:889 build/C/man2/read.2:175
735 #: build/C/man2/readlink.2:225 build/C/man2/readv.2:228
736 #: build/C/man2/rename.2:414 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
737 #: build/C/man2/symlink.2:238 build/C/man3/tempnam.3:110
738 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:101
739 #: build/C/man2/unlink.2:281 build/C/man3/wprintf.3:213
740 #: build/C/man2/write.2:198
741 #, no-wrap
742 msgid "NOTES"
743 msgstr "注意"
744
745 #. type: Plain text
746 #: build/C/man3/fclose.3:102
747 msgid ""
748 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
749 "library.  To ensure that the data is physically stored on disk the kernel "
750 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
751 msgstr ""
752 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファーをフラッシュす"
753 "るだけで ある点に注意すること。 データを確実に物理的にディスクに記録するため"
754 "には カーネルバッファーも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュし"
755 "なければならない。"
756
757 #. type: Plain text
758 #: build/C/man3/fclose.3:108
759 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
760 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
761
762 #. type: TH
763 #: build/C/man3/fcloseall.3:25
764 #, no-wrap
765 msgid "FCLOSEALL"
766 msgstr "FCLOSEALL"
767
768 #. type: Plain text
769 #: build/C/man3/fcloseall.3:28
770 msgid "fcloseall - close all open streams"
771 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
772
773 #. type: Plain text
774 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
775 #, no-wrap
776 msgid ""
777 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
778 "B<#include E<lt>stdio.hE<gt>>\n"
779 msgstr ""
780 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
781 "B<#include E<lt>stdio.hE<gt>>\n"
782
783 #. type: Plain text
784 #: build/C/man3/fcloseall.3:34
785 #, no-wrap
786 msgid "B<int fcloseall(void);>\n"
787 msgstr "B<int fcloseall(void);>\n"
788
789 #. type: Plain text
790 #: build/C/man3/fcloseall.3:43
791 msgid ""
792 "The B<fcloseall>()  function closes all of the calling process's open "
793 "streams.  Buffered output for each stream is written before it is closed (as "
794 "for B<fflush>(3)); buffered input is discarded."
795 msgstr ""
796 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
797 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
798 "バッファーに溜っている出力データは書き出される。 入力バッファー内のデータは破"
799 "棄される。"
800
801 #. type: Plain text
802 #: build/C/man3/fcloseall.3:50
803 msgid ""
804 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
805 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
806
807 #. type: Plain text
808 #: build/C/man3/fcloseall.3:55
809 msgid ""
810 "This function returns 0 if all files were successfully closed; on error, "
811 "B<EOF> is returned."
812 msgstr ""
813 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
814 "B<EOF> を返す。"
815
816 #. type: Plain text
817 #: build/C/man3/fcloseall.3:60
818 msgid ""
819 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
820 "safe."
821 msgstr ""
822 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
823 "はない。"
824
825 #. type: Plain text
826 #: build/C/man3/fcloseall.3:62
827 msgid "This function is a GNU extension."
828 msgstr "この関数は GNU 拡張である。"
829
830 #. type: Plain text
831 #: build/C/man3/fcloseall.3:68
832 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
833 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
834
835 #. type: TH
836 #: build/C/man3/ferror.3:44
837 #, no-wrap
838 msgid "FERROR"
839 msgstr "FERROR"
840
841 #. type: TH
842 #: build/C/man3/ferror.3:44
843 #, no-wrap
844 msgid "2014-01-15"
845 msgstr "2014-01-15"
846
847 #. type: Plain text
848 #: build/C/man3/ferror.3:47
849 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
850 msgstr ""
851 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
852
853 #. type: Plain text
854 #: build/C/man3/ferror.3:51
855 msgid "B<void clearerr(FILE *>I<stream>B<);>"
856 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
857
858 #. type: Plain text
859 #: build/C/man3/ferror.3:53
860 msgid "B<int feof(FILE *>I<stream>B<);>"
861 msgstr "B<int feof(FILE *>I<stream>B<);>"
862
863 #. type: Plain text
864 #: build/C/man3/ferror.3:55
865 msgid "B<int ferror(FILE *>I<stream>B<);>"
866 msgstr "B<int ferror(FILE *>I<stream>B<);>"
867
868 #. type: Plain text
869 #: build/C/man3/ferror.3:57
870 msgid "B<int fileno(FILE *>I<stream>B<);>"
871 msgstr "B<int fileno(FILE *>I<stream>B<);>"
872
873 #. type: Plain text
874 #: build/C/man3/ferror.3:65
875 msgid ""
876 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
877 msgstr ""
878 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
879
880 #. type: Plain text
881 #: build/C/man3/ferror.3:70
882 msgid ""
883 "The function B<clearerr>()  clears the end-of-file and error indicators for "
884 "the stream pointed to by I<stream>."
885 msgstr ""
886 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
887 "子とエラー指示子をクリアする。"
888
889 #. type: Plain text
890 #: build/C/man3/ferror.3:78
891 msgid ""
892 "The function B<feof>()  tests the end-of-file indicator for the stream "
893 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
894 "indicator can be cleared only by the function B<clearerr>()."
895 msgstr ""
896 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
897 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
898 "よってのみクリアすることができる。"
899
900 #. type: Plain text
901 #: build/C/man3/ferror.3:87
902 msgid ""
903 "The function B<ferror>()  tests the error indicator for the stream pointed "
904 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
905 "reset only by the B<clearerr>()  function."
906 msgstr ""
907 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
908 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 "
909 "B<clearerr>()  によってのみリセットすることができる。"
910
911 #. type: Plain text
912 #: build/C/man3/ferror.3:93
913 msgid ""
914 "The function B<fileno>()  examines the argument I<stream> and returns its "
915 "integer descriptor."
916 msgstr ""
917 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプターを返"
918 "す。"
919
920 #. type: Plain text
921 #: build/C/man3/ferror.3:96 build/C/man3/fgetc.3:99 build/C/man3/fgetwc.3:55
922 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/puts.3:84
923 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
924 msgstr ""
925 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
926
927 #. type: Plain text
928 #: build/C/man3/ferror.3:106
929 msgid ""
930 "These functions should not fail and do not set the external variable "
931 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
932 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
933 msgstr ""
934 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
935 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
936 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
937
938 #. type: Plain text
939 #: build/C/man3/ferror.3:115
940 msgid ""
941 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
942 "thread-safe."
943 msgstr ""
944 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
945 "る。"
946
947 #. type: Plain text
948 #: build/C/man3/ferror.3:122
949 msgid ""
950 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89, "
951 "C99, POSIX.1-2001, and POSIX.1-2008."
952 msgstr ""
953 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89, C99, POSIX.1-2001, "
954 "POSIX.1-2008 に準拠している。"
955
956 #. type: Plain text
957 #: build/C/man3/ferror.3:126
958 msgid "The function B<fileno>()  conforms to POSIX.1-2001 and POSIX.1-2008."
959 msgstr "関数 B<fileno>() は POSIX.1-2001 と POSIX.1-2008 に準拠している。"
960
961 #. type: Plain text
962 #: build/C/man3/ferror.3:131
963 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
964 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
965
966 #. type: TH
967 #: build/C/man3/fflush.3:45
968 #, no-wrap
969 msgid "FFLUSH"
970 msgstr "FFLUSH"
971
972 #. type: TH
973 #: build/C/man3/fflush.3:45
974 #, no-wrap
975 msgid "2013-07-15"
976 msgstr "2013-07-15"
977
978 #. type: Plain text
979 #: build/C/man3/fflush.3:48
980 msgid "fflush - flush a stream"
981 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
982
983 #. type: Plain text
984 #: build/C/man3/fflush.3:52
985 msgid "B<int fflush(FILE *>I<stream>B<);>"
986 msgstr "B<int fflush(FILE *>I<stream>B<);>"
987
988 #. type: Plain text
989 #: build/C/man3/fflush.3:63
990 msgid ""
991 "For output streams, B<fflush>()  forces a write of all user-space buffered "
992 "data for the given output or update I<stream> via the stream's underlying "
993 "write function.  For input streams, B<fflush>()  discards any buffered data "
994 "that has been fetched from the underlying file, but has not been consumed by "
995 "the application.  The open status of the stream is unaffected."
996 msgstr ""
997 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファーリングさ"
998 "れているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくは"
999 "ストリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
1000 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
1001 "たが、アプリケーションからは 読み出されていないバッファーデータを全て破棄す"
1002 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
1003 "い。"
1004
1005 #. type: Plain text
1006 #: build/C/man3/fflush.3:71
1007 msgid ""
1008 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
1009 "streams."
1010 msgstr ""
1011 "I<stream> 引数が NULL ならば、 B<fflush>()  は開いているI<すべての>出力スト"
1012 "リームをフラッシュする。"
1013
1014 #. type: Plain text
1015 #: build/C/man3/fflush.3:74
1016 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
1017 msgstr ""
1018 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
1019 "と。"
1020
1021 #. type: Plain text
1022 #: build/C/man3/fflush.3:81
1023 msgid ""
1024 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
1025 "I<errno> is set to indicate the error."
1026 msgstr ""
1027 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
1028 "ラーに対応した値に設定される。"
1029
1030 #. type: Plain text
1031 #: build/C/man3/fflush.3:86
1032 msgid "I<Stream> is not an open stream, or is not open for writing."
1033 msgstr ""
1034 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
1035 "ない。"
1036
1037 #. type: Plain text
1038 #: build/C/man3/fflush.3:93
1039 msgid ""
1040 "The function B<fflush>()  may also fail and set I<errno> for any of the "
1041 "errors specified for B<write>(2)."
1042 msgstr ""
1043 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1044 "ある。 この場合 I<errno> もその値に設定される。"
1045
1046 #. type: Plain text
1047 #: build/C/man3/fflush.3:98
1048 msgid "The B<fflush>()  function is thread-safe."
1049 msgstr "関数 B<fflush>() はスレッドセーフである。"
1050
1051 #. type: Plain text
1052 #: build/C/man3/fflush.3:100
1053 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1054 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1055
1056 #.  Verified on: Solaris 8.
1057 #. type: Plain text
1058 #: build/C/man3/fflush.3:104
1059 msgid ""
1060 "The standards do not specify the behavior for input streams.  Most other "
1061 "implementations behave the same as Linux."
1062 msgstr ""
1063 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1064 "は Linux と同じ動作をする。"
1065
1066 #. type: Plain text
1067 #: build/C/man3/fflush.3:113
1068 msgid ""
1069 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1070 "library.  To ensure that the data is physically stored on disk the kernel "
1071 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1072 msgstr ""
1073 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファーしかフラッ"
1074 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1075 "ネルバッファーもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1076 "B<fsync>(2)  を用いる。"
1077
1078 #. type: Plain text
1079 #: build/C/man3/fflush.3:121
1080 msgid ""
1081 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), "
1082 "B<setbuf>(3), B<unlocked_stdio>(3)"
1083 msgstr ""
1084 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), "
1085 "B<setbuf>(3), B<unlocked_stdio>(3)"
1086
1087 #. type: TH
1088 #: build/C/man3/fgetc.3:27
1089 #, no-wrap
1090 msgid "FGETC"
1091 msgstr "FGETC"
1092
1093 #. type: TH
1094 #: build/C/man3/fgetc.3:27
1095 #, no-wrap
1096 msgid "2013-12-31"
1097 msgstr "2013-12-31"
1098
1099 #. type: Plain text
1100 #: build/C/man3/fgetc.3:30
1101 msgid "fgetc, fgets, getc, getchar, ungetc - input of characters and strings"
1102 msgstr "fgetc, fgets, getc, getchar, ungetc - 文字と文字列の入力"
1103
1104 #. type: Plain text
1105 #: build/C/man3/fgetc.3:35
1106 #, no-wrap
1107 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
1108 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
1109
1110 #. type: Plain text
1111 #: build/C/man3/fgetc.3:37
1112 #, no-wrap
1113 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
1114 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
1115
1116 #. type: Plain text
1117 #: build/C/man3/fgetc.3:39
1118 #, no-wrap
1119 msgid "B<int getc(FILE *>I<stream>B<);>\n"
1120 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
1121
1122 #. type: Plain text
1123 #: build/C/man3/fgetc.3:41
1124 #, no-wrap
1125 msgid "B<int getchar(void);>\n"
1126 msgstr "B<int getchar(void);>\n"
1127
1128 #. type: Plain text
1129 #: build/C/man3/fgetc.3:43
1130 #, no-wrap
1131 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
1132 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
1133
1134 #. type: Plain text
1135 #: build/C/man3/fgetc.3:55
1136 msgid ""
1137 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
1138 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
1139 msgstr ""
1140 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
1141 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
1142 "す。"
1143
1144 #. type: Plain text
1145 #: build/C/man3/fgetc.3:62
1146 msgid ""
1147 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
1148 "a macro which evaluates I<stream> more than once."
1149 msgstr ""
1150 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
1151 "実装されているかもしれない。"
1152
1153 #. type: Plain text
1154 #: build/C/man3/fgetc.3:66
1155 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
1156 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
1157
1158 #. type: Plain text
1159 #: build/C/man3/fgetc.3:80
1160 msgid ""
1161 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
1162 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
1163 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
1164 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
1165 "in the buffer."
1166 msgstr ""
1167 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
1168 "指すバッファーに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停"
1169 "止する。 読み込まれた改行文字はバッファーに格納される。 終端のヌルバイト "
1170 "(\\(aq\\e0\\(aq)  が一つバッファーの中の最後の文字の後に書き込まれる。"
1171
1172 #. type: Plain text
1173 #: build/C/man3/fgetc.3:91
1174 msgid ""
1175 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
1176 "it is available for subsequent read operations.  Pushed-back characters will "
1177 "be returned in reverse order; only one pushback is guaranteed."
1178 msgstr ""
1179 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
1180 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
1181 "しとして保証されているのは、一文字だけである。"
1182
1183 #. type: Plain text
1184 #: build/C/man3/fgetc.3:96
1185 msgid ""
1186 "Calls to the functions described here can be mixed with each other and with "
1187 "calls to other input functions from the I<stdio> library for the same input "
1188 "stream."
1189 msgstr ""
1190 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
1191 "互いに混ぜて使うことができる。"
1192
1193 #. type: Plain text
1194 #: build/C/man3/fgetc.3:111
1195 msgid ""
1196 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
1197 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
1198 msgstr ""
1199 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
1200 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
1201 "す。"
1202
1203 #. type: Plain text
1204 #: build/C/man3/fgetc.3:117
1205 msgid ""
1206 "B<fgets>()  returns I<s> on success, and NULL on error or when end of file "
1207 "occurs while no characters have been read."
1208 msgstr ""
1209 "B<fgets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのに"
1210 "ファイルの終わりになった 場合に NULL を返す。"
1211
1212 #. type: Plain text
1213 #: build/C/man3/fgetc.3:124
1214 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
1215 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
1216
1217 #. type: Plain text
1218 #: build/C/man3/fgetc.3:126 build/C/man3/gets.3:60
1219 msgid "C89, C99, POSIX.1-2001."
1220 msgstr "C89, C99, POSIX.1-2001."
1221
1222 #. type: Plain text
1223 #: build/C/man3/fgetc.3:133
1224 msgid ""
1225 "It is not advisable to mix calls to input functions from the I<stdio> "
1226 "library with low-level calls to B<read>(2)  for the file descriptor "
1227 "associated with the input stream; the results will be undefined and very "
1228 "probably not what you want."
1229 msgstr ""
1230 "入力ストリームのファイルディスクリプターに対して、 I<stdio> ライブラリの入力"
1231 "関数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結"
1232 "果がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
1233
1234 #. type: Plain text
1235 #: build/C/man3/fgetc.3:150
1236 msgid ""
1237 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), "
1238 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), "
1239 "B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
1240 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
1241 msgstr ""
1242 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), "
1243 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), "
1244 "B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
1245 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
1246
1247 #. type: TH
1248 #: build/C/man3/fgetwc.3:18
1249 #, no-wrap
1250 msgid "FGETWC"
1251 msgstr "FGETWC"
1252
1253 #. type: TH
1254 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/popen.3:40
1255 #, no-wrap
1256 msgid "2013-04-19"
1257 msgstr "2013-04-19"
1258
1259 #. type: Plain text
1260 #: build/C/man3/fgetwc.3:21
1261 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1262 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1263
1264 #. type: Plain text
1265 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1266 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1267 #, no-wrap
1268 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1269 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1270
1271 #. type: Plain text
1272 #: build/C/man3/fgetwc.3:29
1273 #, no-wrap
1274 msgid ""
1275 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1276 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1277 msgstr ""
1278 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1279 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1280
1281 #. type: Plain text
1282 #: build/C/man3/fgetwc.3:44
1283 msgid ""
1284 "The B<fgetwc>()  function is the wide-character equivalent of the "
1285 "B<fgetc>(3)  function.  It reads a wide character from I<stream> and returns "
1286 "it.  If the end of stream is reached, or if I<ferror(stream)> becomes true, "
1287 "it returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1288 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1289 msgstr ""
1290 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1291 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1292 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1293 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1294 "し、 B<WEOF> を返す。"
1295
1296 #. type: Plain text
1297 #: build/C/man3/fgetwc.3:52
1298 msgid ""
1299 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1300 "may be implemented as a macro, and may evaluate its argument more than "
1301 "once.  There is no reason ever to use it."
1302 msgstr ""
1303 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1304 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1305 "ない。この関数を使う理由はもはや存在しない。"
1306
1307 #. type: Plain text
1308 #: build/C/man3/fgetwc.3:64
1309 msgid ""
1310 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1311 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1312 msgstr ""
1313 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1314 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1315
1316 #. type: Plain text
1317 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1318 msgid "Apart from the usual ones, there is"
1319 msgstr "通常のエラーに加えて、以下のエラーがある:"
1320
1321 #. type: TP
1322 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1323 #, no-wrap
1324 msgid "B<EILSEQ>"
1325 msgstr "B<EILSEQ>"
1326
1327 #. type: Plain text
1328 #: build/C/man3/fgetwc.3:70
1329 msgid ""
1330 "The data obtained from the input stream does not form a valid character."
1331 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1332
1333 #. type: Plain text
1334 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1335 msgid "C99, POSIX.1-2001."
1336 msgstr "C99, POSIX.1-2001."
1337
1338 #. type: Plain text
1339 #: build/C/man3/fgetwc.3:79
1340 msgid ""
1341 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1342 "current locale."
1343 msgstr ""
1344 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリーに依存する。"
1345
1346 #. type: Plain text
1347 #: build/C/man3/fgetwc.3:87
1348 msgid ""
1349 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1350 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1351 "sequence from the stream and then convert it to a wide character."
1352 msgstr ""
1353 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1354 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1355 "換すると期待することは適切である。"
1356
1357 #. type: Plain text
1358 #: build/C/man3/fgetwc.3:92
1359 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1360 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1361
1362 #. type: TH
1363 #: build/C/man3/flockfile.3:25
1364 #, no-wrap
1365 msgid "FLOCKFILE"
1366 msgstr "FLOCKFILE"
1367
1368 #. type: TH
1369 #: build/C/man3/flockfile.3:25 build/C/man2/link.2:32
1370 #: build/C/man3/lseek64.3:25 build/C/man3/remove.3:31 build/C/man2/rename.2:33
1371 #: build/C/man3/setbuf.3:48 build/C/man2/symlink.2:33 build/C/man2/unlink.2:33
1372 #, no-wrap
1373 msgid "2014-08-19"
1374 msgstr "2014-08-19"
1375
1376 #. type: Plain text
1377 #: build/C/man3/flockfile.3:28
1378 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1379 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1380
1381 #. type: Plain text
1382 #: build/C/man3/flockfile.3:33
1383 #, no-wrap
1384 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1385 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1386
1387 #. type: Plain text
1388 #: build/C/man3/flockfile.3:35
1389 #, no-wrap
1390 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1391 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1392
1393 #. type: Plain text
1394 #: build/C/man3/flockfile.3:37
1395 #, no-wrap
1396 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1397 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1398
1399 #. type: Plain text
1400 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1401 msgid "All functions shown above:"
1402 msgstr "上記の全ての関数:"
1403
1404 #. type: Plain text
1405 #: build/C/man3/flockfile.3:49
1406 msgid ""
1407 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1408 "|| _POSIX_SOURCE"
1409 msgstr ""
1410 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1411 "|| _POSIX_SOURCE"
1412
1413 #. type: Plain text
1414 #: build/C/man3/flockfile.3:63
1415 msgid ""
1416 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1417 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1418 "thread.  For each library call, these functions wait until the I<FILE> "
1419 "object is no longer locked by a different thread, then lock it, do the "
1420 "requested I/O, and unlock the object again."
1421 msgstr ""
1422 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1423 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1424 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1425 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1426 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1427 "オブジェクトのロックを解除する。"
1428
1429 #. type: Plain text
1430 #: build/C/man3/flockfile.3:69
1431 msgid ""
1432 "(Note: this locking has nothing to do with the file locking done by "
1433 "functions like B<flock>(2)  and B<lockf>(3).)"
1434 msgstr ""
1435 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1436 "全く無関係である。)"
1437
1438 #. type: Plain text
1439 #: build/C/man3/flockfile.3:77
1440 msgid ""
1441 "All this is invisible to the C-programmer, but there may be two reasons to "
1442 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1443 "actions by one thread belongs together, and should not be interrupted by the "
1444 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1445 "should be avoided for greater efficiency."
1446 msgstr ""
1447 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1448 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1449 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1450 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1451 "避ける必要があるということであろう。"
1452
1453 #. type: Plain text
1454 #: build/C/man3/flockfile.3:94
1455 msgid ""
1456 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1457 "series of I/O actions, then unlock.  This prevents other threads from coming "
1458 "in between.  If the reason for doing this was to achieve greater efficiency, "
1459 "one does the I/O with the nonlocking versions of the stdio functions: with "
1460 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1461 "B<putc>(3)."
1462 msgstr ""
1463 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1464 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1465 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1466 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1467 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1468 "B<putc_unlocked>(3)  を使用する。"
1469
1470 #. type: Plain text
1471 #: build/C/man3/flockfile.3:105
1472 msgid ""
1473 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1474 "by a different thread, then makes the current thread owner of "
1475 "I<*filehandle>, and increments the lockcount."
1476 msgstr ""
1477 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1478 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1479 "ロック数を加算する。"
1480
1481 #. type: Plain text
1482 #: build/C/man3/flockfile.3:109
1483 msgid "The B<funlockfile>()  function decrements the lock count."
1484 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1485
1486 #. type: Plain text
1487 #: build/C/man3/flockfile.3:120
1488 msgid ""
1489 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1490 "It does nothing in case some other thread owns I<*filehandle>, and it "
1491 "obtains ownership and increments the lockcount otherwise."
1492 msgstr ""
1493 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1494 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1495 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1496
1497 #. type: Plain text
1498 #: build/C/man3/flockfile.3:125
1499 msgid ""
1500 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1501 "obtained), and nonzero for failure."
1502 msgstr ""
1503 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1504 "の値を返す。"
1505
1506 #. type: Plain text
1507 #: build/C/man3/flockfile.3:127
1508 msgid "None."
1509 msgstr "なし。"
1510
1511 #. type: Plain text
1512 #: build/C/man3/flockfile.3:135
1513 msgid ""
1514 "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are "
1515 "thread-safe."
1516 msgstr ""
1517 "関数 B<flockfile>(), B<ftrylockfile>(), B<funlockfile>() はスレッドセーフであ"
1518 "る。"
1519
1520 #. type: Plain text
1521 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1522 msgid "POSIX.1-2001."
1523 msgstr "POSIX.1-2001."
1524
1525 #. type: SH
1526 #: build/C/man3/flockfile.3:137
1527 #, no-wrap
1528 msgid "AVAILABILITY"
1529 msgstr "可用性"
1530
1531 #. type: Plain text
1532 #: build/C/man3/flockfile.3:141
1533 msgid ""
1534 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1535 "defined."
1536 msgstr ""
1537 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1538 "ことができる。"
1539
1540 #. type: Plain text
1541 #: build/C/man3/flockfile.3:143
1542 msgid "B<unlocked_stdio>(3)"
1543 msgstr "B<unlocked_stdio>(3)"
1544
1545 #. type: TH
1546 #: build/C/man3/fmemopen.3:10
1547 #, no-wrap
1548 msgid "FMEMOPEN"
1549 msgstr "FMEMOPEN"
1550
1551 #. type: Plain text
1552 #: build/C/man3/fmemopen.3:13
1553 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1554 msgstr ""
1555 "fmemopen, open_memstream, open_wmemstream - メモリーをストリームとしてオープ"
1556 "ンする"
1557
1558 #. type: Plain text
1559 #: build/C/man3/fmemopen.3:18
1560 #, no-wrap
1561 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1562 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1563
1564 #. type: Plain text
1565 #: build/C/man3/fmemopen.3:20
1566 #, no-wrap
1567 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1568 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1569
1570 #. type: Plain text
1571 #: build/C/man3/fmemopen.3:24
1572 #, no-wrap
1573 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1574 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1575
1576 #. type: Plain text
1577 #: build/C/man3/fmemopen.3:34
1578 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1579 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1580
1581 #. type: Plain text
1582 #: build/C/man3/fmemopen.3:57
1583 msgid ""
1584 "The B<fmemopen>()  function opens a stream that permits the access specified "
1585 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1586 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1587 "long."
1588 msgstr ""
1589 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1590 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1591 "文字列やメモリーバッファーへの読み書きができる。 このバッファーは少なくとも "
1592 "I<size> バイトの長さでなければならない。"
1593
1594 #. type: Plain text
1595 #: build/C/man3/fmemopen.3:77
1596 msgid ""
1597 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1598 "an append mode, then the initial file position is set to the location of the "
1599 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1600 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1601 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1602 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1603 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1604 "e., the value specified by the I<size> argument), rather than the current "
1605 "string length."
1606 msgstr ""
1607 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1608 "(append mode) が指定された場合、ファイル位置の初期値は バッファー中の\n"
1609 "最初のヌルバイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1610 "それ以外の場合は、ファイル位置の初期値はバッファーの先頭になる。 \n"
1611 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1612 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1613 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1614 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1615 "ではなく、バッファーの末尾 (I<size> で指定した値) からの相対値となる。"
1616
1617 #. type: Plain text
1618 #: build/C/man3/fmemopen.3:89
1619 msgid ""
1620 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1621 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1622 "there is space.  The caller should ensure that an extra byte is available in "
1623 "the buffer (and that I<size> counts that byte)  to allow for this."
1624 msgstr ""
1625 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1626 "(B<fclose>(3))  した時に、 (バッファーに空きがあれば) ヌルバイトがバッファー"
1627 "の末尾に書き込まれる。 このようにするためには、呼び出し元は バッファーに 1バ"
1628 "イト余裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1629
1630 #. type: Plain text
1631 #: build/C/man3/fmemopen.3:98
1632 msgid ""
1633 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1634 "(By default, such errors will be visible only when the I<stdio> buffer is "
1635 "flushed.  Disabling buffering with the following call may be useful to "
1636 "detect errors at the time of an output operation:"
1637 msgstr ""
1638 "バッファーに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1639 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファーがフ"
1640 "ラッシュされた時だけである。 以下の呼び出しを使ってバッファーリングを無効にす"
1641 "る方法は、 出力操作を行った時点でエラーを検出するのに役立つ。"
1642
1643 #. type: Plain text
1644 #: build/C/man3/fmemopen.3:100
1645 #, no-wrap
1646 msgid "    setbuf(stdream, NULL);\n"
1647 msgstr "    setbuf(stdream, NULL);\n"
1648
1649 #. type: Plain text
1650 #: build/C/man3/fmemopen.3:105
1651 msgid ""
1652 "Alternatively, the caller can explicitly set I<buf> as the stdio stream "
1653 "buffer, at the same time informing stdio of the buffer's size, using:"
1654 msgstr ""
1655 "別の方法としては、 以下のように、 呼び出し側が明示的に stdio ストリームバッ"
1656 "ファーとして I<buf> を指定し、バッファーの指定時にバッファーのサイズを stdio "
1657 "に教える方法がある。"
1658
1659 #. type: Plain text
1660 #: build/C/man3/fmemopen.3:107
1661 #, no-wrap
1662 msgid "    setbuffer(stream, buf, size);\n"
1663 msgstr "    setbuffer(stream, buf, size);\n"
1664
1665 #. type: Plain text
1666 #: build/C/man3/fmemopen.3:119
1667 msgid ""
1668 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1669 "not cause read operations to return an end-of-file indication.  A read from "
1670 "the buffer will only indicate end-of-file when the file pointer advances "
1671 "I<size> bytes past the start of the buffer."
1672 msgstr ""
1673 "読み出し用にオープンされたストリームでは、 バッファー内にヌルバイト (\\(aq"
1674 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1675 "い。 バッファーからの読み出しでファイル末尾が返るのは、 ファイルポインターが"
1676 "バッファーの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1677
1678 #. type: Plain text
1679 #: build/C/man3/fmemopen.3:134
1680 msgid ""
1681 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1682 "buffer I<size> bytes long.  This is useful for an application that wants to "
1683 "write data to a temporary buffer and then read it back again.  The buffer is "
1684 "automatically freed when the stream is closed.  Note that the caller has no "
1685 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1686 "see B<open_memstream>()  below)."
1687 msgstr ""
1688 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1689 "さのバッファーを確保する。 この方法は、一時バッファーにデータの書き込みを行っ"
1690 "てから、 その内容を再度読み出すようなアプリケーションで有用である。 このバッ"
1691 "ファーはストリームがクローズされるときに自動的に解放される。 呼び出し元からは"
1692 "この関数が割り当てた一時バッファーへのポインター値を 知る方法は存在しない点に"
1693 "注意 (下記の B<open_memstream>()  も参照)。"
1694
1695 #. type: Plain text
1696 #: build/C/man3/fmemopen.3:145
1697 msgid ""
1698 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1699 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1700 "automatically grows as required.  After closing the stream, the caller "
1701 "should B<free>(3)  this buffer."
1702 msgstr ""
1703 "B<open_memstream>()  関数は、バッファーへの書き込み用にストリームをオープンす"
1704 "る。 バッファーは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自"
1705 "動的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファーを "
1706 "B<free>(3)  すべきである。"
1707
1708 #. type: Plain text
1709 #: build/C/man3/fmemopen.3:160
1710 msgid ""
1711 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1712 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1713 "respectively, a pointer to the buffer and the current size of the buffer.  "
1714 "These values remain valid only as long as the caller performs no further "
1715 "output on the stream.  If further output is performed, then the stream must "
1716 "again be flushed before trying to access these variables."
1717 msgstr ""
1718 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1719 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファーへのポインターとそ"
1720 "のサイズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込"
1721 "みを 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これ"
1722 "らの変数を参照する前に ストリームを再度フラッシュしなければならない。"
1723
1724 #. type: Plain text
1725 #: build/C/man3/fmemopen.3:166
1726 msgid ""
1727 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1728 "included in the size value stored at I<sizeloc>."
1729 msgstr ""
1730 "バッファー末尾のヌルバイトは保持される。 このヌルバイトは I<sizeloc> に格納さ"
1731 "れるサイズには「含まれない」。"
1732
1733 #. type: Plain text
1734 #: build/C/man3/fmemopen.3:174
1735 msgid ""
1736 "The stream's file position can be changed with B<fseek>(3)  or "
1737 "B<fseeko>(3).  Moving the file position past the end of the data already "
1738 "written fills the intervening space with zeros."
1739 msgstr ""
1740 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1741 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1742 "は 0 で埋められる。"
1743
1744 #. type: Plain text
1745 #: build/C/man3/fmemopen.3:180
1746 msgid ""
1747 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1748 "wide characters instead of bytes."
1749 msgstr ""
1750 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1751 "ド文字に対して操作を行う点が異なる。"
1752
1753 #. type: Plain text
1754 #: build/C/man3/fmemopen.3:192
1755 msgid ""
1756 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1757 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1758 "and I<errno> is set to indicate the error."
1759 msgstr ""
1760 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1761 "B<open_wmemstream>()  は I<FILE> ポインターを返す。 失敗した場合は、 NULL を"
1762 "返し、 I<errno> にエラーを示す値をセットする。"
1763
1764 #. type: SH
1765 #: build/C/man3/fmemopen.3:192 build/C/man3/fmtmsg.3:222
1766 #: build/C/man3/fseeko.3:100 build/C/man2/link.2:334 build/C/man2/open.2:1016
1767 #: build/C/man2/open_by_handle_at.2:349 build/C/man2/pipe.2:154
1768 #: build/C/man2/readlink.2:212 build/C/man2/readv.2:211
1769 #: build/C/man2/rename.2:397 build/C/man2/symlink.2:224
1770 #: build/C/man2/unlink.2:269
1771 #, no-wrap
1772 msgid "VERSIONS"
1773 msgstr "バージョン"
1774
1775 #. type: Plain text
1776 #: build/C/man3/fmemopen.3:199
1777 msgid ""
1778 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1779 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1780 msgstr ""
1781 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1782 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1783
1784 #. type: Plain text
1785 #: build/C/man3/fmemopen.3:203
1786 msgid ""
1787 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1788 "not widely available on other systems."
1789 msgstr ""
1790 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1791 "のシステムで広く利用可能である。"
1792
1793 #.  http://austingroupbugs.net/view.php?id=396
1794 #. type: Plain text
1795 #: build/C/man3/fmemopen.3:211
1796 msgid ""
1797 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1798 "However, Technical Corrigendum 1 adjusts the standard to allow "
1799 "implementation-specific treatment for this case, thus permitting the glibc "
1800 "treatment of \\(aqb\\(aq."
1801 msgstr ""
1802 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1803 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1804 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1805 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1806
1807 #. type: Plain text
1808 #: build/C/man3/fmemopen.3:217
1809 msgid ""
1810 "There is no file descriptor associated with the file stream returned by "
1811 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1812 "returned stream)."
1813 msgstr ""
1814 "これらの関数が返すファイルストリームに対応するファイル ディスクリプターはな"
1815 "い (つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返る"
1816 "ことになる)。"
1817
1818 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1819 #. type: Plain text
1820 #: build/C/man3/fmemopen.3:224
1821 msgid ""
1822 "In glibc before version 2.7, seeking past the end of a stream created by "
1823 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1824 "call fails, returning -1."
1825 msgstr ""
1826 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1827 "リームの末尾より先にファイル位置を動かしても、 バッファーが伸長されず、 "
1828 "B<fseek>(3)  が失敗し -1 が返る。"
1829
1830 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1831 #. type: Plain text
1832 #: build/C/man3/fmemopen.3:235
1833 msgid ""
1834 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1835 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1836 "stream that then returned end of file on the first attempt at reading.  "
1837 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1838 msgstr ""
1839 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1840 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1841 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1842 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1843
1844 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1845 #. type: Plain text
1846 #: build/C/man3/fmemopen.3:243
1847 msgid ""
1848 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1849 "file position to the first null byte, but (if the file offset is reset to a "
1850 "location other than the end of the stream)  does not force subsequent writes "
1851 "to append at the end of the stream."
1852 msgstr ""
1853 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1854 "ファイル位置の初期値は最初のヌルバイトに設定されるが、(ファイル\n"
1855 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1856 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1857
1858 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1859 #. type: Plain text
1860 #: build/C/man3/fmemopen.3:259
1861 msgid ""
1862 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1863 "\"), and the I<size> argument does not cover a null byte in I<buf>, then, "
1864 "according to POSIX.1-2008, the initial file position should be set to the "
1865 "next byte after the end of the buffer.  However, in this case the glibc "
1866 "B<fmemopen>()  sets the file position to -1."
1867 msgstr ""
1868 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1869 "I<size> 引き数で指定した範囲の I<buf> 内にヌルバイトがない場合、\n"
1870 "POSIX.1-2008 では、ファイル位置の初期値はバッファーの末尾の直後の\n"
1871 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1872 "この場合ファイル位置は -1 に設定される。"
1873
1874 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1875 #. type: Plain text
1876 #: build/C/man3/fmemopen.3:272
1877 msgid ""
1878 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1879 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1880 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1881 "I<mode> by B<fopen>(3)."
1882 msgstr ""
1883 "B<fmemopen>() でバイナリモードを指定するには、\n"
1884 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1885 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1886 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1887
1888 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1889 #. type: Plain text
1890 #: build/C/man3/fmemopen.3:280
1891 msgid ""
1892 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1893 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1894 msgstr ""
1895 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1896 "ABI (Application Binary Interface) が黙って変更された。\n"
1897 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1898
1899 #. type: SH
1900 #: build/C/man3/fmemopen.3:280 build/C/man3/fmtmsg.3:256
1901 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1902 #: build/C/man2/open_by_handle_at.2:439 build/C/man2/pipe.2:165
1903 #: build/C/man3/printf.3:995 build/C/man2/readlink.2:269
1904 #: build/C/man2/readv.2:301 build/C/man3/scanf.3:704
1905 #, no-wrap
1906 msgid "EXAMPLE"
1907 msgstr "例"
1908
1909 #. type: Plain text
1910 #: build/C/man3/fmemopen.3:290
1911 msgid ""
1912 "The program below uses B<fmemopen>()  to open an input buffer, and "
1913 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1914 "scans its input string (taken from the program's first command-line "
1915 "argument) reading integers, and writes the squares of these integers to the "
1916 "output buffer.  An example of the output produced by this program is the "
1917 "following:"
1918 msgstr ""
1919 "このプログラムは B<fmemopen>()  を使って出力バッファーをオープンし、 "
1920 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファーをオープンし"
1921 "ている。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャ"
1922 "ンして整数を読み込み、これらの整数の二乗を出力バッファーに書き出す。 このプロ"
1923 "グラムの実行例は以下のようになる。"
1924
1925 #. type: Plain text
1926 #: build/C/man3/fmemopen.3:295
1927 #, no-wrap
1928 msgid ""
1929 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1930 "size=11; ptr=1 529 1849\n"
1931 msgstr ""
1932 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1933 "size=11; ptr=1 529 1849\n"
1934
1935 #. type: SS
1936 #: build/C/man3/fmemopen.3:297 build/C/man3/fopencookie.3:271
1937 #: build/C/man2/pipe.2:181
1938 #, no-wrap
1939 msgid "Program source"
1940 msgstr "プログラムのソース"
1941
1942 #. type: Plain text
1943 #: build/C/man3/fmemopen.3:304
1944 #, no-wrap
1945 msgid ""
1946 "#define _GNU_SOURCE\n"
1947 "#include E<lt>string.hE<gt>\n"
1948 "#include E<lt>stdio.hE<gt>\n"
1949 "#include E<lt>stdlib.hE<gt>\n"
1950 msgstr ""
1951 "#define _GNU_SOURCE\n"
1952 "#include E<lt>string.hE<gt>\n"
1953 "#include E<lt>stdio.hE<gt>\n"
1954 "#include E<lt>stdlib.hE<gt>\n"
1955
1956 #. type: Plain text
1957 #: build/C/man3/fmemopen.3:307
1958 #, no-wrap
1959 msgid ""
1960 "#define handle_error(msg) \\e\n"
1961 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1962 msgstr ""
1963 "#define handle_error(msg) \\e\n"
1964 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1965
1966 #. type: Plain text
1967 #: build/C/man3/fmemopen.3:315
1968 #, no-wrap
1969 msgid ""
1970 "int\n"
1971 "main(int argc, char *argv[])\n"
1972 "{\n"
1973 "    FILE *out, *in;\n"
1974 "    int v, s;\n"
1975 "    size_t size;\n"
1976 "    char *ptr;\n"
1977 msgstr ""
1978 "int\n"
1979 "main(int argc, char *argv[])\n"
1980 "{\n"
1981 "    FILE *out, *in;\n"
1982 "    int v, s;\n"
1983 "    size_t size;\n"
1984 "    char *ptr;\n"
1985
1986 #. type: Plain text
1987 #: build/C/man3/fmemopen.3:320
1988 #, no-wrap
1989 msgid ""
1990 "    if (argc != 2) {\n"
1991 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1992 "        exit(EXIT_FAILURE);\n"
1993 "    }\n"
1994 msgstr ""
1995 "    if (argc != 2) {\n"
1996 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1997 "        exit(EXIT_FAILURE);\n"
1998 "    }\n"
1999
2000 #. type: Plain text
2001 #: build/C/man3/fmemopen.3:324
2002 #, no-wrap
2003 msgid ""
2004 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
2005 "    if (in == NULL)\n"
2006 "        handle_error(\"fmemopen\");\n"
2007 msgstr ""
2008 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
2009 "    if (in == NULL)\n"
2010 "        handle_error(\"fmemopen\");\n"
2011
2012 #. type: Plain text
2013 #: build/C/man3/fmemopen.3:328
2014 #, no-wrap
2015 msgid ""
2016 "    out = open_memstream(&ptr, &size);\n"
2017 "    if (out == NULL)\n"
2018 "        handle_error(\"open_memstream\");\n"
2019 msgstr ""
2020 "    out = open_memstream(&ptr, &size);\n"
2021 "    if (out == NULL)\n"
2022 "        handle_error(\"open_memstream\");\n"
2023
2024 #. type: Plain text
2025 #: build/C/man3/fmemopen.3:333
2026 #, no-wrap
2027 msgid ""
2028 "    for (;;) {\n"
2029 "        s = fscanf(in, \"%d\", &v);\n"
2030 "        if (s E<lt>= 0)\n"
2031 "            break;\n"
2032 msgstr ""
2033 "    for (;;) {\n"
2034 "        s = fscanf(in, \"%d\", &v);\n"
2035 "        if (s E<lt>= 0)\n"
2036 "            break;\n"
2037
2038 #. type: Plain text
2039 #: build/C/man3/fmemopen.3:344
2040 #, no-wrap
2041 msgid ""
2042 "        s = fprintf(out, \"%d \", v * v);\n"
2043 "        if (s == -1)\n"
2044 "            handle_error(\"fprintf\");\n"
2045 "    }\n"
2046 "    fclose(in);\n"
2047 "    fclose(out);\n"
2048 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
2049 "    free(ptr);\n"
2050 "    exit(EXIT_SUCCESS);\n"
2051 "}\n"
2052 msgstr ""
2053 "        s = fprintf(out, \"%d \", v * v);\n"
2054 "        if (s == -1)\n"
2055 "            handle_error(\"fprintf\");\n"
2056 "    }\n"
2057 "    fclose(in);\n"
2058 "    fclose(out);\n"
2059 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
2060 "    free(ptr);\n"
2061 "    exit(EXIT_SUCCESS);\n"
2062 "}\n"
2063
2064 #. type: Plain text
2065 #: build/C/man3/fmemopen.3:348
2066 msgid "B<fopen>(3), B<fopencookie>(3)"
2067 msgstr "B<fopen>(3), B<fopencookie>(3)"
2068
2069 #. type: TH
2070 #: build/C/man3/fmtmsg.3:13
2071 #, no-wrap
2072 msgid "FMTMSG"
2073 msgstr "FMTMSG"
2074
2075 #. type: Plain text
2076 #: build/C/man3/fmtmsg.3:16
2077 msgid "fmtmsg - print formatted error messages"
2078 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
2079
2080 #. type: Plain text
2081 #: build/C/man3/fmtmsg.3:19
2082 #, no-wrap
2083 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
2084 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
2085
2086 #. type: Plain text
2087 #: build/C/man3/fmtmsg.3:21
2088 #, no-wrap
2089 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
2090 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
2091
2092 #. type: Plain text
2093 #: build/C/man3/fmtmsg.3:23
2094 #, no-wrap
2095 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
2096 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
2097
2098 #. type: Plain text
2099 #: build/C/man3/fmtmsg.3:25
2100 #, no-wrap
2101 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
2102 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
2103
2104 #. type: Plain text
2105 #: build/C/man3/fmtmsg.3:36
2106 msgid ""
2107 "This function displays a message described by its arguments on the "
2108 "device(s)  specified in the I<classification> argument.  For messages "
2109 "written to I<stderr>, the format depends on the B<MSGVERB> environment "
2110 "variable."
2111 msgstr ""
2112 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
2113 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
2114 "は、 B<MSGVERB> 環境変数に依存する。"
2115
2116 #. type: Plain text
2117 #: build/C/man3/fmtmsg.3:43
2118 msgid ""
2119 "The I<label> argument identifies the source of the message.  The string must "
2120 "consist of two colon separated parts where the first part has not more than "
2121 "10 and the second part not more than 14 characters."
2122 msgstr ""
2123 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
2124 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
2125 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
2126
2127 #. type: Plain text
2128 #: build/C/man3/fmtmsg.3:47
2129 msgid "The I<text> argument describes the condition of the error."
2130 msgstr "I<text> 引き数にはエラー条件を記述する。"
2131
2132 #. type: Plain text
2133 #: build/C/man3/fmtmsg.3:52
2134 msgid ""
2135 "The I<action> argument describes possible steps to recover from the error.  "
2136 "If it is printed, it is prefixed by \"TO FIX: \"."
2137 msgstr ""
2138 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
2139 "れが表示される場合、\"TO FIX: \" が前に付く。"
2140
2141 #. type: Plain text
2142 #: build/C/man3/fmtmsg.3:60
2143 msgid ""
2144 "The I<tag> argument is a reference to the online documentation where more "
2145 "information can be found.  It should contain the I<label> value and a unique "
2146 "identification number."
2147 msgstr ""
2148 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
2149 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
2150
2151 #. type: SS
2152 #: build/C/man3/fmtmsg.3:60
2153 #, no-wrap
2154 msgid "Dummy arguments"
2155 msgstr "ダミー引き数"
2156
2157 #. type: Plain text
2158 #: build/C/man3/fmtmsg.3:79
2159 msgid ""
2160 "Each of the arguments can have a dummy value.  The dummy classification "
2161 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
2162 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
2163 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
2164 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
2165 "synonym for B<NO_SEV>."
2166 msgstr ""
2167 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
2168 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
2169 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
2170 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は "
2171 "I<((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別"
2172 "名である。"
2173
2174 #. type: SS
2175 #: build/C/man3/fmtmsg.3:79
2176 #, no-wrap
2177 msgid "The classification argument"
2178 msgstr "classification 引き数"
2179
2180 #. type: Plain text
2181 #: build/C/man3/fmtmsg.3:83
2182 msgid ""
2183 "The I<classification> argument is the sum of values describing 4 types of "
2184 "information."
2185 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
2186
2187 #. type: Plain text
2188 #: build/C/man3/fmtmsg.3:86
2189 msgid "The first value defines the output channel."
2190 msgstr "最初の値は出力チャンネルを定義する。"
2191
2192 #. type: TP
2193 #: build/C/man3/fmtmsg.3:86
2194 #, no-wrap
2195 msgid "B<MM_PRINT>"
2196 msgstr "B<MM_PRINT>"
2197
2198 #. type: Plain text
2199 #: build/C/man3/fmtmsg.3:90
2200 msgid "Output to I<stderr>."
2201 msgstr "I<stderr> に出力する。"
2202
2203 #. type: TP
2204 #: build/C/man3/fmtmsg.3:90
2205 #, no-wrap
2206 msgid "B<MM_CONSOLE>"
2207 msgstr "B<MM_CONSOLE>"
2208
2209 #. type: Plain text
2210 #: build/C/man3/fmtmsg.3:93
2211 msgid "Output to the system console."
2212 msgstr "システムコンソールに出力する。"
2213
2214 #. type: TP
2215 #: build/C/man3/fmtmsg.3:93
2216 #, no-wrap
2217 msgid "B<MM_PRINT | MM_CONSOLE>"
2218 msgstr "B<MM_PRINT | MM_CONSOLE>"
2219
2220 #. type: Plain text
2221 #: build/C/man3/fmtmsg.3:96
2222 msgid "Output to both."
2223 msgstr "両方に出力する。"
2224
2225 #. type: Plain text
2226 #: build/C/man3/fmtmsg.3:98
2227 msgid "The second value is the source of the error:"
2228 msgstr "2 番目の値はエラーの発生源である:"
2229
2230 #. type: TP
2231 #: build/C/man3/fmtmsg.3:98
2232 #, no-wrap
2233 msgid "B<MM_HARD>"
2234 msgstr "B<MM_HARD>"
2235
2236 #. type: Plain text
2237 #: build/C/man3/fmtmsg.3:101
2238 msgid "A hardware error occurred."
2239 msgstr "ハードウェアエラーが起こった。"
2240
2241 #. type: TP
2242 #: build/C/man3/fmtmsg.3:101
2243 #, no-wrap
2244 msgid "B<MM_FIRM>"
2245 msgstr "B<MM_FIRM>"
2246
2247 #. type: Plain text
2248 #: build/C/man3/fmtmsg.3:104
2249 msgid "A firmware error occurred."
2250 msgstr "ファームウェアエラーが起こった。"
2251
2252 #. type: TP
2253 #: build/C/man3/fmtmsg.3:104
2254 #, no-wrap
2255 msgid "B<MM_SOFT>"
2256 msgstr "B<MM_SOFT>"
2257
2258 #. type: Plain text
2259 #: build/C/man3/fmtmsg.3:107
2260 msgid "A software error occurred."
2261 msgstr "ソフトウェアエラーが起こった。"
2262
2263 #. type: Plain text
2264 #: build/C/man3/fmtmsg.3:109
2265 msgid "The third value encodes the detector of the problem:"
2266 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2267
2268 #. type: TP
2269 #: build/C/man3/fmtmsg.3:109
2270 #, no-wrap
2271 msgid "B<MM_APPL>"
2272 msgstr "B<MM_APPL>"
2273
2274 #. type: Plain text
2275 #: build/C/man3/fmtmsg.3:112
2276 msgid "It is detected by an application."
2277 msgstr "アプリケーションによって検知された。"
2278
2279 #. type: TP
2280 #: build/C/man3/fmtmsg.3:112
2281 #, no-wrap
2282 msgid "B<MM_UTIL>"
2283 msgstr "B<MM_UTIL>"
2284
2285 #. type: Plain text
2286 #: build/C/man3/fmtmsg.3:115
2287 msgid "It is detected by a utility."
2288 msgstr "ユーティリティによって検知された。"
2289
2290 #. type: TP
2291 #: build/C/man3/fmtmsg.3:115
2292 #, no-wrap
2293 msgid "B<MM_OPSYS>"
2294 msgstr "B<MM_OPSYS>"
2295
2296 #. type: Plain text
2297 #: build/C/man3/fmtmsg.3:118
2298 msgid "It is detected by the operating system."
2299 msgstr "オペレーティングシステムによって検知された。"
2300
2301 #. type: Plain text
2302 #: build/C/man3/fmtmsg.3:120
2303 msgid "The fourth value shows the severity of the incident:"
2304 msgstr "4 番目の値は問題の重大度を表す:"
2305
2306 #. type: TP
2307 #: build/C/man3/fmtmsg.3:120
2308 #, no-wrap
2309 msgid "B<MM_RECOVER>"
2310 msgstr "B<MM_RECOVER>"
2311
2312 #. type: Plain text
2313 #: build/C/man3/fmtmsg.3:123
2314 msgid "It is a recoverable error."
2315 msgstr "回復可能なエラーである。"
2316
2317 #. type: TP
2318 #: build/C/man3/fmtmsg.3:123
2319 #, no-wrap
2320 msgid "B<MM_NRECOV>"
2321 msgstr "B<MM_NRECOV>"
2322
2323 #. type: Plain text
2324 #: build/C/man3/fmtmsg.3:126
2325 msgid "It is a nonrecoverable error."
2326 msgstr "回復不可能なエラーである。"
2327
2328 #. type: SS
2329 #: build/C/man3/fmtmsg.3:126
2330 #, no-wrap
2331 msgid "The severity argument"
2332 msgstr "severity 引き数"
2333
2334 #. type: Plain text
2335 #: build/C/man3/fmtmsg.3:130
2336 msgid "The I<severity> argument can take one of the following values:"
2337 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2338
2339 #. type: TP
2340 #: build/C/man3/fmtmsg.3:130
2341 #, no-wrap
2342 msgid "B<MM_NOSEV>"
2343 msgstr "B<MM_NOSEV>"
2344
2345 #. type: Plain text
2346 #: build/C/man3/fmtmsg.3:133
2347 msgid "No severity is printed."
2348 msgstr "重大度は表示されない。"
2349
2350 #. type: TP
2351 #: build/C/man3/fmtmsg.3:133
2352 #, no-wrap
2353 msgid "B<MM_HALT>"
2354 msgstr "B<MM_HALT>"
2355
2356 #. type: Plain text
2357 #: build/C/man3/fmtmsg.3:136
2358 msgid "This value is printed as HALT."
2359 msgstr "この値は HALT として表示される。"
2360
2361 #. type: TP
2362 #: build/C/man3/fmtmsg.3:136
2363 #, no-wrap
2364 msgid "B<MM_ERROR>"
2365 msgstr "B<MM_ERROR>"
2366
2367 #. type: Plain text
2368 #: build/C/man3/fmtmsg.3:139
2369 msgid "This value is printed as ERROR."
2370 msgstr "この値は ERROR として表示される。"
2371
2372 #. type: TP
2373 #: build/C/man3/fmtmsg.3:139
2374 #, no-wrap
2375 msgid "B<MM_WARNING>"
2376 msgstr "B<MM_WARNING>"
2377
2378 #. type: Plain text
2379 #: build/C/man3/fmtmsg.3:142
2380 msgid "This value is printed as WARNING."
2381 msgstr "この値は WARNING として表示される。"
2382
2383 #. type: TP
2384 #: build/C/man3/fmtmsg.3:142
2385 #, no-wrap
2386 msgid "B<MM_INFO>"
2387 msgstr "B<MM_INFO>"
2388
2389 #. type: Plain text
2390 #: build/C/man3/fmtmsg.3:145
2391 msgid "This value is printed as INFO."
2392 msgstr "この値は INFO として表示される。"
2393
2394 #. type: Plain text
2395 #: build/C/man3/fmtmsg.3:152
2396 msgid ""
2397 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2398 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2399 "print."
2400 msgstr ""
2401 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2402 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2403
2404 #. type: Plain text
2405 #: build/C/man3/fmtmsg.3:154
2406 msgid "The function can return 4 values:"
2407 msgstr "関数は 4 つの値を返す:"
2408
2409 #. type: TP
2410 #: build/C/man3/fmtmsg.3:154
2411 #, no-wrap
2412 msgid "B<MM_OK>"
2413 msgstr "B<MM_OK>"
2414
2415 #. type: Plain text
2416 #: build/C/man3/fmtmsg.3:157
2417 msgid "Everything went smooth."
2418 msgstr "全てがうまくいった。"
2419
2420 #. type: TP
2421 #: build/C/man3/fmtmsg.3:157
2422 #, no-wrap
2423 msgid "B<MM_NOTOK>"
2424 msgstr "B<MM_NOTOK>"
2425
2426 #. type: Plain text
2427 #: build/C/man3/fmtmsg.3:160
2428 msgid "Complete failure."
2429 msgstr "完全に失敗した。"
2430
2431 #. type: TP
2432 #: build/C/man3/fmtmsg.3:160
2433 #, no-wrap
2434 msgid "B<MM_NOMSG>"
2435 msgstr "B<MM_NOMSG>"
2436
2437 #. type: Plain text
2438 #: build/C/man3/fmtmsg.3:164
2439 msgid "Error writing to I<stderr>."
2440 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2441
2442 #. type: TP
2443 #: build/C/man3/fmtmsg.3:164
2444 #, no-wrap
2445 msgid "B<MM_NOCON>"
2446 msgstr "B<MM_NOCON>"
2447
2448 #. type: Plain text
2449 #: build/C/man3/fmtmsg.3:167
2450 msgid "Error writing to the console."
2451 msgstr "コンソールに書き込むときにエラーが起こった。"
2452
2453 #. type: SH
2454 #: build/C/man3/fmtmsg.3:167
2455 #, no-wrap
2456 msgid "ENVIRONMENT"
2457 msgstr "環境変数"
2458
2459 #. type: Plain text
2460 #: build/C/man3/fmtmsg.3:178
2461 msgid ""
2462 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2463 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2464 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2465 "separated list of valid keywords, then only the parts of the message "
2466 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2467 "\"severity\", \"text\", \"action\" and \"tag\"."
2468 msgstr ""
2469 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2470 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2471 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2472 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2473 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2474
2475 #. type: Plain text
2476 #: build/C/man3/fmtmsg.3:190
2477 msgid ""
2478 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2479 "levels.  By default, only the five severity levels described above are "
2480 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2481 "If the user puts B<SEV_LEVEL> with a format like"
2482 msgstr ""
2483 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2484 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2485 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザー"
2486 "が B<SEV_LEVEL> を"
2487
2488 #. type: Plain text
2489 #: build/C/man3/fmtmsg.3:193
2490 msgid "SEV_LEVEL=[description[:description[:...]]]"
2491 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2492
2493 #. type: Plain text
2494 #: build/C/man3/fmtmsg.3:198
2495 msgid ""
2496 "in the environment of the process before the first call to B<fmtmsg>(), "
2497 "where each description is of the form"
2498 msgstr ""
2499 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2500 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2501 "指定された printstring を表示する。 各 description は"
2502
2503 #. type: Plain text
2504 #: build/C/man3/fmtmsg.3:201
2505 msgid "severity-keyword,level,printstring"
2506 msgstr "severity-keyword,level,printstring"
2507
2508 #. type: Plain text
2509 #: build/C/man3/fmtmsg.3:208
2510 msgid ""
2511 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2512 "addition to the standard levels 0-4), and use the indicated printstring when "
2513 "such a level occurs."
2514 msgstr "という形式である。"
2515
2516 #. type: Plain text
2517 #: build/C/man3/fmtmsg.3:222
2518 msgid ""
2519 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2520 "present.  The level part is a string representation of a number.  The "
2521 "numeric value must be a number greater than 4.  This value must be used in "
2522 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2523 "possible to overwrite any of the predefined classes.  The printstring is the "
2524 "string printed when a message of this class is processed by B<fmtmsg>()."
2525 msgstr ""
2526 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2527 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2528 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2529 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2530 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2531 "た場合に表示される文字列である。"
2532
2533 #. type: Plain text
2534 #: build/C/man3/fmtmsg.3:225
2535 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2536 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2537
2538 #. type: Plain text
2539 #: build/C/man3/fmtmsg.3:231
2540 msgid ""
2541 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2542 "not protected, so it is not thread-safe."
2543 msgstr ""
2544 "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的"
2545 "な変数を使うため、 スレッドセーフではない。"
2546
2547 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2548 #. type: Plain text
2549 #: build/C/man3/fmtmsg.3:237
2550 msgid ""
2551 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2552 "static variable, so it is thread-safe."
2553 msgstr ""
2554 "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護してお"
2555 "り、 スレッドセーフである。"
2556
2557 #. type: Plain text
2558 #: build/C/man3/fmtmsg.3:252
2559 msgid ""
2560 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2561 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2562 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2563 msgstr ""
2564 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2565 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2566 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2567
2568 #. type: Plain text
2569 #: build/C/man3/fmtmsg.3:256
2570 msgid ""
2571 "System V and UnixWare man pages tell us that these functions have been "
2572 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2573 "vlfmt()\", and will be removed later."
2574 msgstr ""
2575 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と "
2576 "addsev()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられてお"
2577 "り、 将来は削除される予定である」と書かれている。"
2578
2579 #. type: Plain text
2580 #: build/C/man3/fmtmsg.3:261
2581 #, no-wrap
2582 msgid ""
2583 "#include E<lt>stdio.hE<gt>\n"
2584 "#include E<lt>stdlib.hE<gt>\n"
2585 "#include E<lt>fmtmsg.hE<gt>\n"
2586 msgstr ""
2587 "#include E<lt>stdio.hE<gt>\n"
2588 "#include E<lt>stdlib.hE<gt>\n"
2589 "#include E<lt>fmtmsg.hE<gt>\n"
2590
2591 #. type: Plain text
2592 #: build/C/man3/fmtmsg.3:267
2593 #, no-wrap
2594 msgid ""
2595 "int\n"
2596 "main(void)\n"
2597 "{\n"
2598 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2599 "    int err;\n"
2600 msgstr ""
2601 "int\n"
2602 "main(void)\n"
2603 "{\n"
2604 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2605 "    int err;\n"
2606
2607 #. type: Plain text
2608 #: build/C/man3/fmtmsg.3:288
2609 #, no-wrap
2610 msgid ""
2611 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2612 "                \"unknown mount option\", \"See mount(8).\",\n"
2613 "                \"util-linux:mount:017\");\n"
2614 "    switch (err) {\n"
2615 "    case MM_OK:\n"
2616 "        break;\n"
2617 "    case MM_NOTOK:\n"
2618 "        printf(\"Nothing printed\\en\");\n"
2619 "        break;\n"
2620 "    case MM_NOMSG:\n"
2621 "        printf(\"Nothing printed to stderr\\en\");\n"
2622 "        break;\n"
2623 "    case MM_NOCON:\n"
2624 "        printf(\"No console output\\en\");\n"
2625 "        break;\n"
2626 "    default:\n"
2627 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2628 "    }\n"
2629 "    exit(EXIT_SUCCESS);\n"
2630 "}\n"
2631 msgstr ""
2632 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2633 "                \"unknown mount option\", \"See mount(8).\",\n"
2634 "                \"util-linux:mount:017\");\n"
2635 "    switch (err) {\n"
2636 "    case MM_OK:\n"
2637 "      break;\n"
2638 "    case MM_NOTOK:\n"
2639 "        printf(\"Nothing printed\\en\");\n"
2640 "        break;\n"
2641 "    case MM_NOMSG:\n"
2642 "        printf(\"Nothing printed to stderr\\en\");\n"
2643 "        break;\n"
2644 "    case MM_NOCON:\n"
2645 "        printf(\"No console output\\en\");\n"
2646 "        break;\n"
2647 "    default:\n"
2648 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2649 "    }\n"
2650 "    exit(EXIT_SUCCESS);\n"
2651 "}\n"
2652
2653 #. type: Plain text
2654 #: build/C/man3/fmtmsg.3:291
2655 msgid "The output should be:"
2656 msgstr "出力は"
2657
2658 #. type: Plain text
2659 #: build/C/man3/fmtmsg.3:295
2660 #, no-wrap
2661 msgid ""
2662 "    util-linux:mount: ERROR: unknown mount option\n"
2663 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2664 msgstr ""
2665 "    util-linux:mount: ERROR: unknown mount option\n"
2666 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2667
2668 #. type: Plain text
2669 #: build/C/man3/fmtmsg.3:298
2670 msgid "and after"
2671 msgstr "のようになり、"
2672
2673 #. type: Plain text
2674 #: build/C/man3/fmtmsg.3:301
2675 #, no-wrap
2676 msgid "    MSGVERB=text:action; export MSGVERB\n"
2677 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2678
2679 #. type: Plain text
2680 #: build/C/man3/fmtmsg.3:304
2681 msgid "the output becomes:"
2682 msgstr "を実行すると、次のようになる。"
2683
2684 #. type: Plain text
2685 #: build/C/man3/fmtmsg.3:308
2686 #, no-wrap
2687 msgid ""
2688 "    unknown mount option\n"
2689 "    TO FIX: See mount(8).\n"
2690 msgstr ""
2691 "    unknown mount option\n"
2692 "    TO FIX: See mount(8).\n"
2693
2694 #. type: Plain text
2695 #: build/C/man3/fmtmsg.3:312
2696 msgid "B<addseverity>(3), B<perror>(3)"
2697 msgstr "B<addseverity>(3), B<perror>(3)"
2698
2699 #. type: TH
2700 #: build/C/man3/fopen.3:44
2701 #, no-wrap
2702 msgid "FOPEN"
2703 msgstr "FOPEN"
2704
2705 #. type: TH
2706 #: build/C/man3/fopen.3:44
2707 #, no-wrap
2708 msgid "2012-04-22"
2709 msgstr "2012-04-22"
2710
2711 #. type: Plain text
2712 #: build/C/man3/fopen.3:47
2713 msgid "fopen, fdopen, freopen - stream open functions"
2714 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2715
2716 #. type: Plain text
2717 #: build/C/man3/fopen.3:52
2718 #, no-wrap
2719 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2720 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2721
2722 #. type: Plain text
2723 #: build/C/man3/fopen.3:54
2724 #, no-wrap
2725 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2726 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2727
2728 #. type: Plain text
2729 #: build/C/man3/fopen.3:56
2730 #, no-wrap
2731 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2732 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2733
2734 #. type: Plain text
2735 #: build/C/man3/fopen.3:65
2736 msgid ""
2737 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2738 msgstr ""
2739 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2740
2741 #. type: Plain text
2742 #: build/C/man3/fopen.3:71
2743 msgid ""
2744 "The B<fopen>()  function opens the file whose name is the string pointed to "
2745 "by I<path> and associates a stream with it."
2746 msgstr ""
2747 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2748 "びつける。"
2749
2750 #. type: Plain text
2751 #: build/C/man3/fopen.3:76
2752 msgid ""
2753 "The argument I<mode> points to a string beginning with one of the following "
2754 "sequences (possibly followed by additional characters, as described below):"
2755 msgstr ""
2756 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインターであ\n"
2757 "る (以下の述べる、追加の文字が後に続くこともある):"
2758
2759 #. type: TP
2760 #: build/C/man3/fopen.3:76
2761 #, no-wrap
2762 msgid "B<r>"
2763 msgstr "B<r>"
2764
2765 #. type: Plain text
2766 #: build/C/man3/fopen.3:80
2767 msgid ""
2768 "Open text file for reading.  The stream is positioned at the beginning of "
2769 "the file."
2770 msgstr ""
2771 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2772 "る。"
2773
2774 #. type: TP
2775 #: build/C/man3/fopen.3:80
2776 #, no-wrap
2777 msgid "B<r+>"
2778 msgstr "B<r+>"
2779
2780 #. type: Plain text
2781 #: build/C/man3/fopen.3:84
2782 msgid ""
2783 "Open for reading and writing.  The stream is positioned at the beginning of "
2784 "the file."
2785 msgstr ""
2786 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2787 "る。"
2788
2789 #. type: TP
2790 #: build/C/man3/fopen.3:84
2791 #, no-wrap
2792 msgid "B<w>"
2793 msgstr "B<w>"
2794
2795 #. type: Plain text
2796 #: build/C/man3/fopen.3:88
2797 msgid ""
2798 "Truncate file to zero length or create text file for writing.  The stream is "
2799 "positioned at the beginning of the file."
2800 msgstr ""
2801 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2802 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2803 "頭に位置される。"
2804
2805 #. type: TP
2806 #: build/C/man3/fopen.3:88
2807 #, no-wrap
2808 msgid "B<w+>"
2809 msgstr "B<w+>"
2810
2811 #. type: Plain text
2812 #: build/C/man3/fopen.3:94
2813 msgid ""
2814 "Open for reading and writing.  The file is created if it does not exist, "
2815 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2816 "file."
2817 msgstr ""
2818 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2819 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2820 "の先頭に位置される。"
2821
2822 #. type: TP
2823 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2824 #, no-wrap
2825 msgid "B<a>"
2826 msgstr "B<a>"
2827
2828 #. type: Plain text
2829 #: build/C/man3/fopen.3:99
2830 msgid ""
2831 "Open for appending (writing at end of file).  The file is created if it does "
2832 "not exist.  The stream is positioned at the end of the file."
2833 msgstr ""
2834 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2835 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2836
2837 #. type: TP
2838 #: build/C/man3/fopen.3:99
2839 #, no-wrap
2840 msgid "B<a+>"
2841 msgstr "B<a+>"
2842
2843 #. type: Plain text
2844 #: build/C/man3/fopen.3:105
2845 msgid ""
2846 "Open for reading and appending (writing at end of file).  The file is "
2847 "created if it does not exist.  The initial file position for reading is at "
2848 "the beginning of the file, but output is always appended to the end of the "
2849 "file."
2850 msgstr ""
2851 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2852 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2853 "あるが、 書き込みは常にファイルの最後に追加される。"
2854
2855 #. type: Plain text
2856 #: build/C/man3/fopen.3:118
2857 msgid ""
2858 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2859 "character or as a character between the characters in any of the two-"
2860 "character strings described above.  This is strictly for compatibility with "
2861 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2862 "systems, including Linux.  (Other systems may treat text files and binary "
2863 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2864 "O to a binary file and expect that your program may be ported to non-UNIX "
2865 "environments.)"
2866 msgstr ""
2867 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2868 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2869 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2870 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2871 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2872 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2873 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2874 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2875
2876 #. type: Plain text
2877 #: build/C/man3/fopen.3:121
2878 msgid "See NOTES below for details of glibc extensions for I<mode>."
2879 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2880
2881 #. type: Plain text
2882 #: build/C/man3/fopen.3:126
2883 msgid ""
2884 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2885 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2886 "umask value (see B<umask>(2))."
2887 msgstr ""
2888 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2889 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2890 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2891
2892 #. type: Plain text
2893 #: build/C/man3/fopen.3:141
2894 msgid ""
2895 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2896 "that ANSI C requires that a file positioning function intervene between "
2897 "output and input, unless an input operation encounters end-of-file.  (If "
2898 "this condition is not met, then a read is allowed to return the result of "
2899 "writes other than the most recent.)  Therefore it is good practice (and "
2900 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or "
2901 "B<fgetpos>(3)  operation between write and read operations on such a "
2902 "stream.  This operation may be an apparent no-op (as in I<fseek(..., 0L, "
2903 "SEEK_CUR)> called for its synchronizing side effect)."
2904 msgstr ""
2905 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2906 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2907 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2908 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2909 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2910 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2911 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2912 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2913 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2914 "い)。"
2915
2916 #. type: Plain text
2917 #: build/C/man3/fopen.3:146
2918 msgid ""
2919 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2920 "causes all subsequent write operations to this stream to occur at end-of-"
2921 "file, as if preceded the call:"
2922 msgstr ""
2923 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2924 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2925 "かのように) ファイルの末尾で行われる。"
2926
2927 #. type: Plain text
2928 #: build/C/man3/fopen.3:149
2929 #, no-wrap
2930 msgid "    fseek(stream, 0, SEEK_END);\n"
2931 msgstr "    fseek(stream, 0, SEEK_END);\n"
2932
2933 #. type: Plain text
2934 #: build/C/man3/fopen.3:171
2935 msgid ""
2936 "The B<fdopen>()  function associates a stream with the existing file "
2937 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2938 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2939 "file descriptor.  The file position indicator of the new stream is set to "
2940 "that belonging to I<fd>, and the error and end-of-file indicators are "
2941 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2942 "file descriptor is not dup'ed, and will be closed when the stream created by "
2943 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2944 "memory object is undefined."
2945 msgstr ""
2946 "B<fdopen>()  関数は、既存のファイルディスクリプター I<fd> にストリームを結び"
2947 "つける。 ストリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" の"
2948 "いずれか) は ファイルディスクリプターのモードと互換のものでなければならな"
2949 "い。 新しいストリームのファイル位置指示子は I<fd> に属している値に設定され"
2950 "る。 error と end-of-file の各指示子はクリアされる。 \"w\" および \"w+\" モー"
2951 "ドでのファイルの切り詰めは行われない。 ファイルディスクリプターの複製は行なわ"
2952 "れない。 B<fdopen>()  で作成されたストリームが閉じられたときにファイルディス"
2953 "クリプターも 閉じられる。 共有メモリーのオブジェクトへ B<fdopen>()  を行った"
2954 "ときの結果は定義されていない。"
2955
2956 #. type: Plain text
2957 #: build/C/man3/fopen.3:189
2958 msgid ""
2959 "The B<freopen>()  function opens the file whose name is the string pointed "
2960 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2961 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2962 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2963 "function is to change the file associated with a standard text stream "
2964 "(I<stderr>, I<stdin>, or I<stdout>)."
2965 msgstr ""
2966 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2967 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2968 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2969 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2970 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2971
2972 #. type: Plain text
2973 #: build/C/man3/fopen.3:201
2974 msgid ""
2975 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2976 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2977 "indicate the error."
2978 msgstr ""
2979 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインターを"
2980 "返す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2981
2982 #. type: TP
2983 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2984 #: build/C/man3/getline.3:128 build/C/man2/link.2:282 build/C/man2/llseek.2:77
2985 #: build/C/man2/lseek.2:192 build/C/man2/open.2:825 build/C/man2/open.2:833
2986 #: build/C/man2/open.2:838 build/C/man2/open_by_handle_at.2:273
2987 #: build/C/man2/open_by_handle_at.2:277 build/C/man2/open_by_handle_at.2:325
2988 #: build/C/man2/pipe.2:143 build/C/man2/read.2:126 build/C/man2/read.2:137
2989 #: build/C/man2/readlink.2:169 build/C/man2/readlink.2:178
2990 #: build/C/man2/readv.2:200 build/C/man2/readv.2:207 build/C/man2/rename.2:251
2991 #: build/C/man2/rename.2:376 build/C/man2/rename.2:385 build/C/man2/rmdir.2:67
2992 #: build/C/man3/scanf.3:565 build/C/man2/unlink.2:252 build/C/man2/write.2:154
2993 #, no-wrap
2994 msgid "B<EINVAL>"
2995 msgstr "B<EINVAL>"
2996
2997 #. type: Plain text
2998 #: build/C/man3/fopen.3:212
2999 msgid ""
3000 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
3001 "invalid."
3002 msgstr ""
3003 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
3004
3005 #. type: Plain text
3006 #: build/C/man3/fopen.3:222
3007 msgid ""
3008 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
3009 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
3010 msgstr ""
3011 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
3012 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
3013 "する。"
3014
3015 #. type: Plain text
3016 #: build/C/man3/fopen.3:229
3017 msgid ""
3018 "The B<fopen>()  function may also fail and set I<errno> for any of the "
3019 "errors specified for the routine B<open>(2)."
3020 msgstr ""
3021 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
3022 "があり、 その時は対応する値に I<errno> をセットする。"
3023
3024 #. type: Plain text
3025 #: build/C/man3/fopen.3:236
3026 msgid ""
3027 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
3028 "errors specified for the routine B<fcntl>(2)."
3029 msgstr ""
3030 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
3031 "とがあり、 その時は対応する値に I<errno> をセットする。"
3032
3033 #. type: Plain text
3034 #: build/C/man3/fopen.3:246
3035 msgid ""
3036 "The B<freopen>()  function may also fail and set I<errno> for any of the "
3037 "errors specified for the routines B<open>(2), B<fclose>(3), and B<fflush>(3)."
3038 msgstr ""
3039 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
3040 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
3041 "トする。"
3042
3043 #. type: Plain text
3044 #: build/C/man3/fopen.3:255
3045 msgid ""
3046 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The "
3047 "B<fdopen>()  function conforms to POSIX.1-1990."
3048 msgstr ""
3049 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
3050 "は POSIX.1-1990 に準拠している。"
3051
3052 #. type: SS
3053 #: build/C/man3/fopen.3:256 build/C/man2/link.2:385
3054 #: build/C/man2/readlink.2:256 build/C/man2/rename.2:415
3055 #: build/C/man2/symlink.2:247 build/C/man2/unlink.2:282
3056 #, no-wrap
3057 msgid "Glibc notes"
3058 msgstr "glibc での注意"
3059
3060 #. type: Plain text
3061 #: build/C/man3/fopen.3:259
3062 msgid ""
3063 "The GNU C library allows the following extensions for the string specified "
3064 "in I<mode>:"
3065 msgstr ""
3066 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
3067 "いる:"
3068
3069 #. type: TP
3070 #: build/C/man3/fopen.3:259
3071 #, no-wrap
3072 msgid "B<c> (since glibc 2.3.3)"
3073 msgstr "B<c> (glibc 2.3.3 以降)"
3074
3075 #. type: Plain text
3076 #: build/C/man3/fopen.3:266
3077 msgid ""
3078 "Do not make the open operation, or subsequent read and write operations, "
3079 "thread cancellation points.  This flag is ignored for B<fdopen>()."
3080 msgstr ""
3081 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
3082 "(cancellation points) を作成しない。\n"
3083 "このフラグは B<fdopen>() では無視される。"
3084
3085 #. type: TP
3086 #: build/C/man3/fopen.3:266
3087 #, no-wrap
3088 msgid "B<e> (since glibc 2.7)"
3089 msgstr "B<e> (glibc 2.7 以降)"
3090
3091 #. type: Plain text
3092 #: build/C/man3/fopen.3:276
3093 msgid ""
3094 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
3095 "information.  This flag is ignored for B<fdopen>()."
3096 msgstr ""
3097 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
3098 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
3099
3100 #. type: TP
3101 #: build/C/man3/fopen.3:276
3102 #, no-wrap
3103 msgid "B<m> (since glibc 2.3)"
3104 msgstr "B<m> (glibc 2.3 以降)"
3105
3106 #.  As at glibc 2.4:
3107 #. type: Plain text
3108 #: build/C/man3/fopen.3:288
3109 msgid ""
3110 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
3111 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
3112 "for a file opened for reading."
3113 msgstr ""
3114 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
3115 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
3116 "オープンするファイルについてだけである。"
3117
3118 #. type: TP
3119 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
3120 #, no-wrap
3121 msgid "B<x>"
3122 msgstr "B<x>"
3123
3124 #.  Since glibc 2.0?
3125 #.  FIXME . C11 specifies this flag
3126 #. type: Plain text
3127 #: build/C/man3/fopen.3:305
3128 msgid ""
3129 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
3130 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
3131 "This flag is ignored for B<fdopen>()."
3132 msgstr ""
3133 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
3134 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
3135 "セットされる。 このフラグは B<fdopen>()  では無視される。"
3136
3137 #. type: Plain text
3138 #: build/C/man3/fopen.3:313
3139 msgid ""
3140 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
3141 "the following syntax in I<mode>:"
3142 msgstr ""
3143 "上記の文字に加えて、\n"
3144 "B<fopen>() と B<freopen>() では I<mode> に\n"
3145 "以下の書式を 指定することができる。"
3146
3147 #. type: Plain text
3148 #: build/C/man3/fopen.3:315
3149 msgid "B< ,ccs=>I<string>"
3150 msgstr "B< ,ccs=>I<string>"
3151
3152 #. type: Plain text
3153 #: build/C/man3/fopen.3:331
3154 msgid ""
3155 "The given I<string> is taken as the name of a coded character set and the "
3156 "stream is marked as wide-oriented.  Thereafter, internal conversion "
3157 "functions convert I/O to and from the character set I<string>.  If the B<,"
3158 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
3159 "stream is determined by the first file operation.  If that operation is a "
3160 "wide-character operation, the stream is marked wide-oriented, and functions "
3161 "to convert to the coded character set are loaded."
3162 msgstr ""
3163 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
3164 "ストリームではワイド文字のストリームとして扱われる。\n"
3165 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
3166 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
3167 "ストリームをワイド文字のストリームとして扱うかは\n"
3168 "最初のファイル操作時に決定される。\n"
3169 "最初のファイル操作がワイド文字操作であった場合は、\n"
3170 "そのストリームはワイド文字のストリームとして扱われ、\n"
3171 "符号化文字集合との変換を行う関数が読み込まれる。"
3172
3173 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12685
3174 #. type: Plain text
3175 #: build/C/man3/fopen.3:348
3176 msgid ""
3177 "When parsing for individual flag characters in I<mode> (i.e., the characters "
3178 "preceding the \"ccs\" specification), the glibc implementation of "
3179 "B<fopen>()  and B<freopen>()  limits the number of characters examined in "
3180 "I<mode> to 7 (or, in glibc versions before 2.14, to 6, which was not enough "
3181 "to include possible specifications such as \"rb+cmxe\").  The current "
3182 "implementation of B<fdopen>()  parses at most 5 characters in I<mode>."
3183 msgstr ""
3184 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
3185 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
3186 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
3187 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
3188 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
3189 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
3190
3191 #. type: Plain text
3192 #: build/C/man3/fopen.3:354
3193 msgid ""
3194 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
3195 msgstr ""
3196 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
3197
3198 #. type: TH
3199 #: build/C/man3/fopencookie.3:26
3200 #, no-wrap
3201 msgid "FOPENCOOKIE"
3202 msgstr "FOPENCOOKIE"
3203
3204 #. type: TH
3205 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:32
3206 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
3207 #: build/C/man2/open.2:51 build/C/man2/open_by_handle_at.2:25
3208 #: build/C/man2/pipe.2:36 build/C/man2/read.2:35 build/C/man2/readlink.2:44
3209 #: build/C/man2/readv.2:32 build/C/man2/rename.2:33 build/C/man2/rmdir.2:30
3210 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man2/symlink.2:33
3211 #: build/C/man7/symlink.7:37 build/C/man2/unlink.2:33 build/C/man2/write.2:39
3212 #, no-wrap
3213 msgid "Linux"
3214 msgstr "Linux"
3215
3216 #. type: Plain text
3217 #: build/C/man3/fopencookie.3:29
3218 msgid "fopencookie - opening a custom stream"
3219 msgstr "fopencookie - 独自のストリームをオープンする"
3220
3221 #. type: Plain text
3222 #: build/C/man3/fopencookie.3:36
3223 #, no-wrap
3224 msgid ""
3225 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3226 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3227 msgstr ""
3228 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3229 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3230
3231 #. type: Plain text
3232 #: build/C/man3/fopencookie.3:49
3233 msgid ""
3234 "The B<fopencookie>()  function allows the programmer to create a custom "
3235 "implementation for a standard I/O stream.  This implementation can store the "
3236 "stream's data at a location of its own choosing; for example, "
3237 "B<fopencookie>()  is used to implement B<fmemopen>(3), which provides a "
3238 "stream interface to data that is stored in a buffer in memory."
3239 msgstr ""
3240 "B<fopencookie>() を使うと、 プログラマーは標準 I/O ストリームの独自の実装を作"
3241 "成することができる。\n"
3242 "この実装はストリームのデータを自分が選んだ場所に格納することができる。 例え"
3243 "ば、 B<fopencookie>() は B<fmemopen>(3) を実装するのに使用されている。 "
3244 "B<fmemopen>(3) はメモリー上のバッファーに格納されたデータに対するストリームイ"
3245 "ンターフェースを提供している。"
3246
3247 #. type: Plain text
3248 #: build/C/man3/fopencookie.3:51
3249 msgid "In order to create a custom stream the programmer must:"
3250 msgstr ""
3251 "独自のストリームを作成するためには、 プログラマーは以下を行う必要がある。"
3252
3253 #. type: IP
3254 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3255 #: build/C/man3/fopencookie.3:65 build/C/man2/lseek.2:168
3256 #: build/C/man2/lseek.2:170 build/C/man2/lseek.2:173 build/C/man2/lseek.2:175
3257 #: build/C/man2/lseek.2:177 build/C/man2/open.2:527 build/C/man2/open.2:535
3258 #: build/C/man2/open.2:541 build/C/man2/open.2:547 build/C/man2/open.2:553
3259 #: build/C/man2/open.2:566 build/C/man2/open.2:688 build/C/man2/open.2:696
3260 #: build/C/man2/open_by_handle_at.2:138 build/C/man2/open_by_handle_at.2:146
3261 #: build/C/man2/open_by_handle_at.2:157 build/C/man2/open_by_handle_at.2:170
3262 #: build/C/man2/pipe.2:95 build/C/man2/pipe.2:105 build/C/man2/pipe.2:115
3263 #: build/C/man3/scanf.3:658 build/C/man3/scanf.3:663
3264 #: build/C/man7/symlink.7:290 build/C/man7/symlink.7:300
3265 #: build/C/man7/symlink.7:330 build/C/man7/symlink.7:390
3266 #: build/C/man7/symlink.7:419 build/C/man7/symlink.7:448
3267 #: build/C/man7/symlink.7:479 build/C/man7/symlink.7:492
3268 #, no-wrap
3269 msgid "*"
3270 msgstr "*"
3271
3272 #. type: Plain text
3273 #: build/C/man3/fopencookie.3:54
3274 msgid ""
3275 "Implement four \"hook\" functions that are used internally by the standard I/"
3276 "O library when performing I/O on the stream."
3277 msgstr ""
3278 "ストリームに対する I/O を実行する際に標準 I/O ライブラリが内部で使用する 4 つ"
3279 "の \"フック\" 関数を実装する。"
3280
3281 #. type: Plain text
3282 #: build/C/man3/fopencookie.3:65
3283 msgid ""
3284 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3285 "information (e.g., where to store data) used by the aforementioned hook "
3286 "functions.  The standard I/O package knows nothing about the contents of "
3287 "this cookie (thus it is typed as I<void\\ *> when passed to "
3288 "B<fopencookie>()), but automatically supplies the cookie as the first "
3289 "argument when calling the hook functions."
3290 msgstr ""
3291 "\"cookie\" データ型を定義する。 \"cookie\" データ型は、上記のフック関数が使用"
3292 "する管理情報 (例えば、データを格納する場所など) を提供する構造体である。 標準"
3293 "の I/O パッケージにはこの cookie の内容に関する情報を持たないが (したがって "
3294 "B<fopencookie>() に渡される際の型は I<void\\ *> である)、 フック関数が呼び出"
3295 "される際に第一引き数として cookie が渡される。"
3296
3297 #. type: Plain text
3298 #: build/C/man3/fopencookie.3:70
3299 msgid ""
3300 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3301 "hook functions with that stream."
3302 msgstr ""
3303 "B<fopencookie>() を呼び出して、新しいストリームをオープンし、 そのストリーム"
3304 "に cookie とフック関数を関連付ける。"
3305
3306 #. type: Plain text
3307 #: build/C/man3/fopencookie.3:78
3308 msgid ""
3309 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3310 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3311 "operate on that stream."
3312 msgstr ""
3313 "B<fopencookie>() 関数は B<fopen>(3) と同様の機能を持つ。 新しいストリームを"
3314 "オープンし、 そのストリームに対して操作を行うのに使用する I<FILE> オブジェク"
3315 "トへのポインターを返す。"
3316
3317 #. type: Plain text
3318 #: build/C/man3/fopencookie.3:85
3319 msgid ""
3320 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3321 "to be associated with the new stream.  This pointer is supplied as the first "
3322 "argument when the standard I/O library invokes any of the hook functions "
3323 "described below."
3324 msgstr ""
3325 "I<cookie> 引き数は、 新しいストリームに関連付けられる呼び出し元の cookie 構造"
3326 "体へのポインターである。 このポインターは、 標準 I/O ライブラリが以下で説明す"
3327 "るフック関数のいずれかを呼び出す際に第 1 引き数として渡される。"
3328
3329 #. type: Plain text
3330 #: build/C/man3/fopencookie.3:101
3331 msgid ""
3332 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3333 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3334 "See B<fopen>(3)  for details."
3335 msgstr ""
3336 "I<mode> 引き数は B<fopen>(3) と同じ意味を持つ。 指定できるモードは I<r>, "
3337 "I<w>, I<a>, I<r+>, I<w+>, I<a+> である。 詳細は B<fopen>(3) を参照。"
3338
3339 #. type: Plain text
3340 #: build/C/man3/fopencookie.3:107
3341 msgid ""
3342 "The I<io_funcs> argument is a structure that contains four fields pointing "
3343 "to the programmer-defined hook functions that are used to implement this "
3344 "stream.  The structure is defined as follows"
3345 msgstr ""
3346 "I<io_funcs> 引き数は、 このストリームを実装するのに使用されるプログラマーが定"
3347 "義した関数を指す 4 つのフィールドを持つ構造体である。 この構造体は以下のよう"
3348 "に定義されている。"
3349
3350 #. type: Plain text
3351 #: build/C/man3/fopencookie.3:116
3352 #, no-wrap
3353 msgid ""
3354 "typedef struct {\n"
3355 "    cookie_read_function_t  *read;\n"
3356 "    cookie_write_function_t *write;\n"
3357 "    cookie_seek_function_t  *seek;\n"
3358 "    cookie_close_function_t *close;\n"
3359 "} cookie_io_functions_t;\n"
3360 msgstr ""
3361 "typedef struct {\n"
3362 "    cookie_read_function_t  *read;\n"
3363 "    cookie_write_function_t *write;\n"
3364 "    cookie_seek_function_t  *seek;\n"
3365 "    cookie_close_function_t *close;\n"
3366 "} cookie_io_functions_t;\n"
3367
3368 #. type: Plain text
3369 #: build/C/man3/fopencookie.3:120
3370 msgid "The four fields are as follows:"
3371 msgstr "4 つのフィールドの詳細は以下のとおりである。"
3372
3373 #. type: TP
3374 #: build/C/man3/fopencookie.3:120
3375 #, no-wrap
3376 msgid "I<cookie_read_function_t *read>"
3377 msgstr "I<cookie_read_function_t *read>"
3378
3379 #. type: Plain text
3380 #: build/C/man3/fopencookie.3:124
3381 msgid ""
3382 "This function implements read operations for the stream.  When called, it "
3383 "receives three arguments:"
3384 msgstr ""
3385 "この関数はストリームに対する read 操作を実装する。 呼び出される際、 3 つの引"
3386 "き数を受け取る。"
3387
3388 #. type: Plain text
3389 #: build/C/man3/fopencookie.3:126
3390 #, no-wrap
3391 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3392 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3393
3394 #. type: Plain text
3395 #: build/C/man3/fopencookie.3:141
3396 msgid ""
3397 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3398 "input data can be placed and the size of that buffer.  As its function "
3399 "result, the I<read> function should return the number of bytes copied into "
3400 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3401 "update the stream offset appropriately."
3402 msgstr ""
3403 "引き数 I<buf> と I<size> は、 それぞれ、 入力データを配置できるバッファーとそ"
3404 "のバッファーのサイズである。 関数の結果として、 I<read> 関数は I<buf> にコ"
3405 "ピーされたバイト数を、 ファイル末尾の場合は 0 を、 エラーの場合は -1 を返"
3406 "す。 I<read> 関数はストリームのオフセットを適切に更新すべきである。"
3407
3408 #. type: Plain text
3409 #: build/C/man3/fopencookie.3:146
3410 msgid ""
3411 "If I<*read> is a null pointer, then reads from the custom stream always "
3412 "return end of file."
3413 msgstr ""
3414 "I<*read> がヌルポインターの場合、 独自のストリームからの読み出しは常にファイ"
3415 "ル末尾 (end of file) を返す。"
3416
3417 #. type: TP
3418 #: build/C/man3/fopencookie.3:146
3419 #, no-wrap
3420 msgid "I<cookie_write_function_t *write>"
3421 msgstr "I<cookie_write_function_t *write>"
3422
3423 #. type: Plain text
3424 #: build/C/man3/fopencookie.3:150
3425 msgid ""
3426 "This function implements write operations for the stream.  When called, it "
3427 "receives three arguments:"
3428 msgstr ""
3429 "この関数はストリームに対する write 操作を実装する。 呼び出される際、 3 つの引"
3430 "き数を受け取る。"
3431
3432 #. type: Plain text
3433 #: build/C/man3/fopencookie.3:152
3434 #, no-wrap
3435 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3436 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3437
3438 #. type: Plain text
3439 #: build/C/man3/fopencookie.3:168
3440 msgid ""
3441 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3442 "output to the stream and the size of that buffer.  As its function result, "
3443 "the I<write> function should return the number of bytes copied from I<buf>, "
3444 "or 0 on error.  (The function must not return a negative value.)  The "
3445 "I<write> function should update the stream offset appropriately."
3446 msgstr ""
3447 "引き数 I<buf> と I<size> は、 それぞれ、 ストリームへの出力するデータが入った"
3448 "バッファーとそのバッファーのサイズである。 関数の結果として、 I<write> 関数"
3449 "は I<buf> からコピーされたバイト数を返し、 エラーの場合は -1 を返す。 (この関"
3450 "数は負の値を返してはならない。) I<write> 関数はストリームのオフセットを適切に"
3451 "更新すべきである。"
3452
3453 #. type: Plain text
3454 #: build/C/man3/fopencookie.3:173
3455 msgid "If I<*write> is a null pointer, then output to the stream is discarded."
3456 msgstr ""
3457 "I<*write> がヌルポインターの場合、 このストリームへの出力は破棄される。"
3458
3459 #. type: TP
3460 #: build/C/man3/fopencookie.3:173
3461 #, no-wrap
3462 msgid "I<cookie_seek_function_t *seek>"
3463 msgstr "I<cookie_seek_function_t *seek>"
3464
3465 #. type: Plain text
3466 #: build/C/man3/fopencookie.3:177
3467 msgid ""
3468 "This function implements seek operations on the stream.  When called, it "
3469 "receives three arguments:"
3470 msgstr ""
3471 "この関数はストリームに対する seek 操作を実装する。 呼び出される際、 3 つの引"
3472 "き数を受け取る。"
3473
3474 #. type: Plain text
3475 #: build/C/man3/fopencookie.3:179
3476 #, no-wrap
3477 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3478 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3479
3480 #. type: Plain text
3481 #: build/C/man3/fopencookie.3:185
3482 msgid ""
3483 "The I<*offset> argument specifies the new file offset depending on which of "
3484 "the following three values is supplied in I<whence>:"
3485 msgstr ""
3486 "I<*offset> 引き数は新しいファイルオフセットを指定する。 新しいオフセットは "
3487 "I<whence> に以下の値のどれが指定されたかに応じて決まる。"
3488
3489 #. type: TP
3490 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3491 #, no-wrap
3492 msgid "B<SEEK_SET>"
3493 msgstr "B<SEEK_SET>"
3494
3495 #. type: Plain text
3496 #: build/C/man3/fopencookie.3:191
3497 msgid ""
3498 "The stream offset should be set I<*offset> bytes from the start of the "
3499 "stream."
3500 msgstr ""
3501 "ストリームオフセットを、ストリームの先頭から I<*offset> バイトの位置に設定す"
3502 "る。"
3503
3504 #. type: TP
3505 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3506 #, no-wrap
3507 msgid "B<SEEK_CUR>"
3508 msgstr "B<SEEK_CUR>"
3509
3510 #. type: Plain text
3511 #: build/C/man3/fopencookie.3:195
3512 msgid "I<*offset> should be added to the current stream offset."
3513 msgstr "ストリームの現在のオフセットに I<*offset> を加算する。"
3514
3515 #. type: TP
3516 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3517 #, no-wrap
3518 msgid "B<SEEK_END>"
3519 msgstr "B<SEEK_END>"
3520
3521 #. type: Plain text
3522 #: build/C/man3/fopencookie.3:199
3523 msgid ""
3524 "The stream offset should be set to the size of the stream plus I<*offset>."
3525 msgstr ""
3526 "ストリームのオフセットを、ストリームのサイズに I<*offset> を足した場所に設定"
3527 "する。"
3528
3529 #. type: Plain text
3530 #: build/C/man3/fopencookie.3:206
3531 msgid ""
3532 "Before returning, the I<seek> function should update I<*offset> to indicate "
3533 "the new stream offset."
3534 msgstr ""
3535 "関数が返る前に、 I<seek> 関数はストリームの新しいオフセットを示すように "
3536 "I<*offset> を更新すべきである。"
3537
3538 #. type: Plain text
3539 #: build/C/man3/fopencookie.3:210
3540 msgid ""
3541 "As its function result, the I<seek> function should return 0 on success, and "
3542 "-1 on error."
3543 msgstr ""
3544 "関数の結果として、 I<seek> 関数は成功すると 0 を、 エラーの場合 -1 を返す。"
3545
3546 #. type: Plain text
3547 #: build/C/man3/fopencookie.3:215
3548 msgid ""
3549 "If I<*seek> is a null pointer, then it is not possible to perform seek "
3550 "operations on the stream."
3551 msgstr ""
3552 "I<*seek> がヌルポインターの場合、 このストリームに対して seek 操作を行うこと"
3553 "ができない。"
3554
3555 #. type: TP
3556 #: build/C/man3/fopencookie.3:215
3557 #, no-wrap
3558 msgid "I<cookie_close_function_t *close>"
3559 msgstr "I<cookie_close_function_t *close>"
3560
3561 #. type: Plain text
3562 #: build/C/man3/fopencookie.3:221
3563 msgid ""
3564 "This function closes the stream.  The hook function can do things such as "
3565 "freeing buffers allocated for the stream.  When called, it receives one "
3566 "argument:"
3567 msgstr ""
3568 "この関数はストリームをクローズする。 このフック関数では、 このストリームに割"
3569 "り当てられたバッファーを解放するといったことができる。 呼び出される際、 1 つ"
3570 "の引き数を受け取る。"
3571
3572 #. type: Plain text
3573 #: build/C/man3/fopencookie.3:223
3574 #, no-wrap
3575 msgid "    int close(void *cookie);\n"
3576 msgstr "    int close(void *cookie);\n"
3577
3578 #. type: Plain text
3579 #: build/C/man3/fopencookie.3:228
3580 msgid ""
3581 "The I<cookie> argument is the cookie that the programmer supplied when "
3582 "calling B<fopencookie>()."
3583 msgstr ""
3584 "I<cookie> 引き数は B<fopencookie>() の呼び出し時にプログラマーが渡した "
3585 "cookie である。"
3586
3587 #. type: Plain text
3588 #: build/C/man3/fopencookie.3:234
3589 msgid ""
3590 "As its function result, the I<close> function should return 0 on success, "
3591 "and B<EOF> on error."
3592 msgstr ""
3593 "関数の結果として、 I<close> 関数は成功すると 0 を、 エラーの場合 B<EOF> を返"
3594 "す。"
3595
3596 #. type: Plain text
3597 #: build/C/man3/fopencookie.3:238
3598 msgid ""
3599 "If I<*close> is NULL, then no special action is performed when the stream is "
3600 "closed."
3601 msgstr ""
3602 "I<*close> が NULL の場合、 ストリームがクローズされる際に特別な操作は何も行わ"
3603 "れない。"
3604
3605 #.  .SH ERRORS
3606 #.  It's not clear if errno ever gets set...
3607 #. type: Plain text
3608 #: build/C/man3/fopencookie.3:245
3609 msgid ""
3610 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3611 "NULL is returned."
3612 msgstr ""
3613 "成功すると B<fopencookie>() は新しいストリームへのポインターを返す。 エラーの"
3614 "場合、 NULL が返される。"
3615
3616 #. type: Plain text
3617 #: build/C/man3/fopencookie.3:247
3618 msgid "This function is a nonstandard GNU extension."
3619 msgstr "この関数は非標準の GNU 拡張である。"
3620
3621 #. type: Plain text
3622 #: build/C/man3/fopencookie.3:256
3623 msgid ""
3624 "The program below implements a custom stream whose functionality is similar "
3625 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3626 "stream whose data is stored in a memory buffer.  The program writes its "
3627 "command-line arguments to the stream, and then seeks through the stream "
3628 "reading two out of every five characters and writing them to standard "
3629 "output.  The following shell session demonstrates the use of the program:"
3630 msgstr ""
3631 "以下のプログラムは、 B<fmemopen>(3) で利用できるのと似た (同じではない) 機能"
3632 "を持つ独自のストリームを実装している。 データがメモリーバッファーに格納される"
3633 "ストリームを実装している。 このプログラムは、 コマンドライン引き数をストリー"
3634 "ムに書き込み、 それからストリームをたどって 5 文字ごとに 2 文字を読み出し"
3635 "て、 それを標準出力に書き込む。 以下のシェルセッションはこのプログラムの使用"
3636 "例である。"
3637
3638 #. type: Plain text
3639 #: build/C/man3/fopencookie.3:264
3640 #, no-wrap
3641 msgid ""
3642 "$B< ./a.out \\(aqhello world\\(aq>\n"
3643 "/he/\n"
3644 "/ w/\n"
3645 "/d/\n"
3646 "Reached end of file\n"
3647 msgstr ""
3648 "$B< ./a.out \\(aqhello world\\(aq>\n"
3649 "/he/\n"
3650 "/ w/\n"
3651 "/d/\n"
3652 "Reached end of file\n"
3653
3654 #. type: Plain text
3655 #: build/C/man3/fopencookie.3:271
3656 msgid ""
3657 "Note that a more general version of the program below could be improved to "
3658 "more robustly handle various error situations (e.g., opening a stream with a "
3659 "cookie that already has an open stream; closing a stream that has already "
3660 "been closed)."
3661 msgstr ""
3662 "このプログラムを改良して様々なエラー状況に強くすることもできる (例えば、 オー"
3663 "プン済みのストリームに対応する cookie でストリームをオープンしようとした、 す"
3664 "でにクローズされたストリームをクローズしようとした、など)。"
3665
3666 #. type: Plain text
3667 #: build/C/man3/fopencookie.3:280
3668 #, no-wrap
3669 msgid ""
3670 "#define _GNU_SOURCE\n"
3671 "#include E<lt>sys/types.hE<gt>\n"
3672 "#include E<lt>stdio.hE<gt>\n"
3673 "#include E<lt>stdlib.hE<gt>\n"
3674 "#include E<lt>unistd.hE<gt>\n"
3675 "#include E<lt>string.hE<gt>\n"
3676 msgstr ""
3677 "#define _GNU_SOURCE\n"
3678 "#include E<lt>sys/types.hE<gt>\n"
3679 "#include E<lt>stdio.hE<gt>\n"
3680 "#include E<lt>stdlib.hE<gt>\n"
3681 "#include E<lt>unistd.hE<gt>\n"
3682 "#include E<lt>string.hE<gt>\n"
3683
3684 #. type: Plain text
3685 #: build/C/man3/fopencookie.3:282
3686 #, no-wrap
3687 msgid "#define INIT_BUF_SIZE 4\n"
3688 msgstr "#define INIT_BUF_SIZE 4\n"
3689
3690 #. type: Plain text
3691 #: build/C/man3/fopencookie.3:289
3692 #, no-wrap
3693 msgid ""
3694 "struct memfile_cookie {\n"
3695 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3696 "    size_t  allocated;  /* Size of buf */\n"
3697 "    size_t  endpos;     /* Number of characters in buf */\n"
3698 "    off_t   offset;     /* Current file offset in buf */\n"
3699 "};\n"
3700 msgstr ""
3701 "struct memfile_cookie {\n"
3702 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3703 "    size_t  allocated;  /* Size of buf */\n"
3704 "    size_t  endpos;     /* Number of characters in buf */\n"
3705 "    off_t   offset;     /* Current file offset in buf */\n"
3706 "};\n"
3707
3708 #. type: Plain text
3709 #: build/C/man3/fopencookie.3:295
3710 #, no-wrap
3711 msgid ""
3712 "ssize_t\n"
3713 "memfile_write(void *c, const char *buf, size_t size)\n"
3714 "{\n"
3715 "    char *new_buff;\n"
3716 "    struct memfile_cookie *cookie = c;\n"
3717 msgstr ""
3718 "ssize_t\n"
3719 "memfile_write(void *c, const char *buf, size_t size)\n"
3720 "{\n"
3721 "    char *new_buff;\n"
3722 "    struct memfile_cookie *cookie = c;\n"
3723
3724 #. type: Plain text
3725 #: build/C/man3/fopencookie.3:297
3726 #, no-wrap
3727 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3728 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3729
3730 #. type: Plain text
3731 #: build/C/man3/fopencookie.3:307
3732 #, no-wrap
3733 msgid ""
3734 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3735 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3736 "        if (new_buff == NULL) {\n"
3737 "            return -1;\n"
3738 "        } else {\n"
3739 "            cookie-E<gt>allocated *= 2;\n"
3740 "            cookie-E<gt>buf = new_buff;\n"
3741 "        }\n"
3742 "    }\n"
3743 msgstr ""
3744 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3745 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3746 "        if (new_buff == NULL) {\n"
3747 "            return -1;\n"
3748 "        } else {\n"
3749 "            cookie-E<gt>allocated *= 2;\n"
3750 "            cookie-E<gt>buf = new_buff;\n"
3751 "        }\n"
3752 "    }\n"
3753
3754 #. type: Plain text
3755 #: build/C/man3/fopencookie.3:309
3756 #, no-wrap
3757 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3758 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3759
3760 #. type: Plain text
3761 #: build/C/man3/fopencookie.3:313
3762 #, no-wrap
3763 msgid ""
3764 "    cookie-E<gt>offset += size;\n"
3765 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3766 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3767 msgstr ""
3768 "    cookie-E<gt>offset += size;\n"
3769 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3770 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3771
3772 #. type: Plain text
3773 #: build/C/man3/fopencookie.3:316
3774 #, no-wrap
3775 msgid ""
3776 "    return size;\n"
3777 "}\n"
3778 msgstr ""
3779 "    return size;\n"
3780 "}\n"
3781
3782 #. type: Plain text
3783 #: build/C/man3/fopencookie.3:322
3784 #, no-wrap
3785 msgid ""
3786 "ssize_t\n"
3787 "memfile_read(void *c, char *buf, size_t size)\n"
3788 "{\n"
3789 "    ssize_t xbytes;\n"
3790 "    struct memfile_cookie *cookie = c;\n"
3791 msgstr ""
3792 "ssize_t\n"
3793 "memfile_read(void *c, char *buf, size_t size)\n"
3794 "{\n"
3795 "    ssize_t xbytes;\n"
3796 "    struct memfile_cookie *cookie = c;\n"
3797
3798 #. type: Plain text
3799 #: build/C/man3/fopencookie.3:324
3800 #, no-wrap
3801 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3802 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3803
3804 #. type: Plain text
3805 #: build/C/man3/fopencookie.3:330
3806 #, no-wrap
3807 msgid ""
3808 "    xbytes = size;\n"
3809 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3810 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3811 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3812 "       xbytes = 0;\n"
3813 msgstr ""
3814 "    xbytes = size;\n"
3815 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3816 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3817 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3818 "       xbytes = 0;\n"
3819
3820 #. type: Plain text
3821 #: build/C/man3/fopencookie.3:332
3822 #, no-wrap
3823 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3824 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3825
3826 #. type: Plain text
3827 #: build/C/man3/fopencookie.3:336
3828 #, no-wrap
3829 msgid ""
3830 "    cookie-E<gt>offset += xbytes;\n"
3831 "    return xbytes;\n"
3832 "}\n"
3833 msgstr ""
3834 "    cookie-E<gt>offset += xbytes;\n"
3835 "    return xbytes;\n"
3836 "}\n"
3837
3838 #. type: Plain text
3839 #: build/C/man3/fopencookie.3:342
3840 #, no-wrap
3841 msgid ""
3842 "int\n"
3843 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3844 "{\n"
3845 "    off64_t new_offset;\n"
3846 "    struct memfile_cookie *cookie = c;\n"
3847 msgstr ""
3848 "int\n"
3849 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3850 "{\n"
3851 "    off64_t new_offset;\n"
3852 "    struct memfile_cookie *cookie = c;\n"
3853
3854 #. type: Plain text
3855 #: build/C/man3/fopencookie.3:351
3856 #, no-wrap
3857 msgid ""
3858 "    if (whence == SEEK_SET)\n"
3859 "        new_offset = *offset;\n"
3860 "    else if (whence == SEEK_END)\n"
3861 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3862 "    else if (whence == SEEK_CUR)\n"
3863 "        new_offset = cookie-E<gt>offset + *offset;\n"
3864 "    else\n"
3865 "        return -1;\n"
3866 msgstr ""
3867 "    if (whence == SEEK_SET)\n"
3868 "        new_offset = *offset;\n"
3869 "    else if (whence == SEEK_END)\n"
3870 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3871 "    else if (whence == SEEK_CUR)\n"
3872 "        new_offset = cookie-E<gt>offset + *offset;\n"
3873 "    else\n"
3874 "        return -1;\n"
3875
3876 #. type: Plain text
3877 #: build/C/man3/fopencookie.3:354
3878 #, no-wrap
3879 msgid ""
3880 "    if (new_offset E<lt> 0)\n"
3881 "        return -1;\n"
3882 msgstr ""
3883 "    if (new_offset E<lt> 0)\n"
3884 "        return -1;\n"
3885
3886 #. type: Plain text
3887 #: build/C/man3/fopencookie.3:359
3888 #, no-wrap
3889 msgid ""
3890 "    cookie-E<gt>offset = new_offset;\n"
3891 "    *offset = new_offset;\n"
3892 "    return 0;\n"
3893 "}\n"
3894 msgstr ""
3895 "    cookie-E<gt>offset = new_offset;\n"
3896 "    *offset = new_offset;\n"
3897 "    return 0;\n"
3898 "}\n"
3899
3900 #. type: Plain text
3901 #: build/C/man3/fopencookie.3:364
3902 #, no-wrap
3903 msgid ""
3904 "int\n"
3905 "memfile_close(void *c)\n"
3906 "{\n"
3907 "    struct memfile_cookie *cookie = c;\n"
3908 msgstr ""
3909 "int\n"
3910 "memfile_close(void *c)\n"
3911 "{\n"
3912 "    struct memfile_cookie *cookie = c;\n"
3913
3914 #. type: Plain text
3915 #: build/C/man3/fopencookie.3:368
3916 #, no-wrap
3917 msgid ""
3918 "    free(cookie-E<gt>buf);\n"
3919 "    cookie-E<gt>allocated = 0;\n"
3920 "    cookie-E<gt>buf = NULL;\n"
3921 msgstr ""
3922 "    free(cookie-E<gt>buf);\n"
3923 "    cookie-E<gt>allocated = 0;\n"
3924 "    cookie-E<gt>buf = NULL;\n"
3925
3926 #. type: Plain text
3927 #: build/C/man3/fopencookie.3:371
3928 #, no-wrap
3929 msgid ""
3930 "    return 0;\n"
3931 "}\n"
3932 msgstr ""
3933 "    return 0;\n"
3934 "}\n"
3935
3936 #. type: Plain text
3937 #: build/C/man3/fopencookie.3:387
3938 #, no-wrap
3939 msgid ""
3940 "int\n"
3941 "main(int argc, char *argv[])\n"
3942 "{\n"
3943 "    cookie_io_functions_t  memfile_func = {\n"
3944 "        .read  = memfile_read,\n"
3945 "        .write = memfile_write,\n"
3946 "        .seek  = memfile_seek,\n"
3947 "        .close = memfile_close\n"
3948 "    };\n"
3949 "    FILE *stream;\n"
3950 "    struct memfile_cookie mycookie;\n"
3951 "    ssize_t nread;\n"
3952 "    long p;\n"
3953 "    int j;\n"
3954 "    char buf[1000];\n"
3955 msgstr ""
3956 "int\n"
3957 "main(int argc, char *argv[])\n"
3958 "{\n"
3959 "    cookie_io_functions_t  memfile_func = {\n"
3960 "        .read  = memfile_read,\n"
3961 "        .write = memfile_write,\n"
3962 "        .seek  = memfile_seek,\n"
3963 "        .close = memfile_close\n"
3964 "    };\n"
3965 "    FILE *stream;\n"
3966 "    struct memfile_cookie mycookie;\n"
3967 "    ssize_t nread;\n"
3968 "    long p;\n"
3969 "    int j;\n"
3970 "    char buf[1000];\n"
3971
3972 #. type: Plain text
3973 #: build/C/man3/fopencookie.3:389
3974 #, no-wrap
3975 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3976 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3977
3978 #. type: Plain text
3979 #: build/C/man3/fopencookie.3:395
3980 #, no-wrap
3981 msgid ""
3982 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3983 "    if (mycookie.buf == NULL) {\n"
3984 "        perror(\"malloc\");\n"
3985 "        exit(EXIT_FAILURE);\n"
3986 "    }\n"
3987 msgstr ""
3988 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3989 "    if (mycookie.buf == NULL) {\n"
3990 "        perror(\"malloc\");\n"
3991 "        exit(EXIT_FAILURE);\n"
3992 "    }\n"
3993
3994 #. type: Plain text
3995 #: build/C/man3/fopencookie.3:399
3996 #, no-wrap
3997 msgid ""
3998 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3999 "    mycookie.offset = 0;\n"
4000 "    mycookie.endpos = 0;\n"
4001 msgstr ""
4002 "    mycookie.allocated = INIT_BUF_SIZE;\n"
4003 "    mycookie.offset = 0;\n"
4004 "    mycookie.endpos = 0;\n"
4005
4006 #. type: Plain text
4007 #: build/C/man3/fopencookie.3:405
4008 #, no-wrap
4009 msgid ""
4010 "    stream = fopencookie(&mycookie,\"w+\", memfile_func);\n"
4011 "    if (stream == NULL) {\n"
4012 "        perror(\"fopencookie\");\n"
4013 "        exit(EXIT_FAILURE);\n"
4014 "    }\n"
4015 msgstr ""
4016 "    stream = fopencookie(&mycookie,\"w+\", memfile_func);\n"
4017 "    if (stream == NULL) {\n"
4018 "        perror(\"fopencookie\");\n"
4019 "        exit(EXIT_FAILURE);\n"
4020 "    }\n"
4021
4022 #. type: Plain text
4023 #: build/C/man3/fopencookie.3:407
4024 #, no-wrap
4025 msgid "    /* Write command-line arguments to our file */\n"
4026 msgstr "    /* Write command-line arguments to our file */\n"
4027
4028 #. type: Plain text
4029 #: build/C/man3/fopencookie.3:413
4030 #, no-wrap
4031 msgid ""
4032 "    for (j = 1; j E<lt> argc; j++)\n"
4033 "        if (fputs(argv[j], stream) == EOF) {\n"
4034 "            perror(\"fputs\");\n"
4035 "            exit(EXIT_FAILURE);\n"
4036 "        }\n"
4037 msgstr ""
4038 "    for (j = 1; j E<lt> argc; j++)\n"
4039 "        if (fputs(argv[j], stream) == EOF) {\n"
4040 "            perror(\"fputs\");\n"
4041 "            exit(EXIT_FAILURE);\n"
4042 "        }\n"
4043
4044 #. type: Plain text
4045 #: build/C/man3/fopencookie.3:415
4046 #, no-wrap
4047 msgid "    /* Read two bytes out of every five, until EOF */\n"
4048 msgstr "    /* Read two bytes out of every five, until EOF */\n"
4049
4050 #. type: Plain text
4051 #: build/C/man3/fopencookie.3:430
4052 #, no-wrap
4053 msgid ""
4054 "    for (p = 0; ; p += 5) {\n"
4055 "        if (fseek(stream, p, SEEK_SET) == -1) {\n"
4056 "            perror(\"fseek\");\n"
4057 "            exit(EXIT_FAILURE);\n"
4058 "        }\n"
4059 "        nread = fread(buf, 1, 2, stream);\n"
4060 "        if (nread == -1) {\n"
4061 "            perror(\"fread\");\n"
4062 "            exit(EXIT_FAILURE);\n"
4063 "        }\n"
4064 "        if (nread == 0) {\n"
4065 "            printf(\"Reached end of file\\en\");\n"
4066 "            break;\n"
4067 "        }\n"
4068 msgstr ""
4069 "    for (p = 0; ; p += 5) {\n"
4070 "        if (fseek(stream, p, SEEK_SET) == -1) {\n"
4071 "            perror(\"fseek\");\n"
4072 "            exit(EXIT_FAILURE);\n"
4073 "        }\n"
4074 "        nread = fread(buf, 1, 2, stream);\n"
4075 "        if (nread == -1) {\n"
4076 "            perror(\"fread\");\n"
4077 "            exit(EXIT_FAILURE);\n"
4078 "        }\n"
4079 "        if (nread == 0) {\n"
4080 "            printf(\"Reached end of file\\en\");\n"
4081 "            break;\n"
4082 "        }\n"
4083
4084 #. type: Plain text
4085 #: build/C/man3/fopencookie.3:433
4086 #, no-wrap
4087 msgid ""
4088 "        printf(\"/%.*s/\\en\", nread, buf);\n"
4089 "    }\n"
4090 msgstr ""
4091 "        printf(\"/%.*s/\\en\", nread, buf);\n"
4092 "    }\n"
4093
4094 #. type: Plain text
4095 #: build/C/man3/fopencookie.3:436 build/C/man2/open_by_handle_at.2:579
4096 #: build/C/man2/open_by_handle_at.2:719 build/C/man2/readlink.2:327
4097 #, no-wrap
4098 msgid ""
4099 "    exit(EXIT_SUCCESS);\n"
4100 "}\n"
4101 msgstr ""
4102 "    exit(EXIT_SUCCESS);\n"
4103 "}\n"
4104
4105 #. type: Plain text
4106 #: build/C/man3/fopencookie.3:442
4107 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
4108 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
4109
4110 #. type: TH
4111 #: build/C/man3/fpurge.3:25
4112 #, no-wrap
4113 msgid "FPURGE"
4114 msgstr "FPURGE"
4115
4116 #. type: TH
4117 #: build/C/man3/fpurge.3:25
4118 #, no-wrap
4119 msgid "2001-12-15"
4120 msgstr "2001-12-15"
4121
4122 #. type: Plain text
4123 #: build/C/man3/fpurge.3:28
4124 msgid "fpurge, __fpurge - purge a stream"
4125 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
4126
4127 #. type: Plain text
4128 #: build/C/man3/fpurge.3:32
4129 #, no-wrap
4130 msgid ""
4131 "/* unsupported */\n"
4132 "B<#include E<lt>stdio.hE<gt>>\n"
4133 msgstr ""
4134 "/* unsupported */\n"
4135 "B<#include E<lt>stdio.hE<gt>>\n"
4136
4137 #. type: Plain text
4138 #: build/C/man3/fpurge.3:34
4139 #, no-wrap
4140 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
4141 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
4142
4143 #. type: Plain text
4144 #: build/C/man3/fpurge.3:37
4145 #, no-wrap
4146 msgid ""
4147 "/* supported */\n"
4148 "B<#include E<lt>stdio.hE<gt>>\n"
4149 msgstr ""
4150 "/* supported */\n"
4151 "B<#include E<lt>stdio.hE<gt>>\n"
4152
4153 #. type: Plain text
4154 #: build/C/man3/fpurge.3:39
4155 #, no-wrap
4156 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
4157 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
4158
4159 #. type: Plain text
4160 #: build/C/man3/fpurge.3:41
4161 #, no-wrap
4162 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
4163 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
4164
4165 #. type: Plain text
4166 #: build/C/man3/fpurge.3:54
4167 msgid ""
4168 "The function B<fpurge>()  clears the buffers of the given stream.  For "
4169 "output streams this discards any unwritten output.  For input streams this "
4170 "discards any input read from the underlying object but not yet obtained via "
4171 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
4172 "B<fflush>(3)."
4173 msgstr ""
4174 "B<fpurge>()  関数は、与えられたストリームのバッファーをクリアする。 出力スト"
4175 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
4176 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
4177 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
4178 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
4179
4180 #. type: Plain text
4181 #: build/C/man3/fpurge.3:58
4182 msgid ""
4183 "The function B<__fpurge>()  does precisely the same, but without returning a "
4184 "value."
4185 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
4186
4187 #. type: Plain text
4188 #: build/C/man3/fpurge.3:65
4189 msgid ""
4190 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
4191 "and sets I<errno> appropriately."
4192 msgstr ""
4193 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
4194 "を適切な値に設定する。"
4195
4196 #. type: Plain text
4197 #: build/C/man3/fpurge.3:70
4198 msgid "I<stream> is not an open stream."
4199 msgstr "I<stream> がオープンされていない。"
4200
4201 #. type: Plain text
4202 #: build/C/man3/fpurge.3:78
4203 msgid ""
4204 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
4205 "was introduced in 4.4BSD and is not available under Linux.  The function "
4206 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
4207 "later."
4208 msgstr ""
4209 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
4210 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
4211 "され、glibc 2.1.95 以降には存在している。"
4212
4213 #. type: Plain text
4214 #: build/C/man3/fpurge.3:80
4215 msgid "Usually it is a mistake to want to discard input buffers."
4216 msgstr "通常は入力バッファーを捨てようとするのは間違っている。"
4217
4218 #.  .BR fclean (3),
4219 #. type: Plain text
4220 #: build/C/man3/fpurge.3:85
4221 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
4222 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
4223
4224 #. type: TH
4225 #: build/C/man3/fputwc.3:16
4226 #, no-wrap
4227 msgid "FPUTWC"
4228 msgstr "FPUTWC"
4229
4230 #. type: Plain text
4231 #: build/C/man3/fputwc.3:19
4232 msgid "fputwc, putwc - write a wide character to a FILE stream"
4233 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
4234
4235 #. type: Plain text
4236 #: build/C/man3/fputwc.3:27
4237 #, no-wrap
4238 msgid ""
4239 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4240 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4241 msgstr ""
4242 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4243 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4244
4245 #. type: Plain text
4246 #: build/C/man3/fputwc.3:43
4247 msgid ""
4248 "The B<fputwc>()  function is the wide-character equivalent of the "
4249 "B<fputc>(3)  function.  It writes the wide character I<wc> to I<stream>.  If "
4250 "I<ferror(stream)> becomes true, it returns B<WEOF>.  If a wide-character "
4251 "conversion error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  "
4252 "Otherwise, it returns I<wc>."
4253 msgstr ""
4254 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
4255 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
4256 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
4257 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
4258 "関数は I<wc> を返す。"
4259
4260 #. type: Plain text
4261 #: build/C/man3/fputwc.3:51
4262 msgid ""
4263 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
4264 "may be implemented as a macro, and may evaluate its argument more than "
4265 "once.  There is no reason ever to use it."
4266 msgstr ""
4267 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
4268 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
4269 "ない。この関数を使う理由はもはや存在しない。"
4270
4271 #. type: Plain text
4272 #: build/C/man3/fputwc.3:63
4273 msgid ""
4274 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
4275 "indicate an error.  In the event of an error, I<errno> is set to indicate "
4276 "the cause."
4277 msgstr ""
4278 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
4279 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
4280
4281 #. type: Plain text
4282 #: build/C/man3/fputwc.3:68
4283 msgid "Conversion of I<wc> to the stream's encoding fails."
4284 msgstr "I<wc> からストリームの符号への変換に失敗した。"
4285
4286 #. type: Plain text
4287 #: build/C/man3/fputwc.3:77
4288 msgid ""
4289 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
4290 "current locale."
4291 msgstr ""
4292 "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリーに依存する。"
4293
4294 #. type: Plain text
4295 #: build/C/man3/fputwc.3:85
4296 msgid ""
4297 "In the absence of additional information passed to the B<fopen>(3)  call, it "
4298 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4299 "sequence corresponding to the wide character I<wc>."
4300 msgstr ""
4301 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4302 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4303 "よい。"
4304
4305 #. type: Plain text
4306 #: build/C/man3/fputwc.3:89
4307 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4308 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4309
4310 #. type: TH
4311 #: build/C/man3/fread.3:45
4312 #, no-wrap
4313 msgid "FREAD"
4314 msgstr "FREAD"
4315
4316 #. type: TH
4317 #: build/C/man3/fread.3:45
4318 #, no-wrap
4319 msgid "2012-03-30"
4320 msgstr "2012-03-30"
4321
4322 #. type: Plain text
4323 #: build/C/man3/fread.3:48
4324 msgid "fread, fwrite - binary stream input/output"
4325 msgstr "fread, fwrite - バイナリストリームの入出力"
4326
4327 #. type: Plain text
4328 #: build/C/man3/fread.3:54
4329 #, no-wrap
4330 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4331 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4332
4333 #. type: Plain text
4334 #: build/C/man3/fread.3:57
4335 #, no-wrap
4336 msgid ""
4337 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4338 "B<              FILE *>I<stream>B<);>\n"
4339 msgstr ""
4340 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4341 "B<              FILE *>I<stream>B<);>\n"
4342
4343 #. type: Plain text
4344 #: build/C/man3/fread.3:69
4345 msgid ""
4346 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4347 "long, from the stream pointed to by I<stream>, storing them at the location "
4348 "given by I<ptr>."
4349 msgstr ""
4350 "B<fread>()  関数は I<stream> ポインターで指定されたストリームから I<nmemb> 個"
4351 "のデータを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4352 "I<size> バイトの長さを持つ。"
4353
4354 #. type: Plain text
4355 #: build/C/man3/fread.3:80
4356 msgid ""
4357 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4358 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4359 "location given by I<ptr>."
4360 msgstr ""
4361 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4362 "I<stream> ポインターで指定されたストリームに書き込む。 個々のデータは "
4363 "I<size> バイトの長さを持つ。"
4364
4365 #. type: Plain text
4366 #: build/C/man3/fread.3:96
4367 msgid ""
4368 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4369 "or written.  This number equals the number of bytes transferred only when "
4370 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4371 "return value is a short item count (or zero)."
4372 msgstr ""
4373 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4374 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4375 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4376 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4377
4378 #. type: Plain text
4379 #: build/C/man3/fread.3:103
4380 msgid ""
4381 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4382 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4383 msgstr ""
4384 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4385 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4386 "らない。"
4387
4388 #. type: Plain text
4389 #: build/C/man3/fread.3:105
4390 msgid "C89, POSIX.1-2001."
4391 msgstr "C89, POSIX.1-2001."
4392
4393 #. type: Plain text
4394 #: build/C/man3/fread.3:111
4395 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4396 msgstr ""
4397 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4398
4399 #. type: TH
4400 #: build/C/man3/fseek.3:42
4401 #, no-wrap
4402 msgid "FSEEK"
4403 msgstr "FSEEK"
4404
4405 #. type: TH
4406 #: build/C/man3/fseek.3:42 build/C/man3/perror.3:31
4407 #, no-wrap
4408 msgid "2014-05-28"
4409 msgstr "2014-05-28"
4410
4411 #. type: Plain text
4412 #: build/C/man3/fseek.3:45
4413 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4414 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4415
4416 #. type: Plain text
4417 #: build/C/man3/fseek.3:49
4418 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4419 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4420
4421 #. type: Plain text
4422 #: build/C/man3/fseek.3:51
4423 msgid "B<long ftell(FILE *>I<stream>B<);>"
4424 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4425
4426 #. type: Plain text
4427 #: build/C/man3/fseek.3:53
4428 msgid "B<void rewind(FILE *>I<stream>B<);>"
4429 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4430
4431 #. type: Plain text
4432 #: build/C/man3/fseek.3:55
4433 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4434 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4435
4436 #. type: Plain text
4437 #: build/C/man3/fseek.3:57
4438 msgid "B<int fsetpos(FILE *>I<stream>B<, const fpos_t *>I<pos>B<);>"
4439 msgstr "B<int fsetpos(FILE *>I<stream>B<, const fpos_t *>I<pos>B<);>"
4440
4441 #. type: Plain text
4442 #: build/C/man3/fseek.3:81
4443 msgid ""
4444 "The B<fseek>()  function sets the file position indicator for the stream "
4445 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4446 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4447 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4448 "relative to the start of the file, the current position indicator, or end-of-"
4449 "file, respectively.  A successful call to the B<fseek>()  function clears "
4450 "the end-of-file indicator for the stream and undoes any effects of the "
4451 "B<ungetc>(3)  function on the same stream."
4452 msgstr ""
4453 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4454 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4455 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4456 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4457 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4458 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4459 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4460 "かったことになる。"
4461
4462 #. type: Plain text
4463 #: build/C/man3/fseek.3:87
4464 msgid ""
4465 "The B<ftell>()  function obtains the current value of the file position "
4466 "indicator for the stream pointed to by I<stream>."
4467 msgstr ""
4468 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4469 "置表示子 の現時点での値を与える。"
4470
4471 #. type: Plain text
4472 #: build/C/man3/fseek.3:94
4473 msgid ""
4474 "The B<rewind>()  function sets the file position indicator for the stream "
4475 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4476 msgstr ""
4477 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4478 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4479
4480 #. type: Plain text
4481 #: build/C/man3/fseek.3:97
4482 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4483 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4484
4485 #. type: Plain text
4486 #: build/C/man3/fseek.3:101
4487 msgid ""
4488 "except that the error indicator for the stream is also cleared (see "
4489 "B<clearerr>(3))."
4490 msgstr ""
4491 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4492 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4493
4494 #. type: Plain text
4495 #: build/C/man3/fseek.3:121
4496 msgid ""
4497 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4498 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4499 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4500 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4501 "I<fpos_t> object may be a complex object and these routines may be the only "
4502 "way to portably reposition a text stream."
4503 msgstr ""
4504 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と "
4505 "B<fseek>()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なる"
4506 "インターフェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を "
4507 "I<pos> が参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを "
4508 "I<pos> に設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの"
4509 "複雑なオブジェクトになっていて、これらのルーチンがテキス トストリームでファイ"
4510 "ル位置を変更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4511
4512 #. type: Plain text
4513 #: build/C/man3/fseek.3:136
4514 msgid ""
4515 "The B<rewind>()  function returns no value.  Upon successful completion, "
4516 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4517 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4518 "indicate the error."
4519 msgstr ""
4520 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4521 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4522 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4523
4524 #. type: Plain text
4525 #: build/C/man3/fseek.3:142
4526 msgid "The I<stream> specified is not a seekable stream."
4527 msgstr "指定した I<stream> がシークできない。"
4528
4529 #. type: Plain text
4530 #: build/C/man3/fseek.3:154
4531 msgid ""
4532 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4533 "B<SEEK_CUR>.  Or: the resulting file offset would be negative."
4534 msgstr ""
4535 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4536 "B<SEEK_CUR> 以外の値であった。 または、更新後のファイルオフセットが負になって"
4537 "しまう。"
4538
4539 #. type: Plain text
4540 #: build/C/man3/fseek.3:169
4541 msgid ""
4542 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4543 "also fail and set I<errno> for any of the errors specified for the routines "
4544 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4545 msgstr ""
4546 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ "
4547 "B<fflush>(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出"
4548 "す際に失敗する可能性がある。この場合は それぞれ対応した I<errno> が設定され"
4549 "る。"
4550
4551 #. type: Plain text
4552 #: build/C/man3/fseek.3:174
4553 msgid "B<lseek>(2), B<fseeko>(3)"
4554 msgstr "B<lseek>(2), B<fseeko>(3)"
4555
4556 #. type: TH
4557 #: build/C/man3/fseeko.3:25
4558 #, no-wrap
4559 msgid "FSEEKO"
4560 msgstr "FSEEKO"
4561
4562 #. type: TH
4563 #: build/C/man3/fseeko.3:25
4564 #, no-wrap
4565 msgid "2014-10-02"
4566 msgstr "2014-10-02"
4567
4568 #. type: Plain text
4569 #: build/C/man3/fseeko.3:28
4570 msgid "fseeko, ftello - seek to or report file position"
4571 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4572
4573 #. type: Plain text
4574 #: build/C/man3/fseeko.3:33
4575 #, no-wrap
4576 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4577 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4578
4579 #. type: Plain text
4580 #: build/C/man3/fseeko.3:36
4581 #, no-wrap
4582 msgid ""
4583 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4584 "\n"
4585 msgstr ""
4586 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4587 "\n"
4588
4589 #. type: Plain text
4590 #: build/C/man3/fseeko.3:45
4591 msgid "B<fseeko>(), B<ftello>():"
4592 msgstr "B<fseeko>(), B<ftello>():"
4593
4594 #. type: Plain text
4595 #: build/C/man3/fseeko.3:50
4596 msgid ""
4597 "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || "
4598 "_XOPEN_SOURCE\\ E<gt>=\\ 600"
4599 msgstr ""
4600 "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || "
4601 "_XOPEN_SOURCE\\ E<gt>=\\ 600"
4602
4603 #. type: Plain text
4604 #: build/C/man3/fseeko.3:52
4605 msgid "(defining the obsolete _LARGEFILE_SOURCE macro also works)"
4606 msgstr "(廃止予定のマクロ _LARGEFILE_SOURCE を指定しても動作する)"
4607
4608 #. type: Plain text
4609 #: build/C/man3/fseeko.3:75
4610 msgid ""
4611 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4612 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4613 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4614 "I<off_t> instead of I<long>."
4615 msgstr ""
4616 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4617 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし "
4618 "B<fseeko>()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではな"
4619 "く I<off_t> になっている。"
4620
4621 #. type: Plain text
4622 #: build/C/man3/fseeko.3:88
4623 msgid ""
4624 "On some architectures, both I<off_t> and I<long> are 32-bit types, but "
4625 "defining B<_FILE_OFFSET_BITS> with the value 64 (before including I<any> "
4626 "header files)  will turn I<off_t> into a 64-bit type."
4627 msgstr ""
4628 "いくつかのアーキテクチャーでは、 I<off_t> と I<long> の両方が 32 ビット型だ"
4629 "が、 (「どの」ヘッダーファイルをインクルードするよりも前に) "
4630 "B<_FILE_OFFSET_BITS> を値 64 で定義すると、 I<off_t> が 64 ビット型になる。"
4631
4632 #. type: Plain text
4633 #: build/C/man3/fseeko.3:97
4634 msgid ""
4635 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4636 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4637 "indicate the error."
4638 msgstr ""
4639 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4640 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4641
4642 #. type: Plain text
4643 #: build/C/man3/fseeko.3:100
4644 msgid "See the ERRORS in B<fseek>(3)."
4645 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4646
4647 #. type: Plain text
4648 #: build/C/man3/fseeko.3:102
4649 msgid "These functions are available under glibc since version 2.1."
4650 msgstr "これらの関数はバージョン 2.1 以降の glibc で利用可能である。"
4651
4652 #. type: Plain text
4653 #: build/C/man3/fseeko.3:104
4654 msgid "SUSv2, POSIX.1-2001."
4655 msgstr "SUSv2, POSIX.1-2001."
4656
4657 #. type: Plain text
4658 #: build/C/man3/fseeko.3:106
4659 msgid "These functions are found on System V-like systems."
4660 msgstr "これらの関数は System-V 風のシステムに存在する。"
4661
4662 #. type: Plain text
4663 #: build/C/man3/fseeko.3:108
4664 msgid "B<fseek>(3)"
4665 msgstr "B<fseek>(3)"
4666
4667 #. type: TH
4668 #: build/C/man3/getline.3:26
4669 #, no-wrap
4670 msgid "GETLINE"
4671 msgstr "GETLINE"
4672
4673 #. type: Plain text
4674 #: build/C/man3/getline.3:29
4675 msgid "getline, getdelim - delimited string input"
4676 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4677
4678 #. type: Plain text
4679 #: build/C/man3/getline.3:34
4680 #, no-wrap
4681 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4682 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4683
4684 #. type: Plain text
4685 #: build/C/man3/getline.3:37
4686 #, no-wrap
4687 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4688 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4689
4690 #. type: Plain text
4691 #: build/C/man3/getline.3:47
4692 msgid "B<getline>(), B<getdelim>():"
4693 msgstr "B<getline>(), B<getdelim>():"
4694
4695 #. type: Plain text
4696 #: build/C/man3/getline.3:52
4697 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4698 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4699
4700 #. type: Plain text
4701 #: build/C/man3/getline.3:65
4702 msgid ""
4703 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4704 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4705 "terminated and includes the newline character, if one was found."
4706 msgstr ""
4707 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4708 "バッファーのアドレスを I<*lineptr> に格納する。 バッファーはヌル文字 (\\e0) "
4709 "で終端される。 改行文字が見つかった場合は、改行文字もバッファーに格納される。"
4710
4711 #. type: Plain text
4712 #: build/C/man3/getline.3:77
4713 msgid ""
4714 "If I<*lineptr> is set to NULL and I<*n> is set 0 before the call, then "
4715 "B<getline>()  will allocate a buffer for storing the line.  This buffer "
4716 "should be freed by the user program even if B<getline>()  failed."
4717 msgstr ""
4718 "I<*lineptr> が NULL にセットされ、 I<*n> が呼び出し前に 0 にセットされた場"
4719 "合、 B<getline>()  は行の内容を格納するためのバッファーを確保する。 このバッ"
4720 "ファーは、 B<getline>() が失敗した場合であっても、ユーザーのプログラムで解放"
4721 "すべきである。"
4722
4723 #. type: Plain text
4724 #: build/C/man3/getline.3:95
4725 msgid ""
4726 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4727 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4728 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4729 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4730 msgstr ""
4731 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4732 "で確保した大きさ I<*n> バイトのバッファーへのポインターを入れて渡すこともでき"
4733 "る。 読み込んだ行を保持するのに十分なバッファーがない場合、 B<getline>()  は "
4734 "B<realloc>(3)  を使ってバッファーのサイズを変更し、必要に応じて I<*lineptr> "
4735 "と I<*n> を更新する。"
4736
4737 #. type: Plain text
4738 #: build/C/man3/getline.3:101
4739 msgid ""
4740 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4741 "to reflect the buffer address and allocated size respectively."
4742 msgstr ""
4743 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4744 "ファーのアドレスと割り当てたサイズを反映した値に更新される。"
4745
4746 #. type: Plain text
4747 #: build/C/man3/getline.3:112
4748 msgid ""
4749 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4750 "than newline can be specified as the I<delimiter> argument.  As with "
4751 "B<getline>(), a delimiter character is not added if one was not present in "
4752 "the input before end of file was reached."
4753 msgstr ""
4754 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4755 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4756 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4757 "ファーに追加しない。"
4758
4759 #. type: Plain text
4760 #: build/C/man3/getline.3:121
4761 msgid ""
4762 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4763 "read, including the delimiter character, but not including the terminating "
4764 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4765 "bytes in the line read."
4766 msgstr ""
4767 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4768 "字数には区切り文字は含まれるが、終端に使うヌルバイト (\\(aq\\e0\\(aq) は含ま"
4769 "れない。 この値によって、読み込んだ行に含まれるヌルバイトを操作することができ"
4770 "る。"
4771
4772 #. type: Plain text
4773 #: build/C/man3/getline.3:127
4774 msgid ""
4775 "Both functions return -1 on failure to read a line (including end-of-file "
4776 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4777 msgstr ""
4778 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4779 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4780 "を示す値が設定される。"
4781
4782 #. type: Plain text
4783 #: build/C/man3/getline.3:137
4784 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4785 msgstr ""
4786 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4787 "I<stream> が有効でない)。"
4788
4789 #. type: Plain text
4790 #: build/C/man3/getline.3:144
4791 msgid ""
4792 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4793 "were standardized in POSIX.1-2008."
4794 msgstr ""
4795 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4796 "POSIX.1-2008 で標準化された。"
4797
4798 #. type: Plain text
4799 #: build/C/man3/getline.3:149
4800 #, no-wrap
4801 msgid ""
4802 "#define _GNU_SOURCE\n"
4803 "#include E<lt>stdio.hE<gt>\n"
4804 "#include E<lt>stdlib.hE<gt>\n"
4805 msgstr ""
4806 "#define _GNU_SOURCE\n"
4807 "#include E<lt>stdio.hE<gt>\n"
4808 "#include E<lt>stdlib.hE<gt>\n"
4809
4810 #. type: Plain text
4811 #: build/C/man3/getline.3:157
4812 #, no-wrap
4813 msgid ""
4814 "int\n"
4815 "main(void)\n"
4816 "{\n"
4817 "    FILE *stream;\n"
4818 "    char *line = NULL;\n"
4819 "    size_t len = 0;\n"
4820 "    ssize_t read;\n"
4821 msgstr ""
4822 "int\n"
4823 "main(void)\n"
4824 "{\n"
4825 "    FILE *stream;\n"
4826 "    char *line = NULL;\n"
4827 "    size_t len = 0;\n"
4828 "    ssize_t read;\n"
4829
4830 #. type: Plain text
4831 #: build/C/man3/getline.3:161
4832 #, no-wrap
4833 msgid ""
4834 "    stream = fopen(\"/etc/motd\", \"r\");\n"
4835 "    if (stream == NULL)\n"
4836 "        exit(EXIT_FAILURE);\n"
4837 msgstr ""
4838 "    stream = fopen(\"/etc/motd\", \"r\");\n"
4839 "    if (stream == NULL)\n"
4840 "        exit(EXIT_FAILURE);\n"
4841
4842 #. type: Plain text
4843 #: build/C/man3/getline.3:166
4844 #, no-wrap
4845 msgid ""
4846 "    while ((read = getline(&line, &len, stream)) != -1) {\n"
4847 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4848 "        printf(\"%s\", line);\n"
4849 "    }\n"
4850 msgstr ""
4851 "    while ((read = getline(&line, &len, stream)) != -1) {\n"
4852 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4853 "        printf(\"%s\", line);\n"
4854 "    }\n"
4855
4856 #. type: Plain text
4857 #: build/C/man3/getline.3:171
4858 #, no-wrap
4859 msgid ""
4860 "    free(line);\n"
4861 "    fclose(stream);\n"
4862 "    exit(EXIT_SUCCESS);\n"
4863 "}\n"
4864 msgstr ""
4865 "    free(line);\n"
4866 "    fclose(stream);\n"
4867 "    exit(EXIT_SUCCESS);\n"
4868 "}\n"
4869
4870 #. type: Plain text
4871 #: build/C/man3/getline.3:178
4872 msgid "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
4873 msgstr "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
4874
4875 #. type: TH
4876 #: build/C/man3/gets.3:29
4877 #, no-wrap
4878 msgid "GETS"
4879 msgstr "GETS"
4880
4881 #. type: TH
4882 #: build/C/man3/gets.3:29
4883 #, no-wrap
4884 msgid "2014-01-24"
4885 msgstr "2014-01-24"
4886
4887 #. type: Plain text
4888 #: build/C/man3/gets.3:32
4889 msgid "gets - get a string from standard input (DEPRECATED)"
4890 msgstr "gets - 標準入力からの文字列を取得する (非推奨)"
4891
4892 #. type: Plain text
4893 #: build/C/man3/gets.3:37
4894 #, no-wrap
4895 msgid "B<char *gets(char *>I<s>B<);>\n"
4896 msgstr "B<char *gets(char *>I<s>B<);>\n"
4897
4898 #. type: Plain text
4899 #: build/C/man3/gets.3:40
4900 msgid "I<Never use this function>."
4901 msgstr "I<この関数は使用しないこと>。"
4902
4903 #. type: Plain text
4904 #: build/C/man3/gets.3:50
4905 msgid ""
4906 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4907 "until either a terminating newline or B<EOF>, which it replaces with a null "
4908 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4909 "below)."
4910 msgstr ""
4911 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4912 "すバッファーに格納する (末尾の改行文字や B<EOF> はヌルバイト (\\(aq"
4913 "\\e0\\(aq) に置き換えられる)。 バッファーオーバーランのチェックは行われない "
4914 "(下記の「バグ」を参照)。"
4915
4916 #. type: Plain text
4917 #: build/C/man3/gets.3:58
4918 msgid ""
4919 "B<gets>()  returns I<s> on success, and NULL on error or when end of file "
4920 "occurs while no characters have been read.  However, given the lack of "
4921 "buffer overrun checking, there can be no guarantees that the function will "
4922 "even return."
4923 msgstr ""
4924 "B<gets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのに"
4925 "ファイルの終わりになった 場合に NULL を返す。 しかし、バッファーの行き過ぎの"
4926 "チェックが行われないため、この関数が返るという保証はない。"
4927
4928 #. type: Plain text
4929 #: build/C/man3/gets.3:72
4930 msgid ""
4931 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4932 "C11 removes the specification of B<gets>()  from the C language, and since "
4933 "version 2.16, glibc header files don't expose the function declaration if "
4934 "the B<_ISOC11_SOURCE> feature test macro is defined."
4935 msgstr ""
4936 "LSB は B<gets>() を非推奨としている。\n"
4937 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4938 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4939 "glibc バージョン 2.16 以降では、機能検査マクロ B<_ISOC11_SOURCE> が定義され"
4940 "た\n"
4941 "場合、glibc ヘッダーファイルでは B<gets>)() の宣言が公開されない。"
4942
4943 #. type: Plain text
4944 #: build/C/man3/gets.3:86
4945 msgid ""
4946 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4947 "data in advance how many characters B<gets>()  will read, and because "
4948 "B<gets>()  will continue to store characters past the end of the buffer, it "
4949 "is extremely dangerous to use.  It has been used to break computer "
4950 "security.  Use B<fgets>()  instead."
4951 msgstr ""
4952 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4953 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファーの終わり"
4954 "を越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利"
4955 "用してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使う"
4956 "こと。"
4957
4958 #. type: Plain text
4959 #: build/C/man3/gets.3:90
4960 msgid ""
4961 "For more information, see CWE-242 (aka \"Use of Inherently Dangerous Function"
4962 "\") at http://cwe.mitre.org/data/definitions/242.html"
4963 msgstr ""
4964 "詳しい情報については、CWE-242 (別名 \"Use of Inherently Dangerous Function"
4965 "\" (「本質的に危険な関数を使う」)) を参照。 http://cwe.mitre.org/data/"
4966 "definitions/242.html で参照できる。"
4967
4968 #. type: Plain text
4969 #: build/C/man3/gets.3:108
4970 msgid ""
4971 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), "
4972 "B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), "
4973 "B<getline>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
4974 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4975 msgstr ""
4976 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), "
4977 "B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), "
4978 "B<getline>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
4979 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4980
4981 #. type: TH
4982 #: build/C/man3/getw.3:25
4983 #, no-wrap
4984 msgid "GETW"
4985 msgstr "GETW"
4986
4987 #. type: TH
4988 #: build/C/man3/getw.3:25
4989 #, no-wrap
4990 msgid "2010-09-26"
4991 msgstr "2010-09-26"
4992
4993 #. type: Plain text
4994 #: build/C/man3/getw.3:28
4995 msgid "getw, putw - input and output of words (ints)"
4996 msgstr "getw, putw - ワード(int)の入出力"
4997
4998 #. type: Plain text
4999 #: build/C/man3/getw.3:33
5000 #, no-wrap
5001 msgid "B<int getw(FILE *>I<stream>B<);>\n"
5002 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
5003
5004 #. type: Plain text
5005 #: build/C/man3/getw.3:35
5006 #, no-wrap
5007 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
5008 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
5009
5010 #. type: Plain text
5011 #: build/C/man3/getw.3:44
5012 msgid "B<getw>(), B<putw>():"
5013 msgstr "B<getw>(), B<putw>():"
5014
5015 #. type: TP
5016 #: build/C/man3/getw.3:47
5017 #, no-wrap
5018 msgid "Since glibc 2.3.3:"
5019 msgstr "glibc 2.3.3 以降:"
5020
5021 #. type: Plain text
5022 #: build/C/man3/getw.3:50
5023 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
5024 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
5025
5026 #. type: Plain text
5027 #: build/C/man3/getw.3:53
5028 #, no-wrap
5029 msgid ""
5030 "(_XOPEN_SOURCE &&\n"
5031 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
5032 msgstr ""
5033 "(_XOPEN_SOURCE &&\n"
5034 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
5035
5036 #. type: TP
5037 #: build/C/man3/getw.3:53
5038 #, no-wrap
5039 msgid "Before glibc 2.3.3:"
5040 msgstr "glibc 2.3.3 より前:"
5041
5042 #. type: Plain text
5043 #: build/C/man3/getw.3:56
5044 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
5045 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
5046
5047 #. type: Plain text
5048 #: build/C/man3/getw.3:66
5049 msgid ""
5050 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
5051 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
5052 msgstr ""
5053 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
5054 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
5055 "ことを勧める。"
5056
5057 #. type: Plain text
5058 #: build/C/man3/getw.3:73
5059 msgid ""
5060 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
5061 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
5062 "instead."
5063 msgstr ""
5064 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
5065 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
5066 "使用することを勧める。"
5067
5068 #. type: Plain text
5069 #: build/C/man3/getw.3:80
5070 msgid ""
5071 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
5072 "error, they return B<EOF>."
5073 msgstr ""
5074 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
5075 "が発生した場合、これらの関数は B<EOF> を返す。"
5076
5077 #. type: Plain text
5078 #: build/C/man3/getw.3:83
5079 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
5080 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
5081
5082 #. type: Plain text
5083 #: build/C/man3/getw.3:87
5084 msgid ""
5085 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
5086 "can be used to distinguish between the two cases."
5087 msgstr ""
5088 "エラーの時に返される値は、正しいデータとして返されることもある。 "
5089 "B<ferror>(3)  を用いると、この二つの場合を区別することが出来る。"
5090
5091 #. type: Plain text
5092 #: build/C/man3/getw.3:93
5093 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
5094 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
5095
5096 #. type: TH
5097 #: build/C/man2/link.2:32
5098 #, no-wrap
5099 msgid "LINK"
5100 msgstr "LINK"
5101
5102 #. type: Plain text
5103 #: build/C/man2/link.2:35
5104 msgid "link, linkat - make a new name for a file"
5105 msgstr "link, linkat - ファイルの新しい名前を作成する"
5106
5107 #. type: Plain text
5108 #: build/C/man2/link.2:38 build/C/man2/pipe.2:42 build/C/man2/read.2:41
5109 #: build/C/man2/readlink.2:50 build/C/man2/symlink.2:39
5110 #: build/C/man2/unlink.2:39
5111 #, no-wrap
5112 msgid "B<#include E<lt>unistd.hE<gt>>\n"
5113 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
5114
5115 #. type: Plain text
5116 #: build/C/man2/link.2:40
5117 #, no-wrap
5118 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
5119 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
5120
5121 #. type: Plain text
5122 #: build/C/man2/link.2:43 build/C/man2/readlink.2:56 build/C/man2/symlink.2:44
5123 #: build/C/man2/unlink.2:44
5124 #, no-wrap
5125 msgid ""
5126 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
5127 "B<#include E<lt>unistd.hE<gt>>\n"
5128 msgstr ""
5129 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
5130 "B<#include E<lt>unistd.hE<gt>>\n"
5131
5132 #. type: Plain text
5133 #: build/C/man2/link.2:46
5134 #, no-wrap
5135 msgid ""
5136 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
5137 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
5138 msgstr ""
5139 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
5140 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
5141
5142 #. type: Plain text
5143 #: build/C/man2/link.2:54
5144 msgid "B<linkat>():"
5145 msgstr "B<linkat>():"
5146
5147 #. type: Plain text
5148 #: build/C/man2/link.2:63 build/C/man2/open.2:85 build/C/man2/readlink.2:83
5149 #: build/C/man2/rename.2:69 build/C/man2/symlink.2:71 build/C/man2/unlink.2:63
5150 msgid "_ATFILE_SOURCE"
5151 msgstr "_ATFILE_SOURCE"
5152
5153 #. type: Plain text
5154 #: build/C/man2/link.2:69
5155 msgid ""
5156 "B<link>()  creates a new link (also known as a hard link) to an existing "
5157 "file."
5158 msgstr ""
5159 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
5160 "link) ともいう) を作成する。"
5161
5162 #. type: Plain text
5163 #: build/C/man2/link.2:75
5164 msgid "If I<newpath> exists, it will I<not> be overwritten."
5165 msgstr "I<newpath> が存在する場合には、上書きはI<されない>。"
5166
5167 #. type: Plain text
5168 #: build/C/man2/link.2:80
5169 msgid ""
5170 "This new name may be used exactly as the old one for any operation; both "
5171 "names refer to the same file (and so have the same permissions and "
5172 "ownership) and it is impossible to tell which name was the \"original\"."
5173 msgstr ""
5174 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
5175 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
5176 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
5177
5178 #. type: SS
5179 #: build/C/man2/link.2:80
5180 #, no-wrap
5181 msgid "linkat()"
5182 msgstr "linkat()"
5183
5184 #. type: Plain text
5185 #: build/C/man2/link.2:86
5186 msgid ""
5187 "The B<linkat>()  system call operates in exactly the same way as B<link>(), "
5188 "except for the differences described here."
5189 msgstr ""
5190 "B<linkat>() システムコールは B<link>() と全く同様に動作するが、以下で説明する"
5191 "点が異なる。"
5192
5193 #. type: Plain text
5194 #: build/C/man2/link.2:96
5195 msgid ""
5196 "If the pathname given in I<oldpath> is relative, then it is interpreted "
5197 "relative to the directory referred to by the file descriptor I<olddirfd> "
5198 "(rather than relative to the current working directory of the calling "
5199 "process, as is done by B<link>()  for a relative pathname)."
5200 msgstr ""
5201 "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリ"
5202 "プター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される "
5203 "(B<link>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
5204 "ワーキングディレクトリに対する相対パスではない)。"
5205
5206 #. type: Plain text
5207 #: build/C/man2/link.2:108
5208 msgid ""
5209 "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, "
5210 "then I<oldpath> is interpreted relative to the current working directory of "
5211 "the calling process (like B<link>())."
5212 msgstr ""
5213 "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 "
5214 "B<AT_FDCWD> の場合、 (B<link>(2) と同様に) I<oldpath> は呼び出したプロセスの"
5215 "カレントワーキングディレクトリに対する相対パスと解釈される。"
5216
5217 #. type: Plain text
5218 #: build/C/man2/link.2:114 build/C/man2/rename.2:158
5219 msgid "If I<oldpath> is absolute, then I<olddirfd> is ignored."
5220 msgstr ""
5221 "I<oldpath> で指定されたパス名が絶対パスの場合、 I<olddirfd> は無視される。"
5222
5223 #. type: Plain text
5224 #: build/C/man2/link.2:122 build/C/man2/rename.2:166
5225 msgid ""
5226 "The interpretation of I<newpath> is as for I<oldpath>, except that a "
5227 "relative pathname is interpreted relative to the directory referred to by "
5228 "the file descriptor I<newdirfd>."
5229 msgstr ""
5230 "I<newpath> の解釈は I<oldpath> と同じである。 相対パスのパス名がファイルディ"
5231 "スクリプター I<newdirfd> が参照するディレクトリと解釈される点だけが異なる。"
5232
5233 #. type: Plain text
5234 #: build/C/man2/link.2:125
5235 msgid "The following values can be bitwise ORed in I<flags>:"
5236 msgstr "以下の値のビット単位の論理和を I<flags> に指定できる。"
5237
5238 #. type: TP
5239 #: build/C/man2/link.2:125
5240 #, no-wrap
5241 msgid "B<AT_EMPTY_PATH> (since Linux 2.6.39)"
5242 msgstr "B<AT_EMPTY_PATH> (Linux 2.6.39 以降)"
5243
5244 #.  commit 11a7b371b64ef39fc5fb1b6f2218eef7c4d035e3
5245 #.  Before glibc 2.16, defining _ATFILE_SOURCE sufficed
5246 #. type: Plain text
5247 #: build/C/man2/link.2:152
5248 msgid ""
5249 "If I<oldpath> is an empty string, create a link to the file referenced by "
5250 "I<olddirfd> (which may have been obtained using the B<open>(2)  B<O_PATH> "
5251 "flag).  In this case, I<olddirfd> can refer to any type of file, not just a "
5252 "directory.  This will generally not work if the file has a link count of "
5253 "zero (files created with B<O_TMPFILE> and without B<O_EXCL> are an "
5254 "exception).  The caller must have the B<CAP_DAC_READ_SEARCH> capability in "
5255 "order to use this flag.  This flag is Linux-specific; define B<_GNU_SOURCE> "
5256 "to obtain its definition."
5257 msgstr ""
5258 "I<oldpath> が空文字列の場合、 I<olddirfd> が参照するファイルへのリンクを作成"
5259 "する (I<olddirfd> は B<open>(2) の B<O_PATH> フラグを使って取得する)。 この場"
5260 "合、 I<olddirfd> はディレクトリ以外の任意の型のファイルを参照することができ"
5261 "る。 一般的には、 ファイルのリンクカウントが 0 の場合は、この操作は成功しな"
5262 "い (ただし、 B<O_TMPFILE> が指定され B<O_EXCL> を指定せずに作成されたファイル"
5263 "は例外である)。 このフラグを使用するためには、 呼び出し元は "
5264 "B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなければならない。 このフラグ"
5265 "は Linux 固有で、 この定義を得るには B<_GNU_SOURCE> を定義すること。"
5266
5267 #. type: TP
5268 #: build/C/man2/link.2:152
5269 #, no-wrap
5270 msgid "B<AT_SYMLINK_FOLLOW> (since Linux 2.6.18)"
5271 msgstr "B<AT_SYMLINK_FOLLOW> (Linux 2.6.18 以降)"
5272
5273 #. type: Plain text
5274 #: build/C/man2/link.2:171
5275 msgid ""
5276 "By default, B<linkat>(), does not dereference I<oldpath> if it is a symbolic "
5277 "link (like B<link>()).  The flag B<AT_SYMLINK_FOLLOW> can be specified in "
5278 "I<flags> to cause I<oldpath> to be dereferenced if it is a symbolic link.  "
5279 "If procfs is mounted, this can be used as an alternative to "
5280 "B<AT_EMPTY_PATH>, like this:"
5281 msgstr ""
5282 "B<linkat>() は (B<link>() 同様) デフォルトでは I<oldpath> がシンボリックリン"
5283 "クの場合リンクの展開を行わない。 フラグ B<AT_SYMLINK_FOLLOW> を I<flags> に指"
5284 "定することができ、指定した場合 I<oldpath> がシンボリックリンクの場合リンクの"
5285 "展開が行われる。 procfs がマウントされている場合、これは B<AT_EMPTY_PATH> の"
5286 "代替として以下のように使うことができる。"
5287
5288 #. type: Plain text
5289 #: build/C/man2/link.2:176
5290 #, no-wrap
5291 msgid ""
5292 "linkat(AT_FDCWD, \"/proc/self/fd/E<lt>fdE<gt>\", newdirfd,\n"
5293 "       newname, AT_SYMLINK_FOLLOW);\n"
5294 msgstr ""
5295 "linkat(AT_FDCWD, \"/proc/self/fd/E<lt>fdE<gt>\", newdirfd,\n"
5296 "       newname, AT_SYMLINK_FOLLOW);\n"
5297
5298 #. type: Plain text
5299 #: build/C/man2/link.2:182
5300 msgid ""
5301 "Before kernel 2.6.18, the I<flags> argument was unused, and had to be "
5302 "specified as 0."
5303 msgstr ""
5304 "カーネル 2.6.18 より前では、 I<flags> 引き数は未使用で、 0 を指定しなければな"
5305 "らなかった。"
5306
5307 #. type: Plain text
5308 #: build/C/man2/link.2:187
5309 msgid "See B<openat>(2)  for an explanation of the need for B<linkat>()."
5310 msgstr "B<linkat>() の必要性についての説明については B<openat>(2) を参照。"
5311
5312 #. type: Plain text
5313 #: build/C/man2/link.2:192 build/C/man2/pipe.2:138 build/C/man3/remove.3:65
5314 #: build/C/man2/rename.2:208 build/C/man2/rmdir.2:45
5315 #: build/C/man2/symlink.2:145 build/C/man2/unlink.2:158
5316 msgid ""
5317 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5318 "appropriately."
5319 msgstr ""
5320 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
5321 "定される。"
5322
5323 #. type: TP
5324 #: build/C/man2/link.2:193 build/C/man2/open.2:789 build/C/man2/readlink.2:160
5325 #: build/C/man2/rename.2:209 build/C/man2/rmdir.2:46
5326 #: build/C/man2/symlink.2:146 build/C/man3/tmpfile.3:57
5327 #: build/C/man2/unlink.2:159
5328 #, no-wrap
5329 msgid "B<EACCES>"
5330 msgstr "B<EACCES>"
5331
5332 #. type: Plain text
5333 #: build/C/man2/link.2:204
5334 msgid ""
5335 "Write access to the directory containing I<newpath> is denied, or search "
5336 "permission is denied for one of the directories in the path prefix of "
5337 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
5338 msgstr ""
5339 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
5340 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
5341 "(B<path_resolution>(7)  を参照)。"
5342
5343 #. type: TP
5344 #: build/C/man2/link.2:204 build/C/man2/open.2:798 build/C/man2/rename.2:245
5345 #: build/C/man2/symlink.2:155 build/C/man2/write.2:135
5346 #, no-wrap
5347 msgid "B<EDQUOT>"
5348 msgstr "B<EDQUOT>"
5349
5350 #. type: Plain text
5351 #: build/C/man2/link.2:207 build/C/man2/rename.2:248
5352 msgid "The user's quota of disk blocks on the filesystem has been exhausted."
5353 msgstr ""
5354 "ディスクブロックか inode がそのファイルシステムのユーザークォータに達してい"
5355 "た。"
5356
5357 #. type: TP
5358 #: build/C/man2/link.2:207 build/C/man2/open.2:804 build/C/man2/rename.2:368
5359 #: build/C/man2/symlink.2:160 build/C/man3/tmpfile.3:60
5360 #, no-wrap
5361 msgid "B<EEXIST>"
5362 msgstr "B<EEXIST>"
5363
5364 #. type: Plain text
5365 #: build/C/man2/link.2:211
5366 msgid "I<newpath> already exists."
5367 msgstr "I<newpath> が既に存在する。"
5368
5369 #. type: TP
5370 #: build/C/man2/link.2:211 build/C/man2/llseek.2:74 build/C/man2/open.2:810
5371 #: build/C/man2/open_by_handle_at.2:266 build/C/man2/open_by_handle_at.2:321
5372 #: build/C/man2/pipe.2:139 build/C/man2/read.2:118 build/C/man2/readlink.2:165
5373 #: build/C/man2/rename.2:248 build/C/man2/rmdir.2:64
5374 #: build/C/man2/symlink.2:164 build/C/man2/unlink.2:178
5375 #: build/C/man2/write.2:141
5376 #, no-wrap
5377 msgid "B<EFAULT>"
5378 msgstr "B<EFAULT>"
5379
5380 #. type: Plain text
5381 #: build/C/man2/link.2:214 build/C/man2/rename.2:251
5382 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5383 msgstr ""
5384 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5385
5386 #. type: TP
5387 #: build/C/man2/link.2:214 build/C/man2/read.2:147 build/C/man2/readlink.2:181
5388 #: build/C/man2/symlink.2:167 build/C/man2/unlink.2:182
5389 #: build/C/man2/write.2:165
5390 #, no-wrap
5391 msgid "B<EIO>"
5392 msgstr "B<EIO>"
5393
5394 #. type: Plain text
5395 #: build/C/man2/link.2:217 build/C/man2/symlink.2:170
5396 #: build/C/man2/unlink.2:185
5397 msgid "An I/O error occurred."
5398 msgstr "I/O エラーが発生した。"
5399
5400 #. type: TP
5401 #: build/C/man2/link.2:217 build/C/man2/open.2:871 build/C/man2/open.2:875
5402 #: build/C/man2/open_by_handle_at.2:331 build/C/man2/readlink.2:184
5403 #: build/C/man2/rename.2:261 build/C/man2/rmdir.2:73
5404 #: build/C/man2/symlink.2:170 build/C/man2/unlink.2:190
5405 #, no-wrap
5406 msgid "B<ELOOP>"
5407 msgstr "B<ELOOP>"
5408
5409 #. type: Plain text
5410 #: build/C/man2/link.2:221 build/C/man2/rename.2:265
5411 msgid ""
5412 "Too many symbolic links were encountered in resolving I<oldpath> or "
5413 "I<newpath>."
5414 msgstr ""
5415 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5416 "る。"
5417
5418 #. type: TP
5419 #: build/C/man2/link.2:221 build/C/man2/rename.2:265
5420 #, no-wrap
5421 msgid "B<EMLINK>"
5422 msgstr "B<EMLINK>"
5423
5424 #. type: Plain text
5425 #: build/C/man2/link.2:226
5426 msgid ""
5427 "The file referred to by I<oldpath> already has the maximum number of links "
5428 "to it."
5429 msgstr ""
5430 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5431
5432 #. type: TP
5433 #: build/C/man2/link.2:226 build/C/man2/open.2:891 build/C/man2/readlink.2:187
5434 #: build/C/man2/rename.2:272 build/C/man2/rmdir.2:77
5435 #: build/C/man2/symlink.2:174 build/C/man2/unlink.2:194
5436 #, no-wrap
5437 msgid "B<ENAMETOOLONG>"
5438 msgstr "B<ENAMETOOLONG>"
5439
5440 #. type: Plain text
5441 #: build/C/man2/link.2:229 build/C/man2/rename.2:275
5442 msgid "I<oldpath> or I<newpath> was too long."
5443 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5444
5445 #. type: TP
5446 #: build/C/man2/link.2:229 build/C/man2/link.2:286 build/C/man2/link.2:294
5447 #: build/C/man2/link.2:304 build/C/man2/open.2:905 build/C/man2/open.2:912
5448 #: build/C/man2/open_by_handle_at.2:282 build/C/man2/readlink.2:190
5449 #: build/C/man2/rename.2:275 build/C/man2/rename.2:389 build/C/man2/rmdir.2:80
5450 #: build/C/man2/symlink.2:177 build/C/man2/symlink.2:212
5451 #: build/C/man2/unlink.2:197
5452 #, no-wrap
5453 msgid "B<ENOENT>"
5454 msgstr "B<ENOENT>"
5455
5456 #. type: Plain text
5457 #: build/C/man2/link.2:234
5458 msgid ""
5459 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5460 "dangling symbolic link."
5461 msgstr ""
5462 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5463 "(dangling)シンボリックリンクである。"
5464
5465 #. type: TP
5466 #: build/C/man2/link.2:234 build/C/man2/open.2:926 build/C/man2/readlink.2:193
5467 #: build/C/man2/rename.2:288 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5468 #: build/C/man2/symlink.2:184 build/C/man3/tempnam.3:102
5469 #: build/C/man2/unlink.2:204
5470 #, no-wrap
5471 msgid "B<ENOMEM>"
5472 msgstr "B<ENOMEM>"
5473
5474 #. type: Plain text
5475 #: build/C/man2/link.2:237 build/C/man2/open.2:929 build/C/man2/readlink.2:196
5476 #: build/C/man2/rename.2:291 build/C/man2/rmdir.2:88
5477 #: build/C/man2/symlink.2:187 build/C/man2/unlink.2:207
5478 msgid "Insufficient kernel memory was available."
5479 msgstr "十分なカーネルメモリーがない。"
5480
5481 #. type: TP
5482 #: build/C/man2/link.2:237 build/C/man2/open.2:929 build/C/man2/rename.2:291
5483 #: build/C/man2/symlink.2:187 build/C/man3/tmpfile.3:72
5484 #: build/C/man2/write.2:168
5485 #, no-wrap
5486 msgid "B<ENOSPC>"
5487 msgstr "B<ENOSPC>"
5488
5489 #. type: Plain text
5490 #: build/C/man2/link.2:241 build/C/man2/rename.2:295
5491 #: build/C/man2/symlink.2:191
5492 msgid "The device containing the file has no room for the new directory entry."
5493 msgstr ""
5494 "そのファイルを含んでいるデバイスに新しいディレクトリエントリーを 作成するため"
5495 "の空きがない。"
5496
5497 #. type: TP
5498 #: build/C/man2/link.2:241 build/C/man2/link.2:315 build/C/man2/open.2:935
5499 #: build/C/man2/open.2:1010 build/C/man2/open_by_handle_at.2:289
5500 #: build/C/man2/readlink.2:196 build/C/man2/readlink.2:206
5501 #: build/C/man2/rename.2:295 build/C/man2/rename.2:355 build/C/man2/rmdir.2:88
5502 #: build/C/man2/symlink.2:191 build/C/man2/symlink.2:218
5503 #: build/C/man2/unlink.2:207 build/C/man2/unlink.2:263
5504 #, no-wrap
5505 msgid "B<ENOTDIR>"
5506 msgstr "B<ENOTDIR>"
5507
5508 #. type: Plain text
5509 #: build/C/man2/link.2:246
5510 msgid ""
5511 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5512 "a directory."
5513 msgstr ""
5514 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5515 "い。"
5516
5517 #. type: TP
5518 #: build/C/man2/link.2:246 build/C/man2/link.2:250 build/C/man2/link.2:325
5519 #: build/C/man2/open.2:974 build/C/man2/open.2:982
5520 #: build/C/man2/open_by_handle_at.2:338 build/C/man2/rmdir.2:107
5521 #: build/C/man2/rmdir.2:118 build/C/man2/symlink.2:196
5522 #: build/C/man2/unlink.2:212 build/C/man2/write.2:173
5523 #, no-wrap
5524 msgid "B<EPERM>"
5525 msgstr "B<EPERM>"
5526
5527 #. type: Plain text
5528 #: build/C/man2/link.2:250
5529 msgid "I<oldpath> is a directory."
5530 msgstr "I<oldpath> がディレクトリである。"
5531
5532 #. type: Plain text
5533 #: build/C/man2/link.2:255
5534 msgid ""
5535 "The filesystem containing I<oldpath> and I<newpath> does not support the "
5536 "creation of hard links."
5537 msgstr ""
5538 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5539 "していない。"
5540
5541 #. type: TP
5542 #: build/C/man2/link.2:255
5543 #, no-wrap
5544 msgid "B<EPERM> (since Linux 3.6)"
5545 msgstr "B<EPERM> (Linux 3.6 以降)"
5546
5547 #. type: Plain text
5548 #: build/C/man2/link.2:262
5549 msgid ""
5550 "The caller does not have permission to create a hard link to this file (see "
5551 "the description of I</proc/sys/fs/protected_hardlinks> in B<proc>(5))."
5552 msgstr ""
5553 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5554 "の I</proc/sys/fs/protected_hardlinks> の説明を参照)。"
5555
5556 #. type: TP
5557 #: build/C/man2/link.2:262 build/C/man2/open.2:986 build/C/man2/rename.2:333
5558 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:201
5559 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:235
5560 #, no-wrap
5561 msgid "B<EROFS>"
5562 msgstr "B<EROFS>"
5563
5564 #. type: Plain text
5565 #: build/C/man2/link.2:265 build/C/man2/rename.2:336
5566 msgid "The file is on a read-only filesystem."
5567 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5568
5569 #. type: TP
5570 #: build/C/man2/link.2:265 build/C/man2/rename.2:336
5571 #, no-wrap
5572 msgid "B<EXDEV>"
5573 msgstr "B<EXDEV>"
5574
5575 #. type: Plain text
5576 #: build/C/man2/link.2:273
5577 msgid ""
5578 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
5579 "permits a filesystem to be mounted at multiple points, but B<link>()  does "
5580 "not work across different mount points, even if the same filesystem is "
5581 "mounted on both.)"
5582 msgstr ""
5583 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5584 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5585 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5586 "のマウント位置を跨いでは動作しない。)"
5587
5588 #. type: Plain text
5589 #: build/C/man2/link.2:276
5590 msgid "The following additional errors can occur for B<linkat>():"
5591 msgstr "B<linkat>() では以下のエラーも発生する。"
5592
5593 #. type: Plain text
5594 #: build/C/man2/link.2:282 build/C/man2/rename.2:355
5595 msgid "I<olddirfd> or I<newdirfd> is not a valid file descriptor."
5596 msgstr "I<olddirfd> か I<newdirfd> が有効なファイルディスクリプターでない。"
5597
5598 #. type: Plain text
5599 #: build/C/man2/link.2:286 build/C/man2/unlink.2:256
5600 msgid "An invalid flag value was specified in I<flags>."
5601 msgstr "無効なフラグ値が I<flags> に指定された。"
5602
5603 #. type: Plain text
5604 #: build/C/man2/link.2:294
5605 msgid ""
5606 "B<AT_EMPTY_PATH> was specified in I<flags>, but the caller did not have the "
5607 "B<CAP_DAC_READ_SEARCH> capability."
5608 msgstr ""
5609 "B<AT_EMPTY_PATH> が I<flags> に指定されたが、呼び出し元が "
5610 "B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなかった。"
5611
5612 #. type: Plain text
5613 #: build/C/man2/link.2:299
5614 msgid ""
5615 "An attempt was made to link to the I</proc/self/fd/NN> file corresponding to "
5616 "a file descriptor created with"
5617 msgstr ""
5618 "以下の呼び出しで作成されたファイルディスクリプターに対応する I</proc/self/fd/"
5619 "NN> ファイルに対してリンクを行おおうとした。"
5620
5621 #. type: Plain text
5622 #: build/C/man2/link.2:301
5623 #, no-wrap
5624 msgid "    open(path, O_TMPFILE | O_EXCL, mode);\n"
5625 msgstr "    open(path, O_TMPFILE | O_EXCL, mode);\n"
5626
5627 #. type: Plain text
5628 #: build/C/man2/link.2:304
5629 msgid "See B<open>(2)."
5630 msgstr "B<open>(2) 参照。"
5631
5632 #. type: Plain text
5633 #: build/C/man2/link.2:315
5634 msgid ""
5635 "I<oldpath> is a relative pathname and I<olddirfd> refers to a directory that "
5636 "has been deleted, or I<newpath> is a relative pathname and I<newdirfd> "
5637 "refers to a directory that has been deleted."
5638 msgstr ""
5639 "I<oldpath> が相対パス名で、 I<olddirfd> が削除されたディレクトリを参照してい"
5640 "る。 または、 I<newpath> が相対パス名で、 I<newdirfd> が削除されたディレクト"
5641 "リを参照している。"
5642
5643 #. type: Plain text
5644 #: build/C/man2/link.2:325 build/C/man2/rename.2:365
5645 msgid ""
5646 "I<oldpath> is relative and I<olddirfd> is a file descriptor referring to a "
5647 "file other than a directory; or similar for I<newpath> and I<newdirfd>"
5648 msgstr ""
5649 "I<oldpath> が相対パスで、 I<olddirfd> がディレクトリ以外のファイルを参照して"
5650 "いる。または I<newpath> と I<newdirfd> に関して同じ状況である。"
5651
5652 #. type: Plain text
5653 #: build/C/man2/link.2:334
5654 msgid ""
5655 "B<AT_EMPTY_PATH> was specified in I<flags>, I<oldpath> is an empty string, "
5656 "and I<olddirfd> refers to a directory."
5657 msgstr ""
5658 "I<flags> に B<AT_EMPTY_PATH> が指定され、 I<oldpath> が空文字列で、 "
5659 "I<olddirfd> がディレクトリを参照している。"
5660
5661 #. type: Plain text
5662 #: build/C/man2/link.2:338
5663 msgid ""
5664 "B<linkat>()  was added to Linux in kernel 2.6.16; library support was added "
5665 "to glibc in version 2.4."
5666 msgstr ""
5667 "B<linkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポー"
5668 "トはバージョン 2.4 で glibc に追加された。"
5669
5670 #.  SVr4 documents additional ENOLINK and
5671 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5672 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5673 #. type: Plain text
5674 #: build/C/man2/link.2:344
5675 msgid "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES), POSIX.1-2008."
5676 msgstr ""
5677 "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照), POSIX.1-2008."
5678
5679 #. type: Plain text
5680 #: build/C/man2/link.2:347
5681 msgid "B<linkat>(): POSIX.1-2008."
5682 msgstr "B<linkat>(): POSIX.1-2008."
5683
5684 #. type: Plain text
5685 #: build/C/man2/link.2:354
5686 msgid ""
5687 "Hard links, as created by B<link>(), cannot span filesystems.  Use "
5688 "B<symlink>(2)  if this is required."
5689 msgstr ""
5690 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5691 "このような場合は B<symlink>(2)  を使用すること。"
5692
5693 #.  more precisely: since kernel 1.3.56
5694 #.  For example, the default Solaris compilation environment
5695 #.  behaves like Linux, and contributors to a March 2005
5696 #.  thread in the Austin mailing list reported that some
5697 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5698 #. type: Plain text
5699 #: build/C/man2/link.2:385
5700 msgid ""
5701 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5702 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5703 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5704 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5705 "the same file that I<oldpath> refers to).  Some other implementations behave "
5706 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5707 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5708 "dereferenced if it is a symbolic link.  For precise control over the "
5709 "treatment of symbolic links when creating a link, use B<linkat>(2)."
5710 msgstr ""
5711 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5712 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5713 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5714 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5715 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5716 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5717 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5718 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5719 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御を行う場合"
5720 "には B<linkat>(2) を使用すること。"
5721
5722 #. type: Plain text
5723 #: build/C/man2/link.2:405
5724 msgid ""
5725 "On older kernels where B<linkat>()  is unavailable, the glibc wrapper "
5726 "function falls back to the use of B<link>(), unless the B<AT_SYMLINK_FOLLOW> "
5727 "is specified.  When I<oldpath> and I<newpath> are relative pathnames, glibc "
5728 "constructs pathnames based on the symbolic links in I</proc/self/fd> that "
5729 "correspond to the I<olddirfd> and I<newdirfd> arguments."
5730 msgstr ""
5731 "B<linkat>() が利用できない古いカーネルでは、 B<AT_SYMLINK_FOLLOW> が指定され"
5732 "ていない場合、 glibc ラッパー関数は B<link>() を使用するモードにフォールバッ"
5733 "クする。 I<oldpath> と I<newpath> が相対パスの場合、 glibc は I<olddirfd> と "
5734 "I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいて"
5735 "それぞれパス名を構成する。"
5736
5737 #. type: Plain text
5738 #: build/C/man2/link.2:411
5739 msgid ""
5740 "On NFS filesystems, the return code may be wrong in case the NFS server "
5741 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5742 "to find out if the link got created."
5743 msgstr ""
5744 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5745 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5746 "ためには B<stat>(2)  を使用すること。"
5747
5748 #. type: Plain text
5749 #: build/C/man2/link.2:420
5750 msgid ""
5751 "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), "
5752 "B<path_resolution>(7), B<symlink>(7)"
5753 msgstr ""
5754 "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), "
5755 "B<path_resolution>(7), B<symlink>(7)"
5756
5757 #. type: TH
5758 #: build/C/man2/llseek.2:28
5759 #, no-wrap
5760 msgid "LLSEEK"
5761 msgstr "LLSEEK"
5762
5763 #. type: TH
5764 #: build/C/man2/llseek.2:28
5765 #, no-wrap
5766 msgid "2012-07-13"
5767 msgstr "2012-07-13"
5768
5769 #. type: Plain text
5770 #: build/C/man2/llseek.2:31
5771 msgid "_llseek - reposition read/write file offset"
5772 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5773
5774 #. type: Plain text
5775 #: build/C/man2/llseek.2:35
5776 #, no-wrap
5777 msgid ""
5778 "B<#include E<lt>sys/types.hE<gt>>\n"
5779 "B<#include E<lt>unistd.hE<gt>>\n"
5780 msgstr ""
5781 "B<#include E<lt>sys/types.hE<gt>>\n"
5782 "B<#include E<lt>unistd.hE<gt>>\n"
5783
5784 #. type: Plain text
5785 #: build/C/man2/llseek.2:39
5786 #, no-wrap
5787 msgid ""
5788 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5789 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5790 "B<            unsigned int >I<whence>B<);>\n"
5791 msgstr ""
5792 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5793 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5794 "B<            unsigned int >I<whence>B<);>\n"
5795
5796 #. type: Plain text
5797 #: build/C/man2/llseek.2:43
5798 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5799 msgstr ""
5800 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5801 "を参照。"
5802
5803 #. type: Plain text
5804 #: build/C/man2/llseek.2:62
5805 msgid ""
5806 "The B<_llseek>()  function repositions the offset of the open file "
5807 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5808 "offset_low> bytes relative to the beginning of the file, the current "
5809 "position in the file, or the end of the file, depending on whether I<whence> "
5810 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5811 "resulting file position in the argument I<result>."
5812 msgstr ""
5813 "B<_llseek>()  関数は、ファイルディスクリプター (descriptor)  I<fd> に関連づけ"
5814 "られたオープンされたファイルのオフセットの位置を、相対的に "
5815 "I<(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置"
5816 "を表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5817 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5818 "のファイル位置を I<result> 引き数に返す。"
5819
5820 #. type: Plain text
5821 #: build/C/man2/llseek.2:69
5822 msgid ""
5823 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5824 "-1 is returned and I<errno> is set to indicate the error."
5825 msgstr ""
5826 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5827 "エラーを示す I<errno> が設定される。"
5828
5829 #. type: Plain text
5830 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:192
5831 msgid "I<fd> is not an open file descriptor."
5832 msgstr "I<fd> がオープンされたファイルディスクリプターでない。"
5833
5834 #. type: Plain text
5835 #: build/C/man2/llseek.2:77
5836 msgid "Problem with copying results to user space."
5837 msgstr "結果をユーザー空間にコピーするときに問題があった。"
5838
5839 #. type: Plain text
5840 #: build/C/man2/llseek.2:81
5841 msgid "I<whence> is invalid."
5842 msgstr "I<whence> が不正である。"
5843
5844 #. type: Plain text
5845 #: build/C/man2/llseek.2:84
5846 msgid ""
5847 "This function is Linux-specific, and should not be used in programs intended "
5848 "to be portable."
5849 msgstr ""
5850 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5851
5852 #. type: Plain text
5853 #: build/C/man2/llseek.2:87
5854 msgid ""
5855 "Glibc does not provide a wrapper for this system call; call it using "
5856 "B<syscall>(2)."
5857 msgstr ""
5858 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
5859 "B<syscall>(2)  を使って呼び出すこと。"
5860
5861 #. type: Plain text
5862 #: build/C/man2/llseek.2:90
5863 msgid "B<lseek>(2), B<lseek64>(3)"
5864 msgstr "B<lseek>(2), B<lseek64>(3)"
5865
5866 #. type: TH
5867 #: build/C/man2/lseek.2:47
5868 #, no-wrap
5869 msgid "LSEEK"
5870 msgstr "LSEEK"
5871
5872 #. type: TH
5873 #: build/C/man2/lseek.2:47 build/C/man2/open_by_handle_at.2:25
5874 #, no-wrap
5875 msgid "2014-06-13"
5876 msgstr "2014-06-13"
5877
5878 #. type: Plain text
5879 #: build/C/man2/lseek.2:50
5880 msgid "lseek - reposition read/write file offset"
5881 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5882
5883 #. type: Plain text
5884 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5885 msgid "B<#include E<lt>sys/types.hE<gt>>"
5886 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5887
5888 #. type: Plain text
5889 #: build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34 build/C/man2/rmdir.2:35
5890 #: build/C/man2/write.2:44
5891 msgid "B<#include E<lt>unistd.hE<gt>>"
5892 msgstr "B<#include E<lt>unistd.hE<gt>>"
5893
5894 #. type: Plain text
5895 #: build/C/man2/lseek.2:56
5896 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5897 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5898
5899 #. type: Plain text
5900 #: build/C/man2/lseek.2:67
5901 msgid ""
5902 "The B<lseek>()  function repositions the offset of the open file associated "
5903 "with the file descriptor I<fd> to the argument I<offset> according to the "
5904 "directive I<whence> as follows:"
5905 msgstr ""
5906 "B<lseek>()  関数は、ファイルディスクリプター (descriptor)  I<fd> に対応する"
5907 "オープンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の"
5908 "位置へ以下のように変更する:"
5909
5910 #. type: Plain text
5911 #: build/C/man2/lseek.2:72
5912 msgid "The offset is set to I<offset> bytes."
5913 msgstr "オフセットは I<offset> バイトに設定される。"
5914
5915 #. type: Plain text
5916 #: build/C/man2/lseek.2:77
5917 msgid "The offset is set to its current location plus I<offset> bytes."
5918 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5919
5920 #. type: Plain text
5921 #: build/C/man2/lseek.2:82
5922 msgid "The offset is set to the size of the file plus I<offset> bytes."
5923 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5924
5925 #. type: Plain text
5926 #: build/C/man2/lseek.2:90
5927 msgid ""
5928 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5929 "the file (but this does not change the size of the file).  If data is later "
5930 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5931 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5932 "gap."
5933 msgstr ""
5934 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5935 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5936 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5937 "実際にそこにデータを書き込まれるまではヌルバイト (\\(aq\\e0\\(aq) の列が返さ"
5938 "れる。"
5939
5940 #. type: SS
5941 #: build/C/man2/lseek.2:90
5942 #, no-wrap
5943 msgid "Seeking file data and holes"
5944 msgstr "ファイルのデータとホールの探索"
5945
5946 #. type: Plain text
5947 #: build/C/man2/lseek.2:93
5948 msgid ""
5949 "Since version 3.1, Linux supports the following additional values for "
5950 "I<whence>:"
5951 msgstr ""
5952 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5953
5954 #. type: TP
5955 #: build/C/man2/lseek.2:93
5956 #, no-wrap
5957 msgid "B<SEEK_DATA>"
5958 msgstr "B<SEEK_DATA>"
5959
5960 #. type: Plain text
5961 #: build/C/man2/lseek.2:104
5962 msgid ""
5963 "Adjust the file offset to the next location in the file greater than or "
5964 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5965 "file offset is set to I<offset>."
5966 msgstr ""
5967 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5968 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5969 "定される。"
5970
5971 #. type: TP
5972 #: build/C/man2/lseek.2:104
5973 #, no-wrap
5974 msgid "B<SEEK_HOLE>"
5975 msgstr "B<SEEK_HOLE>"
5976
5977 #. type: Plain text
5978 #: build/C/man2/lseek.2:118
5979 msgid ""
5980 "Adjust the file offset to the next hole in the file greater than or equal to "
5981 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5982 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5983 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5984 "hole at the end of any file)."
5985 msgstr ""
5986 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5987 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5988 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5989 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5990 "だ)。"
5991
5992 #. type: Plain text
5993 #: build/C/man2/lseek.2:124
5994 msgid ""
5995 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5996 "end of the file."
5997 msgstr ""
5998 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5999 "B<lseek>() は失敗する。"
6000
6001 #. type: Plain text
6002 #: build/C/man2/lseek.2:130
6003 msgid ""
6004 "These operations allow applications to map holes in a sparsely allocated "
6005 "file.  This can be useful for applications such as file backup tools, which "
6006 "can save space when creating backups and preserve holes, if they have a "
6007 "mechanism for discovering holes."
6008 msgstr ""
6009 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
6010 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
6011 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
6012 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
6013 "約し、ホールを保持することができる。"
6014
6015 #.  https://lkml.org/lkml/2011/4/22/79
6016 #.  http://lwn.net/Articles/440255/
6017 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
6018 #. type: Plain text
6019 #: build/C/man2/lseek.2:153
6020 msgid ""
6021 "For the purposes of these operations, a hole is a sequence of zeros that "
6022 "(normally) has not been allocated in the underlying file storage.  However, "
6023 "a filesystem is not obliged to report holes, so these operations are not a "
6024 "guaranteed mechanism for mapping the storage space actually allocated to a "
6025 "file.  (Furthermore, a sequence of zeros that actually has been written to "
6026 "the underlying storage may not be reported as a hole.)  In the simplest "
6027 "implementation, a filesystem can support the operations by making "
6028 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
6029 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
6030 "by I<offset> is a hole, it can be considered to consist of data that is a "
6031 "sequence of zeros)."
6032 msgstr ""
6033 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
6034 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
6035 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
6036 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
6037 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
6038 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
6039 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
6040 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
6041 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
6042 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
6043 "ということである)。"
6044
6045 #. type: Plain text
6046 #: build/C/man2/lseek.2:162
6047 msgid ""
6048 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
6049 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
6050 msgstr ""
6051 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
6052 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
6053
6054 #. type: Plain text
6055 #: build/C/man2/lseek.2:168
6056 msgid ""
6057 "The B<SEEK_HOLE> and B<SEEK_DATA> operations are supported for the following "
6058 "filesystems:"
6059 msgstr ""
6060 "B<SEEK_HOLE>, B<SEEK_DATA> 操作に対応しているのは以下のファイルシステムであ"
6061 "る。"
6062
6063 #. type: Plain text
6064 #: build/C/man2/lseek.2:170
6065 msgid "Btrfs (since Linux 3.1)"
6066 msgstr "Btrfs (Linux 3.1 以降)"
6067
6068 #.  commit 93862d5e1ab875664c6cc95254fc365028a48bb1
6069 #. type: Plain text
6070 #: build/C/man2/lseek.2:173
6071 msgid "OCFS (since Linux 3.2)"
6072 msgstr "OCFS (Linux 3.2 以降)"
6073
6074 #. type: Plain text
6075 #: build/C/man2/lseek.2:175
6076 msgid "XFS (since Linux 3.5)"
6077 msgstr "XFS (Linux 3.5 以降)"
6078
6079 #. type: Plain text
6080 #: build/C/man2/lseek.2:177
6081 msgid "ext4 (since Linux 3.8)"
6082 msgstr "ext4 (Linux 3.8 以降)"
6083
6084 #. type: Plain text
6085 #: build/C/man2/lseek.2:179
6086 msgid "tmpfs (since Linux 3.8)"
6087 msgstr "tmpfs (Linux 3.8 以降)"
6088
6089 #. type: Plain text
6090 #: build/C/man2/lseek.2:187
6091 msgid ""
6092 "Upon successful completion, B<lseek>()  returns the resulting offset "
6093 "location as measured in bytes from the beginning of the file.  On error, the "
6094 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
6095 msgstr ""
6096 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
6097 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
6098 "される。"
6099
6100 #.  Some systems may allow negative offsets for character devices
6101 #.  and/or for remote filesystems.
6102 #. type: Plain text
6103 #: build/C/man2/lseek.2:200
6104 msgid ""
6105 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
6106 "beyond the end of a seekable device."
6107 msgstr ""
6108 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
6109 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
6110
6111 #. type: TP
6112 #: build/C/man2/lseek.2:200 build/C/man2/open.2:954
6113 #: build/C/man2/open_by_handle_at.2:304
6114 #, no-wrap
6115 msgid "B<EOVERFLOW>"
6116 msgstr "B<EOVERFLOW>"
6117
6118 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
6119 #. type: Plain text
6120 #: build/C/man2/lseek.2:205
6121 msgid "The resulting file offset cannot be represented in an I<off_t>."
6122 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
6123
6124 #. type: TP
6125 #: build/C/man2/lseek.2:205
6126 #, no-wrap
6127 msgid "B<ESPIPE>"
6128 msgstr "B<ESPIPE>"
6129
6130 #. type: Plain text
6131 #: build/C/man2/lseek.2:209
6132 msgid "I<fd> is associated with a pipe, socket, or FIFO."
6133 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
6134
6135 #. type: TP
6136 #: build/C/man2/lseek.2:209 build/C/man2/open.2:942
6137 #, no-wrap
6138 msgid "B<ENXIO>"
6139 msgstr "B<ENXIO>"
6140
6141 #. type: Plain text
6142 #: build/C/man2/lseek.2:217
6143 msgid ""
6144 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
6145 "beyond the end of the file."
6146 msgstr ""
6147 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
6148 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
6149
6150 #.  SVr4 documents additional error
6151 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
6152 #. type: Plain text
6153 #: build/C/man2/lseek.2:219 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
6154 #: build/C/man2/write.2:193
6155 msgid "SVr4, 4.3BSD, POSIX.1-2001."
6156 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
6157
6158 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
6159 #. type: Plain text
6160 #: build/C/man2/lseek.2:227
6161 msgid ""
6162 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
6163 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
6164 "next POSIX revision (Issue 8)."
6165 msgstr ""
6166 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
6167 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
6168 "る。"
6169
6170 #. type: Plain text
6171 #: build/C/man2/lseek.2:232
6172 msgid ""
6173 "See B<open>(2)  for a discussion of the relationship between file "
6174 "descriptors, open file descriptions, and files."
6175 msgstr ""
6176 "ファイルディスクリプター、オープンファイル記述、ファイルの関係の説明について"
6177 "は B<open>(2) を参照。"
6178
6179 #. type: Plain text
6180 #: build/C/man2/lseek.2:236
6181 msgid ""
6182 "Some devices are incapable of seeking and POSIX does not specify which "
6183 "devices must support B<lseek>()."
6184 msgstr ""
6185 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
6186 "に対応すべきかは規定していない。"
6187
6188 #.  Other systems return the number of written characters,
6189 #.  using SEEK_SET to set the counter. (Of written characters.)
6190 #. type: Plain text
6191 #: build/C/man2/lseek.2:243
6192 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
6193 msgstr ""
6194 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
6195 "る。"
6196
6197 #. type: Plain text
6198 #: build/C/man2/lseek.2:246
6199 msgid ""
6200 "When converting old code, substitute values for I<whence> with the following "
6201 "macros:"
6202 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
6203
6204 #. type: tbl table
6205 #: build/C/man2/lseek.2:249
6206 #, no-wrap
6207 msgid "old\tnew\n"
6208 msgstr "old \tnew\n"
6209
6210 #. type: tbl table
6211 #: build/C/man2/lseek.2:250
6212 #, no-wrap
6213 msgid "0\tSEEK_SET\n"
6214 msgstr "0\tSEEK_SET\n"
6215
6216 #. type: tbl table
6217 #: build/C/man2/lseek.2:251
6218 #, no-wrap
6219 msgid "1\tSEEK_CUR\n"
6220 msgstr "1\tSEEK_CUR\n"
6221
6222 #. type: tbl table
6223 #: build/C/man2/lseek.2:252
6224 #, no-wrap
6225 msgid "2\tSEEK_END\n"
6226 msgstr "2\tSEEK_END\n"
6227
6228 #. type: tbl table
6229 #: build/C/man2/lseek.2:253
6230 #, no-wrap
6231 msgid "L_SET\tSEEK_SET\n"
6232 msgstr "L_SET\tSEEK_SET\n"
6233
6234 #. type: tbl table
6235 #: build/C/man2/lseek.2:254
6236 #, no-wrap
6237 msgid "L_INCR\tSEEK_CUR\n"
6238 msgstr "L_INCR\tSEEK_CUR\n"
6239
6240 #. type: tbl table
6241 #: build/C/man2/lseek.2:255
6242 #, no-wrap
6243 msgid "L_XTND\tSEEK_END\n"
6244 msgstr "L_XTND\tSEEK_END\n"
6245
6246 #. type: Plain text
6247 #: build/C/man2/lseek.2:267
6248 msgid ""
6249 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
6250 "current file position pointer, so seeking on such files may be subject to "
6251 "race conditions."
6252 msgstr ""
6253 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプターは、現在のファ"
6254 "イル位置ポインター (current file position pointer) を共有しているので、 この"
6255 "ようなファイルで移動を行うと競合状態を引き起こす可能性がある。"
6256
6257 #. type: Plain text
6258 #: build/C/man2/lseek.2:274
6259 msgid ""
6260 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
6261 "B<posix_fallocate>(3)"
6262 msgstr ""
6263 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
6264 "B<posix_fallocate>(3)"
6265
6266 #. type: TH
6267 #: build/C/man3/lseek64.3:25
6268 #, no-wrap
6269 msgid "LSEEK64"
6270 msgstr "LSEEK64"
6271
6272 #. type: Plain text
6273 #: build/C/man3/lseek64.3:28
6274 msgid "lseek64 - reposition 64-bit read/write file offset"
6275 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
6276
6277 #. type: Plain text
6278 #: build/C/man3/lseek64.3:30
6279 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
6280 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
6281
6282 #. type: Plain text
6283 #: build/C/man3/lseek64.3:36
6284 msgid ""
6285 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
6286 msgstr ""
6287 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
6288
6289 #. type: Plain text
6290 #: build/C/man3/lseek64.3:53
6291 msgid ""
6292 "The B<lseek>(2)  family of functions reposition the offset of the open file "
6293 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
6294 "start, current position, or end of the file, when I<whence> has the value "
6295 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
6296 msgstr ""
6297 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプター I<fd> に関連するオー"
6298 "プンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
6299 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
6300 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
6301
6302 #. type: Plain text
6303 #: build/C/man3/lseek64.3:56
6304 msgid "For more details, return value, and errors, see B<lseek>(2)."
6305 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
6306
6307 #. type: Plain text
6308 #: build/C/man3/lseek64.3:63
6309 msgid ""
6310 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
6311 "the raw system call B<_llseek>(2)."
6312 msgstr ""
6313 "4 つのインターフェースが使用可能である: B<lseek>(2), B<lseek64>(), "
6314 "B<llseek>(2)  と元となるシステムコール B<_llseek>(2)  である。"
6315
6316 #. type: SS
6317 #: build/C/man3/lseek64.3:63
6318 #, no-wrap
6319 msgid "lseek"
6320 msgstr "lseek"
6321
6322 #. type: Plain text
6323 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
6324 #: build/C/man3/lseek64.3:116
6325 msgid "Prototype:"
6326 msgstr "プロトタイプ:"
6327
6328 #. type: Plain text
6329 #: build/C/man3/lseek64.3:69
6330 #, no-wrap
6331 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
6332 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
6333
6334 #. type: Plain text
6335 #: build/C/man3/lseek64.3:77
6336 msgid ""
6337 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
6338 "architectures, unless one compiles with"
6339 msgstr ""
6340 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャー上では "
6341 "32 ビット符号付き型である。 ただし、"
6342
6343 #. type: Plain text
6344 #: build/C/man3/lseek64.3:81
6345 #, no-wrap
6346 msgid "#define _FILE_OFFSET_BITS 64\n"
6347 msgstr "#define _FILE_OFFSET_BITS 64\n"
6348
6349 #. type: Plain text
6350 #: build/C/man3/lseek64.3:85
6351 msgid "in which case it is a 64-bit signed type."
6352 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
6353
6354 #. type: SS
6355 #: build/C/man3/lseek64.3:85
6356 #, no-wrap
6357 msgid "lseek64"
6358 msgstr "lseek64"
6359
6360 #. type: Plain text
6361 #: build/C/man3/lseek64.3:91
6362 #, no-wrap
6363 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
6364 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
6365
6366 #. type: Plain text
6367 #: build/C/man3/lseek64.3:102
6368 msgid ""
6369 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
6370 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
6371 "when one compiles with"
6372 msgstr ""
6373 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
6374 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
6375 "ルした場合にのみ使用可能である。"
6376
6377 #. type: Plain text
6378 #: build/C/man3/lseek64.3:106
6379 #, no-wrap
6380 msgid "#define _LARGEFILE64_SOURCE\n"
6381 msgstr "#define _LARGEFILE64_SOURCE\n"
6382
6383 #.  in glibc 2.0.94, not in 2.0.6
6384 #. type: Plain text
6385 #: build/C/man3/lseek64.3:114
6386 msgid ""
6387 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
6388 "be an alias for B<llseek>()."
6389 msgstr ""
6390 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
6391 "アスとして定義されている。"
6392
6393 #. type: SS
6394 #: build/C/man3/lseek64.3:114
6395 #, no-wrap
6396 msgid "llseek"
6397 msgstr "llseek"
6398
6399 #. type: Plain text
6400 #: build/C/man3/lseek64.3:120
6401 #, no-wrap
6402 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
6403 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
6404
6405 #.  in libc 5.0.9, not in 4.7.6
6406 #. type: Plain text
6407 #: build/C/man3/lseek64.3:136
6408 msgid ""
6409 "The type I<loff_t> is a 64-bit signed type.  The library routine "
6410 "B<llseek>()  is available in the glibc and works without special defines.  "
6411 "However, the glibc headers do not provide a prototype.  Users should add the "
6412 "above prototype, or something equivalent, to their own source.  When users "
6413 "complained about data loss caused by a miscompilation of B<e2fsck>(8), glibc "
6414 "2.1.3 added the link-time warning"
6415 msgstr ""
6416 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>() "
6417 "は glibc で利用可能であり、 特別な定義なしに動作する。 しかしながら、 glibc "
6418 "のヘッダーはプロトタイプを供していない。 ユーザーは上記のプロトタイプまたはそ"
6419 "れと同等のものを、 自身のソースに追加しなければならない。 このデータがないこ"
6420 "とによって B<e2fsck>(8)  のコンパイルが失敗するという苦情がユーザーから出たの"
6421 "で、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
6422
6423 #. type: Plain text
6424 #: build/C/man3/lseek64.3:139
6425 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
6426 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
6427
6428 #. type: Plain text
6429 #: build/C/man3/lseek64.3:143
6430 msgid ""
6431 "This makes this function unusable if one desires a warning-free compilation."
6432 msgstr ""
6433 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
6434
6435 #. type: SS
6436 #: build/C/man3/lseek64.3:143
6437 #, no-wrap
6438 msgid "_llseek"
6439 msgstr "_llseek"
6440
6441 #. type: Plain text
6442 #: build/C/man3/lseek64.3:146
6443 msgid ""
6444 "All the above functions are implemented in terms of this system call.  The "
6445 "prototype is:"
6446 msgstr ""
6447 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
6448 "下の通り:"
6449
6450 #. type: Plain text
6451 #: build/C/man3/lseek64.3:151
6452 #, no-wrap
6453 msgid ""
6454 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
6455 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
6456 msgstr ""
6457 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
6458 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
6459
6460 #. type: Plain text
6461 #: build/C/man3/lseek64.3:156
6462 msgid "For more details, see B<llseek>(2)."
6463 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
6464
6465 #. type: Plain text
6466 #: build/C/man3/lseek64.3:161
6467 msgid "The B<lseek64>()  function is thread-safe."
6468 msgstr "関数 B<lseek64>() はスレッドセーフである。"
6469
6470 #. type: Plain text
6471 #: build/C/man3/lseek64.3:164
6472 msgid "B<llseek>(2), B<lseek>(2)"
6473 msgstr "B<llseek>(2), B<lseek>(2)"
6474
6475 #. type: TH
6476 #: build/C/man2/open.2:51
6477 #, no-wrap
6478 msgid "OPEN"
6479 msgstr "OPEN"
6480
6481 #. type: Plain text
6482 #: build/C/man2/open.2:54
6483 msgid "open, openat, creat - open and possibly create a file"
6484 msgstr "open, openat, creat - ファイルのオープン、作成を行う"
6485
6486 #. type: Plain text
6487 #: build/C/man2/open.2:59
6488 #, no-wrap
6489 msgid ""
6490 "B<#include E<lt>sys/types.hE<gt>>\n"
6491 "B<#include E<lt>sys/stat.hE<gt>>\n"
6492 "B<#include E<lt>fcntl.hE<gt>>\n"
6493 msgstr ""
6494 "B<#include E<lt>sys/types.hE<gt>>\n"
6495 "B<#include E<lt>sys/stat.hE<gt>>\n"
6496 "B<#include E<lt>fcntl.hE<gt>>\n"
6497
6498 #. type: Plain text
6499 #: build/C/man2/open.2:62
6500 #, no-wrap
6501 msgid ""
6502 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
6503 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6504 msgstr ""
6505 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
6506 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6507
6508 #. type: Plain text
6509 #: build/C/man2/open.2:64
6510 #, no-wrap
6511 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6512 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6513
6514 #. type: Plain text
6515 #: build/C/man2/open.2:68
6516 #, no-wrap
6517 msgid ""
6518 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
6519 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6520 msgstr ""
6521 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
6522 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6523
6524 #. type: Plain text
6525 #: build/C/man2/open.2:76
6526 msgid "B<openat>():"
6527 msgstr "B<openat>():"
6528
6529 #. type: Plain text
6530 #: build/C/man2/open.2:98
6531 msgid ""
6532 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
6533 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
6534 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
6535 "by a successful call will be the lowest-numbered file descriptor not "
6536 "currently open for the process."
6537 msgstr ""
6538 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプターを返"
6539 "す。 ファイルディスクリプターは、この後に続くシステムコール (B<read>(2), "
6540 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6541 "る。 このシステムコールが成功した場合に返されるファイルディスクリプターは そ"
6542 "のプロセスがその時点でオープンしていないファイルディスクリプターの うち最小の"
6543 "数字のものとなる。"
6544
6545 #. type: Plain text
6546 #: build/C/man2/open.2:110
6547 msgid ""
6548 "By default, the new file descriptor is set to remain open across an "
6549 "B<execve>(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in "
6550 "B<fcntl>(2)  is initially disabled); the B<O_CLOEXEC> flag, described below, "
6551 "can be used to change this default.  The file offset is set to the beginning "
6552 "of the file (see B<lseek>(2))."
6553 msgstr ""
6554 "デフォルトでは、新しいファイルディスクリプターは B<execve>(2) を実行した後"
6555 "も\n"
6556 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6557 "ファイルディスクリプターフラグは最初は無効である); 後述の B<O_CLOEXEC> フラ"
6558 "グ\n"
6559 "を使うとこのデフォルトを変更することができる。 ファイルオフセット \n"
6560 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6561
6562 #. type: Plain text
6563 #: build/C/man2/open.2:123
6564 msgid ""
6565 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6566 "system-wide table of open files.  The open file description records the file "
6567 "offset and the file status flags (see below).  A file descriptor is a "
6568 "reference to an open file description; this reference is unaffected if "
6569 "I<pathname> is subsequently removed or modified to refer to a different "
6570 "file.  For further details on open file descriptions, see NOTES."
6571 msgstr ""
6572 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6573 "が作成される。ファイル記述とは、システム全体のオープン中のファイルのテーブル"
6574 "のエントリーである。 このオープンファイル記述は、ファイルオフセットとファイル"
6575 "状態フラグ (下記参照) が保持する。 ファイルディスクリプターはオープンファイ"
6576 "ルっ記述への参照である。 この後で I<pathname> が削除されたり、他のファイルを"
6577 "参照するように変更されたりしても、 この参照は影響を受けない。 オープンファイ"
6578 "ル記述の詳細な説明は「注意」の節を参照。"
6579
6580 #. type: Plain text
6581 #: build/C/man2/open.2:131
6582 msgid ""
6583 "The argument I<flags> must include one of the following I<access modes>: "
6584 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6585 "only, write-only, or read/write, respectively."
6586 msgstr ""
6587 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6588 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6589 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6590
6591 #.  SUSv4 divides the flags into:
6592 #.  * Access mode
6593 #.  * File creation
6594 #.  * File status
6595 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6596 #.  though it's not clear what the difference between "other" and
6597 #.  "File creation" flags is.  I raised an Aardvark to see if this
6598 #.  can be clarified in SUSv4; 10 Oct 2008.
6599 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6600 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6601 #.  are also categorized" as file status flags.
6602 #. type: Plain text
6603 #: build/C/man2/open.2:170
6604 msgid ""
6605 "In addition, zero or more file creation flags and file status flags can be "
6606 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6607 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6608 "B<O_TMPFILE>, B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are "
6609 "all of the remaining flags listed below.  The distinction between these two "
6610 "groups of flags is that the file status flags can be retrieved and (in some "
6611 "cases)  modified; see B<fcntl>(2)  for details."
6612 msgstr ""
6613 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6614 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6615 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6616 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TMPFILE>, "
6617 "B<O_TRUNC>, B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち"
6618 "上記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は"
6619 "その内容を取得したり (場合によっては) 変更したりできる点にある。詳細は "
6620 "B<fcntl>(2) を参照。"
6621
6622 #. type: Plain text
6623 #: build/C/man2/open.2:172
6624 msgid ""
6625 "The full list of file creation flags and file status flags is as follows:"
6626 msgstr "すべてのファイル作成フラグとファイル状態フラグを以下のリストに示す。"
6627
6628 #. type: TP
6629 #: build/C/man2/open.2:172
6630 #, no-wrap
6631 msgid "B<O_APPEND>"
6632 msgstr "B<O_APPEND>"
6633
6634 #.  For more background, see
6635 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6636 #.  http://nfs.sourceforge.net/
6637 #. type: Plain text
6638 #: build/C/man2/open.2:189
6639 msgid ""
6640 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6641 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6642 "may lead to corrupted files on NFS filesystems if more than one process "
6643 "appends data to a file at once.  This is because NFS does not support "
6644 "appending to a file, so the client kernel has to simulate it, which can't be "
6645 "done without a race condition."
6646 msgstr ""
6647 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6648 "B<lseek>(2)  を行ったかのように、ファイルポインターをファイルの最後に移動す"
6649 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6650 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6651 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6652 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6653 "とはできないからである。"
6654
6655 #. type: TP
6656 #: build/C/man2/open.2:189
6657 #, no-wrap
6658 msgid "B<O_ASYNC>"
6659 msgstr "B<O_ASYNC>"
6660
6661 #. type: Plain text
6662 #: build/C/man2/open.2:203
6663 msgid ""
6664 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6665 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6666 "this file descriptor.  This feature is available only for terminals, "
6667 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6668 "B<fcntl>(2)  for further details.  See also BUGS, below."
6669 msgstr ""
6670 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプ"
6671 "ターへの 入力または出力が可能になった場合に、シグナルを生成する (デフォルト"
6672 "は B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用"
6673 "可能なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6674 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。 "
6675 "下記の「バグ」も参照。"
6676
6677 #. type: TP
6678 #: build/C/man2/open.2:203
6679 #, no-wrap
6680 msgid "B<O_CLOEXEC> (since Linux 2.6.23)"
6681 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6682
6683 #.  NOTE! several other man pages refer to this text
6684 #. type: Plain text
6685 #: build/C/man2/open.2:213
6686 msgid ""
6687 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6688 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6689 "operations to set the B<FD_CLOEXEC> flag."
6690 msgstr ""
6691 "新しいファイルディスクリプターに対して close-on-exec フラグを有効にする。 こ"
6692 "のフラグを指定することで、 プログラムは B<FD_CLOEXEC> フラグをセットするため"
6693 "に B<fcntl>(2) B<F_SETFD> 操作を別途呼び出す必要がなくなる。"
6694
6695 #.  This flag fixes only one form of the race condition;
6696 #.  The race can also occur with, for example, descriptors
6697 #.  returned by accept(), pipe(), etc.
6698 #. type: Plain text
6699 #: build/C/man2/open.2:242
6700 msgid ""
6701 "Note that the use of this flag is essential in some multithreaded programs, "
6702 "because using a separate B<fcntl>(2)  B<F_SETFD> operation to set the "
6703 "B<FD_CLOEXEC> flag does not suffice to avoid race conditions where one "
6704 "thread opens a file descriptor and attempts to set its close-on-exec flag "
6705 "using B<fcntl>(2)  at the same time as another thread does a B<fork>(2)  "
6706 "plus B<execve>(2).  Depending on the order of execution, the race may lead "
6707 "to the file descriptor returned by B<open>()  being unintentionally leaked "
6708 "to the program executed by the child process created by B<fork>(2).  (This "
6709 "kind of race is in principle possible for any system call that creates a "
6710 "file descriptor whose close-on-exec flag should be set, and various other "
6711 "Linux system calls provide an equivalent of the B<O_CLOEXEC> flag to deal "
6712 "with this problem.)"
6713 msgstr ""
6714 "ある種のマルチスレッドのプログラムはこのフラグの使用は不可欠である点に注意す"
6715 "ること。 なぜなら、個別に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2) "
6716 "B<F_SETFD> 操作を呼び出したとしても、あるスレッドがファイルディスクリプター"
6717 "を オープンするのと同時に別のスレッドが B<fork>(2) と B<execve>(2) を実行する"
6718 "という競合条件を避けるのには十分ではないからである。 実行の順序に依存して、こ"
6719 "の競合条件の結果、 B<open>() が返したファイルディスクリプターが B<fork>(2) で"
6720 "作成された子プロセスにより実行されるプログラムに意図せず見えてしまう可能性が"
6721 "ある。 (この種の競合は、 本質的に、 close-on-exec フラグをセットすべきファイ"
6722 "ルディスクリプターを作成するどのシステムコールでも起こり得るものであり、 他の"
6723 "いろいろな Linux システムコールでこの問題に対処するために B<O_CLOEXEC> と同等"
6724 "の機能が提供されている。)"
6725
6726 #. type: TP
6727 #: build/C/man2/open.2:242
6728 #, no-wrap
6729 msgid "B<O_CREAT>"
6730 msgstr "B<O_CREAT>"
6731
6732 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6733 #.  XFS (since 2.6.14).
6734 #. type: Plain text
6735 #: build/C/man2/open.2:258
6736 msgid ""
6737 "If the file does not exist, it will be created.  The owner (user ID) of the "
6738 "file is set to the effective user ID of the process.  The group ownership "
6739 "(group ID) is set either to the effective group ID of the process or to the "
6740 "group ID of the parent directory (depending on filesystem type and mount "
6741 "options, and the mode of the parent directory; see the mount options "
6742 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6743 msgstr ""
6744 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6745 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6746 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6747 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6748 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6749 "I<bsdgroups> と I<sysvgroups> を参照)。"
6750
6751 #. type: Plain text
6752 #: build/C/man2/open.2:285
6753 msgid ""
6754 "I<mode> specifies the permissions to use in case a new file is created.  "
6755 "This argument must be supplied when B<O_CREAT> or B<O_TMPFILE> is specified "
6756 "in I<flags>; if neither B<O_CREAT> nor B<O_TMPFILE> is specified, then "
6757 "I<mode> is ignored.  The effective permissions are modified by the process's "
6758 "I<umask> in the usual way: The permissions of the created file are I<(mode\\ "
6759 "&\\ ~umask)>.  Note that this mode applies only to future accesses of the "
6760 "newly created file; the B<open>()  call that creates a read-only file may "
6761 "well return a read/write file descriptor."
6762 msgstr ""
6763 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6764 "指定する。 I<flags> に B<O_CREAT> か B<O_TMPFILE> が指定されている場合、 "
6765 "I<mode> を指定しなければならない。 B<O_CREAT> も B<O_TMPFILE> も指定されてい"
6766 "ない場合、 I<mode> は無視される。 有効なアクセス許可は、普段と同じようにプロ"
6767 "セスの I<umask> によって修正され、作成されたファイルの許可は I<(mode\\ &\\ "
6768 "~umask)> となる。 このモードは、新しく作成されたファイルに対するそれ以降のア"
6769 "クセス にのみ適用される点に注意すること。 読み取り専用のファイルを作成する "
6770 "B<open>()  コールであっても、 読み書き可能なファイルディスクリプターを返すこ"
6771 "とがありうる。"
6772
6773 #. type: Plain text
6774 #: build/C/man2/open.2:288
6775 msgid "The following symbolic constants are provided for I<mode>:"
6776 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6777
6778 #. type: TP
6779 #: build/C/man2/open.2:288
6780 #, no-wrap
6781 msgid "B<S_IRWXU>"
6782 msgstr "B<S_IRWXU>"
6783
6784 #. type: Plain text
6785 #: build/C/man2/open.2:291
6786 msgid "00700 user (file owner) has read, write and execute permission"
6787 msgstr ""
6788 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6789
6790 #. type: TP
6791 #: build/C/man2/open.2:291
6792 #, no-wrap
6793 msgid "B<S_IRUSR>"
6794 msgstr "B<S_IRUSR>"
6795
6796 #. type: Plain text
6797 #: build/C/man2/open.2:294
6798 msgid "00400 user has read permission"
6799 msgstr "00400 ユーザーに読み込みの許可がある。"
6800
6801 #. type: TP
6802 #: build/C/man2/open.2:294
6803 #, no-wrap
6804 msgid "B<S_IWUSR>"
6805 msgstr "B<S_IWUSR>"
6806
6807 #. type: Plain text
6808 #: build/C/man2/open.2:297
6809 msgid "00200 user has write permission"
6810 msgstr "00200 ユーザーに書き込みの許可がある。"
6811
6812 #. type: TP
6813 #: build/C/man2/open.2:297
6814 #, no-wrap
6815 msgid "B<S_IXUSR>"
6816 msgstr "B<S_IXUSR>"
6817
6818 #. type: Plain text
6819 #: build/C/man2/open.2:300
6820 msgid "00100 user has execute permission"
6821 msgstr "00100 ユーザーに実行の許可がある。"
6822
6823 #. type: TP
6824 #: build/C/man2/open.2:300
6825 #, no-wrap
6826 msgid "B<S_IRWXG>"
6827 msgstr "B<S_IRWXG>"
6828
6829 #. type: Plain text
6830 #: build/C/man2/open.2:303
6831 msgid "00070 group has read, write and execute permission"
6832 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6833
6834 #. type: TP
6835 #: build/C/man2/open.2:303
6836 #, no-wrap
6837 msgid "B<S_IRGRP>"
6838 msgstr "B<S_IRGRP>"
6839
6840 #. type: Plain text
6841 #: build/C/man2/open.2:306
6842 msgid "00040 group has read permission"
6843 msgstr "00040 グループに読み込みの許可がある。"
6844
6845 #. type: TP
6846 #: build/C/man2/open.2:306
6847 #, no-wrap
6848 msgid "B<S_IWGRP>"
6849 msgstr "B<S_IWGRP>"
6850
6851 #. type: Plain text
6852 #: build/C/man2/open.2:309
6853 msgid "00020 group has write permission"
6854 msgstr "00020 グループに書き込みの許可がある。"
6855
6856 #. type: TP
6857 #: build/C/man2/open.2:309
6858 #, no-wrap
6859 msgid "B<S_IXGRP>"
6860 msgstr "B<S_IXGRP>"
6861
6862 #. type: Plain text
6863 #: build/C/man2/open.2:312
6864 msgid "00010 group has execute permission"
6865 msgstr "00010 グループに実行の許可がある。"
6866
6867 #. type: TP
6868 #: build/C/man2/open.2:312
6869 #, no-wrap
6870 msgid "B<S_IRWXO>"
6871 msgstr "B<S_IRWXO>"
6872
6873 #. type: Plain text
6874 #: build/C/man2/open.2:315
6875 msgid "00007 others have read, write and execute permission"
6876 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6877
6878 #. type: TP
6879 #: build/C/man2/open.2:315
6880 #, no-wrap
6881 msgid "B<S_IROTH>"
6882 msgstr "B<S_IROTH>"
6883
6884 #. type: Plain text
6885 #: build/C/man2/open.2:318
6886 msgid "00004 others have read permission"
6887 msgstr "00004 他人に読み込みの許可がある。"
6888
6889 #. type: TP
6890 #: build/C/man2/open.2:318
6891 #, no-wrap
6892 msgid "B<S_IWOTH>"
6893 msgstr "B<S_IWOTH>"
6894
6895 #. type: Plain text
6896 #: build/C/man2/open.2:321
6897 msgid "00002 others have write permission"
6898 msgstr "00002 他人に書き込みの許可がある。"
6899
6900 #. type: TP
6901 #: build/C/man2/open.2:321
6902 #, no-wrap
6903 msgid "B<S_IXOTH>"
6904 msgstr "B<S_IXOTH>"
6905
6906 #. type: Plain text
6907 #: build/C/man2/open.2:324
6908 msgid "00001 others have execute permission"
6909 msgstr "00001 他人に実行の許可がある。"
6910
6911 #. type: TP
6912 #: build/C/man2/open.2:325
6913 #, no-wrap
6914 msgid "B<O_DIRECT> (since Linux 2.4.10)"
6915 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6916
6917 #. type: Plain text
6918 #: build/C/man2/open.2:342
6919 msgid ""
6920 "Try to minimize cache effects of the I/O to and from this file.  In general "
6921 "this will degrade performance, but it is useful in special situations, such "
6922 "as when applications do their own caching.  File I/O is done directly to/"
6923 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6924 "transfer data synchronously, but does not give the guarantees of the "
6925 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6926 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6927 "B<O_DIRECT>.  See NOTES below for further discussion."
6928 msgstr ""
6929 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6930 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6931 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6932 "ファーに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しよう"
6933 "とはするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証され"
6934 "るわけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> "
6935 "を使用しなければならない。下記の「注意」の節の議論も参照。"
6936
6937 #. type: Plain text
6938 #: build/C/man2/open.2:346
6939 msgid ""
6940 "A semantically similar (but deprecated) interface for block devices is "
6941 "described in B<raw>(8)."
6942 msgstr ""
6943 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6944 "れている (但し、このインターフェースは非推奨である)。"
6945
6946 #. type: TP
6947 #: build/C/man2/open.2:346
6948 #, no-wrap
6949 msgid "B<O_DIRECTORY>"
6950 msgstr "B<O_DIRECTORY>"
6951
6952 #.  But see the following and its replies:
6953 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6954 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6955 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6956 #. type: Plain text
6957 #: build/C/man2/open.2:358
6958 msgid ""
6959 "If I<pathname> is not a directory, cause the open to fail.  This flag was "
6960 "added in kernel version 2.1.126, to avoid denial-of-service problems if "
6961 "B<opendir>(3)  is called on a FIFO or tape device."
6962 msgstr ""
6963 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは、 "
6964 "B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合の サービス不"
6965 "能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追加された。"
6966
6967 #. type: TP
6968 #: build/C/man2/open.2:358
6969 #, no-wrap
6970 msgid "B<O_DSYNC>"
6971 msgstr "B<O_DSYNC>"
6972
6973 #. type: Plain text
6974 #: build/C/man2/open.2:364
6975 msgid ""
6976 "Write operations on the file will complete according to the requirements of "
6977 "synchronized I/O I<data> integrity completion."
6978 msgstr ""
6979 "ファイルに対する書き込み操作は、同期 I/O のI<データ>完全性完了の要件に基づい"
6980 "て行われる。"
6981
6982 #. type: Plain text
6983 #: build/C/man2/open.2:376
6984 msgid ""
6985 "By the time B<write>(2)  (and similar)  return, the output data has been "
6986 "transferred to the underlying hardware, along with any file metadata that "
6987 "would be required to retrieve that data (i.e., as though each B<write>(2)  "
6988 "was followed by a call to B<fdatasync>(2)).  I<See NOTES below>."
6989 msgstr ""
6990 "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータおよびデータを"
6991 "取得するのに必要なファイルメタデータが裏で利用されているハードウェアに転送さ"
6992 "れる (つまり、B<write>(2) の後に B<fdatasync>(2) を呼び出したのと同じようにな"
6993 "る)。 I<下記の「注意」も参照のこと>。"
6994
6995 #. type: TP
6996 #: build/C/man2/open.2:376
6997 #, no-wrap
6998 msgid "B<O_EXCL>"
6999 msgstr "B<O_EXCL>"
7000
7001 #. type: Plain text
7002 #: build/C/man2/open.2:386
7003 msgid ""
7004 "Ensure that this call creates the file: if this flag is specified in "
7005 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
7006 "will fail."
7007 msgstr ""
7008 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
7009 "と\n"
7010 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
7011 "敗\n"
7012 "する。"
7013
7014 #.  POSIX.1-2001 explicitly requires this behavior.
7015 #. type: Plain text
7016 #: build/C/man2/open.2:394
7017 msgid ""
7018 "When these two flags are specified, symbolic links are not followed: if "
7019 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
7020 "the symbolic link points to."
7021 msgstr ""
7022 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
7023 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
7024 "かに関わらず B<open>()  は失敗する。"
7025
7026 #. type: Plain text
7027 #: build/C/man2/open.2:410
7028 msgid ""
7029 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
7030 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
7031 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
7032 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
7033 "the error B<EBUSY>."
7034 msgstr ""
7035 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
7036 "B<O_EXCL> の動作は規定されていない。\n"
7037 "これには一つ例外があり、Linux 2.6 以降では、\n"
7038 "I<pathname> がブロックデバイスを参照している場合、\n"
7039 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
7040 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
7041 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
7042
7043 #. type: Plain text
7044 #: build/C/man2/open.2:432
7045 msgid ""
7046 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
7047 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
7048 "programs that rely on it for performing locking tasks will contain a race "
7049 "condition.  Portable programs that want to perform atomic file locking using "
7050 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
7051 "create a unique file on the same filesystem (e.g., incorporating hostname "
7052 "and PID), and use B<link>(2)  to make a link to the lockfile.  If "
7053 "B<link>(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  "
7054 "on the unique file to check if its link count has increased to 2, in which "
7055 "case the lock is also successful."
7056 msgstr ""
7057 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
7058 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
7059 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
7060 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
7061 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
7062 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
7063 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
7064 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
7065 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
7066 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
7067 "じくロックに成功しているということである。"
7068
7069 #. type: TP
7070 #: build/C/man2/open.2:432
7071 #, no-wrap
7072 msgid "B<O_LARGEFILE>"
7073 msgstr "B<O_LARGEFILE>"
7074
7075 #. type: Plain text
7076 #: build/C/man2/open.2:454
7077 msgid ""
7078 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
7079 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
7080 "macro must be defined (before including I<any> header files)  in order to "
7081 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
7082 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
7083 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
7084 msgstr ""
7085 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
7086 "ファ\n"
7087 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダーファ"
7088 "イ\n"
7089 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
7090 "ば\n"
7091 "ならない。\n"
7092 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
7093 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
7094 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
7095
7096 #. type: TP
7097 #: build/C/man2/open.2:454
7098 #, no-wrap
7099 msgid "B<O_NOATIME> (since Linux 2.6.8)"
7100 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
7101
7102 #.  The O_NOATIME flag also affects the treatment of st_atime
7103 #.  by mmap() and readdir(2), MTK, Dec 04.
7104 #. type: Plain text
7105 #: build/C/man2/open.2:467
7106 msgid ""
7107 "Do not update the file last access time (I<st_atime> in the inode)  when the "
7108 "file is B<read>(2).  This flag is intended for use by indexing or backup "
7109 "programs, where its use can significantly reduce the amount of disk "
7110 "activity.  This flag may not be effective on all filesystems.  One example "
7111 "is NFS, where the server maintains the access time."
7112 msgstr ""
7113 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
7114 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
7115 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
7116 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
7117 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
7118
7119 #. type: TP
7120 #: build/C/man2/open.2:467
7121 #, no-wrap
7122 msgid "B<O_NOCTTY>"
7123 msgstr "B<O_NOCTTY>"
7124
7125 #. type: Plain text
7126 #: build/C/man2/open.2:475
7127 msgid ""
7128 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
7129 "become the process's controlling terminal even if the process does not have "
7130 "one."
7131 msgstr ""
7132 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
7133 "る\n"
7134 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
7135 "ル\n"
7136 "は制御端末にはならない。"
7137
7138 #. type: TP
7139 #: build/C/man2/open.2:475
7140 #, no-wrap
7141 msgid "B<O_NOFOLLOW>"
7142 msgstr "B<O_NOFOLLOW>"
7143
7144 #.  The headers from glibc 2.0.100 and later include a
7145 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
7146 #.  used\fP.
7147 #. type: Plain text
7148 #: build/C/man2/open.2:487
7149 msgid ""
7150 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
7151 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
7152 "earlier components of the pathname will still be followed.  See also "
7153 "B<O_PATH> below."
7154 msgstr ""
7155 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
7156 "FreeBSD の拡張で、Linux には バージョン 2.1.126 で追加された。 このフラグが指"
7157 "定された場合でも I<pathname> の前の方の要素 (最後のディレクトリセパレータより"
7158 "前の部分) にあるシンボリックリンクについてはリンクが辿られる。 下記の "
7159 "B<O_PATH> も参照のこと。"
7160
7161 #. type: TP
7162 #: build/C/man2/open.2:487
7163 #, no-wrap
7164 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
7165 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
7166
7167 #. type: Plain text
7168 #: build/C/man2/open.2:500
7169 msgid ""
7170 "When possible, the file is opened in nonblocking mode.  Neither the "
7171 "B<open>()  nor any subsequent operations on the file descriptor which is "
7172 "returned will cause the calling process to wait.  For the handling of FIFOs "
7173 "(named pipes), see also B<fifo>(7).  For a discussion of the effect of "
7174 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
7175 "see B<fcntl>(2)."
7176 msgstr ""
7177 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
7178 "B<open>() も、返したファイルディスクリプターに対する以後のすべての操作も呼び"
7179 "出\n"
7180 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
7181 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
7182 "イ\n"
7183 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
7184 "議論は、 B<fcntl>(2) を参照すること。"
7185
7186 #. type: TP
7187 #: build/C/man2/open.2:500
7188 #, no-wrap
7189 msgid "B<O_PATH> (since Linux 2.6.39)"
7190 msgstr "B<O_PATH> (Linux 2.6.39 以降)"
7191
7192 #
7193 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
7194 #.  commit 326be7b484843988afe57566b627fb7a70beac56
7195 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
7196 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
7197 #.      Subject: Re: [PATCH] open(2): document O_PATH
7198 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
7199 #. type: Plain text
7200 #: build/C/man2/open.2:522
7201 msgid ""
7202 "Obtain a file descriptor that can be used for two purposes: to indicate a "
7203 "location in the filesystem tree and to perform operations that act purely at "
7204 "the file descriptor level.  The file itself is not opened, and other file "
7205 "operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), "
7206 "B<fgetxattr>(2), B<mmap>(2))  fail with the error B<EBADF>."
7207 msgstr ""
7208 "このフラグを指定して取得したファイルディスクリプターは、 ファイルシステムツ"
7209 "リー内での場所を示すため、 純粋にファイルディスクリプターレベルでの作用する操"
7210 "作を実行するため、 の二つの目的で使用することができる。 ファイル自身はオープ"
7211 "ンされず、 他のファイル操作 (例えば B<read>(2), B<write>(2), B<fchmod>(2), "
7212 "B<fchown>(2), B<fgetxattr>(2), B<mmap>(2)) はエラー B<EBADF> で失敗する。"
7213
7214 #. type: Plain text
7215 #: build/C/man2/open.2:526
7216 msgid ""
7217 "The following operations I<can> be performed on the resulting file "
7218 "descriptor:"
7219 msgstr ""
7220 "取得したファイルディスクリプターに対して以下の操作を行うことが「できる」。"
7221
7222 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
7223 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
7224 #. type: Plain text
7225 #: build/C/man2/open.2:535
7226 msgid ""
7227 "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
7228 msgstr ""
7229 "B<close>(2); B<fchdir>(2)  (Linux 3.5 以降); B<fstat>(2)  (Linux 3.6 以降)"
7230
7231 #. type: Plain text
7232 #: build/C/man2/open.2:541
7233 msgid ""
7234 "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
7235 msgstr ""
7236 "ファイルディスクリプターの複製 (B<dup>(2), B<fcntl>(2)  B<F_DUPFD> など)"
7237
7238 #. type: Plain text
7239 #: build/C/man2/open.2:547
7240 msgid ""
7241 "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and "
7242 "B<F_SETFD>)."
7243 msgstr ""
7244 "ファイルディスクリプターフラグの取得と設定 (B<fcntl>(2) の B<F_GETFD> と "
7245 "B<F_SETFD>)"
7246
7247 #. type: Plain text
7248 #: build/C/man2/open.2:553
7249 msgid ""
7250 "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> "
7251 "operation: the returned flags will include the bit B<O_PATH>."
7252 msgstr ""
7253 "B<fcntl>(2) の B<F_GETFL> 操作を使ったオープンされたファイルの状態フラグの取"
7254 "得。 返されるフラグには B<O_PATH> ビットが含まれる。"
7255
7256 #. type: Plain text
7257 #: build/C/man2/open.2:566
7258 msgid ""
7259 "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
7260 "the other \"*at()\" system calls.  This includes B<linkat>(2)  with "
7261 "B<AT_EMPTY_PATH> (or via procfs using B<AT_SYMLINK_FOLLOW>)  even if the "
7262 "file is not a directory."
7263 msgstr ""
7264 "B<openat>(2) や他の \"*at()\" 系のシステムコールの I<dirfd> 引数としてその"
7265 "ファイルディスクリプターを渡す。 これには、 ファイルがディレクトリでない場合"
7266 "に B<linkat>(2) に B<AT_EMPTY_PATH> が指定された場合 (や procfs 経由で "
7267 "B<AT_SYMLINK_FOLLOW> が使用された場合) を含む。"
7268
7269 #. type: Plain text
7270 #: build/C/man2/open.2:572
7271 msgid ""
7272 "Passing the file descriptor to another process via a UNIX domain socket (see "
7273 "B<SCM_RIGHTS> in B<unix>(7))."
7274 msgstr ""
7275 "そのファイルディスクリプターを別のプロセスに UNIX ドメインソケット経由で渡"
7276 "す。 (B<unix>(7) の B<SCM_RIGHTS> を参照)"
7277
7278 #. type: Plain text
7279 #: build/C/man2/open.2:584
7280 msgid ""
7281 "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_CLOEXEC>, "
7282 "B<O_DIRECTORY>, and B<O_NOFOLLOW> are ignored."
7283 msgstr ""
7284 "I<flags> に B<O_PATH> が指定された場合、 B<O_CLOEXEC>, B<O_DIRECTORY>, "
7285 "B<O_NOFOLLOW> 以外のフラグビットは無視される。"
7286
7287 #. type: Plain text
7288 #: build/C/man2/open.2:600
7289 msgid ""
7290 "If I<pathname> is a symbolic link and the B<O_NOFOLLOW> flag is also "
7291 "specified, then the call returns a file descriptor referring to the symbolic "
7292 "link.  This file descriptor can be used as the I<dirfd> argument in calls to "
7293 "B<fchownat>(2), B<fstatat>(2), B<linkat>(2), and B<readlinkat>(2)  with an "
7294 "empty pathname to have the calls operate on the symbolic link."
7295 msgstr ""
7296 "I<pathname> がシンボリックリンクで B<O_NOFOLLOW> フラグも合わせて指定された場"
7297 "合、 この呼び出しではシンボリックリンクを参照するファイルディスクリプターを返"
7298 "す。 このファイルディスクリプターは、 空のパス名を指定した B<fchownat>(2), "
7299 "B<fstatat>(2), B<linkat>(2), B<readlinkat>(2) の呼び出しで I<dirfd> 引数とし"
7300 "て使うことで、 そのシンボリックリンクに対して操作を行うことができる。"
7301
7302 #. type: TP
7303 #: build/C/man2/open.2:600
7304 #, no-wrap
7305 msgid "B<O_SYNC>"
7306 msgstr "B<O_SYNC>"
7307
7308 #. type: Plain text
7309 #: build/C/man2/open.2:612
7310 msgid ""
7311 "Write operations on the file will complete according to the requirements of "
7312 "synchronized I/O I<file> integrity completion (by contrast with the "
7313 "synchronized I/O I<data> integrity completion provided by B<O_DSYNC>.)"
7314 msgstr ""
7315 "ファイルに対する書き込み操作は、同期 I/O のI<ファイル>完全性完了の要件に基づ"
7316 "いて行われる (これに対し B<O_DSYNC> では同期 I/O のI<データ>完全性完了が提供"
7317 "される)。"
7318
7319 #. type: Plain text
7320 #: build/C/man2/open.2:623
7321 msgid ""
7322 "By the time B<write>(2)  (and similar)  return, the output data and "
7323 "associated file metadata have been transferred to the underlying hardware (i."
7324 "e., as though each B<write>(2)  was followed by a call to B<fsync>(2)).  "
7325 "I<See NOTES below>."
7326 msgstr ""
7327 "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータと関連するファ"
7328 "イルメタデータが裏で利用されているハードウェアに転送される (つまり、"
7329 "B<write>(2) の後に B<fsync>(2) を呼び出したのと同じようになる)。 I<下記の「注"
7330 "意」も参照のこと>。"
7331
7332 #. type: TP
7333 #: build/C/man2/open.2:623
7334 #, no-wrap
7335 msgid "B<O_TMPFILE> (since Linux 3.11)"
7336 msgstr "B<O_TMPFILE> (Linux 3.11 以降)"
7337
7338 #.  commit 60545d0d4610b02e55f65d141c95b18ccf855b6e
7339 #.  commit f4e0c30c191f87851c4a53454abb55ee276f4a7e
7340 #.  commit bb458c644a59dbba3a1fe59b27106c5e68e1c4bd
7341 #. type: Plain text
7342 #: build/C/man2/open.2:635
7343 msgid ""
7344 "Create an unnamed temporary file.  The I<pathname> argument specifies a "
7345 "directory; an unnamed inode will be created in that directory's filesystem.  "
7346 "Anything written to the resulting file will be lost when the last file "
7347 "descriptor is closed, unless the file is given a name."
7348 msgstr ""
7349 "名前なしの一時ファイルを作成する。 I<pathname> 引き数はディレクトリを指定す"
7350 "る。 名前なしの inode がそのディレクトリが存在するファイルシステムに作成され"
7351 "る。 そのファイルに名前を付与しない限り、 作成されたファイルに書き込まれた内"
7352 "容は、 最後のファイルディスクリプターがクローズされる際に失われる。"
7353
7354 #. type: Plain text
7355 #: build/C/man2/open.2:649
7356 msgid ""
7357 "B<O_TMPFILE> must be specified with one of B<O_RDWR> or B<O_WRONLY> and, "
7358 "optionally, B<O_EXCL>.  If B<O_EXCL> is not specified, then B<linkat>(2)  "
7359 "can be used to link the temporary file into the filesystem, making it "
7360 "permanent, using code like the following:"
7361 msgstr ""
7362 "B<O_TMPFILE> は必ず B<O_RDWR> か B<O_WRONLY> のいずれかと一緒に使わなければな"
7363 "らない。 B<O_EXCL> も指定することができる。 B<O_EXCL> が指定されなかった場"
7364 "合、 B<linkat>(2) を使って、そのファイルシステムにこの一時ファイルへのリンク"
7365 "を作成し、ファイルを永続化することができる。 以下のコードのようにすればよい。"
7366
7367 #. type: Plain text
7368 #: build/C/man2/open.2:655
7369 #, no-wrap
7370 msgid ""
7371 "char path[PATH_MAX];\n"
7372 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
7373 "                        S_IRUSR | S_IWUSR);\n"
7374 msgstr ""
7375 "char path[PATH_MAX];\n"
7376 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
7377 "                        S_IRUSR | S_IWUSR);\n"
7378
7379 #. type: Plain text
7380 #: build/C/man2/open.2:657
7381 #, no-wrap
7382 msgid "/* File I/O on 'fd'... */\n"
7383 msgstr "/* 'fd' に対するファイル I/O ... */\n"
7384
7385 #. type: Plain text
7386 #: build/C/man2/open.2:661
7387 #, no-wrap
7388 msgid ""
7389 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
7390 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
7391 "                        AT_SYMLINK_FOLLOW);\n"
7392 msgstr ""
7393 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
7394 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
7395 "                        AT_SYMLINK_FOLLOW);\n"
7396
7397 #. type: Plain text
7398 #: build/C/man2/open.2:670
7399 msgid ""
7400 "In this case, the B<open>()  I<mode> argument determines the file permission "
7401 "mode, as with B<O_CREAT>."
7402 msgstr ""
7403 "この場合、 B<open>() の I<mode> 引き数は B<O_CREAT> と同様にファイルのアクセ"
7404 "ス許可モードの決定に使われる。"
7405
7406 #. type: Plain text
7407 #: build/C/man2/open.2:682
7408 msgid ""
7409 "Specifying B<O_EXCL> in conjunction with B<O_TMPFILE> prevents a temporary "
7410 "file from being linked into the filesystem in the above manner.  (Note that "
7411 "the meaning of B<O_EXCL> in this case is different from the meaning of "
7412 "B<O_EXCL> otherwise.)"
7413 msgstr ""
7414 "B<O_TMPFILE> とともに B<O_EXCL> を指定すると、 一時ファイルに対して上記の方法"
7415 "でファイルシステムへのリンクを行うことができなくなる (この場合の B<O_EXCL> の"
7416 "意味は他の場合の B<O_EXCL> の意味とは異なる点に注意)。"
7417
7418 #.  Inspired by http://lwn.net/Articles/559147/
7419 #. type: Plain text
7420 #: build/C/man2/open.2:687
7421 msgid "There are two main use cases for B<O_TMPFILE>:"
7422 msgstr "B<O_TMPFILE> には主に二つの用途がある。"
7423
7424 #. type: Plain text
7425 #: build/C/man2/open.2:696
7426 msgid ""
7427 "Improved B<tmpfile>(3)  functionality: race-free creation of temporary files "
7428 "that (1) are automatically deleted when closed; (2) can never be reached via "
7429 "any pathname; (3) are not subject to symlink attacks; and (4) do not require "
7430 "the caller to devise unique names."
7431 msgstr ""
7432 "改善された B<tmpfile>(3) の機能: (1) クローズ時に自動的に削除される、 (2) パ"
7433 "ス名では決して参照できない、 (3) シンボリックリンク攻撃ができない、 (4) 呼び"
7434 "出し元が一意な名前を考える必要がない、 という特長を持つ競合のない一時ファイル"
7435 "の作成。"
7436
7437 #. type: Plain text
7438 #: build/C/man2/open.2:707
7439 msgid ""
7440 "Creating a file that is initially invisible, which is then populated with "
7441 "data and adjusted to have appropriate filesystem attributes (B<chown>(2), "
7442 "B<chmod>(2), B<fsetxattr>(2), etc.)  before being atomically linked into the "
7443 "filesystem in a fully formed state (using B<linkat>(2)  as described above)."
7444 msgstr ""
7445 "最初は見えないファイルを作成し、 それからデータを書き込んだり、適切なファイル"
7446 "システム属性を持つように調整したり (B<chown>(2), B<chmod>(2), "
7447 "B<fsetxattr>(2) など) した後、 準備が全て整った状態で (上述の B<linkat>(2) を"
7448 "使って) ファイルシステム内にアトミックにリンクを行う。"
7449
7450 #.  commit 99b6436bc29e4f10e4388c27a3e4810191cc4788
7451 #.  commit ab29743117f9f4c22ac44c13c1647fb24fb2bafe
7452 #. type: Plain text
7453 #: build/C/man2/open.2:718
7454 msgid ""
7455 "B<O_TMPFILE> requires support by the underlying filesystem; only a subset of "
7456 "Linux filesystems provide that support.  In the initial implementation, "
7457 "support was provided in the ext2, ext3, ext4, UDF, Minix, and shmem "
7458 "filesystems.  XFS support was added in Linux 3.15."
7459 msgstr ""
7460 "B<O_TMPFILE> は、 裏で利用されるファイルシステムによるサポートが必要である。 "
7461 "一部の Linux ファイルシステムだけがこの機能をサポートしている。 最初の実装で"
7462 "は、 ext2, ext3, ext4, UDF, Minix, shmem ファイルシステムがサポートしてい"
7463 "た。 XFS でのサポートが Linux 3.15 で追加された。"
7464
7465 #. type: TP
7466 #: build/C/man2/open.2:718
7467 #, no-wrap
7468 msgid "B<O_TRUNC>"
7469 msgstr "B<O_TRUNC>"
7470
7471 #. type: Plain text
7472 #: build/C/man2/open.2:732
7473 msgid ""
7474 "If the file already exists and is a regular file and the access mode allows "
7475 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
7476 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
7477 "ignored.  Otherwise, the effect of B<O_TRUNC> is unspecified."
7478 msgstr ""
7479 "ファイルが既に存在し、通常ファイルであり、 アクセスモードで書き込みが許可され"
7480 "ている (つまり、 B<O_RDWR> または B<O_WRONLY> の) 場合、長さ 0 に切り詰め "
7481 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
7482 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
7483 "ある。"
7484
7485 #. type: SS
7486 #: build/C/man2/open.2:732
7487 #, no-wrap
7488 msgid "creat()"
7489 msgstr "creat()"
7490
7491 #. type: Plain text
7492 #: build/C/man2/open.2:740
7493 msgid ""
7494 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
7495 "O_WRONLY|O_TRUNC>."
7496 msgstr ""
7497 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
7498 "を行うのと等価である。"
7499
7500 #. type: SS
7501 #: build/C/man2/open.2:740
7502 #, no-wrap
7503 msgid "openat()"
7504 msgstr "openat()"
7505
7506 #. type: Plain text
7507 #: build/C/man2/open.2:746
7508 msgid ""
7509 "The B<openat>()  system call operates in exactly the same way as B<open>(), "
7510 "except for the differences described here."
7511 msgstr ""
7512 "B<openat>() システムコールは B<open>() と全く同様に動作するが、以下で説明する"
7513 "点が異なる。"
7514
7515 #. type: Plain text
7516 #: build/C/man2/open.2:756
7517 msgid ""
7518 "If the pathname given in I<pathname> is relative, then it is interpreted "
7519 "relative to the directory referred to by the file descriptor I<dirfd> "
7520 "(rather than relative to the current working directory of the calling "
7521 "process, as is done by B<open>()  for a relative pathname)."
7522 msgstr ""
7523 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
7524 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
7525 "(B<open>() に相対パス名を渡した場合のように、呼び出したプロセスのカレントワー"
7526 "キングディレクトリに対する相対パスではない)。"
7527
7528 #. type: Plain text
7529 #: build/C/man2/open.2:768
7530 msgid ""
7531 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
7532 "then I<pathname> is interpreted relative to the current working directory of "
7533 "the calling process (like B<open>())."
7534 msgstr ""
7535 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
7536 "の場合、 (B<open>() と同様に) I<pathname> は呼び出したプロセスのカレントワー"
7537 "キングディレクトリに対する相対パスと解釈される。"
7538
7539 #. type: Plain text
7540 #: build/C/man2/open.2:774 build/C/man2/readlink.2:134
7541 msgid "If I<pathname> is absolute, then I<dirfd> is ignored."
7542 msgstr ""
7543 "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
7544
7545 #. type: Plain text
7546 #: build/C/man2/open.2:783
7547 msgid ""
7548 "B<open>(), B<openat>(), and B<creat>()  return the new file descriptor, or "
7549 "-1 if an error occurred (in which case, I<errno> is set appropriately)."
7550 msgstr ""
7551 "B<open>(), B<openat>(), B<creat>() は新しいファイルディスクリプターを返す。 "
7552 "エラーが発生した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
7553
7554 #. type: Plain text
7555 #: build/C/man2/open.2:789
7556 msgid ""
7557 "B<open>(), B<openat>(), and B<creat>()  can fail with the following errors:"
7558 msgstr "B<open>(), B<openat>(), B<creat>() は以下のエラーで失敗する。"
7559
7560 #. type: Plain text
7561 #: build/C/man2/open.2:798
7562 msgid ""
7563 "The requested access to the file is not allowed, or search permission is "
7564 "denied for one of the directories in the path prefix of I<pathname>, or the "
7565 "file did not exist yet and write access to the parent directory is not "
7566 "allowed.  (See also B<path_resolution>(7).)"
7567 msgstr ""
7568 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
7569 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
7570 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
7571 "すること。)"
7572
7573 #. type: Plain text
7574 #: build/C/man2/open.2:804
7575 msgid ""
7576 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
7577 "of disk blocks or inodes on the filesystem has been exhausted."
7578 msgstr ""
7579 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
7580 "inode がそのファイルシステムのユーザークォータに達していた。"
7581
7582 #. type: Plain text
7583 #: build/C/man2/open.2:810
7584 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
7585 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
7586
7587 #. type: Plain text
7588 #: build/C/man2/open.2:814 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:182
7589 msgid "I<pathname> points outside your accessible address space."
7590 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
7591
7592 #. type: TP
7593 #: build/C/man2/open.2:814 build/C/man2/write.2:145
7594 #, no-wrap
7595 msgid "B<EFBIG>"
7596 msgstr "B<EFBIG>"
7597
7598 #. type: Plain text
7599 #: build/C/man2/open.2:818
7600 msgid "See B<EOVERFLOW>."
7601 msgstr "B<EOVERFLOW> 参照。"
7602
7603 #. type: TP
7604 #: build/C/man2/open.2:818 build/C/man2/read.2:122 build/C/man3/scanf.3:561
7605 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
7606 #, no-wrap
7607 msgid "B<EINTR>"
7608 msgstr "B<EINTR>"
7609
7610 #. type: Plain text
7611 #: build/C/man2/open.2:825
7612 msgid ""
7613 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
7614 "see B<fifo>(7)), the call was interrupted by a signal handler; see "
7615 "B<signal>(7)."
7616 msgstr ""
7617 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
7618 "停止している間に システムコールがシグナルハンドラーにより割り込まれた。 "
7619 "B<signal>(7)  参照。"
7620
7621 #. type: Plain text
7622 #: build/C/man2/open.2:833
7623 msgid ""
7624 "The filesystem does not support the B<O_DIRECT> flag.  See B<NOTES> for more "
7625 "information."
7626 msgstr ""
7627 "ファイルシステムが B<O_DIRECT> フラグをサポートしていない。 詳細はB<注意>を参"
7628 "照。"
7629
7630 #.  In particular, __O_TMPFILE instead of O_TMPFILE
7631 #. type: Plain text
7632 #: build/C/man2/open.2:838
7633 msgid "Invalid value in I<flags>."
7634 msgstr "I<flags> に無効な値が入っている。"
7635
7636 #. type: Plain text
7637 #: build/C/man2/open.2:848
7638 msgid ""
7639 "B<O_TMPFILE> was specified in I<flags>, but neither B<O_WRONLY> nor "
7640 "B<O_RDWR> was specified."
7641 msgstr ""
7642 "I<flags> に B<O_TMPFILE> が指定されたが、 B<O_WRONLY> も B<O_RDWR> も指定され"
7643 "ていなかった。"
7644
7645 #. type: TP
7646 #: build/C/man2/open.2:848 build/C/man2/open.2:857 build/C/man2/read.2:158
7647 #: build/C/man2/rename.2:255 build/C/man2/unlink.2:185
7648 #: build/C/man2/unlink.2:256
7649 #, no-wrap
7650 msgid "B<EISDIR>"
7651 msgstr "B<EISDIR>"
7652
7653 #. type: Plain text
7654 #: build/C/man2/open.2:857
7655 msgid ""
7656 "I<pathname> refers to a directory and the access requested involved writing "
7657 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
7658 msgstr ""
7659 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
7660 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
7661
7662 #. type: Plain text
7663 #: build/C/man2/open.2:871
7664 msgid ""
7665 "I<pathname> refers to an existing directory, B<O_TMPFILE> and one of "
7666 "B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version "
7667 "does not provide the B<O_TMPFILE> functionality."
7668 msgstr ""
7669 "I<pathname> が存在するディレクトリを参照していて、 B<O_TMPFILE> および "
7670 "B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネル"
7671 "バージョンでは B<O_TMPFILE> 機能が提供されていない。"
7672
7673 #. type: Plain text
7674 #: build/C/man2/open.2:875 build/C/man2/rmdir.2:77
7675 msgid "Too many symbolic links were encountered in resolving I<pathname>."
7676 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
7677
7678 #. type: Plain text
7679 #: build/C/man2/open.2:884
7680 msgid ""
7681 "I<pathname> was a symbolic link, and I<flags> specified B<O_NOFOLLOW> but "
7682 "not B<O_PATH>."
7683 msgstr ""
7684 "I<pathname> がシンボリックリンクで、 I<flags> に B<O_NOFOLLOW> が指定された"
7685 "が、 B<O_PATH> が指定されていなかった。"
7686
7687 #. type: TP
7688 #: build/C/man2/open.2:884 build/C/man2/pipe.2:148 build/C/man3/tmpfile.3:66
7689 #, no-wrap
7690 msgid "B<EMFILE>"
7691 msgstr "B<EMFILE>"
7692
7693 #. type: Plain text
7694 #: build/C/man2/open.2:891
7695 msgid ""
7696 "The process already has the maximum number of files open (see the "
7697 "description of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
7698 msgstr ""
7699 "プロセスがオープンしているファイル数がすでに最大数に達している "
7700 "(B<getrlimit>(2) の B<RLIMIT_NOFILE> の説明を参照)。"
7701
7702 #. type: Plain text
7703 #: build/C/man2/open.2:895 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:197
7704 msgid "I<pathname> was too long."
7705 msgstr "I<pathname> が長過ぎる。"
7706
7707 #. type: TP
7708 #: build/C/man2/open.2:895 build/C/man2/pipe.2:151 build/C/man3/tmpfile.3:69
7709 #, no-wrap
7710 msgid "B<ENFILE>"
7711 msgstr "B<ENFILE>"
7712
7713 #. type: Plain text
7714 #: build/C/man2/open.2:898 build/C/man2/pipe.2:154
7715 msgid "The system limit on the total number of open files has been reached."
7716 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
7717
7718 #. type: TP
7719 #: build/C/man2/open.2:898
7720 #, no-wrap
7721 msgid "B<ENODEV>"
7722 msgstr "B<ENODEV>"
7723
7724 #. type: Plain text
7725 #: build/C/man2/open.2:905
7726 msgid ""
7727 "I<pathname> refers to a device special file and no corresponding device "
7728 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
7729 "returned.)"
7730 msgstr ""
7731 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
7732 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
7733 "るべきである)"
7734
7735 #. type: Plain text
7736 #: build/C/man2/open.2:912
7737 msgid ""
7738 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
7739 "component in I<pathname> does not exist or is a dangling symbolic link."
7740 msgstr ""
7741 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
7742 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
7743 "ンクである。"
7744
7745 #. type: Plain text
7746 #: build/C/man2/open.2:926
7747 msgid ""
7748 "I<pathname> refers to a nonexistent directory, B<O_TMPFILE> and one of "
7749 "B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version "
7750 "does not provide the B<O_TMPFILE> functionality."
7751 msgstr ""
7752 "I<pathname> が存在しないディレクトリを参照していて、 B<O_TMPFILE> および "
7753 "B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネル"
7754 "バージョンでは B<O_TMPFILE> 機能が提供されていない。"
7755
7756 #. type: Plain text
7757 #: build/C/man2/open.2:935
7758 msgid ""
7759 "I<pathname> was to be created but the device containing I<pathname> has no "
7760 "room for the new file."
7761 msgstr ""
7762 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
7763 "ファイルのための空き容量がない。"
7764
7765 #. type: Plain text
7766 #: build/C/man2/open.2:942
7767 msgid ""
7768 "A component used as a directory in I<pathname> is not, in fact, a directory, "
7769 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
7770 msgstr ""
7771 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
7772 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
7773
7774 #. type: Plain text
7775 #: build/C/man2/open.2:948
7776 msgid ""
7777 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO, and no process "
7778 "has the FIFO open for reading.  Or, the file is a device special file and no "
7779 "corresponding device exists."
7780 msgstr ""
7781 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
7782 "ファイルを読み込み用でオープンしている FIFO が存在しない。 または、ファイルが"
7783 "デバイススペシャルファイルで 対応するデバイスが存在しない。"
7784
7785 #. type: TP
7786 #: build/C/man2/open.2:948 build/C/man2/open_by_handle_at.2:301
7787 #, no-wrap
7788 msgid "B<EOPNOTSUPP>"
7789 msgstr "B<EOPNOTSUPP>"
7790
7791 #. type: Plain text
7792 #: build/C/man2/open.2:954
7793 msgid "The filesystem containing I<pathname> does not support B<O_TMPFILE>."
7794 msgstr ""
7795 "I<pathname> を含んでいるファイルシステムが B<O_TMPFILE> をサポートしていな"
7796 "い。"
7797
7798 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
7799 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
7800 #.  Reported 2006-10-03
7801 #. type: Plain text
7802 #: build/C/man2/open.2:974
7803 msgid ""
7804 "I<pathname> refers to a regular file that is too large to be opened.  The "
7805 "usual scenario here is that an application compiled on a 32-bit platform "
7806 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds "
7807 "I<(1E<lt>E<lt>31)-1> bytes; see also B<O_LARGEFILE> above.  This is the "
7808 "error specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the "
7809 "error B<EFBIG> for this case."
7810 msgstr ""
7811 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
7812 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
7813 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
7814 "ルサイズが I<(1E<lt>31)-1> バイトを超えるファイルを開こうとした場合である。 "
7815 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
7816 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
7817 "いた。"
7818
7819 #.  Strictly speaking, it's the filesystem UID... (MTK)
7820 #. type: Plain text
7821 #: build/C/man2/open.2:982
7822 msgid ""
7823 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
7824 "did not match the owner of the file and the caller was not privileged "
7825 "(B<CAP_FOWNER>)."
7826 msgstr ""
7827 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
7828 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
7829
7830 #. type: Plain text
7831 #: build/C/man2/open.2:986 build/C/man2/write.2:177
7832 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
7833 msgstr "操作が file seal により禁止されている。 B<fcntl>(2)  参照。"
7834
7835 #. type: Plain text
7836 #: build/C/man2/open.2:991
7837 msgid ""
7838 "I<pathname> refers to a file on a read-only filesystem and write access was "
7839 "requested."
7840 msgstr ""
7841 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
7842 "込みアクセスが要求された。"
7843
7844 #. type: TP
7845 #: build/C/man2/open.2:991
7846 #, no-wrap
7847 msgid "B<ETXTBSY>"
7848 msgstr "B<ETXTBSY>"
7849
7850 #. type: Plain text
7851 #: build/C/man2/open.2:996
7852 msgid ""
7853 "I<pathname> refers to an executable image which is currently being executed "
7854 "and write access was requested."
7855 msgstr ""
7856 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
7857
7858 #. type: TP
7859 #: build/C/man2/open.2:996
7860 #, no-wrap
7861 msgid "B<EWOULDBLOCK>"
7862 msgstr "B<EWOULDBLOCK>"
7863
7864 #. type: Plain text
7865 #: build/C/man2/open.2:1003
7866 msgid ""
7867 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
7868 "the file (see B<fcntl>(2))."
7869 msgstr ""
7870 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
7871 "ていた (B<fcntl>(2)  参照)。"
7872
7873 #. type: Plain text
7874 #: build/C/man2/open.2:1006
7875 msgid "The following additional errors can occur for B<openat>():"
7876 msgstr "B<openat>() では以下のエラーも発生する。"
7877
7878 #. type: Plain text
7879 #: build/C/man2/open.2:1010 build/C/man2/readlink.2:206
7880 #: build/C/man2/unlink.2:252
7881 msgid "I<dirfd> is not a valid file descriptor."
7882 msgstr "I<dirfd> が有効なファイルディスクリプターではない。"
7883
7884 #. type: Plain text
7885 #: build/C/man2/open.2:1016
7886 msgid ""
7887 "I<pathname> is a relative pathname and I<dirfd> is a file descriptor "
7888 "referring to a file other than a directory."
7889 msgstr ""
7890 "I<pathname> が相対パス名で、 I<dirfd> がディレクトリ以外のファイルを参照して"
7891 "いるファイルディスクリプターである。"
7892
7893 #. type: Plain text
7894 #: build/C/man2/open.2:1020
7895 msgid ""
7896 "B<openat>()  was added to Linux in kernel 2.6.16; library support was added "
7897 "to glibc in version 2.4."
7898 msgstr ""
7899 "B<openat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポー"
7900 "トはバージョン 2.4 で glibc に追加された。"
7901
7902 #. type: Plain text
7903 #: build/C/man2/open.2:1024
7904 msgid "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
7905 msgstr "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
7906
7907 #. type: Plain text
7908 #: build/C/man2/open.2:1027
7909 msgid "B<openat>(): POSIX.1-2008."
7910 msgstr "B<openat>(): POSIX.1-2008."
7911
7912 #. type: Plain text
7913 #: build/C/man2/open.2:1038
7914 msgid ""
7915 "The B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, and B<O_TMPFILE> flags are Linux-"
7916 "specific.  One must define B<_GNU_SOURCE> to obtain their definitions."
7917 msgstr ""
7918 "フラグ B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, B<O_TMPFILE> は Linux 特有のもの"
7919 "である。 これらのフラグの定義を得るためには B<_GNU_SOURCE> を定義しなければな"
7920 "らない。"
7921
7922 #. type: Plain text
7923 #: build/C/man2/open.2:1053
7924 msgid ""
7925 "The B<O_CLOEXEC>, B<O_DIRECTORY>, and B<O_NOFOLLOW> flags are not specified "
7926 "in POSIX.1-2001, but are specified in POSIX.1-2008.  Since glibc 2.12, one "
7927 "can obtain their definitions by defining either B<_POSIX_C_SOURCE> with a "
7928 "value greater than or equal to 200809L or B<_XOPEN_SOURCE> with a value "
7929 "greater than or equal to 700.  In glibc 2.11 and earlier, one obtains the "
7930 "definitions by defining B<_GNU_SOURCE>."
7931 msgstr ""
7932 "フラグ B<O_CLOEXEC>, B<O_DIRECTORY>, B<O_NOFOLLOW> は POSIX.1-2001 では規定さ"
7933 "れていないが、 POSIX.1-2008 では規定されている。 glibc 2.12 以降では、これら"
7934 "の定義を得るには、 B<_POSIX_C_SOURCE> を 200809L 以上の値で定義するか、 "
7935 "B<_XOPEN_SOURCE> を 700 以上の値で定義する。 glibc 2.11 以前では、 これらの定"
7936 "義を得るには B<_GNU_SOURCE> を定義する。"
7937
7938 #. type: Plain text
7939 #: build/C/man2/open.2:1064
7940 msgid ""
7941 "As noted in B<feature_test_macros>(7), feature test macros such as "
7942 "B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, and B<_GNU_SOURCE> must be defined "
7943 "before including I<any> header files."
7944 msgstr ""
7945 "B<feature_test_macros>(7) に注意書きがあるように、 B<_POSIX_C_SOURCE>, "
7946 "B<_XOPEN_SOURCE>, B<_GNU_SOURCE> などの機能検査マクロはI<どの>ヘッダーファイ"
7947 "ルをインクルードするより前に定義しなければならない。"
7948
7949 #. type: Plain text
7950 #: build/C/man2/open.2:1072
7951 msgid ""
7952 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
7953 "does not necessarily have the intention to read or write.  This is typically "
7954 "used to open devices in order to get a file descriptor for use with "
7955 "B<ioctl>(2)."
7956 msgstr ""
7957 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
7958 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
7959 "ファイルディスクリプターを取得するために、 デバイスをオープンするときによく用"
7960 "いられる。"
7961
7962 #.  Linux 2.0, 2.5: truncate
7963 #.  Solaris 5.7, 5.8: truncate
7964 #.  Irix 6.5: truncate
7965 #.  Tru64 5.1B: truncate
7966 #.  HP-UX 11.22: truncate
7967 #.  FreeBSD 4.7: truncate
7968 #. type: Plain text
7969 #: build/C/man2/open.2:1084
7970 msgid ""
7971 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
7972 "implementations.  On many systems the file is actually truncated."
7973 msgstr ""
7974 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
7975 "くのシステムではファイルは実際に切り詰められる。"
7976
7977 #. type: Plain text
7978 #: build/C/man2/open.2:1092
7979 msgid ""
7980 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7981 "create them; use B<mknod>(2)  instead."
7982 msgstr ""
7983 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7984 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7985 "用する。"
7986
7987 #. type: Plain text
7988 #: build/C/man2/open.2:1113
7989 msgid ""
7990 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7991 "fields (respectively, time of last access, time of last status change, and "
7992 "time of last modification; see B<stat>(2))  are set to the current time, and "
7993 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7994 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7995 "st_ctime and st_mtime fields are set to the current time."
7996 msgstr ""
7997 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7998 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7999 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
8000 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
8001 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
8002 "I<st_mtime> フィールドが現在時刻に設定される。"
8003
8004 #. type: SS
8005 #: build/C/man2/open.2:1113
8006 #, no-wrap
8007 msgid "Open file descriptions"
8008 msgstr "オープンファイル記述"
8009
8010 #. type: Plain text
8011 #: build/C/man2/open.2:1121
8012 msgid ""
8013 "The term open file description is the one used by POSIX to refer to the "
8014 "entries in the system-wide table of open files.  In other contexts, this "
8015 "object is variously also called an \"open file object\", a \"file handle\", "
8016 "an \"open file table entry\", or\\(emin kernel-developer parlance\\(ema "
8017 "I<struct file>."
8018 msgstr ""
8019 "オープンファイル記述という用語は POSIX で使用されている用語で、オープンされて"
8020 "いるファイルのシステム共通のテーブルのエントリーを参照するものである。 別の文"
8021 "脈では、このオブジェクトはいろいろな呼び方があり、 「オープンファイルオブジェ"
8022 "クト」、「ファイルハンドル」、「オープンファイルテーブルエントリー」、 カーネ"
8023 "ル開発者の用語では I<struct file> などと呼ばれる。"
8024
8025 #. type: Plain text
8026 #: build/C/man2/open.2:1134
8027 msgid ""
8028 "When a file descriptor is duplicated (using B<dup>(2)  or similar), the "
8029 "duplicate refers to the same open file description as the original file "
8030 "descriptor, and the two file descriptors consequently share the file offset "
8031 "and file status flags.  Such sharing can also occur between processes: a "
8032 "child process created via B<fork>(2)  inherits duplicates of its parent's "
8033 "file descriptors, and those duplicates refer to the same open file "
8034 "descriptions."
8035 msgstr ""
8036 "ファイルディスクリプターが (B<dup>(2) や同様のシステムコールを使って) 複製さ"
8037 "れる際に、 複製されたファイルディスクリプターは元のファイルディスクリプターと"
8038 "同じオープンファイル記述を参照する。 結果として 2 つのファイルディスクリプ"
8039 "ターはファイルオフセットとファイル状態フラグを共有する。 このような共有はプロ"
8040 "セス間でも起こり得る。 B<fork>(2) で作成された子プロセスは親プロセスのファイ"
8041 "ルディスクリプターの複製を継承し、これらの複製は同じオープンファイル記述を参"
8042 "照する。"
8043
8044 #. type: Plain text
8045 #: build/C/man2/open.2:1142
8046 msgid ""
8047 "Each B<open>(2)  of a file creates a new open file description; thus, there "
8048 "may be multiple open file descriptions corresponding to a file inode."
8049 msgstr ""
8050 "1 つのファイルに対して B<open>(2) を行う毎に、新しいオープンファイル記述が作"
8051 "成される。 したがって、 1 つのファイル inode に対して複数のオープンファイル記"
8052 "述が存在することがありえる。"
8053
8054 #. type: SS
8055 #: build/C/man2/open.2:1142
8056 #, no-wrap
8057 msgid "Synchronized I/O"
8058 msgstr "同期 I/O"
8059
8060 #. type: Plain text
8061 #: build/C/man2/open.2:1157
8062 msgid ""
8063 "The POSIX.1-2008 \"synchronized I/O\" option specifies different variants of "
8064 "synchronized I/O, and specifies the B<open>()  flags B<O_SYNC>, B<O_DSYNC>, "
8065 "and B<O_RSYNC> for controlling the behavior.  Regardless of whether an "
8066 "implementation supports this option, it must at least support the use of "
8067 "B<O_SYNC> for regular files."
8068 msgstr ""
8069 "POSIX.1-2008 の「同期 I/O」の選択肢として複数種類が規定されており、 動作を制"
8070 "御するために B<open>() フラグとして B<O_SYNC>, B<O_DSYNC>, B<O_RSYNC> が規定"
8071 "されている。 この選択肢を実装がサポートしているかに関わらず、 各実装では少な"
8072 "くとも通常のファイルに対して B<O_SYNC> が利用できなければならない。"
8073
8074 #. type: Plain text
8075 #: build/C/man2/open.2:1168
8076 msgid ""
8077 "Linux implements B<O_SYNC> and B<O_DSYNC>, but not B<O_RSYNC>.  (Somewhat "
8078 "incorrectly, glibc defines B<O_RSYNC> to have the same value as B<O_SYNC>.)"
8079 msgstr ""
8080 "Linux は B<O_SYNC> と B<O_DSYNC> を実装しているが、 B<O_RSYNC> は実装していな"
8081 "い (少し間違っているのだが、 glibc では B<O_RSYNC> が B<O_SYNC> と同じ値で定"
8082 "義されている)。"
8083
8084 #. type: Plain text
8085 #: build/C/man2/open.2:1186
8086 msgid ""
8087 "B<O_SYNC> provides synchronized I/O I<file> integrity completion, meaning "
8088 "write operations will flush data and all associated metadata to the "
8089 "underlying hardware.  B<O_DSYNC> provides synchronized I/O I<data> integrity "
8090 "completion, meaning write operations will flush data to the underlying "
8091 "hardware, but will only flush metadata updates that are required to allow a "
8092 "subsequent read operation to complete successfully.  Data integrity "
8093 "completion can reduce the number of disk operations that are required for "
8094 "applications that don't need the guarantees of file integrity completion."
8095 msgstr ""
8096 "B<O_SYNC> は、 同期 I/O でのI<ファイル>完全性完了を提供する。 つまり、 書き込"
8097 "み操作はデータとすべての関連メタデータを裏で利用されているハードウェアにフ"
8098 "ラッシュすることを意味する。 B<O_DSYNC> は、 同期 I/O でのI<データ>完全性完了"
8099 "を提供する。 つまり、 書き込み操作はデータを裏で利用されているハードウェアに"
8100 "フラッシュするが、 それ以降の読み出し操作が正常に完了するのに必要なメタデータ"
8101 "の更新のみをフラッシュする。 データ完全性完了は、 ファイル完全性完了を必要と"
8102 "しないアプリケーションで、 ディスク操作の数を減らすことができる。"
8103
8104 #. type: Plain text
8105 #: build/C/man2/open.2:1203
8106 msgid ""
8107 "To understand the difference between the two types of completion, consider "
8108 "two pieces of file metadata: the file last modification timestamp "
8109 "(I<st_mtime>)  and the file length.  All write operations will update the "
8110 "last file modification timestamp, but only writes that add data to the end "
8111 "of the file will change the file length.  The last modification timestamp is "
8112 "not needed to ensure that a read completes successfully, but the file length "
8113 "is.  Thus, B<O_DSYNC> would only guarantee to flush updates to the file "
8114 "length metadata (whereas B<O_SYNC> would also always flush the last "
8115 "modification timestamp metadata)."
8116 msgstr ""
8117 "2 種類の完了の違いを理解するために、 ファイルメタデータの 2 つの要素、 ファイ"
8118 "ルの最終修正時刻 (I<st_mtime>) とファイル長、を考える。 すべての書き込み操作"
8119 "は最終修正時刻を更新するが、 ファイルの末尾にデータを追加する書き込み操作のみ"
8120 "がファイル長を変更する。 最終修正時刻は、 読み出しが正常に完了するのに必要で"
8121 "はないが、 ファイル長は必要である。 したがって、 B<O_DSYNC> はファイル長のメ"
8122 "タデータの更新がフラッシュされることだけを保証する (これに対して B<O_SYNC> で"
8123 "は最終修正時刻のメタデータも常にフラッシュされる)。"
8124
8125 #. type: Plain text
8126 #: build/C/man2/open.2:1215
8127 msgid ""
8128 "Before Linux 2.6.33, Linux implemented only the B<O_SYNC> flag for "
8129 "B<open>().  However, when that flag was specified, most filesystems actually "
8130 "provided the equivalent of synchronized I/O I<data> integrity completion (i."
8131 "e., B<O_SYNC> was actually implemented as the equivalent of B<O_DSYNC>)."
8132 msgstr ""
8133 "Linux 2.6.33 より前では、 Linux は B<open>() では B<O_SYNC> フラグのみを実装"
8134 "していた。 しかしながら、 このフラグが指定された場合、 ほとんどのファイルシス"
8135 "テムで提供されていたのは実際には同期 I/O でのI<データ>完全性完了と等価なもの"
8136 "であった (つまり、 B<O_SYNC> は実際には B<O_DSYNC> と等価なものとして実装され"
8137 "ていた)。"
8138
8139 #. type: Plain text
8140 #: build/C/man2/open.2:1234
8141 msgid ""
8142 "Since Linux 2.6.33, proper B<O_SYNC> support is provided.  However, to "
8143 "ensure backward binary compatibility, B<O_DSYNC> was defined with the same "
8144 "value as the historical B<O_SYNC>, and B<O_SYNC> was defined as a new (two-"
8145 "bit) flag value that includes the B<O_DSYNC> flag value.  This ensures that "
8146 "applications compiled against new headers get at least B<O_DSYNC> semantics "
8147 "on pre-2.6.33 kernels."
8148 msgstr ""
8149 "Linux 2.6.33 行こう では、 正しい B<O_SYNC> のサポートが提供されている。 しか"
8150 "しながら、 バイナリレベルの後方互換性を保証するため、 B<O_DSYNC> は以前の "
8151 "B<O_SYNC> と同じ値で定義されており、 B<O_SYNC> は B<O_DSYNC> フラグの値を含む"
8152 "新しい (2 ビットの) フラグ値として定義されている。 これにより、 新しいヘッ"
8153 "ダーを使ってコンパイルされたアプリケーションで、 2.6.33 より前のカーネルで少"
8154 "なくとも B<O_DSYNC> の動作は同じになることが保証される。"
8155
8156 #. type: SS
8157 #: build/C/man2/open.2:1234
8158 #, no-wrap
8159 msgid "NFS"
8160 msgstr "NFS"
8161
8162 #. type: Plain text
8163 #: build/C/man2/open.2:1238
8164 msgid ""
8165 "There are many infelicities in the protocol underlying NFS, affecting "
8166 "amongst others B<O_SYNC> and B<O_NDELAY>."
8167 msgstr ""
8168 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
8169 "B<O_NDELAY> に影響する。"
8170
8171 #. type: Plain text
8172 #: build/C/man2/open.2:1253
8173 msgid ""
8174 "On NFS filesystems with UID mapping enabled, B<open>()  may return a file "
8175 "descriptor but, for example, B<read>(2)  requests are denied with "
8176 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
8177 "permissions, but UID mapping is performed by the server upon read and write "
8178 "requests."
8179 msgstr ""
8180 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
8181 "ディスクリプターを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合が"
8182 "ある。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行す"
8183 "るが、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
8184 "る。"
8185
8186 #. type: SS
8187 #: build/C/man2/open.2:1253
8188 #, no-wrap
8189 msgid "File access mode"
8190 msgstr "ファイルアクセスモード"
8191
8192 #. type: Plain text
8193 #: build/C/man2/open.2:1268
8194 msgid ""
8195 "Unlike the other values that can be specified in I<flags>, the I<access "
8196 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR> do not specify "
8197 "individual bits.  Rather, they define the low order two bits of I<flags>, "
8198 "and are defined respectively as 0, 1, and 2.  In other words, the "
8199 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
8200 "not have the same meaning as B<O_RDWR>."
8201 msgstr ""
8202 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
8203 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
8204 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
8205 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
8206 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。"
8207
8208 #.  See for example util-linux's disk-utils/setfdprm.c
8209 #.  For some background on access mode 3, see
8210 #.  http://thread.gmane.org/gmane.linux.kernel/653123
8211 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
8212 #.  LKML, 12 Mar 2008
8213 #. type: Plain text
8214 #: build/C/man2/open.2:1285
8215 msgid ""
8216 "Linux reserves the special, nonstandard access mode 3 (binary 11) in "
8217 "I<flags> to mean: check for read and write permission on the file and return "
8218 "a descriptor that can't be used for reading or writing.  This nonstandard "
8219 "access mode is used by some Linux drivers to return a descriptor that is to "
8220 "be used only for device-specific B<ioctl>(2)  operations."
8221 msgstr ""
8222 "Linux では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約"
8223 "されており I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの"
8224 "読み出し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディ"
8225 "スクリプターを返す。 この非標準のアクセスモードはいくつかの Linux ドライバ"
8226 "で、デバイス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプターを返すため"
8227 "に使われている。"
8228
8229 #. type: SS
8230 #: build/C/man2/open.2:1285
8231 #, no-wrap
8232 msgid "Rationale for openat() and other directory file descriptor APIs"
8233 msgstr "openat() や他のディレクトリファイルディスクリプター API の基本原理"
8234
8235 #. type: Plain text
8236 #: build/C/man2/open.2:1314
8237 msgid ""
8238 "B<openat>()  and the other system calls and library functions that take a "
8239 "directory file descriptor argument (i.e., B<execveat>(2), B<faccessat>(2), "
8240 "B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), "
8241 "B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), "
8242 "B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), "
8243 "B<unlinkat>(2), B<utimensat>(2)  B<mkfifoat>(3), and B<scandirat>(3))  are "
8244 "supported for two reasons.  Here, the explanation is in terms of the "
8245 "B<openat>()  call, but the rationale is analogous for the other interfaces."
8246 msgstr ""
8247 "B<openat>() やディレクトリファイルディスクリプターを引き数を取る他のシステム"
8248 "コールやライブラリ関数 (B<execveat>(2), B<faccessat>(2), "
8249 "B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), "
8250 "B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), "
8251 "B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), "
8252 "B<unlinkat>(2), B<utimensat>(2) B<mkfifoat>(3), B<scandirat>(3)) は二つの理由"
8253 "から用意されている。 ここでは、 B<openat> コールに関して説明するが、この基本"
8254 "原理は他のインターフェースでも同じである。"
8255
8256 #. type: Plain text
8257 #: build/C/man2/open.2:1345
8258 msgid ""
8259 "First, B<openat>()  allows an application to avoid race conditions that "
8260 "could occur when using B<open>()  to open files in directories other than "
8261 "the current working directory.  These race conditions result from the fact "
8262 "that some component of the directory prefix given to B<open>()  could be "
8263 "changed in parallel with the call to B<open>().  Suppose, for example, that "
8264 "we wish to create the file I<path/to/xxx.dep> if the file I<path/to/xxx> "
8265 "exists.  The problem is that between the existence check and the file "
8266 "creation step, I<path> or I<to> (which might be symbolic links)  could be "
8267 "modified to point to a different location.  Such races can be avoided by "
8268 "opening a file descriptor for the target directory, and then specifying that "
8269 "file descriptor as the I<dirfd> argument of (say)  B<fstatat>(2)  and "
8270 "B<openat>()."
8271 msgstr ""
8272 "最初の理由として、 B<openat>() を使うと、 アプリケーションは、 カレントワーキ"
8273 "ングディレクトリ以外のディレクトリで B<open>() を使ってファイルをオープンする"
8274 "際に起こり得る競合条件を避けることができる。 これらの競合条件は、 B<open>() "
8275 "に渡されたディレクトリプレフィックスの構成要素が B<open>() の呼び出しと並行し"
8276 "て変化する可能性があるという点に由来している。 例えば、ファイル I<path/to/"
8277 "xxx> が存在する場合にファイル I<path/to/xxx.dep> を作成したいとする。 問題"
8278 "は、存在確認とファイル作成の間に、 I<path> や I<to> (シンボリックリンクでもよ"
8279 "い) が別の場所を指すように変更されることがあるということだ。 このような競合条"
8280 "件は、 対象のディレクトリに対するファイルディスクリプターをオープンし、 それ"
8281 "から B<fstatat>(2) や B<openat>() の I<dirfd> 引き数としてそのファイルディス"
8282 "クリプターを指定することで、 避けることができる。"
8283
8284 #. type: Plain text
8285 #: build/C/man2/open.2:1356
8286 msgid ""
8287 "Second, B<openat>()  allows the implementation of a per-thread \"current "
8288 "working directory\", via file descriptor(s) maintained by the application.  "
8289 "(This functionality can also be obtained by tricks based on the use of I</"
8290 "proc/self/fd/>dirfd, but less efficiently.)"
8291 msgstr ""
8292 "二つ目として、 B<openat>() を使うと、アプリケーションが管理するファイルディス"
8293 "クリプターにより、 スレッド単位の「カレントワーキングディレクトリ」を実装する"
8294 "ことができる (この機能は、 I</proc/self/fd/dirfd> を使った方法でも実現するこ"
8295 "とができるが、 効率の面で落とる)。"
8296
8297 #. type: SS
8298 #: build/C/man2/open.2:1356
8299 #, no-wrap
8300 msgid "O_DIRECT"
8301 msgstr "O_DIRECT"
8302
8303 #. type: Plain text
8304 #: build/C/man2/open.2:1373
8305 msgid ""
8306 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
8307 "address of user-space buffers and the file offset of I/Os.  In Linux "
8308 "alignment restrictions vary by filesystem and kernel version and might be "
8309 "absent entirely.  However there is currently no filesystem-independent "
8310 "interface for an application to discover these restrictions for a given file "
8311 "or filesystem.  Some filesystems provide their own interfaces for doing so, "
8312 "for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
8313 msgstr ""
8314 "B<O_DIRECT> フラグを使用する場合、ユーザー空間バッファーの長さやアドレス、 I/"
8315 "O のファイルオフセットに関してアラインメントの制限が課されることがある。 "
8316 "Linux では、アラインメントの制限はファイルシステムやカーネルのバージョンに "
8317 "よって異なり、全く制限が存在しない場合もある。 しかしながら、現在のところ、指"
8318 "定されたファイルやファイルシステムに対して こうした制限があるかを見つけるため"
8319 "の、アプリケーション向けのインターフェースで ファイルシステム非依存のものは存"
8320 "在しない。 いくつかのファイルシステムでは、制限を確認するための独自のインター"
8321 "フェースが 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令"
8322 "である。"
8323
8324 #. type: Plain text
8325 #: build/C/man2/open.2:1383
8326 msgid ""
8327 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
8328 "the file offset must all be multiples of the logical block size of the "
8329 "filesystem.  Since Linux 2.6.0, alignment to the logical block size of the "
8330 "underlying storage (typically 512 bytes) suffices.  The logical block size "
8331 "can be determined using the B<ioctl>(2)  B<BLKSSZGET> operation or from the "
8332 "shell using the command:"
8333 msgstr ""
8334 "Linux 2.4 では、転送サイズ、 ユーザーバッファーのアライメント、ファイルオフ"
8335 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
8336 "Linux 2.6.0 以降では、 内部で使われるストレージの論理ブロックサイズのアライメ"
8337 "ント (通常は 512 バイト) で十分である。 論理ブロックサイズは B<ioctl>(2) "
8338 "B<BLKSSZGET> 操作や以下のシェルコマンドから知ることができる。"
8339
8340 #. type: Plain text
8341 #: build/C/man2/open.2:1385
8342 #, no-wrap
8343 msgid "    blockdev --getss\n"
8344 msgstr "    blockdev --getss\n"
8345
8346 #. type: Plain text
8347 #: build/C/man2/open.2:1419
8348 msgid ""
8349 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
8350 "system call, if the memory buffer is a private mapping (i.e., any mapping "
8351 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
8352 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
8353 "whether submitted via an asynchronous I/O interface or from another thread "
8354 "in the process, should be completed before B<fork>(2)  is called.  Failure "
8355 "to do so can result in data corruption and undefined behavior in parent and "
8356 "child processes.  This restriction does not apply when the memory buffer for "
8357 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
8358 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
8359 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
8360 "will not be available to the child after B<fork>(2)."
8361 msgstr ""
8362 "メモリーバッファーがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
8363 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
8364 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
8365 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリーや静的に\n"
8366 "割り当てたバッファーも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
8367 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
8368 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
8369 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
8370 "動作が起こる可能性がある。\n"
8371 "B<O_DIRECT> I/O 用のメモリーバッファーが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
8372 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
8373 "B<madvise>(2) でメモリーバッファーにアドバイス B<MADV_DONTFORK> が設定され\n"
8374 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリー\n"
8375 "バッファーが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
8376 "のである)。"
8377
8378 #. type: Plain text
8379 #: build/C/man2/open.2:1429
8380 msgid ""
8381 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
8382 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
8383 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
8384 "flag of the same name, but without alignment restrictions."
8385 msgstr ""
8386 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
8387 "(ユーザーバッファーの) アラインメントの制限がある。 また、IRIX には適切な配置"
8388 "とサイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前の"
8389 "フラグを導入したが、アラインメントの制限はない。"
8390
8391 #. type: Plain text
8392 #: build/C/man2/open.2:1438
8393 msgid ""
8394 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
8395 "Linux kernels simply ignore this flag.  Some filesystems may not implement "
8396 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
8397 msgstr ""
8398 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
8399 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
8400 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
8401 "と B<open>()  は B<EINVAL> で失敗する。"
8402
8403 #. type: Plain text
8404 #: build/C/man2/open.2:1449
8405 msgid ""
8406 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
8407 "file, and especially to overlapping byte regions in the same file.  Even "
8408 "when the filesystem correctly handles the coherency issues in this "
8409 "situation, overall I/O throughput is likely to be slower than using either "
8410 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
8411 "with direct I/O to the same files."
8412 msgstr ""
8413 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
8414 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
8415 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
8416 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
8417 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
8418 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
8419
8420 #. type: Plain text
8421 #: build/C/man2/open.2:1471
8422 msgid ""
8423 "The behavior of B<O_DIRECT> with NFS will differ from local filesystems.  "
8424 "Older kernels, or kernels configured in certain ways, may not support this "
8425 "combination.  The NFS protocol does not support passing the flag to the "
8426 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
8427 "the server may still cache the I/O.  The client asks the server to make the "
8428 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
8429 "servers will perform poorly under these circumstances, especially if the I/O "
8430 "size is small.  Some servers may also be configured to lie to clients about "
8431 "the I/O having reached stable storage; this will avoid the performance "
8432 "penalty at some risk to data integrity in the event of server power "
8433 "failure.  The Linux NFS client places no alignment restrictions on "
8434 "B<O_DIRECT> I/O."
8435 msgstr ""
8436 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
8437 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
8438 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
8439 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
8440 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
8441 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
8442 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
8443 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
8444 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
8445 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
8446 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
8447 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
8448
8449 #. type: Plain text
8450 #: build/C/man2/open.2:1478
8451 msgid ""
8452 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
8453 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
8454 "as a performance option which is disabled by default."
8455 msgstr ""
8456 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
8457 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
8458 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
8459
8460 #. type: Plain text
8461 #: build/C/man2/open.2:1483
8462 msgid ""
8463 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
8464 "interface is just stupid, and was probably designed by a deranged monkey on "
8465 "some serious mind-controlling substances.\"\\(emLinus"
8466 msgstr ""
8467 "「O_DIRECT でいつも困るのは、インターフェース全部が本当にお馬鹿な点だ。 たぶ"
8468 "ん危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
8469 "な」 \\(em Linus"
8470
8471 #.  FIXME . Check bugzilla report on open(O_ASYNC)
8472 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
8473 #. type: Plain text
8474 #: build/C/man2/open.2:1495
8475 msgid ""
8476 "Currently, it is not possible to enable signal-driven I/O by specifying "
8477 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
8478 msgstr ""
8479 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
8480 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
8481 "すること。"
8482
8483 #. type: Plain text
8484 #: build/C/man2/open.2:1503
8485 msgid ""
8486 "One must check for two different error codes, B<EISDIR> and B<ENOENT>, when "
8487 "trying to determine whether the kernel supports B<O_TMPFILE> functionality."
8488 msgstr ""
8489 "カーネルが B<O_TMPFILE> 機能をサポートしているかを判定する際に、 B<EISDIR> "
8490 "と B<ENOENT> の 2 つのエラーコードをチェックしなければならない。"
8491
8492 #. type: Plain text
8493 #: build/C/man2/open.2:1525
8494 msgid ""
8495 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
8496 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), "
8497 "B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
8498 "B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
8499 msgstr ""
8500 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
8501 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), "
8502 "B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
8503 "B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
8504
8505 #. type: TH
8506 #: build/C/man2/open_by_handle_at.2:25
8507 #, no-wrap
8508 msgid "OPEN_BY_HANDLE_AT"
8509 msgstr "OPEN_BY_HANDLE_AT"
8510
8511 #. type: Plain text
8512 #: build/C/man2/open_by_handle_at.2:29
8513 msgid ""
8514 "name_to_handle_at, open_by_handle_at - obtain handle for a pathname and open "
8515 "file via a handle"
8516 msgstr ""
8517 "name_to_handle_at, open_by_handle_at - パス名に対するハンドルの取得とハンドル"
8518 "によるファイルのオープン"
8519
8520 #. type: Plain text
8521 #: build/C/man2/open_by_handle_at.2:35
8522 #, no-wrap
8523 msgid ""
8524 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8525 "B<#include E<lt>sys/types.hE<gt>>\n"
8526 "B<#include E<lt>sys/stat.hE<gt>>\n"
8527 "B<#include E<lt>fcntl.hE<gt>>\n"
8528 msgstr ""
8529 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8530 "B<#include E<lt>sys/types.hE<gt>>\n"
8531 "B<#include E<lt>sys/stat.hE<gt>>\n"
8532 "B<#include E<lt>fcntl.hE<gt>>\n"
8533
8534 #. type: Plain text
8535 #: build/C/man2/open_by_handle_at.2:39
8536 #, no-wrap
8537 msgid ""
8538 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8539 "B<                      struct file_handle *>I<handle>B<,>\n"
8540 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
8541 msgstr ""
8542 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8543 "B<                      struct file_handle *>I<handle>B<,>\n"
8544 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
8545
8546 #. type: Plain text
8547 #: build/C/man2/open_by_handle_at.2:42
8548 #, no-wrap
8549 msgid ""
8550 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
8551 "B<                      int >I<flags>B<);>\n"
8552 msgstr ""
8553 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
8554 "B<                      int >I<flags>B<);>\n"
8555
8556 #. type: Plain text
8557 #: build/C/man2/open_by_handle_at.2:59
8558 msgid ""
8559 "The B<name_to_handle_at>()  and B<open_by_handle_at>()  system calls split "
8560 "the functionality of B<openat>(2)  into two parts: B<name_to_handle_at>()  "
8561 "returns an opaque handle that corresponds to a specified file; "
8562 "B<open_by_handle_at>()  opens the file corresponding to a handle returned by "
8563 "a previous call to B<name_to_handle_at>()  and returns an open file "
8564 "descriptor."
8565 msgstr ""
8566 "システムコール B<name_to_handle_at>() と B<open_by_handle_at>() は "
8567 "B<openat>(2) の機能を 2 つに分割したものである。 B<name_to_handle_at>() は指"
8568 "定されたファイルに対応するハンドルを返す。 B<open_by_handle_at>() は "
8569 "B<name_to_handle_at>() が返したハンドルに対応するファイルをオープンし、 オー"
8570 "プンされたファイルディスクリプターを返す。 "
8571
8572 #. type: SS
8573 #: build/C/man2/open_by_handle_at.2:59
8574 #, no-wrap
8575 msgid "name_to_handle_at()"
8576 msgstr "name_to_handle_at()"
8577
8578 #. type: Plain text
8579 #: build/C/man2/open_by_handle_at.2:71
8580 msgid ""
8581 "The B<name_to_handle_at>()  system call returns a file handle and a mount ID "
8582 "corresponding to the file specified by the I<dirfd> and I<pathname> "
8583 "arguments.  The file handle is returned via the argument I<handle>, which is "
8584 "a pointer to a structure of the following form:"
8585 msgstr ""
8586 "B<name_to_handle_at>() システムコールは、 引き数 I<dirfd> と I<pathname> で指"
8587 "定されるファイルに対応するファイルハンドルとマウント ID を返す。 ファイルハン"
8588 "ドルは引き数 I<handle> で返される。 I<handle> は以下の形式の構造体へのポイン"
8589 "ターである。"
8590
8591 #. type: Plain text
8592 #: build/C/man2/open_by_handle_at.2:80
8593 #, no-wrap
8594 msgid ""
8595 "struct file_handle {\n"
8596 "    unsigned int  handle_bytes;   /* Size of f_handle [in, out] */\n"
8597 "    int           handle_type;    /* Handle type [out] */\n"
8598 "    unsigned char f_handle[0];    /* File identifier (sized by\n"
8599 "                                     caller) [out] */\n"
8600 "};\n"
8601 msgstr ""
8602 "struct file_handle {\n"
8603 "    unsigned int  handle_bytes;   /* Size of f_handle [in, out] */\n"
8604 "    int           handle_type;    /* Handle type [out] */\n"
8605 "    unsigned char f_handle[0];    /* File identifier (sized by\n"
8606 "                                     caller) [out] */\n"
8607 "};\n"
8608
8609 #. type: Plain text
8610 #: build/C/man2/open_by_handle_at.2:99
8611 msgid ""
8612 "It is the caller's responsibility to allocate the structure with a size "
8613 "large enough to hold the handle returned in I<f_handle>.  Before the call, "
8614 "the I<handle_bytes> field should be initialized to contain the allocated "
8615 "size for I<f_handle>.  (The constant B<MAX_HANDLE_SZ>, defined in "
8616 "I<E<lt>fcntl.hE<gt>>, specifies the maximum possible size for a file "
8617 "handle.)  Upon successful return, the I<handle_bytes> field is updated to "
8618 "contain the number of bytes actually written to I<f_handle>."
8619 msgstr ""
8620 "I<f_handle> で返されるハンドルを保持するのに十分な大きさの構造体を確保するの"
8621 "は、 呼び出し元が責任をもって行う必要がある。 呼び出し前に、 I<handle_bytes> "
8622 "フィールドは I<f_handle> 用に格納されたサイズで初期化すべきである "
8623 "(I<E<lt>fcntl.hE<gt>> で定義されている定数 B<MAX_HANDLE_SZ> でファイルハンド"
8624 "ルの最大サイズが規定されている)。 呼び出しが成功でリターンする際、 "
8625 "I<handle_bytes> フィールドは I<f_handle> に実際に書き込まれたバイト数に更新さ"
8626 "れる。"
8627
8628 #. type: Plain text
8629 #: build/C/man2/open_by_handle_at.2:112
8630 msgid ""
8631 "The caller can discover the required size for the I<file_handle> structure "
8632 "by making a call in which I<handle-E<gt>handle_bytes> is zero; in this case, "
8633 "the call fails with the error B<EOVERFLOW> and I<handle-E<gt>handle_bytes> "
8634 "is set to indicate the required size; the caller can then use this "
8635 "information to allocate a structure of the correct size (see EXAMPLE below)."
8636 msgstr ""
8637 "呼び出し元では、 I<handle-E<gt>handle_bytes> を 0 に設定して呼び出しを行うこ"
8638 "とで、 I<file_handle> 構造体に必要なサイズを知ることができる。 この場合、 こ"
8639 "の呼び出しはエラー B<EOVERFLOW> で失敗し、 I<handle-E<gt>handle_bytes> に必要"
8640 "なサイズが設定される。 呼び出し元はこの情報を使って、正しいサイズの構造体を割"
8641 "り当てることができる (下記の「例」を参照)。"
8642
8643 #. type: Plain text
8644 #: build/C/man2/open_by_handle_at.2:123
8645 msgid ""
8646 "Other than the use of the I<handle_bytes> field, the caller should treat the "
8647 "I<file_handle> structure as an opaque data type: the I<handle_type> and "
8648 "I<f_handle> fields are needed only by a subsequent call to "
8649 "B<open_by_handle_at>()."
8650 msgstr ""
8651 "I<handle_bytes> フィールドを使用する以外は、 呼び出し元は I<file_handle> 構造"
8652 "体の内容を意識せずに扱うべきである。 フィールド I<handle_type> と "
8653 "I<f_handle> は後で B<open_by_handle_at>() を呼び出す場合にだけ必要である。"
8654
8655 #. type: Plain text
8656 #: build/C/man2/open_by_handle_at.2:131
8657 msgid ""
8658 "The I<flags> argument is a bit mask constructed by ORing together zero or "
8659 "more of B<AT_EMPTY_PATH> and B<AT_SYMLINK_FOLLOW>, described below."
8660 msgstr ""
8661 "I<flags> 引き数は、 下記の B<AT_EMPTY_PATH> と B<AT_SYMLINK_FOLLOW> のうち 0 "
8662 "個以上の論理和を取って構成されるビットマスクである。"
8663
8664 #. type: Plain text
8665 #: build/C/man2/open_by_handle_at.2:138
8666 msgid ""
8667 "Together, the I<pathname> and I<dirfd> arguments identify the file for which "
8668 "a handle is to be obtained.  There are four distinct cases:"
8669 msgstr ""
8670 "引き数 I<pathname> と I<dirfd> はその組み合わせでハンドルを取得するファイルを"
8671 "指定する。 以下の 4 つのパターンがある。"
8672
8673 #. type: Plain text
8674 #: build/C/man2/open_by_handle_at.2:146
8675 msgid ""
8676 "If I<pathname> is a nonempty string containing an absolute pathname, then a "
8677 "handle is returned for the file referred to by that pathname.  In this case, "
8678 "I<dirfd> is ignored."
8679 msgstr ""
8680 "I<pathname> が空でない文字列で絶対パス名を含む場合、 このパス名が参照するファ"
8681 "イルに対するハンドルが返される。"
8682
8683 #. type: Plain text
8684 #: build/C/man2/open_by_handle_at.2:157
8685 msgid ""
8686 "If I<pathname> is a nonempty string containing a relative pathname and "
8687 "I<dirfd> has the special value B<AT_FDCWD>, then I<pathname> is interpreted "
8688 "relative to the current working directory of the caller, and a handle is "
8689 "returned for the file to which it refers."
8690 msgstr ""
8691 "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> が特別な値 "
8692 "B<AT_FDCWD> の場合、 I<pathname> は呼び出し元のカレントワーキングディレクトリ"
8693 "に対する相対パスと解釈され、 そのファイルに対するハンドルが返される。"
8694
8695 #. type: Plain text
8696 #: build/C/man2/open_by_handle_at.2:170
8697 msgid ""
8698 "If I<pathname> is a nonempty string containing a relative pathname and "
8699 "I<dirfd> is a file descriptor referring to a directory, then I<pathname> is "
8700 "interpreted relative to the directory referred to by I<dirfd>, and a handle "
8701 "is returned for the file to which it refers.  (See B<openat>(2)  for an "
8702 "explanation of why \"directory file descriptors\" are useful.)"
8703 msgstr ""
8704 "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> がディレクトリを参"
8705 "照するファイルディスクリプターの場合、 I<pathname> は I<dirfd> が参照するディ"
8706 "レクトリに対する相対パスと解釈され、 そのファイルを参照するハンドルが返され"
8707 "る。(なぜ「ディレクトリファイルディスクリプター」が役に立つのかについては "
8708 "B<openat>(2) を参照。)"
8709
8710 #. type: Plain text
8711 #: build/C/man2/open_by_handle_at.2:184
8712 msgid ""
8713 "If I<pathname> is an empty string and I<flags> specifies the value "
8714 "B<AT_EMPTY_PATH>, then I<dirfd> can be an open file descriptor referring to "
8715 "any type of file, or B<AT_FDCWD>, meaning the current working directory, and "
8716 "a handle is returned for the file to which it refers."
8717 msgstr ""
8718 "I<pathname> が空の文字列で I<flags> に B<AT_EMPTY_PATH> が指定されている場"
8719 "合、 I<dirfd> には任意の種別のファイルを参照するオープンされたファイルディス"
8720 "クリプターか B<AT_FDCWD> (カレントワーキングディレクトリを意味する) を指定で"
8721 "き、 I<dirfd> が参照するファイルに対するハンドルが返される。"
8722
8723 #. type: Plain text
8724 #: build/C/man2/open_by_handle_at.2:196
8725 msgid ""
8726 "The I<mount_id> argument returns an identifier for the filesystem mount that "
8727 "corresponds to I<pathname>.  This corresponds to the first field in one of "
8728 "the records in I</proc/self/mountinfo>.  Opening the pathname in the fifth "
8729 "field of that record yields a file descriptor for the mount point; that file "
8730 "descriptor can be used in a subsequent call to B<open_by_handle_at>()."
8731 msgstr ""
8732 "I<mount_id> 引き数は、 I<pathname> に対応するファイルシステムのマウントの識別"
8733 "子を返す。 この識別子は I</proc/self/mountinfo> のいずれかのレコードの最初の"
8734 "フィールドに対応する。 対応するレコードの 5 番目のフィールドのパス名をオープ"
8735 "ンすると、 このマウントポイントのファイルディスクリプターが得られる。 この"
8736 "ファイルディスクリプターはこの後の B<open_by_handle_at>() の呼び出しで使用で"
8737 "きる。"
8738
8739 #. type: Plain text
8740 #: build/C/man2/open_by_handle_at.2:209
8741 msgid ""
8742 "By default, B<name_to_handle_at>()  does not dereference I<pathname> if it "
8743 "is a symbolic link, and thus returns a handle for the link itself.  If "
8744 "B<AT_SYMLINK_FOLLOW> is specified in I<flags>, I<pathname> is dereferenced "
8745 "if it is a symbolic link (so that the call returns a handle for the file "
8746 "referred to by the link)."
8747 msgstr ""
8748 "デフォルトでは、 B<name_to_handle_at>() は I<pathname> がシンボリックリンクの"
8749 "場合にその展開 (dereference) を行わず、 リンク自身に対するハンドルを返す。 "
8750 "B<AT_SYMLINK_FOLLOW> が I<flags> に指定されると、 I<pathname> がシンボリック"
8751 "リンクの場合にリンクの展開が行われる (リンクが参照するファイルに対するハンド"
8752 "ルが返される)。"
8753
8754 #. type: SS
8755 #: build/C/man2/open_by_handle_at.2:209
8756 #, no-wrap
8757 msgid "open_by_handle_at()"
8758 msgstr "open_by_handle_at()"
8759
8760 #. type: Plain text
8761 #: build/C/man2/open_by_handle_at.2:216
8762 msgid ""
8763 "The B<open_by_handle_at>()  system call opens the file referred to by "
8764 "I<handle>, a file handle returned by a previous call to "
8765 "B<name_to_handle_at>()."
8766 msgstr ""
8767 "B<open_by_handle_at>() システムコールは I<handle> が参照するファイルをオープ"
8768 "ンする。 I<handle> は 前に呼び出した B<name_to_handle_at>() が返したファイル"
8769 "ハンドルである。"
8770
8771 #. type: Plain text
8772 #: build/C/man2/open_by_handle_at.2:226
8773 msgid ""
8774 "The I<mount_fd> argument is a file descriptor for any object (file, "
8775 "directory, etc.)  in the mounted filesystem with respect to which I<handle> "
8776 "should be interpreted.  The special value B<AT_FDCWD> can be specified, "
8777 "meaning the current working directory of the caller."
8778 msgstr ""
8779 "I<mount_fd> 引き数は、 I<handle> がそのファイルシステムに関連すると解釈される"
8780 "マウントされたファイルシステム内の任意のオブジェクト (ファイル、 ディレクトリ"
8781 "など) のファイルディスクリプターである。 特別な値 B<AT_FDCWD> も指定できる。 "
8782 "この値は呼び出し元のカレントワーキングディレクトリを意味する。"
8783
8784 #. type: Plain text
8785 #: build/C/man2/open_by_handle_at.2:239
8786 msgid ""
8787 "The I<flags> argument is as for B<open>(2).  If I<handle> refers to a "
8788 "symbolic link, the caller must specify the B<O_PATH> flag, and the symbolic "
8789 "link is not dereferenced; the B<O_NOFOLLOW> flag, if specified, is ignored."
8790 msgstr ""
8791 "引き数 I<flags> は B<open>(2) と同じである。 I<handle> がシンボリックリンクを"
8792 "参照している場合、 呼び出し元は B<O_PATH> フラグを指定しなければならず、 その"
8793 "シンボリックリンクは展開されない。 B<O_NOFOLLOW> が指定された場合は、 "
8794 "B<O_NOFOLLOW> は無視される。"
8795
8796 #. type: Plain text
8797 #: build/C/man2/open_by_handle_at.2:245
8798 msgid ""
8799 "The caller must have the B<CAP_DAC_READ_SEARCH> capability to invoke "
8800 "B<open_by_handle_at>()."
8801 msgstr ""
8802 "B<open_by_handle_at>() を呼び出すには、 呼び出し元が B<CAP_DAC_READ_SEARCH> "
8803 "ケーパビリティーを持っていなければならない。"
8804
8805 #. type: Plain text
8806 #: build/C/man2/open_by_handle_at.2:252
8807 msgid ""
8808 "On success, B<name_to_handle_at>()  returns 0, and B<open_by_handle_at>()  "
8809 "returns a nonnegative file descriptor."
8810 msgstr ""
8811 "成功すると、 B<name_to_handle_at>() は 0 を返し、 B<open_by_handle_at>() は負"
8812 "でないファイルディスクリプターを返す。"
8813
8814 #. type: Plain text
8815 #: build/C/man2/open_by_handle_at.2:256
8816 msgid ""
8817 "In the event of an error, both system calls return -1 and set I<errno> to "
8818 "indicate the cause of the error."
8819 msgstr ""
8820 "エラーの場合、 どちらのシステムコールも -1 を返し、 I<errno> にエラーの原因を"
8821 "示す値を設定する。"
8822
8823 #. type: Plain text
8824 #: build/C/man2/open_by_handle_at.2:263
8825 msgid ""
8826 "B<name_to_handle_at>()  and B<open_by_handle_at>()  can fail for the same "
8827 "errors as B<openat>(2).  In addition, they can fail with the errors noted "
8828 "below."
8829 msgstr ""
8830 "B<name_to_handle_at>() と B<open_by_handle_at>() は B<openat>(2) と同じエラー"
8831 "で失敗する。 また、 これらのシステムコールは以下のエラーで失敗することもあ"
8832 "る。"
8833
8834 #. type: Plain text
8835 #: build/C/man2/open_by_handle_at.2:266
8836 msgid "B<name_to_handle_at>()  can fail with the following errors:"
8837 msgstr "B<name_to_handle_at>() は以下のエラーで失敗することがある。"
8838
8839 #. type: Plain text
8840 #: build/C/man2/open_by_handle_at.2:273
8841 msgid ""
8842 "I<pathname>, I<mount_id>, or I<handle> points outside your accessible "
8843 "address space."
8844 msgstr ""
8845 "I<pathname>, I<mount_id>, I<handle> のどれかがアクセス可能なアドレス空間の外"
8846 "を指している。"
8847
8848 #. type: Plain text
8849 #: build/C/man2/open_by_handle_at.2:277
8850 msgid "I<flags> includes an invalid bit value."
8851 msgstr "I<flags> に無効なビット値が含まれている。"
8852
8853 #. type: Plain text
8854 #: build/C/man2/open_by_handle_at.2:282
8855 msgid "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ>."
8856 msgstr "I<handle-E<gt>handle_bytes> が B<MAX_HANDLE_SZ> よりも大きい。"
8857
8858 #. type: Plain text
8859 #: build/C/man2/open_by_handle_at.2:289
8860 msgid ""
8861 "I<pathname> is an empty string, but B<AT_EMPTY_PATH> was not specified in "
8862 "I<flags>."
8863 msgstr ""
8864 "I<pathname> が空文字列だが、 I<flags> に B<AT_EMPTY_PATH> がされていなかっ"
8865 "た。"
8866
8867 #. type: Plain text
8868 #: build/C/man2/open_by_handle_at.2:301
8869 msgid ""
8870 "The file descriptor supplied in I<dirfd> does not refer to a directory, and "
8871 "it is not the case that both I<flags> includes B<AT_EMPTY_PATH> and "
8872 "I<pathname> is an empty string."
8873 msgstr ""
8874 "I<dirfd> で指定されたファイルディスクリプターがディレクトリを参照しておら"
8875 "ず、 両方の I<flags> に B<AT_EMPTY_PATH> が指定され、 かつ I<pathname> が空文"
8876 "字列である場合でもない。"
8877
8878 #. type: Plain text
8879 #: build/C/man2/open_by_handle_at.2:304
8880 msgid ""
8881 "The filesystem does not support decoding of a pathname to a file handle."
8882 msgstr ""
8883 "ファイルシステムがパス名をファイルハンドルへの変換をサポートしていない。"
8884
8885 #. type: Plain text
8886 #: build/C/man2/open_by_handle_at.2:314
8887 msgid ""
8888 "The I<handle-E<gt>handle_bytes> value passed into the call was too small.  "
8889 "When this error occurs, I<handle-E<gt>handle_bytes> is updated to indicate "
8890 "the required size for the handle."
8891 msgstr ""
8892 "呼び出しに渡された I<handle-E<gt>handle_bytes> の値が小さすぎた。 このエラー"
8893 "が発生した際、 I<handle-E<gt>handle_bytes> はハンドルに必要なサイズに更新され"
8894 "る。"
8895
8896 #. type: Plain text
8897 #: build/C/man2/open_by_handle_at.2:317
8898 msgid "B<open_by_handle_at>()  can fail with the following errors:"
8899 msgstr "B<open_by_handle_at>() は以下のエラーで失敗することがある。"
8900
8901 #. type: Plain text
8902 #: build/C/man2/open_by_handle_at.2:321
8903 msgid "I<mount_fd> is not an open file descriptor."
8904 msgstr "I<mount_fd> がオープンされたファイルディスクリプターでない。"
8905
8906 #. type: Plain text
8907 #: build/C/man2/open_by_handle_at.2:325
8908 msgid "I<handle> points outside your accessible address space."
8909 msgstr "I<handle> がアクセス可能なアドレス空間の外を指している。"
8910
8911 #. type: Plain text
8912 #: build/C/man2/open_by_handle_at.2:331
8913 msgid ""
8914 "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ> or is equal to "
8915 "zero."
8916 msgstr ""
8917 "I<handle-E<gt>handle_bytes> が B<MAX_HANDLE_SZ> より大きいか 0 に等しい。"
8918
8919 #. type: Plain text
8920 #: build/C/man2/open_by_handle_at.2:338
8921 msgid ""
8922 "I<handle> refers to a symbolic link, but B<O_PATH> was not specified in "
8923 "I<flags>."
8924 msgstr ""
8925 "I<handle> がシンボリックリンクを参照しているが、 I<flags> に B<O_PATH> がされ"
8926 "ていなかった。"
8927
8928 #. type: Plain text
8929 #: build/C/man2/open_by_handle_at.2:343
8930 msgid "The caller does not have the B<CAP_DAC_READ_SEARCH> capability."
8931 msgstr "呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていない。"
8932
8933 #. type: TP
8934 #: build/C/man2/open_by_handle_at.2:343
8935 #, no-wrap
8936 msgid "B<ESTALE>"
8937 msgstr "B<ESTALE>"
8938
8939 #. type: Plain text
8940 #: build/C/man2/open_by_handle_at.2:349
8941 msgid ""
8942 "The specified I<handle> is not valid.  This error will occur if, for "
8943 "example, the file has been deleted."
8944 msgstr ""
8945 "指定された I<handle> が有効ではない。 このエラーは、 例えばファイルが削除され"
8946 "た場合などに発生する。"
8947
8948 #. type: Plain text
8949 #: build/C/man2/open_by_handle_at.2:352
8950 msgid ""
8951 "These system calls first appeared in Linux 2.6.39.  Library support is "
8952 "provided in glibc since version 2.14."
8953 msgstr ""
8954 "これらのシステムコールは Linux 2.6.39 で初めて登場した。ライブラリによるサ"
8955 "ポートはバージョン 2.14 以降の glibc で提供されている。"
8956
8957 #. type: Plain text
8958 #: build/C/man2/open_by_handle_at.2:354
8959 msgid "These system calls are nonstandard Linux extensions."
8960 msgstr "これらのシステムコールは非標準の Linux の拡張である。"
8961
8962 #. type: Plain text
8963 #: build/C/man2/open_by_handle_at.2:359
8964 msgid ""
8965 "FreeBSD has a broadly similar pair of system calls in the form of "
8966 "B<getfh>()  and B<openfh>()."
8967 msgstr ""
8968 "FreeBSD には B<getfh>() と B<openfh>() というほとんど同じ機能のシステムコール"
8969 "のペアが存在する。"
8970
8971 #. type: Plain text
8972 #: build/C/man2/open_by_handle_at.2:364
8973 msgid ""
8974 "A file handle can be generated in one process using B<name_to_handle_at>()  "
8975 "and later used in a different process that calls B<open_by_handle_at>()."
8976 msgstr ""
8977 "あるプロセスで B<name_to_handle_at>() を使ってファイルハンドルを生成して、 そ"
8978 "のハンドルを別のプロセスの B<open_by_handle_at>() で使用することができる。"
8979
8980 #. type: Plain text
8981 #: build/C/man2/open_by_handle_at.2:370
8982 msgid ""
8983 "Some filesystem don't support the translation of pathnames to file handles, "
8984 "for example, I</proc>, I</sys>, and various network filesystems."
8985 msgstr ""
8986 "いくつかのファイルシステムでは、 パス名からファイルハンドルへの変換がサポート"
8987 "されていない。 例えば、 I</proc>, I</sys> や種々のネットワークファイルシステ"
8988 "ムなどである。"
8989
8990 #. type: Plain text
8991 #: build/C/man2/open_by_handle_at.2:377
8992 msgid ""
8993 "A file handle may become invalid (\"stale\") if a file is deleted, or for "
8994 "other filesystem-specific reasons.  Invalid handles are notified by an "
8995 "B<ESTALE> error from B<open_by_handle_at>()."
8996 msgstr ""
8997 "ファイルハンドルは、 ファイルが削除されたり、 その他のファイルシステム固有の"
8998 "理由で、 無効 (\"stale\") になる場合がある。 無効なハンドルであることは、 "
8999 "B<open_by_handle_at>() からエラー B<ESTALE> が返ることで通知される。"
9000
9001 #.  https://lwn.net/Articles/375888/
9002 #.      "Open by handle" - Jonathan Corbet, 2010-02-23
9003 #. type: Plain text
9004 #: build/C/man2/open_by_handle_at.2:387
9005 msgid ""
9006 "These system calls are designed for use by user-space file servers.  For "
9007 "example, a user-space NFS server might generate a file handle and pass it to "
9008 "an NFS client.  Later, when the client wants to open the file, it could pass "
9009 "the handle back to the server.  This sort of functionality allows a user-"
9010 "space file server to operate in a stateless fashion with respect to the "
9011 "files it serves."
9012 msgstr ""
9013 "これらのシステムコールは、 ユーザー空間のファイルサーバーでの使用を意図して設"
9014 "計されている。 例えば、 ユーザー空間 NFS サーバーがファイルハンドルを生成し"
9015 "て、 そのハンドルを NFS クライアントに渡すことができる。 その後、 クライアン"
9016 "トがファイルをオープンしようとした際に、 このハンドルをサーバーに送り返すこと"
9017 "ができる。 このような機能により、 ユーザー空間ファイルサーバーは、 そのサー"
9018 "バーが提供するファイルに関してステートレスで (状態を保持せずに) 動作すること"
9019 "ができる。"
9020
9021 #.  commit bcda76524cd1fa32af748536f27f674a13e56700
9022 #. type: Plain text
9023 #: build/C/man2/open_by_handle_at.2:409
9024 msgid ""
9025 "If I<pathname> refers to a symbolic link and I<flags> does not specify "
9026 "B<AT_SYMLINK_FOLLOW>, then B<name_to_handle_at>()  returns a handle for the "
9027 "link (rather than the file to which it refers).  The process receiving the "
9028 "handle can later perform operations on the symbolic link by converting the "
9029 "handle to a file descriptor using B<open_by_handle_at>()  with the B<O_PATH> "
9030 "flag, and then passing the file descriptor as the I<dirfd> argument in "
9031 "system calls such as B<readlinkat>(2)  and B<fchownat>(2)."
9032 msgstr ""
9033 "I<pathname> がシンボリックリンクを参照していて、 I<flags> に "
9034 "B<AT_SYMLINK_FOLLOW> が指定されていない場合、 B<name_to_handle_at>() は (シン"
9035 "ボリックが参照するファイルではなく) リンクに対するハンドルを返す。 ハンドルを"
9036 "受け取ったプロセスは、 B<open_by_handle_at>() の B<O_PATH> フラグを使ってハン"
9037 "ドルをファイルディスクリプターに変換し、 そのファイルディスクリプターを "
9038 "B<readlinkat>(2) や B<fchownat>(2) などのシステムコールの I<dirfd> 引き数とし"
9039 "て渡すことで、 そのシンボリックリンクに対して操作を行うことができる。"
9040
9041 #. type: SS
9042 #: build/C/man2/open_by_handle_at.2:409
9043 #, no-wrap
9044 msgid "Obtaining a persistent filesystem ID"
9045 msgstr "永続的なファイルシステム ID の取得"
9046
9047 #. type: Plain text
9048 #: build/C/man2/open_by_handle_at.2:423
9049 msgid ""
9050 "The mount IDs in I</proc/self/mountinfo> can be reused as filesystems are "
9051 "unmounted and mounted.  Therefore, the mount ID returned by "
9052 "B<name_to_handle_at>()  (in I<*mount_id>)  should not be treated as a "
9053 "persistent identifier for the corresponding mounted filesystem.  However, an "
9054 "application can use the information in the I<mountinfo> record that "
9055 "corresponds to the mount ID to derive a persistent identifier."
9056 msgstr ""
9057 "I</proc/self/mountinfo> のマウント ID は、 ファイルシステムのアンマウント、マ"
9058 "ウントが行われるに連れて再利用されることがある。 したがって、 "
9059 "B<name_to_handle_at>() (の I<*mount_id>) で返されたマウント ID は対応するマウ"
9060 "ントされたファイルシステムを表す永続的な ID と考えるべきではない。 ただし、 "
9061 "アプリケーションは、 マウント ID に対応する  I<mountinfo> レコードの情報を使"
9062 "うことで、 永続的な ID を得ることができる。"
9063
9064 #.  e.g., http://stackoverflow.com/questions/6748429/using-libblkid-to-find-uuid-of-a-partition
9065 #. type: Plain text
9066 #: build/C/man2/open_by_handle_at.2:439
9067 msgid ""
9068 "For example, one can use the device name in the fifth field of the "
9069 "I<mountinfo> record to search for the corresponding device UUID via the "
9070 "symbolic links in I</dev/disks/by-uuid>.  (A more comfortable way of "
9071 "obtaining the UUID is to use the B<libblkid>(3)  library.)  That process can "
9072 "then be reversed, using the UUID to look up the device name, and then "
9073 "obtaining the corresponding mount point, in order to produce the I<mount_fd> "
9074 "argument used by B<open_by_handle_at>()."
9075 msgstr ""
9076 "例えば、 I<mountinfo> レコードの 5 番目のフィールドのデバイス名を使って、 I</"
9077 "dev/disks/by-uuid> のシンボリックリンク経由で対応するデバイス UUID を検索でき"
9078 "る。 (UUID を取得するもっと便利な方法は B<libblkid>(3) ライブラリを使用するこ"
9079 "とである。) そのプロセスは、逆に、 この UUID を使ってデバイス名を検索し、 対"
9080 "応するマウントポイントを取得することで、 B<open_by_handle_at>() で使用する "
9081 "I<mount_fd> 引き数を生成することができる。"
9082
9083 #. type: Plain text
9084 #: build/C/man2/open_by_handle_at.2:451
9085 msgid ""
9086 "The two programs below demonstrate the use of B<name_to_handle_at>()  and "
9087 "B<open_by_handle_at>().  The first program (I<t_name_to_handle_at.c>)  uses "
9088 "B<name_to_handle_at>()  to obtain the file handle and mount ID for the file "
9089 "specified in its command-line argument; the handle and mount ID are written "
9090 "to standard output."
9091 msgstr ""
9092 "以下の 2 つのプログラムは B<name_to_handle_at>() と B<open_by_handle_at>() の"
9093 "使用例を示したものである。 最初のプログラム (I<t_name_to_handle_at.c>) は "
9094 "B<name_to_handle_at>() を使用して、 コマンドライン引き数で指定されたファイル"
9095 "に対応するファイルハンドルとマウント ID を取得する。 ハンドルとマウント ID は"
9096 "標準出力に出力される。"
9097
9098 #. type: Plain text
9099 #: build/C/man2/open_by_handle_at.2:471
9100 msgid ""
9101 "The second program (I<t_open_by_handle_at.c>)  reads a mount ID and file "
9102 "handle from standard input.  The program then employs "
9103 "B<open_by_handle_at>()  to open the file using that handle.  If an optional "
9104 "command-line argument is supplied, then the I<mount_fd> argument for "
9105 "B<open_by_handle_at>()  is obtained by opening the directory named in that "
9106 "argument.  Otherwise, I<mount_fd> is obtained by scanning I</proc/self/"
9107 "mountinfo> to find a record whose mount ID matches the mount ID read from "
9108 "standard input, and the mount directory specified in that record is opened.  "
9109 "(These programs do not deal with the fact that mount IDs are not persistent.)"
9110 msgstr ""
9111 "2 つ目のプログラム (I<t_open_by_handle_at.c>) は、 標準入力からマウント ID と"
9112 "ファイルハンドルを読み込む。 それから、 B<open_by_handle_at>() を利用して、 "
9113 "そのハンドルを使ってファイルをオープンする。 追加のコマンドライン引き数が指定"
9114 "された場合は、 B<open_by_handle_at>() の I<mount_fd> 引き数は、 この引き数で"
9115 "渡された名前のディレクトリをオープンして取得する。 それ以外の場合、 I</proc/"
9116 "self/mountinfo> からスキャンして標準入力から読み込んだマウント ID に一致する"
9117 "マウント ID を検索し、 そのレコードで指定されているマウントディレクトリをオー"
9118 "プンして、 I<mount_fd> を入手する。 (これらのプログラムではマウント ID が永続"
9119 "的ではない点についての対処は行わない。)"
9120
9121 #. type: Plain text
9122 #: build/C/man2/open_by_handle_at.2:473
9123 msgid "The following shell session demonstrates the use of these two programs:"
9124 msgstr "以下のシェルセッションは、これら 2 つのプログラムの使用例である。"
9125
9126 #. type: Plain text
9127 #: build/C/man2/open_by_handle_at.2:483
9128 #, no-wrap
9129 msgid ""
9130 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
9131 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
9132 "$ B<./t_open_by_handle_at E<lt> fh>\n"
9133 "open_by_handle_at: Operation not permitted\n"
9134 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
9135 "Read 31 bytes\n"
9136 "$ B<rm cecilia.txt>\n"
9137 msgstr ""
9138 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
9139 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
9140 "$ B<./t_open_by_handle_at E<lt> fh>\n"
9141 "open_by_handle_at: Operation not permitted\n"
9142 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
9143 "Read 31 bytes\n"
9144 "$ B<rm cecilia.txt>\n"
9145
9146 #.  Christoph Hellwig: That's why the file handles contain a generation
9147 #.  counter that gets incremented in this case.
9148 #. type: Plain text
9149 #: build/C/man2/open_by_handle_at.2:494
9150 msgid ""
9151 "Now we delete and (quickly) re-create the file so that it has the same "
9152 "content and (by chance) the same inode.  Nevertheless, "
9153 "B<open_by_handle_at>()  recognizes that the original file referred to by the "
9154 "file handle no longer exists."
9155 msgstr ""
9156 "ここで、 ファイルを削除し (すぐに) 再作成する。 同じ内容で (運がよければ) 同"
9157 "じ inode になる。 この場合でも、 B<open_by_handle_at>() はこのファイルハンド"
9158 "ルが参照する元のファイルがすでに存在しないことを認識する。"
9159
9160 #. type: Plain text
9161 #: build/C/man2/open_by_handle_at.2:505
9162 #, no-wrap
9163 msgid ""
9164 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
9165 "4072121\n"
9166 "$ B<rm cecilia.txt>\n"
9167 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
9168 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
9169 "4072121\n"
9170 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
9171 "open_by_handle_at: Stale NFS file handle\n"
9172 msgstr ""
9173 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
9174 "4072121\n"
9175 "$ B<rm cecilia.txt>\n"
9176 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
9177 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
9178 "4072121\n"
9179 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
9180 "open_by_handle_at: Stale NFS file handle\n"
9181
9182 #. type: SS
9183 #: build/C/man2/open_by_handle_at.2:507
9184 #, no-wrap
9185 msgid "Program source: t_name_to_handle_at.c"
9186 msgstr "プログラムのソース: t_name_to_handle_at.c"
9187
9188 #. type: Plain text
9189 #: build/C/man2/open_by_handle_at.2:519
9190 #, no-wrap
9191 msgid ""
9192 "#define _GNU_SOURCE\n"
9193 "#include E<lt>sys/types.hE<gt>\n"
9194 "#include E<lt>sys/stat.hE<gt>\n"
9195 "#include E<lt>fcntl.hE<gt>\n"
9196 "#include E<lt>stdio.hE<gt>\n"
9197 "#include E<lt>stdlib.hE<gt>\n"
9198 "#include E<lt>unistd.hE<gt>\n"
9199 "#include E<lt>errno.hE<gt>\n"
9200 "#include E<lt>string.hE<gt>\n"
9201 msgstr ""
9202 "#define _GNU_SOURCE\n"
9203 "#include E<lt>sys/types.hE<gt>\n"
9204 "#include E<lt>sys/stat.hE<gt>\n"
9205 "#include E<lt>fcntl.hE<gt>\n"
9206 "#include E<lt>stdio.hE<gt>\n"
9207 "#include E<lt>stdlib.hE<gt>\n"
9208 "#include E<lt>unistd.hE<gt>\n"
9209 "#include E<lt>errno.hE<gt>\n"
9210 "#include E<lt>string.hE<gt>\n"
9211
9212 #. type: Plain text
9213 #: build/C/man2/open_by_handle_at.2:522 build/C/man2/open_by_handle_at.2:595
9214 #, no-wrap
9215 msgid ""
9216 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9217 "                        } while (0)\n"
9218 msgstr ""
9219 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9220 "                        } while (0)\n"
9221
9222 #. type: Plain text
9223 #: build/C/man2/open_by_handle_at.2:529
9224 #, no-wrap
9225 msgid ""
9226 "int\n"
9227 "main(int argc, char *argv[])\n"
9228 "{\n"
9229 "    struct file_handle *fhp;\n"
9230 "    int mount_id, fhsize, flags, dirfd, j;\n"
9231 "    char *pathname;\n"
9232 msgstr ""
9233 "int\n"
9234 "main(int argc, char *argv[])\n"
9235 "{\n"
9236 "    struct file_handle *fhp;\n"
9237 "    int mount_id, fhsize, flags, dirfd, j;\n"
9238 "    char *pathname;\n"
9239
9240 #. type: Plain text
9241 #: build/C/man2/open_by_handle_at.2:534
9242 #, no-wrap
9243 msgid ""
9244 "    if (argc != 2) {\n"
9245 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
9246 "        exit(EXIT_FAILURE);\n"
9247 "    }\n"
9248 msgstr ""
9249 "    if (argc != 2) {\n"
9250 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
9251 "        exit(EXIT_FAILURE);\n"
9252 "    }\n"
9253
9254 #. type: Plain text
9255 #: build/C/man2/open_by_handle_at.2:536
9256 #, no-wrap
9257 msgid "    pathname = argv[1];\n"
9258 msgstr "    pathname = argv[1];\n"
9259
9260 #. type: Plain text
9261 #: build/C/man2/open_by_handle_at.2:538
9262 #, no-wrap
9263 msgid "    /* Allocate file_handle structure */\n"
9264 msgstr "    /* file_handle 構造体を確保する */\n"
9265
9266 #. type: Plain text
9267 #: build/C/man2/open_by_handle_at.2:543
9268 #, no-wrap
9269 msgid ""
9270 "    fhsize = sizeof(*fhp);\n"
9271 "    fhp = malloc(fhsize);\n"
9272 "    if (fhp == NULL)\n"
9273 "        errExit(\"malloc\");\n"
9274 msgstr ""
9275 "    fhsize = sizeof(*fhp);\n"
9276 "    fhp = malloc(fhsize);\n"
9277 "    if (fhp == NULL)\n"
9278 "        errExit(\"malloc\");\n"
9279
9280 #. type: Plain text
9281 #: build/C/man2/open_by_handle_at.2:546
9282 #, no-wrap
9283 msgid ""
9284 "    /* Make an initial call to name_to_handle_at() to discover\n"
9285 "       the size required for file handle */\n"
9286 msgstr ""
9287 "    /* name_to_handle_at() を最初に呼び出して\n"
9288 "       ファイルハンドルに必要なサイズを入手する */\n"
9289
9290 #. type: Plain text
9291 #: build/C/man2/open_by_handle_at.2:555
9292 #, no-wrap
9293 msgid ""
9294 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
9295 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
9296 "    fhp-E<gt>handle_bytes = 0;\n"
9297 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
9298 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
9299 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
9300 "        exit(EXIT_FAILURE);\n"
9301 "    }\n"
9302 msgstr ""
9303 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
9304 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
9305 "    fhp-E<gt>handle_bytes = 0;\n"
9306 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
9307 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
9308 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
9309 "        exit(EXIT_FAILURE);\n"
9310 "    }\n"
9311
9312 #. type: Plain text
9313 #: build/C/man2/open_by_handle_at.2:557
9314 #, no-wrap
9315 msgid "    /* Reallocate file_handle structure with correct size */\n"
9316 msgstr "    /* file_handle 構造体を正しいサイズに確保し直す */\n"
9317
9318 #. type: Plain text
9319 #: build/C/man2/open_by_handle_at.2:562
9320 #, no-wrap
9321 msgid ""
9322 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
9323 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
9324 "    if (fhp == NULL)\n"
9325 "        errExit(\"realloc\");\n"
9326 msgstr ""
9327 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
9328 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
9329 "    if (fhp == NULL)\n"
9330 "        errExit(\"realloc\");\n"
9331
9332 #. type: Plain text
9333 #: build/C/man2/open_by_handle_at.2:564
9334 #, no-wrap
9335 msgid "    /* Get file handle from pathname supplied on command line */\n"
9336 msgstr "    /* コマンドラインで指定されたパス名からファイルハンドルを取得 */\n"
9337
9338 #. type: Plain text
9339 #: build/C/man2/open_by_handle_at.2:567
9340 #, no-wrap
9341 msgid ""
9342 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
9343 "        errExit(\"name_to_handle_at\");\n"
9344 msgstr ""
9345 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
9346 "        errExit(\"name_to_handle_at\");\n"
9347
9348 #. type: Plain text
9349 #: build/C/man2/open_by_handle_at.2:570
9350 #, no-wrap
9351 msgid ""
9352 "    /* Write mount ID, file handle size, and file handle to stdout,\n"
9353 "       for later reuse by t_open_by_handle_at.c */\n"
9354 msgstr ""
9355 "    /* t_open_by_handle_at.c で後で再利用できるように、マウント ID、\n"
9356 "       ファイルハンドルのサイズ、ファイルハンドルを標準出力に書き出す */\n"
9357
9358 #. type: Plain text
9359 #: build/C/man2/open_by_handle_at.2:576
9360 #, no-wrap
9361 msgid ""
9362 "    printf(\"%d\\en\", mount_id);\n"
9363 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
9364 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9365 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
9366 "    printf(\"\\en\");\n"
9367 msgstr ""
9368 "    printf(\"%d\\en\", mount_id);\n"
9369 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
9370 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9371 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
9372 "    printf(\"\\en\");\n"
9373
9374 #. type: SS
9375 #: build/C/man2/open_by_handle_at.2:580
9376 #, no-wrap
9377 msgid "Program source: t_open_by_handle_at.c"
9378 msgstr "プログラムのソース: t_open_by_handle_at.c"
9379
9380 #. type: Plain text
9381 #: build/C/man2/open_by_handle_at.2:592
9382 #, no-wrap
9383 msgid ""
9384 "#define _GNU_SOURCE\n"
9385 "#include E<lt>sys/types.hE<gt>\n"
9386 "#include E<lt>sys/stat.hE<gt>\n"
9387 "#include E<lt>fcntl.hE<gt>\n"
9388 "#include E<lt>limits.hE<gt>\n"
9389 "#include E<lt>stdio.hE<gt>\n"
9390 "#include E<lt>stdlib.hE<gt>\n"
9391 "#include E<lt>unistd.hE<gt>\n"
9392 "#include E<lt>string.hE<gt>\n"
9393 msgstr ""
9394 "#define _GNU_SOURCE\n"
9395 "#include E<lt>sys/types.hE<gt>\n"
9396 "#include E<lt>sys/stat.hE<gt>\n"
9397 "#include E<lt>fcntl.hE<gt>\n"
9398 "#include E<lt>limits.hE<gt>\n"
9399 "#include E<lt>stdio.hE<gt>\n"
9400 "#include E<lt>stdlib.hE<gt>\n"
9401 "#include E<lt>unistd.hE<gt>\n"
9402 "#include E<lt>string.hE<gt>\n"
9403
9404 #. type: Plain text
9405 #: build/C/man2/open_by_handle_at.2:601
9406 #, no-wrap
9407 msgid ""
9408 "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
9409 "   \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
9410 "   \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
9411 "   Open the corresponding mount path and return the resulting file\n"
9412 "   descriptor. */\n"
9413 msgstr ""
9414 "/* /proc/self/mountinfo をスキャンして、マウント ID が \\(aqmount_id\\(aq に\n"
9415 "   一致する行を探す。 (もっと簡単な方法は \\(aqutil-linux\\(aq プロジェクト\n"
9416 "   が提供する \\(aqlibmount\\(aq ライブラリをインストールして使うことである)\n"
9417 "   対応するマウントパスをオープンし、得られたファイルディスクリプターを返す。 */\n"
9418
9419 #. type: Plain text
9420 #: build/C/man2/open_by_handle_at.2:611
9421 #, no-wrap
9422 msgid ""
9423 "static int\n"
9424 "open_mount_path_by_id(int mount_id)\n"
9425 "{\n"
9426 "    char *linep;\n"
9427 "    size_t lsize;\n"
9428 "    char mount_path[PATH_MAX];\n"
9429 "    int mi_mount_id, found;\n"
9430 "    ssize_t nread;\n"
9431 "    FILE *fp;\n"
9432 msgstr ""
9433 "static int\n"
9434 "open_mount_path_by_id(int mount_id)\n"
9435 "{\n"
9436 "    char *linep;\n"
9437 "    size_t lsize;\n"
9438 "    char mount_path[PATH_MAX];\n"
9439 "    int mi_mount_id, found;\n"
9440 "    ssize_t nread;\n"
9441 "    FILE *fp;\n"
9442
9443 #. type: Plain text
9444 #: build/C/man2/open_by_handle_at.2:615
9445 #, no-wrap
9446 msgid ""
9447 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
9448 "    if (fp == NULL)\n"
9449 "        errExit(\"fopen\");\n"
9450 msgstr ""
9451 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
9452 "    if (fp == NULL)\n"
9453 "        errExit(\"fopen\");\n"
9454
9455 #. type: Plain text
9456 #: build/C/man2/open_by_handle_at.2:622
9457 #, no-wrap
9458 msgid ""
9459 "    found = 0;\n"
9460 "    linep = NULL;\n"
9461 "    while (!found) {\n"
9462 "        nread = getline(&linep, &lsize, fp);\n"
9463 "        if (nread == -1)\n"
9464 "            break;\n"
9465 msgstr ""
9466 "    found = 0;\n"
9467 "    linep = NULL;\n"
9468 "    while (!found) {\n"
9469 "        nread = getline(&linep, &lsize, fp);\n"
9470 "        if (nread == -1)\n"
9471 "            break;\n"
9472
9473 #. type: Plain text
9474 #: build/C/man2/open_by_handle_at.2:629
9475 #, no-wrap
9476 msgid ""
9477 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
9478 "                       &mi_mount_id, mount_path);\n"
9479 "        if (nread != 2) {\n"
9480 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
9481 "            exit(EXIT_FAILURE);\n"
9482 "        }\n"
9483 msgstr ""
9484 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
9485 "                       &mi_mount_id, mount_path);\n"
9486 "        if (nread != 2) {\n"
9487 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
9488 "            exit(EXIT_FAILURE);\n"
9489 "        }\n"
9490
9491 #. type: Plain text
9492 #: build/C/man2/open_by_handle_at.2:634
9493 #, no-wrap
9494 msgid ""
9495 "        if (mi_mount_id == mount_id)\n"
9496 "            found = 1;\n"
9497 "    }\n"
9498 "    free(linep);\n"
9499 msgstr ""
9500 "        if (mi_mount_id == mount_id)\n"
9501 "            found = 1;\n"
9502 "    }\n"
9503 "    free(linep);\n"
9504
9505 #. type: Plain text
9506 #: build/C/man2/open_by_handle_at.2:636
9507 #, no-wrap
9508 msgid "    fclose(fp);\n"
9509 msgstr "    fclose(fp);\n"
9510
9511 #. type: Plain text
9512 #: build/C/man2/open_by_handle_at.2:641
9513 #, no-wrap
9514 msgid ""
9515 "    if (!found) {\n"
9516 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
9517 "        exit(EXIT_FAILURE);\n"
9518 "    }\n"
9519 msgstr ""
9520 "    if (!found) {\n"
9521 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
9522 "        exit(EXIT_FAILURE);\n"
9523 "    }\n"
9524
9525 #. type: Plain text
9526 #: build/C/man2/open_by_handle_at.2:644
9527 #, no-wrap
9528 msgid ""
9529 "    return open(mount_path, O_RDONLY);\n"
9530 "}\n"
9531 msgstr ""
9532 "    return open(mount_path, O_RDONLY);\n"
9533 "}\n"
9534
9535 #. type: Plain text
9536 #: build/C/man2/open_by_handle_at.2:655
9537 #, no-wrap
9538 msgid ""
9539 "int\n"
9540 "main(int argc, char *argv[])\n"
9541 "{\n"
9542 "    struct file_handle *fhp;\n"
9543 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
9544 "    ssize_t nread;\n"
9545 "    char buf[1000];\n"
9546 "#define LINE_SIZE 100\n"
9547 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
9548 "    char *nextp;\n"
9549 msgstr ""
9550 "int\n"
9551 "main(int argc, char *argv[])\n"
9552 "{\n"
9553 "    struct file_handle *fhp;\n"
9554 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
9555 "    ssize_t nread;\n"
9556 "    char buf[1000];\n"
9557 "#define LINE_SIZE 100\n"
9558 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
9559 "    char *nextp;\n"
9560
9561 #. type: Plain text
9562 #: build/C/man2/open_by_handle_at.2:660
9563 #, no-wrap
9564 msgid ""
9565 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
9566 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
9567 "        exit(EXIT_FAILURE);\n"
9568 "    }\n"
9569 msgstr ""
9570 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
9571 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
9572 "        exit(EXIT_FAILURE);\n"
9573 "    }\n"
9574
9575 #. type: Plain text
9576 #: build/C/man2/open_by_handle_at.2:662
9577 #, no-wrap
9578 msgid "    /* Standard input contains mount ID and file handle information:\n"
9579 msgstr "    /* マウント ID とファイルハンドル情報が入った標準入力:\n"
9580
9581 #. type: Plain text
9582 #: build/C/man2/open_by_handle_at.2:666
9583 #, no-wrap
9584 msgid ""
9585 "         Line 1: E<lt>mount_idE<gt>\n"
9586 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
9587 "    */\n"
9588 msgstr ""
9589 "         Line 1: E<lt>mount_idE<gt>\n"
9590 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
9591 "    */\n"
9592
9593 #. type: Plain text
9594 #: build/C/man2/open_by_handle_at.2:672
9595 #, no-wrap
9596 msgid ""
9597 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
9598 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
9599 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
9600 "        exit(EXIT_FAILURE);\n"
9601 "    }\n"
9602 msgstr ""
9603 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
9604 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
9605 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
9606 "        exit(EXIT_FAILURE);\n"
9607 "    }\n"
9608
9609 #. type: Plain text
9610 #: build/C/man2/open_by_handle_at.2:674
9611 #, no-wrap
9612 msgid "    mount_id = atoi(line1);\n"
9613 msgstr "    mount_id = atoi(line1);\n"
9614
9615 #. type: Plain text
9616 #: build/C/man2/open_by_handle_at.2:676
9617 #, no-wrap
9618 msgid "    handle_bytes = strtoul(line2, &nextp, 0);\n"
9619 msgstr "    handle_bytes = strtoul(line2, &nextp, 0);\n"
9620
9621 #. type: Plain text
9622 #: build/C/man2/open_by_handle_at.2:678
9623 #, no-wrap
9624 msgid "    /* Given handle_bytes, we can now allocate file_handle structure */\n"
9625 msgstr ""
9626 "    /* handle_bytes があれば、\n"
9627 "       file_handle 構造体をここで割り当てできる */\n"
9628
9629 #. type: Plain text
9630 #: build/C/man2/open_by_handle_at.2:682
9631 #, no-wrap
9632 msgid ""
9633 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
9634 "    if (fhp == NULL)\n"
9635 "        errExit(\"malloc\");\n"
9636 msgstr ""
9637 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
9638 "    if (fhp == NULL)\n"
9639 "        errExit(\"malloc\");\n"
9640
9641 #. type: Plain text
9642 #: build/C/man2/open_by_handle_at.2:684
9643 #, no-wrap
9644 msgid "    fhp-E<gt>handle_bytes = handle_bytes;\n"
9645 msgstr "    fhp-E<gt>handle_bytes = handle_bytes;\n"
9646
9647 #. type: Plain text
9648 #: build/C/man2/open_by_handle_at.2:686
9649 #, no-wrap
9650 msgid "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
9651 msgstr "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
9652
9653 #. type: Plain text
9654 #: build/C/man2/open_by_handle_at.2:689
9655 #, no-wrap
9656 msgid ""
9657 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9658 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
9659 msgstr ""
9660 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9661 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
9662
9663 #. type: Plain text
9664 #: build/C/man2/open_by_handle_at.2:694
9665 #, no-wrap
9666 msgid ""
9667 "    /* Obtain file descriptor for mount point, either by opening\n"
9668 "       the pathname specified on the command line, or by scanning\n"
9669 "       /proc/self/mounts to find a mount that matches the \\(aqmount_id\\(aq\n"
9670 "       that we received from stdin. */\n"
9671 msgstr ""
9672 "    /* マウントポイントのファイルディスクリプターを取得する。\n"
9673 "       取得は、コマンドラインで指定されたパス名をオープンするか、\n"
9674 "       /proc/self/mounts をスキャンして標準入力から受け取った\n"
9675 "       \\(aqmount_id\\(aq に一致するマウントを探すことで行う。 */\n"
9676
9677 #. type: Plain text
9678 #: build/C/man2/open_by_handle_at.2:699
9679 #, no-wrap
9680 msgid ""
9681 "    if (argc E<gt> 1)\n"
9682 "        mount_fd = open(argv[1], O_RDONLY);\n"
9683 "    else\n"
9684 "        mount_fd = open_mount_path_by_id(mount_id);\n"
9685 msgstr ""
9686 "    if (argc E<gt> 1)\n"
9687 "        mount_fd = open(argv[1], O_RDONLY);\n"
9688 "    else\n"
9689 "        mount_fd = open_mount_path_by_id(mount_id);\n"
9690
9691 #. type: Plain text
9692 #: build/C/man2/open_by_handle_at.2:702
9693 #, no-wrap
9694 msgid ""
9695 "    if (mount_fd == -1)\n"
9696 "        errExit(\"opening mount fd\");\n"
9697 msgstr ""
9698 "    if (mount_fd == -1)\n"
9699 "        errExit(\"opening mount fd\");\n"
9700
9701 #. type: Plain text
9702 #: build/C/man2/open_by_handle_at.2:704
9703 #, no-wrap
9704 msgid "    /* Open file using handle and mount point */\n"
9705 msgstr "    /* ハンドルとマウントポイントを使ってファイルをオープンする */\n"
9706
9707 #. type: Plain text
9708 #: build/C/man2/open_by_handle_at.2:708
9709 #, no-wrap
9710 msgid ""
9711 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
9712 "    if (fd == -1)\n"
9713 "        errExit(\"open_by_handle_at\");\n"
9714 msgstr ""
9715 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
9716 "    if (fd == -1)\n"
9717 "        errExit(\"open_by_handle_at\");\n"
9718
9719 #. type: Plain text
9720 #: build/C/man2/open_by_handle_at.2:710
9721 #, no-wrap
9722 msgid "    /* Try reading a few bytes from the file */\n"
9723 msgstr "    /* そのファイルからバイトを読み出す */\n"
9724
9725 #. type: Plain text
9726 #: build/C/man2/open_by_handle_at.2:714
9727 #, no-wrap
9728 msgid ""
9729 "    nread = read(fd, buf, sizeof(buf));\n"
9730 "    if (nread == -1)\n"
9731 "        errExit(\"read\");\n"
9732 msgstr ""
9733 "    nread = read(fd, buf, sizeof(buf));\n"
9734 "    if (nread == -1)\n"
9735 "        errExit(\"read\");\n"
9736
9737 #. type: Plain text
9738 #: build/C/man2/open_by_handle_at.2:716
9739 #, no-wrap
9740 msgid "    printf(\"Read %zd bytes\\en\", nread);\n"
9741 msgstr "    printf(\"Read %zd bytes\\en\", nread);\n"
9742
9743 #. type: Plain text
9744 #: build/C/man2/open_by_handle_at.2:726
9745 msgid "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
9746 msgstr "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
9747
9748 #. type: Plain text
9749 #: build/C/man2/open_by_handle_at.2:736
9750 msgid ""
9751 "The I<libblkid> and I<libmount> documentation in the latest I<util-linux> "
9752 "release at E<.UR https://www.kernel.org/pub/linux/utils/util-linux/> E<.UE>"
9753 msgstr ""
9754 "E<.UR https://www.kernel.org/pub/linux/utils/util-linux/> E<.UE> で入手できる"
9755 "最新の I<util-linux> リリースの I<libblkid> と I<libmount> のドキュメント。"
9756
9757 #. type: TH
9758 #: build/C/man3/perror.3:31
9759 #, no-wrap
9760 msgid "PERROR"
9761 msgstr "PERROR"
9762
9763 #. type: Plain text
9764 #: build/C/man3/perror.3:34
9765 msgid "perror - print a system error message"
9766 msgstr "perror - システムエラーメッセージを出力する"
9767
9768 #. type: Plain text
9769 #: build/C/man3/perror.3:38
9770 msgid "B<void perror(const char *>I<s>B<);>"
9771 msgstr "B<void perror(const char *>I<s>B<);>"
9772
9773 #. type: Plain text
9774 #: build/C/man3/perror.3:40
9775 msgid "B<#include E<lt>errno.hE<gt>>"
9776 msgstr "B<#include E<lt>errno.hE<gt>>"
9777
9778 #. type: Plain text
9779 #: build/C/man3/perror.3:42
9780 msgid "B<const char * const >I<sys_errlist>B<[];>"
9781 msgstr "B<const char * const >I<sys_errlist>B<[];>"
9782
9783 #. type: Plain text
9784 #: build/C/man3/perror.3:44
9785 msgid "B<int >I<sys_nerr>B<;>"
9786 msgstr "B<int >I<sys_nerr>B<;>"
9787
9788 #. type: Plain text
9789 #: build/C/man3/perror.3:46
9790 msgid "B<int >I<errno>B<; /* Not really declared this way; see errno(3). */>"
9791 msgstr ""
9792 "B<int >I<errno>B<; /* 実際にこのように宣言されているわけではない。 errno(3) "
9793 "参照 */>"
9794
9795 #. type: Plain text
9796 #: build/C/man3/perror.3:55
9797 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
9798 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
9799
9800 #. type: Plain text
9801 #: build/C/man3/perror.3:68
9802 msgid ""
9803 "The routine B<perror>()  produces a message on the standard error output, "
9804 "describing the last error encountered during a call to a system or library "
9805 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
9806 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
9807 "blank.  Then the message and a new-line."
9808 msgstr ""
9809 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
9810 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
9811 "(I<s> が NULL でなく、 I<*s> がヌルバイト (\\(aq\\e0\\(aq) でない場合には) 引"
9812 "き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それからメッ"
9813 "セージと改行が出力される。"
9814
9815 #. type: Plain text
9816 #: build/C/man3/perror.3:76
9817 msgid ""
9818 "To be of most use, the argument string should include the name of the "
9819 "function that incurred the error.  The error number is taken from the "
9820 "external variable I<errno>, which is set when errors occur but not cleared "
9821 "when successful calls are made."
9822 msgstr ""
9823 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
9824 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
9825 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
9826
9827 #. type: Plain text
9828 #: build/C/man3/perror.3:90
9829 msgid ""
9830 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
9831 "obtain the error message without the newline.  The largest message number "
9832 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
9833 "this list because new error values may not have been added to "
9834 "I<sys_errlist>[].  The use of I<sys_errlist>[] is nowadays deprecated."
9835 msgstr ""
9836 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
9837 "の\n"
9838 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
9839 "ジ\n"
9840 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
9841 "と。\n"
9842 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
9843 "る。\n"
9844 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
9845
9846 #. type: Plain text
9847 #: build/C/man3/perror.3:111
9848 msgid ""
9849 "When a system call fails, it usually returns -1 and sets the variable "
9850 "I<errno> to a value describing what went wrong.  (These values can be found "
9851 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
9852 "B<perror>()  serves to translate this error code into human-readable form.  "
9853 "Note that I<errno> is undefined after a successful library call: this call "
9854 "may well change this variable, even though it succeeds, for example because "
9855 "it internally used some other library function that failed.  Thus, if a "
9856 "failing call is not immediately followed by a call to B<perror>(), the value "
9857 "of I<errno> should be saved."
9858 msgstr ""
9859 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
9860 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
9861 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
9862 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
9863 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
9864 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
9865 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
9866 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
9867 "い。"
9868
9869 #. type: Plain text
9870 #: build/C/man3/perror.3:124
9871 msgid ""
9872 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
9873 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
9874 "I<sys_errlist> conform to BSD."
9875 msgstr ""
9876 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
9877 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
9878 "に準拠している。"
9879
9880 #.  and only when _BSD_SOURCE is defined.
9881 #.  When
9882 #.  .B _GNU_SOURCE
9883 #.  is defined, the symbols
9884 #.  .I _sys_nerr
9885 #.  and
9886 #.  .I _sys_errlist
9887 #.  are provided.
9888 #. type: Plain text
9889 #: build/C/man3/perror.3:139
9890 msgid ""
9891 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
9892 "I<E<lt>stdio.hE<gt>>."
9893 msgstr ""
9894 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
9895 "I<E<lt>stdio.hE<gt>> に含まれている。"
9896
9897 #. type: Plain text
9898 #: build/C/man3/perror.3:144
9899 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
9900 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
9901
9902 #. type: TH
9903 #: build/C/man2/pipe.2:36
9904 #, no-wrap
9905 msgid "PIPE"
9906 msgstr "PIPE"
9907
9908 #. type: TH
9909 #: build/C/man2/pipe.2:36 build/C/man3/printf.3:34
9910 #, no-wrap
9911 msgid "2014-07-08"
9912 msgstr "2014-07-08"
9913
9914 #. type: Plain text
9915 #: build/C/man2/pipe.2:39
9916 msgid "pipe, pipe2 - create pipe"
9917 msgstr "pipe, pipe2 - パイプを生成する"
9918
9919 #. type: Plain text
9920 #: build/C/man2/pipe.2:44
9921 #, no-wrap
9922 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
9923 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
9924
9925 #. type: Plain text
9926 #: build/C/man2/pipe.2:48
9927 #, no-wrap
9928 msgid ""
9929 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
9930 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
9931 "B<#include E<lt>unistd.hE<gt>>\n"
9932 msgstr ""
9933 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
9934 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
9935 "B<#include E<lt>unistd.hE<gt>>\n"
9936
9937 #. type: Plain text
9938 #: build/C/man2/pipe.2:50
9939 #, no-wrap
9940 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
9941 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
9942
9943 #. type: Plain text
9944 #: build/C/man2/pipe.2:66
9945 msgid ""
9946 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
9947 "for interprocess communication.  The array I<pipefd> is used to return two "
9948 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
9949 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
9950 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
9951 "until it is read from the read end of the pipe.  For further details, see "
9952 "B<pipe>(7)."
9953 msgstr ""
9954 "B<pipe>()  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
9955 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
9956 "ルディスクリプターを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し"
9957 "側、 I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれ"
9958 "たデータは、 パイプの読み出し側から読み出されるまでカーネルでバッファーリング"
9959 "される。 さらなる詳細は B<pipe>(7)  を参照のこと。"
9960
9961 #. type: Plain text
9962 #: build/C/man2/pipe.2:76
9963 msgid ""
9964 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
9965 "values can be bitwise ORed in I<flags> to obtain different behavior:"
9966 msgstr ""
9967 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
9968 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
9969 "きる。"
9970
9971 #. type: TP
9972 #: build/C/man2/pipe.2:76
9973 #, no-wrap
9974 msgid "B<O_CLOEXEC>"
9975 msgstr "B<O_CLOEXEC>"
9976
9977 #. type: Plain text
9978 #: build/C/man2/pipe.2:84
9979 msgid ""
9980 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
9981 "descriptors.  See the description of the same flag in B<open>(2)  for "
9982 "reasons why this may be useful."
9983 msgstr ""
9984 "新しく生成される二つのファイルディスクリプターの close-on-exec "
9985 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
9986 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
9987
9988 #. type: TP
9989 #: build/C/man2/pipe.2:84
9990 #, no-wrap
9991 msgid "B<O_DIRECT> (since Linux 3.4)"
9992 msgstr "B<O_DIRECT> (Linux 3.4 以降)"
9993
9994 #.  commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
9995 #. type: Plain text
9996 #: build/C/man2/pipe.2:94
9997 msgid ""
9998 "Create a pipe that performs I/O in \"packet\" mode.  Each B<write>(2)  to "
9999 "the pipe is dealt with as a separate packet, and B<read>(2)s from the pipe "
10000 "will read one packet at a time.  Note the following points:"
10001 msgstr ""
10002 "「パケット」モードで入出力を行うパイプを作成する。 このパイプへの "
10003 "B<write>(2) それぞれが別のパケットとして扱われ、 このパイプからの B<read>(2) "
10004 "では一度に一つパケットが読み出される。 以下の点に注意すること。"
10005
10006 #. type: Plain text
10007 #: build/C/man2/pipe.2:105
10008 msgid ""
10009 "Writes of greater than B<PIPE_BUF> bytes (see B<pipe>(7))  will be split "
10010 "into multiple packets.  The constant B<PIPE_BUF> is defined in I<E<lt>limits."
10011 "hE<gt>>."
10012 msgstr ""
10013 "B<PIPE_BUF> バイト (B<pipe>(7) 参照) より大きいデータを書き込んだ場合、複数の"
10014 "パケットに分割される。\n"
10015 "定数 B<PIPE_BUF> は I<E<lt>limits.hE<gt>> で定義されている。"
10016
10017 #. type: Plain text
10018 #: build/C/man2/pipe.2:115
10019 msgid ""
10020 "If a B<read>(2)  specifies a buffer size that is smaller than the next "
10021 "packet, then the requested number of bytes are read, and the excess bytes in "
10022 "the packet are discarded.  Specifying a buffer size of B<PIPE_BUF> will be "
10023 "sufficient to read the largest possible packets (see the previous point)."
10024 msgstr ""
10025 "B<read>(2) で次のパケットよりも小さなバッファーサイズを指定した場合、要求され"
10026 "たバイト数のデータが読み出され、そのパケットの超過分のバイトは破棄される。 可"
10027 "能性のある最大サイズのパケットを読み出すには、B<PIPE_BUF> のバッファーサイズ"
10028 "を指定すれば十分である (上の項目を参照)。"
10029
10030 #. type: Plain text
10031 #: build/C/man2/pipe.2:120
10032 msgid ""
10033 "Zero-length packets are not supported.  (A B<read>(2)  that specifies a "
10034 "buffer size of zero is a no-op, and returns 0.)"
10035 msgstr ""
10036 "長さ 0 のパケットはサポートされていない。 (バッファーサイズ 0 を指定した "
10037 "B<read>(2) は何も行わず 0 を返す)。"
10038
10039 #. type: Plain text
10040 #: build/C/man2/pipe.2:125
10041 msgid ""
10042 "Older kernels that do not support this flag will indicate this via an "
10043 "B<EINVAL> error."
10044 msgstr ""
10045 "このフラグをサポートしていない古いカーネルでは、エラー B<EINVAL> が返る。これ"
10046 "によりカーネルがサポートしていないことが分かる。"
10047
10048 #. type: TP
10049 #: build/C/man2/pipe.2:125
10050 #, no-wrap
10051 msgid "B<O_NONBLOCK>"
10052 msgstr "B<O_NONBLOCK>"
10053
10054 #. type: Plain text
10055 #: build/C/man2/pipe.2:133
10056 msgid ""
10057 "Set the B<O_NONBLOCK> file status flag on the two new open file "
10058 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
10059 "the same result."
10060 msgstr ""
10061 "新しく生成される二つのオープンファイル記述 (open file description) の "
10062 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
10063 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
10064 "なる。"
10065
10066 #. type: Plain text
10067 #: build/C/man2/pipe.2:143
10068 msgid "I<pipefd> is not valid."
10069 msgstr "I<pipefd> が無効な値である。"
10070
10071 #. type: Plain text
10072 #: build/C/man2/pipe.2:148
10073 msgid "(B<pipe2>())  Invalid value in I<flags>."
10074 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
10075
10076 #. type: Plain text
10077 #: build/C/man2/pipe.2:151
10078 msgid "Too many file descriptors are in use by the process."
10079 msgstr "このプロセスで使われているファイルディスクリプターが多すぎる。"
10080
10081 #. type: Plain text
10082 #: build/C/man2/pipe.2:159
10083 msgid ""
10084 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
10085 "starting with version 2.9."
10086 msgstr ""
10087 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
10088 "はバージョン 2.9 以降で利用できる。"
10089
10090 #. type: Plain text
10091 #: build/C/man2/pipe.2:162
10092 msgid "B<pipe>(): POSIX.1-2001."
10093 msgstr "B<pipe>(): POSIX.1-2001."
10094
10095 #. type: Plain text
10096 #: build/C/man2/pipe.2:165
10097 msgid "B<pipe2>()  is Linux-specific."
10098 msgstr "B<pipe2>()  は Linux 固有である。"
10099
10100 #.  fork.2 refers to this example program.
10101 #. type: Plain text
10102 #: build/C/man2/pipe.2:181
10103 msgid ""
10104 "The following program creates a pipe, and then B<fork>(2)s to create a child "
10105 "process; the child inherits a duplicate set of file descriptors that refer "
10106 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
10107 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
10108 "the string contained in the program's command-line argument to the pipe, and "
10109 "the child reads this string a byte at a time from the pipe and echoes it on "
10110 "standard output."
10111 msgstr ""
10112 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
10113 "る。 子プロセスは同じパイプを参照するファイルディスクリプター集合のコピーを "
10114 "継承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要が"
10115 "なくなったディスクリプターをクローズする。 親プロセスはプログラムのコマンドラ"
10116 "イン引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイ"
10117 "プから 1 バイトずつ読み込んで標準出力にエコーする。"
10118
10119 #. type: Plain text
10120 #: build/C/man2/pipe.2:189
10121 #, no-wrap
10122 msgid ""
10123 "#include E<lt>sys/types.hE<gt>\n"
10124 "#include E<lt>sys/wait.hE<gt>\n"
10125 "#include E<lt>stdio.hE<gt>\n"
10126 "#include E<lt>stdlib.hE<gt>\n"
10127 "#include E<lt>unistd.hE<gt>\n"
10128 "#include E<lt>string.hE<gt>\n"
10129 msgstr ""
10130 "#include E<lt>sys/types.hE<gt>\n"
10131 "#include E<lt>sys/wait.hE<gt>\n"
10132 "#include E<lt>stdio.hE<gt>\n"
10133 "#include E<lt>stdlib.hE<gt>\n"
10134 "#include E<lt>unistd.hE<gt>\n"
10135 "#include E<lt>string.hE<gt>\n"
10136
10137 #. type: Plain text
10138 #: build/C/man2/pipe.2:196
10139 #, no-wrap
10140 msgid ""
10141 "int\n"
10142 "main(int argc, char *argv[])\n"
10143 "{\n"
10144 "    int pipefd[2];\n"
10145 "    pid_t cpid;\n"
10146 "    char buf;\n"
10147 msgstr ""
10148 "int\n"
10149 "main(int argc, char *argv[])\n"
10150 "{\n"
10151 "    int pipefd[2];\n"
10152 "    pid_t cpid;\n"
10153 "    char buf;\n"
10154
10155 #. type: Plain text
10156 #: build/C/man2/pipe.2:201
10157 #, no-wrap
10158 msgid ""
10159 "    if (argc != 2) {\n"
10160 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
10161 "        exit(EXIT_FAILURE);\n"
10162 "    }\n"
10163 msgstr ""
10164 "    if (argc != 2) {\n"
10165 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
10166 "        exit(EXIT_FAILURE);\n"
10167 "    }\n"
10168
10169 #. type: Plain text
10170 #: build/C/man2/pipe.2:206
10171 #, no-wrap
10172 msgid ""
10173 "    if (pipe(pipefd) == -1) {\n"
10174 "        perror(\"pipe\");\n"
10175 "        exit(EXIT_FAILURE);\n"
10176 "    }\n"
10177 msgstr ""
10178 "    if (pipe(pipefd) == -1) {\n"
10179 "        perror(\"pipe\");\n"
10180 "        exit(EXIT_FAILURE);\n"
10181 "    }\n"
10182
10183 #. type: Plain text
10184 #: build/C/man2/pipe.2:212
10185 #, no-wrap
10186 msgid ""
10187 "    cpid = fork();\n"
10188 "    if (cpid == -1) {\n"
10189 "        perror(\"fork\");\n"
10190 "        exit(EXIT_FAILURE);\n"
10191 "    }\n"
10192 msgstr ""
10193 "    cpid = fork();\n"
10194 "    if (cpid == -1) {\n"
10195 "        perror(\"fork\");\n"
10196 "        exit(EXIT_FAILURE);\n"
10197 "    }\n"
10198
10199 #. type: Plain text
10200 #: build/C/man2/pipe.2:215
10201 #, no-wrap
10202 msgid ""
10203 "    if (cpid == 0) {    /* Child reads from pipe */\n"
10204 "        close(pipefd[1]);          /* Close unused write end */\n"
10205 msgstr ""
10206 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
10207 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
10208
10209 #. type: Plain text
10210 #: build/C/man2/pipe.2:218
10211 #, no-wrap
10212 msgid ""
10213 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
10214 "            write(STDOUT_FILENO, &buf, 1);\n"
10215 msgstr ""
10216 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
10217 "            write(STDOUT_FILENO, &buf, 1);\n"
10218
10219 #. type: Plain text
10220 #: build/C/man2/pipe.2:222
10221 #, no-wrap
10222 msgid ""
10223 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
10224 "        close(pipefd[0]);\n"
10225 "        _exit(EXIT_SUCCESS);\n"
10226 msgstr ""
10227 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
10228 "        close(pipefd[0]);\n"
10229 "        _exit(EXIT_SUCCESS);\n"
10230
10231 #. type: Plain text
10232 #: build/C/man2/pipe.2:231
10233 #, no-wrap
10234 msgid ""
10235 "    } else {            /* Parent writes argv[1] to pipe */\n"
10236 "        close(pipefd[0]);          /* Close unused read end */\n"
10237 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
10238 "        close(pipefd[1]);          /* Reader will see EOF */\n"
10239 "        wait(NULL);                /* Wait for child */\n"
10240 "        exit(EXIT_SUCCESS);\n"
10241 "    }\n"
10242 "}\n"
10243 msgstr ""
10244 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
10245 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
10246 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
10247 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
10248 "        wait(NULL);                /* 子プロセスを待つ */\n"
10249 "        exit(EXIT_SUCCESS);\n"
10250 "    }\n"
10251 "}\n"
10252
10253 #. type: Plain text
10254 #: build/C/man2/pipe.2:239
10255 msgid ""
10256 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), "
10257 "B<pipe>(7)"
10258 msgstr ""
10259 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), "
10260 "B<pipe>(7)"
10261
10262 #. type: TH
10263 #: build/C/man3/popen.3:40
10264 #, no-wrap
10265 msgid "POPEN"
10266 msgstr "POPEN"
10267
10268 #. type: Plain text
10269 #: build/C/man3/popen.3:43
10270 msgid "popen, pclose - pipe stream to or from a process"
10271 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
10272
10273 #. type: Plain text
10274 #: build/C/man3/popen.3:48
10275 #, no-wrap
10276 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
10277 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
10278
10279 #. type: Plain text
10280 #: build/C/man3/popen.3:50
10281 #, no-wrap
10282 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
10283 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
10284
10285 #. type: Plain text
10286 #: build/C/man3/popen.3:60
10287 msgid "B<popen>(), B<pclose>():"
10288 msgstr "B<popen>(), B<pclose>():"
10289
10290 #. type: Plain text
10291 #: build/C/man3/popen.3:62
10292 msgid ""
10293 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
10294 msgstr ""
10295 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
10296
10297 #. type: Plain text
10298 #: build/C/man3/popen.3:73
10299 msgid ""
10300 "The B<popen>()  function opens a process by creating a pipe, forking, and "
10301 "invoking the shell.  Since a pipe is by definition unidirectional, the "
10302 "I<type> argument may specify only reading or writing, not both; the "
10303 "resulting stream is correspondingly read-only or write-only."
10304 msgstr ""
10305 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
10306 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
10307 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
10308 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
10309 "たは 書き込み専用のいずれかとなる。"
10310
10311 #. type: Plain text
10312 #: build/C/man3/popen.3:97
10313 msgid ""
10314 "The I<command> argument is a pointer to a null-terminated string containing "
10315 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
10316 "flag; interpretation, if any, is performed by the shell.  The I<type> "
10317 "argument is a pointer to a null-terminated string which must contain either "
10318 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
10319 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
10320 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
10321 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
10322 "B<open>(2)  for reasons why this may be useful."
10323 msgstr ""
10324 "I<command> 引き数は、シェルのコマンドラインを含むヌル終端された文字列へのポイ"
10325 "ンターである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
10326 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、ヌ"
10327 "ル終端された文字列へのポインターで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
10328 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
10329 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
10330 "\\(aq を指定すると、 対応するファイルディスクリプターにおいて、 close-on-"
10331 "exec フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
10332 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
10333
10334 #. type: Plain text
10335 #: build/C/man3/popen.3:113
10336 msgid ""
10337 "The return value from B<popen>()  is a normal standard I/O stream in all "
10338 "respects save that it must be closed with B<pclose>()  rather than "
10339 "B<fclose>(3).  Writing to such a stream writes to the standard input of the "
10340 "command; the command's standard output is the same as that of the process "
10341 "that called B<popen>(), unless this is altered by the command itself.  "
10342 "Conversely, reading from the stream reads the command's standard output, and "
10343 "the command's standard input is the same as that of the process that called "
10344 "B<popen>()."
10345 msgstr ""
10346 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
10347 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
10348 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
10349 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 "
10350 "B<popen>()  を呼んだプロセスの標準出力と同じことになる。 逆に、 ストリームか"
10351 "らの読み込みは、 そのコマンドの標準出力を読み込むことになる。 そして、そのコ"
10352 "マンドの標準入力は B<popen>()  を呼んだプロセスの標準入力と同一である。"
10353
10354 #. type: Plain text
10355 #: build/C/man3/popen.3:117
10356 msgid "Note that output B<popen>()  streams are fully buffered by default."
10357 msgstr ""
10358 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファーリングされるこ"
10359 "とに注意しよう。"
10360
10361 #. type: Plain text
10362 #: build/C/man3/popen.3:123
10363 msgid ""
10364 "The B<pclose>()  function waits for the associated process to terminate and "
10365 "returns the exit status of the command as returned by B<wait4>(2)."
10366 msgstr ""
10367 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
10368 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
10369
10370 #. type: Plain text
10371 #: build/C/man3/popen.3:131
10372 msgid ""
10373 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
10374 "calls fail, or if it cannot allocate memory."
10375 msgstr ""
10376 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
10377 "や、 メモリー割り当てができなかった場合、 NULL を返す。"
10378
10379 #.  These conditions actually give undefined results, so I commented
10380 #.  them out.
10381 #.  .I stream
10382 #.  is not associated with a "popen()ed" command, if
10383 #. .I stream
10384 #.  already "pclose()d", or if
10385 #. type: Plain text
10386 #: build/C/man3/popen.3:146
10387 msgid ""
10388 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
10389 "some other error is detected.  In the event of an error, these functions set "
10390 "I<errno> to indicate the cause of the error."
10391 msgstr ""
10392 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
10393 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
10394 "る。"
10395
10396 #. type: Plain text
10397 #: build/C/man3/popen.3:165
10398 msgid ""
10399 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
10400 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
10401 "appropriately.  If the I<type> argument is invalid, and this condition is "
10402 "detected, I<errno> is set to B<EINVAL>."
10403 msgstr ""
10404 "B<popen>()  関数は、メモリーアロケーションに失敗しても I<errno> をセットしな"
10405 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
10406 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
10407 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
10408
10409 #. type: Plain text
10410 #: build/C/man3/popen.3:172
10411 msgid ""
10412 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
10413 msgstr ""
10414 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
10415 "B<ECHILD> にセットされる。"
10416
10417 #. type: Plain text
10418 #: build/C/man3/popen.3:178
10419 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
10420 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
10421
10422 #. type: Plain text
10423 #: build/C/man3/popen.3:191
10424 msgid ""
10425 "Since the standard input of a command opened for reading shares its seek "
10426 "offset with the process that called B<popen>(), if the original process has "
10427 "done a buffered read, the command's input position may not be as expected.  "
10428 "Similarly, the output from a command opened for writing may become "
10429 "intermingled with that of the original process.  The latter can be avoided "
10430 "by calling B<fflush>(3)  before B<popen>()."
10431 msgstr ""
10432 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
10433 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファーリング"
10434 "された読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なっ"
10435 "ていないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力"
10436 "は、 もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は "
10437 "B<popen>()  の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
10438
10439 #.  .SH HISTORY
10440 #.  A
10441 #.  .BR popen ()
10442 #.  and a
10443 #.  .BR pclose ()
10444 #.  function appeared in Version 7 AT&T UNIX.
10445 #. type: Plain text
10446 #: build/C/man3/popen.3:201
10447 msgid ""
10448 "Failure to execute the shell is indistinguishable from the shell's failure "
10449 "to execute command, or an immediate exit of the command.  The only hint is "
10450 "an exit status of 127."
10451 msgstr ""
10452 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
10453 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
10454 "なることである。"
10455
10456 #. type: Plain text
10457 #: build/C/man3/popen.3:211
10458 msgid ""
10459 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
10460 "B<fopen>(3), B<stdio>(3), B<system>(3)"
10461 msgstr ""
10462 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
10463 "B<fopen>(3), B<stdio>(3), B<system>(3)"
10464
10465 #. type: TH
10466 #: build/C/man3/printf.3:34
10467 #, no-wrap
10468 msgid "PRINTF"
10469 msgstr "PRINTF"
10470
10471 #. type: Plain text
10472 #: build/C/man3/printf.3:38
10473 msgid ""
10474 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
10475 "formatted output conversion"
10476 msgstr ""
10477 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
10478 "指定された書式に変換して出力を行う"
10479
10480 #. type: Plain text
10481 #: build/C/man3/printf.3:42
10482 msgid "B<int printf(const char *>I<format>B<, ...);>"
10483 msgstr "B<int printf(const char *>I<format>B<, ...);>"
10484
10485 #. type: Plain text
10486 #: build/C/man3/printf.3:44
10487 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
10488 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
10489
10490 #. type: Plain text
10491 #: build/C/man3/printf.3:46
10492 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
10493 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
10494
10495 #. type: Plain text
10496 #: build/C/man3/printf.3:48
10497 msgid ""
10498 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10499 "*>I<format>B<, ...);>"
10500 msgstr ""
10501 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10502 "*>I<format>B<, ...);>"
10503
10504 #. type: Plain text
10505 #: build/C/man3/printf.3:50
10506 msgid "B<#include E<lt>stdarg.hE<gt>>"
10507 msgstr "B<#include E<lt>stdarg.hE<gt>>"
10508
10509 #. type: Plain text
10510 #: build/C/man3/printf.3:52
10511 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
10512 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
10513
10514 #. type: Plain text
10515 #: build/C/man3/printf.3:54
10516 msgid ""
10517 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
10518 ">I<ap>B<);>"
10519 msgstr ""
10520 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
10521 ">I<ap>B<);>"
10522
10523 #. type: Plain text
10524 #: build/C/man3/printf.3:56
10525 msgid ""
10526 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
10527 msgstr ""
10528 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
10529
10530 #. type: Plain text
10531 #: build/C/man3/printf.3:59
10532 msgid ""
10533 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10534 "*>I<format>B<, va_list >I<ap>B<);>"
10535 msgstr ""
10536 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10537 "*>I<format>B<, va_list >I<ap>B<);>"
10538
10539 #. type: Plain text
10540 #: build/C/man3/printf.3:68
10541 msgid "B<snprintf>(), B<vsnprintf>():"
10542 msgstr "B<snprintf>(), B<vsnprintf>():"
10543
10544 #. type: Plain text
10545 #: build/C/man3/printf.3:71
10546 msgid ""
10547 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
10548 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
10549 msgstr ""
10550 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
10551 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
10552
10553 #. type: Plain text
10554 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
10555 msgid "or I<cc -std=c99>"
10556 msgstr "または I<cc -std=c99>"
10557
10558 #. type: Plain text
10559 #: build/C/man3/printf.3:101
10560 msgid ""
10561 "The functions in the B<printf>()  family produce output according to a "
10562 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
10563 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
10564 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
10565 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
10566 "string I<str>."
10567 msgstr ""
10568 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
10569 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
10570 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
10571 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
10572 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
10573
10574 #. type: Plain text
10575 #: build/C/man3/printf.3:110
10576 msgid ""
10577 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
10578 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
10579 msgstr ""
10580 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
10581 "む (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) もを含まれる)。"
10582
10583 #. type: Plain text
10584 #: build/C/man3/printf.3:134
10585 msgid ""
10586 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
10587 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
10588 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
10589 "instead of a variable number of arguments.  These functions do not call the "
10590 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
10591 "I<ap> is undefined after the call.  See B<stdarg>(3)."
10592 msgstr ""
10593 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
10594 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
10595 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
10596 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
10597 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 "
10598 "B<stdarg>(3)  を参照のこと。"
10599
10600 #. type: Plain text
10601 #: build/C/man3/printf.3:141
10602 msgid ""
10603 "These eight functions write the output under the control of a I<format> "
10604 "string that specifies how subsequent arguments (or arguments accessed via "
10605 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
10606 "output."
10607 msgstr ""
10608 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
10609 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
10610 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
10611
10612 #. type: Plain text
10613 #: build/C/man3/printf.3:152
10614 msgid ""
10615 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
10616 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
10617 "copying to take place between objects that overlap (e.g., if the target "
10618 "string array and one of the supplied input arguments refer to the same "
10619 "buffer).  See NOTES."
10620 msgstr ""
10621 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
10622 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
10623 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
10624 "引き数の一つが同じバッファーを参照している場合などである)。 「注意」の節を参"
10625 "照。"
10626
10627 #. type: SS
10628 #: build/C/man3/printf.3:152
10629 #, no-wrap
10630 msgid "Return value"
10631 msgstr "Return Values"
10632
10633 #. type: Plain text
10634 #: build/C/man3/printf.3:155
10635 msgid ""
10636 "Upon successful return, these functions return the number of characters "
10637 "printed (excluding the null byte used to end output to strings)."
10638 msgstr ""
10639 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
10640 "用するヌルバイトは数に含まれない)。"
10641
10642 #. type: Plain text
10643 #: build/C/man3/printf.3:171
10644 msgid ""
10645 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
10646 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
10647 "the output was truncated due to this limit, then the return value is the "
10648 "number of characters (excluding the terminating null byte)  which would have "
10649 "been written to the final string if enough space had been available.  Thus, "
10650 "a return value of I<size> or more means that the output was truncated.  (See "
10651 "also below under NOTES.)"
10652 msgstr ""
10653 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
10654 "ない (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) も含まれる)。 "
10655 "この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれば書き"
10656 "込まれたであろう文字の個数 (文字列を終端するヌルバイトを除く) を返す。 従っ"
10657 "て、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味する (後述"
10658 "の注意も参照のこと)。"
10659
10660 #. type: Plain text
10661 #: build/C/man3/printf.3:173
10662 msgid "If an output error is encountered, a negative value is returned."
10663 msgstr "エラーが発生した場合は、負の数を返す。"
10664
10665 #. type: SS
10666 #: build/C/man3/printf.3:173
10667 #, no-wrap
10668 msgid "Format of the format string"
10669 msgstr "フォーマット文字列のフォーマット"
10670
10671 #. type: Plain text
10672 #: build/C/man3/printf.3:195
10673 msgid ""
10674 "The format string is a character string, beginning and ending in its initial "
10675 "shift state, if any.  The format string is composed of zero or more "
10676 "directives: ordinary characters (not B<%>), which are copied unchanged to "
10677 "the output stream; and conversion specifications, each of which results in "
10678 "fetching zero or more subsequent arguments.  Each conversion specification "
10679 "is introduced by the character B<%>, and ends with a I<conversion "
10680 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
10681 "an optional minimum I<field width>, an optional I<precision> and an optional "
10682 "I<length modifier>."
10683 msgstr ""
10684 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
10685 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
10686 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
10687 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
10688 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
10689 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
10690 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
10691 "子> を (この順序で) 置くことができる。"
10692
10693 #. type: Plain text
10694 #: build/C/man3/printf.3:208
10695 msgid ""
10696 "The arguments must correspond properly (after type promotion) with the "
10697 "conversion specifier.  By default, the arguments are used in the order "
10698 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
10699 "next argument (and it is an error if insufficiently many arguments are "
10700 "given).  One can also specify explicitly which argument is taken, at each "
10701 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
10702 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
10703 "denotes the position in the argument list of the desired argument, indexed "
10704 "starting from 1.  Thus,"
10705 msgstr ""
10706 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
10707 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
10708 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
10709 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
10710 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
10711 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
10712 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
10713
10714 #. type: Plain text
10715 #: build/C/man3/printf.3:212
10716 #, no-wrap
10717 msgid "printf(\"%*d\", width, num);\n"
10718 msgstr "printf(\"%*d\", width, num);\n"
10719
10720 #. type: Plain text
10721 #: build/C/man3/printf.3:216
10722 msgid "and"
10723 msgstr "と"
10724
10725 #. type: Plain text
10726 #: build/C/man3/printf.3:220
10727 #, no-wrap
10728 msgid "printf(\"%2$*1$d\", width, num);\n"
10729 msgstr "printf(\"%2$*1$d\", width, num);\n"
10730
10731 #. type: Plain text
10732 #: build/C/man3/printf.3:236
10733 msgid ""
10734 "are equivalent.  The second style allows repeated references to the same "
10735 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
10736 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
10737 "\\(aq is used, it must be used throughout for all conversions taking an "
10738 "argument and all width and precision arguments, but it may be mixed with \"%%"
10739 "\" formats which do not consume an argument.  There may be no gaps in the "
10740 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
10741 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
10742 "format string."
10743 msgstr ""
10744 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
10745 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
10746 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
10747 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
10748 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
10749 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
10750 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
10751
10752 #. type: Plain text
10753 #: build/C/man3/printf.3:246
10754 msgid ""
10755 "For some numeric conversions a radix character (\"decimal point\") or "
10756 "thousands' grouping character is used.  The actual character used depends on "
10757 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
10758 "radix character, and does not have a grouping character.  Thus,"
10759 msgstr ""
10760 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
10761 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
10762 "\\(aq を用い、 区切り文字は使わない。 従って、"
10763
10764 #. type: Plain text
10765 #: build/C/man3/printf.3:250
10766 #, no-wrap
10767 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
10768 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
10769
10770 #. type: Plain text
10771 #: build/C/man3/printf.3:255
10772 msgid ""
10773 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
10774 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
10775 msgstr ""
10776 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
10777 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
10778
10779 #. type: SS
10780 #: build/C/man3/printf.3:255
10781 #, no-wrap
10782 msgid "The flag characters"
10783 msgstr "フラグ文字"
10784
10785 #. type: Plain text
10786 #: build/C/man3/printf.3:257
10787 msgid "The character % is followed by zero or more of the following flags:"
10788 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
10789
10790 #. type: TP
10791 #: build/C/man3/printf.3:257
10792 #, no-wrap
10793 msgid "B<#>"
10794 msgstr "B<#>"
10795
10796 #. type: Plain text
10797 #: build/C/man3/printf.3:291
10798 msgid ""
10799 "The value should be converted to an \"alternate form\".  For B<o> "
10800 "conversions, the first character of the output string is made zero (by "
10801 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
10802 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
10803 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
10804 "conversions, the result will always contain a decimal point, even if no "
10805 "digits follow it (normally, a decimal point appears in the results of those "
10806 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
10807 "trailing zeros are not removed from the result as they would otherwise be.  "
10808 "For other conversions, the result is undefined."
10809 msgstr ""
10810 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
10811 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
10812 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
10813 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
10814 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
10815 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
10816 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
10817 "変換では、結果は未定義である。"
10818
10819 #. type: TP
10820 #: build/C/man3/printf.3:291
10821 #, no-wrap
10822 msgid "B<\\&0>"
10823 msgstr "B<\\&0>"
10824
10825 #. type: Plain text
10826 #: build/C/man3/printf.3:331
10827 msgid ""
10828 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
10829 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
10830 "converted value is padded on the left with zeros rather than blanks.  If the "
10831 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
10832 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
10833 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
10834 "is undefined."
10835 msgstr ""
10836 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
10837 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
10838 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
10839 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
10840 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
10841 "である。"
10842
10843 #. type: TP
10844 #: build/C/man3/printf.3:331
10845 #, no-wrap
10846 msgid "B<->"
10847 msgstr "B<->"
10848
10849 #. type: Plain text
10850 #: build/C/man3/printf.3:342
10851 msgid ""
10852 "The converted value is to be left adjusted on the field boundary.  (The "
10853 "default is right justification.)  The converted value is padded on the right "
10854 "with blanks, rather than on the left with blanks or zeros.  A B<-> overrides "
10855 "a B<\\&0> if both are given."
10856 msgstr ""
10857 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 変換された"
10858 "値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> と B<\\&0> の両方が"
10859 "指定された場合には、 B<-> が優先される。"
10860
10861 #. type: TP
10862 #: build/C/man3/printf.3:342
10863 #, no-wrap
10864 msgid "B<\\(aq \\(aq>"
10865 msgstr "B<' '>"
10866
10867 #. type: Plain text
10868 #: build/C/man3/printf.3:346
10869 msgid ""
10870 "(a space) A blank should be left before a positive number (or empty string) "
10871 "produced by a signed conversion."
10872 msgstr ""
10873 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
10874 "列) が置かれる。"
10875
10876 #. type: TP
10877 #: build/C/man3/printf.3:346
10878 #, no-wrap
10879 msgid "B<+>"
10880 msgstr "B<+>"
10881
10882 #. type: Plain text
10883 #: build/C/man3/printf.3:354
10884 msgid ""
10885 "A sign (+ or -) should always be placed before a number produced by a signed "
10886 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
10887 "overrides a space if both are used."
10888 msgstr ""
10889 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
10890 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
10891 "が使われている場合には、 B<+> が優先される。"
10892
10893 #. type: Plain text
10894 #: build/C/man3/printf.3:357
10895 msgid ""
10896 "The five flag characters above are defined in the C99 standard.  The Single "
10897 "UNIX Specification specifies one further flag character."
10898 msgstr ""
10899 "上記の 5 つのフラグは C99 標準で定義されている。 Single UNIX Specified では、"
10900 "さらにもう一つフラグ文字が規定されている。"
10901
10902 #. type: TP
10903 #: build/C/man3/printf.3:357
10904 #, no-wrap
10905 msgid "B<\\(aq>"
10906 msgstr "B<\\(aq>"
10907
10908 #. type: Plain text
10909 #: build/C/man3/printf.3:374
10910 msgid ""
10911 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
10912 "output is to be grouped with thousands' grouping characters if the locale "
10913 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
10914 "parse this option and will issue a warning.  (SUSv2 did not include I<%"
10915 "\\(aqF>, but SUSv3 added it.)"
10916 msgstr ""
10917 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
10918 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
10919 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 "
10920 "(I<%\\(aqF> は SUSv2 には含まれていなかったが、 SUSv3 で追加された。"
10921
10922 #. type: Plain text
10923 #: build/C/man3/printf.3:376
10924 msgid "glibc 2.2 adds one further flag character."
10925 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
10926
10927 #. type: TP
10928 #: build/C/man3/printf.3:376
10929 #, no-wrap
10930 msgid "B<I>"
10931 msgstr "B<I>"
10932
10933 #.  outdigits keyword in locale file
10934 #. type: Plain text
10935 #: build/C/man3/printf.3:386
10936 msgid ""
10937 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
10938 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
10939 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
10940 msgstr ""
10941 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
10942 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
10943 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
10944
10945 #. type: SS
10946 #: build/C/man3/printf.3:386
10947 #, no-wrap
10948 msgid "The field width"
10949 msgstr "フィールド幅"
10950
10951 #. type: Plain text
10952 #: build/C/man3/printf.3:402
10953 msgid ""
10954 "An optional decimal digit string (with nonzero first digit) specifying a "
10955 "minimum field width.  If the converted value has fewer characters than the "
10956 "field width, it will be padded with spaces on the left (or right, if the "
10957 "left-adjustment flag has been given).  Instead of a decimal digit string one "
10958 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
10959 "the field width is given in the next argument, or in the I<m>-th argument, "
10960 "respectively, which must be of type I<int>.  A negative field width is taken "
10961 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
10962 "nonexistent or small field width cause truncation of a field; if the result "
10963 "of a conversion is wider than the field width, the field is expanded to "
10964 "contain the conversion result."
10965 msgstr ""
10966 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
10967 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
10968 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
10969 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
10970 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
10971 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
10972 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
10973 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
10974 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
10975 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
10976
10977 #. type: SS
10978 #: build/C/man3/printf.3:402
10979 #, no-wrap
10980 msgid "The precision"
10981 msgstr "精度"
10982
10983 #. type: Plain text
10984 #: build/C/man3/printf.3:439
10985 msgid ""
10986 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
10987 "optional decimal digit string.  Instead of a decimal digit string one may "
10988 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
10989 "precision is given in the next argument, or in the m-th argument, "
10990 "respectively, which must be of type I<int>.  If the precision is given as "
10991 "just \\(aq.\\(aq, the precision is taken to be zero.  A negative precision "
10992 "is taken as if the precision were omitted.  This gives the minimum number of "
10993 "digits to appear for B<d>, B<i>, B<o>, B<u>, B<x>, and B<X> conversions, the "
10994 "number of digits to appear after the radix character for B<a>, B<A>, B<e>, "
10995 "B<E>, B<f>, and B<F> conversions, the maximum number of significant digits "
10996 "for B<g> and B<G> conversions, or the maximum number of characters to be "
10997 "printed from a string for B<s> and B<S> conversions."
10998 msgstr ""
10999 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
11000 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
11001 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
11002 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
11003 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定された場合、 精度は"
11004 "ゼロとみなされる。 精度が負の数だった場合、 精度は指定されなかったものとみな"
11005 "される。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換では、表示される最小の桁数を"
11006 "指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> 変換では、小数点以下に表示され"
11007 "る数字の桁数を指定する。 B<g> と B<G> 変換では、有効数字の最大桁数を指定す"
11008 "る。 B<s> と B<S> 変換では、文字列から出力される最大文字数を指定する。"
11009
11010 #. type: SS
11011 #: build/C/man3/printf.3:439
11012 #, no-wrap
11013 msgid "The length modifier"
11014 msgstr "長さ修飾子"
11015
11016 #. type: Plain text
11017 #: build/C/man3/printf.3:449
11018 msgid ""
11019 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
11020 "B<X> conversion."
11021 msgstr ""
11022 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
11023
11024 #. type: TP
11025 #: build/C/man3/printf.3:449 build/C/man3/scanf.3:294
11026 #, no-wrap
11027 msgid "B<hh>"
11028 msgstr "B<hh>"
11029
11030 #. type: Plain text
11031 #: build/C/man3/printf.3:460
11032 msgid ""
11033 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
11034 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
11035 "I<signed char> argument."
11036 msgstr ""
11037 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
11038 "に対応する引き数が I<signed char> へのポインターであることを示す。"
11039
11040 #. type: TP
11041 #: build/C/man3/printf.3:460 build/C/man3/scanf.3:284
11042 #, no-wrap
11043 msgid "B<h>"
11044 msgstr "B<h>"
11045
11046 #. type: Plain text
11047 #: build/C/man3/printf.3:471
11048 msgid ""
11049 "A following integer conversion corresponds to a I<short int> or I<unsigned "
11050 "short int> argument, or a following B<n> conversion corresponds to a pointer "
11051 "to a I<short int> argument."
11052 msgstr ""
11053 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
11054 "換に対応する引き数が I<short int> へのポインターであることを示す。"
11055
11056 #. type: TP
11057 #: build/C/man3/printf.3:471 build/C/man3/scanf.3:311
11058 #, no-wrap
11059 msgid "B<l>"
11060 msgstr "B<l>"
11061
11062 #. type: Plain text
11063 #: build/C/man3/printf.3:490
11064 msgid ""
11065 "(ell) A following integer conversion corresponds to a I<long int> or "
11066 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
11067 "a pointer to a I<long int> argument, or a following B<c> conversion "
11068 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
11069 "corresponds to a pointer to I<wchar_t> argument."
11070 msgstr ""
11071 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
11072 "B<n> 変換では I<long long int> へのポインター、 B<c> 変換では I<wint_t>、 "
11073 "B<s> 変換では I<wchar_t> へのポインターであることを示す。"
11074
11075 #. type: TP
11076 #: build/C/man3/printf.3:490
11077 #, no-wrap
11078 msgid "B<ll>"
11079 msgstr "B<ll> (エルエル)"
11080
11081 #. type: Plain text
11082 #: build/C/man3/printf.3:502
11083 msgid ""
11084 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
11085 "or I<unsigned long long int> argument, or a following B<n> conversion "
11086 "corresponds to a pointer to a I<long long int> argument."
11087 msgstr ""
11088 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
11089 "で、 B<n> 変換に対応する引き数が I<long int> へのポインターであることを示す。"
11090
11091 #. type: TP
11092 #: build/C/man3/printf.3:502 build/C/man3/scanf.3:338
11093 #, no-wrap
11094 msgid "B<L>"
11095 msgstr "B<L>"
11096
11097 #.  .TP
11098 #.  .B q
11099 #.  ("quad". 4.4BSD and Linux libc5 only.
11100 #.  Don't use.)
11101 #. type: Plain text
11102 #: build/C/man3/printf.3:524
11103 msgid ""
11104 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
11105 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
11106 "not.)  This is a synonym for B<ll>."
11107 msgstr ""
11108 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
11109 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
11110 "認められていない。) これは B<ll> の同義語である。"
11111
11112 #. type: TP
11113 #: build/C/man3/printf.3:524 build/C/man3/scanf.3:302
11114 #, no-wrap
11115 msgid "B<j>"
11116 msgstr "B<j>"
11117
11118 #. type: Plain text
11119 #: build/C/man3/printf.3:535
11120 msgid ""
11121 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
11122 "argument, or a following B<n> conversion corresponds to a pointer to an "
11123 "I<intmax_t> argument."
11124 msgstr ""
11125 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> で、 B<n> 変換に対応す"
11126 "る引き数が I<intmax_t> へのポインターであることを示す。"
11127
11128 #. type: TP
11129 #: build/C/man3/printf.3:535 build/C/man3/scanf.3:366
11130 #, no-wrap
11131 msgid "B<z>"
11132 msgstr "B<z>"
11133
11134 #.  (Linux libc5 has
11135 #.  .B Z
11136 #.  with this meaning.
11137 #.  Don't use it.)
11138 #. type: Plain text
11139 #: build/C/man3/printf.3:550
11140 msgid ""
11141 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
11142 "argument, or a following B<n> conversion corresponds to a pointer to a "
11143 "I<size_t> argument."
11144 msgstr ""
11145 "整数変換に対応する引き数が I<size_t> か I<ssize_t> で、 B<n> 変換に対応する引"
11146 "き数が I<size_t> へのポインターであることを示す。"
11147
11148 #. type: TP
11149 #: build/C/man3/printf.3:550 build/C/man3/scanf.3:359
11150 #, no-wrap
11151 msgid "B<t>"
11152 msgstr "B<t>"
11153
11154 #. type: Plain text
11155 #: build/C/man3/printf.3:559
11156 msgid ""
11157 "A following integer conversion corresponds to a I<ptrdiff_t> argument, or a "
11158 "following B<n> conversion corresponds to a pointer to a I<ptrdiff_t> "
11159 "argument."
11160 msgstr ""
11161 "整数変換に対応する引き数が I<ptrdiff_t> で、 B<n> 変換に対応する引き数が "
11162 "I<ptrdiff_t> へのポインターであることを示す。"
11163
11164 #. type: Plain text
11165 #: build/C/man3/printf.3:589
11166 msgid ""
11167 "SUSv3 specifies all of the above.  SUSv2 specified only the length modifiers "
11168 "B<h> (in B<hd>, B<hi>, B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, "
11169 "B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, "
11170 "B<Lf>, B<Lg>, B<LG>)."
11171 msgstr ""
11172 "SUSv3 では上記のすべてが規定されている。 SUSv2 で規定されていたのは、 長さ修"
11173 "飾子 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, B<hX>, B<hn>), B<l> (B<ld>, B<li>, "
11174 "B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, "
11175 "B<LG>)  だけであった。"
11176
11177 #. type: SS
11178 #: build/C/man3/printf.3:589
11179 #, no-wrap
11180 msgid "The conversion specifier"
11181 msgstr "変換指定子"
11182
11183 #. type: Plain text
11184 #: build/C/man3/printf.3:592
11185 msgid ""
11186 "A character that specifies the type of conversion to be applied.  The "
11187 "conversion specifiers and their meanings are:"
11188 msgstr ""
11189 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
11190
11191 #. type: TP
11192 #: build/C/man3/printf.3:592
11193 #, no-wrap
11194 msgid "B<d>, B<i>"
11195 msgstr "B<d>, B<i>"
11196
11197 #. type: Plain text
11198 #: build/C/man3/printf.3:602
11199 msgid ""
11200 "The I<int> argument is converted to signed decimal notation.  The precision, "
11201 "if any, gives the minimum number of digits that must appear; if the "
11202 "converted value requires fewer digits, it is padded on the left with zeros.  "
11203 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
11204 "the output is empty."
11205 msgstr ""
11206 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
11207 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
11208 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
11209 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
11210
11211 #. type: TP
11212 #: build/C/man3/printf.3:602
11213 #, no-wrap
11214 msgid "B<o>, B<u>, B<x>, B<X>"
11215 msgstr "B<o>, B<u>, B<x>, B<X>"
11216
11217 #. type: Plain text
11218 #: build/C/man3/printf.3:629
11219 msgid ""
11220 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
11221 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
11222 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
11223 "used for B<X> conversions.  The precision, if any, gives the minimum number "
11224 "of digits that must appear; if the converted value requires fewer digits, it "
11225 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
11226 "printed with an explicit precision 0, the output is empty."
11227 msgstr ""
11228 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
11229 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
11230 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
11231 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
11232 "られる。"
11233
11234 #. type: TP
11235 #: build/C/man3/printf.3:629
11236 #, no-wrap
11237 msgid "B<e>, B<E>"
11238 msgstr "B<e>, B<E>"
11239
11240 #. type: Plain text
11241 #: build/C/man3/printf.3:648
11242 msgid ""
11243 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
11244 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
11245 "and the number of digits after it is equal to the precision; if the "
11246 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
11247 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
11248 "than B<e>)  to introduce the exponent.  The exponent always contains at "
11249 "least two digits; if the value is zero, the exponent is 00."
11250 msgstr ""
11251 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
11252 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
11253 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
11254 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
11255 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
11256 "指数の値が 0 の場合には、00 と表示される。"
11257
11258 #. type: TP
11259 #: build/C/man3/printf.3:648
11260 #, no-wrap
11261 msgid "B<f>, B<F>"
11262 msgstr "B<f>, B<F>"
11263
11264 #. type: Plain text
11265 #: build/C/man3/printf.3:659
11266 msgid ""
11267 "The I<double> argument is rounded and converted to decimal notation in the "
11268 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
11269 "character is equal to the precision specification.  If the precision is "
11270 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
11271 "point character appears.  If a decimal point appears, at least one digit "
11272 "appears before it."
11273 msgstr ""
11274 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
11275 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
11276 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
11277 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
11278
11279 #. type: Plain text
11280 #: build/C/man3/printf.3:672
11281 msgid ""
11282 "(SUSv2 does not know about B<F> and says that character string "
11283 "representations for infinity and NaN may be made available.  SUSv3 adds a "
11284 "specification for B<F>.  The C99 standard specifies \"[-]inf\" or "
11285 "\"[-]infinity\" for infinity, and a string starting with \"nan\" for NaN, in "
11286 "the case of B<f> conversion, and \"[-]INF\" or \"[-]INFINITY\" or \"NAN*\" "
11287 "in the case of B<F> conversion.)"
11288 msgstr ""
11289 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を行っても"
11290 "よいことになっている。 SUSv3 では B<F> の規定が追加された。 C99 標準では、"
11291 "B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示し、 NaN は文字列の"
11292 "先頭に `nan' をつけて表示するように規定されている。 B<F> 変換の場合は "
11293 "\"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
11294
11295 #. type: TP
11296 #: build/C/man3/printf.3:672
11297 #, no-wrap
11298 msgid "B<g>, B<G>"
11299 msgstr "B<g>, B<G>"
11300
11301 #. type: Plain text
11302 #: build/C/man3/printf.3:697
11303 msgid ""
11304 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
11305 "for B<G> conversions).  The precision specifies the number of significant "
11306 "digits.  If the precision is missing, 6 digits are given; if the precision "
11307 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
11308 "conversion is less than -4 or greater than or equal to the precision.  "
11309 "Trailing zeros are removed from the fractional part of the result; a decimal "
11310 "point appears only if it is followed by at least one digit."
11311 msgstr ""
11312 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
11313 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
11314 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
11315 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
11316 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
11317 "一つある場合にだけである。"
11318
11319 #. type: TP
11320 #: build/C/man3/printf.3:697
11321 #, no-wrap
11322 msgid "B<a>, B<A>"
11323 msgstr "B<a>, B<A>"
11324
11325 #. type: Plain text
11326 #: build/C/man3/printf.3:722
11327 msgid ""
11328 "(C99; not in SUSv2, but added in SUSv3)  For B<a> conversion, the I<double> "
11329 "argument is converted to hexadecimal notation (using the letters abcdef)  in "
11330 "the style [-]B<0x>hB<\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix "
11331 "B<0X>, the letters ABCDEF, and the exponent separator B<P> is used.  There "
11332 "is one hexadecimal digit before the decimal point, and the number of digits "
11333 "after it is equal to the precision.  The default precision suffices for an "
11334 "exact representation of the value if an exact representation in base 2 "
11335 "exists and otherwise is sufficiently large to distinguish values of type "
11336 "I<double>.  The digit before the decimal point is unspecified for "
11337 "nonnormalized numbers, and nonzero but otherwise unspecified for normalized "
11338 "numbers."
11339 msgstr ""
11340 "(C99 にはあるが SUSv2 にはないが SUSv3 で追加された) \n"
11341 "B<a> 変換では、 I<double> 引き数を\n"
11342 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
11343 "16 進表記に変換する。\n"
11344 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
11345 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
11346 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
11347 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
11348 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
11349 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
11350 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
11351
11352 #. type: TP
11353 #: build/C/man3/printf.3:722 build/C/man3/scanf.3:459
11354 #: build/C/man3/wprintf.3:149
11355 #, no-wrap
11356 msgid "B<c>"
11357 msgstr "B<c>"
11358
11359 #. type: Plain text
11360 #: build/C/man3/printf.3:740
11361 msgid ""
11362 "If no B<l> modifier is present, the I<int> argument is converted to an "
11363 "I<unsigned char>, and the resulting character is written.  If an B<l> "
11364 "modifier is present, the I<wint_t> (wide character) argument is converted to "
11365 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
11366 "conversion state starting in the initial state, and the resulting multibyte "
11367 "string is written."
11368 msgstr ""
11369 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
11370 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
11371 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
11372 "換し、 変換されたマルチバイト文字列を出力する。"
11373
11374 #. type: TP
11375 #: build/C/man3/printf.3:740 build/C/man3/scanf.3:451
11376 #: build/C/man3/wprintf.3:163
11377 #, no-wrap
11378 msgid "B<s>"
11379 msgstr "B<s>"
11380
11381 #. type: Plain text
11382 #: build/C/man3/printf.3:755
11383 msgid ""
11384 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
11385 "to be a pointer to an array of character type (pointer to a string).  "
11386 "Characters from the array are written up to (but not including) a "
11387 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
11388 "than the number specified are written.  If a precision is given, no null "
11389 "byte need be present; if the precision is not specified, or is greater than "
11390 "the size of the array, the array must contain a terminating null byte."
11391 msgstr ""
11392 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
11393 "ター (文字列へのポインター) であることが 期待されている。配列中の文字は、終端"
11394 "の ヌルバイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力され"
11395 "ない)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定"
11396 "された場合には、終端バイトが存在する必要はない。 精度が指定されていなかった"
11397 "り、精度の値が配列の大きさより大きい場合には、 配列は終端のヌルバイトを含んで"
11398 "いなければならない。"
11399
11400 #. type: Plain text
11401 #: build/C/man3/printf.3:782
11402 msgid ""
11403 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
11404 "expected to be a pointer to an array of wide characters.  Wide characters "
11405 "from the array are converted to multibyte characters (each by a call to the "
11406 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
11407 "state before the first wide character), up to and including a terminating "
11408 "null wide character.  The resulting multibyte characters are written up to "
11409 "(but not including) the terminating null byte.  If a precision is specified, "
11410 "no more bytes than the number specified are written, but no partial "
11411 "multibyte characters are written.  Note that the precision determines the "
11412 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
11413 "positions>.  The array must contain a terminating null wide character, "
11414 "unless a precision is given and it is so small that the number of bytes "
11415 "written exceeds it before the end of the array is reached."
11416 msgstr ""
11417 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
11418 "字の配列へのポインターであることが期待されている。 配列中のワイド文字は (1文"
11419 "字毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイ"
11420 "ド文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行わ"
11421 "れる)。 マルチバイト文字への変換は、文字列を終端するヌルワイド文字が 出てくる"
11422 "まで行われ、終端ヌルワイド文字も含めて変換される。 結果のマルチバイト文字列"
11423 "は、終端のヌルバイトが出てくるまで 出力される (終端のヌルバイトは出力されな"
11424 "い)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、マ"
11425 "ルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定す"
11426 "るものであり、「ワイド文字」数や 「画面での位置」を指定するものではないことに"
11427 "注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
11428 "が 精度の値を超える場合だけは、配列はヌルワイド文字で終端されていなくてもよ"
11429 "い。 それ以外の場合は、必ず配列はヌルワイド文字で終端されていなければならな"
11430 "い。"
11431
11432 #. type: TP
11433 #: build/C/man3/printf.3:782
11434 #, no-wrap
11435 msgid "B<C>"
11436 msgstr "B<C>"
11437
11438 #. type: Plain text
11439 #: build/C/man3/printf.3:788
11440 msgid ""
11441 "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for B<lc>.  "
11442 "Don't use."
11443 msgstr ""
11444 "(C99, C11 にはないが SUSv2, SUSv3, SUSv4 にはある)  B<lc> と同じ。使ってはな"
11445 "らない。"
11446
11447 #. type: TP
11448 #: build/C/man3/printf.3:788
11449 #, no-wrap
11450 msgid "B<S>"
11451 msgstr "B<S>"
11452
11453 #. type: Plain text
11454 #: build/C/man3/printf.3:794
11455 msgid ""
11456 "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for B<ls>.  "
11457 "Don't use."
11458 msgstr ""
11459 "(C99, C11 にはないが SUSv2, SUSv3, SUSv4 にはある)  B<ls> と同じ。使ってはな"
11460 "らない。"
11461
11462 #. type: TP
11463 #: build/C/man3/printf.3:794 build/C/man3/scanf.3:502
11464 #, no-wrap
11465 msgid "B<p>"
11466 msgstr "B<p>"
11467
11468 #. type: Plain text
11469 #: build/C/man3/printf.3:802
11470 msgid ""
11471 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
11472 "or B<%#lx>)."
11473 msgstr ""
11474 "I<void\\ *> ポインター引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力す"
11475 "る。"
11476
11477 #. type: TP
11478 #: build/C/man3/printf.3:802 build/C/man3/scanf.3:510
11479 #, no-wrap
11480 msgid "B<n>"
11481 msgstr "B<n>"
11482
11483 #. type: Plain text
11484 #: build/C/man3/printf.3:813
11485 msgid ""
11486 "The number of characters written so far is stored into the integer pointed "
11487 "to by the corresponding argument.  That argument shall be an I<int\\ *>, or "
11488 "variant whose size matches the (optionally)  supplied integer length "
11489 "modifier.  No argument is converted.  The behavior is undefined if the "
11490 "conversion specification includes any flags, a field width, or a precision."
11491 msgstr ""
11492 "これまでに書き込まれた文字数が対応する引き数が指す整数に格納される。 この引き"
11493 "数は I<int\\ *> 系でなければならず、そのサイズは指定された整数の長さ修飾子 "
11494 "(省略可能) と一致していなければならない。 引き数の変換は行われない。 変換指定"
11495 "にフラグ、フィールド幅、精度に含まれていた場合の動作は不定である。"
11496
11497 #. type: TP
11498 #: build/C/man3/printf.3:813
11499 #, no-wrap
11500 msgid "B<m>"
11501 msgstr "B<m>"
11502
11503 #. type: Plain text
11504 #: build/C/man3/printf.3:819
11505 msgid ""
11506 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
11507 "required."
11508 msgstr ""
11509 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
11510
11511 #. type: TP
11512 #: build/C/man3/printf.3:819 build/C/man3/scanf.3:377
11513 #, no-wrap
11514 msgid "B<%>"
11515 msgstr "B<%>"
11516
11517 #. type: Plain text
11518 #: build/C/man3/printf.3:825
11519 msgid ""
11520 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
11521 "conversion specification is \\(aq%%\\(aq."
11522 msgstr ""
11523 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
11524 "%\" となる。"
11525
11526 #. type: Plain text
11527 #: build/C/man3/printf.3:840
11528 msgid ""
11529 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
11530 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
11531 "B<vsnprintf>()  functions conform to C99."
11532 msgstr ""
11533 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
11534 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
11535 "B<vsnprintf>()  は C99 に準拠している。"
11536
11537 #.  .PP
11538 #.  Linux libc4 knows about the five C standard flags.
11539 #.  It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
11540 #.  and the conversions
11541 #.  \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP,
11542 #.  \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP,
11543 #.  \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP,
11544 #.  where \fBF\fP is a synonym for \fBf\fP.
11545 #.  Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms
11546 #.  for \fBld\fP, \fBlo\fP, and \fBlu\fP.
11547 #.  (This is bad, and caused serious bugs later, when
11548 #.  support for \fB%D\fP disappeared.)
11549 #.  No locale-dependent radix character,
11550 #.  no thousands' separator, no NaN or infinity, no "%m$" and "*m$".
11551 #.  .PP
11552 #.  Linux libc5 knows about the five C standard flags and the \(aq flag,
11553 #.  locale, "%m$" and "*m$".
11554 #.  It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
11555 #.  \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP
11556 #.  both for \fIlong double\fP and for \fIlong long int\fP (this is a bug).
11557 #.  It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP,
11558 #.  but adds the conversion character
11559 #.  .BR m ,
11560 #.  which outputs
11561 #.  .IR strerror(errno) .
11562 #.  .PP
11563 #.  glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP.
11564 #. type: Plain text
11565 #: build/C/man3/printf.3:883
11566 msgid ""
11567 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
11568 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
11569 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
11570 "this case, and gives the return value (as always)  as the number of "
11571 "characters that would have been written in case the output string has been "
11572 "large enough.  SUSv3 and later align their specification of B<snprintf>()  "
11573 "with C99."
11574 msgstr ""
11575 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
11576 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
11577 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
11578 "NULL とし、返り値として (通常通り) 出力バッファーが十分な大きさが あった場合"
11579 "に出力されるであろう文字数を返す。 SUSv3 やそれ以降では C99 の B<snprintf>() "
11580 "の規定にあわせたものとなっている。"
11581
11582 #. type: Plain text
11583 #: build/C/man3/printf.3:886
11584 msgid ""
11585 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
11586 "characters B<a> and B<A>."
11587 msgstr ""
11588 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
11589 "加された。"
11590
11591 #. type: Plain text
11592 #: build/C/man3/printf.3:889
11593 msgid ""
11594 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
11595 "flag character B<I>."
11596 msgstr ""
11597 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
11598 "追加された。"
11599
11600 #. type: Plain text
11601 #: build/C/man3/printf.3:891
11602 msgid "Some programs imprudently rely on code such as the following"
11603 msgstr ""
11604 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
11605 "ラムがある。"
11606
11607 #. type: Plain text
11608 #: build/C/man3/printf.3:893
11609 #, no-wrap
11610 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
11611 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
11612
11613 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
11614 #. type: Plain text
11615 #: build/C/man3/printf.3:909
11616 msgid ""
11617 "to append text to I<buf>.  However, the standards explicitly note that the "
11618 "results are undefined if source and destination buffers overlap when calling "
11619 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
11620 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
11621 "such as the above will B<not> produce the expected results."
11622 msgstr ""
11623 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
11624 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファーが重なって"
11625 "いた場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバー"
11626 "ジョンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待"
11627 "した結果が得られ「ない」ことがある。"
11628
11629 #.  .SH HISTORY
11630 #.  UNIX V7 defines the three routines
11631 #.  .BR printf (),
11632 #.  .BR fprintf (),
11633 #.  .BR sprintf (),
11634 #.  and has the flag \-, the width or precision *, the length modifier l,
11635 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
11636 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
11637 #.  #, + and <space> and no longer mentions D,O,U,X.
11638 #.  2.11BSD has
11639 #.  .BR vprintf (),
11640 #.  .BR vfprintf (),
11641 #.  .BR vsprintf (),
11642 #.  and warns not to use D,O,U,X.
11643 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
11644 #.  and the conversions n, p, E, G, X (with current meaning)
11645 #.  and deprecates D,O,U.
11646 #.  4.4BSD introduces the functions
11647 #.  .BR snprintf ()
11648 #.  and
11649 #.  .BR vsnprintf (),
11650 #.  and the length modifier q.
11651 #.  FreeBSD also has functions
11652 #.  .BR asprintf ()
11653 #.  and
11654 #.  .BR vasprintf (),
11655 #.  that allocate a buffer large enough for
11656 #.  .BR sprintf ().
11657 #.  In glibc there are functions
11658 #.  .BR dprintf ()
11659 #.  and
11660 #.  .BR vdprintf ()
11661 #.  that print to a file descriptor instead of a stream.
11662 #. type: Plain text
11663 #: build/C/man3/printf.3:951
11664 msgid ""
11665 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
11666 "conforms to the C99 standard, that is, behaves as described above, since "
11667 "glibc version 2.1.  Until glibc 2.0.6, they would return -1 when the output "
11668 "was truncated."
11669 msgstr ""
11670 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
11671 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
11672 "切り詰められた場合は -1 を返す。"
11673
11674 #.  .PP
11675 #.  Linux libc4.[45] does not have a
11676 #.  .BR snprintf (),
11677 #.  but provides a libbsd that contains an
11678 #.  .BR snprintf ()
11679 #.  equivalent to
11680 #.  .BR sprintf (),
11681 #.  that is, one that ignores the
11682 #.  .I size
11683 #.  argument.
11684 #.  Thus, the use of
11685 #.  .BR snprintf ()
11686 #.  with early libc4 leads to serious security problems.
11687 #. type: Plain text
11688 #: build/C/man3/printf.3:981
11689 msgid ""
11690 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
11691 "callers must be careful not to overflow the actual space; this is often "
11692 "impossible to assure.  Note that the length of the strings produced is "
11693 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
11694 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
11695 msgstr ""
11696 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
11697 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
11698 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
11699 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
11700 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
11701
11702 #.  .PP
11703 #.  Some floating-point conversions under early libc4
11704 #.  caused memory leaks.
11705 #. type: Plain text
11706 #: build/C/man3/printf.3:995
11707 msgid ""
11708 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
11709 "contain a % character.  If I<foo> comes from untrusted user input, it may "
11710 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
11711 "a security hole."
11712 msgstr ""
11713 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
11714 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
11715 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
11716 "り、 B<printf>()  呼び出し時にメモリーへの書き込みが起こり、 セキュリティー"
11717 "ホールを作ることになるかもしれない。"
11718
11719 #. type: Plain text
11720 #: build/C/man3/printf.3:999
11721 msgid "To print I<Pi> to five decimal places:"
11722 msgstr "I<Pi> を 5 桁で出力する。"
11723
11724 #. type: Plain text
11725 #: build/C/man3/printf.3:1005
11726 #, no-wrap
11727 msgid ""
11728 "#include E<lt>math.hE<gt>\n"
11729 "#include E<lt>stdio.hE<gt>\n"
11730 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
11731 msgstr ""
11732 "#include E<lt>math.hE<gt>\n"
11733 "#include E<lt>stdio.hE<gt>\n"
11734 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
11735
11736 #. type: Plain text
11737 #: build/C/man3/printf.3:1014
11738 msgid ""
11739 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
11740 "I<weekday> and I<month> are pointers to strings:"
11741 msgstr ""
11742 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
11743 "I<month> は文字列へのポインターである)"
11744
11745 #. type: Plain text
11746 #: build/C/man3/printf.3:1020
11747 #, no-wrap
11748 msgid ""
11749 "#include E<lt>stdio.hE<gt>\n"
11750 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
11751 "        weekday, month, day, hour, min);\n"
11752 msgstr ""
11753 "#include E<lt>stdio.hE<gt>\n"
11754 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
11755 "\tweekday, month, day, hour, min);\n"
11756
11757 #. type: Plain text
11758 #: build/C/man3/printf.3:1026
11759 msgid ""
11760 "Many countries use the day-month-year order.  Hence, an internationalized "
11761 "version must be able to print the arguments in an order specified by the "
11762 "format:"
11763 msgstr ""
11764 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
11765 "順番で 引き数を表示できなければならない。"
11766
11767 #. type: Plain text
11768 #: build/C/man3/printf.3:1032
11769 #, no-wrap
11770 msgid ""
11771 "#include E<lt>stdio.hE<gt>\n"
11772 "fprintf(stdout, format,\n"
11773 "        weekday, month, day, hour, min);\n"
11774 msgstr ""
11775 "#include E<lt>stdio.hE<gt>\n"
11776 "fprintf(stdout, format,\n"
11777 "\tweekday, month, day, hour, min);\n"
11778
11779 #. type: Plain text
11780 #: build/C/man3/printf.3:1039
11781 msgid ""
11782 "where I<format> depends on locale, and may permute the arguments.  With the "
11783 "value:"
11784 msgstr ""
11785 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
11786 "I<format> が"
11787
11788 #. type: Plain text
11789 #: build/C/man3/printf.3:1043
11790 #, no-wrap
11791 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
11792 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
11793
11794 #. type: Plain text
11795 #: build/C/man3/printf.3:1047
11796 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
11797 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
11798
11799 #. type: Plain text
11800 #: build/C/man3/printf.3:1050
11801 msgid ""
11802 "To allocate a sufficiently large string and print into it (code correct for "
11803 "both glibc 2.0 and glibc 2.1):"
11804 msgstr ""
11805 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
11806 "と glibc 2.1 の両方で正しく動作するコード):"
11807
11808 #. type: Plain text
11809 #: build/C/man3/printf.3:1055
11810 #, no-wrap
11811 msgid ""
11812 "#include E<lt>stdio.hE<gt>\n"
11813 "#include E<lt>stdlib.hE<gt>\n"
11814 "#include E<lt>stdarg.hE<gt>\n"
11815 msgstr ""
11816 "#include E<lt>stdio.hE<gt>\n"
11817 "#include E<lt>stdlib.hE<gt>\n"
11818 "#include E<lt>stdarg.hE<gt>\n"
11819
11820 #. type: Plain text
11821 #: build/C/man3/printf.3:1063
11822 #, no-wrap
11823 msgid ""
11824 "char *\n"
11825 "make_message(const char *fmt, ...)\n"
11826 "{\n"
11827 "    int n;\n"
11828 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
11829 "    char *p, *np;\n"
11830 "    va_list ap;\n"
11831 msgstr ""
11832 "char *\n"
11833 "make_message(const char *fmt, ...)\n"
11834 "{\n"
11835 "    int n;\n"
11836 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
11837 "    char *p, *np;\n"
11838 "    va_list ap;\n"
11839
11840 #. type: Plain text
11841 #: build/C/man3/printf.3:1067
11842 #, no-wrap
11843 msgid ""
11844 "    p = malloc(size);\n"
11845 "    if (p == NULL)\n"
11846 "        return NULL;\n"
11847 msgstr ""
11848 "    p = malloc(size);\n"
11849 "    if (p == NULL)\n"
11850 "        return NULL;\n"
11851
11852 #. type: Plain text
11853 #: build/C/man3/printf.3:1069
11854 #, no-wrap
11855 msgid "    while (1) {\n"
11856 msgstr "    while (1) {\n"
11857
11858 #. type: Plain text
11859 #: build/C/man3/printf.3:1071
11860 #, no-wrap
11861 msgid "        /* Try to print in the allocated space */\n"
11862 msgstr "        /* Try to print in the allocated space */\n"
11863
11864 #. type: Plain text
11865 #: build/C/man3/printf.3:1075
11866 #, no-wrap
11867 msgid ""
11868 "        va_start(ap, fmt);\n"
11869 "        n = vsnprintf(p, size, fmt, ap);\n"
11870 "        va_end(ap);\n"
11871 msgstr ""
11872 "        va_start(ap, fmt);\n"
11873 "        n = vsnprintf(p, size, fmt, ap);\n"
11874 "        va_end(ap);\n"
11875
11876 #. type: Plain text
11877 #: build/C/man3/printf.3:1077
11878 #, no-wrap
11879 msgid "        /* Check error code */\n"
11880 msgstr "        /* Check error code */\n"
11881
11882 #. type: Plain text
11883 #: build/C/man3/printf.3:1082
11884 #, no-wrap
11885 msgid ""
11886 "        if (n E<lt> 0) {\n"
11887 "            free(p);\n"
11888 "            return NULL;\n"
11889 "        }\n"
11890 msgstr ""
11891 "        if (n E<lt> 0) {\n"
11892 "            free(p);\n"
11893 "            return NULL;\n"
11894 "        }\n"
11895
11896 #. type: Plain text
11897 #: build/C/man3/printf.3:1084
11898 #, no-wrap
11899 msgid "        /* If that worked, return the string */\n"
11900 msgstr "        /* If that worked, return the string */\n"
11901
11902 #. type: Plain text
11903 #: build/C/man3/printf.3:1087
11904 #, no-wrap
11905 msgid ""
11906 "        if (n E<lt> size)\n"
11907 "            return p;\n"
11908 msgstr ""
11909 "        if (n E<lt> size)\n"
11910 "            return p;\n"
11911
11912 #. type: Plain text
11913 #: build/C/man3/printf.3:1089
11914 #, no-wrap
11915 msgid "        /* Else try again with more space */\n"
11916 msgstr "        /* Else try again with more space */\n"
11917
11918 #. type: Plain text
11919 #: build/C/man3/printf.3:1091
11920 #, no-wrap
11921 msgid "        size = n + 1;       /* Precisely what is needed */\n"
11922 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
11923
11924 #. type: Plain text
11925 #: build/C/man3/printf.3:1102
11926 #, no-wrap
11927 msgid ""
11928 "        np = realloc(p, size);\n"
11929 "        if (np == NULL) {\n"
11930 "            free(p);\n"
11931 "            return NULL;\n"
11932 "        } else {\n"
11933 "            p = np;\n"
11934 "        }\n"
11935 "    }\n"
11936 "}\n"
11937 msgstr ""
11938 "        np = realloc(p, size);\n"
11939 "        if (np == NULL) {\n"
11940 "            free(p);\n"
11941 "            return NULL;\n"
11942 "        } else {\n"
11943 "            p = np;\n"
11944 "        }\n"
11945 "    }\n"
11946 "}\n"
11947
11948 #. type: Plain text
11949 #: build/C/man3/printf.3:1106
11950 msgid ""
11951 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
11952 "error instead of being handled gracefully."
11953 msgstr ""
11954 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
11955 "理されず、エラーとして扱われる。"
11956
11957 #. type: Plain text
11958 #: build/C/man3/printf.3:1115
11959 msgid ""
11960 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
11961 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
11962 msgstr ""
11963 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
11964 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
11965
11966 #. type: TH
11967 #: build/C/man3/puts.3:26
11968 #, no-wrap
11969 msgid "PUTS"
11970 msgstr "PUTS"
11971
11972 #. type: TH
11973 #: build/C/man3/puts.3:26 build/C/man3/scanf.3:52
11974 #, no-wrap
11975 msgid "2014-01-11"
11976 msgstr "2014-01-11"
11977
11978 #. type: Plain text
11979 #: build/C/man3/puts.3:29
11980 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
11981 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
11982
11983 #. type: Plain text
11984 #: build/C/man3/puts.3:34
11985 #, no-wrap
11986 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11987 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11988
11989 #. type: Plain text
11990 #: build/C/man3/puts.3:36
11991 #, no-wrap
11992 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11993 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11994
11995 #. type: Plain text
11996 #: build/C/man3/puts.3:38
11997 #, no-wrap
11998 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11999 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
12000
12001 #. type: Plain text
12002 #: build/C/man3/puts.3:40
12003 #, no-wrap
12004 msgid "B<int putchar(int >I<c>B<);>\n"
12005 msgstr "B<int putchar(int >I<c>B<);>\n"
12006
12007 #. type: Plain text
12008 #: build/C/man3/puts.3:42
12009 #, no-wrap
12010 msgid "B<int puts(const char *>I<s>B<);>\n"
12011 msgstr "B<int puts(const char *>I<s>B<);>\n"
12012
12013 #. type: Plain text
12014 #: build/C/man3/puts.3:51
12015 msgid ""
12016 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
12017 "I<stream>."
12018 msgstr ""
12019 "B<fputc>()  は、キャラクター I<c> を I<unsigned char> にキャストし、 "
12020 "I<stream> に書き込む。"
12021
12022 #. type: Plain text
12023 #: build/C/man3/puts.3:58
12024 msgid ""
12025 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
12026 "null byte (\\(aq\\e0\\(aq)."
12027 msgstr ""
12028 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端のヌルバイト "
12029 "(\\(aq\\e0\\(aq) は出力しない。"
12030
12031 #. type: Plain text
12032 #: build/C/man3/puts.3:65
12033 msgid ""
12034 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
12035 "a macro which evaluates I<stream> more than once."
12036 msgstr ""
12037 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
12038 "れないという点を除き、 B<fputc>()  と同じである。"
12039
12040 #. type: Plain text
12041 #: build/C/man3/puts.3:69
12042 msgid "B<putchar(>I<c>B<)> is equivalent to B<putc(>I<c>B<, >I<stdout>B<).>"
12043 msgstr "B<putchar(>I<c>B<)> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
12044
12045 #. type: Plain text
12046 #: build/C/man3/puts.3:76
12047 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
12048 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
12049
12050 #. type: Plain text
12051 #: build/C/man3/puts.3:81
12052 msgid ""
12053 "Calls to the functions described here can be mixed with each other and with "
12054 "calls to other output functions from the I<stdio> library for the same "
12055 "output stream."
12056 msgstr ""
12057 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
12058 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
12059 "る。"
12060
12061 #. type: Plain text
12062 #: build/C/man3/puts.3:96
12063 msgid ""
12064 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
12065 "I<unsigned char> cast to an I<int> or B<EOF> on error."
12066 msgstr ""
12067 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
12068 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
12069
12070 #. type: Plain text
12071 #: build/C/man3/puts.3:103
12072 msgid ""
12073 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
12074 "on error."
12075 msgstr ""
12076 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
12077 "は B<EOF> を返す。"
12078
12079 #. type: Plain text
12080 #: build/C/man3/puts.3:112
12081 msgid ""
12082 "It is not advisable to mix calls to output functions from the I<stdio> "
12083 "library with low-level calls to B<write>(2)  for the file descriptor "
12084 "associated with the same output stream; the results will be undefined and "
12085 "very probably not what you want."
12086 msgstr ""
12087 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
12088 "ファイルディスクリプターに対する B<write>(2)  の低レベル呼び出しを混在して 使"
12089 "用することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可"
12090 "能性が高い。"
12091
12092 #. type: Plain text
12093 #: build/C/man3/puts.3:124
12094 msgid ""
12095 "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), "
12096 "B<fputws>(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), "
12097 "B<unlocked_stdio>(3)"
12098 msgstr ""
12099 "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), "
12100 "B<fputws>(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), "
12101 "B<unlocked_stdio>(3)"
12102
12103 #. type: TH
12104 #: build/C/man2/read.2:35
12105 #, no-wrap
12106 msgid "READ"
12107 msgstr "READ"
12108
12109 #. type: TH
12110 #: build/C/man2/read.2:35
12111 #, no-wrap
12112 msgid "2014-05-04"
12113 msgstr "2014-05-04"
12114
12115 #. type: Plain text
12116 #: build/C/man2/read.2:38
12117 msgid "read - read from a file descriptor"
12118 msgstr "read - ファイルディスクリプターから読み込む"
12119
12120 #. type: Plain text
12121 #: build/C/man2/read.2:43
12122 #, no-wrap
12123 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
12124 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
12125
12126 #. type: Plain text
12127 #: build/C/man2/read.2:52
12128 msgid ""
12129 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
12130 "into the buffer starting at I<buf>."
12131 msgstr ""
12132 "B<read>()  はファイルディスクリプター (file descriptor)  I<fd> から最大 "
12133 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
12134
12135 #. type: Plain text
12136 #: build/C/man2/read.2:60
12137 msgid ""
12138 "On files that support seeking, the read operation commences at the current "
12139 "file offset, and the file offset is incremented by the number of bytes "
12140 "read.  If the current file offset is at or past the end of file, no bytes "
12141 "are read, and B<read>()  returns zero."
12142 msgstr ""
12143 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
12144 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
12145 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
12146 "0 を返す。"
12147
12148 #. type: Plain text
12149 #: build/C/man2/read.2:75
12150 msgid ""
12151 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
12152 "In the absence of any errors, or if B<read>()  does not check for errors, a "
12153 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
12154 msgstr ""
12155 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
12156 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
12157 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
12158
12159 #. type: Plain text
12160 #: build/C/man2/read.2:81
12161 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
12162 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
12163
12164 #. type: Plain text
12165 #: build/C/man2/read.2:95
12166 msgid ""
12167 "On success, the number of bytes read is returned (zero indicates end of "
12168 "file), and the file position is advanced by this number.  It is not an error "
12169 "if this number is smaller than the number of bytes requested; this may "
12170 "happen for example because fewer bytes are actually available right now "
12171 "(maybe because we were close to end-of-file, or because we are reading from "
12172 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
12173 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
12174 "this case, it is left unspecified whether the file position (if any) changes."
12175 msgstr ""
12176 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
12177 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
12178 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
12179 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
12180 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
12181 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
12182 "の場合はファイル位置が変更されるかどうかは 不定である。"
12183
12184 #. type: TP
12185 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
12186 #, no-wrap
12187 msgid "B<EAGAIN>"
12188 msgstr "B<EAGAIN>"
12189
12190 #. type: Plain text
12191 #: build/C/man2/read.2:103
12192 msgid ""
12193 "The file descriptor I<fd> refers to a file other than a socket and has been "
12194 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
12195 msgstr ""
12196 "ファイルディスクリプター I<fd> がソケット以外のファイルを参照していて、 非停"
12197 "止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停"
12198 "止する状況にある。"
12199
12200 #. type: TP
12201 #: build/C/man2/read.2:103 build/C/man2/write.2:115
12202 #, no-wrap
12203 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
12204 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
12205
12206 #.  Actually EAGAIN on Linux
12207 #. type: Plain text
12208 #: build/C/man2/read.2:114
12209 msgid ""
12210 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
12211 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
12212 "to be returned for this case, and does not require these constants to have "
12213 "the same value, so a portable application should check for both "
12214 "possibilities."
12215 msgstr ""
12216 "ファイルディスクリプター I<fd> がソケットを参照していて、非停止 "
12217 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
12218 "する状況にある。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めて"
12219 "おり、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性"
12220 "が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
12221
12222 #. type: Plain text
12223 #: build/C/man2/read.2:118
12224 msgid "I<fd> is not a valid file descriptor or is not open for reading."
12225 msgstr ""
12226 "I<fd> が有効なファイルディスクリプターでないか、読み込みのために オープン "
12227 "(open) されていない。"
12228
12229 #. type: Plain text
12230 #: build/C/man2/read.2:122 build/C/man2/write.2:145
12231 msgid "I<buf> is outside your accessible address space."
12232 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
12233
12234 #. type: Plain text
12235 #: build/C/man2/read.2:126
12236 msgid ""
12237 "The call was interrupted by a signal before any data was read; see "
12238 "B<signal>(7)."
12239 msgstr ""
12240 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
12241
12242 #. type: Plain text
12243 #: build/C/man2/read.2:137
12244 msgid ""
12245 "I<fd> is attached to an object which is unsuitable for reading; or the file "
12246 "was opened with the B<O_DIRECT> flag, and either the address specified in "
12247 "I<buf>, the value specified in I<count>, or the current file offset is not "
12248 "suitably aligned."
12249 msgstr ""
12250 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
12251 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
12252 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
12253 "ンメントが不適切である。"
12254
12255 #. type: Plain text
12256 #: build/C/man2/read.2:147
12257 msgid ""
12258 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
12259 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
12260 "information."
12261 msgstr ""
12262 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
12263 "たサイズのバッファーが渡された。 さらなる情報は B<timerfd_create>(2)  を参照"
12264 "のこと。"
12265
12266 #. type: Plain text
12267 #: build/C/man2/read.2:158
12268 msgid ""
12269 "I/O error.  This will happen for example when the process is in a background "
12270 "process group, tries to read from its controlling terminal, and either it is "
12271 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
12272 "also occur when there is a low-level I/O error while reading from a disk or "
12273 "tape."
12274 msgstr ""
12275 "I/O エラー。これは例えばプロセスがバックグランドプロセスグループで、それを制"
12276 "御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
12277 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
12278 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
12279 "た場合にも起こる。"
12280
12281 #. type: Plain text
12282 #: build/C/man2/read.2:162
12283 msgid "I<fd> refers to a directory."
12284 msgstr "I<fd> がディレクトリを参照している。"
12285
12286 #. type: Plain text
12287 #: build/C/man2/read.2:173
12288 msgid ""
12289 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
12290 "allows a B<read>()  that is interrupted after reading some data to return -1 "
12291 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
12292 "read."
12293 msgstr ""
12294 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
12295 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
12296 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
12297 "数を返してもよい。"
12298
12299 #. type: Plain text
12300 #: build/C/man2/read.2:187
12301 msgid ""
12302 "On NFS filesystems, reading small amounts of data will update the timestamp "
12303 "only the first time, subsequent calls may not do so.  This is caused by "
12304 "client side attribute caching, because most if not all NFS clients leave "
12305 "st_atime (last file access time)  updates to the server and client side "
12306 "reads satisfied from the client's cache will not cause st_atime updates on "
12307 "the server as there are no server side reads.  UNIX semantics can be "
12308 "obtained by disabling client side attribute caching, but in most situations "
12309 "this will substantially increase server load and decrease performance."
12310 msgstr ""
12311 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
12312 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
12313 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
12314 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
12315 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
12316 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
12317 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
12318 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
12319
12320 #. type: Plain text
12321 #: build/C/man2/read.2:190 build/C/man2/write.2:218
12322 msgid ""
12323 "According to POSIX.1-2008/SUSv4 Section XSI 2.9.7 (\"Thread Interactions "
12324 "with Regular File Operations\"):"
12325 msgstr ""
12326 "POSIX.1-2008/SUSv4 セクション XSI 2.9.7 (\"Thread Interactions with Regular "
12327 "File Operations\") によると、"
12328
12329 #. type: Plain text
12330 #: build/C/man2/read.2:195 build/C/man2/write.2:223
12331 msgid ""
12332 "All of the following functions shall be atomic with respect to each other in "
12333 "the effects specified in POSIX.1-2008 when they operate on regular files or "
12334 "symbolic links: ..."
12335 msgstr ""
12336 "以下のすべての関数では、 通常ファイルもしくはシンボリックリンクに対する操作で"
12337 "は POSIX.1-2008 で規定された効果が互いにアトミックに行われなければならな"
12338 "い: ..."
12339
12340 #
12341 #.  http://thread.gmane.org/gmane.linux.kernel/1649458
12342 #.     From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
12343 #.     Subject: Update of file offset on write() etc. is non-atomic with I/O
12344 #.     Date: 2014-02-17 15:41:37 GMT
12345 #.     Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
12346 #.  commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
12347 #.     Author: Linus Torvalds <torvalds@linux-foundation.org>
12348 #.     Date:   Mon Mar 3 09:36:58 2014 -0800
12349 #.         vfs: atomic f_pos accesses as per POSIX
12350 #. type: Plain text
12351 #: build/C/man2/read.2:226
12352 msgid ""
12353 "Among the APIs subsequently listed are B<read>()  and B<readv>(2).  And "
12354 "among the effects that should be atomic across threads (and processes)  are "
12355 "updates of the file offset.  However, on Linux before version 3.14, this was "
12356 "not the case: if two processes that share an open file description (see "
12357 "B<open>(2))  perform a B<read>()  (or B<readv>(2))  at the same time, then "
12358 "the I/O operations were not atomic with respect updating the file offset, "
12359 "with the result that the reads in the two processes might (incorrectly) "
12360 "overlap in the blocks of data that they obtained.  This problem was fixed in "
12361 "Linux 3.14."
12362 msgstr ""
12363 "この後に書かれている API の中に B<read>() と B<readv>(2) である。 スレッド"
12364 "(やプロセス) 間でアトミックに適用することが求められる効果の一つとして、 ファ"
12365 "イルオフセットの更新がある。 しかしながら、 バージョン 3.14 より前の Linux で"
12366 "は、 この限りではない。 オープンファイル記述 (open file description) を共有す"
12367 "る 2 つのプロセスが同時に B<read>() (や B<readv>(2)) を実行した場合、 この I/"
12368 "O 操作ではファイルオフセットの更新に関してはアトミックではなく、 2 つのプロセ"
12369 "スの read で取得されるデータブロックが (間違って) 重なる可能性がある。 この問"
12370 "題は Linux 3.14 で修正された。"
12371
12372 #. type: Plain text
12373 #: build/C/man2/read.2:239
12374 msgid ""
12375 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
12376 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
12377 "B<fread>(3)"
12378 msgstr ""
12379 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
12380 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
12381 "B<fread>(3)"
12382
12383 #. type: TH
12384 #: build/C/man2/readlink.2:44
12385 #, no-wrap
12386 msgid "READLINK"
12387 msgstr "READLINK"
12388
12389 #. type: TH
12390 #: build/C/man2/readlink.2:44
12391 #, no-wrap
12392 msgid "2014-10-15"
12393 msgstr "2014-10-15"
12394
12395 #. type: Plain text
12396 #: build/C/man2/readlink.2:47
12397 msgid "readlink, readlinkat - read value of a symbolic link"
12398 msgstr "readlink, readlinkat - シンボリックリンクの値を読む"
12399
12400 #. type: Plain text
12401 #: build/C/man2/readlink.2:53
12402 #, no-wrap
12403 msgid "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12404 msgstr "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12405
12406 #. type: Plain text
12407 #: build/C/man2/readlink.2:59
12408 #, no-wrap
12409 msgid ""
12410 "B<ssize_t readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
12411 "B<                   char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12412 msgstr ""
12413 "B<ssize_t readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
12414 "B<                   char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12415
12416 #. type: Plain text
12417 #: build/C/man2/readlink.2:68
12418 msgid "B<readlink>():"
12419 msgstr "B<readlink>():"
12420
12421 #. type: Plain text
12422 #: build/C/man2/readlink.2:71 build/C/man2/symlink.2:59
12423 msgid ""
12424 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
12425 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
12426 msgstr ""
12427 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
12428 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
12429
12430 #. type: Plain text
12431 #: build/C/man2/readlink.2:74
12432 msgid "B<readlinkat>():"
12433 msgstr "B<readlinkat>():"
12434
12435 #. type: Plain text
12436 #: build/C/man2/readlink.2:100
12437 msgid ""
12438 "B<readlink>()  places the contents of the symbolic link I<pathname> in the "
12439 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
12440 "null byte to I<buf>.  It will truncate the contents (to a length of "
12441 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
12442 "contents."
12443 msgstr ""
12444 "B<readlink>()  は I<pathname> で与えられたシンボリックリンクの内容を I<buf> "
12445 "バッファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は"
12446 "ヌルバイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小さ"
12447 "過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
12448
12449 #. type: SS
12450 #: build/C/man2/readlink.2:100
12451 #, no-wrap
12452 msgid "readlinkat()"
12453 msgstr "readlinkat()"
12454
12455 #. type: Plain text
12456 #: build/C/man2/readlink.2:106
12457 msgid ""
12458 "The B<readlinkat>()  system call operates in exactly the same way as "
12459 "B<readlink>(), except for the differences described here."
12460 msgstr ""
12461 "B<readlinkat>() システムコールは B<readlink>() と全く同様に動作するが、以下で"
12462 "説明する点が異なる。"
12463
12464 #. type: Plain text
12465 #: build/C/man2/readlink.2:116
12466 msgid ""
12467 "If the pathname given in I<pathname> is relative, then it is interpreted "
12468 "relative to the directory referred to by the file descriptor I<dirfd> "
12469 "(rather than relative to the current working directory of the calling "
12470 "process, as is done by B<readlink>()  for a relative pathname)."
12471 msgstr ""
12472 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
12473 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
12474 "(B<readlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
12475 "ワーキングディレクトリに対する相対パスではない)。"
12476
12477 #. type: Plain text
12478 #: build/C/man2/readlink.2:128
12479 msgid ""
12480 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
12481 "then I<pathname> is interpreted relative to the current working directory of "
12482 "the calling process (like B<readlink>())."
12483 msgstr ""
12484 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
12485 "の場合、 (B<readlink>() と同様に) I<pathname> は呼び出したプロセスのカレント"
12486 "ワーキングディレクトリに対する相対パスと解釈される。"
12487
12488 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
12489 #. type: Plain text
12490 #: build/C/man2/readlink.2:148
12491 msgid ""
12492 "Since Linux 2.6.39, I<pathname> can be an empty string, in which case the "
12493 "call operates on the symbolic link referred to by I<dirfd> (which should "
12494 "have been obtained using B<open>(2)  with the B<O_PATH> and B<O_NOFOLLOW> "
12495 "flags)."
12496 msgstr ""
12497 "Linux 2.6.39 以降では、 I<pathname> に空文字列を指定できる。 その場合、呼び出"
12498 "しは I<dirfd> が参照するシンボリックリンクに対して行われる (I<dirfd> はフラ"
12499 "グ B<O_PATH> と B<O_NOFOLLOW> を指定した B<open>(2) を使って取得すべきであ"
12500 "る)。"
12501
12502 #. type: Plain text
12503 #: build/C/man2/readlink.2:153
12504 msgid "See B<openat>(2)  for an explanation of the need for B<readlinkat>()."
12505 msgstr "B<readlinkat>() の必要性についての説明については B<openat>(2) を参照。"
12506
12507 #. type: Plain text
12508 #: build/C/man2/readlink.2:159
12509 msgid ""
12510 "On success, these calls return the number of bytes placed in I<buf>.  On "
12511 "error, -1 is returned and I<errno> is set to indicate the error."
12512 msgstr ""
12513 "成功すると、これらのシステムコールは I<buf> に格納されたバイト数を返す。 エ"
12514 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
12515
12516 #. type: Plain text
12517 #: build/C/man2/readlink.2:165
12518 msgid ""
12519 "Search permission is denied for a component of the path prefix.  (See also "
12520 "B<path_resolution>(7).)"
12521 msgstr ""
12522 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
12523 "参照すること)。"
12524
12525 #. type: Plain text
12526 #: build/C/man2/readlink.2:169
12527 msgid "I<buf> extends outside the process's allocated address space."
12528 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
12529
12530 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
12531 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
12532 #.  and this error can also occur if bufsiz < 0.
12533 #.  See: http://thread.gmane.org/gmane.linux.man/380
12534 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
12535 #. type: Plain text
12536 #: build/C/man2/readlink.2:178
12537 msgid "I<bufsiz> is not positive."
12538 msgstr "I<bufsiz> が正でない。"
12539
12540 #. type: Plain text
12541 #: build/C/man2/readlink.2:181
12542 msgid "The named file is not a symbolic link."
12543 msgstr "指定したファイルがシンボリックリンクでない。"
12544
12545 #. type: Plain text
12546 #: build/C/man2/readlink.2:184
12547 msgid "An I/O error occurred while reading from the filesystem."
12548 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
12549
12550 #. type: Plain text
12551 #: build/C/man2/readlink.2:187
12552 msgid "Too many symbolic links were encountered in translating the pathname."
12553 msgstr "パス名にシンボリックリンクが多すぎる。"
12554
12555 #. type: Plain text
12556 #: build/C/man2/readlink.2:190
12557 msgid "A pathname, or a component of a pathname, was too long."
12558 msgstr "パス名かパス名の一部分が長過ぎる。"
12559
12560 #. type: Plain text
12561 #: build/C/man2/readlink.2:193
12562 msgid "The named file does not exist."
12563 msgstr "その名前のファイルが存在しない。"
12564
12565 #. type: Plain text
12566 #: build/C/man2/readlink.2:199
12567 msgid "A component of the path prefix is not a directory."
12568 msgstr "パスのディレクトリ部分がディレクトリでない。"
12569
12570 #. type: Plain text
12571 #: build/C/man2/readlink.2:202
12572 msgid "The following additional errors can occur for B<readlinkat>():"
12573 msgstr "B<readlinkat>() では以下のエラーも発生する。"
12574
12575 #. type: Plain text
12576 #: build/C/man2/readlink.2:212 build/C/man2/unlink.2:269
12577 msgid ""
12578 "I<pathname> is relative and I<dirfd> is a file descriptor referring to a "
12579 "file other than a directory."
12580 msgstr ""
12581 "I<pathname> が相対パスで、 I<dirfd> がディレクトリ以外のファイルを参照してい"
12582 "るファイルディスクリプターである。"
12583
12584 #. type: Plain text
12585 #: build/C/man2/readlink.2:216
12586 msgid ""
12587 "B<readlinkat>()  was added to Linux in kernel 2.6.16; library support was "
12588 "added to glibc in version 2.4."
12589 msgstr ""
12590 "B<readlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
12591 "ポートはバージョン 2.4 で glibc に追加された。"
12592
12593 #. type: Plain text
12594 #: build/C/man2/readlink.2:222
12595 msgid ""
12596 "B<readlink>(): 4.4BSD (B<readlink>()  first appeared in 4.2BSD), "
12597 "POSIX.1-2001, POSIX.1-2008."
12598 msgstr ""
12599 "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001, "
12600 "POSIX.1-2008."
12601
12602 #. type: Plain text
12603 #: build/C/man2/readlink.2:225
12604 msgid "B<readlinkat>(): POSIX.1-2008."
12605 msgstr "B<readlinkat>(): POSIX.1-2008."
12606
12607 #. type: Plain text
12608 #: build/C/man2/readlink.2:233
12609 msgid ""
12610 "In versions of glibc up to and including glibc 2.4, the return type of "
12611 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
12612 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
12613 msgstr ""
12614 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
12615 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
12616 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
12617
12618 #. type: Plain text
12619 #: build/C/man2/readlink.2:256
12620 msgid ""
12621 "Using a statically sized buffer might not provide enough room for the "
12622 "symbolic link contents.  The required size for the buffer can be obtained "
12623 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
12624 "link.  However, the number of bytes written by B<readlink>()  and "
12625 "B<readlinkat>()  should be checked to make sure that the size of the "
12626 "symbolic link did not increase between the calls.  Dynamically allocating "
12627 "the buffer for B<readlink>()  and B<readlinkat>()  also addresses a common "
12628 "portability problem when using I<PATH_MAX> for the buffer size, as this "
12629 "constant is not guaranteed to be defined per POSIX if the system does not "
12630 "have such limit."
12631 msgstr ""
12632 "静的な大きさのバッファーを使うと、 シンボリックリンクの内容を格納するのに十分"
12633 "な領域がない場合がある。 バッファーに必要なサイズは、 そのシンボリックリンク"
12634 "に対して B<lstat>(2) の呼び出しで返される I<stat.st_size> の値から取得でき"
12635 "る。 ただし、 B<readlink>() や B<readlinkat>() が書き込んだバイト数をチェック"
12636 "して、 シンボリックリンクのサイズが二つの呼び出しの間で増えていないことを確認"
12637 "すべきである。 B<readlink>() や B<readlinkat>() 用のバッファーを動的に割り当"
12638 "てる方法でも、 バッファーサイズとして I<PATH_MAX> を使用する場合に共通する移"
12639 "植性の問題を解決することができる。 なぜなら、POSIX では、 システムがそのよう"
12640 "な上限値を定義していない場合には、 I<PATH_MAX> が定義されることが保証されてい"
12641 "ないからである。"
12642
12643 #. type: Plain text
12644 #: build/C/man2/readlink.2:269
12645 msgid ""
12646 "On older kernels where B<readlinkat>()  is unavailable, the glibc wrapper "
12647 "function falls back to the use of B<readlink>().  When I<pathname> is a "
12648 "relative pathname, glibc constructs a pathname based on the symbolic link in "
12649 "I</proc/self/fd> that corresponds to the I<dirfd> argument."
12650 msgstr ""
12651 "B<readlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
12652 "B<readlink>() を使用するモードにフォールバックする。 I<pathname> が相対パスの"
12653 "場合、 glibc は I<dirfd> 引き数に対応する I</proc/self/fd> のシンボリックリン"
12654 "クに基づいてパス名を構成する。"
12655
12656 #. type: Plain text
12657 #: build/C/man2/readlink.2:275
12658 msgid ""
12659 "The following program allocates the buffer needed by B<readlink>()  "
12660 "dynamically from the information provided by B<lstat>(), making sure there's "
12661 "no race condition between the calls."
12662 msgstr ""
12663 "以下のプログラムは、 B<readlink>() が必要とするバッファーを、\n"
12664 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
12665 "また、両方の呼び出し間で競合条件がないことを保証している。"
12666
12667 #. type: Plain text
12668 #: build/C/man2/readlink.2:282
12669 #, no-wrap
12670 msgid ""
12671 "#include E<lt>sys/types.hE<gt>\n"
12672 "#include E<lt>sys/stat.hE<gt>\n"
12673 "#include E<lt>stdio.hE<gt>\n"
12674 "#include E<lt>stdlib.hE<gt>\n"
12675 "#include E<lt>unistd.hE<gt>\n"
12676 msgstr ""
12677 "#include E<lt>sys/types.hE<gt>\n"
12678 "#include E<lt>sys/stat.hE<gt>\n"
12679 "#include E<lt>stdio.hE<gt>\n"
12680 "#include E<lt>stdlib.hE<gt>\n"
12681 "#include E<lt>unistd.hE<gt>\n"
12682
12683 #. type: Plain text
12684 #: build/C/man2/readlink.2:289
12685 #, no-wrap
12686 msgid ""
12687 "int\n"
12688 "main(int argc, char *argv[])\n"
12689 "{\n"
12690 "    struct stat sb;\n"
12691 "    char *linkname;\n"
12692 "    ssize_t r;\n"
12693 msgstr ""
12694 "int\n"
12695 "main(int argc, char *argv[])\n"
12696 "{\n"
12697 "    struct stat sb;\n"
12698 "    char *linkname;\n"
12699 "    ssize_t r;\n"
12700
12701 #. type: Plain text
12702 #: build/C/man2/readlink.2:294
12703 #, no-wrap
12704 msgid ""
12705 "    if (argc != 2) {\n"
12706 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
12707 "        exit(EXIT_FAILURE);\n"
12708 "    }\n"
12709 msgstr ""
12710 "    if (argc != 2) {\n"
12711 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
12712 "        exit(EXIT_FAILURE);\n"
12713 "    }\n"
12714
12715 #. type: Plain text
12716 #: build/C/man2/readlink.2:299
12717 #, no-wrap
12718 msgid ""
12719 "    if (lstat(argv[1], &sb) == -1) {\n"
12720 "        perror(\"lstat\");\n"
12721 "        exit(EXIT_FAILURE);\n"
12722 "    }\n"
12723 msgstr ""
12724 "    if (lstat(argv[1], &sb) == -1) {\n"
12725 "        perror(\"lstat\");\n"
12726 "        exit(EXIT_FAILURE);\n"
12727 "    }\n"
12728
12729 #. type: Plain text
12730 #: build/C/man2/readlink.2:305
12731 #, no-wrap
12732 msgid ""
12733 "    linkname = malloc(sb.st_size + 1);\n"
12734 "    if (linkname == NULL) {\n"
12735 "        fprintf(stderr, \"insufficient memory\\en\");\n"
12736 "        exit(EXIT_FAILURE);\n"
12737 "    }\n"
12738 msgstr ""
12739 "    linkname = malloc(sb.st_size + 1);\n"
12740 "    if (linkname == NULL) {\n"
12741 "        fprintf(stderr, \"insufficient memory\\en\");\n"
12742 "        exit(EXIT_FAILURE);\n"
12743 "    }\n"
12744
12745 #. type: Plain text
12746 #: build/C/man2/readlink.2:307
12747 #, no-wrap
12748 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
12749 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
12750
12751 #. type: Plain text
12752 #: build/C/man2/readlink.2:312
12753 #, no-wrap
12754 msgid ""
12755 "    if (r == -1) {\n"
12756 "        perror(\"readlink\");\n"
12757 "        exit(EXIT_FAILURE);\n"
12758 "    }\n"
12759 msgstr ""
12760 "    if (r == -1) {\n"
12761 "        perror(\"readlink\");\n"
12762 "        exit(EXIT_FAILURE);\n"
12763 "    }\n"
12764
12765 #. type: Plain text
12766 #: build/C/man2/readlink.2:318
12767 #, no-wrap
12768 msgid ""
12769 "    if (r E<gt> sb.st_size) {\n"
12770 "        fprintf(stderr, \"symlink increased in size \"\n"
12771 "                        \"between lstat() and readlink()\\en\");\n"
12772 "        exit(EXIT_FAILURE);\n"
12773 "    }\n"
12774 msgstr ""
12775 "    if (r E<gt> sb.st_size) {\n"
12776 "        fprintf(stderr, \"symlink increased in size \"\n"
12777 "                        \"between lstat() and readlink()\\en\");\n"
12778 "        exit(EXIT_FAILURE);\n"
12779 "    }\n"
12780
12781 #. type: Plain text
12782 #: build/C/man2/readlink.2:320
12783 #, no-wrap
12784 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
12785 msgstr "    linkname[r] = \\(aq\\e0\\(aq;\n"
12786
12787 #. type: Plain text
12788 #: build/C/man2/readlink.2:322
12789 #, no-wrap
12790 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
12791 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
12792
12793 #. type: Plain text
12794 #: build/C/man2/readlink.2:324
12795 #, no-wrap
12796 msgid "    free(linkname);\n"
12797 msgstr "    free(linkname);\n"
12798
12799 #. type: Plain text
12800 #: build/C/man2/readlink.2:336
12801 msgid ""
12802 "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<realpath>(3), "
12803 "B<path_resolution>(7), B<symlink>(7)"
12804 msgstr ""
12805 "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<realpath>(3), "
12806 "B<path_resolution>(7), B<symlink>(7)"
12807
12808 #. type: TH
12809 #: build/C/man2/readv.2:32
12810 #, no-wrap
12811 msgid "READV"
12812 msgstr "READV"
12813
12814 #. type: Plain text
12815 #: build/C/man2/readv.2:35
12816 msgid ""
12817 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
12818 msgstr "readv, writev, preadv, pwritev - 複数のバッファーへの読み書きを行なう"
12819
12820 #. type: Plain text
12821 #: build/C/man2/readv.2:38
12822 #, no-wrap
12823 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
12824 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
12825
12826 #. type: Plain text
12827 #: build/C/man2/readv.2:40
12828 #, no-wrap
12829 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12830 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12831
12832 #. type: Plain text
12833 #: build/C/man2/readv.2:42
12834 #, no-wrap
12835 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12836 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12837
12838 #. type: Plain text
12839 #: build/C/man2/readv.2:45
12840 #, no-wrap
12841 msgid ""
12842 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12843 "B<               off_t >I<offset>B<);>\n"
12844 msgstr ""
12845 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12846 "B<               off_t >I<offset>B<);>\n"
12847
12848 #. type: Plain text
12849 #: build/C/man2/readv.2:48
12850 #, no-wrap
12851 msgid ""
12852 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12853 "B<                off_t >I<offset>B<);>\n"
12854 msgstr ""
12855 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12856 "B<                off_t >I<offset>B<);>\n"
12857
12858 #. type: Plain text
12859 #: build/C/man2/readv.2:58
12860 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
12861 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
12862
12863 #. type: Plain text
12864 #: build/C/man2/readv.2:68
12865 msgid ""
12866 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
12867 "with the file descriptor I<fd> into the buffers described by I<iov> "
12868 "(\"scatter input\")."
12869 msgstr ""
12870 "B<readv>() システムコールは、ファイルディスクリプター I<fd> に関連付けられ"
12871 "た\n"
12872 "ファイルから、 I<iovcnt> 個のバッファー分のデータを読み込み、 I<iov> で指定\n"
12873 "されたバッファーに格納する (\"scatter input\";「ばらまき入力」)。"
12874
12875 #. type: Plain text
12876 #: build/C/man2/readv.2:78
12877 msgid ""
12878 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
12879 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
12880 "\")."
12881 msgstr ""
12882 "B<writev>() システムコールは、 I<iov> で指定されたバッファーから最大 "
12883 "I<iovcnt>\n"
12884 "個のバッファー分のデータを取り出し、 ファイルディスクリプター I<fd> に関連付"
12885 "けら\n"
12886 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
12887
12888 #. type: Plain text
12889 #: build/C/man2/readv.2:87
12890 msgid ""
12891 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
12892 "I<E<lt>sys/uio.hE<gt>> as:"
12893 msgstr ""
12894 "ポインター I<iov> は I<iovec> 構造体の配列へのポインターである。 I<iovec> 構"
12895 "造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
12896
12897 #. type: Plain text
12898 #: build/C/man2/readv.2:95
12899 #, no-wrap
12900 msgid ""
12901 "struct iovec {\n"
12902 "    void  *iov_base;    /* Starting address */\n"
12903 "    size_t iov_len;     /* Number of bytes to transfer */\n"
12904 "};\n"
12905 msgstr ""
12906 "struct iovec {\n"
12907 "    void  *iov_base;    /* Starting address */\n"
12908 "    size_t iov_len;     /* Number of bytes to transfer */\n"
12909 "};\n"
12910
12911 #. type: Plain text
12912 #: build/C/man2/readv.2:103
12913 msgid ""
12914 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
12915 "buffers are filled."
12916 msgstr ""
12917 "B<readv>() システムコールは、複数のバッファーにデータを読み込む点を除いて\n"
12918 "B<read>(2) と全く同様の動作を行う。"
12919
12920 #. type: Plain text
12921 #: build/C/man2/readv.2:109
12922 msgid ""
12923 "The B<writev>()  system call works just like B<write>(2)  except that "
12924 "multiple buffers are written out."
12925 msgstr ""
12926 "B<writev>() システムコールは、複数のバッファーのデータを書き出す点以外は\n"
12927 "B<write>(2) と全く同様の動作を行う。"
12928
12929 #. type: Plain text
12930 #: build/C/man2/readv.2:128
12931 msgid ""
12932 "Buffers are processed in array order.  This means that B<readv>()  "
12933 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
12934 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
12935 "filled.)  Similarly, B<writev>()  writes out the entire contents of "
12936 "I<iov>[0] before proceeding to I<iov>[1], and so on."
12937 msgstr ""
12938 "バッファーは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全"
12939 "に一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (デー"
12940 "タが十分ない場合は、 I<iov> が指すバッファーのいずれも一杯にならない)。 同様"
12941 "に、 B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進"
12942 "む。"
12943
12944 #. type: Plain text
12945 #: build/C/man2/readv.2:146
12946 msgid ""
12947 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
12948 "data written by B<writev>()  is written as a single block that is not "
12949 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
12950 "for an exception); analogously, B<readv>()  is guaranteed to read a "
12951 "contiguous block of data from the file, regardless of read operations "
12952 "performed in other threads or processes that have file descriptors referring "
12953 "to the same open file description (see B<open>(2))."
12954 msgstr ""
12955 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
12956 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
12957 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
12958 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
12959 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
12960 "参照するファイルディスクリプターを持つ他のスレッドやプロセスが 実行した read "
12961 "操作の影響を受けることはない。"
12962
12963 #. type: SS
12964 #: build/C/man2/readv.2:146
12965 #, no-wrap
12966 msgid "preadv() and pwritev()"
12967 msgstr "preadv() と pwritev()"
12968
12969 #. type: Plain text
12970 #: build/C/man2/readv.2:159
12971 msgid ""
12972 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
12973 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
12974 "argument, I<offset>, which specifies the file offset at which the input "
12975 "operation is to be performed."
12976 msgstr ""
12977 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
12978 "組み合わせたものである。\n"
12979 "B<readv>() と同じ処理を実行するが、\n"
12980 "4 番目の引き数 I<offset> が追加されており、\n"
12981 "この引き数は入力操作を行うファイルオフセットを指定する。"
12982
12983 #. type: Plain text
12984 #: build/C/man2/readv.2:172
12985 msgid ""
12986 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
12987 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
12988 "argument, I<offset>, which specifies the file offset at which the output "
12989 "operation is to be performed."
12990 msgstr ""
12991 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
12992 "組み合わせたものである。\n"
12993 "B<writev>() と同じ処理を実行するが、\n"
12994 "4 番目の引き数 I<offset> が追加されており、\n"
12995 "この引き数は出力操作を行うファイルオフセットを指定する。"
12996
12997 #. type: Plain text
12998 #: build/C/man2/readv.2:177
12999 msgid ""
13000 "The file offset is not changed by these system calls.  The file referred to "
13001 "by I<fd> must be capable of seeking."
13002 msgstr ""
13003 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
13004 "I<fd> が参照するファイルは seek 可能でなければならない。"
13005
13006 #. type: Plain text
13007 #: build/C/man2/readv.2:188
13008 msgid ""
13009 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
13010 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
13011 "error, -1 is returned, and I<errno> is set appropriately."
13012 msgstr ""
13013 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
13014 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
13015 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
13016
13017 #. type: Plain text
13018 #: build/C/man2/readv.2:200
13019 msgid ""
13020 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
13021 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as "
13022 "B<lseek>(2).  Additionally, the following error is defined:"
13023 msgstr ""
13024 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
13025 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
13026 "る。\n"
13027 "また、追加で以下のエラーが定義されている:"
13028
13029 #. type: Plain text
13030 #: build/C/man2/readv.2:207
13031 msgid "The sum of the I<iov_len> values overflows an I<ssize_t> value."
13032 msgstr "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。"
13033
13034 #. type: Plain text
13035 #: build/C/man2/readv.2:211
13036 msgid ""
13037 "The vector count I<iovcnt> is less than zero or greater than the permitted "
13038 "maximum."
13039 msgstr "ベクタ数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
13040
13041 #. type: Plain text
13042 #: build/C/man2/readv.2:216
13043 msgid ""
13044 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
13045 "support was added in glibc 2.10."
13046 msgstr ""
13047 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
13048 "ライブラリによるサポートは glibc 2.10 で追加された。"
13049
13050 #.  Linux libc5 used \fIsize_t\fP as the type of the \fIiovcnt\fP argument,
13051 #.  and \fIint\fP as the return type.
13052 #.  The readv/writev system calls were buggy before Linux 1.3.40.
13053 #.  (Says release.libc.)
13054 #. type: Plain text
13055 #: build/C/man2/readv.2:224
13056 msgid ""
13057 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
13058 "4.2BSD), POSIX.1-2001."
13059 msgstr ""
13060 "B<readv>(), B<writev>(): 4.4BSD (これらのシステムコールは 4.2BSD で初めて登場"
13061 "した), POSIX.1-2001."
13062
13063 #. type: Plain text
13064 #: build/C/man2/readv.2:228
13065 msgid ""
13066 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
13067 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
13068
13069 #. type: Plain text
13070 #: build/C/man2/readv.2:240
13071 msgid ""
13072 "POSIX.1-2001 allows an implementation to place a limit on the number of "
13073 "items that can be passed in I<iov>.  An implementation can advertise its "
13074 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
13075 "return value from I<sysconf(_SC_IOV_MAX)>.  On modern Linux systems, the "
13076 "limit is 1024.  Back in Linux 2.0 days, this limit was 16."
13077 msgstr ""
13078 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
13079 "れている。 実装はこの上限値を広告することができ、 I<E<lt>limits.hE<gt>> の "
13080 "B<IOV_MAX> を定義することや、 実行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で"
13081 "知ることができる。 最近の Linux では、 この上限値は 1024 である。 Linux 2.0 "
13082 "の頃は、 この値は 16 であった。"
13083
13084 #. type: SS
13085 #: build/C/man2/readv.2:242
13086 #, no-wrap
13087 msgid "C library/kernel ABI differences"
13088 msgstr "C ライブラリとカーネル ABI の違い"
13089
13090 #. type: Plain text
13091 #: build/C/man2/readv.2:252
13092 msgid ""
13093 "The raw B<preadv>()  and B<pwritev>()  system calls have call signatures "
13094 "that differ slightly from that of the corresponding GNU C library wrapper "
13095 "functions shown in the SYNOPSIS.  The final argument, I<offset>, is unpacked "
13096 "by the wrapper functions into two arguments in the system calls:"
13097 msgstr ""
13098 "素のシステムコール B<preadv>() と B<pwritev>() のシグネチャーは、 「書式」に"
13099 "書かれている対応する GNU C ライブラリのラッパー関数のものとは少し異なる。 最"
13100 "後の引き数 I<offset> はラッパー関数によりシステムコールの 2 つの引き数に展開"
13101 "される。"
13102
13103 #. type: Plain text
13104 #: build/C/man2/readv.2:254
13105 msgid "B< unsigned long >I<pos_l>B<, unsigned long >I<pos>"
13106 msgstr "B< unsigned long >I<pos_l>B<, unsigned long >I<pos>"
13107
13108 #. type: Plain text
13109 #: build/C/man2/readv.2:257
13110 msgid ""
13111 "These arguments contain, respectively, the low order and high order 32 bits "
13112 "of I<offset>."
13113 msgstr ""
13114 "これらの引き数は、それぞれ、 I<offset> の下位 32 ビットと上位 32 ビットであ"
13115 "る。"
13116
13117 #. type: SS
13118 #: build/C/man2/readv.2:257
13119 #, no-wrap
13120 msgid "Historical C library/kernel ABI differences"
13121 msgstr "以前の C ライブラリとカーネル ABI の違い"
13122
13123 #. type: Plain text
13124 #: build/C/man2/readv.2:283
13125 msgid ""
13126 "To deal with the fact that B<IOV_MAX> was so low on early versions of Linux, "
13127 "the glibc wrapper functions for B<readv>()  and B<writev>()  did some extra "
13128 "work if they detected that the underlying kernel system call failed because "
13129 "this limit was exceeded.  In the case of B<readv>(), the wrapper function "
13130 "allocated a temporary buffer large enough for all of the items specified by "
13131 "I<iov>, passed that buffer in a call to B<read>(2), copied data from the "
13132 "buffer to the locations specified by the I<iov_base> fields of the elements "
13133 "of I<iov>, and then freed the buffer.  The wrapper function for B<writev>()  "
13134 "performed the analogous task using a temporary buffer and a call to "
13135 "B<write>(2)."
13136 msgstr ""
13137 "古いバージョンの Linux では B<IOV_MAX> が非常に小さかったという事実に対処する"
13138 "ため、 glibc の B<readv>() と B<writev>() のラッパー関数は、 その関数の内部で"
13139 "呼ばれるカーネルシステムコールがこの上限を超過して失敗したことを検出すると、 "
13140 "追加の動作をしていた。 B<readv>() の場合、 ラッパー関数は I<iov> で指定された"
13141 "全ての要素を格納できる大きさの一時バッファーを割り当て、 B<read>(2) を呼び出"
13142 "す際にそのバッファーを渡し、 そのバッファーのデータを I<iov> の各要素の "
13143 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファーを解放し"
13144 "ていた。 B<writev>() のラッパー関数も、 同じように一時バッファーを使って "
13145 "B<write>(2) を呼び出していた。"
13146
13147 #. type: Plain text
13148 #: build/C/man2/readv.2:294
13149 msgid ""
13150 "The need for this extra effort in the glibc wrapper functions went away with "
13151 "Linux 2.2 and later.  However, glibc continued to provide this behavior "
13152 "until version 2.10.  Starting with glibc version 2.9, the wrapper functions "
13153 "provide this behavior only if the library detects that the system is running "
13154 "a Linux kernel older than version 2.6.18 (an arbitrarily selected kernel "
13155 "version).  And since glibc 2.20 (which requires a minimum Linux kernel "
13156 "version of 2.6.32), the glibc wrapper functions always just directly invoke "
13157 "the system calls."
13158 msgstr ""
13159 "glibc ラッパー関数でのこの追加の動作は Linux 2.2 以降では必要なくなった。 し"
13160 "かし、 glibc はバージョン 2.10 まではこの動作を続けていた。 glibc 2.9 以降で"
13161 "は、 システムがバージョン 2.6.18 より前の Linux カーネル (2.6.18 は勝手に選択"
13162 "したカーネルバージョンである) を実行しているとライブラリが検出した場合にの"
13163 "み、 ラッパー関数はこの動作を行う。 glibc 2.20 以降では、 (Linux カーネルの"
13164 "バージョン 2.6.32 以降が必須条件となり) glibc のラッパー関数は常にシステム"
13165 "コールを直接呼び出すようになっている。"
13166
13167 #. type: Plain text
13168 #: build/C/man2/readv.2:301
13169 msgid ""
13170 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
13171 "operate on file descriptors, with the functions from the stdio library; the "
13172 "results will be undefined and probably not what you want."
13173 msgstr ""
13174 "ファイルディスクリプターに対する操作を行う B<readv>() や B<writev>() と、\n"
13175 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
13176 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
13177 "得られないだろう。"
13178
13179 #. type: Plain text
13180 #: build/C/man2/readv.2:304
13181 msgid "The following code sample demonstrates the use of B<writev>():"
13182 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
13183
13184 #. type: Plain text
13185 #: build/C/man2/readv.2:311
13186 #, no-wrap
13187 msgid ""
13188 "char *str0 = \"hello \";\n"
13189 "char *str1 = \"world\\en\";\n"
13190 "struct iovec iov[2];\n"
13191 "ssize_t nwritten;\n"
13192 msgstr ""
13193 "char *str0 = \"hello \";\n"
13194 "char *str1 = \"world\\en\";\n"
13195 "struct iovec iov[2];\n"
13196 "ssize_t nwritten;\n"
13197
13198 #. type: Plain text
13199 #: build/C/man2/readv.2:316
13200 #, no-wrap
13201 msgid ""
13202 "iov[0].iov_base = str0;\n"
13203 "iov[0].iov_len = strlen(str0);\n"
13204 "iov[1].iov_base = str1;\n"
13205 "iov[1].iov_len = strlen(str1);\n"
13206 msgstr ""
13207 "iov[0].iov_base = str0;\n"
13208 "iov[0].iov_len = strlen(str0);\n"
13209 "iov[1].iov_base = str1;\n"
13210 "iov[1].iov_len = strlen(str1);\n"
13211
13212 #. type: Plain text
13213 #: build/C/man2/readv.2:318
13214 #, no-wrap
13215 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
13216 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
13217
13218 #. type: Plain text
13219 #: build/C/man2/readv.2:324
13220 msgid "B<pread>(2), B<read>(2), B<write>(2)"
13221 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
13222
13223 #. type: TH
13224 #: build/C/man3/remove.3:31
13225 #, no-wrap
13226 msgid "REMOVE"
13227 msgstr "REMOVE"
13228
13229 #. type: Plain text
13230 #: build/C/man3/remove.3:34
13231 msgid "remove - remove a file or directory"
13232 msgstr "remove - ファイルやディレクトリを削除する"
13233
13234 #. type: Plain text
13235 #: build/C/man3/remove.3:38
13236 msgid "B<int remove(const char *>I<pathname>B<);>"
13237 msgstr "B<int remove(const char *>I<pathname>B<);>"
13238
13239 #. type: Plain text
13240 #: build/C/man3/remove.3:46
13241 msgid ""
13242 "B<remove>()  deletes a name from the filesystem.  It calls B<unlink>(2)  for "
13243 "files, and B<rmdir>(2)  for directories."
13244 msgstr ""
13245 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
13246 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
13247
13248 #. type: Plain text
13249 #: build/C/man3/remove.3:50
13250 msgid ""
13251 "If the removed name was the last link to a file and no processes have the "
13252 "file open, the file is deleted and the space it was using is made available "
13253 "for reuse."
13254 msgstr ""
13255 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
13256 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
13257 "ことができるようになる。"
13258
13259 #. type: Plain text
13260 #: build/C/man3/remove.3:55
13261 msgid ""
13262 "If the name was the last link to a file, but any processes still have the "
13263 "file open, the file will remain in existence until the last file descriptor "
13264 "referring to it is closed."
13265 msgstr ""
13266 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
13267 "いているなら、ファイルの最後のファイルディスクリプター (file descriptor) が閉"
13268 "じられるまでファイルは存在し続ける。"
13269
13270 #. type: Plain text
13271 #: build/C/man3/remove.3:57 build/C/man2/unlink.2:78
13272 msgid "If the name referred to a symbolic link, the link is removed."
13273 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
13274
13275 #. type: Plain text
13276 #: build/C/man3/remove.3:60
13277 msgid ""
13278 "If the name referred to a socket, FIFO, or device, the name is removed, but "
13279 "processes which have the object open may continue to use it."
13280 msgstr ""
13281 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
13282 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
13283
13284 #. type: Plain text
13285 #: build/C/man3/remove.3:70
13286 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
13287 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
13288
13289 #. type: Plain text
13290 #: build/C/man3/remove.3:75
13291 msgid "The B<remove>()  function is thread-safe."
13292 msgstr "関数 B<remove>() はスレッドセーフである。"
13293
13294 #.  .SH NOTES
13295 #.  Under libc4 and libc5,
13296 #.  .BR remove ()
13297 #.  was an alias for
13298 #.  .BR unlink (2)
13299 #.  (and hence would not remove directories).
13300 #. type: Plain text
13301 #: build/C/man3/remove.3:83
13302 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
13303 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
13304
13305 #. type: Plain text
13306 #: build/C/man3/remove.3:86 build/C/man2/unlink.2:300
13307 msgid ""
13308 "Infelicities in the protocol underlying NFS can cause the unexpected "
13309 "disappearance of files which are still being used."
13310 msgstr ""
13311 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
13312 "うことがありえる。"
13313
13314 #. type: Plain text
13315 #: build/C/man3/remove.3:97
13316 msgid ""
13317 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
13318 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
13319 msgstr ""
13320 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
13321 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
13322
13323 #. type: TH
13324 #: build/C/man2/rename.2:33
13325 #, no-wrap
13326 msgid "RENAME"
13327 msgstr "RENAME"
13328
13329 #. type: Plain text
13330 #: build/C/man2/rename.2:36
13331 msgid "rename, renameat, renameat2 - change the name or location of a file"
13332 msgstr "rename, renameat, renameat2 - ファイルの名前や位置を変更する"
13333
13334 #. type: Plain text
13335 #: build/C/man2/rename.2:41
13336 #, no-wrap
13337 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
13338 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
13339
13340 #. type: Plain text
13341 #: build/C/man2/rename.2:44
13342 #, no-wrap
13343 msgid ""
13344 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
13345 "B<#include E<lt>stdio.hE<gt>>\n"
13346 msgstr ""
13347 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
13348 "B<#include E<lt>stdio.hE<gt>>\n"
13349
13350 #. type: Plain text
13351 #: build/C/man2/rename.2:47
13352 #, no-wrap
13353 msgid ""
13354 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13355 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
13356 msgstr ""
13357 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13358 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
13359
13360 #. type: Plain text
13361 #: build/C/man2/rename.2:51
13362 #, no-wrap
13363 msgid ""
13364 "B<int renameat2(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13365 "B<              int >I<newdirfd>B<, const char *>I<newpath>B<, unsigned int >I<flags>B<);>\n"
13366 msgstr ""
13367 "B<int renameat2(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13368 "B<              int >I<newdirfd>B<, const char *>I<newpath>B<, unsigned int >I<flags>B<);>\n"
13369
13370 #. type: Plain text
13371 #: build/C/man2/rename.2:59
13372 msgid "B<renameat>():"
13373 msgstr "B<renameat>():"
13374
13375 #. type: Plain text
13376 #: build/C/man2/rename.2:81
13377 msgid ""
13378 "B<rename>()  renames a file, moving it between directories if required.  Any "
13379 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
13380 "Open file descriptors for I<oldpath> are also unaffected."
13381 msgstr ""
13382 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
13383 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
13384 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
13385 "リプターにも影響はない。"
13386
13387 #. type: Plain text
13388 #: build/C/man2/rename.2:89
13389 msgid ""
13390 "If I<newpath> already exists, it will be atomically replaced (subject to a "
13391 "few conditions; see ERRORS below), so that there is no point at which "
13392 "another process attempting to access I<newpath> will find it missing."
13393 msgstr ""
13394 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
13395 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
13396 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
13397 "とはない (訳註: 常にアクセス可能である)。"
13398
13399 #. type: Plain text
13400 #: build/C/man2/rename.2:97
13401 msgid ""
13402 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
13403 "file, then B<rename>()  does nothing, and returns a success status."
13404 msgstr ""
13405 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
13406 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
13407
13408 #. type: Plain text
13409 #: build/C/man2/rename.2:105
13410 msgid ""
13411 "If I<newpath> exists but the operation fails for some reason, B<rename>()  "
13412 "guarantees to leave an instance of I<newpath> in place."
13413 msgstr ""
13414 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
13415 "I<newpath> の実体を元のまま残すことを保証する。"
13416
13417 #. type: Plain text
13418 #: build/C/man2/rename.2:111
13419 msgid ""
13420 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
13421 "not exist, or it must specify an empty directory."
13422 msgstr ""
13423 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
13424 "存在しないか、空のディレクトリでなければならない。"
13425
13426 #. type: Plain text
13427 #: build/C/man2/rename.2:118
13428 msgid ""
13429 "However, when overwriting there will probably be a window in which both "
13430 "I<oldpath> and I<newpath> refer to the file being renamed."
13431 msgstr ""
13432 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
13433 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
13434
13435 #. type: Plain text
13436 #: build/C/man2/rename.2:124
13437 msgid ""
13438 "If I<oldpath> refers to a symbolic link, the link is renamed; if I<newpath> "
13439 "refers to a symbolic link, the link will be overwritten."
13440 msgstr ""
13441 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
13442 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
13443 "は、リンクが上書きされる。"
13444
13445 #. type: SS
13446 #: build/C/man2/rename.2:124
13447 #, no-wrap
13448 msgid "renameat()"
13449 msgstr "renameat()"
13450
13451 #. type: Plain text
13452 #: build/C/man2/rename.2:130
13453 msgid ""
13454 "The B<renameat>()  system call operates in exactly the same way as "
13455 "B<rename>(), except for the differences described here."
13456 msgstr ""
13457 "B<renameat>() システムコールは B<rename>() と全く同様に動作するが、以下で説明"
13458 "する点が異なる。"
13459
13460 #. type: Plain text
13461 #: build/C/man2/rename.2:140
13462 msgid ""
13463 "If the pathname given in I<oldpath> is relative, then it is interpreted "
13464 "relative to the directory referred to by the file descriptor I<olddirfd> "
13465 "(rather than relative to the current working directory of the calling "
13466 "process, as is done by B<rename>()  for a relative pathname)."
13467 msgstr ""
13468 "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリ"
13469 "プター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される "
13470 "(B<rename>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
13471 "ワーキングディレクトリに対する相対パスではない)。"
13472
13473 #. type: Plain text
13474 #: build/C/man2/rename.2:152
13475 msgid ""
13476 "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, "
13477 "then I<oldpath> is interpreted relative to the current working directory of "
13478 "the calling process (like B<rename>())."
13479 msgstr ""
13480 "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 "
13481 "B<AT_FDCWD> の場合、 (B<rename>(2) と同様に) I<oldpath> は呼び出したプロセス"
13482 "のカレントワーキングディレクトリに対する相対パスと解釈される。"
13483
13484 #. type: Plain text
13485 #: build/C/man2/rename.2:171
13486 msgid "See B<openat>(2)  for an explanation of the need for B<renameat>()."
13487 msgstr "B<renameat>() の必要性についての説明については B<openat>(2) を参照。"
13488
13489 #. type: SS
13490 #: build/C/man2/rename.2:171
13491 #, no-wrap
13492 msgid "renameat2()"
13493 msgstr "renameat2()"
13494
13495 #. type: Plain text
13496 #: build/C/man2/rename.2:182
13497 msgid ""
13498 "B<renameat2>()  has an additional I<flags> argument.  A B<renameat2>()  call "
13499 "with a zero I<flags> argument is equivalent to B<renameat>()."
13500 msgstr ""
13501 "B<renameat2>() には追加の I<flags> 引き数がある。 I<flags> 引き数が 0 の "
13502 "B<renameat2>() の呼び出しは B<renameat>() と等価である。"
13503
13504 #. type: Plain text
13505 #: build/C/man2/rename.2:186
13506 msgid ""
13507 "The I<flags> argument is a bit mask consisting of zero or more of the "
13508 "following flags:"
13509 msgstr "I<flags> 引き数は、以下のフラグの 0 個以上のビットマスクである。"
13510
13511 #. type: TP
13512 #: build/C/man2/rename.2:186
13513 #, no-wrap
13514 msgid "B<RENAME_NOREPLACE>"
13515 msgstr "B<RENAME_NOREPLACE>"
13516
13517 #. type: Plain text
13518 #: build/C/man2/rename.2:194
13519 msgid ""
13520 "Don't overwrite I<newpath> of the rename.  Return an error if I<newpath> "
13521 "already exists."
13522 msgstr ""
13523 "rename の I<newpath> を上書きしない。 I<newpath> がすでに存在する場合エラーを"
13524 "返す。"
13525
13526 #. type: TP
13527 #: build/C/man2/rename.2:194
13528 #, no-wrap
13529 msgid "B<RENAME_EXCHANGE>"
13530 msgstr "B<RENAME_EXCHANGE>"
13531
13532 #. type: Plain text
13533 #: build/C/man2/rename.2:203
13534 msgid ""
13535 "Atomically exchange I<oldpath> and I<newpath>.  Both pathnames must exist "
13536 "but may be of different types (e.g., one could be a non-empty directory and "
13537 "the other a symbolic link)."
13538 msgstr ""
13539 "I<oldpath> と I<newpath> をアトミックに入れ換える。 両方のパス名が存在しなけ"
13540 "ればならないが、 ファイル種別は異なっていてもよい (例えば、一方は空でないディ"
13541 "レクトリで、もう一方はシンボリックリンクであるなど)。"
13542
13543 #. type: Plain text
13544 #: build/C/man2/rename.2:228
13545 msgid ""
13546 "Write permission is denied for the directory containing I<oldpath> or "
13547 "I<newpath>, or, search permission is denied for one of the directories in "
13548 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
13549 "and does not allow write permission (needed to update the I<..> entry).  "
13550 "(See also B<path_resolution>(7).)"
13551 msgstr ""
13552 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
13553 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
13554 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリーを更新するのに必"
13555 "要な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
13556
13557 #. type: TP
13558 #: build/C/man2/rename.2:228 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:169
13559 #, no-wrap
13560 msgid "B<EBUSY>"
13561 msgstr "B<EBUSY>"
13562
13563 #. type: Plain text
13564 #: build/C/man2/rename.2:245
13565 msgid ""
13566 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
13567 "use by some process (perhaps as current working directory, or as root "
13568 "directory, or because it was open for reading) or is in use by the system "
13569 "(for example as mount point), while the system considers this an error.  "
13570 "(Note that there is no requirement to return B<EBUSY> in such cases"
13571 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
13572 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
13573 "situations.)"
13574 msgstr ""
13575 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
13576 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
13577 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
13578 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
13579 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
13580 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
13581 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
13582 "B<EBUSY> を返すことが許されている。)"
13583
13584 #. type: Plain text
13585 #: build/C/man2/rename.2:255
13586 msgid ""
13587 "The new pathname contained a path prefix of the old, or, more generally, an "
13588 "attempt was made to make a directory a subdirectory of itself."
13589 msgstr ""
13590 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
13591 "ディレクトリに 変更しようとした場合がほとんどである。"
13592
13593 #. type: Plain text
13594 #: build/C/man2/rename.2:261
13595 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
13596 msgstr ""
13597 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
13598 "い。"
13599
13600 #. type: Plain text
13601 #: build/C/man2/rename.2:272
13602 msgid ""
13603 "I<oldpath> already has the maximum number of links to it, or it was a "
13604 "directory and the directory containing I<newpath> has the maximum number of "
13605 "links."
13606 msgstr ""
13607 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
13608 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
13609
13610 #. type: Plain text
13611 #: build/C/man2/rename.2:288
13612 msgid ""
13613 "The link named by I<oldpath> does not exist; or, a directory component in "
13614 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
13615 msgstr ""
13616 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
13617 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
13618
13619 #. type: Plain text
13620 #: build/C/man2/rename.2:305
13621 msgid ""
13622 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
13623 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
13624 "not a directory."
13625 msgstr ""
13626 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
13627 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
13628 "トリでない。"
13629
13630 #. type: TP
13631 #: build/C/man2/rename.2:305
13632 #, no-wrap
13633 msgid "B<ENOTEMPTY> or B<EEXIST>"
13634 msgstr "B<ENOTEMPTY  または  EEXIST>"
13635
13636 #. type: Plain text
13637 #: build/C/man2/rename.2:309
13638 msgid ""
13639 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
13640 "\" and \"..\"."
13641 msgstr ""
13642 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
13643 "でいる。"
13644
13645 #. type: TP
13646 #: build/C/man2/rename.2:309 build/C/man2/unlink.2:224
13647 #, no-wrap
13648 msgid "B<EPERM> or B<EACCES>"
13649 msgstr "B<EPERM> または B<EACCES>"
13650
13651 #. type: Plain text
13652 #: build/C/man2/rename.2:333
13653 msgid ""
13654 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
13655 "the process's effective user ID is neither the user ID of the file to be "
13656 "deleted nor that of the directory containing it, and the process is not "
13657 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
13658 "I<newpath> is an existing file and the directory containing it has the "
13659 "sticky bit set and the process's effective user ID is neither the user ID of "
13660 "the file to be replaced nor that of the directory containing it, and the "
13661 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
13662 "capability); or the filesystem containing I<pathname> does not support "
13663 "renaming of the type requested."
13664 msgstr ""
13665 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
13666 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
13667 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
13668 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
13669 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
13670 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
13671 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
13672 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
13673 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
13674 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
13675
13676 #. type: Plain text
13677 #: build/C/man2/rename.2:344
13678 msgid ""
13679 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
13680 "permits a filesystem to be mounted at multiple points, but B<rename>()  does "
13681 "not work across different mount points, even if the same filesystem is "
13682 "mounted on both.)"
13683 msgstr ""
13684 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
13685 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
13686 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
13687 "別々のマウント位置を跨いでは動作しない。)"
13688
13689 #. type: Plain text
13690 #: build/C/man2/rename.2:349
13691 msgid ""
13692 "The following additional errors can occur for B<renameat>()  and "
13693 "B<renameat2>():"
13694 msgstr "B<renameat>() と B<renameat2>() では以下のエラーも発生する。"
13695
13696 #. type: Plain text
13697 #: build/C/man2/rename.2:368
13698 msgid "The following additional errors can occur for B<renameat2>():"
13699 msgstr "B<renameat2>() では以下のエラーも発生する。"
13700
13701 #. type: Plain text
13702 #: build/C/man2/rename.2:376
13703 msgid "I<flags> contains B<RENAME_NOREPLACE> and I<newpath> already exists."
13704 msgstr ""
13705 "I<flags> に B<RENAME_NOREPLACE> が指定されているが、 I<newpath> がすでに存在"
13706 "する。"
13707
13708 #. type: Plain text
13709 #: build/C/man2/rename.2:385
13710 msgid ""
13711 "An invalid flag was specified in I<flags>, or both B<RENAME_NOREPLACE> and "
13712 "B<RENAME_EXCHANGE> were specified."
13713 msgstr ""
13714 "I<flags> に無効なフラグが指定された。 B<RENAME_NOREPLACE> と "
13715 "B<RENAME_EXCHANGE> の両方が指定された。"
13716
13717 #. type: Plain text
13718 #: build/C/man2/rename.2:389
13719 msgid "The filesystem does not support one of the flags in I<flags>."
13720 msgstr "I<flags> にファイルシステムでサポートされていないフラグが指定された。"
13721
13722 #. type: Plain text
13723 #: build/C/man2/rename.2:397
13724 msgid "I<flags> contains B<RENAME_EXCHANGE> and I<newpath> does not exist."
13725 msgstr ""
13726 "I<flags> に B<RENAME_EXCHANGE> が指定されたが、 I<newpath> が存在しない。"
13727
13728 #. type: Plain text
13729 #: build/C/man2/rename.2:401
13730 msgid ""
13731 "B<renameat>()  was added to Linux in kernel 2.6.16; library support was "
13732 "added to glibc in version 2.4."
13733 msgstr ""
13734 "B<renameat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
13735 "ポートはバージョン 2.4 で glibc に追加された。"
13736
13737 #.  FIXME . glibc support is pending.
13738 #. type: Plain text
13739 #: build/C/man2/rename.2:405
13740 msgid "B<renameat2>()  was added to Linux in kernel 3.15."
13741 msgstr "B<renameat2>()  はカーネル 2.6.16 で Linux に追加された。"
13742
13743 #. type: Plain text
13744 #: build/C/man2/rename.2:408
13745 msgid "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
13746 msgstr "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
13747
13748 #. type: Plain text
13749 #: build/C/man2/rename.2:411
13750 msgid "B<renameat>(): POSIX.1-2008."
13751 msgstr "B<renameat>(): POSIX.1-2008."
13752
13753 #. type: Plain text
13754 #: build/C/man2/rename.2:414
13755 msgid "B<renameat2>()  is Linux-specific."
13756 msgstr "B<renameat2>()  は Linux 固有である。"
13757
13758 #. type: Plain text
13759 #: build/C/man2/rename.2:432
13760 msgid ""
13761 "On older kernels where B<renameat>()  is unavailable, the glibc wrapper "
13762 "function falls back to the use of B<rename>().  When I<oldpath> and "
13763 "I<newpath> are relative pathnames, glibc constructs pathnames based on the "
13764 "symbolic links in I</proc/self/fd> that correspond to the I<olddirfd> and "
13765 "I<newdirfd> arguments."
13766 msgstr ""
13767 "B<renameat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
13768 "B<rename>() を使用するモードにフォールバックする。 I<oldpath> と I<newpath> "
13769 "が相対パスの場合、 glibc は I<olddirfd> と I<newdirfd> 引き数に対応する I</"
13770 "proc/self/fd> のシンボリックリンクに基づいてそれぞれパス名を構成する。"
13771
13772 #. type: Plain text
13773 #: build/C/man2/rename.2:443
13774 msgid ""
13775 "On NFS filesystems, you can not assume that if the operation failed, the "
13776 "file was not renamed.  If the server does the rename operation and then "
13777 "crashes, the retransmitted RPC which will be processed when the server is up "
13778 "again causes a failure.  The application is expected to deal with this.  See "
13779 "B<link>(2)  for a similar problem."
13780 msgstr ""
13781 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
13782 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
13783 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
13784 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
13785 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
13786
13787 #. type: Plain text
13788 #: build/C/man2/rename.2:451
13789 msgid ""
13790 "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), "
13791 "B<path_resolution>(7), B<symlink>(7)"
13792 msgstr ""
13793 "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), "
13794 "B<path_resolution>(7), B<symlink>(7)"
13795
13796 #. type: TH
13797 #: build/C/man2/rmdir.2:30
13798 #, no-wrap
13799 msgid "RMDIR"
13800 msgstr "RMDIR"
13801
13802 #. type: TH
13803 #: build/C/man2/rmdir.2:30
13804 #, no-wrap
13805 msgid "2008-05-08"
13806 msgstr "2008-05-08"
13807
13808 #. type: Plain text
13809 #: build/C/man2/rmdir.2:33
13810 msgid "rmdir - delete a directory"
13811 msgstr "rmdir - ディレクトリを削除する"
13812
13813 #. type: Plain text
13814 #: build/C/man2/rmdir.2:37
13815 msgid "B<int rmdir(const char *>I<pathname>B<);>"
13816 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
13817
13818 #. type: Plain text
13819 #: build/C/man2/rmdir.2:40
13820 msgid "B<rmdir>()  deletes a directory, which must be empty."
13821 msgstr ""
13822 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
13823 "ない。"
13824
13825 #. type: Plain text
13826 #: build/C/man2/rmdir.2:55
13827 msgid ""
13828 "Write access to the directory containing I<pathname> was not allowed, or one "
13829 "of the directories in the path prefix of I<pathname> did not allow search "
13830 "permission.  (See also B<path_resolution>(7)."
13831 msgstr ""
13832 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
13833 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
13834 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
13835 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
13836 "と)"
13837
13838 #. type: Plain text
13839 #: build/C/man2/rmdir.2:64
13840 msgid ""
13841 "I<pathname> is currently in use by the system or some process that prevents "
13842 "its removal.  On Linux this means I<pathname> is currently used as a mount "
13843 "point or is the root directory of the calling process."
13844 msgstr ""
13845 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
13846 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
13847 "たプロセスのルートディレクトリであることを意味する。"
13848
13849 #. type: Plain text
13850 #: build/C/man2/rmdir.2:73
13851 msgid "I<pathname> has I<.> as last component."
13852 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
13853
13854 #. type: Plain text
13855 #: build/C/man2/rmdir.2:85
13856 msgid ""
13857 "A directory component in I<pathname> does not exist or is a dangling "
13858 "symbolic link."
13859 msgstr ""
13860 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
13861 "リックリンク (symbolic link) である。"
13862
13863 #. type: Plain text
13864 #: build/C/man2/rmdir.2:94
13865 msgid ""
13866 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
13867 "fact, a directory."
13868 msgstr ""
13869 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
13870 "クトリでない。"
13871
13872 #. type: TP
13873 #: build/C/man2/rmdir.2:94
13874 #, no-wrap
13875 msgid "B<ENOTEMPTY>"
13876 msgstr "B<ENOTEMPTY>"
13877
13878 #. type: Plain text
13879 #: build/C/man2/rmdir.2:107
13880 msgid ""
13881 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
13882 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
13883 "condition."
13884 msgstr ""
13885 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリーがある。または、 "
13886 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
13887 "で B<EEXIST> を返すことを認めている。"
13888
13889 #. type: Plain text
13890 #: build/C/man2/rmdir.2:118
13891 msgid ""
13892 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
13893 "and the process's effective user ID is neither the user ID of the file to be "
13894 "deleted nor that of the directory containing it, and the process is not "
13895 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
13896 msgstr ""
13897 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
13898 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
13899 "ファイルの ユーザーID とそのファイルを含むディレクトリのユーザーID のどちらと"
13900 "も異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
13901
13902 #. type: Plain text
13903 #: build/C/man2/rmdir.2:123
13904 msgid ""
13905 "The filesystem containing I<pathname> does not support the removal of "
13906 "directories."
13907 msgstr ""
13908 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
13909 "ない。"
13910
13911 #. type: Plain text
13912 #: build/C/man2/rmdir.2:127
13913 msgid "I<pathname> refers to a directory on a read-only filesystem."
13914 msgstr ""
13915 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
13916
13917 #. type: Plain text
13918 #: build/C/man2/rmdir.2:132
13919 msgid ""
13920 "Infelicities in the protocol underlying NFS can cause the unexpected "
13921 "disappearance of directories which are still being used."
13922 msgstr ""
13923 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
13924 "する現象が引き起こされることがある。"
13925
13926 #. type: Plain text
13927 #: build/C/man2/rmdir.2:141
13928 msgid ""
13929 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
13930 "B<unlink>(2), B<unlinkat>(2)"
13931 msgstr ""
13932 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
13933 "B<unlink>(2), B<unlinkat>(2)"
13934
13935 #. type: TH
13936 #: build/C/man3/scanf.3:52
13937 #, no-wrap
13938 msgid "SCANF"
13939 msgstr "SCANF"
13940
13941 #. type: Plain text
13942 #: build/C/man3/scanf.3:55
13943 msgid ""
13944 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
13945 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
13946
13947 #. type: Plain text
13948 #: build/C/man3/scanf.3:62
13949 #, no-wrap
13950 msgid ""
13951 "B<int scanf(const char *>I<format>B<, ...);>\n"
13952 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
13953 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
13954 msgstr ""
13955 "B<int scanf(const char *>I<format>B<, ...);>\n"
13956 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
13957 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
13958
13959 #. type: Plain text
13960 #: build/C/man3/scanf.3:64
13961 #, no-wrap
13962 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
13963 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
13964
13965 #. type: Plain text
13966 #: build/C/man3/scanf.3:68
13967 #, no-wrap
13968 msgid ""
13969 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
13970 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13971 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13972 msgstr ""
13973 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
13974 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13975 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13976
13977 #. type: Plain text
13978 #: build/C/man3/scanf.3:79
13979 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
13980 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
13981
13982 #. type: Plain text
13983 #: build/C/man3/scanf.3:82
13984 msgid ""
13985 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
13986 "200112L;"
13987 msgstr ""
13988 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
13989 "200112L;"
13990
13991 #. type: Plain text
13992 #: build/C/man3/scanf.3:104
13993 msgid ""
13994 "The B<scanf>()  family of functions scans input according to I<format> as "
13995 "described below.  This format may contain I<conversion specifications>; the "
13996 "results from such conversions, if any, are stored in the locations pointed "
13997 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
13998 "argument must be of a type that is appropriate for the value returned by the "
13999 "corresponding conversion specification."
14000 msgstr ""
14001 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
14002 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
14003 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
14004 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
14005 "は、対応する変換指定が返す値に 適合していなければならない。"
14006
14007 #. type: Plain text
14008 #: build/C/man3/scanf.3:115
14009 msgid ""
14010 "If the number of conversion specifications in I<format> exceeds the number "
14011 "of I<pointer> arguments, the results are undefined.  If the number of "
14012 "I<pointer> arguments exceeds the number of conversion specifications, then "
14013 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
14014 msgstr ""
14015 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
14016 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
14017 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
14018
14019 #. type: Plain text
14020 #: build/C/man3/scanf.3:127
14021 msgid ""
14022 "The B<scanf>()  function reads input from the standard input stream "
14023 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
14024 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
14025 msgstr ""
14026 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
14027 "B<fscanf>()  はストリームポインター I<stream> からの入力を読み込む。 "
14028 "B<sscanf>()  は文字列ポインター I<str> で示された文字列からの入力を読み込む。"
14029
14030 #. type: Plain text
14031 #: build/C/man3/scanf.3:145
14032 msgid ""
14033 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
14034 "from the stream pointer I<stream> using a variable argument list of pointers "
14035 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
14036 "from the standard input and the B<vsscanf>()  function scans it from a "
14037 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
14038 "functions respectively."
14039 msgstr ""
14040 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインター "
14041 "I<stream> からの入力をポインターの可変長引き数リストを用いて読み込む "
14042 "(B<stdarg>(3)  を参照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標"
14043 "準入力からの読み取りを行う。 B<vsscanf>()  関数はそのリストに基づき文字列から"
14044 "読み取る。 これらの関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様"
14045 "である。"
14046
14047 #. type: Plain text
14048 #: build/C/man3/scanf.3:159
14049 msgid ""
14050 "The I<format> string consists of a sequence of I<directives> which describe "
14051 "how to process the sequence of input characters.  If processing of a "
14052 "directive fails, no further input is read, and B<scanf>()  returns.  A "
14053 "\"failure\" can be either of the following: I<input failure>, meaning that "
14054 "input characters were unavailable, or I<matching failure>, meaning that the "
14055 "input was inappropriate (see below)."
14056 msgstr ""
14057 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
14058 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
14059 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
14060 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
14061 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
14062 "であったこと (下記参照) を意味する。"
14063
14064 #. type: Plain text
14065 #: build/C/man3/scanf.3:161
14066 msgid "A directive is one of the following:"
14067 msgstr "命令は以下のいずれかである:"
14068
14069 #. type: TP
14070 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
14071 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
14072 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
14073 #, no-wrap
14074 msgid "\\(bu"
14075 msgstr "\\(bu"
14076
14077 #. type: Plain text
14078 #: build/C/man3/scanf.3:167
14079 msgid ""
14080 "A sequence of white-space characters (space, tab, newline, etc.; see "
14081 "B<isspace>(3)).  This directive matches any amount of white space, including "
14082 "none, in the input."
14083 msgstr ""
14084 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
14085 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
14086 "致する)。"
14087
14088 #. type: Plain text
14089 #: build/C/man3/scanf.3:171
14090 msgid ""
14091 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
14092 "This character must exactly match the next character of input."
14093 msgstr ""
14094 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
14095 "の次の文字に正確に一致しなければならない。"
14096
14097 #. type: Plain text
14098 #: build/C/man3/scanf.3:182
14099 msgid ""
14100 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
14101 "character.  A sequence of characters from the input is converted according "
14102 "to this specification, and the result is placed in the corresponding "
14103 "I<pointer> argument.  If the next item of input does not match the "
14104 "conversion specification, the conversion fails\\(emthis is a I<matching "
14105 "failure>."
14106 msgstr ""
14107 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
14108 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
14109 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
14110 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
14111
14112 #. type: Plain text
14113 #: build/C/man3/scanf.3:190
14114 msgid ""
14115 "Each I<conversion specification> in I<format> begins with either the "
14116 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
14117 "for the distinction) followed by:"
14118 msgstr ""
14119 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
14120 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
14121
14122 #. type: Plain text
14123 #: build/C/man3/scanf.3:201
14124 msgid ""
14125 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
14126 "input as directed by the conversion specification, but discards the input.  "
14127 "No corresponding I<pointer> argument is required, and this specification is "
14128 "not included in the count of successful assignments returned by B<scanf>()."
14129 msgstr ""
14130 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
14131 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
14132 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
14133
14134 #. type: Plain text
14135 #: build/C/man3/scanf.3:220
14136 msgid ""
14137 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
14138 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
14139 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
14140 "buffer of sufficient size, and assigns the address of this buffer to the "
14141 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
14142 "*> variable (this variable does not need to be initialized before the "
14143 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
14144 "longer required."
14145 msgstr ""
14146 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
14147 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファーを確保する"
14148 "必要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファーを確保し、こ"
14149 "のバッファーのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引"
14150 "き数は I<char\\ *> 型の変数へのポインターでなければならない (変数自体は呼び出"
14151 "し前に初期化されている必要はない)。 呼び出し元は、不要になった時点で、この"
14152 "バッファーを B<free>(3) すべきである。"
14153
14154 #. type: Plain text
14155 #: build/C/man3/scanf.3:232
14156 msgid ""
14157 "An optional decimal integer which specifies the I<maximum field width>.  "
14158 "Reading of characters stops either when this maximum is reached or when a "
14159 "nonmatching character is found, whichever happens first.  Most conversions "
14160 "discard initial white space characters (the exceptions are noted below), and "
14161 "these discarded characters don't count toward the maximum field width.  "
14162 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
14163 "mark the end of the input; the maximum field width does not include this "
14164 "terminator."
14165 msgstr ""
14166 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
14167 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
14168 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
14169 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
14170 "の入力変換では、入力の末尾を示す終端のヌルバイト (\\(aq\\e0\\(aq)  も格納され"
14171 "るが、最大フィールド幅にはこの終端バイトは含まれない。"
14172
14173 #. type: Plain text
14174 #: build/C/man3/scanf.3:246
14175 msgid ""
14176 "An optional I<type modifier character>.  For example, the B<l> type modifier "
14177 "is used with integer conversions such as B<%d> to specify that the "
14178 "corresponding I<pointer> argument refers to a I<long int> rather than a "
14179 "pointer to an I<int>."
14180 msgstr ""
14181 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
14182 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
14183 "I<int> ではなく I<long int> を参照していることを指定できる。"
14184
14185 #. type: Plain text
14186 #: build/C/man3/scanf.3:251
14187 msgid ""
14188 "A I<conversion specifier> that specifies the type of input conversion to be "
14189 "performed."
14190 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
14191
14192 #. type: Plain text
14193 #: build/C/man3/scanf.3:280
14194 msgid ""
14195 "The conversion specifications in I<format> are of two forms, either "
14196 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
14197 "forms should not be mixed in the same I<format> string, except that a string "
14198 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
14199 "I<format> contains \\(aq%\\(aq specifications, then these correspond in "
14200 "order with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form "
14201 "(which is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer "
14202 "that specifies that the converted input should be placed in the location "
14203 "referred to by the I<n>-th I<pointer> argument following I<format>."
14204 msgstr ""
14205 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
14206 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
14207 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
14208 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
14209 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
14210 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
14211 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
14212 "I<pointer> 引き数が参照する場所に格納することを指定する。"
14213
14214 #. type: SS
14215 #: build/C/man3/scanf.3:280
14216 #, no-wrap
14217 msgid "Conversions"
14218 msgstr "変換"
14219
14220 #. type: Plain text
14221 #: build/C/man3/scanf.3:284
14222 msgid ""
14223 "The following I<type modifier characters> can appear in a conversion "
14224 "specification:"
14225 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
14226
14227 #. type: Plain text
14228 #: build/C/man3/scanf.3:294
14229 msgid ""
14230 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
14231 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
14232 "I<unsigned short int> (rather than I<int>)."
14233 msgstr ""
14234 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
14235 "ターが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポイン"
14236 "ターであることを示す。"
14237
14238 #. type: Plain text
14239 #: build/C/man3/scanf.3:302
14240 msgid ""
14241 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
14242 "I<unsigned char>."
14243 msgstr ""
14244 "B<h> と同じだが、次のポインターが I<signed char> か I<unsigned char> へのポイ"
14245 "ンターであることを示す。"
14246
14247 #. type: Plain text
14248 #: build/C/man3/scanf.3:311
14249 msgid ""
14250 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
14251 "I<uintmax_t>.  This modifier was introduced in C99."
14252 msgstr ""
14253 "B<h> と同じだが、次のポインターが I<intmax_t> か I<uintmax_t> へのポインター"
14254 "であることを示す。 この修飾子は C99 で導入された。"
14255
14256 #.  This use of l was introduced in Amendment 1 to ISO C90.
14257 #. type: Plain text
14258 #: build/C/man3/scanf.3:338
14259 msgid ""
14260 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
14261 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
14262 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
14263 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
14264 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
14265 "B<L>.  If used with B<%c> or B<%s>, the corresponding parameter is "
14266 "considered as a pointer to a wide character or wide-character string "
14267 "respectively."
14268 msgstr ""
14269 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
14270 "ポインターが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイ"
14271 "ンターであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポ"
14272 "インターが (I<float> ではなく)  I<double> へのポインターであることのいずれか"
14273 "であることを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> "
14274 "や B<%s> とともに使用すると、 パラメーターはそれぞれワイド文字やワイド文字列"
14275 "へのポインターであると みなされる。"
14276
14277 #.  MTK, Jul 05: The following is no longer true for modern
14278 #.  ANSI C (i.e., C99):
14279 #.  (Note that long long is not an
14280 #.  ANSI C
14281 #.  type. Any program using this will not be portable to all
14282 #.  architectures).
14283 #. type: Plain text
14284 #: build/C/man3/scanf.3:354
14285 msgid ""
14286 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
14287 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
14288 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
14289 msgstr ""
14290 "B<e>, B<f>, B<g> 変換で、次のポインターが I<long double> へのポインターである"
14291 "ことを示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインターが "
14292 "I<long long> へのポインターであることのいずれかであることを示す。"
14293
14294 #. type: TP
14295 #: build/C/man3/scanf.3:354
14296 #, no-wrap
14297 msgid "B<q>"
14298 msgstr "B<q>"
14299
14300 #. type: Plain text
14301 #: build/C/man3/scanf.3:359
14302 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
14303 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
14304
14305 #. type: Plain text
14306 #: build/C/man3/scanf.3:366
14307 msgid ""
14308 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
14309 "modifier was introduced in C99."
14310 msgstr ""
14311 "B<h> と同様だが、次のポインターが I<ptrdiff_t> へのポインターであることを示"
14312 "す。 この修飾子は C99 で導入された。"
14313
14314 #. type: Plain text
14315 #: build/C/man3/scanf.3:373
14316 msgid ""
14317 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
14318 "modifier was introduced in C99."
14319 msgstr ""
14320 "B<h> と同様だが、次のポインターが I<size_t> へのポインターであることを示す。 "
14321 "この修飾子は C99 で導入された。"
14322
14323 #. type: Plain text
14324 #: build/C/man3/scanf.3:377
14325 msgid "The following I<conversion specifiers> are available:"
14326 msgstr "以下の I<「変換指定子」> が利用可能である。"
14327
14328 #. type: Plain text
14329 #: build/C/man3/scanf.3:386
14330 msgid ""
14331 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
14332 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
14333 "initial white space characters are discarded), and assignment does not occur."
14334 msgstr ""
14335 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
14336 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
14337 "る)、 変数への代入は生じない。"
14338
14339 #. type: TP
14340 #: build/C/man3/scanf.3:386
14341 #, no-wrap
14342 msgid "B<d>"
14343 msgstr "B<d>"
14344
14345 #. type: Plain text
14346 #: build/C/man3/scanf.3:391
14347 msgid ""
14348 "Matches an optionally signed decimal integer; the next pointer must be a "
14349 "pointer to I<int>."
14350 msgstr ""
14351 "符号つきの 10進の整数に対応する。 次のポインターは I<int> へのポインターでな"
14352 "ければならない。"
14353
14354 #. type: TP
14355 #: build/C/man3/scanf.3:391
14356 #, no-wrap
14357 msgid "B<D>"
14358 msgstr "B<D>"
14359
14360 #. type: Plain text
14361 #: build/C/man3/scanf.3:400
14362 msgid ""
14363 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
14364 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
14365 "causing old programs to fail mysteriously.)"
14366 msgstr ""
14367 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
14368 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
14369 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
14370
14371 #. type: TP
14372 #: build/C/man3/scanf.3:400
14373 #, no-wrap
14374 msgid "B<i>"
14375 msgstr "B<i>"
14376
14377 #. type: Plain text
14378 #: build/C/man3/scanf.3:412
14379 msgid ""
14380 "Matches an optionally signed integer; the next pointer must be a pointer to "
14381 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
14382 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
14383 "that correspond to the base are used."
14384 msgstr ""
14385 "符号つき整数に対応する。 次のポインターは I<int> へのポインターでなければなら"
14386 "ない。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始"
14387 "する場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使"
14388 "用される文字は、これらの基数に対応しているものだけである。"
14389
14390 #. type: TP
14391 #: build/C/man3/scanf.3:412
14392 #, no-wrap
14393 msgid "B<o>"
14394 msgstr "B<o>"
14395
14396 #. type: Plain text
14397 #: build/C/man3/scanf.3:416
14398 msgid ""
14399 "Matches an unsigned octal integer; the next pointer must be a pointer to "
14400 "I<unsigned int>."
14401 msgstr ""
14402 "符号なしの 8 進の整数に対応する。 次のポインターは I<unsigned int> でなければ"
14403 "ならない。"
14404
14405 #. type: TP
14406 #: build/C/man3/scanf.3:416
14407 #, no-wrap
14408 msgid "B<u>"
14409 msgstr "B<u>"
14410
14411 #. type: Plain text
14412 #: build/C/man3/scanf.3:421
14413 msgid ""
14414 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
14415 "I<unsigned int>."
14416 msgstr ""
14417 "符号なしの 10進の整数に対応する。 次のポインターは I<unsigned int> へのポイン"
14418 "ターでなければならない。"
14419
14420 #. type: Plain text
14421 #: build/C/man3/scanf.3:426
14422 msgid ""
14423 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
14424 "to I<unsigned int>."
14425 msgstr ""
14426 "符号なしの 16 進の整数に対応する。 次のポインターは I<unsigned int> へのポイ"
14427 "ンターでなければならない。"
14428
14429 #. type: TP
14430 #: build/C/man3/scanf.3:426
14431 #, no-wrap
14432 msgid "B<X>"
14433 msgstr "B<X>"
14434
14435 #. type: Plain text
14436 #: build/C/man3/scanf.3:430
14437 msgid "Equivalent to B<x>."
14438 msgstr "B<x> と同一である。"
14439
14440 #. type: TP
14441 #: build/C/man3/scanf.3:430
14442 #, no-wrap
14443 msgid "B<f>"
14444 msgstr "B<f>"
14445
14446 #. type: Plain text
14447 #: build/C/man3/scanf.3:435
14448 msgid ""
14449 "Matches an optionally signed floating-point number; the next pointer must be "
14450 "a pointer to I<float>."
14451 msgstr ""
14452 "符号つき浮動小数点実数に対応する。 次のポインターは I<float> へのポインターで"
14453 "なければならない。"
14454
14455 #. type: TP
14456 #: build/C/man3/scanf.3:435
14457 #, no-wrap
14458 msgid "B<e>"
14459 msgstr "B<e>"
14460
14461 #. type: Plain text
14462 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
14463 msgid "Equivalent to B<f>."
14464 msgstr "B<f> と同一である。"
14465
14466 #. type: TP
14467 #: build/C/man3/scanf.3:439
14468 #, no-wrap
14469 msgid "B<g>"
14470 msgstr "B<g>"
14471
14472 #. type: TP
14473 #: build/C/man3/scanf.3:443
14474 #, no-wrap
14475 msgid "B<E>"
14476 msgstr "B<E>"
14477
14478 #. type: Plain text
14479 #: build/C/man3/scanf.3:451
14480 msgid "(C99) Equivalent to B<f>."
14481 msgstr "(C99)  B<f> と同一である。"
14482
14483 #. type: Plain text
14484 #: build/C/man3/scanf.3:459
14485 msgid ""
14486 "Matches a sequence of non-white-space characters; the next pointer must be a "
14487 "pointer to character array that is long enough to hold the input sequence "
14488 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
14489 "automatically.  The input string stops at white space or at the maximum "
14490 "field width, whichever occurs first."
14491 msgstr ""
14492 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインターは文"
14493 "字の配列へのポインターでなければならず、 その文字配列は、入力された文字列と "
14494 "(自動的に追加される) 終端のヌルバイト (\\(aq\\e0\\(aq) を格納するのに十分な大"
14495 "きさでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
14496 "フィールド幅に 達するか、のどちらかが起こると停止される。"
14497
14498 #. type: Plain text
14499 #: build/C/man3/scanf.3:469
14500 msgid ""
14501 "Matches a sequence of characters whose length is specified by the I<maximum "
14502 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
14503 "there must be enough room for all the characters (no terminating null byte "
14504 "is added).  The usual skip of leading white space is suppressed.  To skip "
14505 "white space first, use an explicit space in the format."
14506 msgstr ""
14507 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
14508 "る。 次のポインターは I<char> へのポインターで、すべての文字を格納するのに十"
14509 "分な領域が なければならない (終端のヌルバイトは追加されない)。 通常行われる先"
14510 "頭のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛"
14511 "ばすためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
14512
14513 #. type: TP
14514 #: build/C/man3/scanf.3:469
14515 #, no-wrap
14516 msgid "B<\\&[>"
14517 msgstr "B<\\&[>"
14518
14519 #. type: Plain text
14520 #: build/C/man3/scanf.3:502
14521 msgid ""
14522 "Matches a nonempty sequence of characters from the specified set of accepted "
14523 "characters; the next pointer must be a pointer to I<char>, and there must be "
14524 "enough room for all the characters in the string, plus a terminating null "
14525 "byte.  The usual skip of leading white space is suppressed.  The string is "
14526 "to be made up of characters in (or not in) a particular set; the set is "
14527 "defined by the characters between the open bracket B<[> character and a "
14528 "close bracket B<]> character.  The set I<excludes> those characters if the "
14529 "first character after the open bracket is a circumflex (B<^>).  To include a "
14530 "close bracket in the set, make it the first character after the open bracket "
14531 "or the circumflex; any other position will end the set.  The hyphen "
14532 "character B<-> is also special; when placed between two other characters, it "
14533 "adds all intervening characters to the set.  To include a hyphen, make it "
14534 "the last character before the final close bracket.  For instance, "
14535 "B<[^]0-9-]> means the set \"everything except close bracket, zero through "
14536 "nine, and hyphen\".  The string ends with the appearance of a character not "
14537 "in the (or, with a circumflex, in) set or when the field width runs out."
14538 msgstr ""
14539 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
14540 "はない文字の列に対応する。 次のポインターは I<char> へのポインターでなければ"
14541 "ならず、 そこには文字列中のすべての文字と終端のヌルバイト を格納するための十"
14542 "分な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは"
14543 "行われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開"
14544 "き括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文"
14545 "字が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとな"
14546 "る。 閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント"
14547 "記号のあとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の"
14548 "集合が終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置か"
14549 "れた時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含"
14550 "ませるためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例え"
14551 "ば、 B<[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の"
14552 "集合を意味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含"
14553 "まれる) 文字の 出現または確保された領域が使い切られた時に終了する。"
14554
14555 #. type: Plain text
14556 #: build/C/man3/scanf.3:510
14557 msgid ""
14558 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
14559 "pointer must be a pointer to a pointer to I<void>."
14560 msgstr ""
14561 "(B<printf>(3)  の B<%p> で印字されるような) ポインター値に対応する。 次のポイ"
14562 "ンターは I<void> へのポインターへのポインターでなければならない。"
14563
14564 #. type: Plain text
14565 #: build/C/man3/scanf.3:530
14566 msgid ""
14567 "Nothing is expected; instead, the number of characters consumed thus far "
14568 "from the input is stored through the next pointer, which must be a pointer "
14569 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
14570 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
14571 "of a B<%n> directive does not increment the assignment count returned at the "
14572 "completion of execution\" but the Corrigendum seems to contradict this.  "
14573 "Probably it is wise not to make any assumptions on the effect of B<%n> "
14574 "conversions on the return value."
14575 msgstr ""
14576 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
14577 "次のポインターで指定された場所に 格納される。 このポインターは I<int> へのポ"
14578 "インターでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使っ"
14579 "て抑制することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標"
14580 "準規格では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しな"
14581 "い」となっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<"
14582 "%n> 変換が返り値に与える影響についてはどのような仮定もしないのが 賢明であろ"
14583 "う。"
14584
14585 #. type: Plain text
14586 #: build/C/man3/scanf.3:535
14587 msgid ""
14588 "These functions return the number of input items successfully matched and "
14589 "assigned, which can be fewer than provided for, or even zero in the event of "
14590 "an early matching failure."
14591 msgstr ""
14592 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
14593 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
14594 "ることもある。"
14595
14596 #. type: Plain text
14597 #: build/C/man3/scanf.3:547
14598 msgid ""
14599 "The value B<EOF> is returned if the end of input is reached before either "
14600 "the first successful conversion or a matching failure occurs.  B<EOF> is "
14601 "also returned if a read error occurs, in which case the error indicator for "
14602 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
14603 "error."
14604 msgstr ""
14605 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
14606 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
14607 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
14608 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
14609
14610 #. type: Plain text
14611 #: build/C/man3/scanf.3:553
14612 msgid ""
14613 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
14614 "operation would block."
14615 msgstr ""
14616 "I<stream> に対応するファイルディスクリプターが nonblocking となっており、 読"
14617 "み込み操作は停止 (block) することになる。"
14618
14619 #. type: Plain text
14620 #: build/C/man3/scanf.3:558
14621 msgid ""
14622 "The file descriptor underlying I<stream> is invalid, or not open for reading."
14623 msgstr ""
14624 "I<stream> に対応するファイルディスクリプターが無効であるが、 読み込み用にオー"
14625 "プンされていない。"
14626
14627 #. type: Plain text
14628 #: build/C/man3/scanf.3:561
14629 msgid "Input byte sequence does not form a valid character."
14630 msgstr "入力されたバイト列が有効な文字を構成していない。"
14631
14632 #. type: Plain text
14633 #: build/C/man3/scanf.3:565
14634 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
14635 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
14636
14637 #. type: Plain text
14638 #: build/C/man3/scanf.3:570
14639 msgid "Not enough arguments; or I<format> is NULL."
14640 msgstr "引き数が十分でない。または I<format> が NULL である。"
14641
14642 #. type: Plain text
14643 #: build/C/man3/scanf.3:573
14644 msgid "Out of memory."
14645 msgstr "メモリー不足。"
14646
14647 #. type: TP
14648 #: build/C/man3/scanf.3:573
14649 #, no-wrap
14650 msgid "B<ERANGE>"
14651 msgstr "B<ERANGE>"
14652
14653 #. type: Plain text
14654 #: build/C/man3/scanf.3:577
14655 msgid ""
14656 "The result of an integer conversion would exceed the size that can be stored "
14657 "in the corresponding integer type."
14658 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
14659
14660 #. type: Plain text
14661 #: build/C/man3/scanf.3:587
14662 msgid ""
14663 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
14664 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
14665 msgstr ""
14666 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
14667 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
14668
14669 #. type: Plain text
14670 #: build/C/man3/scanf.3:597
14671 msgid ""
14672 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
14673 "the usage of B<L> in integer conversions is the GNU notation."
14674 msgstr ""
14675 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
14676 "B<ll> または B<L> の使用は GNU での拡張である。"
14677
14678 #. type: Plain text
14679 #: build/C/man3/scanf.3:608
14680 msgid ""
14681 "The Linux version of these functions is based on the I<GNU> I<libio> "
14682 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
14683 "(glibc-1.08)> for a more concise description."
14684 msgstr ""
14685 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
14686 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
14687
14688 #. type: SS
14689 #: build/C/man3/scanf.3:609
14690 #, no-wrap
14691 msgid "The 'a' assignment-allocation modifier"
14692 msgstr "'a' 代入割り当て (assignment-allocation) 修飾子"
14693
14694 #. type: Plain text
14695 #: build/C/man3/scanf.3:620
14696 msgid ""
14697 "Originally, the GNU C library supported dynamic allocation for string inputs "
14698 "(as a nonstandard extension) via the B<a> character.  (This feature is "
14699 "present at least as far back as glibc 2.0.)  Thus, one could write the "
14700 "following to have B<scanf>()  allocate a buffer for an input string, with a "
14701 "pointer to that buffer being returned in I<*buf>:"
14702 msgstr ""
14703 "元々、 GNU C ライブラリ (glibc) では、 B<a> 文字による文字列入力に対する動的"
14704 "割り当て変換指定子 (dynamic allocation conversion specifier) を (非標準の拡張"
14705 "として) サポートしている。この機能は少なくとも glibc 2.0 の時点ではすでに存在"
14706 "している。 したがって、以下のようにして、 B<scanf>() に入力文字列に対してバッ"
14707 "ファーを割り当てさせることができる。割り当てられたバッファーは I<*buf> で返さ"
14708 "れる。"
14709
14710 #. type: Plain text
14711 #: build/C/man3/scanf.3:623
14712 #, no-wrap
14713 msgid ""
14714 "    char *buf;\n"
14715 "    scanf(\"%as\", &buf);\n"
14716 msgstr ""
14717 "    char *buf;\n"
14718 "    scanf(\"%as\", &buf);\n"
14719
14720 #. type: Plain text
14721 #: build/C/man3/scanf.3:634
14722 msgid ""
14723 "The use of the letter B<a> for this purpose was problematic, since B<a> is "
14724 "also specified by the ISO C standard as a synonym for B<f> (floating-point "
14725 "input).  POSIX.1-2008 instead specifies the B<m> modifier for assignment "
14726 "allocation (as documented in DESCRIPTION, above)."
14727 msgstr ""
14728 "この目的で文字 B<a> を使うのは問題をはらんでいる。 なぜなら、 B<a> は ISO C "
14729 "標準では (浮動小数点入力を表す) の B<f> の同義語として定義されているからであ"
14730 "る。 その代わり、 POSIX.1-2008 では、(上記の「説明」に書かれている通り) 代入"
14731 "割り当てを行う修飾子として B<m> が規定されている。"
14732
14733 #. type: Plain text
14734 #: build/C/man3/scanf.3:646
14735 msgid ""
14736 "Note that the B<a> modifier is not available if the program is compiled with "
14737 "I<gcc -std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also "
14738 "specified), in which case the B<a> is interpreted as a specifier for "
14739 "floating-point numbers (see above)."
14740 msgstr ""
14741 "B<a> 修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
14742 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない点に注意。"
14743 "この場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
14744
14745 #. type: Plain text
14746 #: build/C/man3/scanf.3:652
14747 msgid ""
14748 "Support for the B<m> modifier was added to glibc starting with version 2.7, "
14749 "and new programs should use that modifier instead of B<a>."
14750 msgstr ""
14751 "B<m> 修飾子への対応はバージョン 2.7 以降の glibc で追加されている。新しいプロ"
14752 "グラムでぇあ B<a> の代わりに B<m> を使用すべきである。"
14753
14754 #. type: Plain text
14755 #: build/C/man3/scanf.3:658
14756 msgid ""
14757 "As well as being standardized by POSIX, the B<m> modifier has the following "
14758 "further advantages over the use of B<a:>"
14759 msgstr ""
14760 "POSIX で標準化されているだけでなく、 B<m> 修飾子には B<a> を利用する場合に比"
14761 "べて以下のような利点がある。"
14762
14763 #. type: Plain text
14764 #: build/C/man3/scanf.3:663
14765 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
14766 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
14767
14768 #. type: Plain text
14769 #: build/C/man3/scanf.3:669
14770 msgid ""
14771 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
14772 "specifier (and is unaffected by I<gcc -std=c99> etc.)."
14773 msgstr ""
14774 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
14775 "std=c99> などの影響も避けられる)。"
14776
14777 #. type: Plain text
14778 #: build/C/man3/scanf.3:682
14779 msgid ""
14780 "All functions are fully C89 conformant, but provide the additional "
14781 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
14782 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
14783 "the behavior of specifiers defined in C89."
14784 msgstr ""
14785 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
14786 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
14787 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
14788 "れない。"
14789
14790 #. type: Plain text
14791 #: build/C/man3/scanf.3:698
14792 msgid ""
14793 "Some combinations of the type modifiers and conversion specifiers defined by "
14794 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
14795 "behavior on Linux, this need not to be so on other architectures.  Therefore "
14796 "it usually is better to use modifiers that are not defined by ANSI C at all, "
14797 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
14798 "B<u>, B<x>, and B<X> conversions or B<ll>."
14799 msgstr ""
14800 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
14801 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
14802 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
14803 "他のアーキテクチャーでも同様になっているとは限らない。\n"
14804 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
14805 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
14806 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
14807
14808 #. type: Plain text
14809 #: build/C/man3/scanf.3:704
14810 msgid ""
14811 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
14812 "conversions equivalently to B<L>."
14813 msgstr ""
14814 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
14815 "動小数の変換に使用される。"
14816
14817 #. type: Plain text
14818 #: build/C/man3/scanf.3:714
14819 msgid ""
14820 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
14821 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
14822 "the returned string, as in the following example:"
14823 msgstr ""
14824 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
14825 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
14826 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
14827
14828 #. type: Plain text
14829 #: build/C/man3/scanf.3:719
14830 #, no-wrap
14831 msgid ""
14832 "char *p;\n"
14833 "int n;\n"
14834 msgstr ""
14835 "char *p;\n"
14836 "int n;\n"
14837
14838 #. type: Plain text
14839 #: build/C/man3/scanf.3:730
14840 #, no-wrap
14841 msgid ""
14842 "errno = 0;\n"
14843 "n = scanf(\"%m[a-z]\", &p);\n"
14844 "if (n == 1) {\n"
14845 "    printf(\"read: %s\\en\", p);\n"
14846 "    free(p);\n"
14847 "} else if (errno != 0) {\n"
14848 "    perror(\"scanf\");\n"
14849 "} else {\n"
14850 "    fprintf(stderr, \"No matching characters\\en\");\n"
14851 "}\n"
14852 msgstr ""
14853 "errno = 0;\n"
14854 "n = scanf(\"%m[a-z]\", &p);\n"
14855 "if (n == 1) {\n"
14856 "    printf(\"read: %s\\en\", p);\n"
14857 "    free(p);\n"
14858 "} else if (errno != 0) {\n"
14859 "    perror(\"scanf\");\n"
14860 "} else {\n"
14861 "    fprintf(stderr, \"No matching characters\\en\");\n"
14862 "}\n"
14863
14864 #. type: Plain text
14865 #: build/C/man3/scanf.3:738
14866 msgid ""
14867 "As shown in the above example, it is necessary to call B<free>(3)  only if "
14868 "the B<scanf>()  call successfully read a string."
14869 msgstr ""
14870 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
14871 "B<free>(3)  を呼び出す必要がある。"
14872
14873 #. type: Plain text
14874 #: build/C/man3/scanf.3:745
14875 msgid ""
14876 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
14877 "B<strtoul>(3)"
14878 msgstr ""
14879 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
14880 "B<strtoul>(3),"
14881
14882 #. type: TH
14883 #: build/C/man3/setbuf.3:48
14884 #, no-wrap
14885 msgid "SETBUF"
14886 msgstr "SETBUF"
14887
14888 #. type: Plain text
14889 #: build/C/man3/setbuf.3:51
14890 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
14891 msgstr ""
14892 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファーリングの操作"
14893
14894 #. type: Plain text
14895 #: build/C/man3/setbuf.3:56
14896 #, no-wrap
14897 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
14898 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
14899
14900 #. type: Plain text
14901 #: build/C/man3/setbuf.3:58
14902 #, no-wrap
14903 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
14904 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
14905
14906 #. type: Plain text
14907 #: build/C/man3/setbuf.3:60
14908 #, no-wrap
14909 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
14910 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
14911
14912 #. type: Plain text
14913 #: build/C/man3/setbuf.3:63
14914 #, no-wrap
14915 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
14916 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
14917
14918 #. type: Plain text
14919 #: build/C/man3/setbuf.3:73
14920 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
14921 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
14922
14923 #. type: Plain text
14924 #: build/C/man3/setbuf.3:96
14925 msgid ""
14926 "The three types of buffering available are unbuffered, block buffered, and "
14927 "line buffered.  When an output stream is unbuffered, information appears on "
14928 "the destination file or terminal as soon as written; when it is block "
14929 "buffered many characters are saved up and written as a block; when it is "
14930 "line buffered characters are saved up until a newline is output or input is "
14931 "read from any stream attached to a terminal device (typically I<stdin>).  "
14932 "The function B<fflush>(3)  may be used to force the block out early.  (See "
14933 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
14934 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
14935 "obtained.  If a stream refers to a terminal (as I<stdout> normally does), it "
14936 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
14937 "by default."
14938 msgstr ""
14939 "バッファーリングには unbuffered, block buffered, line buffered の3つのタイプ"
14940 "が ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに"
14941 "出 力先ファイルに書き込まれるかターミナルに表示される。block buffered の場"
14942 "合、文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場"
14943 "合、 新しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通"
14944 "常、I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強"
14945 "制的に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通"
14946 "常、ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理"
14947 "を行うと B<malloc>(3)  が呼び出されバッファーが獲得される。もし ストリームが "
14948 "(通常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイル"
14949 "は line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
14950 "unbuffered である。"
14951
14952 #. type: Plain text
14953 #: build/C/man3/setbuf.3:103
14954 msgid ""
14955 "The B<setvbuf>()  function may be used on any open stream to change its "
14956 "buffer.  The I<mode> argument must be one of the following three macros:"
14957 msgstr ""
14958 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファーを変"
14959 "更できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
14960
14961 #. type: TP
14962 #: build/C/man3/setbuf.3:104
14963 #, no-wrap
14964 msgid "B<_IONBF>"
14965 msgstr "B<_IONBF>"
14966
14967 #. type: Plain text
14968 #: build/C/man3/setbuf.3:107
14969 msgid "unbuffered"
14970 msgstr "unbuffered"
14971
14972 #. type: TP
14973 #: build/C/man3/setbuf.3:107
14974 #, no-wrap
14975 msgid "B<_IOLBF>"
14976 msgstr "B<_IOLBF>"
14977
14978 #. type: Plain text
14979 #: build/C/man3/setbuf.3:110
14980 msgid "line buffered"
14981 msgstr "line buffered"
14982
14983 #. type: TP
14984 #: build/C/man3/setbuf.3:110
14985 #, no-wrap
14986 msgid "B<_IOFBF>"
14987 msgstr "B<_IOFBF>"
14988
14989 #. type: Plain text
14990 #: build/C/man3/setbuf.3:113
14991 msgid "fully buffered"
14992 msgstr "fully buffered"
14993
14994 #. type: Plain text
14995 #: build/C/man3/setbuf.3:129
14996 msgid ""
14997 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
14998 "least I<size> bytes long; this buffer will be used instead of the current "
14999 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
15000 "buffer will be allocated on the next read or write operation.  The "
15001 "B<setvbuf>()  function may be used only after opening a stream and before "
15002 "any other operations have been performed on it."
15003 msgstr ""
15004 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
15005 "ファーを指していなければならない。このバッファーは現在の バッファーの代わりに"
15006 "用いられる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しい"
15007 "バッファーは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、スト"
15008 "リームをオープンした後、 そのストリームに対して何らかの操作をする前にのみ使用"
15009 "できる。"
15010
15011 #. type: Plain text
15012 #: build/C/man3/setbuf.3:135
15013 msgid ""
15014 "The other three calls are, in effect, simply aliases for calls to "
15015 "B<setvbuf>().  The B<setbuf>()  function is exactly equivalent to the call"
15016 msgstr ""
15017 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
15018 "B<setbuf>()  関数は、"
15019
15020 #. type: Plain text
15021 #: build/C/man3/setbuf.3:138
15022 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
15023 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
15024
15025 #. type: Plain text
15026 #: build/C/man3/setbuf.3:148
15027 msgid ""
15028 "The B<setbuffer>()  function is the same, except that the size of the buffer "
15029 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
15030 "The B<setlinebuf>()  function is exactly equivalent to the call:"
15031 msgstr ""
15032 "と全く同等だし、 B<setbuffer>()  関数は、バッファーサイズがデフォルト値 "
15033 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
15034 "は以下と同じである。"
15035
15036 #. type: Plain text
15037 #: build/C/man3/setbuf.3:151
15038 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
15039 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
15040
15041 #. type: Plain text
15042 #: build/C/man3/setbuf.3:162
15043 msgid ""
15044 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
15045 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
15046 "I<errno> on failure."
15047 msgstr ""
15048 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
15049 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
15050 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
15051
15052 #. type: Plain text
15053 #: build/C/man3/setbuf.3:164
15054 msgid "The other functions do not return a value."
15055 msgstr "その他の関数は値を返さない。"
15056
15057 #. type: Plain text
15058 #: build/C/man3/setbuf.3:173
15059 msgid ""
15060 "The B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), and B<setvbuf>()  "
15061 "functions are thread-safe."
15062 msgstr ""
15063 "関数 B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), B<setvbuf>() はスレッド"
15064 "セーフである。"
15065
15066 #. type: Plain text
15067 #: build/C/man3/setbuf.3:179
15068 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
15069 msgstr ""
15070 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
15071
15072 #. type: Plain text
15073 #: build/C/man3/setbuf.3:196
15074 msgid ""
15075 "You must make sure that the space that I<buf> points to still exists by the "
15076 "time I<stream> is closed, which also happens at program termination.  For "
15077 "example, the following is invalid:"
15078 msgstr ""
15079 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
15080 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
15081 "な使い方は許されない:"
15082
15083 #. type: Plain text
15084 #: build/C/man3/setbuf.3:199
15085 #, no-wrap
15086 msgid "#include E<lt>stdio.hE<gt>\n"
15087 msgstr "#include E<lt>stdio.hE<gt>\n"
15088
15089 #. type: Plain text
15090 #: build/C/man3/setbuf.3:208
15091 #, no-wrap
15092 msgid ""
15093 "int\n"
15094 "main(void)\n"
15095 "{\n"
15096 "    char buf[BUFSIZ];\n"
15097 "    setbuf(stdin, buf);\n"
15098 "    printf(\"Hello, world!\\en\");\n"
15099 "    return 0;\n"
15100 "}\n"
15101 msgstr ""
15102 "int\n"
15103 "main(void)\n"
15104 "{\n"
15105 "    char buf[BUFSIZ];\n"
15106 "    setbuf(stdin, buf);\n"
15107 "    printf(\"Hello, world!\\en\");\n"
15108 "    return 0;\n"
15109 "}\n"
15110
15111 #. type: Plain text
15112 #: build/C/man3/setbuf.3:217
15113 msgid ""
15114 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), "
15115 "B<printf>(3), B<puts>(3)"
15116 msgstr ""
15117 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), "
15118 "B<printf>(3), B<puts>(3)"
15119
15120 #. type: TH
15121 #: build/C/man3/stdin.3:13
15122 #, no-wrap
15123 msgid "STDIN"
15124 msgstr "STDIN"
15125
15126 #. type: TH
15127 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
15128 #, no-wrap
15129 msgid "2008-07-14"
15130 msgstr "2008-07-14"
15131
15132 #. type: Plain text
15133 #: build/C/man3/stdin.3:16
15134 msgid "stdin, stdout, stderr - standard I/O streams"
15135 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
15136
15137 #. type: Plain text
15138 #: build/C/man3/stdin.3:23
15139 #, no-wrap
15140 msgid ""
15141 "B<extern FILE *>I<stdin>B<;>\n"
15142 "B<extern FILE *>I<stdout>B<;>\n"
15143 "B<extern FILE *>I<stderr>B<;>\n"
15144 msgstr ""
15145 "B<extern FILE *>I<stdin>B<;>\n"
15146 "B<extern FILE *>I<stdout>B<;>\n"
15147 "B<extern FILE *>I<stderr>B<;>\n"
15148
15149 #. type: Plain text
15150 #: build/C/man3/stdin.3:35
15151 msgid ""
15152 "Under normal circumstances every UNIX program has three streams opened for "
15153 "it when it starts up, one for input, one for output, and one for printing "
15154 "diagnostic or error messages.  These are typically attached to the user's "
15155 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
15156 "depending on what the parent process chose to set up.  (See also the "
15157 "\"Redirection\" section of B<sh>(1).)"
15158 msgstr ""
15159 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
15160 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
15161 "示用のものである。これらは通常ユーザーの端末 (B<tty>(4)  を見よ) に接続されて"
15162 "いるが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられ"
15163 "ていることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
15164
15165 #. type: Plain text
15166 #: build/C/man3/stdin.3:45
15167 msgid ""
15168 "The input stream is referred to as \"standard input\"; the output stream is "
15169 "referred to as \"standard output\"; and the error stream is referred to as "
15170 "\"standard error\".  These terms are abbreviated to form the symbols used to "
15171 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
15172 msgstr ""
15173 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
15174 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
15175 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
15176 "I<stdout>, I<stderr> である。"
15177
15178 #. type: Plain text
15179 #: build/C/man3/stdin.3:54
15180 msgid ""
15181 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
15182 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
15183 msgstr ""
15184 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインター型である。し"
15185 "たがって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができ"
15186 "る。"
15187
15188 #. type: Plain text
15189 #: build/C/man3/stdin.3:63
15190 msgid ""
15191 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
15192 "same underlying files may also be accessed using the raw UNIX file "
15193 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
15194 msgstr ""
15195 "I<FILE> は UNIX のファイルディスクリプターにバッファー機能を追加したラッパー "
15196 "であるから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イル"
15197 "インターフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすること"
15198 "もできる。"
15199
15200 #. type: Plain text
15201 #: build/C/man3/stdin.3:82
15202 msgid ""
15203 "On program startup, the integer file descriptors associated with the streams "
15204 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
15205 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
15206 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying "
15207 "B<freopen>(3)  to one of these streams can change the file descriptor number "
15208 "associated with the stream.)"
15209 msgstr ""
15210 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
15211 "られているファイルディスクリプターの番号は、 それぞれ 0, 1, 2 である。 プリプ"
15212 "ロセッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
15213 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
15214 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
15215 "たファイルディスクリプター の番号を変更することができる。)"
15216
15217 #. type: Plain text
15218 #: build/C/man3/stdin.3:95
15219 msgid ""
15220 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
15221 "unexpected results and should generally be avoided.  (For the masochistic "
15222 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
15223 "is supposed to work.)  A general rule is that file descriptors are handled "
15224 "in the kernel, while stdio is just a library.  This means for example, that "
15225 "after an B<exec>(3), the child inherits all open file descriptors, but all "
15226 "old streams have become inaccessible."
15227 msgstr ""
15228 "I<FILE> と raw なファイルディスクリプターの併用は、予期できない結果を生じ る"
15229 "ことがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 の"
15230 "セクション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述され"
15231 "ている。)  一般的なルールは以下の通り: ファイルディスクリプターはカーネルに"
15232 "よって 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例え"
15233 "ば B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプ"
15234 "ター をすべて継承するが、親からのストリームはすべてアクセス不可となる。"
15235
15236 #. type: Plain text
15237 #: build/C/man3/stdin.3:113
15238 msgid ""
15239 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
15240 "macros, assigning to them is nonportable.  The standard streams can be made "
15241 "to refer to different files with help of the library function B<freopen>(3), "
15242 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
15243 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
15244 "by normal program termination."
15245 msgstr ""
15246 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
15247 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
15248 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
15249 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
15250 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
15251 "グラムの正常終了によってクローズされる。"
15252
15253 #. type: Plain text
15254 #: build/C/man3/stdin.3:122
15255 msgid ""
15256 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
15257 "standard also stipulates that these three streams shall be open at program "
15258 "startup."
15259 msgstr ""
15260 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
15261 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
15262 "とが規定されている。"
15263
15264 #. type: Plain text
15265 #: build/C/man3/stdin.3:154
15266 msgid ""
15267 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
15268 "when it points to a terminal.  Partial lines will not appear until "
15269 "B<fflush>(3)  or B<exit>(3)  is called, or a newline is printed.  This can "
15270 "produce unexpected results, especially with debugging output.  The buffering "
15271 "mode of the standard streams (or any other stream)  can be changed using the "
15272 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
15273 "associated with a terminal, there may also be input buffering in the "
15274 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
15275 "terminal input is line buffered in the kernel.)  This kernel input handling "
15276 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
15277 "B<termios>(3)."
15278 msgstr ""
15279 "I<stderr> ストリームはバッファーリングされていない。 I<stdout> ストリームは、"
15280 "端末に接続されているときには行単位でバッファーリング されている。一行に満たな"
15281 "い内容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字され"
15282 "るまで表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原"
15283 "因となるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  "
15284 "バッファーリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すこと"
15285 "によって変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のド"
15286 "ライバでバッファーリングされている 可能性がある点にも注意すること。これは "
15287 "stdio のバッファーリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力"
15288 "はカーネルによって行単位 でバッファーリングされている。) このカーネルによる入"
15289 "力の扱いは B<tcsetattr>(3)  などの呼び出しによって変更することができる。 "
15290 "B<stty>(1)  と B<termios>(3)  も参照すること。"
15291
15292 #. type: Plain text
15293 #: build/C/man3/stdin.3:160
15294 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
15295 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
15296
15297 #. type: TH
15298 #: build/C/man3/stdio.3:39
15299 #, no-wrap
15300 msgid "STDIO"
15301 msgstr "STDIO"
15302
15303 #. type: TH
15304 #: build/C/man3/stdio.3:39
15305 #, no-wrap
15306 msgid "2001-12-26"
15307 msgstr "2001-12-26"
15308
15309 #. type: Plain text
15310 #: build/C/man3/stdio.3:42
15311 msgid "stdio - standard input/output library functions"
15312 msgstr "stdio - 標準入出力ライブラリ関数"
15313
15314 #. type: Plain text
15315 #: build/C/man3/stdio.3:46
15316 msgid "B<FILE *>I<stdin>B<;>"
15317 msgstr "B<FILE *>I<stdin>B<;>"
15318
15319 #. type: Plain text
15320 #: build/C/man3/stdio.3:48
15321 msgid "B<FILE *>I<stdout>B<;>"
15322 msgstr "B<FILE *>I<stdout>B<;>"
15323
15324 #. type: Plain text
15325 #: build/C/man3/stdio.3:50
15326 msgid "B<FILE *>I<stderr>B<;>"
15327 msgstr "B<FILE *>I<stderr>B<;>"
15328
15329 #. type: Plain text
15330 #: build/C/man3/stdio.3:57
15331 msgid ""
15332 "The standard I/O library provides a simple and efficient buffered stream I/O "
15333 "interface.  Input and output is mapped into logical data streams and the "
15334 "physical I/O characteristics are concealed.  The functions and macros are "
15335 "listed below; more information is available from the individual man pages."
15336 msgstr ""
15337 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファーリングされたストリーム"
15338 "入出力インターフェースを提供する。 入力と出力は論理データストリームに割り付け"
15339 "られ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロ"
15340 "を以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
15341
15342 #. type: Plain text
15343 #: build/C/man3/stdio.3:80
15344 msgid ""
15345 "A stream is associated with an external file (which may be a physical "
15346 "device) by I<opening> a file, which may involve creating a new file.  "
15347 "Creating an existing file causes its former contents to be discarded.  If a "
15348 "file can support positioning requests (such as a disk file, as opposed to a "
15349 "terminal), then a I<file position indicator> associated with the stream is "
15350 "positioned at the start of the file (byte zero), unless the file is opened "
15351 "with append mode.  If append mode is used, it is unspecified whether the "
15352 "position indicator will be placed at the start or the end of the file.  The "
15353 "position indicator is maintained by subsequent reads, writes and positioning "
15354 "requests.  All input occurs as if the characters were read by successive "
15355 "calls to the B<fgetc>(3)  function; all output takes place as if all "
15356 "characters were written by successive calls to the B<fputc>(3)  function."
15357 msgstr ""
15358 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
15359 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
15360 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
15361 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
15362 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
15363 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
15364 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
15365 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
15366 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
15367 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
15368 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
15369 "字を書き込んだかのように行われる。"
15370
15371 #. type: Plain text
15372 #: build/C/man3/stdio.3:90
15373 msgid ""
15374 "A file is disassociated from a stream by I<closing> the file.  Output "
15375 "streams are flushed (any unwritten buffer contents are transferred to the "
15376 "host environment) before the stream is disassociated from the file.  The "
15377 "value of a pointer to a I<FILE> object is indeterminate after a file is "
15378 "closed (garbage)."
15379 msgstr ""
15380 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
15381 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
15382 "にフラッシュされる (書き込まれていないすべてのバッファーの内容がホスト環境に"
15383 "転送される)。 I<FILE> オブジェクトへのポインターの値は、 ファイルを閉じた後で"
15384 "は不確定になる (ゴミになってしまう)。"
15385
15386 #. type: Plain text
15387 #: build/C/man3/stdio.3:103
15388 msgid ""
15389 "A file may be subsequently reopened, by the same or another program "
15390 "execution, and its contents reclaimed or modified (if it can be repositioned "
15391 "at the start).  If the main function returns to its original caller, or the "
15392 "B<exit>(3)  function is called, all open files are closed (hence all output "
15393 "streams are flushed) before program termination.  Other methods of program "
15394 "termination, such as B<abort>(3)  do not bother about closing files properly."
15395 msgstr ""
15396 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
15397 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
15398 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
15399 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
15400 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
15401 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
15402 "保証はない。"
15403
15404 #. type: Plain text
15405 #: build/C/man3/stdio.3:119
15406 msgid ""
15407 "At program startup, three text streams are predefined and need not be opened "
15408 "explicitly: I<standard input> (for reading conventional input), I<standard "
15409 "output> (for writing conventional output), and I<standard error> (for "
15410 "writing diagnostic output).  These streams are abbreviated I<stdin>,"
15411 "I<stdout> and I<stderr>.  When opened, the standard error stream is not "
15412 "fully buffered; the standard input and output streams are fully buffered if "
15413 "and only if the streams do not refer to an interactive device."
15414 msgstr ""
15415 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
15416 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
15417 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
15418 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
15419 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
15420 "れたときには、 標準エラーストリームは 完全にはバッファーリングされていない。 "
15421 "標準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバ"
15422 "イスを参照していなければ、 完全にバッファーリングされている。"
15423
15424 #. type: Plain text
15425 #: build/C/man3/stdio.3:129
15426 msgid ""
15427 "Output streams that refer to terminal devices are always line buffered by "
15428 "default; pending output to such streams is written automatically whenever an "
15429 "input stream that refers to a terminal device is read.  In cases where a "
15430 "large amount of computation is done after printing part of a line on an "
15431 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
15432 "going off and computing so that the output will appear."
15433 msgstr ""
15434 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファー"
15435 "リングされている。 ただしそのようなストリームにおけるバッファー内の出力は、 "
15436 "端末デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に"
15437 "書き込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力"
15438 "が表示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行"
15439 "する必要がある。"
15440
15441 #. type: Plain text
15442 #: build/C/man3/stdio.3:143
15443 msgid ""
15444 "The I<stdio> library is a part of the library B<libc> and routines are "
15445 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
15446 "SYNOPSIS sections of the following manual pages indicate which include files "
15447 "are to be used, what the compiler declaration for the function looks like "
15448 "and which external variables are of interest."
15449 msgstr ""
15450 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
15451 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
15452 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
15453 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
15454 "数が関係するのかが示されている。"
15455
15456 #.  Not on Linux: .BR fropen ,
15457 #.  Not on Linux: .BR fwopen ,
15458 #. type: Plain text
15459 #: build/C/man3/stdio.3:183
15460 msgid ""
15461 "The following are defined as macros; these names may not be reused without "
15462 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
15463 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
15464 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
15465 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
15466 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
15467 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
15468 "and B<putchar> exist and will be used if the macros definitions are "
15469 "explicitly removed."
15470 msgstr ""
15471 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
15472 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
15473 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
15474 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
15475 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
15476 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
15477 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
15478 "示的に消去されている場合には、 これらを使用することになるだろう。"
15479
15480 #. type: SS
15481 #: build/C/man3/stdio.3:183
15482 #, no-wrap
15483 msgid "List of functions"
15484 msgstr "関数のリスト"
15485
15486 #. type: tbl table
15487 #: build/C/man3/stdio.3:188
15488 #, no-wrap
15489 msgid "Function\tDescription\n"
15490 msgstr "関数\t説明\n"
15491
15492 #. type: tbl table
15493 #: build/C/man3/stdio.3:189
15494 #, no-wrap
15495 msgid "_\n"
15496 msgstr "_\n"
15497
15498 #. type: tbl table
15499 #: build/C/man3/stdio.3:190
15500 #, no-wrap
15501 msgid "clearerr\tcheck and reset stream status\n"
15502 msgstr "clearerr\tストリームの状態の確認とリセット\n"
15503
15504 #. type: tbl table
15505 #: build/C/man3/stdio.3:191
15506 #, no-wrap
15507 msgid "fclose\tclose a stream\n"
15508 msgstr "fclose\tストリームをクローズする\n"
15509
15510 #. type: tbl table
15511 #: build/C/man3/stdio.3:192
15512 #, no-wrap
15513 msgid "fdopen\tstream open functions\n"
15514 msgstr "fdopen\tストリームをオープンする\n"
15515
15516 #. type: tbl table
15517 #: build/C/man3/stdio.3:193
15518 #, no-wrap
15519 msgid "feof\tcheck and reset stream status\n"
15520 msgstr "feof\tストリームの状態の確認とリセット\n"
15521
15522 #. type: tbl table
15523 #: build/C/man3/stdio.3:194
15524 #, no-wrap
15525 msgid "ferror\tcheck and reset stream status\n"
15526 msgstr "ferror\tストリームの状態の確認とリセット\n"
15527
15528 #. type: tbl table
15529 #: build/C/man3/stdio.3:195
15530 #, no-wrap
15531 msgid "fflush\tflush a stream\n"
15532 msgstr "fflush\tストリームをフラッシュする\n"
15533
15534 #. type: tbl table
15535 #: build/C/man3/stdio.3:196
15536 #, no-wrap
15537 msgid "fgetc\tget next character or word from input stream\n"
15538 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
15539
15540 #. type: tbl table
15541 #: build/C/man3/stdio.3:197
15542 #, no-wrap
15543 msgid "fgetpos\treposition a stream\n"
15544 msgstr "fgetpos\tストリームの位置を取得する\n"
15545
15546 #. type: tbl table
15547 #: build/C/man3/stdio.3:198
15548 #, no-wrap
15549 msgid "fgets\tget a line from a stream\n"
15550 msgstr "fgets\tストリームから行を取得する\n"
15551
15552 #. type: tbl table
15553 #: build/C/man3/stdio.3:199
15554 #, no-wrap
15555 msgid "fileno\treturn the integer descriptor of the argument stream\n"
15556 msgstr "fileno\t引き数であるストリームの整数値のディスクリプターを返す\n"
15557
15558 #. type: tbl table
15559 #: build/C/man3/stdio.3:200
15560 #, no-wrap
15561 msgid "fopen\tstream open functions\n"
15562 msgstr "fopen\tストリームをオープンする\n"
15563
15564 #. type: tbl table
15565 #: build/C/man3/stdio.3:201
15566 #, no-wrap
15567 msgid "fprintf\tformatted output conversion\n"
15568 msgstr "fprintf\t書式付き出力変換\n"
15569
15570 #. type: tbl table
15571 #: build/C/man3/stdio.3:202
15572 #, no-wrap
15573 msgid "fpurge\tflush a stream\n"
15574 msgstr "fpurge\tストリームをフラッシュする\n"
15575
15576 #. type: tbl table
15577 #: build/C/man3/stdio.3:203
15578 #, no-wrap
15579 msgid "fputc\toutput a character or word to a stream\n"
15580 msgstr "fputc\t文字または語をストリームに出力する\n"
15581
15582 #. type: tbl table
15583 #: build/C/man3/stdio.3:204
15584 #, no-wrap
15585 msgid "fputs\toutput a line to a stream\n"
15586 msgstr "fputs\t行をストリームに出力する\n"
15587
15588 #. type: tbl table
15589 #: build/C/man3/stdio.3:205
15590 #, no-wrap
15591 msgid "fread\tbinary stream input/output\n"
15592 msgstr "fread\tバイナリーストリーム入出力\n"
15593
15594 #. type: tbl table
15595 #: build/C/man3/stdio.3:206
15596 #, no-wrap
15597 msgid "freopen\tstream open functions\n"
15598 msgstr "freopen\tストリームをオープンする\n"
15599
15600 #. type: tbl table
15601 #: build/C/man3/stdio.3:207
15602 #, no-wrap
15603 msgid "fscanf\tinput format conversion\n"
15604 msgstr "fscanf\t書式付き入力変換\n"
15605
15606 #. type: tbl table
15607 #: build/C/man3/stdio.3:208
15608 #, no-wrap
15609 msgid "fseek\treposition a stream\n"
15610 msgstr "fseek\tストリームの位置指示子を移動する\n"
15611
15612 #. type: tbl table
15613 #: build/C/man3/stdio.3:209
15614 #, no-wrap
15615 msgid "fsetpos\treposition a stream\n"
15616 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
15617
15618 #. type: tbl table
15619 #: build/C/man3/stdio.3:210
15620 #, no-wrap
15621 msgid "ftell\treposition a stream\n"
15622 msgstr "ftell\tストリームの位置を取得する\n"
15623
15624 #. type: tbl table
15625 #: build/C/man3/stdio.3:211
15626 #, no-wrap
15627 msgid "fwrite\tbinary stream input/output\n"
15628 msgstr "fwrite\tバイナリーストリーム入出力\n"
15629
15630 #. type: tbl table
15631 #: build/C/man3/stdio.3:212
15632 #, no-wrap
15633 msgid "getc\tget next character or word from input stream\n"
15634 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
15635
15636 #. type: tbl table
15637 #: build/C/man3/stdio.3:213
15638 #, no-wrap
15639 msgid "getchar\tget next character or word from input stream\n"
15640 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
15641
15642 #. type: tbl table
15643 #: build/C/man3/stdio.3:214
15644 #, no-wrap
15645 msgid "gets\tget a line from a stream\n"
15646 msgstr "gets\t行を入力ストリームから取得する\n"
15647
15648 #. type: tbl table
15649 #: build/C/man3/stdio.3:215
15650 #, no-wrap
15651 msgid "getw\tget next character or word from input stream\n"
15652 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
15653
15654 #. type: tbl table
15655 #: build/C/man3/stdio.3:216
15656 #, no-wrap
15657 msgid "mktemp\tmake temporary filename (unique)\n"
15658 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
15659
15660 #. type: tbl table
15661 #: build/C/man3/stdio.3:217
15662 #, no-wrap
15663 msgid "perror\tsystem error messages\n"
15664 msgstr "perror\tシステムエラーメッセージ\n"
15665
15666 #. type: tbl table
15667 #: build/C/man3/stdio.3:218
15668 #, no-wrap
15669 msgid "printf\tformatted output conversion\n"
15670 msgstr "printf\t書式付き出力変換\n"
15671
15672 #. type: tbl table
15673 #: build/C/man3/stdio.3:219
15674 #, no-wrap
15675 msgid "putc\toutput a character or word to a stream\n"
15676 msgstr "putc\t文字または語をストリームに出力する\n"
15677
15678 #. type: tbl table
15679 #: build/C/man3/stdio.3:220
15680 #, no-wrap
15681 msgid "putchar\toutput a character or word to a stream\n"
15682 msgstr "putchar\t文字または語をストリームに出力する\n"
15683
15684 #. type: tbl table
15685 #: build/C/man3/stdio.3:221
15686 #, no-wrap
15687 msgid "puts\toutput a line to a stream\n"
15688 msgstr "puts\t行をストリームに出力する\n"
15689
15690 #. type: tbl table
15691 #: build/C/man3/stdio.3:222
15692 #, no-wrap
15693 msgid "putw\toutput a character or word to a stream\n"
15694 msgstr "putw\t文字または語をストリームに出力する\n"
15695
15696 #. type: tbl table
15697 #: build/C/man3/stdio.3:223
15698 #, no-wrap
15699 msgid "remove\tremove directory entry\n"
15700 msgstr "remove\tディレクトリエントリーを削除する\n"
15701
15702 #. type: tbl table
15703 #: build/C/man3/stdio.3:224
15704 #, no-wrap
15705 msgid "rewind\treposition a stream\n"
15706 msgstr "rewind\tストリームの位置指示子を移動する\n"
15707
15708 #. type: tbl table
15709 #: build/C/man3/stdio.3:225
15710 #, no-wrap
15711 msgid "scanf\tinput format conversion\n"
15712 msgstr "scanf\t書式付き入力変換\n"
15713
15714 #. type: tbl table
15715 #: build/C/man3/stdio.3:226
15716 #, no-wrap
15717 msgid "setbuf\tstream buffering operations\n"
15718 msgstr "setbuf\tストリームのバッファーリングの操作\n"
15719
15720 #. type: tbl table
15721 #: build/C/man3/stdio.3:227
15722 #, no-wrap
15723 msgid "setbuffer\tstream buffering operations\n"
15724 msgstr "setbuffer\tストリームのバッファーリングの操作\n"
15725
15726 #. type: tbl table
15727 #: build/C/man3/stdio.3:228
15728 #, no-wrap
15729 msgid "setlinebuf\tstream buffering operations\n"
15730 msgstr "setlinebuf\tストリームのバッファーリングの操作\n"
15731
15732 #. type: tbl table
15733 #: build/C/man3/stdio.3:229
15734 #, no-wrap
15735 msgid "setvbuf\tstream buffering operations\n"
15736 msgstr "setvbuf\tストリームのバッファーリングの操作\n"
15737
15738 #. type: tbl table
15739 #: build/C/man3/stdio.3:230
15740 #, no-wrap
15741 msgid "sprintf\tformatted output conversion\n"
15742 msgstr "sprintf\t書式付き出力変換\n"
15743
15744 #. type: tbl table
15745 #: build/C/man3/stdio.3:231
15746 #, no-wrap
15747 msgid "sscanf\tinput format conversion\n"
15748 msgstr "sscanf\t書式付き入力変換\n"
15749
15750 #. type: tbl table
15751 #: build/C/man3/stdio.3:232
15752 #, no-wrap
15753 msgid "strerror\tsystem error messages\n"
15754 msgstr "strerror\tシステムエラーメッセージ\n"
15755
15756 #. type: tbl table
15757 #: build/C/man3/stdio.3:233
15758 #, no-wrap
15759 msgid "sys_errlist\tsystem error messages\n"
15760 msgstr "sys_errlist\tシステムエラーメッセージ\n"
15761
15762 #. type: tbl table
15763 #: build/C/man3/stdio.3:234
15764 #, no-wrap
15765 msgid "sys_nerr\tsystem error messages\n"
15766 msgstr "sys_nerr\tシステムエラーメッセージ\n"
15767
15768 #. type: tbl table
15769 #: build/C/man3/stdio.3:235
15770 #, no-wrap
15771 msgid "tempnam\ttemporary file routines\n"
15772 msgstr "tempnam\tテンポラリファイルの操作\n"
15773
15774 #. type: tbl table
15775 #: build/C/man3/stdio.3:236
15776 #, no-wrap
15777 msgid "tmpfile\ttemporary file routines\n"
15778 msgstr "tmpfile\tテンポラリファイルの操作\n"
15779
15780 #. type: tbl table
15781 #: build/C/man3/stdio.3:237
15782 #, no-wrap
15783 msgid "tmpnam\ttemporary file routines\n"
15784 msgstr "tmpnam\tテンポラリファイルの操作\n"
15785
15786 #. type: tbl table
15787 #: build/C/man3/stdio.3:238
15788 #, no-wrap
15789 msgid "ungetc\tun-get character from input stream\n"
15790 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
15791
15792 #. type: tbl table
15793 #: build/C/man3/stdio.3:239
15794 #, no-wrap
15795 msgid "vfprintf\tformatted output conversion\n"
15796 msgstr "vfprintf\t書式付き出力変換\n"
15797
15798 #. type: tbl table
15799 #: build/C/man3/stdio.3:240
15800 #, no-wrap
15801 msgid "vfscanf\tinput format conversion\n"
15802 msgstr "vfscanf\t書式付き入力変換\n"
15803
15804 #. type: tbl table
15805 #: build/C/man3/stdio.3:241
15806 #, no-wrap
15807 msgid "vprintf\tformatted output conversion\n"
15808 msgstr "vprintf\t書式付き出力変換\n"
15809
15810 #. type: tbl table
15811 #: build/C/man3/stdio.3:242
15812 #, no-wrap
15813 msgid "vscanf\tinput format conversion\n"
15814 msgstr "vscanf\t書式付き入力変換\n"
15815
15816 #. type: tbl table
15817 #: build/C/man3/stdio.3:243
15818 #, no-wrap
15819 msgid "vsprintf\tformatted output conversion\n"
15820 msgstr "vsprintf\t書式付き出力変換\n"
15821
15822 #. type: tbl table
15823 #: build/C/man3/stdio.3:244
15824 #, no-wrap
15825 msgid "vsscanf\tinput format conversion\n"
15826 msgstr "vsscanf\t書式付き入力変換\n"
15827
15828 #. type: Plain text
15829 #: build/C/man3/stdio.3:250
15830 msgid "The I<stdio> library conforms to C89."
15831 msgstr "I<stdio> ライブラリは C89 に準拠している。"
15832
15833 #. type: Plain text
15834 #: build/C/man3/stdio.3:257
15835 msgid ""
15836 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
15837 "B<unlocked_stdio>(3)"
15838 msgstr ""
15839 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
15840 "B<unlocked_stdio>(3)"
15841
15842 #. type: TH
15843 #: build/C/man3/stdio_ext.3:25
15844 #, no-wrap
15845 msgid "STDIO_EXT"
15846 msgstr "STDIO_EXT"
15847
15848 #. type: Plain text
15849 #: build/C/man3/stdio_ext.3:30
15850 msgid ""
15851 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
15852 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
15853 "structure"
15854 msgstr ""
15855 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
15856 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
15857 "へのインターフェース"
15858
15859 #. type: Plain text
15860 #: build/C/man3/stdio_ext.3:34
15861 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
15862 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
15863
15864 #. type: Plain text
15865 #: build/C/man3/stdio_ext.3:36
15866 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
15867 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
15868
15869 #. type: Plain text
15870 #: build/C/man3/stdio_ext.3:38
15871 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
15872 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
15873
15874 #. type: Plain text
15875 #: build/C/man3/stdio_ext.3:40
15876 msgid "B<int __flbf(FILE *>I<stream>B<);>"
15877 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
15878
15879 #. type: Plain text
15880 #: build/C/man3/stdio_ext.3:42
15881 msgid "B<int __freadable(FILE *>I<stream>B<);>"
15882 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
15883
15884 #. type: Plain text
15885 #: build/C/man3/stdio_ext.3:44
15886 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
15887 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
15888
15889 #. type: Plain text
15890 #: build/C/man3/stdio_ext.3:46
15891 msgid "B<int __freading(FILE *>I<stream>B<);>"
15892 msgstr "B<int __freading(FILE *>I<stream>B<);>"
15893
15894 #. type: Plain text
15895 #: build/C/man3/stdio_ext.3:48
15896 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
15897 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
15898
15899 #. type: Plain text
15900 #: build/C/man3/stdio_ext.3:50
15901 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
15902 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
15903
15904 #. type: Plain text
15905 #: build/C/man3/stdio_ext.3:52
15906 msgid "B<void _flushlbf(void);>"
15907 msgstr "B<void _flushlbf(void);>"
15908
15909 #. type: Plain text
15910 #: build/C/man3/stdio_ext.3:54
15911 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
15912 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
15913
15914 #. type: Plain text
15915 #: build/C/man3/stdio_ext.3:59
15916 msgid ""
15917 "Solaris introduced routines to allow portable access to the internals of the "
15918 "I<FILE> structure, and glibc also implemented these."
15919 msgstr ""
15920 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
15921 "が導入されており、これらは glibc でも実装されている。"
15922
15923 #. type: Plain text
15924 #: build/C/man3/stdio_ext.3:64
15925 msgid ""
15926 "The B<__fbufsize>()  function returns the size of the buffer currently used "
15927 "by the given stream."
15928 msgstr ""
15929 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファーサイズを"
15930 "返す。"
15931
15932 #. type: Plain text
15933 #: build/C/man3/stdio_ext.3:71
15934 msgid ""
15935 "The B<__fpending>()  function returns the number of bytes in the output "
15936 "buffer.  For wide-oriented streams the unit is wide characters.  This "
15937 "function is undefined on buffers in reading mode, or opened read-only."
15938 msgstr ""
15939 "B<__fpending>()  関数は、出力バッファーに入っているデータのバイト数を返す。 "
15940 "ワイドキャラクターを扱うストリームの場合、ワイドキャラクター単位で計算され"
15941 "る。 バッファーが読み出しモードの場合や読み出し専用で開かれている場合の この"
15942 "関数の振舞いは未定義である。"
15943
15944 #. type: Plain text
15945 #: build/C/man3/stdio_ext.3:76
15946 msgid ""
15947 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
15948 "buffered, and zero otherwise."
15949 msgstr ""
15950 "B<__flbf>()  関数は、ストリームがラインバッファーの場合は 0 以外を、 それ以外"
15951 "の場合は 0 を返す。"
15952
15953 #. type: Plain text
15954 #: build/C/man3/stdio_ext.3:81
15955 msgid ""
15956 "The B<__freadable>()  function returns a nonzero value if the stream allows "
15957 "reading, and zero otherwise."
15958 msgstr ""
15959 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
15960 "外の場合は 0 を返す。"
15961
15962 #. type: Plain text
15963 #: build/C/man3/stdio_ext.3:86
15964 msgid ""
15965 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
15966 "writing, and zero otherwise."
15967 msgstr ""
15968 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
15969 "外の場合は 0 を返す。"
15970
15971 #. type: Plain text
15972 #: build/C/man3/stdio_ext.3:92
15973 msgid ""
15974 "The B<__freading>()  function returns a nonzero value if the stream is read-"
15975 "only, or if the last operation on the stream was a read operation, and zero "
15976 "otherwise."
15977 msgstr ""
15978 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
15979 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
15980 "を返す。"
15981
15982 #. type: Plain text
15983 #: build/C/man3/stdio_ext.3:98
15984 msgid ""
15985 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
15986 "only (or append-only), or if the last operation on the stream was a write "
15987 "operation, and zero otherwise."
15988 msgstr ""
15989 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
15990 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
15991 "し、 それ以外の場合は 0 を返す。"
15992
15993 #. type: Plain text
15994 #: build/C/man3/stdio_ext.3:106
15995 msgid ""
15996 "The B<__fsetlocking>()  function can be used to select the desired type of "
15997 "locking on the stream.  It returns the current type.  The I<type> argument "
15998 "can take the following three values:"
15999 msgstr ""
16000 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
16001 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
16002 "ることができる :"
16003
16004 #. type: TP
16005 #: build/C/man3/stdio_ext.3:106
16006 #, no-wrap
16007 msgid "B<FSETLOCKING_INTERNAL>"
16008 msgstr "B<FSETLOCKING_INTERNAL>"
16009
16010 #. type: Plain text
16011 #: build/C/man3/stdio_ext.3:111
16012 msgid ""
16013 "Perform implicit locking around every operation on the given stream (except "
16014 "for the *_unlocked ones).  This is the default."
16015 msgstr ""
16016 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
16017 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
16018 "である)。 これがデフォルトのロック形式である。"
16019
16020 #. type: TP
16021 #: build/C/man3/stdio_ext.3:111
16022 #, no-wrap
16023 msgid "B<FSETLOCKING_BYCALLER>"
16024 msgstr "B<FSETLOCKING_BYCALLER>"
16025
16026 #. type: Plain text
16027 #: build/C/man3/stdio_ext.3:118
16028 msgid ""
16029 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
16030 "case there is more than one thread), and the stdio routines will not do "
16031 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
16032 msgstr ""
16033 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
16034 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
16035 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
16036 "理を行わない。"
16037
16038 #. type: TP
16039 #: build/C/man3/stdio_ext.3:118
16040 #, no-wrap
16041 msgid "B<FSETLOCKING_QUERY>"
16042 msgstr "B<FSETLOCKING_QUERY>"
16043
16044 #. type: Plain text
16045 #: build/C/man3/stdio_ext.3:122
16046 msgid "Don't change the type of locking.  (Only return it.)"
16047 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
16048
16049 #. type: Plain text
16050 #: build/C/man3/stdio_ext.3:128
16051 msgid ""
16052 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
16053 "so that output to a terminal is forced out, say before reading keyboard "
16054 "input.)"
16055 msgstr ""
16056 "B<_flushlbf>()  関数は、すべてのラインバッファー (line-buffered) タイプのスト"
16057 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
16058 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
16059 "いだろう)"
16060
16061 #. type: Plain text
16062 #: build/C/man3/stdio_ext.3:132
16063 msgid ""
16064 "The B<__fpurge>()  function discards the contents of the stream's buffer."
16065 msgstr "B<__fpurge>()  関数は、ストリームのバッファーの内容を廃棄する。"
16066
16067 #. type: Plain text
16068 #: build/C/man3/stdio_ext.3:141
16069 msgid ""
16070 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
16071 "functions do not lock the stream, so they are not thread-safe."
16072 msgstr ""
16073 "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() "
16074 "は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
16075
16076 #. type: Plain text
16077 #: build/C/man3/stdio_ext.3:151
16078 msgid ""
16079 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
16080 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
16081 msgstr ""
16082 "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
16083 "B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
16084
16085 #. type: Plain text
16086 #: build/C/man3/stdio_ext.3:154
16087 msgid "B<flockfile>(3), B<fpurge>(3)"
16088 msgstr "B<flockfile>(3), B<fpurge>(3)"
16089
16090 #. type: TH
16091 #: build/C/man2/symlink.2:33 build/C/man7/symlink.7:37
16092 #, no-wrap
16093 msgid "SYMLINK"
16094 msgstr "SYMLINK"
16095
16096 #. type: Plain text
16097 #: build/C/man2/symlink.2:36
16098 msgid "symlink, symlinkat - make a new name for a file"
16099 msgstr "symlink, symlinkat - ファイルに新しい名前を付ける"
16100
16101 #. type: Plain text
16102 #: build/C/man2/symlink.2:41
16103 #, no-wrap
16104 msgid "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
16105 msgstr "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
16106
16107 #. type: Plain text
16108 #: build/C/man2/symlink.2:47
16109 #, no-wrap
16110 msgid "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
16111 msgstr "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
16112
16113 #. type: Plain text
16114 #: build/C/man2/symlink.2:56
16115 msgid "B<symlink>():"
16116 msgstr "B<symlink>():"
16117
16118 #. type: Plain text
16119 #: build/C/man2/symlink.2:62
16120 msgid "B<symlinkat>():"
16121 msgstr "B<symlinkat>():"
16122
16123 #. type: Plain text
16124 #: build/C/man2/symlink.2:80
16125 msgid ""
16126 "B<symlink>()  creates a symbolic link named I<linkpath> which contains the "
16127 "string I<target>."
16128 msgstr ""
16129 "B<symlink>()  は I<target> という文字列をファイルの内容として持つ "
16130 "I<linkpath> というシンボリックリンク (symbolic link) を作成する。"
16131
16132 #. type: Plain text
16133 #: build/C/man2/symlink.2:84
16134 msgid ""
16135 "Symbolic links are interpreted at run time as if the contents of the link "
16136 "had been substituted into the path being followed to find a file or "
16137 "directory."
16138 msgstr ""
16139 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
16140 "スを辿ることで、 ファイルやディレクトリに到達する。"
16141
16142 #. type: Plain text
16143 #: build/C/man2/symlink.2:89
16144 msgid ""
16145 "Symbolic links may contain I<..> path components, which (if used at the "
16146 "start of the link) refer to the parent directories of that in which the link "
16147 "resides."
16148 msgstr ""
16149 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
16150 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
16151 "される。"
16152
16153 #. type: Plain text
16154 #: build/C/man2/symlink.2:93
16155 msgid ""
16156 "A symbolic link (also known as a soft link) may point to an existing file or "
16157 "to a nonexistent one; the latter case is known as a dangling link."
16158 msgstr ""
16159 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
16160 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
16161 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
16162
16163 #. type: Plain text
16164 #: build/C/man2/symlink.2:100
16165 msgid ""
16166 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
16167 "when following the link, but is checked when removal or renaming of the link "
16168 "is requested and the link is in a directory with the sticky bit "
16169 "(B<S_ISVTX>)  set."
16170 msgstr ""
16171 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
16172 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
16173 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
16174 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
16175
16176 #. type: Plain text
16177 #: build/C/man2/symlink.2:106
16178 msgid "If I<linkpath> exists, it will I<not> be overwritten."
16179 msgstr "I<linkpath> が存在する場合には上書きはI<されない>。"
16180
16181 #. type: SS
16182 #: build/C/man2/symlink.2:106
16183 #, no-wrap
16184 msgid "symlinkat()"
16185 msgstr "symlinkat()"
16186
16187 #. type: Plain text
16188 #: build/C/man2/symlink.2:112
16189 msgid ""
16190 "The B<symlinkat>()  system call operates in exactly the same way as "
16191 "B<symlink>(), except for the differences described here."
16192 msgstr ""
16193 "B<symlinkat>() システムコールは B<symlink>() と全く同様に動作するが、以下で説"
16194 "明する点が異なる。"
16195
16196 #. type: Plain text
16197 #: build/C/man2/symlink.2:122
16198 msgid ""
16199 "If the pathname given in I<linkpath> is relative, then it is interpreted "
16200 "relative to the directory referred to by the file descriptor I<newdirfd> "
16201 "(rather than relative to the current working directory of the calling "
16202 "process, as is done by B<symlink>()  for a relative pathname)."
16203 msgstr ""
16204 "I<linkpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
16205 "リプター I<newdirfd> が参照するディレクトリに対する相対パスと解釈される "
16206 "(B<symlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
16207 "ワーキングディレクトリに対する相対パスではない)。"
16208
16209 #. type: Plain text
16210 #: build/C/man2/symlink.2:134
16211 msgid ""
16212 "If I<linkpath> is relative and I<newdirfd> is the special value B<AT_FDCWD>, "
16213 "then I<linkpath> is interpreted relative to the current working directory of "
16214 "the calling process (like B<symlink>())."
16215 msgstr ""
16216 "I<linkpath> で指定されたパス名が相対パスで、 I<newdirfd> が特別な値 "
16217 "B<AT_FDCWD> の場合、 (B<symlink>() と同様に) I<linkpath> は呼び出したプロセス"
16218 "のカレントワーキングディレクトリに対する相対パスと解釈される。"
16219
16220 #. type: Plain text
16221 #: build/C/man2/symlink.2:140
16222 msgid "If I<linkpath> is absolute, then I<newdirfd> is ignored."
16223 msgstr ""
16224 "I<linkpath> で指定されたパス名が絶対パスの場合、 I<newdirfd> は無視される。"
16225
16226 #. type: Plain text
16227 #: build/C/man2/symlink.2:155
16228 msgid ""
16229 "Write access to the directory containing I<linkpath> is denied, or one of "
16230 "the directories in the path prefix of I<linkpath> did not allow search "
16231 "permission.  (See also B<path_resolution>(7).)"
16232 msgstr ""
16233 "I<linkpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<linkpath> "
16234 "に含まれているディレクトリのどれかに検索許可が与えられていない "
16235 "(B<path_resolution>(7)  も参照すること)。"
16236
16237 #. type: Plain text
16238 #: build/C/man2/symlink.2:160
16239 msgid ""
16240 "The user's quota of resources on the filesystem has been exhausted.  The "
16241 "resources could be inodes or disk blocks, depending on the filesystem "
16242 "implementation."
16243 msgstr ""
16244 "そのファイルシステムのリソース使用量がユーザークォータに達している。対象とな"
16245 "るリソースは inode かディスクブロックで、どちらになるかはファイルシステムの実"
16246 "装依存である。"
16247
16248 #. type: Plain text
16249 #: build/C/man2/symlink.2:164
16250 msgid "I<linkpath> already exists."
16251 msgstr "I<linkpath> が既に存在する。"
16252
16253 #. type: Plain text
16254 #: build/C/man2/symlink.2:167
16255 msgid "I<target> or I<linkpath> points outside your accessible address space."
16256 msgstr ""
16257 "I<target> や I<linkpath> がアクセス可能なアドレス空間の外を指している。"
16258
16259 #. type: Plain text
16260 #: build/C/man2/symlink.2:174
16261 msgid "Too many symbolic links were encountered in resolving I<linkpath>."
16262 msgstr "I<linkpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
16263
16264 #. type: Plain text
16265 #: build/C/man2/symlink.2:177
16266 msgid "I<target> or I<linkpath> was too long."
16267 msgstr "I<target> または I<linkpath> が長過ぎる。"
16268
16269 #. type: Plain text
16270 #: build/C/man2/symlink.2:184
16271 msgid ""
16272 "A directory component in I<linkpath> does not exist or is a dangling "
16273 "symbolic link, or I<target> is the empty string."
16274 msgstr ""
16275 "I<linkpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
16276 "I<target> が空文字列である。"
16277
16278 #. type: Plain text
16279 #: build/C/man2/symlink.2:196
16280 msgid ""
16281 "A component used as a directory in I<linkpath> is not, in fact, a directory."
16282 msgstr ""
16283 "I<linkpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
16284
16285 #. type: Plain text
16286 #: build/C/man2/symlink.2:201
16287 msgid ""
16288 "The filesystem containing I<linkpath> does not support the creation of "
16289 "symbolic links."
16290 msgstr ""
16291 "I<linkpath> を含んでいるファイルシステム (file system) が シンボリックリンク"
16292 "の作成をサポートしていない。"
16293
16294 #. type: Plain text
16295 #: build/C/man2/symlink.2:205
16296 msgid "I<linkpath> is on a read-only filesystem."
16297 msgstr "I<linkpath> が読み込み専用のファイルシステムに存在している。"
16298
16299 #. type: Plain text
16300 #: build/C/man2/symlink.2:208
16301 msgid "The following additional errors can occur for B<symlinkat>():"
16302 msgstr "B<symlinkat>() では以下のエラーも発生する。"
16303
16304 #. type: Plain text
16305 #: build/C/man2/symlink.2:212
16306 msgid "I<newdirfd> is not a valid file descriptor."
16307 msgstr "I<newdirfd> が有効なファイルディスクリプターでない。"
16308
16309 #. type: Plain text
16310 #: build/C/man2/symlink.2:218
16311 msgid ""
16312 "I<linkpath> is a relative pathname and I<newdirfd> refers to a directory "
16313 "that has been deleted."
16314 msgstr ""
16315 "I<linkpath> が相対パス名で、 I<newdirfd> が削除されたディレクトリを参照してい"
16316 "る。"
16317
16318 #. type: Plain text
16319 #: build/C/man2/symlink.2:224
16320 msgid ""
16321 "I<linkpath> is relative and I<newdirfd> is a file descriptor referring to a "
16322 "file other than a directory."
16323 msgstr ""
16324 "I<linkpath> が相対パスで、 I<newdirfd> がディレクトリ以外のファイルを参照して"
16325 "いるファイルディスクリプターである。"
16326
16327 #. type: Plain text
16328 #: build/C/man2/symlink.2:228
16329 msgid ""
16330 "B<symlinkat>()  was added to Linux in kernel 2.6.16; library support was "
16331 "added to glibc in version 2.4."
16332 msgstr ""
16333 "B<symlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
16334 "ポートはバージョン 2.4 で glibc に追加された。"
16335
16336 #.  SVr4 documents additional error codes EDQUOT and ENOSYS.
16337 #.  See
16338 #.  .BR open (2)
16339 #.  re multiple files with the same name, and NFS.
16340 #. type: Plain text
16341 #: build/C/man2/symlink.2:235
16342 msgid "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
16343 msgstr "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
16344
16345 #. type: Plain text
16346 #: build/C/man2/symlink.2:238
16347 msgid "B<symlinkat>(): POSIX.1-2008."
16348 msgstr "B<symlinkat>(): POSIX.1-2008."
16349
16350 #. type: Plain text
16351 #: build/C/man2/symlink.2:242
16352 msgid "No checking of I<target> is done."
16353 msgstr "I<target> についてのチェックは行なわれない。"
16354
16355 #. type: Plain text
16356 #: build/C/man2/symlink.2:247
16357 msgid ""
16358 "Deleting the name referred to by a symbolic link will actually delete the "
16359 "file (unless it also has other hard links).  If this behavior is not "
16360 "desired, use B<link>(2)."
16361 msgstr ""
16362 "シンボリックリンクによって参照される名前を削除すると (それが他にハードリンク "
16363 "(hard link) を持たなければ) 実際にファイルが削除される。 この動作が望んだもの"
16364 "でない場合は、 B<link>(2)  を使用すること。"
16365
16366 #. type: Plain text
16367 #: build/C/man2/symlink.2:260
16368 msgid ""
16369 "On older kernels where B<symlinkat>()  is unavailable, the glibc wrapper "
16370 "function falls back to the use of B<symlink>(2).  When I<linkpath> is a "
16371 "relative pathname, glibc constructs a pathname based on the symbolic link in "
16372 "I</proc/self/fd> that corresponds to the I<newdirfd> argument."
16373 msgstr ""
16374 "B<symlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
16375 "B<symlink>(2) を使用するモードにフォールバックする。 I<pathname> が相対パスの"
16376 "場合、 glibc は I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリック"
16377 "リンクに基づいてパス名を構成する。"
16378
16379 #. type: Plain text
16380 #: build/C/man2/symlink.2:271
16381 msgid ""
16382 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
16383 "B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
16384 msgstr ""
16385 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
16386 "B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
16387
16388 #. type: TH
16389 #: build/C/man7/symlink.7:37
16390 #, no-wrap
16391 msgid "2014-04-06"
16392 msgstr "2014-04-06"
16393
16394 #. type: Plain text
16395 #: build/C/man7/symlink.7:40
16396 msgid "symlink - symbolic link handling"
16397 msgstr "symlink - シンボリックリンクの取り扱い"
16398
16399 #. type: Plain text
16400 #: build/C/man7/symlink.7:44
16401 msgid ""
16402 "Symbolic links are files that act as pointers to other files.  To understand "
16403 "their behavior, you must first understand how hard links work."
16404 msgstr ""
16405 "シンボリックリンクは他のファイルへのポインターとして振る舞うファイルである。 "
16406 "その挙動を理解するには、まずハードリンクがどのように機能するかを理解しておか"
16407 "なければならない。"
16408
16409 #. type: Plain text
16410 #: build/C/man7/symlink.7:60
16411 msgid ""
16412 "A hard link to a file is indistinguishable from the original file because it "
16413 "is a reference to the object underlying the original filename.  (To be "
16414 "precise: each of the hard links to a file is a reference to the same I<inode "
16415 "number>, where an inode number is an index into the inode table, which "
16416 "contains metadata about all files on a filesystem.  See B<stat>(2).)  "
16417 "Changes to a file are independent of the name used to reference the file.  "
16418 "Hard links may not refer to directories (to prevent the possibility of loops "
16419 "within the filesystem tree, which would confuse many programs)  and may not "
16420 "refer to files on different filesystems (because inode numbers are not "
16421 "unique across filesystems)."
16422 msgstr ""
16423 "あるファイルへのハードリンクは、 元々のファイルと区別することができない。 な"
16424 "ぜなら、 ハードリンクは元々のファイル名の裏にあるオブジェクトへの参照だからで"
16425 "ある。 (より正確には、 あるファイルへのハードリンクはそれぞれ同じ I<inode 番"
16426 "号> への参照である。 inode 番号は inode テーブルへのインデックスで、 inode "
16427 "テーブルはファイルシステム上のすべてのファイルについてのメタデータを保持して"
16428 "いる。 B<stat>(2) 参照。) ファイルへの変更は、ファイルの参照に使用された名前"
16429 "とは独立に行われる。 ハードリンクはディレクトリを参照することはできない (これ"
16430 "はファイルシステムツリー内でループが発生する可能性を防止するためであり、 ルー"
16431 "プが発生すると、 多くのプログラムが混乱してしまうことだろう)。 また、 ハード"
16432 "リンクは異なるファイルシステム上のファイルを参照することもできない (inode 番"
16433 "号はファイルシステムをまたがると一意ではないからである)。"
16434
16435 #. type: Plain text
16436 #: build/C/man7/symlink.7:69
16437 msgid ""
16438 "A symbolic link is a special type of file whose contents are a string that "
16439 "is the pathname of another file, the file to which the link refers.  (The "
16440 "contents of a symbolic link can be read using B<readlink>(2).)  In other "
16441 "words, a symbolic link is a pointer to another name, and not to an "
16442 "underlying object.  For this reason, symbolic links may refer to directories "
16443 "and may cross filesystem boundaries."
16444 msgstr ""
16445 "シンボリックリンクは特別な種類のファイルで、 ファイルの内容はそのリンクの参照"
16446 "先の別のファイルのパス名を示す文字列である (シンボリックリンクの内容は "
16447 "B<readlink>(2) を使って読むことができる)。 言い換えると、 シンボリックリンク"
16448 "は別の名前へのポインターであり、 ファイルの裏にあるオブジェクトへのポインター"
16449 "ではない。 この理由から、 シンボリックリンクではディレクトリへの参照やファイ"
16450 "ルシステム境界を越える参照を行うことができる。"
16451
16452 #. type: Plain text
16453 #: build/C/man7/symlink.7:75
16454 msgid ""
16455 "There is no requirement that the pathname referred to by a symbolic link "
16456 "should exist.  A symbolic link that refers to a pathname that does not exist "
16457 "is said to be a I<dangling link>."
16458 msgstr ""
16459 "シンボリックリンクが参照する先のパス名が存在しないといけないという要件はな"
16460 "い。 存在しないパス名を参照するシンボリックリンクは「壊れた (dangling) リン"
16461 "ク」と呼ばれる。"
16462
16463 #. type: Plain text
16464 #: build/C/man7/symlink.7:87
16465 msgid ""
16466 "Because a symbolic link and its referenced object coexist in the filesystem "
16467 "name space, confusion can arise in distinguishing between the link itself "
16468 "and the referenced object.  On historical systems, commands and system calls "
16469 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
16470 "Rules for a more uniform approach, as they are implemented on Linux and "
16471 "other systems, are outlined here.  It is important that site-local "
16472 "applications also conform to these rules, so that the user interface can be "
16473 "as consistent as possible."
16474 msgstr ""
16475 "シンボリックリンクとその参照先のオブジェクトは一つのファイルシステムの名前空"
16476 "間内に共存するので、 リンクそのものと参照先のオブジェクトの間で混乱が生じる可"
16477 "能性がある。 かなり昔からあるシステムでは、 コマンドやシステムコールはいくら"
16478 "かアドホックな方法の独自のリンクの辿り方の決まり事を採用している。 ここで"
16479 "は、 Linux や他のシステムで実装されている、 もっと広く使われている方法のルー"
16480 "ルについて概要を説明する。 サイト固有のアプリケーションもこれらのルールに準拠"
16481 "し、 可能な限りユーザーインターフェースが一貫したものになるようにすることが重"
16482 "要である。"
16483
16484 #. type: SS
16485 #: build/C/man7/symlink.7:87
16486 #, no-wrap
16487 msgid "Symbolic link ownership, permissions, and timestamps"
16488 msgstr "シンボリックリンクの所有権、アクセス許可、タイムスタンプ"
16489
16490 #. type: Plain text
16491 #: build/C/man7/symlink.7:95
16492 msgid ""
16493 "The owner and group of an existing symbolic link can be changed using "
16494 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
16495 "is when the link is being removed or renamed in a directory that has the "
16496 "sticky bit set (see B<stat>(2))."
16497 msgstr ""
16498 "既存のシンボリックリンクの所有者とグループは B<lchown>(2) を使って変更するこ"
16499 "とができる。 シンボリックリンクの所有権が問題となる場面は、 スティッキービッ"
16500 "ト (B<stat>(2) 参照) がセットされたディレクトリで、 そのリンクの削除や名前の"
16501 "変更を行おうとしている場合だけである。"
16502
16503 #. type: Plain text
16504 #: build/C/man7/symlink.7:101
16505 msgid ""
16506 "The last access and last modification timestamps of a symbolic link can be "
16507 "changed using B<utimensat>(2)  or B<lutimes>(3)."
16508 msgstr ""
16509 "シンボリックリンクの最終アクセス時刻と最終修正時刻は B<utimensat>(2) や "
16510 "B<lutimes>(3) で変更できる。"
16511
16512 #.  Linux does not currently implement an lchmod(2).
16513 #.  The
16514 #.  4.4BSD
16515 #.  system differs from historical
16516 #.  4BSD
16517 #.  systems in that the system call
16518 #.  .BR chown (2)
16519 #.  has been changed to follow symbolic links.
16520 #.  The
16521 #.  .BR lchown (2)
16522 #.  system call was added later when the limitations of the new
16523 #.  .BR chown (2)
16524 #.  became apparent.
16525 #. type: Plain text
16526 #: build/C/man7/symlink.7:120
16527 msgid ""
16528 "On Linux, the permissions of a symbolic link are not used in any operations; "
16529 "the permissions are always 0777 (read, write, and execute for all user "
16530 "categories), and can't be changed."
16531 msgstr ""
16532 "Linux では、シンボリックリンクのアクセス許可 (permission) はどの操作でも使用"
16533 "されない。 アクセス許可は常に 0777 (すべてのユーザーカテゴリーにおいて読み出"
16534 "し、書き込み、実行が可能) で、変更できない。"
16535
16536 #. type: SS
16537 #: build/C/man7/symlink.7:120
16538 #, no-wrap
16539 msgid "Obtaining a file descriptor that refers to a symbolic link"
16540 msgstr "シンボリックリンクを参照するファイルディスクリプターを取得する"
16541
16542 #. type: Plain text
16543 #: build/C/man7/symlink.7:138
16544 msgid ""
16545 "Using the combination of the B<O_PATH> and B<O_NOFOLLOW> flags to "
16546 "B<open>(2)  yields a file descriptor that can be passed as the I<dirfd> "
16547 "argument in system calls such as B<fstatat>(2), B<fchownat>(2), "
16548 "B<fchmodat>(2), B<linkat>(2), and B<readlinkat>(2), in order to operate on "
16549 "the symbolic link itself (rather than the file to which it refers)."
16550 msgstr ""
16551 "B<open>(2) に B<O_PATH> と B<O_NOFOLLOW> の両方のフラグを指定すると、ファイル"
16552 "ディスクリプターが得られる。このファイルディスクリプターは B<fstatat>(2), "
16553 "B<fchownat>(2), B<fchmodat>(2), B<linkat> (2), B<readlinkat>(2) などのシステ"
16554 "ムコールの I<dirfd> 引き数として渡して、 (シンボリックリンクが参照するファイ"
16555 "ルではなく) シンボリックリンク自身に対する操作を行うことができる。"
16556
16557 #. type: Plain text
16558 #: build/C/man7/symlink.7:154
16559 msgid ""
16560 "By default (i.e., if the B<AT_SYMLINK_FOLLOW> flag is not specified), if "
16561 "B<name_to_handle_at>(2)  is applied to a symbolic link, it yields a handle "
16562 "for the symbolic link (rather than the file to which it refers).  One can "
16563 "then obtain a file descriptor for the symbolic link (rather than the file to "
16564 "which it refers)  by specifying the B<O_PATH> flag in a subsequent call to "
16565 "B<open_by_handle_at>(2).  Again, that file descriptor can be used in the "
16566 "aforementioned system calls to operate on the symbolic link itself."
16567 msgstr ""
16568 "デフォルトでは (すなわち B<AT_SYMLINK_FOLLOW> フラグが指定されなかった場"
16569 "合)、 B<name_to_handle_at>(2) がシンボリックリンクに適用された場合、 (シンボ"
16570 "リックリンクが参照するファイルではなく) シンボリックリンクへのハンドルが返さ"
16571 "れる。 それ以降の B<open_by_handle_at>(2) で B<O_PATH> フラグを指定すること"
16572 "で、 (シンボリックリンクが参照するファイルではなく) シンボリックリンクに対す"
16573 "るファイルディスクリプターを得ることができる。 繰り返しになるが、 このファイ"
16574 "ルディスクリプターを上述のシステムコールで使用し、 シンボリックリンク自身に操"
16575 "作を行うことができる。"
16576
16577 #. type: SS
16578 #: build/C/man7/symlink.7:154
16579 #, no-wrap
16580 msgid "Handling of symbolic links by system calls and commands"
16581 msgstr "システムコールやコマンドによるシンボリックリンクの取り扱い"
16582
16583 #. type: Plain text
16584 #: build/C/man7/symlink.7:169
16585 msgid ""
16586 "Symbolic links are handled either by operating on the link itself, or by "
16587 "operating on the object referred to by the link.  In the latter case, an "
16588 "application or system call is said to I<follow> the link.  Symbolic links "
16589 "may refer to other symbolic links, in which case the links are dereferenced "
16590 "until an object that is not a symbolic link is found, a symbolic link that "
16591 "refers to a file which does not exist is found, or a loop is detected.  "
16592 "(Loop detection is done by placing an upper limit on the number of links "
16593 "that may be followed, and an error results if this limit is exceeded.)"
16594 msgstr ""
16595 "シンボリックリンクは、 リンク自身に対する操作か、 リンクが参照するオブジェク"
16596 "トに対する操作のいずれかとして扱われる。 後者の場合、 アプリケーションやシス"
16597 "テムコールはリンクをI<辿る (follow)>と呼ばれる。 シンボリックリンクは他のシン"
16598 "ボリックリンクを参照することもできる。 この場合、 シンボリックリンクでないオ"
16599 "ブジェクトが見つかるか、 存在しないファイルを参照するシンボリックリンクが見つ"
16600 "かるか、 ループが検出されるまで、 リンクの展開が行われる。 (ループの検出は辿"
16601 "ることができるリンクの数に上限を設けることで行われる。 この上限を超過した場合"
16602 "はエラーとなる。)"
16603
16604 #. type: Plain text
16605 #: build/C/man7/symlink.7:172
16606 msgid ""
16607 "There are three separate areas that need to be discussed.  They are as "
16608 "follows:"
16609 msgstr "3 つの領域に分けて議論する必要がある。以下の 3 つである。"
16610
16611 #. type: IP
16612 #: build/C/man7/symlink.7:172
16613 #, no-wrap
16614 msgid "1."
16615 msgstr "1."
16616
16617 #. type: Plain text
16618 #: build/C/man7/symlink.7:174
16619 msgid "Symbolic links used as filename arguments for system calls."
16620 msgstr ""
16621 "システムコールのファイル名引き数としてシンボリックリンクが使用される場合。"
16622
16623 #. type: IP
16624 #: build/C/man7/symlink.7:174
16625 #, no-wrap
16626 msgid "2."
16627 msgstr "2."
16628
16629 #. type: Plain text
16630 #: build/C/man7/symlink.7:177
16631 msgid ""
16632 "Symbolic links specified as command-line arguments to utilities that are not "
16633 "traversing a file tree."
16634 msgstr ""
16635 "ファイルツリーを辿っていないユーティリティーのコマンドライン引き数としてシン"
16636 "ボリックリンクが指定される場合。"
16637
16638 #. type: IP
16639 #: build/C/man7/symlink.7:177
16640 #, no-wrap
16641 msgid "3."
16642 msgstr "3."
16643
16644 #. type: Plain text
16645 #: build/C/man7/symlink.7:181
16646 msgid ""
16647 "Symbolic links encountered by utilities that are traversing a file tree "
16648 "(either specified on the command line or encountered as part of the file "
16649 "hierarchy walk)."
16650 msgstr ""
16651 "ファイルツリーを辿っているユーティリティーがシンボリックリンクを見つけた場合 "
16652 "(コマンドラインで指定される場合もあれば、 ファイル階層を辿っている途中で遭遇"
16653 "する場合もある)。"
16654
16655 #. type: SS
16656 #: build/C/man7/symlink.7:181
16657 #, no-wrap
16658 msgid "System calls"
16659 msgstr "システムコール"
16660
16661 #. type: Plain text
16662 #: build/C/man7/symlink.7:184
16663 msgid ""
16664 "The first area is symbolic links used as filename arguments for system calls."
16665 msgstr ""
16666 "最初の領域は、システムコールのファイル名引き数としてシンボリックリンクが使用"
16667 "される場合である。"
16668
16669 #. type: Plain text
16670 #: build/C/man7/symlink.7:194
16671 msgid ""
16672 "Except as noted below, all system calls follow symbolic links.  For example, "
16673 "if there were a symbolic link I<slink> which pointed to a file named "
16674 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
16675 "descriptor referring to the file I<afile>."
16676 msgstr ""
16677 "以下に述べる場合を除くと、 すべてのシステムコールはシンボリックリンクを辿"
16678 "る。 例えば、 I<afile> という名前のファイルを指しているシンボリックリンク "
16679 "I<slink> があったとすると、 システムコール I<open(\"slink\" ...\\&)> はファイ"
16680 "ル I<afile> を参照するファイルディスクリプターを返す。"
16681
16682 #. type: Plain text
16683 #: build/C/man7/symlink.7:209
16684 msgid ""
16685 "Various system calls do not follow links, and operate on the symbolic link "
16686 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
16687 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), "
16688 "B<rename>(2), B<rmdir>(2), and B<unlink>(2)."
16689 msgstr ""
16690 "リンクを辿らず、シンボリックリンク自身に対して操作を行うシステムコールもあ"
16691 "る。 このようなシステムコールとしては、 B<lchown>(2), B<lgetxattr>(2), "
16692 "B<llistxattr>(2), B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), "
16693 "B<readlink>(2), B<rename>(2), B<rmdir>(2), B<unlink>(2) がある。"
16694
16695 #.  Maybe one day: .BR fchownat (2)
16696 #. type: Plain text
16697 #: build/C/man7/symlink.7:233
16698 msgid ""
16699 "Certain other system calls optionally follow symbolic links.  They are: "
16700 "B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), B<linkat>(2), "
16701 "B<name_to_handle_at>(2), B<open>(2), B<openat>(2), B<open_by_handle_at>(2), "
16702 "and B<utimensat>(2); see their manual pages for details.  Because "
16703 "B<remove>(3)  is an alias for B<unlink>(2), that library function also does "
16704 "not follow symbolic links.  When B<rmdir>(2)  is applied to a symbolic link, "
16705 "it fails with the error B<ENOTDIR>."
16706 msgstr ""
16707 "他のいくつかのシステムコールは、指定された場合にのみシンボリックリンクを辿"
16708 "る。 これらのシステムコールとしては、 B<faccessat>(2), B<fchownat>(2), "
16709 "B<fstatat>(2), B<linkat>(2), B<name_to_handle_at>(2), B<open>(2), "
16710 "B<openat>(2), B<open_by_handle_at>(2), B<utimensat>(2) がある。 詳細はそれぞ"
16711 "れのマニュアルページを参照してほしい。 B<remove>(3) は B<unlink>(2) の別名な"
16712 "ので、 このライブラリ関数もシンボリックリンクを辿らない。 B<rmdir>(2) がシン"
16713 "ボリックリンクに対して行われた場合、その呼び出しはエラー B<ENOTDIR> で失敗す"
16714 "る。"
16715
16716 #. type: Plain text
16717 #: build/C/man7/symlink.7:248
16718 msgid ""
16719 "The B<link>(2)  warrants special discussion.  POSIX.1-2001 specifies that "
16720 "B<link>(2)  should dereference I<oldpath> if it is a symbolic link.  "
16721 "However, Linux does not do this.  (By default Solaris is the same, but the "
16722 "POSIX.1-2001 specified behavior can be obtained with suitable compiler "
16723 "options.)  The upcoming POSIX.1 revision changes the specification to allow "
16724 "either behavior in an implementation."
16725 msgstr ""
16726 "B<link>(2) については特別に議論が必要である。 POSIX.1-2001 では B<link>(2) "
16727 "は I<oldpath> がシンボリックリンクであればこれを展開するように規定している。 "
16728 "しかしながら、 Linux はシンボリックリンクを展開しない。 (デフォルトでは "
16729 "Solaris も同じだが、 適切なコンパイラーオプションを指定することで "
16730 "POSIX.1-2001 で規定された動作をさせることができる。) 今後のバージョンの "
16731 "POSIX.1 では、どちらの動作の実装も認められるように規定が変更される。"
16732
16733 #. type: SS
16734 #: build/C/man7/symlink.7:248
16735 #, no-wrap
16736 msgid "Commands not traversing a file tree"
16737 msgstr "ファイルツリーを辿らないコマンド"
16738
16739 #. type: Plain text
16740 #: build/C/man7/symlink.7:251
16741 msgid ""
16742 "The second area is symbolic links, specified as command-line filename "
16743 "arguments, to commands which are not traversing a file tree."
16744 msgstr ""
16745 "二つ目の領域は、 ファイルツリーを辿らないコマンドの、 コマンドライン引き数の"
16746 "ファイル名としてシンボリックリンクが指定される場合である。"
16747
16748 #. type: Plain text
16749 #: build/C/man7/symlink.7:262
16750 msgid ""
16751 "Except as noted below, commands follow symbolic links named as command-line "
16752 "arguments.  For example, if there were a symbolic link I<slink> which "
16753 "pointed to a file named I<afile>, the command I<cat slink> would display the "
16754 "contents of the file I<afile>."
16755 msgstr ""
16756 "以下に述べる場合を除くと、 コマンドはコマンドライン引き数で指定された名前のシ"
16757 "ンボリックリンクを辿る。 例えば、 I<afile> という名前のファイルを指しているシ"
16758 "ンボリックリンク I<slink> があったとすると、 コマンド I<cat slink> は "
16759 "I<afile> の内容を表示することになる。"
16760
16761 #. type: Plain text
16762 #: build/C/man7/symlink.7:270
16763 msgid ""
16764 "It is important to realize that this rule includes commands which may "
16765 "optionally traverse file trees; for example, the command I<chown file> is "
16766 "included in this rule, while the command I<chown\\ -R file>, which performs "
16767 "a tree traversal, is not.  (The latter is described in the third area, "
16768 "below.)"
16769 msgstr ""
16770 "大事な点として意識しておくべきなのは、 このルールが適用されるコマンドの中に"
16771 "は、 オプション次第ではファイルツリーを辿る場合があるコマンドもあるということ"
16772 "である。  例えば、 コマンド I<chown file> はこのルールに含まれるが、 コマン"
16773 "ド I<chown\\ -R file> はツリーを辿る動作をするのであてはまらない (後者の場合"
16774 "は、3 つ目の領域に該当する)。"
16775
16776 #. type: Plain text
16777 #: build/C/man7/symlink.7:288
16778 msgid ""
16779 "If it is explicitly intended that the command operate on the symbolic link "
16780 "instead of following the symbolic link\\(emfor example, it is desired that "
16781 "I<chown slink> change the ownership of the file that I<slink> is, whether it "
16782 "is a symbolic link or not\\(emthe I<-h> option should be used.  In the above "
16783 "example, I<chown root slink> would change the ownership of the file referred "
16784 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
16785 "I<slink> itself."
16786 msgstr ""
16787 "シンボリックリンクを辿るのではなく、 コマンドがシンボリックリンク自身に対して"
16788 "操作を行うことを明示的に指示したい場合、 例えば、 I<chown slink> で I<slink> "
16789 "がシンボリックリンクかどうかに関わらず、 I<slink> のファイル自身の所有権を変"
16790 "更したい場合は、 I<-h> オプションを使用すべきである。 上記の例では、 I<chown "
16791 "root slink> は I<slink> が参照するファイルの所有権を変更するが、 I<chown\\ -"
16792 "h root slink> は I<slink> 自身の所有権を変更する。"
16793
16794 #. type: Plain text
16795 #: build/C/man7/symlink.7:290
16796 msgid "There are some exceptions to this rule:"
16797 msgstr "このルールにはいくつかの例外がある。"
16798
16799 #. type: Plain text
16800 #: build/C/man7/symlink.7:300
16801 msgid ""
16802 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
16803 "arguments, but respectively attempt to rename and delete them.  (Note, if "
16804 "the symbolic link references a file via a relative path, moving it to "
16805 "another directory may very well cause it to stop working, since the path may "
16806 "no longer be correct.)"
16807 msgstr ""
16808 "コマンド B<mv>(1) と B<rm>(1) は引き数で指定された名前のシンボリックリンクを"
16809 "辿らないが、 それぞれシンボリックリンク自身の名前変更と削除を行おうとする。 "
16810 "(シンボリックリンクが相対パスでファイルを参照している場合、 そのシンボリック"
16811 "リンクを別のディレクトリに移動すると、動かなくなることが非常によくある。 移動"
16812 "の結果、 パスが正しくないものになってしまうからである。)"
16813
16814 #. type: Plain text
16815 #: build/C/man7/symlink.7:330
16816 msgid ""
16817 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
16818 "with historic systems (when B<ls>(1)  is not doing a tree walk\\(emthat is, "
16819 "I<-R> option is not specified), the B<ls>(1)  command follows symbolic links "
16820 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
16821 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
16822 "the only command where the I<-H> and I<-L> options affect its behavior even "
16823 "though it is not doing a walk of a file tree.)"
16824 msgstr ""
16825 "B<ls>(1) コマンドもこのルールの例外である。 昔からあるシステムとの互換性のた"
16826 "め (B<ls>(1) がツリーを辿らない場合、つまり I<-R> オプションが指定されなかっ"
16827 "た場合)、 B<ls>(1) コマンドはオプション I<-H> か I<-L> が指定された場合、もし"
16828 "くはオプション I<-F>, I<-d>, I<-l> が指定されなかった場合、 引き数として指定"
16829 "されたシンボリックリンクを辿る。 (B<ls>(1) コマンドは、 ファイルツリーを辿ら"
16830 "ない場合であっても、 オプション I<-H> と I<-L> がその動作に影響を与える唯一の"
16831 "コマンドである。)"
16832
16833 #. The 4.4BSD system differs from historical 4BSD systems in that the
16834 #. .BR chown (1)
16835 #. and
16836 #. .BR chgrp (1)
16837 #. commands follow symbolic links specified on the command line.
16838 #. type: Plain text
16839 #: build/C/man7/symlink.7:348
16840 msgid ""
16841 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
16842 "command does not follow symbolic links named as argument by default.  The "
16843 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
16844 "L> option is specified."
16845 msgstr ""
16846 "B<file>(1) コマンドもこのルールの例外である。 B<file>(1) コマンドは、 デフォ"
16847 "ルトでは引き数で指定されたシンボリックリンクを辿らない。 B<file>(1) コマンド"
16848 "は、 I<-L> オプションが指定された場合、 引き数で指定されたシンボリックリンク"
16849 "を辿る。"
16850
16851 #. type: SS
16852 #: build/C/man7/symlink.7:348
16853 #, no-wrap
16854 msgid "Commands traversing a file tree"
16855 msgstr "ファイルツリーを辿るコマンド"
16856
16857 #. type: Plain text
16858 #: build/C/man7/symlink.7:361
16859 msgid ""
16860 "The following commands either optionally or always traverse file trees: "
16861 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), "
16862 "B<ls>(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
16863 msgstr ""
16864 "次のコマンドは指定された場合もしくは常にファイルツリーを辿る: B<chgrp>(1), "
16865 "B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>(1), "
16866 "B<pax>(1), B<rm>(1), B<tar>(1)。"
16867
16868 #. type: Plain text
16869 #: build/C/man7/symlink.7:365
16870 msgid ""
16871 "It is important to realize that the following rules apply equally to "
16872 "symbolic links encountered during the file tree traversal and symbolic links "
16873 "listed as command-line arguments."
16874 msgstr ""
16875 "重要なのは、 ファイルツリーを辿っている際に見つかったシンボリックリンクに"
16876 "も、 コマンドライン引き数として渡されたシンボリックリンクにも、 以下のルール"
16877 "が等しく適用される点である。"
16878
16879 #. type: Plain text
16880 #: build/C/man7/symlink.7:370
16881 msgid ""
16882 "The I<first rule> applies to symbolic links that reference files other than "
16883 "directories.  Operations that apply to symbolic links are performed on the "
16884 "links themselves, but otherwise the links are ignored."
16885 msgstr ""
16886 "「1 つ目のルール」は、 ディレクトリ以外のファイルを参照するシンボリックリンク"
16887 "に適用される。 シンボリックリンクに適用される操作はシンボリックリンク自身に行"
16888 "われるが、 そうでない場合はリンクは無視される。"
16889
16890 #. type: Plain text
16891 #: build/C/man7/symlink.7:382
16892 msgid ""
16893 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
16894 "symbolic links encountered in the tree traversal of I<directory>, because "
16895 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
16896 "referred to by I<slink>."
16897 msgstr ""
16898 "コマンド I<rm\\ -r slink directory> は I<slink> を削除するとともに、 ファイル"
16899 "ツリーを辿る途中で見つけたシンボリックリンクも削除する。 シンボリックリンクは"
16900 "削除できるからである。 B<rm>(1) が I<slink> が参照するファイルに影響をおよぼ"
16901 "すことはない。"
16902
16903 #. type: Plain text
16904 #: build/C/man7/symlink.7:387
16905 msgid ""
16906 "The I<second rule> applies to symbolic links that refer to directories.  "
16907 "Symbolic links that refer to directories are never followed by default.  "
16908 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
16909 "\" walk (where symbolic links the refer to directories are followed)."
16910 msgstr ""
16911 "「2 つ目のルール」は、 ディレクトリを参照するシンボリックリンクに適用され"
16912 "る。 デフォルトでは、 ディレクトリを参照するシンボリックリンクを辿らない。 こ"
16913 "の動作はしばしば「物理的な」ツリー探索 (\"physical\" walk) と呼ばれる。 これ"
16914 "に対して (ディレクトリを参照するシンボリックリンクを辿る場合は) 「論理的な」"
16915 "ツリー探索 (\"logical\" walk) と呼ばれる。"
16916
16917 #. type: Plain text
16918 #: build/C/man7/symlink.7:390
16919 msgid ""
16920 "Certain conventions are (should be) followed as consistently as possible by "
16921 "commands that perform file tree walks:"
16922 msgstr ""
16923 "一貫性を持たせるため、ファイルツリーを辿るコマンドが可能な限り従っている慣習"
16924 "がいくつかある。"
16925
16926 #. type: Plain text
16927 #: build/C/man7/symlink.7:403
16928 msgid ""
16929 "A command can be made to follow any symbolic links named on the command "
16930 "line, regardless of the type of file they reference, by specifying the I<-H> "
16931 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
16932 "name space look like the logical name space.  (Note, for commands that do "
16933 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
16934 "R> flag is not also specified.)"
16935 msgstr ""
16936 "I<-H> (\"half-logical\") フラグを指定すると、 参照先のファイル種別に関わら"
16937 "ず、 コマンドにコマンドラインで指定されたシンボリックリンクを辿らせることがで"
16938 "きる。 このフラグは、 コマンドラインの名前空間を論理的な名前空間のように見せ"
16939 "るためのものである。 (常にファイルツリーを辿るわけではないコマンドでは、 I<-"
16940 "R> フラグを一緒に指定しない限り、 I<-H> フラグは無視される点に注意。)"
16941
16942 #. type: Plain text
16943 #: build/C/man7/symlink.7:419
16944 msgid ""
16945 "For example, the command I<chown\\ -HR user slink> will traverse the file "
16946 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
16947 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
16948 "symbolic links specified on the command line to be dereferenced for the "
16949 "purposes of both the action to be performed and the tree walk, and it is as "
16950 "if the user had specified the name of the file to which the symbolic link "
16951 "pointed."
16952 msgstr ""
16953 "例えば、 コマンド I<chown\\ -HR user slink> は I<slink> が指すファイルを頂点"
16954 "とするファイル階層を辿る。 I<-H> は上記で説明した I<-h> フラグとは同じではな"
16955 "いことに注意。 I<-H> フラグを指定すると、 アクションを実行する場合でも、 ツ"
16956 "リーを辿る場合でも、 コマンドラインで指定されたシンボリックリンクの解決 "
16957 "(dereference) を行う。 ユーザーがシンボリックリンクが指すファイル名を指定した"
16958 "のと同じように見える。"
16959
16960 #. type: Plain text
16961 #: build/C/man7/symlink.7:433
16962 msgid ""
16963 "A command can be made to follow any symbolic links named on the command "
16964 "line, as well as any symbolic links encountered during the traversal, "
16965 "regardless of the type of file they reference, by specifying the I<-L> (for "
16966 "\"logical\") flag.  This flag is intended to make the entire name space look "
16967 "like the logical name space.  (Note, for commands that do not always do file "
16968 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
16969 "also specified.)"
16970 msgstr ""
16971 "I<-L> (\"logical\") フラグを指定すると、 参照先のファイル種別に関わらず、 コ"
16972 "マンドが、 コマンドラインで指定された名前のシンボリックリンクも、 ファイルツ"
16973 "リーを辿る際に見つけたシンボリックリンクも辿るようになる。 このフラグは、 名"
16974 "前空間全体を論理的な名前空間のように見せるためのものである。 (常にファイルツ"
16975 "リーを辿るわけではないコマンドでは、 I<-R> フラグを一緒に指定しない限り、 I<-"
16976 "L> フラグは無視される点に注意。)"
16977
16978 #. type: Plain text
16979 #: build/C/man7/symlink.7:448
16980 msgid ""
16981 "For example, the command I<chown\\ -LR user slink> will change the owner of "
16982 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
16983 "B<chown> will traverse the file hierarchy rooted in the directory that it "
16984 "references.  In addition, if any symbolic links are encountered in any file "
16985 "tree that B<chown> traverses, they will be treated in the same fashion as "
16986 "I<slink>."
16987 msgstr ""
16988 "例えば、 コマンド I<chown\\ -LR user slink> は I<slink> が参照するファイルの"
16989 "所有者を変更する。\n"
16990 "I<slink> がディレクトリを参照する場合、 B<chown> はそのシンボリックリンクが参"
16991 "照するディレクトリを頂点とするファイル階層を辿る。 また、 B<chown> が辿るファ"
16992 "イルツリー内でシンボリックリンクが見つかった場合、 I<slink> と同じように処理"
16993 "される。"
16994
16995 #. type: Plain text
16996 #: build/C/man7/symlink.7:455
16997 msgid ""
16998 "A command can be made to provide the default behavior by specifying the I<-"
16999 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
17000 "space look like the physical name space."
17001 msgstr ""
17002 "I<-P> (\"physical\") フラグを指定すると、 コマンドはデフォルトの動作をするよ"
17003 "うになる。 このフラグは名前空間全体を物理的な名前空間のように見せるためのもの"
17004 "である。"
17005
17006 #. type: Plain text
17007 #: build/C/man7/symlink.7:473
17008 msgid ""
17009 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
17010 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
17011 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
17012 "once; the last one specified determines the command's behavior.  This is "
17013 "intended to permit you to alias commands to behave one way or the other, and "
17014 "then override that behavior on the command line."
17015 msgstr ""
17016 "デフォルトでファイルツリーを辿らないコマンドでは、 I<-R> フラグが同時に指定さ"
17017 "れなかった場合、 フラグ I<-H>, I<-L>, I<-P> は無視される。 また、 I<-H>, I<-"
17018 "L>, I<-P> は複数回同時に指定できるが、 最後に指定されたオプションでコマンドの"
17019 "動作が決定される。 この動作は、 コマンドのエイリアスにある動作を指定しておい"
17020 "て、 コマンドラインでその動作を上書きできるようにするためである。"
17021
17022 #. type: Plain text
17023 #: build/C/man7/symlink.7:479
17024 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
17025 msgstr ""
17026 "コマンド B<ls>(1) と B<rm>(1) には、 これらのルールに対する例外がある。"
17027
17028 #. type: Plain text
17029 #: build/C/man7/symlink.7:492
17030 msgid ""
17031 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
17032 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
17033 "command does not support the I<-H>, I<-L>, or I<-P> options."
17034 msgstr ""
17035 "B<rm>(1) コマンドは、 参照先のファイルではなく、シンボリックリンクに対して操"
17036 "作を行う。 したがって、 シンボリックリンクを辿ることはない。 B<rm>(1) コマン"
17037 "ドはオプション I<-H>, I<-L>, I<-P> をサポートしていない。"
17038
17039 #. type: Plain text
17040 #: build/C/man7/symlink.7:512
17041 msgid ""
17042 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
17043 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
17044 "options, B<ls>(1)  will follow symbolic links specified on the command "
17045 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
17046 "regardless of their type, whether specified on the command line or "
17047 "encountered in the tree walk."
17048 msgstr ""
17049 "古いシステムとの互換性を持たせるため、 B<ls>(1) コマンドは少し違った動作をす"
17050 "る。 オプション I<-F>, I<-d>, I<-l> を指定した場合、 B<ls>(1) はコマンドライ"
17051 "ンで指定されたシンボリックリンクを辿る。 I<-L> フラグが指定された場合、 コマ"
17052 "ンドラインで指定された場合でも、 ファイルツリーを辿る際に見つかった場合で"
17053 "も、 ファイル種別に関わらず、 B<ls>(1) はすべてのシンボリックリンクを辿る。"
17054
17055 #. type: Plain text
17056 #: build/C/man7/symlink.7:530
17057 msgid ""
17058 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), "
17059 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), "
17060 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
17061 "B<path_resolution>(7)"
17062 msgstr ""
17063 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
17064 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
17065 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
17066 "B<lutimes>(3), B<path_resolution>(7)"
17067
17068 #. type: TH
17069 #: build/C/man3/tempnam.3:25
17070 #, no-wrap
17071 msgid "TEMPNAM"
17072 msgstr "TEMPNAM"
17073
17074 #. type: TH
17075 #: build/C/man3/tempnam.3:25 build/C/man3/tmpnam.3:27
17076 #, no-wrap
17077 msgid "2014-02-27"
17078 msgstr "2014-02-27"
17079
17080 #. type: Plain text
17081 #: build/C/man3/tempnam.3:28
17082 msgid "tempnam - create a name for a temporary file"
17083 msgstr "tempnam - テンポラリファイルの名前を作成する"
17084
17085 #. type: Plain text
17086 #: build/C/man3/tempnam.3:33
17087 #, no-wrap
17088 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
17089 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
17090
17091 #. type: Plain text
17092 #: build/C/man3/tempnam.3:42
17093 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
17094 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
17095
17096 #. type: Plain text
17097 #: build/C/man3/tempnam.3:49
17098 msgid ""
17099 "I<Never use this function.> Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
17100 msgstr ""
17101 "I<決してこの関数を使用しないこと。> 代わりに B<mkstemp>(3)  か B<tmpfile>(3) "
17102 "を使うこと。"
17103
17104 #. type: Plain text
17105 #: build/C/man3/tempnam.3:63
17106 msgid ""
17107 "The B<tempnam>()  function returns a pointer to a string that is a valid "
17108 "filename, and such that a file with this name did not exist when "
17109 "B<tempnam>()  checked.  The filename suffix of the pathname generated will "
17110 "start with I<pfx> in case I<pfx> is a non-NULL string of at most five "
17111 "bytes.  The directory prefix part of the pathname generated is required to "
17112 "be \"appropriate\" (often that at least implies writable)."
17113 msgstr ""
17114 "B<tempnam>()  関数はファイル名として正しい文字列へのポインターを返す。 この"
17115 "ファイル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在し"
17116 "ない (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成"
17117 "されるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成され"
17118 "るディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」であ"
17119 "るためにはまず少なくとも 書き込み可能でなければならない)。"
17120
17121 #. type: Plain text
17122 #: build/C/man3/tempnam.3:66
17123 msgid ""
17124 "Attempts to find an appropriate directory go through the following steps:"
17125 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
17126
17127 #. type: TP
17128 #: build/C/man3/tempnam.3:66
17129 #, no-wrap
17130 msgid "a)"
17131 msgstr "a)"
17132
17133 #. type: Plain text
17134 #: build/C/man3/tempnam.3:72
17135 msgid ""
17136 "In case the environment variable B<TMPDIR> exists and contains the name of "
17137 "an appropriate directory, that is used."
17138 msgstr ""
17139 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
17140 "ら、それを用いる。"
17141
17142 #. type: TP
17143 #: build/C/man3/tempnam.3:72
17144 #, no-wrap
17145 msgid "b)"
17146 msgstr "b)"
17147
17148 #. type: Plain text
17149 #: build/C/man3/tempnam.3:77
17150 msgid ""
17151 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
17152 msgstr ""
17153 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
17154 "る。"
17155
17156 #. type: TP
17157 #: build/C/man3/tempnam.3:77
17158 #, no-wrap
17159 msgid "c)"
17160 msgstr "c)"
17161
17162 #. type: Plain text
17163 #: build/C/man3/tempnam.3:84
17164 msgid ""
17165 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
17166 "appropriate."
17167 msgstr ""
17168 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
17169 "なら、それを用いる。"
17170
17171 #. type: TP
17172 #: build/C/man3/tempnam.3:84
17173 #, no-wrap
17174 msgid "d)"
17175 msgstr "d)"
17176
17177 #. type: Plain text
17178 #: build/C/man3/tempnam.3:87
17179 msgid "Finally an implementation-defined directory may be used."
17180 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
17181
17182 #. type: Plain text
17183 #: build/C/man3/tempnam.3:94
17184 msgid ""
17185 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
17186 "hence should be freed by B<free>(3)."
17187 msgstr ""
17188 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
17189 "B<free>(3)  で解放すべきである。"
17190
17191 #. type: Plain text
17192 #: build/C/man3/tempnam.3:101
17193 msgid ""
17194 "On success, the B<tempnam>()  function returns a pointer to a unique "
17195 "temporary filename.  It returns NULL if a unique name cannot be generated, "
17196 "with I<errno> set to indicate the cause of the error."
17197 msgstr ""
17198 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインターを返"
17199 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
17200 "値を設定する。"
17201
17202 #. type: Plain text
17203 #: build/C/man3/tempnam.3:105
17204 msgid "Allocation of storage failed."
17205 msgstr "保存領域の割り当てに失敗した。"
17206
17207 #. type: Plain text
17208 #: build/C/man3/tempnam.3:110
17209 msgid ""
17210 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
17211 msgstr ""
17212 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
17213 "る。"
17214
17215 #. type: Plain text
17216 #: build/C/man3/tempnam.3:129
17217 msgid ""
17218 "Although B<tempnam>()  generates names that are difficult to guess, it is "
17219 "nevertheless possible that between the time that B<tempnam>()  returns a "
17220 "pathname, and the time that the program opens it, another program might "
17221 "create that pathname using B<open>(2), or create it as a symbolic link.  "
17222 "This can lead to security holes.  To avoid such possibilities, use the "
17223 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
17224 "B<mkstemp>(3)  or B<tmpfile>(3)."
17225 msgstr ""
17226 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 "
17227 "B<tempnam>()  がパス名を返してから、プログラムがそのファイルをオープンする ま"
17228 "での間に、別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、"
17229 "シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつ"
17230 "ながる可能性がある。 そのような可能性を回避するためには、 B<open>(2)  の "
17231 "B<O_EXCL> フラグを使ってパス名をオープンすればよい。 もっといいのは、 "
17232 "B<mkstemp>(3)  や B<tmpfile>(3)  を使うことである。"
17233
17234 #. type: Plain text
17235 #: build/C/man3/tempnam.3:137
17236 msgid ""
17237 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
17238 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
17239 "tmp> (and this is what glibc does)."
17240 msgstr ""
17241 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
17242 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
17243 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
17244
17245 #. type: Plain text
17246 #: build/C/man3/tempnam.3:142
17247 msgid ""
17248 "Because it dynamically allocates memory used to return the pathname, "
17249 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
17250 msgstr ""
17251 "パス名を返すのに使用するメモリーを動的に確保するので、 B<tmpnam>(3)  と違"
17252 "い、 B<tempnam>()  はリエントラントであり、スレッドセーフである。"
17253
17254 #. type: Plain text
17255 #: build/C/man3/tempnam.3:155
17256 msgid ""
17257 "The B<tempnam>()  function generates a different string each time it is "
17258 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
17259 "called more than B<TMP_MAX> times, the behavior is implementation defined."
17260 msgstr ""
17261 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
17262 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
17263 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
17264
17265 #. type: Plain text
17266 #: build/C/man3/tempnam.3:159
17267 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
17268 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
17269
17270 #. type: Plain text
17271 #: build/C/man3/tempnam.3:165
17272 msgid ""
17273 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
17274 "upon failure to find a unique name."
17275 msgstr ""
17276 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
17277 "ラー B<EEXIST> で失敗する。"
17278
17279 #. type: Plain text
17280 #: build/C/man3/tempnam.3:168
17281 msgid ""
17282 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
17283 "accessibility of a directory is determined."
17284 msgstr ""
17285 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
17286 "度のアクセス権限が必要なのかは指定されていない。"
17287
17288 #. type: Plain text
17289 #: build/C/man3/tempnam.3:173
17290 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
17291 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
17292
17293 #. type: TH
17294 #: build/C/man3/tmpfile.3:31
17295 #, no-wrap
17296 msgid "TMPFILE"
17297 msgstr "TMPFILE"
17298
17299 #. type: Plain text
17300 #: build/C/man3/tmpfile.3:34
17301 msgid "tmpfile - create a temporary file"
17302 msgstr "tmpfile - テンポラリファイルを作成する"
17303
17304 #. type: Plain text
17305 #: build/C/man3/tmpfile.3:39
17306 #, no-wrap
17307 msgid "B<FILE *tmpfile(void);>\n"
17308 msgstr "B<FILE *tmpfile(void);>\n"
17309
17310 #. type: Plain text
17311 #: build/C/man3/tmpfile.3:47
17312 msgid ""
17313 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
17314 "write (w+b) mode.  The file will be automatically deleted when it is closed "
17315 "or the program terminates."
17316 msgstr ""
17317 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
17318 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
17319 "自動的に削除される。"
17320
17321 #. type: Plain text
17322 #: build/C/man3/tmpfile.3:56
17323 msgid ""
17324 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
17325 "filename cannot be generated or the unique file cannot be opened.  In the "
17326 "latter case, I<errno> is set to indicate the error."
17327 msgstr ""
17328 "B<tmpfile>()  関数はファイルポインターを返すか、 ユニークなファイルが作れな"
17329 "かったかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
17330 "I<errno> を設定する。"
17331
17332 #. type: Plain text
17333 #: build/C/man3/tmpfile.3:60
17334 msgid "Search permission denied for directory in file's path prefix."
17335 msgstr ""
17336 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
17337
17338 #. type: Plain text
17339 #: build/C/man3/tmpfile.3:63
17340 msgid "Unable to generate a unique filename."
17341 msgstr "ユニークなファイル名が作成できなかった。"
17342
17343 #. type: Plain text
17344 #: build/C/man3/tmpfile.3:66
17345 msgid "The call was interrupted by a signal."
17346 msgstr "呼び出しがシグナルによって中断された。"
17347
17348 #. type: Plain text
17349 #: build/C/man3/tmpfile.3:69
17350 msgid "Too many file descriptors in use by the process."
17351 msgstr "1 つのプロセスで使用可能なファイルディスクリプター数を超過した。"
17352
17353 #. type: Plain text
17354 #: build/C/man3/tmpfile.3:72
17355 msgid "Too many files open in the system."
17356 msgstr "システム全体でオープン可能なファイル数を超過した。"
17357
17358 #. type: Plain text
17359 #: build/C/man3/tmpfile.3:75
17360 msgid "There was no room in the directory to add the new filename."
17361 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
17362
17363 #. type: Plain text
17364 #: build/C/man3/tmpfile.3:78
17365 msgid "Read-only filesystem."
17366 msgstr "読みだし専用ファイルシステムである。"
17367
17368 #. type: Plain text
17369 #: build/C/man3/tmpfile.3:80
17370 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
17371 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
17372
17373 #. type: Plain text
17374 #: build/C/man3/tmpfile.3:86
17375 msgid ""
17376 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
17377 "stream cannot be opened."
17378 msgstr ""
17379 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
17380 "メッセージが書き出される、と規定されている。"
17381
17382 #. type: Plain text
17383 #: build/C/man3/tmpfile.3:97
17384 msgid ""
17385 "The standard does not specify the directory that B<tmpfile>()  will use.  "
17386 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
17387 "and if that fails the directory I</tmp>."
17388 msgstr ""
17389 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
17390 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
17391 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
17392
17393 #. type: Plain text
17394 #: build/C/man3/tmpfile.3:103
17395 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
17396 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
17397
17398 #. type: TH
17399 #: build/C/man3/tmpnam.3:27
17400 #, no-wrap
17401 msgid "TMPNAM"
17402 msgstr "TMPNAM"
17403
17404 #. type: Plain text
17405 #: build/C/man3/tmpnam.3:30
17406 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
17407 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
17408
17409 #. type: Plain text
17410 #: build/C/man3/tmpnam.3:35
17411 #, no-wrap
17412 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
17413 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
17414
17415 #. type: Plain text
17416 #: build/C/man3/tmpnam.3:45
17417 msgid ""
17418 "B<Note:> Avoid use of B<tmpnam>(); use B<mkstemp>(3)  or B<tmpfile>(3)  "
17419 "instead."
17420 msgstr ""
17421 "B<注意:> B<tmpnam>() の使用は避けること。代わりに B<mkstemp>(3) か "
17422 "B<tmpfile>(3) を使うこと。"
17423
17424 #. type: Plain text
17425 #: build/C/man3/tmpnam.3:67
17426 msgid ""
17427 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
17428 "filename, and such that a file with this name did not exist at some point in "
17429 "time, so that naive programmers may think it a suitable name for a temporary "
17430 "file.  If the argument I<s> is NULL, this name is generated in an internal "
17431 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
17432 "I<s> is not NULL, the name is copied to the character array (of length at "
17433 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
17434 "case of success."
17435 msgstr ""
17436 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインターを返す。 ある時点"
17437 "では同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログ"
17438 "ラマはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
17439 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファーに作成され、 次"
17440 "に B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなけれ"
17441 "ば、ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列に"
17442 "コピーされ、 成功した場合は I<s> が返される。"
17443
17444 #. type: Plain text
17445 #: build/C/man3/tmpnam.3:79
17446 msgid ""
17447 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
17448 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
17449 "the B<TMP_MAX> mentioned below.)"
17450 msgstr ""
17451 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
17452 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
17453 "hE<gt>> で定義されている。)"
17454
17455 #. type: Plain text
17456 #: build/C/man3/tmpnam.3:84
17457 msgid ""
17458 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
17459 "or NULL if a unique name cannot be generated."
17460 msgstr ""
17461 "B<tmpnam>()  関数は一意な一時ファイル名へのポインターを返す。 一意なファイル"
17462 "名が作成できなかった場合は NULL を返す。"
17463
17464 #. type: Plain text
17465 #: build/C/man3/tmpnam.3:86
17466 msgid "No errors are defined."
17467 msgstr "エラーは定義されていない。"
17468
17469 #. type: Plain text
17470 #: build/C/man3/tmpnam.3:92
17471 msgid ""
17472 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
17473 "safe if called with a NULL parameter."
17474 msgstr ""
17475 "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメーターで呼び出"
17476 "された場合はスレッドセーフではない。"
17477
17478 #. type: Plain text
17479 #: build/C/man3/tmpnam.3:96
17480 msgid "The B<tmpnam_r>()  function is thread-safe."
17481 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
17482
17483 #. type: Plain text
17484 #: build/C/man3/tmpnam.3:101
17485 msgid ""
17486 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
17487 "obsolete."
17488 msgstr ""
17489 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
17490 "定としている。"
17491
17492 #. type: Plain text
17493 #: build/C/man3/tmpnam.3:112
17494 msgid ""
17495 "The B<tmpnam>()  function generates a different string each time it is "
17496 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
17497 "the behavior is implementation defined."
17498 msgstr ""
17499 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
17500 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
17501
17502 #. type: Plain text
17503 #: build/C/man3/tmpnam.3:131
17504 msgid ""
17505 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
17506 "nevertheless possible that between the time that B<tmpnam>()  returns a "
17507 "pathname, and the time that the program opens it, another program might "
17508 "create that pathname using B<open>(2), or create it as a symbolic link.  "
17509 "This can lead to security holes.  To avoid such possibilities, use the "
17510 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
17511 "B<mkstemp>(3)  or B<tmpfile>(3)."
17512 msgstr ""
17513 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 "
17514 "B<tmpnam>()  がパス名を返してから、プログラムがそのファイルをオープンする ま"
17515 "での間に、別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、"
17516 "シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつ"
17517 "ながる可能性がある。 そのような可能性を回避するためには、 B<open>(2)  の "
17518 "B<O_EXCL> フラグを使ってパス名をオープンすればよい。 もっといいのは、 "
17519 "B<mkstemp>(3)  や B<tmpfile>(3)  を使うことである。"
17520
17521 #. type: Plain text
17522 #: build/C/man3/tmpnam.3:139
17523 msgid ""
17524 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
17525 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
17526 "defined."
17527 msgstr ""
17528 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
17529 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
17530 "NULL 引き数で呼び出してはならない。"
17531
17532 #. type: Plain text
17533 #: build/C/man3/tmpnam.3:143
17534 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
17535 msgstr ""
17536 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
17537 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
17538 "扱いしている。"
17539
17540 #. type: Plain text
17541 #: build/C/man3/tmpnam.3:151
17542 #, no-wrap
17543 msgid ""
17544 "char *\n"
17545 "tmpnam_r(char *s)\n"
17546 "{\n"
17547 "    return s ? tmpnam(s) : NULL;\n"
17548 "}\n"
17549 msgstr ""
17550 "char *\n"
17551 "tmpnam_r(char *s)\n"
17552 "{\n"
17553 "    return s ? tmpnam(s) : NULL;\n"
17554 "}\n"
17555
17556 #. type: Plain text
17557 #: build/C/man3/tmpnam.3:165
17558 msgid ""
17559 "apparently as a warning not to use NULL.  A few systems implement it.  To "
17560 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
17561 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
17562 msgstr ""
17563 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
17564 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダーファイルをイ"
17565 "ンクルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必"
17566 "要がある。"
17567
17568 #. type: Plain text
17569 #: build/C/man3/tmpnam.3:172
17570 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
17571 msgstr ""
17572 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
17573 "を使うこと。"
17574
17575 #. type: Plain text
17576 #: build/C/man3/tmpnam.3:177
17577 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
17578 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
17579
17580 #. type: TH
17581 #: build/C/man2/unlink.2:33
17582 #, no-wrap
17583 msgid "UNLINK"
17584 msgstr "UNLINK"
17585
17586 #. type: Plain text
17587 #: build/C/man2/unlink.2:36
17588 msgid "unlink, unlinkat - delete a name and possibly the file it refers to"
17589 msgstr ""
17590 "unlink, unlinkat - 名前を削除し、場合によってはそれが参照しているファイルも削"
17591 "除する"
17592
17593 #. type: Plain text
17594 #: build/C/man2/unlink.2:41
17595 #, no-wrap
17596 msgid "B<int unlink(const char *>I<pathname>B<);>\n"
17597 msgstr "B<int unlink(const char *>I<pathname>B<);>\n"
17598
17599 #. type: Plain text
17600 #: build/C/man2/unlink.2:46
17601 #, no-wrap
17602 msgid "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
17603 msgstr "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
17604
17605 #. type: Plain text
17606 #: build/C/man2/unlink.2:54
17607 msgid "B<unlinkat>():"
17608 msgstr "B<unlinkat>():"
17609
17610 #. type: Plain text
17611 #: build/C/man2/unlink.2:72
17612 msgid ""
17613 "B<unlink>()  deletes a name from the filesystem.  If that name was the last "
17614 "link to a file and no processes have the file open, the file is deleted and "
17615 "the space it was using is made available for reuse."
17616 msgstr ""
17617 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
17618 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
17619 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
17620 "は再利用が可能になる。"
17621
17622 #. type: Plain text
17623 #: build/C/man2/unlink.2:76
17624 msgid ""
17625 "If the name was the last link to a file but any processes still have the "
17626 "file open, the file will remain in existence until the last file descriptor "
17627 "referring to it is closed."
17628 msgstr ""
17629 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
17630 "いているなら、ファイルの最後のファイルディスクリプター (file descriptor) が閉"
17631 "じられるまでファイルは存在し続ける。"
17632
17633 #. type: Plain text
17634 #: build/C/man2/unlink.2:82
17635 msgid ""
17636 "If the name referred to a socket, FIFO, or device, the name for it is "
17637 "removed but processes which have the object open may continue to use it."
17638 msgstr ""
17639 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
17640 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
17641
17642 #. type: SS
17643 #: build/C/man2/unlink.2:82
17644 #, no-wrap
17645 msgid "unlinkat()"
17646 msgstr "unlinkat()"
17647
17648 #. type: Plain text
17649 #: build/C/man2/unlink.2:95
17650 msgid ""
17651 "The B<unlinkat>()  system call operates in exactly the same way as either "
17652 "B<unlink>()  or B<rmdir>(2)  (depending on whether or not I<flags> includes "
17653 "the B<AT_REMOVEDIR> flag)  except for the differences described here."
17654 msgstr ""
17655 "B<unlinkat>() システムコールは、B<unlink>() と B<rmdir>(2) のいずれかと全く同"
17656 "じ動作をする (どちらと同じになるかは I<flags> に B<AT_REMOVEDIR> フラグが指定"
17657 "されたかにより決まる) が、以下で説明する点が異なる。"
17658
17659 #. type: Plain text
17660 #: build/C/man2/unlink.2:107
17661 msgid ""
17662 "If the pathname given in I<pathname> is relative, then it is interpreted "
17663 "relative to the directory referred to by the file descriptor I<dirfd> "
17664 "(rather than relative to the current working directory of the calling "
17665 "process, as is done by B<unlink>()  and B<rmdir>(2)  for a relative "
17666 "pathname)."
17667 msgstr ""
17668 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
17669 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
17670 "(B<unlink>() や B<rmdir>(2) に相対パス名を渡した場合のように、呼び出したプロ"
17671 "セスのカレントワーキングディレクトリに対する相対パスではない)。"
17672
17673 #. type: Plain text
17674 #: build/C/man2/unlink.2:121
17675 msgid ""
17676 "If the pathname given in I<pathname> is relative and I<dirfd> is the special "
17677 "value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current "
17678 "working directory of the calling process (like B<unlink>()  and B<rmdir>(2))."
17679 msgstr ""
17680 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
17681 "の場合、 (B<unlink>() や B<rmdir>(2) と同様に) I<pathname> は呼び出したプロセ"
17682 "スのカレントワーキングディレクトリに対する相対パスと解釈される。"
17683
17684 #. type: Plain text
17685 #: build/C/man2/unlink.2:127
17686 msgid ""
17687 "If the pathname given in I<pathname> is absolute, then I<dirfd> is ignored."
17688 msgstr ""
17689 "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
17690
17691 #. type: Plain text
17692 #: build/C/man2/unlink.2:133
17693 msgid ""
17694 "I<flags> is a bit mask that can either be specified as 0, or by ORing "
17695 "together flag values that control the operation of B<unlinkat>().  Currently "
17696 "only one such flag is defined:"
17697 msgstr ""
17698 "I<flags> はビットマスクで、0 もしくは B<unlinkat>() の動作を制御するフラグ値"
17699 "を論理和の形で指定することができる。現在のところ、定義されているフラグはひと"
17700 "つだけである。"
17701
17702 #. type: TP
17703 #: build/C/man2/unlink.2:133
17704 #, no-wrap
17705 msgid "B<AT_REMOVEDIR>"
17706 msgstr "B<AT_REMOVEDIR>"
17707
17708 #. type: Plain text
17709 #: build/C/man2/unlink.2:148
17710 msgid ""
17711 "By default, B<unlinkat>()  performs the equivalent of B<unlink>()  on "
17712 "I<pathname>.  If the B<AT_REMOVEDIR> flag is specified, then performs the "
17713 "equivalent of B<rmdir>(2)  on I<pathname>."
17714 msgstr ""
17715 "デフォルトでは、 B<unlinkat>() は I<pathname> に対して B<unlink>() と等価な動"
17716 "作をする。 B<AT_REMOVEDIR> フラグが指定された場合、 I<pathname> に対して "
17717 "B<rmdir>(2) と等価な動作をする。"
17718
17719 #. type: Plain text
17720 #: build/C/man2/unlink.2:153
17721 msgid "See B<openat>(2)  for an explanation of the need for B<unlinkat>()."
17722 msgstr "B<unlinkat>() の必要性についての説明については B<openat>(2) を参照。"
17723
17724 #. type: Plain text
17725 #: build/C/man2/unlink.2:169
17726 msgid ""
17727 "Write access to the directory containing I<pathname> is not allowed for the "
17728 "process's effective UID, or one of the directories in I<pathname> did not "
17729 "allow search permission.  (See also B<path_resolution>(7).)"
17730 msgstr ""
17731 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
17732 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
17733 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
17734 "と)。"
17735
17736 #. type: Plain text
17737 #: build/C/man2/unlink.2:178
17738 msgid ""
17739 "The file I<pathname> cannot be unlinked because it is being used by the "
17740 "system or another process; for example, it is a mount point or the NFS "
17741 "client software created it to represent an active but otherwise nameless "
17742 "inode (\"NFS silly renamed\")."
17743 msgstr ""
17744 "システムか別のプロセスがそのファイルを使用中のため、\n"
17745 "ファイル I<pathname> を unlink できない。\n"
17746 "例えば、そのファイルがマウントポイントの場合や、\n"
17747 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
17748 "名前なし inode (nameless inode) であることを示すために作成した\n"
17749 "場合 (\"NFS silly renamed\") などがある。"
17750
17751 #. type: Plain text
17752 #: build/C/man2/unlink.2:190
17753 msgid ""
17754 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
17755 "Linux since 2.1.132.)"
17756 msgstr ""
17757 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
17758 "で、Linux 2.1.132 以降で返される。)"
17759
17760 #. type: Plain text
17761 #: build/C/man2/unlink.2:194
17762 msgid "Too many symbolic links were encountered in translating I<pathname>."
17763 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
17764
17765 #. type: Plain text
17766 #: build/C/man2/unlink.2:204
17767 msgid ""
17768 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
17769 "I<pathname> is empty."
17770 msgstr ""
17771 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
17772 "I<pathname> が空である。"
17773
17774 #. type: Plain text
17775 #: build/C/man2/unlink.2:212
17776 msgid ""
17777 "A component used as a directory in I<pathname> is not, in fact, a directory."
17778 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
17779
17780 #. type: Plain text
17781 #: build/C/man2/unlink.2:221
17782 msgid ""
17783 "The system does not allow unlinking of directories, or unlinking of "
17784 "directories requires privileges that the calling process doesn't have.  "
17785 "(This is the POSIX prescribed error return; as noted above, Linux returns "
17786 "B<EISDIR> for this case.)"
17787 msgstr ""
17788 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
17789 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
17790 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
17791 "合には Linux は B<EISDIR> を返す。)"
17792
17793 #. type: TP
17794 #: build/C/man2/unlink.2:221
17795 #, no-wrap
17796 msgid "B<EPERM> (Linux only)"
17797 msgstr "B<EPERM> (Linux のみ)"
17798
17799 #. type: Plain text
17800 #: build/C/man2/unlink.2:224
17801 msgid "The filesystem does not allow unlinking of files."
17802 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
17803
17804 #. type: Plain text
17805 #: build/C/man2/unlink.2:235
17806 msgid ""
17807 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
17808 "and the process's effective UID is neither the UID of the file to be deleted "
17809 "nor that of the directory containing it, and the process is not privileged "
17810 "(Linux: does not have the B<CAP_FOWNER> capability)."
17811 msgstr ""
17812 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
17813 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
17814 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
17815 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
17816
17817 #. type: Plain text
17818 #: build/C/man2/unlink.2:239
17819 msgid "I<pathname> refers to a file on a read-only filesystem."
17820 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
17821
17822 #. type: Plain text
17823 #: build/C/man2/unlink.2:248
17824 msgid ""
17825 "The same errors that occur for B<unlink>()  and B<rmdir>(2)  can also occur "
17826 "for B<unlinkat>().  The following additional errors can occur for "
17827 "B<unlinkat>():"
17828 msgstr ""
17829 "B<unlink>() と B<rmdir>(2) で発生するのと同じエラーが B<unlinkat>() でも起こ"
17830 "る。 B<unlinkat>() では以下のエラーも発生する。"
17831
17832 #. type: Plain text
17833 #: build/C/man2/unlink.2:263
17834 msgid ""
17835 "I<pathname> refers to a directory, and B<AT_REMOVEDIR> was not specified in "
17836 "I<flags>."
17837 msgstr ""
17838 "I<pathname> がディレクトリを参照していて、 I<flags> に B<AT_REMOVEDIR> がされ"
17839 "ていなかった。"
17840
17841 #. type: Plain text
17842 #: build/C/man2/unlink.2:273
17843 msgid ""
17844 "B<unlinkat>()  was added to Linux in kernel 2.6.16; library support was "
17845 "added to glibc in version 2.4."
17846 msgstr ""
17847 "B<unlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
17848 "ポートはバージョン 2.4 で glibc に追加された。"
17849
17850 #.  SVr4 documents additional error
17851 #.  conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
17852 #. type: Plain text
17853 #: build/C/man2/unlink.2:278
17854 msgid "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
17855 msgstr "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
17856
17857 #. type: Plain text
17858 #: build/C/man2/unlink.2:281
17859 msgid "B<unlinkat>(): POSIX.1-2008."
17860 msgstr "B<unlinkat>(): POSIX.1-2008."
17861
17862 #. type: Plain text
17863 #: build/C/man2/unlink.2:297
17864 msgid ""
17865 "On older kernels where B<unlinkat>()  is unavailable, the glibc wrapper "
17866 "function falls back to the use of B<unlink>(2)  or B<rmdir>(2).  When "
17867 "I<pathname> is a relative pathname, glibc constructs a pathname based on the "
17868 "symbolic link in I</proc/self/fd> that corresponds to the I<dirfd> argument."
17869 msgstr ""
17870 "B<unlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
17871 "B<unlink>(2) と B<rmdir>(2) を使用するモードにフォールバックする。 "
17872 "I<pathname> が相対パスの場合、 glibc は I<dirfd> 引き数に対応する I</proc/"
17873 "self/fd> のシンボリックリンクに基づいてパス名を構成する。"
17874
17875 #. type: Plain text
17876 #: build/C/man2/unlink.2:312
17877 msgid ""
17878 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
17879 "B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
17880 msgstr ""
17881 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
17882 "B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
17883
17884 #. type: TH
17885 #: build/C/man3/unlocked_stdio.3:25
17886 #, no-wrap
17887 msgid "UNLOCKED_STDIO"
17888 msgstr "UNLOCKED_STDIO"
17889
17890 #. type: TH
17891 #: build/C/man3/unlocked_stdio.3:25
17892 #, no-wrap
17893 msgid "2008-08-29"
17894 msgstr "2008-08-29"
17895
17896 #. type: Plain text
17897 #: build/C/man3/unlocked_stdio.3:29
17898 msgid ""
17899 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
17900 "nonlocking stdio functions"
17901 msgstr ""
17902 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
17903 "わずに標準入出力を行う関数群"
17904
17905 #. type: Plain text
17906 #: build/C/man3/unlocked_stdio.3:37
17907 #, no-wrap
17908 msgid ""
17909 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
17910 "B<int getchar_unlocked(void);>\n"
17911 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17912 "B<int putchar_unlocked(int >I<c>B<);>\n"
17913 msgstr ""
17914 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
17915 "B<int getchar_unlocked(void);>\n"
17916 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17917 "B<int putchar_unlocked(int >I<c>B<);>\n"
17918
17919 #. type: Plain text
17920 #: build/C/man3/unlocked_stdio.3:49
17921 #, no-wrap
17922 msgid ""
17923 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
17924 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
17925 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
17926 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
17927 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
17928 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
17929 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17930 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17931 "B<                      FILE *>I<stream>B<);>\n"
17932 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17933 "B<                      FILE *>I<stream>B<);>\n"
17934 msgstr ""
17935 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
17936 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
17937 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
17938 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
17939 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
17940 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
17941 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17942 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17943 "B<                      FILE *>I<stream>B<);>\n"
17944 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17945 "B<                      FILE *>I<stream>B<);>\n"
17946
17947 #. type: Plain text
17948 #: build/C/man3/unlocked_stdio.3:52
17949 #, no-wrap
17950 msgid ""
17951 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17952 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
17953 msgstr ""
17954 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17955 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
17956
17957 #. type: Plain text
17958 #: build/C/man3/unlocked_stdio.3:63
17959 #, no-wrap
17960 msgid ""
17961 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
17962 "B<wint_t getwchar_unlocked(void);>\n"
17963 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
17964 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17965 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17966 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
17967 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17968 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
17969 msgstr ""
17970 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
17971 "B<wint_t getwchar_unlocked(void);>\n"
17972 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
17973 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17974 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17975 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
17976 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17977 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
17978
17979 #. type: Plain text
17980 #: build/C/man3/unlocked_stdio.3:75
17981 msgid ""
17982 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17983 "B<putchar_unlocked>():"
17984 msgstr ""
17985 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17986 "B<putchar_unlocked>():"
17987
17988 #. type: Plain text
17989 #: build/C/man3/unlocked_stdio.3:78
17990 msgid ""
17991 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
17992 "_BSD_SOURCE || _SVID_SOURCE"
17993 msgstr ""
17994 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
17995 "_BSD_SOURCE || _SVID_SOURCE"
17996
17997 #. type: Plain text
17998 #: build/C/man3/unlocked_stdio.3:89
17999 msgid ""
18000 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
18001 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
18002 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
18003 msgstr ""
18004 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
18005 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
18006 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
18007
18008 #. type: Plain text
18009 #: build/C/man3/unlocked_stdio.3:91
18010 msgid "_BSD_SOURCE || _SVID_SOURCE"
18011 msgstr "_BSD_SOURCE || _SVID_SOURCE"
18012
18013 #. type: Plain text
18014 #: build/C/man3/unlocked_stdio.3:102
18015 msgid ""
18016 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
18017 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
18018 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
18019 msgstr ""
18020 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
18021 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
18022 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
18023
18024 #. type: Plain text
18025 #: build/C/man3/unlocked_stdio.3:113
18026 msgid ""
18027 "Each of these functions has the same behavior as its counterpart without the "
18028 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
18029 "locks themselves, and do not test for the presence of locks set by others) "
18030 "and hence are thread-unsafe.  See B<flockfile>(3)."
18031 msgstr ""
18032 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
18033 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
18034 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
18035 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
18036 "B<flockfile>(3)  を参照のこと。"
18037
18038 #. type: Plain text
18039 #: build/C/man3/unlocked_stdio.3:120
18040 msgid ""
18041 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
18042 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
18043 msgstr ""
18044 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
18045 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
18046
18047 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
18048 #.  moved to a compatibility library.
18049 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
18050 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
18051 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
18052 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
18053 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18054 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
18055 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
18056 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
18057 #.  ungetc_unlocked, ungetwc_unlocked.
18058 #. type: Plain text
18059 #: build/C/man3/unlocked_stdio.3:136
18060 msgid ""
18061 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
18062 "are available in recent glibc.  They should probably not be used."
18063 msgstr ""
18064 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
18065 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
18066
18067 #. type: Plain text
18068 #: build/C/man3/unlocked_stdio.3:139
18069 msgid "B<flockfile>(3), B<stdio>(3)"
18070 msgstr "B<flockfile>(3), B<stdio>(3)"
18071
18072 #. type: TH
18073 #: build/C/man3/wprintf.3:16
18074 #, no-wrap
18075 msgid "WPRINTF"
18076 msgstr "WPRINTF"
18077
18078 #. type: TH
18079 #: build/C/man3/wprintf.3:16
18080 #, no-wrap
18081 msgid "2014-03-19"
18082 msgstr "2014-03-19"
18083
18084 #. type: Plain text
18085 #: build/C/man3/wprintf.3:20
18086 msgid ""
18087 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
18088 "character output conversion"
18089 msgstr ""
18090 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
18091 "フォーマットして出力する"
18092
18093 #. type: Plain text
18094 #: build/C/man3/wprintf.3:24
18095 #, no-wrap
18096 msgid ""
18097 "B<#include E<lt>stdio.hE<gt>>\n"
18098 "B<#include E<lt>wchar.hE<gt>>\n"
18099 msgstr ""
18100 "B<#include E<lt>stdio.hE<gt>>\n"
18101 "B<#include E<lt>wchar.hE<gt>>\n"
18102
18103 #. type: Plain text
18104 #: build/C/man3/wprintf.3:29
18105 #, no-wrap
18106 msgid ""
18107 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
18108 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
18109 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
18110 "B<             const wchar_t *>I<format>B<, ...);>\n"
18111 msgstr ""
18112 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
18113 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
18114 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
18115 "B<             const wchar_t *>I<format>B<, ...);>\n"
18116
18117 #. type: Plain text
18118 #: build/C/man3/wprintf.3:34
18119 #, no-wrap
18120 msgid ""
18121 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
18122 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
18123 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
18124 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
18125 msgstr ""
18126 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
18127 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
18128 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
18129 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
18130
18131 #.  .BR wprintf (),
18132 #.  .BR fwprintf (),
18133 #.  .BR swprintf (),
18134 #.  .BR vwprintf (),
18135 #.  .BR vfwprintf (),
18136 #.  .BR vswprintf ():
18137 #. type: Plain text
18138 #: build/C/man3/wprintf.3:51
18139 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
18140 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
18141
18142 #. type: Plain text
18143 #: build/C/man3/wprintf.3:53
18144 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
18145 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
18146
18147 #. type: Plain text
18148 #: build/C/man3/wprintf.3:56
18149 msgid "or I<cc\\ -std=c99>"
18150 msgstr "or I<cc\\ -std=c99>"
18151
18152 #. type: Plain text
18153 #: build/C/man3/wprintf.3:67
18154 msgid ""
18155 "The B<wprintf>()  family of functions is the wide-character equivalent of "
18156 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
18157 "characters."
18158 msgstr ""
18159 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
18160 "版である。これらはワイド文字をフォーマットして出力する。"
18161
18162 #. type: Plain text
18163 #: build/C/man3/wprintf.3:79
18164 msgid ""
18165 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
18166 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
18167 "more information."
18168 msgstr ""
18169 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
18170 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
18171 "ること。"
18172
18173 #. type: Plain text
18174 #: build/C/man3/wprintf.3:91
18175 msgid ""
18176 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
18177 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
18178 "for more information."
18179 msgstr ""
18180 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
18181 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
18182 "B<fwide>(3)  を参照すること。"
18183
18184 #. type: Plain text
18185 #: build/C/man3/wprintf.3:105
18186 msgid ""
18187 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
18188 "output to an array of wide characters.  The programmer must ensure that "
18189 "there is room for at least I<maxlen> wide characters at I<wcs>."
18190 msgstr ""
18191 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
18192 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
18193 "空きがあることを保証しなければ ならない。"
18194
18195 #. type: Plain text
18196 #: build/C/man3/wprintf.3:116
18197 msgid ""
18198 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
18199 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
18200 "following differences:"
18201 msgstr ""
18202 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
18203 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
18204
18205 #. type: TP
18206 #: build/C/man3/wprintf.3:116 build/C/man3/wprintf.3:121
18207 #: build/C/man3/wprintf.3:124
18208 #, no-wrap
18209 msgid "B<\\(bu>"
18210 msgstr "B<\\(bu>"
18211
18212 #. type: Plain text
18213 #: build/C/man3/wprintf.3:121
18214 msgid "The I<format> string is a wide-character string."
18215 msgstr "I<format> がワイド文字列で与えられる。"
18216
18217 #. type: Plain text
18218 #: build/C/man3/wprintf.3:124
18219 msgid "The output consists of wide characters, not bytes."
18220 msgstr "出力がバイトではなくワイド文字で構成される。"
18221
18222 #. type: Plain text
18223 #: build/C/man3/wprintf.3:143
18224 msgid ""
18225 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
18226 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
18227 "I<maxlen> argument, but these functions do not return -1 upon buffer "
18228 "overflow on Linux.)"
18229 msgstr ""
18230 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 "
18231 "B<sprintf>()  と B<vsprintf>()  は取らない (B<snprintf>()  と "
18232 "B<vsnprintf>()  は I<maxlen> 引き数を取るが これらの関数が Linux では、バッ"
18233 "ファーが溢れた場合でも -1 を返さない)。"
18234
18235 #. type: Plain text
18236 #: build/C/man3/wprintf.3:149
18237 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
18238 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
18239
18240 #. type: Plain text
18241 #: build/C/man3/wprintf.3:163
18242 msgid ""
18243 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
18244 "character by a call to the B<btowc>(3)  function, and the resulting wide "
18245 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
18246 "character) argument is written."
18247 msgstr ""
18248 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
18249 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
18250 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
18251
18252 #. type: Plain text
18253 #: build/C/man3/wprintf.3:203
18254 msgid ""
18255 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
18256 "to be a pointer to an array of character type (pointer to a string) "
18257 "containing a multibyte character sequence beginning in the initial shift "
18258 "state.  Characters from the array are converted to wide characters (each by "
18259 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
18260 "the initial state before the first byte).  The resulting wide characters are "
18261 "written up to (but not including) the terminating null wide character (L\\(aq"
18262 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
18263 "number specified are written.  Note that the precision determines the number "
18264 "of I<wide characters> written, not the number of I<bytes> or I<screen "
18265 "positions>.  The array must contain a terminating null byte (\\(aq"
18266 "\\e0\\(aq), unless a precision is given and it is so small that the number "
18267 "of converted wide characters reaches it before the end of the array is "
18268 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
18269 "argument is expected to be a pointer to an array of wide characters.  Wide "
18270 "characters from the array are written up to (but not including) a "
18271 "terminating null wide character.  If a precision is specified, no more than "
18272 "the number specified are written.  The array must contain a terminating null "
18273 "wide character, unless a precision is given and it is smaller than or equal "
18274 "to the number of wide characters in the array."
18275 msgstr ""
18276 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
18277 "まるマルチバイト文字列を含んだ char 型の配列へのポインター(文字列へのポイン"
18278 "ター)とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それ"
18279 "ぞれの文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイ"
18280 "ド文字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精"
18281 "度(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれ"
18282 "ない。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文"
18283 "字> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
18284 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
18285 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
18286 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
18287 "引き数はワイド文字の配列へのポインターとみなされる。 配列のワイド文字列は終端"
18288 "のナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された"
18289 "精度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を"
18290 "含む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小"
18291 "さくな ければならない。"
18292
18293 #. type: Plain text
18294 #: build/C/man3/wprintf.3:211
18295 msgid ""
18296 "The functions return the number of wide characters written, excluding the "
18297 "terminating null wide character in case of the functions B<swprintf>()  and "
18298 "B<vswprintf>().  They return -1 when an error occurs."
18299 msgstr ""
18300 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
18301 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
18302 "場合は -1 を返す。"
18303
18304 #. type: Plain text
18305 #: build/C/man3/wprintf.3:213
18306 msgid "C99."
18307 msgstr "C99."
18308
18309 #. type: Plain text
18310 #: build/C/man3/wprintf.3:221
18311 msgid ""
18312 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
18313 "the current locale."
18314 msgstr ""
18315 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリーに依存してい"
18316 "る。"
18317
18318 #. type: Plain text
18319 #: build/C/man3/wprintf.3:251
18320 msgid ""
18321 "If the I<format> string contains non-ASCII wide characters, the program will "
18322 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
18323 "time is the same as the B<LC_CTYPE> category of the current locale at "
18324 "compile time.  This is because the I<wchar_t> representation is platform- "
18325 "and locale-dependent.  (The glibc represents wide characters using their "
18326 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
18327 "the use of C99 universal character names of the form \\eunnnn does not solve "
18328 "this problem.)  Therefore, in internationalized programs, the I<format> "
18329 "string should consist of ASCII wide characters only, or should be "
18330 "constructed at run time in an internationalized way (e.g., using "
18331 "B<gettext>(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
18332 msgstr ""
18333 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
18334 "の B<LC_CTYPE> カテゴリーがコンパイル時の B<LC_CTYPE> カテゴリーと 一致してい"
18335 "る場合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールや"
18336 "プラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
18337 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
18338 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
18339 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
18340 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
18341 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
18342
18343 #.  .BR wscanf (3)
18344 #. type: Plain text
18345 #: build/C/man3/wprintf.3:258
18346 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
18347 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
18348
18349 #. type: TH
18350 #: build/C/man2/write.2:39
18351 #, no-wrap
18352 msgid "WRITE"
18353 msgstr "WRITE"
18354
18355 #. type: Plain text
18356 #: build/C/man2/write.2:42
18357 msgid "write - write to a file descriptor"
18358 msgstr "write - ファイルディスクリプター (file descriptor) に書き込む"
18359
18360 #. type: Plain text
18361 #: build/C/man2/write.2:46
18362 msgid ""
18363 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
18364 msgstr ""
18365 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
18366
18367 #. type: Plain text
18368 #: build/C/man2/write.2:54
18369 msgid ""
18370 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
18371 "the file referred to by the file descriptor I<fd>."
18372 msgstr ""
18373 "B<write>()  は、 I<buf> が指すバッファーから、ファイルディスクリプター I<fd> "
18374 "が参照するファイルへ、最大 I<count> バイトを書き込む。"
18375
18376 #. type: Plain text
18377 #: build/C/man2/write.2:68
18378 msgid ""
18379 "The number of bytes written may be less than I<count> if, for example, there "
18380 "is insufficient space on the underlying physical medium, or the "
18381 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
18382 "call was interrupted by a signal handler after having written less than "
18383 "I<count> bytes.  (See also B<pipe>(7).)"
18384 msgstr ""
18385 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
18386 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
18387 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
18388 "で 呼び出しがシグナルハンドラーにより割り込まれた場合、 などである。 "
18389 "(B<pipe>(7)  も参照のこと。)"
18390
18391 #. type: Plain text
18392 #: build/C/man2/write.2:82
18393 msgid ""
18394 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
18395 "example, a regular file)  writing takes place at the current file offset, "
18396 "and the file offset is incremented by the number of bytes actually written.  "
18397 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
18398 "to the end of the file before writing.  The adjustment of the file offset "
18399 "and the write operation are performed as an atomic step."
18400 msgstr ""
18401 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
18402 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
18403 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
18404 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
18405 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
18406 "処理として 実行される。"
18407
18408 #. type: Plain text
18409 #: build/C/man2/write.2:89
18410 msgid ""
18411 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
18412 "B<write>()  has returned returns the new data.  Note that not all "
18413 "filesystems are POSIX conforming."
18414 msgstr ""
18415 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
18416 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
18417 "ること。"
18418
18419 #. type: Plain text
18420 #: build/C/man2/write.2:94
18421 msgid ""
18422 "On success, the number of bytes written is returned (zero indicates nothing "
18423 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
18424 msgstr ""
18425 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
18426 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
18427
18428 #. type: Plain text
18429 #: build/C/man2/write.2:107
18430 msgid ""
18431 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
18432 "return a failure status if one of the errors below is detected.  If no "
18433 "errors are detected, 0 will be returned without causing any other effect.  "
18434 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
18435 "the results are not specified."
18436 msgstr ""
18437 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
18438 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
18439 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
18440 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
18441 "その結果は規定されていない。"
18442
18443 #. type: Plain text
18444 #: build/C/man2/write.2:115
18445 msgid ""
18446 "The file descriptor I<fd> refers to a file other than a socket and has been "
18447 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
18448 msgstr ""
18449 "ファイルディスクリプター I<fd> がソケット以外のファイルを参照していて、 非停"
18450 "止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停"
18451 "止する状況にある。"
18452
18453 #.  Actually EAGAIN on Linux
18454 #. type: Plain text
18455 #: build/C/man2/write.2:126
18456 msgid ""
18457 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
18458 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
18459 "error to be returned for this case, and does not require these constants to "
18460 "have the same value, so a portable application should check for both "
18461 "possibilities."
18462 msgstr ""
18463 "ファイルディスクリプター I<fd> がソケットを参照していて、非停止 "
18464 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
18465 "する状況にある。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めて"
18466 "おり、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性"
18467 "が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
18468
18469 #. type: Plain text
18470 #: build/C/man2/write.2:130
18471 msgid "I<fd> is not a valid file descriptor or is not open for writing."
18472 msgstr ""
18473 "I<fd> が有効なファイルディスクリプターでないか書き込みのためにオープン "
18474 "(open) されていない。"
18475
18476 #. type: TP
18477 #: build/C/man2/write.2:130
18478 #, no-wrap
18479 msgid "B<EDESTADDRREQ>"
18480 msgstr "B<EDESTADDRREQ>"
18481
18482 #. type: Plain text
18483 #: build/C/man2/write.2:135
18484 msgid ""
18485 "I<fd> refers to a datagram socket for which a peer address has not been set "
18486 "using B<connect>(2)."
18487 msgstr ""
18488 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
18489 "グラムソケットを 参照している。"
18490
18491 #. type: Plain text
18492 #: build/C/man2/write.2:141
18493 msgid ""
18494 "The user's quota of disk blocks on the filesystem containing the file "
18495 "referred to by I<fd> has been exhausted."
18496 msgstr ""
18497 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザー"
18498 "クォータの上限に達している。"
18499
18500 #. type: Plain text
18501 #: build/C/man2/write.2:150
18502 msgid ""
18503 "An attempt was made to write a file that exceeds the implementation-defined "
18504 "maximum file size or the process's file size limit, or to write at a "
18505 "position past the maximum allowed offset."
18506 msgstr ""
18507 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
18508 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
18509 "書き込もうとした。"
18510
18511 #. type: Plain text
18512 #: build/C/man2/write.2:154
18513 msgid ""
18514 "The call was interrupted by a signal before any data was written; see "
18515 "B<signal>(7)."
18516 msgstr ""
18517 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 "
18518 "B<signal>(7)  参照。"
18519
18520 #. type: Plain text
18521 #: build/C/man2/write.2:165
18522 msgid ""
18523 "I<fd> is attached to an object which is unsuitable for writing; or the file "
18524 "was opened with the B<O_DIRECT> flag, and either the address specified in "
18525 "I<buf>, the value specified in I<count>, or the current file offset is not "
18526 "suitably aligned."
18527 msgstr ""
18528 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
18529 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
18530 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
18531 "メントが不適切である。"
18532
18533 #. type: Plain text
18534 #: build/C/man2/write.2:168
18535 msgid "A low-level I/O error occurred while modifying the inode."
18536 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
18537
18538 #. type: Plain text
18539 #: build/C/man2/write.2:173
18540 msgid ""
18541 "The device containing the file referred to by I<fd> has no room for the data."
18542 msgstr ""
18543 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
18544
18545 #. type: TP
18546 #: build/C/man2/write.2:177
18547 #, no-wrap
18548 msgid "B<EPIPE>"
18549 msgstr "B<EPIPE>"
18550
18551 #. type: Plain text
18552 #: build/C/man2/write.2:186
18553 msgid ""
18554 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
18555 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
18556 "(Thus, the write return value is seen only if the program catches, blocks or "
18557 "ignores this signal.)"
18558 msgstr ""
18559 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
18560 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
18561 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
18562 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
18563 "write の返り値を参照できる。)"
18564
18565 #. type: Plain text
18566 #: build/C/man2/write.2:189
18567 msgid "Other errors may occur, depending on the object connected to I<fd>."
18568 msgstr ""
18569 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
18570
18571 #. type: Plain text
18572 #: build/C/man2/write.2:198
18573 msgid ""
18574 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
18575 "just before any data is written."
18576 msgstr ""
18577 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
18578 "で B<EINTR> が返る。"
18579
18580 #. type: Plain text
18581 #: build/C/man2/write.2:207
18582 msgid ""
18583 "A successful return from B<write>()  does not make any guarantee that data "
18584 "has been committed to disk.  In fact, on some buggy implementations, it does "
18585 "not even guarantee that space has successfully been reserved for the data.  "
18586 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
18587 "all your data."
18588 msgstr ""
18589 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
18590 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
18591 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
18592 "write した後に B<fsync>(2)  を呼び出すことである。"
18593
18594 #. type: Plain text
18595 #: build/C/man2/write.2:215
18596 msgid ""
18597 "If a B<write>()  is interrupted by a signal handler before any bytes are "
18598 "written, then the call fails with the error B<EINTR>; if it is interrupted "
18599 "after at least one byte has been written, the call succeeds, and returns the "
18600 "number of bytes written."
18601 msgstr ""
18602 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラーにより割り込まれ"
18603 "た場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で"
18604 "割り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
18605
18606 #
18607 #.  http://thread.gmane.org/gmane.linux.kernel/1649458
18608 #.     From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
18609 #.     Subject: Update of file offset on write() etc. is non-atomic with I/O
18610 #.     Date: 2014-02-17 15:41:37 GMT
18611 #.     Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
18612 #.  commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
18613 #.     Author: Linus Torvalds <torvalds@linux-foundation.org>
18614 #.     Date:   Mon Mar 3 09:36:58 2014 -0800
18615 #.         vfs: atomic f_pos accesses as per POSIX
18616 #. type: Plain text
18617 #: build/C/man2/write.2:254
18618 msgid ""
18619 "Among the APIs subsequently listed are B<write>()  and B<writev>(2).  And "
18620 "among the effects that should be atomic across threads (and processes)  are "
18621 "updates of the file offset.  However, on Linux before version 3.14, this was "
18622 "not the case: if two processes that share an open file description (see "
18623 "B<open>(2))  perform a B<write>()  (or B<writev>(2))  at the same time, then "
18624 "the I/O operations were not atomic with respect updating the file offset, "
18625 "with the result that the blocks of data output by the two processes might "
18626 "(incorrectly) overlap.  This problem was fixed in Linux 3.14."
18627 msgstr ""
18628 "この後に書かれている API の中に B<write>() と B<writev>(2) である。 スレッド"
18629 "(やプロセス) 間でアトミックに適用することが求められる効果の一つとして、 ファ"
18630 "イルオフセットの更新がある。 しかしながら、 バージョン 3.14 より前の Linux で"
18631 "は、 この限りではない。 オープンファイル記述 (open file description) を共有す"
18632 "る 2 つのプロセスが同時に B<write>() (や B<writev>(2)) を実行した場合、 この "
18633 "I/O 操作ではファイルオフセットの更新に関してはアトミックではなく、 2 つのプロ"
18634 "セスから出力されるデータブロックが (間違って) 重なる可能性がある。 この問題"
18635 "は Linux 3.14 で修正された。"
18636
18637 #. type: Plain text
18638 #: build/C/man2/write.2:266
18639 msgid ""
18640 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
18641 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
18642 msgstr ""
18643 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
18644 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"