OSDN Git Service

59df474fc29d277f6f4d742ecacc40e694b54c44
[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-06 03:03+0900\n"
10 "PO-Revision-Date: 2015-01-06 03:11+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 "その文字列へのポインタを返す。 このポインタは、不要になったら B<free>(3)  に"
197 "渡し、割り当てられた記憶領域を解放すべきである。"
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:176
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:195
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:1012
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:214 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:185
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:341
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:1494 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:299
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:250
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:344
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:1516
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:303 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:262
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:352 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:1524
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:311 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:270
357 msgid ""
358 "This page is part of release 3.76 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.76 の一部\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:213
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:1475 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:273 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:211
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
634 #, no-wrap
635 msgid "2009-02-23"
636 msgstr "2009-02-23"
637
638 #. type: Plain text
639 #: build/C/man3/fclose.3:47
640 msgid "fclose - close a stream"
641 msgstr "fclose - ストリームを閉じる"
642
643 #. type: Plain text
644 #: build/C/man3/fclose.3:51
645 msgid "B<int fclose(FILE *>I<fp>B<);>"
646 msgstr "B<int fclose(FILE *>I<fp>B<);>"
647
648 #. type: Plain text
649 #: build/C/man3/fclose.3:59
650 msgid ""
651 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
652 "any buffered output data using B<fflush>(3))  and closes the underlying file "
653 "descriptor."
654 msgstr ""
655 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
656 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
657 "対応するファイルディスクリプタをクローズする。"
658
659 #. type: Plain text
660 #: build/C/man3/fclose.3:70
661 msgid ""
662 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
663 "I<errno> is set to indicate the error.  In either case any further access "
664 "(including another call to B<fclose>())  to the stream results in undefined "
665 "behavior."
666 msgstr ""
667 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
668 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
669 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
670 "は 未定義の動作を生じさせる。"
671
672 #. type: SH
673 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
674 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
675 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
676 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:97
677 #: build/C/man3/getline.3:127 build/C/man2/link.2:192 build/C/man2/llseek.2:69
678 #: build/C/man2/lseek.2:187 build/C/man2/open.2:783
679 #: build/C/man2/open_by_handle_at.2:256 build/C/man2/pipe.2:138
680 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:159
681 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:208
682 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:145
683 #: build/C/man3/tempnam.3:101 build/C/man3/tmpfile.3:56
684 #: build/C/man3/tmpnam.3:84 build/C/man2/unlink.2:158 build/C/man2/write.2:107
685 #, no-wrap
686 msgid "ERRORS"
687 msgstr "エラー"
688
689 #. type: TP
690 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
691 #: build/C/man3/fseek.3:137 build/C/man2/link.2:276 build/C/man2/llseek.2:70
692 #: build/C/man2/lseek.2:188 build/C/man2/open.2:998
693 #: build/C/man2/open_by_handle_at.2:317 build/C/man2/read.2:114
694 #: build/C/man2/readlink.2:202 build/C/man2/rename.2:349
695 #: build/C/man3/scanf.3:553 build/C/man2/symlink.2:208
696 #: build/C/man2/unlink.2:248 build/C/man2/write.2:126
697 #, no-wrap
698 msgid "B<EBADF>"
699 msgstr "B<EBADF>"
700
701 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
702 #.   low-level file operations on the same stream. If you do get this error,
703 #.   you must have closed the stream's low-level file descriptor using
704 #.   something like close(fileno(fp)).
705 #. type: Plain text
706 #: build/C/man3/fclose.3:80
707 msgid "The file descriptor underlying I<fp> is not valid."
708 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
709
710 #. type: Plain text
711 #: build/C/man3/fclose.3:90
712 msgid ""
713 "The B<fclose>()  function may also fail and set I<errno> for any of the "
714 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
715 msgstr ""
716 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
717 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
718 "された値に設定される。"
719
720 #. type: Plain text
721 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:171 build/C/man3/puts.3:105
722 msgid "C89, C99."
723 msgstr "C89, C99."
724
725 #. type: SH
726 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
727 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
728 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
729 #: build/C/man3/fseeko.3:104 build/C/man2/link.2:347 build/C/man2/llseek.2:84
730 #: build/C/man2/lseek.2:227 build/C/man2/open.2:1056
731 #: build/C/man2/open_by_handle_at.2:359 build/C/man3/perror.3:124
732 #: build/C/man3/printf.3:889 build/C/man2/read.2:175
733 #: build/C/man2/readlink.2:225 build/C/man2/readv.2:226
734 #: build/C/man2/rename.2:414 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
735 #: build/C/man2/symlink.2:238 build/C/man3/tempnam.3:110
736 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:101
737 #: build/C/man2/unlink.2:281 build/C/man3/wprintf.3:213
738 #: build/C/man2/write.2:194
739 #, no-wrap
740 msgid "NOTES"
741 msgstr "注意"
742
743 #. type: Plain text
744 #: build/C/man3/fclose.3:102
745 msgid ""
746 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
747 "library.  To ensure that the data is physically stored on disk the kernel "
748 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
749 msgstr ""
750 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
751 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
752 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
753 "ればならない。"
754
755 #. type: Plain text
756 #: build/C/man3/fclose.3:108
757 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
758 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
759
760 #. type: TH
761 #: build/C/man3/fcloseall.3:25
762 #, no-wrap
763 msgid "FCLOSEALL"
764 msgstr "FCLOSEALL"
765
766 #. type: Plain text
767 #: build/C/man3/fcloseall.3:28
768 msgid "fcloseall - close all open streams"
769 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
770
771 #. type: Plain text
772 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
773 #, no-wrap
774 msgid ""
775 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
776 "B<#include E<lt>stdio.hE<gt>>\n"
777 msgstr ""
778 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
779 "B<#include E<lt>stdio.hE<gt>>\n"
780
781 #. type: Plain text
782 #: build/C/man3/fcloseall.3:34
783 #, no-wrap
784 msgid "B<int fcloseall(void);>\n"
785 msgstr "B<int fcloseall(void);>\n"
786
787 #. type: Plain text
788 #: build/C/man3/fcloseall.3:43
789 msgid ""
790 "The B<fcloseall>()  function closes all of the calling process's open "
791 "streams.  Buffered output for each stream is written before it is closed (as "
792 "for B<fflush>(3)); buffered input is discarded."
793 msgstr ""
794 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
795 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
796 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
797 "れる。"
798
799 #. type: Plain text
800 #: build/C/man3/fcloseall.3:50
801 msgid ""
802 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
803 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
804
805 #. type: Plain text
806 #: build/C/man3/fcloseall.3:55
807 msgid ""
808 "This function returns 0 if all files were successfully closed; on error, "
809 "B<EOF> is returned."
810 msgstr ""
811 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
812 "B<EOF> を返す。"
813
814 #. type: Plain text
815 #: build/C/man3/fcloseall.3:60
816 msgid ""
817 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
818 "safe."
819 msgstr ""
820 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
821 "はない。"
822
823 #. type: Plain text
824 #: build/C/man3/fcloseall.3:62
825 msgid "This function is a GNU extension."
826 msgstr "この関数は GNU 拡張である。"
827
828 #. type: Plain text
829 #: build/C/man3/fcloseall.3:68
830 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
831 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
832
833 #. type: TH
834 #: build/C/man3/ferror.3:44
835 #, no-wrap
836 msgid "FERROR"
837 msgstr "FERROR"
838
839 #. type: TH
840 #: build/C/man3/ferror.3:44
841 #, no-wrap
842 msgid "2014-01-15"
843 msgstr "2014-01-15"
844
845 #. type: Plain text
846 #: build/C/man3/ferror.3:47
847 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
848 msgstr ""
849 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
850
851 #. type: Plain text
852 #: build/C/man3/ferror.3:51
853 msgid "B<void clearerr(FILE *>I<stream>B<);>"
854 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
855
856 #. type: Plain text
857 #: build/C/man3/ferror.3:53
858 msgid "B<int feof(FILE *>I<stream>B<);>"
859 msgstr "B<int feof(FILE *>I<stream>B<);>"
860
861 #. type: Plain text
862 #: build/C/man3/ferror.3:55
863 msgid "B<int ferror(FILE *>I<stream>B<);>"
864 msgstr "B<int ferror(FILE *>I<stream>B<);>"
865
866 #. type: Plain text
867 #: build/C/man3/ferror.3:57
868 msgid "B<int fileno(FILE *>I<stream>B<);>"
869 msgstr "B<int fileno(FILE *>I<stream>B<);>"
870
871 #. type: Plain text
872 #: build/C/man3/ferror.3:65
873 msgid ""
874 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
875 msgstr ""
876 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
877
878 #. type: Plain text
879 #: build/C/man3/ferror.3:70
880 msgid ""
881 "The function B<clearerr>()  clears the end-of-file and error indicators for "
882 "the stream pointed to by I<stream>."
883 msgstr ""
884 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
885 "子とエラー指示子をクリアする。"
886
887 #. type: Plain text
888 #: build/C/man3/ferror.3:78
889 msgid ""
890 "The function B<feof>()  tests the end-of-file indicator for the stream "
891 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
892 "indicator can be cleared only by the function B<clearerr>()."
893 msgstr ""
894 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
895 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
896 "よってのみクリアすることができる。"
897
898 #. type: Plain text
899 #: build/C/man3/ferror.3:87
900 msgid ""
901 "The function B<ferror>()  tests the error indicator for the stream pointed "
902 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
903 "reset only by the B<clearerr>()  function."
904 msgstr ""
905 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
906 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 "
907 "B<clearerr>()  によってのみリセットすることができる。"
908
909 #. type: Plain text
910 #: build/C/man3/ferror.3:93
911 msgid ""
912 "The function B<fileno>()  examines the argument I<stream> and returns its "
913 "integer descriptor."
914 msgstr ""
915 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
916
917 #. type: Plain text
918 #: build/C/man3/ferror.3:96 build/C/man3/fgetc.3:99 build/C/man3/fgetwc.3:55
919 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/puts.3:84
920 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
921 msgstr ""
922 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
923
924 #. type: Plain text
925 #: build/C/man3/ferror.3:106
926 msgid ""
927 "These functions should not fail and do not set the external variable "
928 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
929 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
930 msgstr ""
931 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
932 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
933 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
934
935 #. type: Plain text
936 #: build/C/man3/ferror.3:115
937 msgid ""
938 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
939 "thread-safe."
940 msgstr ""
941 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
942 "る。"
943
944 #. type: Plain text
945 #: build/C/man3/ferror.3:122
946 msgid ""
947 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89, "
948 "C99, POSIX.1-2001, and POSIX.1-2008."
949 msgstr ""
950 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89, C99, POSIX.1-2001, "
951 "POSIX.1-2008 に準拠している。"
952
953 #. type: Plain text
954 #: build/C/man3/ferror.3:126
955 msgid "The function B<fileno>()  conforms to POSIX.1-2001 and POSIX.1-2008."
956 msgstr "関数 B<fileno>() は POSIX.1-2001 と POSIX.1-2008 に準拠している。"
957
958 #. type: Plain text
959 #: build/C/man3/ferror.3:131
960 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
961 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
962
963 #. type: TH
964 #: build/C/man3/fflush.3:45
965 #, no-wrap
966 msgid "FFLUSH"
967 msgstr "FFLUSH"
968
969 #. type: TH
970 #: build/C/man3/fflush.3:45
971 #, no-wrap
972 msgid "2013-07-15"
973 msgstr "2013-07-15"
974
975 #. type: Plain text
976 #: build/C/man3/fflush.3:48
977 msgid "fflush - flush a stream"
978 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
979
980 #. type: Plain text
981 #: build/C/man3/fflush.3:52
982 msgid "B<int fflush(FILE *>I<stream>B<);>"
983 msgstr "B<int fflush(FILE *>I<stream>B<);>"
984
985 #. type: Plain text
986 #: build/C/man3/fflush.3:63
987 msgid ""
988 "For output streams, B<fflush>()  forces a write of all user-space buffered "
989 "data for the given output or update I<stream> via the stream's underlying "
990 "write function.  For input streams, B<fflush>()  discards any buffered data "
991 "that has been fetched from the underlying file, but has not been consumed by "
992 "the application.  The open status of the stream is unaffected."
993 msgstr ""
994 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
995 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
996 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
997 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
998 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
999 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
1000 "い。"
1001
1002 #. type: Plain text
1003 #: build/C/man3/fflush.3:71
1004 msgid ""
1005 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
1006 "streams."
1007 msgstr ""
1008 "I<stream> 引数が NULL ならば、 B<fflush>()  は開いているI<すべての>出力スト"
1009 "リームをフラッシュする。"
1010
1011 #. type: Plain text
1012 #: build/C/man3/fflush.3:74
1013 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
1014 msgstr ""
1015 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
1016 "と。"
1017
1018 #. type: Plain text
1019 #: build/C/man3/fflush.3:81
1020 msgid ""
1021 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
1022 "I<errno> is set to indicate the error."
1023 msgstr ""
1024 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
1025 "ラーに対応した値に設定される。"
1026
1027 #. type: Plain text
1028 #: build/C/man3/fflush.3:86
1029 msgid "I<Stream> is not an open stream, or is not open for writing."
1030 msgstr ""
1031 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
1032 "ない。"
1033
1034 #. type: Plain text
1035 #: build/C/man3/fflush.3:93
1036 msgid ""
1037 "The function B<fflush>()  may also fail and set I<errno> for any of the "
1038 "errors specified for B<write>(2)."
1039 msgstr ""
1040 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1041 "ある。 この場合 I<errno> もその値に設定される。"
1042
1043 #. type: Plain text
1044 #: build/C/man3/fflush.3:98
1045 msgid "The B<fflush>()  function is thread-safe."
1046 msgstr "関数 B<fflush>() はスレッドセーフである。"
1047
1048 #. type: Plain text
1049 #: build/C/man3/fflush.3:100
1050 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1051 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1052
1053 #.  Verified on: Solaris 8.
1054 #. type: Plain text
1055 #: build/C/man3/fflush.3:104
1056 msgid ""
1057 "The standards do not specify the behavior for input streams.  Most other "
1058 "implementations behave the same as Linux."
1059 msgstr ""
1060 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1061 "は Linux と同じ動作をする。"
1062
1063 #. type: Plain text
1064 #: build/C/man3/fflush.3:113
1065 msgid ""
1066 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1067 "library.  To ensure that the data is physically stored on disk the kernel "
1068 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1069 msgstr ""
1070 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1071 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1072 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1073 "B<fsync>(2)  を用いる。"
1074
1075 #. type: Plain text
1076 #: build/C/man3/fflush.3:121
1077 msgid ""
1078 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), "
1079 "B<setbuf>(3), B<unlocked_stdio>(3)"
1080 msgstr ""
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
1084 #. type: TH
1085 #: build/C/man3/fgetc.3:27
1086 #, no-wrap
1087 msgid "FGETC"
1088 msgstr "FGETC"
1089
1090 #. type: TH
1091 #: build/C/man3/fgetc.3:27
1092 #, no-wrap
1093 msgid "2013-12-31"
1094 msgstr "2013-12-31"
1095
1096 #. type: Plain text
1097 #: build/C/man3/fgetc.3:30
1098 msgid "fgetc, fgets, getc, getchar, ungetc - input of characters and strings"
1099 msgstr "fgetc, fgets, getc, getchar, ungetc - 文字と文字列の入力"
1100
1101 #. type: Plain text
1102 #: build/C/man3/fgetc.3:35
1103 #, no-wrap
1104 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
1105 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
1106
1107 #. type: Plain text
1108 #: build/C/man3/fgetc.3:37
1109 #, no-wrap
1110 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
1111 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
1112
1113 #. type: Plain text
1114 #: build/C/man3/fgetc.3:39
1115 #, no-wrap
1116 msgid "B<int getc(FILE *>I<stream>B<);>\n"
1117 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
1118
1119 #. type: Plain text
1120 #: build/C/man3/fgetc.3:41
1121 #, no-wrap
1122 msgid "B<int getchar(void);>\n"
1123 msgstr "B<int getchar(void);>\n"
1124
1125 #. type: Plain text
1126 #: build/C/man3/fgetc.3:43
1127 #, no-wrap
1128 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
1129 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
1130
1131 #. type: Plain text
1132 #: build/C/man3/fgetc.3:55
1133 msgid ""
1134 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
1135 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
1136 msgstr ""
1137 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
1138 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
1139 "す。"
1140
1141 #. type: Plain text
1142 #: build/C/man3/fgetc.3:62
1143 msgid ""
1144 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
1145 "a macro which evaluates I<stream> more than once."
1146 msgstr ""
1147 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
1148 "実装されているかもしれない。"
1149
1150 #. type: Plain text
1151 #: build/C/man3/fgetc.3:66
1152 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
1153 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
1154
1155 #. type: Plain text
1156 #: build/C/man3/fgetc.3:80
1157 msgid ""
1158 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
1159 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
1160 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
1161 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
1162 "in the buffer."
1163 msgstr ""
1164 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
1165 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
1166 "する。 読み込まれた改行文字はバッファに格納される。 終端のヌルバイト (\\(aq"
1167 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
1168
1169 #. type: Plain text
1170 #: build/C/man3/fgetc.3:91
1171 msgid ""
1172 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
1173 "it is available for subsequent read operations.  Pushed-back characters will "
1174 "be returned in reverse order; only one pushback is guaranteed."
1175 msgstr ""
1176 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
1177 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
1178 "しとして保証されているのは、一文字だけである。"
1179
1180 #. type: Plain text
1181 #: build/C/man3/fgetc.3:96
1182 msgid ""
1183 "Calls to the functions described here can be mixed with each other and with "
1184 "calls to other input functions from the I<stdio> library for the same input "
1185 "stream."
1186 msgstr ""
1187 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
1188 "互いに混ぜて使うことができる。"
1189
1190 #. type: Plain text
1191 #: build/C/man3/fgetc.3:111
1192 msgid ""
1193 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
1194 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
1195 msgstr ""
1196 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
1197 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
1198 "す。"
1199
1200 #. type: Plain text
1201 #: build/C/man3/fgetc.3:117
1202 msgid ""
1203 "B<fgets>()  returns I<s> on success, and NULL on error or when end of file "
1204 "occurs while no characters have been read."
1205 msgstr ""
1206 "B<fgets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのに"
1207 "ファイルの終わりになった 場合に NULL を返す。"
1208
1209 #. type: Plain text
1210 #: build/C/man3/fgetc.3:124
1211 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
1212 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
1213
1214 #. type: Plain text
1215 #: build/C/man3/fgetc.3:126 build/C/man3/gets.3:60
1216 msgid "C89, C99, POSIX.1-2001."
1217 msgstr "C89, C99, POSIX.1-2001."
1218
1219 #. type: Plain text
1220 #: build/C/man3/fgetc.3:133
1221 msgid ""
1222 "It is not advisable to mix calls to input functions from the I<stdio> "
1223 "library with low-level calls to B<read>(2)  for the file descriptor "
1224 "associated with the input stream; the results will be undefined and very "
1225 "probably not what you want."
1226 msgstr ""
1227 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
1228 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
1229 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
1230
1231 #. type: Plain text
1232 #: build/C/man3/fgetc.3:150
1233 msgid ""
1234 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), "
1235 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), "
1236 "B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
1237 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
1238 msgstr ""
1239 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), "
1240 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), "
1241 "B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
1242 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
1243
1244 #. type: TH
1245 #: build/C/man3/fgetwc.3:18
1246 #, no-wrap
1247 msgid "FGETWC"
1248 msgstr "FGETWC"
1249
1250 #. type: TH
1251 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/popen.3:40
1252 #, no-wrap
1253 msgid "2013-04-19"
1254 msgstr "2013-04-19"
1255
1256 #. type: Plain text
1257 #: build/C/man3/fgetwc.3:21
1258 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1259 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1260
1261 #. type: Plain text
1262 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1263 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1264 #, no-wrap
1265 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1266 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1267
1268 #. type: Plain text
1269 #: build/C/man3/fgetwc.3:29
1270 #, no-wrap
1271 msgid ""
1272 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1273 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1274 msgstr ""
1275 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1276 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1277
1278 #. type: Plain text
1279 #: build/C/man3/fgetwc.3:44
1280 msgid ""
1281 "The B<fgetwc>()  function is the wide-character equivalent of the "
1282 "B<fgetc>(3)  function.  It reads a wide character from I<stream> and returns "
1283 "it.  If the end of stream is reached, or if I<ferror(stream)> becomes true, "
1284 "it returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1285 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1286 msgstr ""
1287 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1288 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1289 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1290 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1291 "し、 B<WEOF> を返す。"
1292
1293 #. type: Plain text
1294 #: build/C/man3/fgetwc.3:52
1295 msgid ""
1296 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1297 "may be implemented as a macro, and may evaluate its argument more than "
1298 "once.  There is no reason ever to use it."
1299 msgstr ""
1300 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1301 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1302 "ない。この関数を使う理由はもはや存在しない。"
1303
1304 #. type: Plain text
1305 #: build/C/man3/fgetwc.3:64
1306 msgid ""
1307 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1308 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1309 msgstr ""
1310 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1311 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1312
1313 #. type: Plain text
1314 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1315 msgid "Apart from the usual ones, there is"
1316 msgstr "通常のエラーに加えて、以下のエラーがある:"
1317
1318 #. type: TP
1319 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1320 #, no-wrap
1321 msgid "B<EILSEQ>"
1322 msgstr "B<EILSEQ>"
1323
1324 #. type: Plain text
1325 #: build/C/man3/fgetwc.3:70
1326 msgid ""
1327 "The data obtained from the input stream does not form a valid character."
1328 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1329
1330 #. type: Plain text
1331 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1332 msgid "C99, POSIX.1-2001."
1333 msgstr "C99, POSIX.1-2001."
1334
1335 #. type: Plain text
1336 #: build/C/man3/fgetwc.3:79
1337 msgid ""
1338 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1339 "current locale."
1340 msgstr ""
1341 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1342
1343 #. type: Plain text
1344 #: build/C/man3/fgetwc.3:87
1345 msgid ""
1346 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1347 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1348 "sequence from the stream and then convert it to a wide character."
1349 msgstr ""
1350 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1351 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1352 "換すると期待することは適切である。"
1353
1354 #. type: Plain text
1355 #: build/C/man3/fgetwc.3:92
1356 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1357 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1358
1359 #. type: TH
1360 #: build/C/man3/flockfile.3:25
1361 #, no-wrap
1362 msgid "FLOCKFILE"
1363 msgstr "FLOCKFILE"
1364
1365 #. type: TH
1366 #: build/C/man3/flockfile.3:25 build/C/man3/getline.3:26
1367 #: build/C/man2/link.2:32 build/C/man3/lseek64.3:25 build/C/man3/remove.3:31
1368 #: build/C/man2/rename.2:33 build/C/man3/setbuf.3:48 build/C/man2/symlink.2:33
1369 #: build/C/man2/unlink.2:33
1370 #, no-wrap
1371 msgid "2014-08-19"
1372 msgstr "2014-08-19"
1373
1374 #. type: Plain text
1375 #: build/C/man3/flockfile.3:28
1376 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1377 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1378
1379 #. type: Plain text
1380 #: build/C/man3/flockfile.3:33
1381 #, no-wrap
1382 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1383 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1384
1385 #. type: Plain text
1386 #: build/C/man3/flockfile.3:35
1387 #, no-wrap
1388 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1389 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1390
1391 #. type: Plain text
1392 #: build/C/man3/flockfile.3:37
1393 #, no-wrap
1394 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1395 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1396
1397 #. type: Plain text
1398 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1399 msgid "All functions shown above:"
1400 msgstr "上記の全ての関数:"
1401
1402 #. type: Plain text
1403 #: build/C/man3/flockfile.3:49
1404 msgid ""
1405 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1406 "|| _POSIX_SOURCE"
1407 msgstr ""
1408 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1409 "|| _POSIX_SOURCE"
1410
1411 #. type: Plain text
1412 #: build/C/man3/flockfile.3:63
1413 msgid ""
1414 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1415 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1416 "thread.  For each library call, these functions wait until the I<FILE> "
1417 "object is no longer locked by a different thread, then lock it, do the "
1418 "requested I/O, and unlock the object again."
1419 msgstr ""
1420 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1421 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1422 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1423 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1424 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1425 "オブジェクトのロックを解除する。"
1426
1427 #. type: Plain text
1428 #: build/C/man3/flockfile.3:69
1429 msgid ""
1430 "(Note: this locking has nothing to do with the file locking done by "
1431 "functions like B<flock>(2)  and B<lockf>(3).)"
1432 msgstr ""
1433 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1434 "全く無関係である。)"
1435
1436 #. type: Plain text
1437 #: build/C/man3/flockfile.3:77
1438 msgid ""
1439 "All this is invisible to the C-programmer, but there may be two reasons to "
1440 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1441 "actions by one thread belongs together, and should not be interrupted by the "
1442 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1443 "should be avoided for greater efficiency."
1444 msgstr ""
1445 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1446 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1447 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1448 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1449 "避ける必要があるということであろう。"
1450
1451 #. type: Plain text
1452 #: build/C/man3/flockfile.3:94
1453 msgid ""
1454 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1455 "series of I/O actions, then unlock.  This prevents other threads from coming "
1456 "in between.  If the reason for doing this was to achieve greater efficiency, "
1457 "one does the I/O with the nonlocking versions of the stdio functions: with "
1458 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1459 "B<putc>(3)."
1460 msgstr ""
1461 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1462 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1463 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1464 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1465 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1466 "B<putc_unlocked>(3)  を使用する。"
1467
1468 #. type: Plain text
1469 #: build/C/man3/flockfile.3:105
1470 msgid ""
1471 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1472 "by a different thread, then makes the current thread owner of "
1473 "I<*filehandle>, and increments the lockcount."
1474 msgstr ""
1475 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1476 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1477 "ロック数を加算する。"
1478
1479 #. type: Plain text
1480 #: build/C/man3/flockfile.3:109
1481 msgid "The B<funlockfile>()  function decrements the lock count."
1482 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1483
1484 #. type: Plain text
1485 #: build/C/man3/flockfile.3:120
1486 msgid ""
1487 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1488 "It does nothing in case some other thread owns I<*filehandle>, and it "
1489 "obtains ownership and increments the lockcount otherwise."
1490 msgstr ""
1491 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1492 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1493 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1494
1495 #. type: Plain text
1496 #: build/C/man3/flockfile.3:125
1497 msgid ""
1498 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1499 "obtained), and nonzero for failure."
1500 msgstr ""
1501 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1502 "の値を返す。"
1503
1504 #. type: Plain text
1505 #: build/C/man3/flockfile.3:127
1506 msgid "None."
1507 msgstr "なし。"
1508
1509 #. type: Plain text
1510 #: build/C/man3/flockfile.3:135
1511 msgid ""
1512 "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are "
1513 "thread-safe."
1514 msgstr ""
1515 "関数 B<flockfile>(), B<ftrylockfile>(), B<funlockfile>() はスレッドセーフであ"
1516 "る。"
1517
1518 #. type: Plain text
1519 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1520 msgid "POSIX.1-2001."
1521 msgstr "POSIX.1-2001."
1522
1523 #. type: SH
1524 #: build/C/man3/flockfile.3:137
1525 #, no-wrap
1526 msgid "AVAILABILITY"
1527 msgstr "可用性"
1528
1529 #. type: Plain text
1530 #: build/C/man3/flockfile.3:141
1531 msgid ""
1532 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1533 "defined."
1534 msgstr ""
1535 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1536 "ことができる。"
1537
1538 #. type: Plain text
1539 #: build/C/man3/flockfile.3:143
1540 msgid "B<unlocked_stdio>(3)"
1541 msgstr "B<unlocked_stdio>(3)"
1542
1543 #. type: TH
1544 #: build/C/man3/fmemopen.3:10
1545 #, no-wrap
1546 msgid "FMEMOPEN"
1547 msgstr "FMEMOPEN"
1548
1549 #. type: TH
1550 #: build/C/man3/fmemopen.3:10 build/C/man7/symlink.7:37
1551 #, no-wrap
1552 msgid "2014-04-06"
1553 msgstr "2014-04-06"
1554
1555 #. type: Plain text
1556 #: build/C/man3/fmemopen.3:13
1557 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1558 msgstr ""
1559 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1560 "する"
1561
1562 #. type: Plain text
1563 #: build/C/man3/fmemopen.3:18
1564 #, no-wrap
1565 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1566 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1567
1568 #. type: Plain text
1569 #: build/C/man3/fmemopen.3:20
1570 #, no-wrap
1571 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1572 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1573
1574 #. type: Plain text
1575 #: build/C/man3/fmemopen.3:24
1576 #, no-wrap
1577 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1578 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1579
1580 #. type: Plain text
1581 #: build/C/man3/fmemopen.3:34
1582 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1583 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1584
1585 #. type: Plain text
1586 #: build/C/man3/fmemopen.3:57
1587 msgid ""
1588 "The B<fmemopen>()  function opens a stream that permits the access specified "
1589 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1590 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1591 "long."
1592 msgstr ""
1593 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1594 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1595 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1596 "I<size> バイトの長さでなければならない。"
1597
1598 #. type: Plain text
1599 #: build/C/man3/fmemopen.3:77
1600 msgid ""
1601 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1602 "an append mode, then the initial file position is set to the location of the "
1603 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1604 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1605 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1606 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1607 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1608 "e., the value specified by the I<size> argument), rather than the current "
1609 "string length."
1610 msgstr ""
1611 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1612 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1613 "最初のヌルバイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1614 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1615 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1616 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1617 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1618 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1619 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1620
1621 #. type: Plain text
1622 #: build/C/man3/fmemopen.3:89
1623 msgid ""
1624 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1625 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1626 "there is space.  The caller should ensure that an extra byte is available in "
1627 "the buffer (and that I<size> counts that byte)  to allow for this."
1628 msgstr ""
1629 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1630 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) ヌルバイトがバッファの末"
1631 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1632 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1633
1634 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1635 #.  and
1636 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1637 #. type: Plain text
1638 #: build/C/man3/fmemopen.3:107
1639 msgid ""
1640 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1641 "(By default, such errors will be visible only when the I<stdio> buffer is "
1642 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1643 "detect errors at the time of an output operation.  Alternatively, the caller "
1644 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1645 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1646 msgstr ""
1647 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1648 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1649 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1650 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1651 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1652 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1653 "stdio に教える方法がある。)"
1654
1655 #. type: Plain text
1656 #: build/C/man3/fmemopen.3:115
1657 msgid ""
1658 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1659 "not cause read operations to return an end-of-file indication.  A read from "
1660 "the buffer will only indicate end-of-file when the file pointer advances "
1661 "I<size> bytes past the start of the buffer."
1662 msgstr ""
1663 "読み出し用にオープンされたストリームでは、 バッファ内にヌルバイト (\\(aq"
1664 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1665 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1666 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1667
1668 #. type: Plain text
1669 #: build/C/man3/fmemopen.3:130
1670 msgid ""
1671 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1672 "buffer I<size> bytes long.  This is useful for an application that wants to "
1673 "write data to a temporary buffer and then read it back again.  The buffer is "
1674 "automatically freed when the stream is closed.  Note that the caller has no "
1675 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1676 "see B<open_memstream>()  below)."
1677 msgstr ""
1678 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1679 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1680 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1681 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1682 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1683 "の B<open_memstream>()  も参照)。"
1684
1685 #. type: Plain text
1686 #: build/C/man3/fmemopen.3:141
1687 msgid ""
1688 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1689 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1690 "automatically grows as required.  After closing the stream, the caller "
1691 "should B<free>(3)  this buffer."
1692 msgstr ""
1693 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1694 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1695 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1696 "B<free>(3)  すべきである。"
1697
1698 #. type: Plain text
1699 #: build/C/man3/fmemopen.3:156
1700 msgid ""
1701 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1702 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1703 "respectively, a pointer to the buffer and the current size of the buffer.  "
1704 "These values remain valid only as long as the caller performs no further "
1705 "output on the stream.  If further output is performed, then the stream must "
1706 "again be flushed before trying to access these variables."
1707 msgstr ""
1708 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1709 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1710 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1711 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1712 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1713
1714 #. type: Plain text
1715 #: build/C/man3/fmemopen.3:162
1716 msgid ""
1717 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1718 "included in the size value stored at I<sizeloc>."
1719 msgstr ""
1720 "バッファ末尾のヌルバイトは保持される。 このヌルバイトは I<sizeloc> に格納され"
1721 "るサイズには「含まれない」。"
1722
1723 #. type: Plain text
1724 #: build/C/man3/fmemopen.3:170
1725 msgid ""
1726 "The stream's file position can be changed with B<fseek>(3)  or "
1727 "B<fseeko>(3).  Moving the file position past the end of the data already "
1728 "written fills the intervening space with zeros."
1729 msgstr ""
1730 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1731 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1732 "は 0 で埋められる。"
1733
1734 #. type: Plain text
1735 #: build/C/man3/fmemopen.3:176
1736 msgid ""
1737 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1738 "wide characters instead of bytes."
1739 msgstr ""
1740 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1741 "ド文字に対して操作を行う点が異なる。"
1742
1743 #. type: Plain text
1744 #: build/C/man3/fmemopen.3:188
1745 msgid ""
1746 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1747 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1748 "and I<errno> is set to indicate the error."
1749 msgstr ""
1750 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1751 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1752 "し、 I<errno> にエラーを示す値をセットする。"
1753
1754 #. type: SH
1755 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1756 #: build/C/man3/fseeko.3:100 build/C/man2/link.2:334 build/C/man2/open.2:1008
1757 #: build/C/man2/open_by_handle_at.2:349 build/C/man2/pipe.2:154
1758 #: build/C/man2/readlink.2:212 build/C/man2/readv.2:209
1759 #: build/C/man2/rename.2:397 build/C/man2/symlink.2:224
1760 #: build/C/man2/unlink.2:269
1761 #, no-wrap
1762 msgid "VERSIONS"
1763 msgstr "バージョン"
1764
1765 #. type: Plain text
1766 #: build/C/man3/fmemopen.3:195
1767 msgid ""
1768 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1769 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1770 msgstr ""
1771 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1772 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1773
1774 #. type: Plain text
1775 #: build/C/man3/fmemopen.3:199
1776 msgid ""
1777 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1778 "not widely available on other systems."
1779 msgstr ""
1780 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1781 "のシステムで広く利用可能である。"
1782
1783 #.  http://austingroupbugs.net/view.php?id=396
1784 #. type: Plain text
1785 #: build/C/man3/fmemopen.3:207
1786 msgid ""
1787 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1788 "However, Technical Corrigendum 1 adjusts the standard to allow "
1789 "implementation-specific treatment for this case, thus permitting the glibc "
1790 "treatment of \\(aqb\\(aq."
1791 msgstr ""
1792 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1793 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1794 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1795 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1796
1797 #. type: Plain text
1798 #: build/C/man3/fmemopen.3:213
1799 msgid ""
1800 "There is no file descriptor associated with the file stream returned by "
1801 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1802 "returned stream)."
1803 msgstr ""
1804 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1805 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1806 "とになる)。"
1807
1808 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1809 #. type: Plain text
1810 #: build/C/man3/fmemopen.3:220
1811 msgid ""
1812 "In glibc before version 2.7, seeking past the end of a stream created by "
1813 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1814 "call fails, returning -1."
1815 msgstr ""
1816 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1817 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1818 "B<fseek>(3)  が失敗し -1 が返る。"
1819
1820 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1821 #. type: Plain text
1822 #: build/C/man3/fmemopen.3:231
1823 msgid ""
1824 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1825 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1826 "stream that then returned end of file on the first attempt at reading.  "
1827 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1828 msgstr ""
1829 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1830 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1831 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1832 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1833
1834 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1835 #. type: Plain text
1836 #: build/C/man3/fmemopen.3:239
1837 msgid ""
1838 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1839 "file position to the first null byte, but (if the file offset is reset to a "
1840 "location other than the end of the stream)  does not force subsequent writes "
1841 "to append at the end of the stream."
1842 msgstr ""
1843 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1844 "ファイル位置の初期値は最初のヌルバイトに設定されるが、(ファイル\n"
1845 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1846 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1847
1848 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1849 #. type: Plain text
1850 #: build/C/man3/fmemopen.3:255
1851 msgid ""
1852 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1853 "\"), and the I<size> argument does not cover a null byte in I<buf>, then, "
1854 "according to POSIX.1-2008, the initial file position should be set to the "
1855 "next byte after the end of the buffer.  However, in this case the glibc "
1856 "B<fmemopen>()  sets the file position to -1."
1857 msgstr ""
1858 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1859 "I<size> 引き数で指定した範囲の I<buf> 内にヌルバイトがない場合、\n"
1860 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1861 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1862 "この場合ファイル位置は -1 に設定される。"
1863
1864 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1865 #. type: Plain text
1866 #: build/C/man3/fmemopen.3:268
1867 msgid ""
1868 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1869 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1870 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1871 "I<mode> by B<fopen>(3)."
1872 msgstr ""
1873 "B<fmemopen>() でバイナリモードを指定するには、\n"
1874 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1875 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1876 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1877
1878 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1879 #. type: Plain text
1880 #: build/C/man3/fmemopen.3:276
1881 msgid ""
1882 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1883 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1884 msgstr ""
1885 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1886 "ABI (Application Binary Interface) が黙って変更された。\n"
1887 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1888
1889 #. type: SH
1890 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1891 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1892 #: build/C/man2/open_by_handle_at.2:439 build/C/man2/pipe.2:165
1893 #: build/C/man3/printf.3:995 build/C/man2/readlink.2:269
1894 #: build/C/man2/readv.2:280 build/C/man3/scanf.3:704
1895 #, no-wrap
1896 msgid "EXAMPLE"
1897 msgstr "例"
1898
1899 #. type: Plain text
1900 #: build/C/man3/fmemopen.3:286
1901 msgid ""
1902 "The program below uses B<fmemopen>()  to open an input buffer, and "
1903 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1904 "scans its input string (taken from the program's first command-line "
1905 "argument) reading integers, and writes the squares of these integers to the "
1906 "output buffer.  An example of the output produced by this program is the "
1907 "following:"
1908 msgstr ""
1909 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1910 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1911 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1912 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1913 "ムの実行例は以下のようになる。"
1914
1915 #. type: Plain text
1916 #: build/C/man3/fmemopen.3:291
1917 #, no-wrap
1918 msgid ""
1919 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1920 "size=11; ptr=1 529 1849\n"
1921 msgstr ""
1922 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1923 "size=11; ptr=1 529 1849\n"
1924
1925 #. type: SS
1926 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1927 #: build/C/man2/pipe.2:181
1928 #, no-wrap
1929 msgid "Program source"
1930 msgstr "プログラムのソース"
1931
1932 #. type: Plain text
1933 #: build/C/man3/fmemopen.3:300
1934 #, no-wrap
1935 msgid ""
1936 "#define _GNU_SOURCE\n"
1937 "#include E<lt>string.hE<gt>\n"
1938 "#include E<lt>stdio.hE<gt>\n"
1939 "#include E<lt>stdlib.hE<gt>\n"
1940 msgstr ""
1941 "#define _GNU_SOURCE\n"
1942 "#include E<lt>string.hE<gt>\n"
1943 "#include E<lt>stdio.hE<gt>\n"
1944 "#include E<lt>stdlib.hE<gt>\n"
1945
1946 #. type: Plain text
1947 #: build/C/man3/fmemopen.3:303
1948 #, no-wrap
1949 msgid ""
1950 "#define handle_error(msg) \\e\n"
1951 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1952 msgstr ""
1953 "#define handle_error(msg) \\e\n"
1954 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1955
1956 #. type: Plain text
1957 #: build/C/man3/fmemopen.3:311
1958 #, no-wrap
1959 msgid ""
1960 "int\n"
1961 "main(int argc, char *argv[])\n"
1962 "{\n"
1963 "    FILE *out, *in;\n"
1964 "    int v, s;\n"
1965 "    size_t size;\n"
1966 "    char *ptr;\n"
1967 msgstr ""
1968 "int\n"
1969 "main(int argc, char *argv[])\n"
1970 "{\n"
1971 "    FILE *out, *in;\n"
1972 "    int v, s;\n"
1973 "    size_t size;\n"
1974 "    char *ptr;\n"
1975
1976 #. type: Plain text
1977 #: build/C/man3/fmemopen.3:316
1978 #, no-wrap
1979 msgid ""
1980 "    if (argc != 2) {\n"
1981 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1982 "        exit(EXIT_FAILURE);\n"
1983 "    }\n"
1984 msgstr ""
1985 "    if (argc != 2) {\n"
1986 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1987 "        exit(EXIT_FAILURE);\n"
1988 "    }\n"
1989
1990 #. type: Plain text
1991 #: build/C/man3/fmemopen.3:320
1992 #, no-wrap
1993 msgid ""
1994 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1995 "    if (in == NULL)\n"
1996 "        handle_error(\"fmemopen\");\n"
1997 msgstr ""
1998 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1999 "    if (in == NULL)\n"
2000 "        handle_error(\"fmemopen\");\n"
2001
2002 #. type: Plain text
2003 #: build/C/man3/fmemopen.3:324
2004 #, no-wrap
2005 msgid ""
2006 "    out = open_memstream(&ptr, &size);\n"
2007 "    if (out == NULL)\n"
2008 "        handle_error(\"open_memstream\");\n"
2009 msgstr ""
2010 "    out = open_memstream(&ptr, &size);\n"
2011 "    if (out == NULL)\n"
2012 "        handle_error(\"open_memstream\");\n"
2013
2014 #. type: Plain text
2015 #: build/C/man3/fmemopen.3:329
2016 #, no-wrap
2017 msgid ""
2018 "    for (;;) {\n"
2019 "        s = fscanf(in, \"%d\", &v);\n"
2020 "        if (s E<lt>= 0)\n"
2021 "            break;\n"
2022 msgstr ""
2023 "    for (;;) {\n"
2024 "        s = fscanf(in, \"%d\", &v);\n"
2025 "        if (s E<lt>= 0)\n"
2026 "            break;\n"
2027
2028 #. type: Plain text
2029 #: build/C/man3/fmemopen.3:340
2030 #, no-wrap
2031 msgid ""
2032 "        s = fprintf(out, \"%d \", v * v);\n"
2033 "        if (s == -1)\n"
2034 "            handle_error(\"fprintf\");\n"
2035 "    }\n"
2036 "    fclose(in);\n"
2037 "    fclose(out);\n"
2038 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
2039 "    free(ptr);\n"
2040 "    exit(EXIT_SUCCESS);\n"
2041 "}\n"
2042 msgstr ""
2043 "        s = fprintf(out, \"%d \", v * v);\n"
2044 "        if (s == -1)\n"
2045 "            handle_error(\"fprintf\");\n"
2046 "    }\n"
2047 "    fclose(in);\n"
2048 "    fclose(out);\n"
2049 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
2050 "    free(ptr);\n"
2051 "    exit(EXIT_SUCCESS);\n"
2052 "}\n"
2053
2054 #. type: Plain text
2055 #: build/C/man3/fmemopen.3:344
2056 msgid "B<fopen>(3), B<fopencookie>(3)"
2057 msgstr "B<fopen>(3), B<fopencookie>(3)"
2058
2059 #. type: TH
2060 #: build/C/man3/fmtmsg.3:13
2061 #, no-wrap
2062 msgid "FMTMSG"
2063 msgstr "FMTMSG"
2064
2065 #. type: Plain text
2066 #: build/C/man3/fmtmsg.3:16
2067 msgid "fmtmsg - print formatted error messages"
2068 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
2069
2070 #. type: Plain text
2071 #: build/C/man3/fmtmsg.3:19
2072 #, no-wrap
2073 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
2074 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
2075
2076 #. type: Plain text
2077 #: build/C/man3/fmtmsg.3:21
2078 #, no-wrap
2079 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
2080 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
2081
2082 #. type: Plain text
2083 #: build/C/man3/fmtmsg.3:23
2084 #, no-wrap
2085 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
2086 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
2087
2088 #. type: Plain text
2089 #: build/C/man3/fmtmsg.3:25
2090 #, no-wrap
2091 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
2092 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
2093
2094 #. type: Plain text
2095 #: build/C/man3/fmtmsg.3:36
2096 msgid ""
2097 "This function displays a message described by its arguments on the "
2098 "device(s)  specified in the I<classification> argument.  For messages "
2099 "written to I<stderr>, the format depends on the B<MSGVERB> environment "
2100 "variable."
2101 msgstr ""
2102 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
2103 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
2104 "は、 B<MSGVERB> 環境変数に依存する。"
2105
2106 #. type: Plain text
2107 #: build/C/man3/fmtmsg.3:43
2108 msgid ""
2109 "The I<label> argument identifies the source of the message.  The string must "
2110 "consist of two colon separated parts where the first part has not more than "
2111 "10 and the second part not more than 14 characters."
2112 msgstr ""
2113 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
2114 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
2115 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
2116
2117 #. type: Plain text
2118 #: build/C/man3/fmtmsg.3:47
2119 msgid "The I<text> argument describes the condition of the error."
2120 msgstr "I<text> 引き数にはエラー条件を記述する。"
2121
2122 #. type: Plain text
2123 #: build/C/man3/fmtmsg.3:52
2124 msgid ""
2125 "The I<action> argument describes possible steps to recover from the error.  "
2126 "If it is printed, it is prefixed by \"TO FIX: \"."
2127 msgstr ""
2128 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
2129 "れが表示される場合、\"TO FIX: \" が前に付く。"
2130
2131 #. type: Plain text
2132 #: build/C/man3/fmtmsg.3:60
2133 msgid ""
2134 "The I<tag> argument is a reference to the online documentation where more "
2135 "information can be found.  It should contain the I<label> value and a unique "
2136 "identification number."
2137 msgstr ""
2138 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
2139 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
2140
2141 #. type: SS
2142 #: build/C/man3/fmtmsg.3:60
2143 #, no-wrap
2144 msgid "Dummy arguments"
2145 msgstr "ダミー引き数"
2146
2147 #. type: Plain text
2148 #: build/C/man3/fmtmsg.3:79
2149 msgid ""
2150 "Each of the arguments can have a dummy value.  The dummy classification "
2151 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
2152 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
2153 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
2154 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
2155 "synonym for B<NO_SEV>."
2156 msgstr ""
2157 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
2158 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
2159 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
2160 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は "
2161 "I<((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別"
2162 "名である。"
2163
2164 #. type: SS
2165 #: build/C/man3/fmtmsg.3:79
2166 #, no-wrap
2167 msgid "The classification argument"
2168 msgstr "classification 引き数"
2169
2170 #. type: Plain text
2171 #: build/C/man3/fmtmsg.3:83
2172 msgid ""
2173 "The I<classification> argument is the sum of values describing 4 types of "
2174 "information."
2175 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
2176
2177 #. type: Plain text
2178 #: build/C/man3/fmtmsg.3:86
2179 msgid "The first value defines the output channel."
2180 msgstr "最初の値は出力チャンネルを定義する。"
2181
2182 #. type: TP
2183 #: build/C/man3/fmtmsg.3:86
2184 #, no-wrap
2185 msgid "B<MM_PRINT>"
2186 msgstr "B<MM_PRINT>"
2187
2188 #. type: Plain text
2189 #: build/C/man3/fmtmsg.3:90
2190 msgid "Output to I<stderr>."
2191 msgstr "I<stderr> に出力する。"
2192
2193 #. type: TP
2194 #: build/C/man3/fmtmsg.3:90
2195 #, no-wrap
2196 msgid "B<MM_CONSOLE>"
2197 msgstr "B<MM_CONSOLE>"
2198
2199 #. type: Plain text
2200 #: build/C/man3/fmtmsg.3:93
2201 msgid "Output to the system console."
2202 msgstr "システムコンソールに出力する。"
2203
2204 #. type: TP
2205 #: build/C/man3/fmtmsg.3:93
2206 #, no-wrap
2207 msgid "B<MM_PRINT | MM_CONSOLE>"
2208 msgstr "B<MM_PRINT | MM_CONSOLE>"
2209
2210 #. type: Plain text
2211 #: build/C/man3/fmtmsg.3:96
2212 msgid "Output to both."
2213 msgstr "両方に出力する。"
2214
2215 #. type: Plain text
2216 #: build/C/man3/fmtmsg.3:98
2217 msgid "The second value is the source of the error:"
2218 msgstr "2 番目の値はエラーの発生源である:"
2219
2220 #. type: TP
2221 #: build/C/man3/fmtmsg.3:98
2222 #, no-wrap
2223 msgid "B<MM_HARD>"
2224 msgstr "B<MM_HARD>"
2225
2226 #. type: Plain text
2227 #: build/C/man3/fmtmsg.3:101
2228 msgid "A hardware error occurred."
2229 msgstr "ハードウェアエラーが起こった。"
2230
2231 #. type: TP
2232 #: build/C/man3/fmtmsg.3:101
2233 #, no-wrap
2234 msgid "B<MM_FIRM>"
2235 msgstr "B<MM_FIRM>"
2236
2237 #. type: Plain text
2238 #: build/C/man3/fmtmsg.3:104
2239 msgid "A firmware error occurred."
2240 msgstr "ファームウェアエラーが起こった。"
2241
2242 #. type: TP
2243 #: build/C/man3/fmtmsg.3:104
2244 #, no-wrap
2245 msgid "B<MM_SOFT>"
2246 msgstr "B<MM_SOFT>"
2247
2248 #. type: Plain text
2249 #: build/C/man3/fmtmsg.3:107
2250 msgid "A software error occurred."
2251 msgstr "ソフトウェアエラーが起こった。"
2252
2253 #. type: Plain text
2254 #: build/C/man3/fmtmsg.3:109
2255 msgid "The third value encodes the detector of the problem:"
2256 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2257
2258 #. type: TP
2259 #: build/C/man3/fmtmsg.3:109
2260 #, no-wrap
2261 msgid "B<MM_APPL>"
2262 msgstr "B<MM_APPL>"
2263
2264 #. type: Plain text
2265 #: build/C/man3/fmtmsg.3:112
2266 msgid "It is detected by an application."
2267 msgstr "アプリケーションによって検知された。"
2268
2269 #. type: TP
2270 #: build/C/man3/fmtmsg.3:112
2271 #, no-wrap
2272 msgid "B<MM_UTIL>"
2273 msgstr "B<MM_UTIL>"
2274
2275 #. type: Plain text
2276 #: build/C/man3/fmtmsg.3:115
2277 msgid "It is detected by a utility."
2278 msgstr "ユーティリティによって検知された。"
2279
2280 #. type: TP
2281 #: build/C/man3/fmtmsg.3:115
2282 #, no-wrap
2283 msgid "B<MM_OPSYS>"
2284 msgstr "B<MM_OPSYS>"
2285
2286 #. type: Plain text
2287 #: build/C/man3/fmtmsg.3:118
2288 msgid "It is detected by the operating system."
2289 msgstr "オペレーティングシステムによって検知された。"
2290
2291 #. type: Plain text
2292 #: build/C/man3/fmtmsg.3:120
2293 msgid "The fourth value shows the severity of the incident:"
2294 msgstr "4 番目の値は問題の重大度を表す:"
2295
2296 #. type: TP
2297 #: build/C/man3/fmtmsg.3:120
2298 #, no-wrap
2299 msgid "B<MM_RECOVER>"
2300 msgstr "B<MM_RECOVER>"
2301
2302 #. type: Plain text
2303 #: build/C/man3/fmtmsg.3:123
2304 msgid "It is a recoverable error."
2305 msgstr "回復可能なエラーである。"
2306
2307 #. type: TP
2308 #: build/C/man3/fmtmsg.3:123
2309 #, no-wrap
2310 msgid "B<MM_NRECOV>"
2311 msgstr "B<MM_NRECOV>"
2312
2313 #. type: Plain text
2314 #: build/C/man3/fmtmsg.3:126
2315 msgid "It is a nonrecoverable error."
2316 msgstr "回復不可能なエラーである。"
2317
2318 #. type: SS
2319 #: build/C/man3/fmtmsg.3:126
2320 #, no-wrap
2321 msgid "The severity argument"
2322 msgstr "severity 引き数"
2323
2324 #. type: Plain text
2325 #: build/C/man3/fmtmsg.3:130
2326 msgid "The I<severity> argument can take one of the following values:"
2327 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2328
2329 #. type: TP
2330 #: build/C/man3/fmtmsg.3:130
2331 #, no-wrap
2332 msgid "B<MM_NOSEV>"
2333 msgstr "B<MM_NOSEV>"
2334
2335 #. type: Plain text
2336 #: build/C/man3/fmtmsg.3:133
2337 msgid "No severity is printed."
2338 msgstr "重大度は表示されない。"
2339
2340 #. type: TP
2341 #: build/C/man3/fmtmsg.3:133
2342 #, no-wrap
2343 msgid "B<MM_HALT>"
2344 msgstr "B<MM_HALT>"
2345
2346 #. type: Plain text
2347 #: build/C/man3/fmtmsg.3:136
2348 msgid "This value is printed as HALT."
2349 msgstr "この値は HALT として表示される。"
2350
2351 #. type: TP
2352 #: build/C/man3/fmtmsg.3:136
2353 #, no-wrap
2354 msgid "B<MM_ERROR>"
2355 msgstr "B<MM_ERROR>"
2356
2357 #. type: Plain text
2358 #: build/C/man3/fmtmsg.3:139
2359 msgid "This value is printed as ERROR."
2360 msgstr "この値は ERROR として表示される。"
2361
2362 #. type: TP
2363 #: build/C/man3/fmtmsg.3:139
2364 #, no-wrap
2365 msgid "B<MM_WARNING>"
2366 msgstr "B<MM_WARNING>"
2367
2368 #. type: Plain text
2369 #: build/C/man3/fmtmsg.3:142
2370 msgid "This value is printed as WARNING."
2371 msgstr "この値は WARNING として表示される。"
2372
2373 #. type: TP
2374 #: build/C/man3/fmtmsg.3:142
2375 #, no-wrap
2376 msgid "B<MM_INFO>"
2377 msgstr "B<MM_INFO>"
2378
2379 #. type: Plain text
2380 #: build/C/man3/fmtmsg.3:145
2381 msgid "This value is printed as INFO."
2382 msgstr "この値は INFO として表示される。"
2383
2384 #. type: Plain text
2385 #: build/C/man3/fmtmsg.3:152
2386 msgid ""
2387 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2388 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2389 "print."
2390 msgstr ""
2391 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2392 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2393
2394 #. type: Plain text
2395 #: build/C/man3/fmtmsg.3:154
2396 msgid "The function can return 4 values:"
2397 msgstr "関数は 4 つの値を返す:"
2398
2399 #. type: TP
2400 #: build/C/man3/fmtmsg.3:154
2401 #, no-wrap
2402 msgid "B<MM_OK>"
2403 msgstr "B<MM_OK>"
2404
2405 #. type: Plain text
2406 #: build/C/man3/fmtmsg.3:157
2407 msgid "Everything went smooth."
2408 msgstr "全てがうまくいった。"
2409
2410 #. type: TP
2411 #: build/C/man3/fmtmsg.3:157
2412 #, no-wrap
2413 msgid "B<MM_NOTOK>"
2414 msgstr "B<MM_NOTOK>"
2415
2416 #. type: Plain text
2417 #: build/C/man3/fmtmsg.3:160
2418 msgid "Complete failure."
2419 msgstr "完全に失敗した。"
2420
2421 #. type: TP
2422 #: build/C/man3/fmtmsg.3:160
2423 #, no-wrap
2424 msgid "B<MM_NOMSG>"
2425 msgstr "B<MM_NOMSG>"
2426
2427 #. type: Plain text
2428 #: build/C/man3/fmtmsg.3:164
2429 msgid "Error writing to I<stderr>."
2430 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2431
2432 #. type: TP
2433 #: build/C/man3/fmtmsg.3:164
2434 #, no-wrap
2435 msgid "B<MM_NOCON>"
2436 msgstr "B<MM_NOCON>"
2437
2438 #. type: Plain text
2439 #: build/C/man3/fmtmsg.3:167
2440 msgid "Error writing to the console."
2441 msgstr "コンソールに書き込むときにエラーが起こった。"
2442
2443 #. type: SH
2444 #: build/C/man3/fmtmsg.3:167
2445 #, no-wrap
2446 msgid "ENVIRONMENT"
2447 msgstr "環境変数"
2448
2449 #. type: Plain text
2450 #: build/C/man3/fmtmsg.3:178
2451 msgid ""
2452 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2453 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2454 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2455 "separated list of valid keywords, then only the parts of the message "
2456 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2457 "\"severity\", \"text\", \"action\" and \"tag\"."
2458 msgstr ""
2459 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2460 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2461 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2462 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2463 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2464
2465 #. type: Plain text
2466 #: build/C/man3/fmtmsg.3:190
2467 msgid ""
2468 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2469 "levels.  By default, only the five severity levels described above are "
2470 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2471 "If the user puts B<SEV_LEVEL> with a format like"
2472 msgstr ""
2473 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2474 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2475 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2476 "B<SEV_LEVEL> を"
2477
2478 #. type: Plain text
2479 #: build/C/man3/fmtmsg.3:193
2480 msgid "SEV_LEVEL=[description[:description[:...]]]"
2481 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2482
2483 #. type: Plain text
2484 #: build/C/man3/fmtmsg.3:198
2485 msgid ""
2486 "in the environment of the process before the first call to B<fmtmsg>(), "
2487 "where each description is of the form"
2488 msgstr ""
2489 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2490 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2491 "指定された printstring を表示する。 各 description は"
2492
2493 #. type: Plain text
2494 #: build/C/man3/fmtmsg.3:201
2495 msgid "severity-keyword,level,printstring"
2496 msgstr "severity-keyword,level,printstring"
2497
2498 #. type: Plain text
2499 #: build/C/man3/fmtmsg.3:208
2500 msgid ""
2501 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2502 "addition to the standard levels 0-4), and use the indicated printstring when "
2503 "such a level occurs."
2504 msgstr "という形式である。"
2505
2506 #. type: Plain text
2507 #: build/C/man3/fmtmsg.3:222
2508 msgid ""
2509 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2510 "present.  The level part is a string representation of a number.  The "
2511 "numeric value must be a number greater than 4.  This value must be used in "
2512 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2513 "possible to overwrite any of the predefined classes.  The printstring is the "
2514 "string printed when a message of this class is processed by B<fmtmsg>()."
2515 msgstr ""
2516 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2517 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2518 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2519 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2520 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2521 "た場合に表示される文字列である。"
2522
2523 #. type: Plain text
2524 #: build/C/man3/fmtmsg.3:225
2525 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2526 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2527
2528 #. type: Plain text
2529 #: build/C/man3/fmtmsg.3:231
2530 msgid ""
2531 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2532 "not protected, so it is not thread-safe."
2533 msgstr ""
2534 "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的"
2535 "な変数を使うため、 スレッドセーフではない。"
2536
2537 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2538 #. type: Plain text
2539 #: build/C/man3/fmtmsg.3:237
2540 msgid ""
2541 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2542 "static variable, so it is thread-safe."
2543 msgstr ""
2544 "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護してお"
2545 "り、 スレッドセーフである。"
2546
2547 #. type: Plain text
2548 #: build/C/man3/fmtmsg.3:252
2549 msgid ""
2550 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2551 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2552 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2553 msgstr ""
2554 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2555 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2556 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2557
2558 #. type: Plain text
2559 #: build/C/man3/fmtmsg.3:256
2560 msgid ""
2561 "System V and UnixWare man pages tell us that these functions have been "
2562 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2563 "vlfmt()\", and will be removed later."
2564 msgstr ""
2565 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と "
2566 "addsev()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられてお"
2567 "り、 将来は削除される予定である」と書かれている。"
2568
2569 #. type: Plain text
2570 #: build/C/man3/fmtmsg.3:261
2571 #, no-wrap
2572 msgid ""
2573 "#include E<lt>stdio.hE<gt>\n"
2574 "#include E<lt>stdlib.hE<gt>\n"
2575 "#include E<lt>fmtmsg.hE<gt>\n"
2576 msgstr ""
2577 "#include E<lt>stdio.hE<gt>\n"
2578 "#include E<lt>stdlib.hE<gt>\n"
2579 "#include E<lt>fmtmsg.hE<gt>\n"
2580
2581 #. type: Plain text
2582 #: build/C/man3/fmtmsg.3:267
2583 #, no-wrap
2584 msgid ""
2585 "int\n"
2586 "main(void)\n"
2587 "{\n"
2588 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2589 "    int err;\n"
2590 msgstr ""
2591 "int\n"
2592 "main(void)\n"
2593 "{\n"
2594 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2595 "    int err;\n"
2596
2597 #. type: Plain text
2598 #: build/C/man3/fmtmsg.3:288
2599 #, no-wrap
2600 msgid ""
2601 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2602 "                \"unknown mount option\", \"See mount(8).\",\n"
2603 "                \"util-linux:mount:017\");\n"
2604 "    switch (err) {\n"
2605 "    case MM_OK:\n"
2606 "        break;\n"
2607 "    case MM_NOTOK:\n"
2608 "        printf(\"Nothing printed\\en\");\n"
2609 "        break;\n"
2610 "    case MM_NOMSG:\n"
2611 "        printf(\"Nothing printed to stderr\\en\");\n"
2612 "        break;\n"
2613 "    case MM_NOCON:\n"
2614 "        printf(\"No console output\\en\");\n"
2615 "        break;\n"
2616 "    default:\n"
2617 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2618 "    }\n"
2619 "    exit(EXIT_SUCCESS);\n"
2620 "}\n"
2621 msgstr ""
2622 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2623 "                \"unknown mount option\", \"See mount(8).\",\n"
2624 "                \"util-linux:mount:017\");\n"
2625 "    switch (err) {\n"
2626 "    case MM_OK:\n"
2627 "      break;\n"
2628 "    case MM_NOTOK:\n"
2629 "        printf(\"Nothing printed\\en\");\n"
2630 "        break;\n"
2631 "    case MM_NOMSG:\n"
2632 "        printf(\"Nothing printed to stderr\\en\");\n"
2633 "        break;\n"
2634 "    case MM_NOCON:\n"
2635 "        printf(\"No console output\\en\");\n"
2636 "        break;\n"
2637 "    default:\n"
2638 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2639 "    }\n"
2640 "    exit(EXIT_SUCCESS);\n"
2641 "}\n"
2642
2643 #. type: Plain text
2644 #: build/C/man3/fmtmsg.3:291
2645 msgid "The output should be:"
2646 msgstr "出力は"
2647
2648 #. type: Plain text
2649 #: build/C/man3/fmtmsg.3:295
2650 #, no-wrap
2651 msgid ""
2652 "    util-linux:mount: ERROR: unknown mount option\n"
2653 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2654 msgstr ""
2655 "    util-linux:mount: ERROR: unknown mount option\n"
2656 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2657
2658 #. type: Plain text
2659 #: build/C/man3/fmtmsg.3:298
2660 msgid "and after"
2661 msgstr "のようになり、"
2662
2663 #. type: Plain text
2664 #: build/C/man3/fmtmsg.3:301
2665 #, no-wrap
2666 msgid "    MSGVERB=text:action; export MSGVERB\n"
2667 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2668
2669 #. type: Plain text
2670 #: build/C/man3/fmtmsg.3:304
2671 msgid "the output becomes:"
2672 msgstr "を実行すると、次のようになる。"
2673
2674 #. type: Plain text
2675 #: build/C/man3/fmtmsg.3:308
2676 #, no-wrap
2677 msgid ""
2678 "    unknown mount option\n"
2679 "    TO FIX: See mount(8).\n"
2680 msgstr ""
2681 "    unknown mount option\n"
2682 "    TO FIX: See mount(8).\n"
2683
2684 #. type: Plain text
2685 #: build/C/man3/fmtmsg.3:312
2686 msgid "B<addseverity>(3), B<perror>(3)"
2687 msgstr "B<addseverity>(3), B<perror>(3)"
2688
2689 #. type: TH
2690 #: build/C/man3/fopen.3:44
2691 #, no-wrap
2692 msgid "FOPEN"
2693 msgstr "FOPEN"
2694
2695 #. type: TH
2696 #: build/C/man3/fopen.3:44
2697 #, no-wrap
2698 msgid "2012-04-22"
2699 msgstr "2012-04-22"
2700
2701 #. type: Plain text
2702 #: build/C/man3/fopen.3:47
2703 msgid "fopen, fdopen, freopen - stream open functions"
2704 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2705
2706 #. type: Plain text
2707 #: build/C/man3/fopen.3:52
2708 #, no-wrap
2709 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2710 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2711
2712 #. type: Plain text
2713 #: build/C/man3/fopen.3:54
2714 #, no-wrap
2715 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2716 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2717
2718 #. type: Plain text
2719 #: build/C/man3/fopen.3:56
2720 #, no-wrap
2721 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2722 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2723
2724 #. type: Plain text
2725 #: build/C/man3/fopen.3:65
2726 msgid ""
2727 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2728 msgstr ""
2729 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2730
2731 #. type: Plain text
2732 #: build/C/man3/fopen.3:71
2733 msgid ""
2734 "The B<fopen>()  function opens the file whose name is the string pointed to "
2735 "by I<path> and associates a stream with it."
2736 msgstr ""
2737 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2738 "びつける。"
2739
2740 #. type: Plain text
2741 #: build/C/man3/fopen.3:76
2742 msgid ""
2743 "The argument I<mode> points to a string beginning with one of the following "
2744 "sequences (possibly followed by additional characters, as described below):"
2745 msgstr ""
2746 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2747 "る (以下の述べる、追加の文字が後に続くこともある):"
2748
2749 #. type: TP
2750 #: build/C/man3/fopen.3:76
2751 #, no-wrap
2752 msgid "B<r>"
2753 msgstr "B<r>"
2754
2755 #. type: Plain text
2756 #: build/C/man3/fopen.3:80
2757 msgid ""
2758 "Open text file for reading.  The stream is positioned at the beginning of "
2759 "the file."
2760 msgstr ""
2761 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2762 "る。"
2763
2764 #. type: TP
2765 #: build/C/man3/fopen.3:80
2766 #, no-wrap
2767 msgid "B<r+>"
2768 msgstr "B<r+>"
2769
2770 #. type: Plain text
2771 #: build/C/man3/fopen.3:84
2772 msgid ""
2773 "Open for reading and writing.  The stream is positioned at the beginning of "
2774 "the file."
2775 msgstr ""
2776 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2777 "る。"
2778
2779 #. type: TP
2780 #: build/C/man3/fopen.3:84
2781 #, no-wrap
2782 msgid "B<w>"
2783 msgstr "B<w>"
2784
2785 #. type: Plain text
2786 #: build/C/man3/fopen.3:88
2787 msgid ""
2788 "Truncate file to zero length or create text file for writing.  The stream is "
2789 "positioned at the beginning of the file."
2790 msgstr ""
2791 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2792 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2793 "頭に位置される。"
2794
2795 #. type: TP
2796 #: build/C/man3/fopen.3:88
2797 #, no-wrap
2798 msgid "B<w+>"
2799 msgstr "B<w+>"
2800
2801 #. type: Plain text
2802 #: build/C/man3/fopen.3:94
2803 msgid ""
2804 "Open for reading and writing.  The file is created if it does not exist, "
2805 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2806 "file."
2807 msgstr ""
2808 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2809 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2810 "の先頭に位置される。"
2811
2812 #. type: TP
2813 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2814 #, no-wrap
2815 msgid "B<a>"
2816 msgstr "B<a>"
2817
2818 #. type: Plain text
2819 #: build/C/man3/fopen.3:99
2820 msgid ""
2821 "Open for appending (writing at end of file).  The file is created if it does "
2822 "not exist.  The stream is positioned at the end of the file."
2823 msgstr ""
2824 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2825 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2826
2827 #. type: TP
2828 #: build/C/man3/fopen.3:99
2829 #, no-wrap
2830 msgid "B<a+>"
2831 msgstr "B<a+>"
2832
2833 #. type: Plain text
2834 #: build/C/man3/fopen.3:105
2835 msgid ""
2836 "Open for reading and appending (writing at end of file).  The file is "
2837 "created if it does not exist.  The initial file position for reading is at "
2838 "the beginning of the file, but output is always appended to the end of the "
2839 "file."
2840 msgstr ""
2841 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2842 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2843 "あるが、 書き込みは常にファイルの最後に追加される。"
2844
2845 #. type: Plain text
2846 #: build/C/man3/fopen.3:118
2847 msgid ""
2848 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2849 "character or as a character between the characters in any of the two-"
2850 "character strings described above.  This is strictly for compatibility with "
2851 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2852 "systems, including Linux.  (Other systems may treat text files and binary "
2853 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2854 "O to a binary file and expect that your program may be ported to non-UNIX "
2855 "environments.)"
2856 msgstr ""
2857 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2858 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2859 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2860 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2861 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2862 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2863 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2864 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2865
2866 #. type: Plain text
2867 #: build/C/man3/fopen.3:121
2868 msgid "See NOTES below for details of glibc extensions for I<mode>."
2869 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2870
2871 #. type: Plain text
2872 #: build/C/man3/fopen.3:126
2873 msgid ""
2874 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2875 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2876 "umask value (see B<umask>(2))."
2877 msgstr ""
2878 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2879 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2880 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2881
2882 #. type: Plain text
2883 #: build/C/man3/fopen.3:141
2884 msgid ""
2885 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2886 "that ANSI C requires that a file positioning function intervene between "
2887 "output and input, unless an input operation encounters end-of-file.  (If "
2888 "this condition is not met, then a read is allowed to return the result of "
2889 "writes other than the most recent.)  Therefore it is good practice (and "
2890 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or "
2891 "B<fgetpos>(3)  operation between write and read operations on such a "
2892 "stream.  This operation may be an apparent no-op (as in I<fseek(..., 0L, "
2893 "SEEK_CUR)> called for its synchronizing side effect)."
2894 msgstr ""
2895 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2896 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2897 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2898 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2899 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2900 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2901 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2902 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2903 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2904 "い)。"
2905
2906 #. type: Plain text
2907 #: build/C/man3/fopen.3:146
2908 msgid ""
2909 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2910 "causes all subsequent write operations to this stream to occur at end-of-"
2911 "file, as if preceded the call:"
2912 msgstr ""
2913 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2914 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2915 "かのように) ファイルの末尾で行われる。"
2916
2917 #. type: Plain text
2918 #: build/C/man3/fopen.3:149
2919 #, no-wrap
2920 msgid "    fseek(stream, 0, SEEK_END);\n"
2921 msgstr "    fseek(stream, 0, SEEK_END);\n"
2922
2923 #. type: Plain text
2924 #: build/C/man3/fopen.3:171
2925 msgid ""
2926 "The B<fdopen>()  function associates a stream with the existing file "
2927 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2928 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2929 "file descriptor.  The file position indicator of the new stream is set to "
2930 "that belonging to I<fd>, and the error and end-of-file indicators are "
2931 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2932 "file descriptor is not dup'ed, and will be closed when the stream created by "
2933 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2934 "memory object is undefined."
2935 msgstr ""
2936 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2937 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2938 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2939 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2940 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2941 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2942 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2943 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2944
2945 #. type: Plain text
2946 #: build/C/man3/fopen.3:189
2947 msgid ""
2948 "The B<freopen>()  function opens the file whose name is the string pointed "
2949 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2950 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2951 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2952 "function is to change the file associated with a standard text stream "
2953 "(I<stderr>, I<stdin>, or I<stdout>)."
2954 msgstr ""
2955 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2956 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2957 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2958 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2959 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2960
2961 #. type: Plain text
2962 #: build/C/man3/fopen.3:201
2963 msgid ""
2964 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2965 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2966 "indicate the error."
2967 msgstr ""
2968 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2969 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2970
2971 #. type: TP
2972 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2973 #: build/C/man3/getline.3:128 build/C/man2/link.2:282 build/C/man2/llseek.2:77
2974 #: build/C/man2/lseek.2:192 build/C/man2/open.2:825 build/C/man2/open.2:833
2975 #: build/C/man2/open.2:838 build/C/man2/open_by_handle_at.2:273
2976 #: build/C/man2/open_by_handle_at.2:277 build/C/man2/open_by_handle_at.2:325
2977 #: build/C/man2/pipe.2:143 build/C/man2/read.2:126 build/C/man2/read.2:137
2978 #: build/C/man2/readlink.2:169 build/C/man2/readlink.2:178
2979 #: build/C/man2/readv.2:200 build/C/man2/rename.2:251
2980 #: build/C/man2/rename.2:376 build/C/man2/rename.2:385 build/C/man2/rmdir.2:67
2981 #: build/C/man3/scanf.3:565 build/C/man2/unlink.2:252 build/C/man2/write.2:154
2982 #, no-wrap
2983 msgid "B<EINVAL>"
2984 msgstr "B<EINVAL>"
2985
2986 #. type: Plain text
2987 #: build/C/man3/fopen.3:212
2988 msgid ""
2989 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2990 "invalid."
2991 msgstr ""
2992 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2993
2994 #. type: Plain text
2995 #: build/C/man3/fopen.3:222
2996 msgid ""
2997 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2998 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2999 msgstr ""
3000 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
3001 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
3002 "する。"
3003
3004 #. type: Plain text
3005 #: build/C/man3/fopen.3:229
3006 msgid ""
3007 "The B<fopen>()  function may also fail and set I<errno> for any of the "
3008 "errors specified for the routine B<open>(2)."
3009 msgstr ""
3010 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
3011 "があり、 その時は対応する値に I<errno> をセットする。"
3012
3013 #. type: Plain text
3014 #: build/C/man3/fopen.3:236
3015 msgid ""
3016 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
3017 "errors specified for the routine B<fcntl>(2)."
3018 msgstr ""
3019 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
3020 "とがあり、 その時は対応する値に I<errno> をセットする。"
3021
3022 #. type: Plain text
3023 #: build/C/man3/fopen.3:246
3024 msgid ""
3025 "The B<freopen>()  function may also fail and set I<errno> for any of the "
3026 "errors specified for the routines B<open>(2), B<fclose>(3), and B<fflush>(3)."
3027 msgstr ""
3028 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
3029 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
3030 "トする。"
3031
3032 #. type: Plain text
3033 #: build/C/man3/fopen.3:255
3034 msgid ""
3035 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The "
3036 "B<fdopen>()  function conforms to POSIX.1-1990."
3037 msgstr ""
3038 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
3039 "は POSIX.1-1990 に準拠している。"
3040
3041 #. type: SS
3042 #: build/C/man3/fopen.3:256 build/C/man2/link.2:385
3043 #: build/C/man2/readlink.2:256 build/C/man2/rename.2:415
3044 #: build/C/man2/symlink.2:247 build/C/man2/unlink.2:282
3045 #, no-wrap
3046 msgid "Glibc notes"
3047 msgstr "glibc での注意"
3048
3049 #. type: Plain text
3050 #: build/C/man3/fopen.3:259
3051 msgid ""
3052 "The GNU C library allows the following extensions for the string specified "
3053 "in I<mode>:"
3054 msgstr ""
3055 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
3056 "いる:"
3057
3058 #. type: TP
3059 #: build/C/man3/fopen.3:259
3060 #, no-wrap
3061 msgid "B<c> (since glibc 2.3.3)"
3062 msgstr "B<c> (glibc 2.3.3 以降)"
3063
3064 #. type: Plain text
3065 #: build/C/man3/fopen.3:266
3066 msgid ""
3067 "Do not make the open operation, or subsequent read and write operations, "
3068 "thread cancellation points.  This flag is ignored for B<fdopen>()."
3069 msgstr ""
3070 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
3071 "(cancellation points) を作成しない。\n"
3072 "このフラグは B<fdopen>() では無視される。"
3073
3074 #. type: TP
3075 #: build/C/man3/fopen.3:266
3076 #, no-wrap
3077 msgid "B<e> (since glibc 2.7)"
3078 msgstr "B<e> (glibc 2.7 以降)"
3079
3080 #. type: Plain text
3081 #: build/C/man3/fopen.3:276
3082 msgid ""
3083 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
3084 "information.  This flag is ignored for B<fdopen>()."
3085 msgstr ""
3086 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
3087 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
3088
3089 #. type: TP
3090 #: build/C/man3/fopen.3:276
3091 #, no-wrap
3092 msgid "B<m> (since glibc 2.3)"
3093 msgstr "B<m> (glibc 2.3 以降)"
3094
3095 #.  As at glibc 2.4:
3096 #. type: Plain text
3097 #: build/C/man3/fopen.3:288
3098 msgid ""
3099 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
3100 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
3101 "for a file opened for reading."
3102 msgstr ""
3103 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
3104 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
3105 "オープンするファイルについてだけである。"
3106
3107 #. type: TP
3108 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
3109 #, no-wrap
3110 msgid "B<x>"
3111 msgstr "B<x>"
3112
3113 #.  Since glibc 2.0?
3114 #.  FIXME . C11 specifies this flag
3115 #. type: Plain text
3116 #: build/C/man3/fopen.3:305
3117 msgid ""
3118 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
3119 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
3120 "This flag is ignored for B<fdopen>()."
3121 msgstr ""
3122 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
3123 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
3124 "セットされる。 このフラグは B<fdopen>()  では無視される。"
3125
3126 #. type: Plain text
3127 #: build/C/man3/fopen.3:313
3128 msgid ""
3129 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
3130 "the following syntax in I<mode>:"
3131 msgstr ""
3132 "上記の文字に加えて、\n"
3133 "B<fopen>() と B<freopen>() では I<mode> に\n"
3134 "以下の書式を 指定することができる。"
3135
3136 #. type: Plain text
3137 #: build/C/man3/fopen.3:315
3138 msgid "B< ,ccs=>I<string>"
3139 msgstr "B< ,ccs=>I<string>"
3140
3141 #. type: Plain text
3142 #: build/C/man3/fopen.3:331
3143 msgid ""
3144 "The given I<string> is taken as the name of a coded character set and the "
3145 "stream is marked as wide-oriented.  Thereafter, internal conversion "
3146 "functions convert I/O to and from the character set I<string>.  If the B<,"
3147 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
3148 "stream is determined by the first file operation.  If that operation is a "
3149 "wide-character operation, the stream is marked wide-oriented, and functions "
3150 "to convert to the coded character set are loaded."
3151 msgstr ""
3152 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
3153 "ストリームではワイド文字のストリームとして扱われる。\n"
3154 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
3155 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
3156 "ストリームをワイド文字のストリームとして扱うかは\n"
3157 "最初のファイル操作時に決定される。\n"
3158 "最初のファイル操作がワイド文字操作であった場合は、\n"
3159 "そのストリームはワイド文字のストリームとして扱われ、\n"
3160 "符号化文字集合との変換を行う関数が読み込まれる。"
3161
3162 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12685
3163 #. type: Plain text
3164 #: build/C/man3/fopen.3:348
3165 msgid ""
3166 "When parsing for individual flag characters in I<mode> (i.e., the characters "
3167 "preceding the \"ccs\" specification), the glibc implementation of "
3168 "B<fopen>()  and B<freopen>()  limits the number of characters examined in "
3169 "I<mode> to 7 (or, in glibc versions before 2.14, to 6, which was not enough "
3170 "to include possible specifications such as \"rb+cmxe\").  The current "
3171 "implementation of B<fdopen>()  parses at most 5 characters in I<mode>."
3172 msgstr ""
3173 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
3174 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
3175 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
3176 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
3177 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
3178 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
3179
3180 #. type: Plain text
3181 #: build/C/man3/fopen.3:354
3182 msgid ""
3183 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
3184 msgstr ""
3185 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
3186
3187 #. type: TH
3188 #: build/C/man3/fopencookie.3:26
3189 #, no-wrap
3190 msgid "FOPENCOOKIE"
3191 msgstr "FOPENCOOKIE"
3192
3193 #. type: TH
3194 #: build/C/man3/fopencookie.3:26
3195 #, no-wrap
3196 msgid "2013-03-17"
3197 msgstr "2013-03-17"
3198
3199 #. type: TH
3200 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:32
3201 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
3202 #: build/C/man2/open.2:51 build/C/man2/open_by_handle_at.2:25
3203 #: build/C/man2/pipe.2:36 build/C/man2/read.2:35 build/C/man2/readlink.2:44
3204 #: build/C/man2/readv.2:32 build/C/man2/rename.2:33 build/C/man2/rmdir.2:30
3205 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man2/symlink.2:33
3206 #: build/C/man7/symlink.7:37 build/C/man2/unlink.2:33 build/C/man2/write.2:39
3207 #, no-wrap
3208 msgid "Linux"
3209 msgstr "Linux"
3210
3211 #. type: Plain text
3212 #: build/C/man3/fopencookie.3:29
3213 msgid "fopencookie - opening a custom stream"
3214 msgstr ""
3215
3216 #. type: Plain text
3217 #: build/C/man3/fopencookie.3:36
3218 #, no-wrap
3219 msgid ""
3220 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3221 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3222 msgstr ""
3223 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3224 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3225
3226 #. type: Plain text
3227 #: build/C/man3/fopencookie.3:49
3228 msgid ""
3229 "The B<fopencookie>()  function allows the programmer to create a custom "
3230 "implementation for a standard I/O stream.  This implementation can store the "
3231 "stream's data at a location of its own choosing; for example, "
3232 "B<fopencookie>()  is used to implement B<fmemopen>(3), which provides a "
3233 "stream interface to data that is stored in a buffer in memory."
3234 msgstr ""
3235
3236 #. type: Plain text
3237 #: build/C/man3/fopencookie.3:51
3238 msgid "In order to create a custom stream the programmer must:"
3239 msgstr ""
3240
3241 #. type: IP
3242 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3243 #: build/C/man3/fopencookie.3:65 build/C/man2/lseek.2:168
3244 #: build/C/man2/lseek.2:170 build/C/man2/lseek.2:173 build/C/man2/lseek.2:175
3245 #: build/C/man2/lseek.2:177 build/C/man2/open.2:527 build/C/man2/open.2:535
3246 #: build/C/man2/open.2:541 build/C/man2/open.2:547 build/C/man2/open.2:553
3247 #: build/C/man2/open.2:566 build/C/man2/open.2:688 build/C/man2/open.2:696
3248 #: build/C/man2/open_by_handle_at.2:138 build/C/man2/open_by_handle_at.2:146
3249 #: build/C/man2/open_by_handle_at.2:157 build/C/man2/open_by_handle_at.2:170
3250 #: build/C/man2/pipe.2:95 build/C/man2/pipe.2:105 build/C/man2/pipe.2:115
3251 #: build/C/man3/scanf.3:658 build/C/man3/scanf.3:663
3252 #: build/C/man7/symlink.7:290 build/C/man7/symlink.7:300
3253 #: build/C/man7/symlink.7:330 build/C/man7/symlink.7:390
3254 #: build/C/man7/symlink.7:419 build/C/man7/symlink.7:448
3255 #: build/C/man7/symlink.7:479 build/C/man7/symlink.7:492
3256 #, no-wrap
3257 msgid "*"
3258 msgstr "*"
3259
3260 #. type: Plain text
3261 #: build/C/man3/fopencookie.3:54
3262 msgid ""
3263 "Implement four \"hook\" functions that are used internally by the standard I/"
3264 "O library when performing I/O on the stream."
3265 msgstr ""
3266
3267 #. type: Plain text
3268 #: build/C/man3/fopencookie.3:65
3269 msgid ""
3270 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3271 "information (e.g., where to store data) used by the aforementioned hook "
3272 "functions.  The standard I/O package knows nothing about the contents of "
3273 "this cookie (thus it is typed as I<void\\ *> when passed to "
3274 "B<fopencookie>()), but automatically supplies the cookie as the first "
3275 "argument when calling the hook functions."
3276 msgstr ""
3277
3278 #. type: Plain text
3279 #: build/C/man3/fopencookie.3:70
3280 msgid ""
3281 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3282 "hook functions with that stream."
3283 msgstr ""
3284
3285 #. type: Plain text
3286 #: build/C/man3/fopencookie.3:78
3287 msgid ""
3288 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3289 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3290 "operate on that stream."
3291 msgstr ""
3292
3293 #. type: Plain text
3294 #: build/C/man3/fopencookie.3:85
3295 msgid ""
3296 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3297 "to be associated with the new stream.  This pointer is supplied as the first "
3298 "argument when the standard I/O library invokes any of the hook functions "
3299 "described below."
3300 msgstr ""
3301
3302 #. type: Plain text
3303 #: build/C/man3/fopencookie.3:101
3304 msgid ""
3305 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3306 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3307 "See B<fopen>(3)  for details."
3308 msgstr ""
3309
3310 #. type: Plain text
3311 #: build/C/man3/fopencookie.3:107
3312 msgid ""
3313 "The I<io_funcs> argument is a structure that contains four fields pointing "
3314 "to the programmer-defined hook functions that are used to implement this "
3315 "stream.  The structure is defined as follows"
3316 msgstr ""
3317
3318 #. type: Plain text
3319 #: build/C/man3/fopencookie.3:116
3320 #, no-wrap
3321 msgid ""
3322 "typedef struct {\n"
3323 "    cookie_read_function_t  *read;\n"
3324 "    cookie_write_function_t *write;\n"
3325 "    cookie_seek_function_t  *seek;\n"
3326 "    cookie_close_function_t *close;\n"
3327 "} cookie_io_functions_t;\n"
3328 msgstr ""
3329 "typedef struct {\n"
3330 "    cookie_read_function_t  *read;\n"
3331 "    cookie_write_function_t *write;\n"
3332 "    cookie_seek_function_t  *seek;\n"
3333 "    cookie_close_function_t *close;\n"
3334 "} cookie_io_functions_t;\n"
3335
3336 #. type: Plain text
3337 #: build/C/man3/fopencookie.3:120
3338 msgid "The four fields are as follows:"
3339 msgstr ""
3340
3341 #. type: TP
3342 #: build/C/man3/fopencookie.3:120
3343 #, no-wrap
3344 msgid "I<cookie_read_function_t *read>"
3345 msgstr "I<cookie_read_function_t *read>"
3346
3347 #. type: Plain text
3348 #: build/C/man3/fopencookie.3:124
3349 msgid ""
3350 "This function implements read operations for the stream.  When called, it "
3351 "receives three arguments:"
3352 msgstr ""
3353
3354 #. type: Plain text
3355 #: build/C/man3/fopencookie.3:126
3356 #, no-wrap
3357 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3358 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3359
3360 #. type: Plain text
3361 #: build/C/man3/fopencookie.3:141
3362 msgid ""
3363 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3364 "input data can be placed and the size of that buffer.  As its function "
3365 "result, the I<read> function should return the number of bytes copied into "
3366 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3367 "update the stream offset appropriately."
3368 msgstr ""
3369
3370 #. type: Plain text
3371 #: build/C/man3/fopencookie.3:146
3372 msgid ""
3373 "If I<*read> is a null pointer, then reads from the custom stream always "
3374 "return end of file."
3375 msgstr ""
3376
3377 #. type: TP
3378 #: build/C/man3/fopencookie.3:146
3379 #, no-wrap
3380 msgid "I<cookie_write_function_t *write>"
3381 msgstr "I<cookie_write_function_t *write>"
3382
3383 #. type: Plain text
3384 #: build/C/man3/fopencookie.3:150
3385 msgid ""
3386 "This function implements write operations for the stream.  When called, it "
3387 "receives three arguments:"
3388 msgstr ""
3389
3390 #. type: Plain text
3391 #: build/C/man3/fopencookie.3:152
3392 #, no-wrap
3393 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3394 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3395
3396 #. type: Plain text
3397 #: build/C/man3/fopencookie.3:168
3398 msgid ""
3399 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3400 "output to the stream and the size of that buffer.  As its function result, "
3401 "the I<write> function should return the number of bytes copied from I<buf>, "
3402 "or 0 on error.  (The function must not return a negative value.)  The "
3403 "I<write> function should update the stream offset appropriately."
3404 msgstr ""
3405
3406 #. type: Plain text
3407 #: build/C/man3/fopencookie.3:173
3408 msgid "If I<*write> is a null pointer, then output to the stream is discarded."
3409 msgstr ""
3410
3411 #. type: TP
3412 #: build/C/man3/fopencookie.3:173
3413 #, no-wrap
3414 msgid "I<cookie_seek_function_t *seek>"
3415 msgstr "I<cookie_seek_function_t *seek>"
3416
3417 #. type: Plain text
3418 #: build/C/man3/fopencookie.3:177
3419 msgid ""
3420 "This function implements seek operations on the stream.  When called, it "
3421 "receives three arguments:"
3422 msgstr ""
3423
3424 #. type: Plain text
3425 #: build/C/man3/fopencookie.3:179
3426 #, no-wrap
3427 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3428 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3429
3430 #. type: Plain text
3431 #: build/C/man3/fopencookie.3:185
3432 msgid ""
3433 "The I<*offset> argument specifies the new file offset depending on which of "
3434 "the following three values is supplied in I<whence>:"
3435 msgstr ""
3436
3437 #. type: TP
3438 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3439 #, no-wrap
3440 msgid "B<SEEK_SET>"
3441 msgstr "B<SEEK_SET>"
3442
3443 #. type: Plain text
3444 #: build/C/man3/fopencookie.3:191
3445 msgid ""
3446 "The stream offset should be set I<*offset> bytes from the start of the "
3447 "stream."
3448 msgstr ""
3449
3450 #. type: TP
3451 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3452 #, no-wrap
3453 msgid "B<SEEK_CUR>"
3454 msgstr "B<SEEK_CUR>"
3455
3456 #. type: Plain text
3457 #: build/C/man3/fopencookie.3:195
3458 msgid "I<*offset> should be added to the current stream offset."
3459 msgstr ""
3460
3461 #. type: TP
3462 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3463 #, no-wrap
3464 msgid "B<SEEK_END>"
3465 msgstr "B<SEEK_END>"
3466
3467 #. type: Plain text
3468 #: build/C/man3/fopencookie.3:199
3469 msgid ""
3470 "The stream offset should be set to the size of the stream plus I<*offset>."
3471 msgstr ""
3472
3473 #. type: Plain text
3474 #: build/C/man3/fopencookie.3:206
3475 msgid ""
3476 "Before returning, the I<seek> function should update I<*offset> to indicate "
3477 "the new stream offset."
3478 msgstr ""
3479
3480 #. type: Plain text
3481 #: build/C/man3/fopencookie.3:210
3482 msgid ""
3483 "As its function result, the I<seek> function should return 0 on success, and "
3484 "-1 on error."
3485 msgstr ""
3486
3487 #. type: Plain text
3488 #: build/C/man3/fopencookie.3:215
3489 msgid ""
3490 "If I<*seek> is a null pointer, then it is not possible to perform seek "
3491 "operations on the stream."
3492 msgstr ""
3493
3494 #. type: TP
3495 #: build/C/man3/fopencookie.3:215
3496 #, no-wrap
3497 msgid "I<cookie_close_function_t *close>"
3498 msgstr "I<cookie_close_function_t *close>"
3499
3500 #. type: Plain text
3501 #: build/C/man3/fopencookie.3:221
3502 msgid ""
3503 "This function closes the stream.  The hook function can do things such as "
3504 "freeing buffers allocated for the stream.  When called, it receives one "
3505 "argument:"
3506 msgstr ""
3507
3508 #. type: Plain text
3509 #: build/C/man3/fopencookie.3:223
3510 #, no-wrap
3511 msgid "    int close(void *cookie);\n"
3512 msgstr "    int close(void *cookie);\n"
3513
3514 #. type: Plain text
3515 #: build/C/man3/fopencookie.3:228
3516 msgid ""
3517 "The I<cookie> argument is the cookie that the programmer supplied when "
3518 "calling B<fopencookie>()."
3519 msgstr ""
3520
3521 #. type: Plain text
3522 #: build/C/man3/fopencookie.3:234
3523 msgid ""
3524 "As its function result, the I<close> function should return 0 on success, "
3525 "and B<EOF> on error."
3526 msgstr ""
3527
3528 #. type: Plain text
3529 #: build/C/man3/fopencookie.3:238
3530 msgid ""
3531 "If I<*close> is NULL, then no special action is performed when the stream is "
3532 "closed."
3533 msgstr ""
3534
3535 #.  .SH ERRORS
3536 #.  It's not clear if errno ever gets set...
3537 #. type: Plain text
3538 #: build/C/man3/fopencookie.3:245
3539 msgid ""
3540 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3541 "NULL is returned."
3542 msgstr ""
3543
3544 #. type: Plain text
3545 #: build/C/man3/fopencookie.3:247
3546 msgid "This function is a nonstandard GNU extension."
3547 msgstr ""
3548
3549 #. type: Plain text
3550 #: build/C/man3/fopencookie.3:256
3551 msgid ""
3552 "The program below implements a custom stream whose functionality is similar "
3553 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3554 "stream whose data is stored in a memory buffer.  The program writes its "
3555 "command-line arguments to the stream, and then seeks through the stream "
3556 "reading two out of every five characters and writing them to standard "
3557 "output.  The following shell session demonstrates the use of the program:"
3558 msgstr ""
3559
3560 #. type: Plain text
3561 #: build/C/man3/fopencookie.3:264
3562 #, no-wrap
3563 msgid ""
3564 "$B< ./a.out \\(aqhello world\\(aq>\n"
3565 "/he/\n"
3566 "/ w/\n"
3567 "/d/\n"
3568 "Reached end of file\n"
3569 msgstr ""
3570 "$B< ./a.out \\(aqhello world\\(aq>\n"
3571 "/he/\n"
3572 "/ w/\n"
3573 "/d/\n"
3574 "Reached end of file\n"
3575
3576 #. type: Plain text
3577 #: build/C/man3/fopencookie.3:271
3578 msgid ""
3579 "Note that a more general version of the program below could be improved to "
3580 "more robustly handle various error situations (e.g., opening a stream with a "
3581 "cookie that already has an open stream; closing a stream that has already "
3582 "been closed)."
3583 msgstr ""
3584
3585 #. type: Plain text
3586 #: build/C/man3/fopencookie.3:280
3587 #, no-wrap
3588 msgid ""
3589 "#define _GNU_SOURCE\n"
3590 "#include E<lt>sys/types.hE<gt>\n"
3591 "#include E<lt>stdio.hE<gt>\n"
3592 "#include E<lt>stdlib.hE<gt>\n"
3593 "#include E<lt>unistd.hE<gt>\n"
3594 "#include E<lt>string.hE<gt>\n"
3595 msgstr ""
3596 "#define _GNU_SOURCE\n"
3597 "#include E<lt>sys/types.hE<gt>\n"
3598 "#include E<lt>stdio.hE<gt>\n"
3599 "#include E<lt>stdlib.hE<gt>\n"
3600 "#include E<lt>unistd.hE<gt>\n"
3601 "#include E<lt>string.hE<gt>\n"
3602
3603 #. type: Plain text
3604 #: build/C/man3/fopencookie.3:282
3605 #, no-wrap
3606 msgid "#define INIT_BUF_SIZE 4\n"
3607 msgstr "#define INIT_BUF_SIZE 4\n"
3608
3609 #. type: Plain text
3610 #: build/C/man3/fopencookie.3:289
3611 #, no-wrap
3612 msgid ""
3613 "struct memfile_cookie {\n"
3614 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3615 "    size_t  allocated;  /* Size of buf */\n"
3616 "    size_t  endpos;     /* Number of characters in buf */\n"
3617 "    off_t   offset;     /* Current file offset in buf */\n"
3618 "};\n"
3619 msgstr ""
3620 "struct memfile_cookie {\n"
3621 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3622 "    size_t  allocated;  /* Size of buf */\n"
3623 "    size_t  endpos;     /* Number of characters in buf */\n"
3624 "    off_t   offset;     /* Current file offset in buf */\n"
3625 "};\n"
3626
3627 #. type: Plain text
3628 #: build/C/man3/fopencookie.3:295
3629 #, no-wrap
3630 msgid ""
3631 "ssize_t\n"
3632 "memfile_write(void *c, const char *buf, size_t size)\n"
3633 "{\n"
3634 "    char *new_buff;\n"
3635 "    struct memfile_cookie *cookie = c;\n"
3636 msgstr ""
3637 "ssize_t\n"
3638 "memfile_write(void *c, const char *buf, size_t size)\n"
3639 "{\n"
3640 "    char *new_buff;\n"
3641 "    struct memfile_cookie *cookie = c;\n"
3642
3643 #. type: Plain text
3644 #: build/C/man3/fopencookie.3:297
3645 #, no-wrap
3646 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3647 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3648
3649 #. type: Plain text
3650 #: build/C/man3/fopencookie.3:307
3651 #, no-wrap
3652 msgid ""
3653 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3654 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3655 "        if (new_buff == NULL) {\n"
3656 "            return -1;\n"
3657 "        } else {\n"
3658 "            cookie-E<gt>allocated *= 2;\n"
3659 "            cookie-E<gt>buf = new_buff;\n"
3660 "        }\n"
3661 "    }\n"
3662 msgstr ""
3663 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3664 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3665 "        if (new_buff == NULL) {\n"
3666 "            return -1;\n"
3667 "        } else {\n"
3668 "            cookie-E<gt>allocated *= 2;\n"
3669 "            cookie-E<gt>buf = new_buff;\n"
3670 "        }\n"
3671 "    }\n"
3672
3673 #. type: Plain text
3674 #: build/C/man3/fopencookie.3:309
3675 #, no-wrap
3676 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3677 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3678
3679 #. type: Plain text
3680 #: build/C/man3/fopencookie.3:313
3681 #, no-wrap
3682 msgid ""
3683 "    cookie-E<gt>offset += size;\n"
3684 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3685 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3686 msgstr ""
3687 "    cookie-E<gt>offset += size;\n"
3688 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3689 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3690
3691 #. type: Plain text
3692 #: build/C/man3/fopencookie.3:316
3693 #, no-wrap
3694 msgid ""
3695 "    return size;\n"
3696 "}\n"
3697 msgstr ""
3698 "    return size;\n"
3699 "}\n"
3700
3701 #. type: Plain text
3702 #: build/C/man3/fopencookie.3:322
3703 #, no-wrap
3704 msgid ""
3705 "ssize_t\n"
3706 "memfile_read(void *c, char *buf, size_t size)\n"
3707 "{\n"
3708 "    ssize_t xbytes;\n"
3709 "    struct memfile_cookie *cookie = c;\n"
3710 msgstr ""
3711 "ssize_t\n"
3712 "memfile_read(void *c, char *buf, size_t size)\n"
3713 "{\n"
3714 "    ssize_t xbytes;\n"
3715 "    struct memfile_cookie *cookie = c;\n"
3716
3717 #. type: Plain text
3718 #: build/C/man3/fopencookie.3:324
3719 #, no-wrap
3720 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3721 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3722
3723 #. type: Plain text
3724 #: build/C/man3/fopencookie.3:330
3725 #, no-wrap
3726 msgid ""
3727 "    xbytes = size;\n"
3728 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3729 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3730 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3731 "       xbytes = 0;\n"
3732 msgstr ""
3733 "    xbytes = size;\n"
3734 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3735 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3736 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3737 "       xbytes = 0;\n"
3738
3739 #. type: Plain text
3740 #: build/C/man3/fopencookie.3:332
3741 #, no-wrap
3742 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3743 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3744
3745 #. type: Plain text
3746 #: build/C/man3/fopencookie.3:336
3747 #, no-wrap
3748 msgid ""
3749 "    cookie-E<gt>offset += xbytes;\n"
3750 "    return xbytes;\n"
3751 "}\n"
3752 msgstr ""
3753 "    cookie-E<gt>offset += xbytes;\n"
3754 "    return xbytes;\n"
3755 "}\n"
3756
3757 #. type: Plain text
3758 #: build/C/man3/fopencookie.3:342
3759 #, no-wrap
3760 msgid ""
3761 "int\n"
3762 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3763 "{\n"
3764 "    off64_t new_offset;\n"
3765 "    struct memfile_cookie *cookie = c;\n"
3766 msgstr ""
3767 "int\n"
3768 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3769 "{\n"
3770 "    off64_t new_offset;\n"
3771 "    struct memfile_cookie *cookie = c;\n"
3772
3773 #. type: Plain text
3774 #: build/C/man3/fopencookie.3:351
3775 #, no-wrap
3776 msgid ""
3777 "    if (whence == SEEK_SET)\n"
3778 "        new_offset = *offset;\n"
3779 "    else if (whence == SEEK_END)\n"
3780 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3781 "    else if (whence == SEEK_CUR)\n"
3782 "        new_offset = cookie-E<gt>offset + *offset;\n"
3783 "    else\n"
3784 "        return -1;\n"
3785 msgstr ""
3786 "    if (whence == SEEK_SET)\n"
3787 "        new_offset = *offset;\n"
3788 "    else if (whence == SEEK_END)\n"
3789 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3790 "    else if (whence == SEEK_CUR)\n"
3791 "        new_offset = cookie-E<gt>offset + *offset;\n"
3792 "    else\n"
3793 "        return -1;\n"
3794
3795 #. type: Plain text
3796 #: build/C/man3/fopencookie.3:354
3797 #, no-wrap
3798 msgid ""
3799 "    if (new_offset E<lt> 0)\n"
3800 "        return -1;\n"
3801 msgstr ""
3802 "    if (new_offset E<lt> 0)\n"
3803 "        return -1;\n"
3804
3805 #. type: Plain text
3806 #: build/C/man3/fopencookie.3:359
3807 #, no-wrap
3808 msgid ""
3809 "    cookie-E<gt>offset = new_offset;\n"
3810 "    *offset = new_offset;\n"
3811 "    return 0;\n"
3812 "}\n"
3813 msgstr ""
3814 "    cookie-E<gt>offset = new_offset;\n"
3815 "    *offset = new_offset;\n"
3816 "    return 0;\n"
3817 "}\n"
3818
3819 #. type: Plain text
3820 #: build/C/man3/fopencookie.3:364
3821 #, no-wrap
3822 msgid ""
3823 "int\n"
3824 "memfile_close(void *c)\n"
3825 "{\n"
3826 "    struct memfile_cookie *cookie = c;\n"
3827 msgstr ""
3828 "int\n"
3829 "memfile_close(void *c)\n"
3830 "{\n"
3831 "    struct memfile_cookie *cookie = c;\n"
3832
3833 #. type: Plain text
3834 #: build/C/man3/fopencookie.3:368
3835 #, no-wrap
3836 msgid ""
3837 "    free(cookie-E<gt>buf);\n"
3838 "    cookie-E<gt>allocated = 0;\n"
3839 "    cookie-E<gt>buf = NULL;\n"
3840 msgstr ""
3841 "    free(cookie-E<gt>buf);\n"
3842 "    cookie-E<gt>allocated = 0;\n"
3843 "    cookie-E<gt>buf = NULL;\n"
3844
3845 #. type: Plain text
3846 #: build/C/man3/fopencookie.3:371
3847 #, no-wrap
3848 msgid ""
3849 "    return 0;\n"
3850 "}\n"
3851 msgstr ""
3852 "    return 0;\n"
3853 "}\n"
3854
3855 #. type: Plain text
3856 #: build/C/man3/fopencookie.3:387
3857 #, no-wrap
3858 msgid ""
3859 "int\n"
3860 "main(int argc, char *argv[])\n"
3861 "{\n"
3862 "    cookie_io_functions_t  memfile_func = {\n"
3863 "        .read  = memfile_read,\n"
3864 "        .write = memfile_write,\n"
3865 "        .seek  = memfile_seek,\n"
3866 "        .close = memfile_close\n"
3867 "    };\n"
3868 "    FILE *fp;\n"
3869 "    struct memfile_cookie mycookie;\n"
3870 "    ssize_t nread;\n"
3871 "    long p;\n"
3872 "    int j;\n"
3873 "    char buf[1000];\n"
3874 msgstr ""
3875 "int\n"
3876 "main(int argc, char *argv[])\n"
3877 "{\n"
3878 "    cookie_io_functions_t  memfile_func = {\n"
3879 "        .read  = memfile_read,\n"
3880 "        .write = memfile_write,\n"
3881 "        .seek  = memfile_seek,\n"
3882 "        .close = memfile_close\n"
3883 "    };\n"
3884 "    FILE *fp;\n"
3885 "    struct memfile_cookie mycookie;\n"
3886 "    ssize_t nread;\n"
3887 "    long p;\n"
3888 "    int j;\n"
3889 "    char buf[1000];\n"
3890
3891 #. type: Plain text
3892 #: build/C/man3/fopencookie.3:389
3893 #, no-wrap
3894 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3895 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3896
3897 #. type: Plain text
3898 #: build/C/man3/fopencookie.3:395
3899 #, no-wrap
3900 msgid ""
3901 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3902 "    if (mycookie.buf == NULL) {\n"
3903 "        perror(\"malloc\");\n"
3904 "        exit(EXIT_FAILURE);\n"
3905 "    }\n"
3906 msgstr ""
3907 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3908 "    if (mycookie.buf == NULL) {\n"
3909 "        perror(\"malloc\");\n"
3910 "        exit(EXIT_FAILURE);\n"
3911 "    }\n"
3912
3913 #. type: Plain text
3914 #: build/C/man3/fopencookie.3:399
3915 #, no-wrap
3916 msgid ""
3917 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3918 "    mycookie.offset = 0;\n"
3919 "    mycookie.endpos = 0;\n"
3920 msgstr ""
3921 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3922 "    mycookie.offset = 0;\n"
3923 "    mycookie.endpos = 0;\n"
3924
3925 #. type: Plain text
3926 #: build/C/man3/fopencookie.3:405
3927 #, no-wrap
3928 msgid ""
3929 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3930 "    if (fp == NULL) {\n"
3931 "        perror(\"fopencookie\");\n"
3932 "        exit(EXIT_FAILURE);\n"
3933 "    }\n"
3934 msgstr ""
3935 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3936 "    if (fp == NULL) {\n"
3937 "        perror(\"fopencookie\");\n"
3938 "        exit(EXIT_FAILURE);\n"
3939 "    }\n"
3940
3941 #. type: Plain text
3942 #: build/C/man3/fopencookie.3:407
3943 #, no-wrap
3944 msgid "    /* Write command-line arguments to our file */\n"
3945 msgstr "    /* Write command-line arguments to our file */\n"
3946
3947 #. type: Plain text
3948 #: build/C/man3/fopencookie.3:413
3949 #, no-wrap
3950 msgid ""
3951 "    for (j = 1; j E<lt> argc; j++)\n"
3952 "        if (fputs(argv[j], fp) == EOF) {\n"
3953 "            perror(\"fputs\");\n"
3954 "            exit(EXIT_FAILURE);\n"
3955 "        }\n"
3956 msgstr ""
3957 "    for (j = 1; j E<lt> argc; j++)\n"
3958 "        if (fputs(argv[j], fp) == EOF) {\n"
3959 "            perror(\"fputs\");\n"
3960 "            exit(EXIT_FAILURE);\n"
3961 "        }\n"
3962
3963 #. type: Plain text
3964 #: build/C/man3/fopencookie.3:415
3965 #, no-wrap
3966 msgid "    /* Read two bytes out of every five, until EOF */\n"
3967 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3968
3969 #. type: Plain text
3970 #: build/C/man3/fopencookie.3:430
3971 #, no-wrap
3972 msgid ""
3973 "    for (p = 0; ; p += 5) {\n"
3974 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3975 "            perror(\"fseek\");\n"
3976 "            exit(EXIT_FAILURE);\n"
3977 "        }\n"
3978 "        nread = fread(buf, 1, 2, fp);\n"
3979 "        if (nread == -1) {\n"
3980 "            perror(\"fread\");\n"
3981 "            exit(EXIT_FAILURE);\n"
3982 "        }\n"
3983 "        if (nread == 0) {\n"
3984 "            printf(\"Reached end of file\\en\");\n"
3985 "            break;\n"
3986 "        }\n"
3987 msgstr ""
3988 "    for (p = 0; ; p += 5) {\n"
3989 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3990 "            perror(\"fseek\");\n"
3991 "            exit(EXIT_FAILURE);\n"
3992 "        }\n"
3993 "        nread = fread(buf, 1, 2, fp);\n"
3994 "        if (nread == -1) {\n"
3995 "            perror(\"fread\");\n"
3996 "            exit(EXIT_FAILURE);\n"
3997 "        }\n"
3998 "        if (nread == 0) {\n"
3999 "            printf(\"Reached end of file\\en\");\n"
4000 "            break;\n"
4001 "        }\n"
4002
4003 #. type: Plain text
4004 #: build/C/man3/fopencookie.3:433
4005 #, no-wrap
4006 msgid ""
4007 "        printf(\"/%.*s/\\en\", nread, buf);\n"
4008 "    }\n"
4009 msgstr ""
4010 "        printf(\"/%.*s/\\en\", nread, buf);\n"
4011 "    }\n"
4012
4013 #. type: Plain text
4014 #: build/C/man3/fopencookie.3:436 build/C/man2/open_by_handle_at.2:579
4015 #: build/C/man2/open_by_handle_at.2:719 build/C/man2/readlink.2:327
4016 #, no-wrap
4017 msgid ""
4018 "    exit(EXIT_SUCCESS);\n"
4019 "}\n"
4020 msgstr ""
4021 "    exit(EXIT_SUCCESS);\n"
4022 "}\n"
4023
4024 #. type: Plain text
4025 #: build/C/man3/fopencookie.3:442
4026 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
4027 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
4028
4029 #. type: TH
4030 #: build/C/man3/fpurge.3:25
4031 #, no-wrap
4032 msgid "FPURGE"
4033 msgstr "FPURGE"
4034
4035 #. type: TH
4036 #: build/C/man3/fpurge.3:25
4037 #, no-wrap
4038 msgid "2001-12-15"
4039 msgstr "2001-12-15"
4040
4041 #. type: Plain text
4042 #: build/C/man3/fpurge.3:28
4043 msgid "fpurge, __fpurge - purge a stream"
4044 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
4045
4046 #. type: Plain text
4047 #: build/C/man3/fpurge.3:32
4048 #, no-wrap
4049 msgid ""
4050 "/* unsupported */\n"
4051 "B<#include E<lt>stdio.hE<gt>>\n"
4052 msgstr ""
4053 "/* unsupported */\n"
4054 "B<#include E<lt>stdio.hE<gt>>\n"
4055
4056 #. type: Plain text
4057 #: build/C/man3/fpurge.3:34
4058 #, no-wrap
4059 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
4060 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
4061
4062 #. type: Plain text
4063 #: build/C/man3/fpurge.3:37
4064 #, no-wrap
4065 msgid ""
4066 "/* supported */\n"
4067 "B<#include E<lt>stdio.hE<gt>>\n"
4068 msgstr ""
4069 "/* supported */\n"
4070 "B<#include E<lt>stdio.hE<gt>>\n"
4071
4072 #. type: Plain text
4073 #: build/C/man3/fpurge.3:39
4074 #, no-wrap
4075 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
4076 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
4077
4078 #. type: Plain text
4079 #: build/C/man3/fpurge.3:41
4080 #, no-wrap
4081 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
4082 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
4083
4084 #. type: Plain text
4085 #: build/C/man3/fpurge.3:54
4086 msgid ""
4087 "The function B<fpurge>()  clears the buffers of the given stream.  For "
4088 "output streams this discards any unwritten output.  For input streams this "
4089 "discards any input read from the underlying object but not yet obtained via "
4090 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
4091 "B<fflush>(3)."
4092 msgstr ""
4093 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
4094 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
4095 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
4096 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
4097 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
4098
4099 #. type: Plain text
4100 #: build/C/man3/fpurge.3:58
4101 msgid ""
4102 "The function B<__fpurge>()  does precisely the same, but without returning a "
4103 "value."
4104 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
4105
4106 #. type: Plain text
4107 #: build/C/man3/fpurge.3:65
4108 msgid ""
4109 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
4110 "and sets I<errno> appropriately."
4111 msgstr ""
4112 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
4113 "を適切な値に設定する。"
4114
4115 #. type: Plain text
4116 #: build/C/man3/fpurge.3:70
4117 msgid "I<stream> is not an open stream."
4118 msgstr "I<stream> がオープンされていない。"
4119
4120 #. type: Plain text
4121 #: build/C/man3/fpurge.3:78
4122 msgid ""
4123 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
4124 "was introduced in 4.4BSD and is not available under Linux.  The function "
4125 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
4126 "later."
4127 msgstr ""
4128 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
4129 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
4130 "され、glibc 2.1.95 以降には存在している。"
4131
4132 #. type: Plain text
4133 #: build/C/man3/fpurge.3:80
4134 msgid "Usually it is a mistake to want to discard input buffers."
4135 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
4136
4137 #.  .BR fclean (3),
4138 #. type: Plain text
4139 #: build/C/man3/fpurge.3:85
4140 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
4141 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
4142
4143 #. type: TH
4144 #: build/C/man3/fputwc.3:16
4145 #, no-wrap
4146 msgid "FPUTWC"
4147 msgstr "FPUTWC"
4148
4149 #. type: Plain text
4150 #: build/C/man3/fputwc.3:19
4151 msgid "fputwc, putwc - write a wide character to a FILE stream"
4152 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
4153
4154 #. type: Plain text
4155 #: build/C/man3/fputwc.3:27
4156 #, no-wrap
4157 msgid ""
4158 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4159 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4160 msgstr ""
4161 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4162 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4163
4164 #. type: Plain text
4165 #: build/C/man3/fputwc.3:43
4166 msgid ""
4167 "The B<fputwc>()  function is the wide-character equivalent of the "
4168 "B<fputc>(3)  function.  It writes the wide character I<wc> to I<stream>.  If "
4169 "I<ferror(stream)> becomes true, it returns B<WEOF>.  If a wide-character "
4170 "conversion error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  "
4171 "Otherwise, it returns I<wc>."
4172 msgstr ""
4173 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
4174 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
4175 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
4176 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
4177 "関数は I<wc> を返す。"
4178
4179 #. type: Plain text
4180 #: build/C/man3/fputwc.3:51
4181 msgid ""
4182 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
4183 "may be implemented as a macro, and may evaluate its argument more than "
4184 "once.  There is no reason ever to use it."
4185 msgstr ""
4186 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
4187 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
4188 "ない。この関数を使う理由はもはや存在しない。"
4189
4190 #. type: Plain text
4191 #: build/C/man3/fputwc.3:63
4192 msgid ""
4193 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
4194 "indicate an error.  In the event of an error, I<errno> is set to indicate "
4195 "the cause."
4196 msgstr ""
4197 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
4198 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
4199
4200 #. type: Plain text
4201 #: build/C/man3/fputwc.3:68
4202 msgid "Conversion of I<wc> to the stream's encoding fails."
4203 msgstr "I<wc> からストリームの符号への変換に失敗した。"
4204
4205 #. type: Plain text
4206 #: build/C/man3/fputwc.3:77
4207 msgid ""
4208 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
4209 "current locale."
4210 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
4211
4212 #. type: Plain text
4213 #: build/C/man3/fputwc.3:85
4214 msgid ""
4215 "In the absence of additional information passed to the B<fopen>(3)  call, it "
4216 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4217 "sequence corresponding to the wide character I<wc>."
4218 msgstr ""
4219 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4220 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4221 "よい。"
4222
4223 #. type: Plain text
4224 #: build/C/man3/fputwc.3:89
4225 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4226 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4227
4228 #. type: TH
4229 #: build/C/man3/fread.3:45
4230 #, no-wrap
4231 msgid "FREAD"
4232 msgstr "FREAD"
4233
4234 #. type: TH
4235 #: build/C/man3/fread.3:45
4236 #, no-wrap
4237 msgid "2012-03-30"
4238 msgstr "2012-03-30"
4239
4240 #. type: Plain text
4241 #: build/C/man3/fread.3:48
4242 msgid "fread, fwrite - binary stream input/output"
4243 msgstr "fread, fwrite - バイナリストリームの入出力"
4244
4245 #. type: Plain text
4246 #: build/C/man3/fread.3:54
4247 #, no-wrap
4248 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4249 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4250
4251 #. type: Plain text
4252 #: build/C/man3/fread.3:57
4253 #, no-wrap
4254 msgid ""
4255 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4256 "B<              FILE *>I<stream>B<);>\n"
4257 msgstr ""
4258 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4259 "B<              FILE *>I<stream>B<);>\n"
4260
4261 #. type: Plain text
4262 #: build/C/man3/fread.3:69
4263 msgid ""
4264 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4265 "long, from the stream pointed to by I<stream>, storing them at the location "
4266 "given by I<ptr>."
4267 msgstr ""
4268 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4269 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4270 "I<size> バイトの長さを持つ。"
4271
4272 #. type: Plain text
4273 #: build/C/man3/fread.3:80
4274 msgid ""
4275 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4276 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4277 "location given by I<ptr>."
4278 msgstr ""
4279 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4280 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4281 "バイトの長さを持つ。"
4282
4283 #. type: Plain text
4284 #: build/C/man3/fread.3:96
4285 msgid ""
4286 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4287 "or written.  This number equals the number of bytes transferred only when "
4288 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4289 "return value is a short item count (or zero)."
4290 msgstr ""
4291 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4292 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4293 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4294 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4295
4296 #. type: Plain text
4297 #: build/C/man3/fread.3:103
4298 msgid ""
4299 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4300 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4301 msgstr ""
4302 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4303 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4304 "らない。"
4305
4306 #. type: Plain text
4307 #: build/C/man3/fread.3:105
4308 msgid "C89, POSIX.1-2001."
4309 msgstr "C89, POSIX.1-2001."
4310
4311 #. type: Plain text
4312 #: build/C/man3/fread.3:111
4313 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4314 msgstr ""
4315 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4316
4317 #. type: TH
4318 #: build/C/man3/fseek.3:42
4319 #, no-wrap
4320 msgid "FSEEK"
4321 msgstr "FSEEK"
4322
4323 #. type: TH
4324 #: build/C/man3/fseek.3:42 build/C/man3/perror.3:31
4325 #, no-wrap
4326 msgid "2014-05-28"
4327 msgstr "2014-05-28"
4328
4329 #. type: Plain text
4330 #: build/C/man3/fseek.3:45
4331 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4332 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4333
4334 #. type: Plain text
4335 #: build/C/man3/fseek.3:49
4336 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4337 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4338
4339 #. type: Plain text
4340 #: build/C/man3/fseek.3:51
4341 msgid "B<long ftell(FILE *>I<stream>B<);>"
4342 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4343
4344 #. type: Plain text
4345 #: build/C/man3/fseek.3:53
4346 msgid "B<void rewind(FILE *>I<stream>B<);>"
4347 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4348
4349 #. type: Plain text
4350 #: build/C/man3/fseek.3:55
4351 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4352 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4353
4354 #. type: Plain text
4355 #: build/C/man3/fseek.3:57
4356 msgid "B<int fsetpos(FILE *>I<stream>B<, const fpos_t *>I<pos>B<);>"
4357 msgstr "B<int fsetpos(FILE *>I<stream>B<, const fpos_t *>I<pos>B<);>"
4358
4359 #. type: Plain text
4360 #: build/C/man3/fseek.3:81
4361 msgid ""
4362 "The B<fseek>()  function sets the file position indicator for the stream "
4363 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4364 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4365 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4366 "relative to the start of the file, the current position indicator, or end-of-"
4367 "file, respectively.  A successful call to the B<fseek>()  function clears "
4368 "the end-of-file indicator for the stream and undoes any effects of the "
4369 "B<ungetc>(3)  function on the same stream."
4370 msgstr ""
4371 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4372 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4373 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4374 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4375 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4376 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4377 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4378 "かったことになる。"
4379
4380 #. type: Plain text
4381 #: build/C/man3/fseek.3:87
4382 msgid ""
4383 "The B<ftell>()  function obtains the current value of the file position "
4384 "indicator for the stream pointed to by I<stream>."
4385 msgstr ""
4386 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4387 "置表示子 の現時点での値を与える。"
4388
4389 #. type: Plain text
4390 #: build/C/man3/fseek.3:94
4391 msgid ""
4392 "The B<rewind>()  function sets the file position indicator for the stream "
4393 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4394 msgstr ""
4395 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4396 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4397
4398 #. type: Plain text
4399 #: build/C/man3/fseek.3:97
4400 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4401 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4402
4403 #. type: Plain text
4404 #: build/C/man3/fseek.3:101
4405 msgid ""
4406 "except that the error indicator for the stream is also cleared (see "
4407 "B<clearerr>(3))."
4408 msgstr ""
4409 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4410 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4411
4412 #. type: Plain text
4413 #: build/C/man3/fseek.3:121
4414 msgid ""
4415 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4416 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4417 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4418 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4419 "I<fpos_t> object may be a complex object and these routines may be the only "
4420 "way to portably reposition a text stream."
4421 msgstr ""
4422 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と "
4423 "B<fseek>()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なる"
4424 "インターフェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を "
4425 "I<pos> が参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを "
4426 "I<pos> に設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの"
4427 "複雑なオブジェクトになっていて、これらのルーチンがテキス トストリームでファイ"
4428 "ル位置を変更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4429
4430 #. type: Plain text
4431 #: build/C/man3/fseek.3:136
4432 msgid ""
4433 "The B<rewind>()  function returns no value.  Upon successful completion, "
4434 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4435 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4436 "indicate the error."
4437 msgstr ""
4438 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4439 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4440 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4441
4442 #. type: Plain text
4443 #: build/C/man3/fseek.3:142
4444 msgid "The I<stream> specified is not a seekable stream."
4445 msgstr "指定した I<stream> がシークできない。"
4446
4447 #. type: Plain text
4448 #: build/C/man3/fseek.3:154
4449 msgid ""
4450 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4451 "B<SEEK_CUR>.  Or: the resulting file offset would be negative."
4452 msgstr ""
4453 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4454 "B<SEEK_CUR> 以外の値であった。 または、更新後のファイルオフセットが負になって"
4455 "しまう。"
4456
4457 #. type: Plain text
4458 #: build/C/man3/fseek.3:169
4459 msgid ""
4460 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4461 "also fail and set I<errno> for any of the errors specified for the routines "
4462 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4463 msgstr ""
4464 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ "
4465 "B<fflush>(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出"
4466 "す際に失敗する可能性がある。この場合は それぞれ対応した I<errno> が設定され"
4467 "る。"
4468
4469 #. type: Plain text
4470 #: build/C/man3/fseek.3:174
4471 msgid "B<lseek>(2), B<fseeko>(3)"
4472 msgstr "B<lseek>(2), B<fseeko>(3)"
4473
4474 #. type: TH
4475 #: build/C/man3/fseeko.3:25
4476 #, no-wrap
4477 msgid "FSEEKO"
4478 msgstr "FSEEKO"
4479
4480 #. type: TH
4481 #: build/C/man3/fseeko.3:25
4482 #, no-wrap
4483 msgid "2014-10-02"
4484 msgstr "2014-10-02"
4485
4486 #. type: Plain text
4487 #: build/C/man3/fseeko.3:28
4488 msgid "fseeko, ftello - seek to or report file position"
4489 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4490
4491 #. type: Plain text
4492 #: build/C/man3/fseeko.3:33
4493 #, no-wrap
4494 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4495 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4496
4497 #. type: Plain text
4498 #: build/C/man3/fseeko.3:36
4499 #, no-wrap
4500 msgid ""
4501 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4502 "\n"
4503 msgstr ""
4504 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4505 "\n"
4506
4507 #. type: Plain text
4508 #: build/C/man3/fseeko.3:45
4509 msgid "B<fseeko>(), B<ftello>():"
4510 msgstr "B<fseeko>(), B<ftello>():"
4511
4512 #. type: Plain text
4513 #: build/C/man3/fseeko.3:50
4514 msgid ""
4515 "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || "
4516 "_XOPEN_SOURCE\\ E<gt>=\\ 600"
4517 msgstr ""
4518 "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || "
4519 "_XOPEN_SOURCE\\ E<gt>=\\ 600"
4520
4521 #. type: Plain text
4522 #: build/C/man3/fseeko.3:52
4523 msgid "(defining the obsolete _LARGEFILE_SOURCE macro also works)"
4524 msgstr "(廃止予定のマクロ _LARGEFILE_SOURCE を指定しても動作する)"
4525
4526 #. type: Plain text
4527 #: build/C/man3/fseeko.3:75
4528 msgid ""
4529 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4530 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4531 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4532 "I<off_t> instead of I<long>."
4533 msgstr ""
4534 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4535 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし "
4536 "B<fseeko>()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではな"
4537 "く I<off_t> になっている。"
4538
4539 #. type: Plain text
4540 #: build/C/man3/fseeko.3:88
4541 msgid ""
4542 "On some architectures, both I<off_t> and I<long> are 32-bit types, but "
4543 "defining B<_FILE_OFFSET_BITS> with the value 64 (before including I<any> "
4544 "header files)  will turn I<off_t> into a 64-bit type."
4545 msgstr ""
4546 "いくつかのアーキテクチャーでは、 I<off_t> と I<long> の両方が 32 ビット型だ"
4547 "が、 (「どの」ヘッダーファイルをインクルードするよりも前に) "
4548 "B<_FILE_OFFSET_BITS> を値 64 で定義すると、 I<off_t> が 64 ビット型になる。"
4549
4550 #. type: Plain text
4551 #: build/C/man3/fseeko.3:97
4552 msgid ""
4553 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4554 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4555 "indicate the error."
4556 msgstr ""
4557 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4558 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4559
4560 #. type: Plain text
4561 #: build/C/man3/fseeko.3:100
4562 msgid "See the ERRORS in B<fseek>(3)."
4563 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4564
4565 #. type: Plain text
4566 #: build/C/man3/fseeko.3:102
4567 msgid "These functions are available under glibc since version 2.1."
4568 msgstr "これらの関数はバージョン 2.1 以降の glibc で利用可能である。"
4569
4570 #. type: Plain text
4571 #: build/C/man3/fseeko.3:104
4572 msgid "SUSv2, POSIX.1-2001."
4573 msgstr "SUSv2, POSIX.1-2001."
4574
4575 #. type: Plain text
4576 #: build/C/man3/fseeko.3:106
4577 msgid "These functions are found on System V-like systems."
4578 msgstr "これらの関数は System-V 風のシステムに存在する。"
4579
4580 #. type: Plain text
4581 #: build/C/man3/fseeko.3:108
4582 msgid "B<fseek>(3)"
4583 msgstr "B<fseek>(3)"
4584
4585 #. type: TH
4586 #: build/C/man3/getline.3:26
4587 #, no-wrap
4588 msgid "GETLINE"
4589 msgstr "GETLINE"
4590
4591 #. type: Plain text
4592 #: build/C/man3/getline.3:29
4593 msgid "getline, getdelim - delimited string input"
4594 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4595
4596 #. type: Plain text
4597 #: build/C/man3/getline.3:34
4598 #, no-wrap
4599 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4600 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4601
4602 #. type: Plain text
4603 #: build/C/man3/getline.3:37
4604 #, no-wrap
4605 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4606 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4607
4608 #. type: Plain text
4609 #: build/C/man3/getline.3:47
4610 msgid "B<getline>(), B<getdelim>():"
4611 msgstr "B<getline>(), B<getdelim>():"
4612
4613 #. type: Plain text
4614 #: build/C/man3/getline.3:52
4615 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4616 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4617
4618 #. type: Plain text
4619 #: build/C/man3/getline.3:65
4620 msgid ""
4621 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4622 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4623 "terminated and includes the newline character, if one was found."
4624 msgstr ""
4625 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4626 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4627 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4628
4629 #. type: Plain text
4630 #: build/C/man3/getline.3:77
4631 msgid ""
4632 "If I<*lineptr> is set to NULL and I<*n> is set 0 before the call, then "
4633 "B<getline>()  will allocate a buffer for storing the line.  This buffer "
4634 "should be freed by the user program even if B<getline>()  failed."
4635 msgstr ""
4636 "I<*lineptr> が NULL にセットされ、 I<*n> が呼び出し前に 0 にセットされた場"
4637 "合、 B<getline>()  は行の内容を格納するためのバッファを確保する。 このバッ"
4638 "ファは、 B<getline>() が失敗した場合であっても、ユーザーのプログラムで解放す"
4639 "べきである。"
4640
4641 #. type: Plain text
4642 #: build/C/man3/getline.3:95
4643 msgid ""
4644 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4645 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4646 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4647 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4648 msgstr ""
4649 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4650 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4651 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4652 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4653 "I<*n> を更新する。"
4654
4655 #. type: Plain text
4656 #: build/C/man3/getline.3:101
4657 msgid ""
4658 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4659 "to reflect the buffer address and allocated size respectively."
4660 msgstr ""
4661 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4662 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4663
4664 #. type: Plain text
4665 #: build/C/man3/getline.3:112
4666 msgid ""
4667 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4668 "than newline can be specified as the I<delimiter> argument.  As with "
4669 "B<getline>(), a delimiter character is not added if one was not present in "
4670 "the input before end of file was reached."
4671 msgstr ""
4672 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4673 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4674 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4675 "ファに追加しない。"
4676
4677 #. type: Plain text
4678 #: build/C/man3/getline.3:121
4679 msgid ""
4680 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4681 "read, including the delimiter character, but not including the terminating "
4682 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4683 "bytes in the line read."
4684 msgstr ""
4685 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4686 "字数には区切り文字は含まれるが、終端に使うヌルバイト (\\(aq\\e0\\(aq) は含ま"
4687 "れない。 この値によって、読み込んだ行に含まれるヌルバイトを操作することができ"
4688 "る。"
4689
4690 #. type: Plain text
4691 #: build/C/man3/getline.3:127
4692 msgid ""
4693 "Both functions return -1 on failure to read a line (including end-of-file "
4694 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4695 msgstr ""
4696 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4697 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4698 "を示す値が設定される。"
4699
4700 #. type: Plain text
4701 #: build/C/man3/getline.3:137
4702 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4703 msgstr ""
4704 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4705 "I<stream> が有効でない)。"
4706
4707 #. type: Plain text
4708 #: build/C/man3/getline.3:144
4709 msgid ""
4710 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4711 "were standardized in POSIX.1-2008."
4712 msgstr ""
4713 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4714 "POSIX.1-2008 で標準化された。"
4715
4716 #. type: Plain text
4717 #: build/C/man3/getline.3:149
4718 #, no-wrap
4719 msgid ""
4720 "#define _GNU_SOURCE\n"
4721 "#include E<lt>stdio.hE<gt>\n"
4722 "#include E<lt>stdlib.hE<gt>\n"
4723 msgstr ""
4724 "#define _GNU_SOURCE\n"
4725 "#include E<lt>stdio.hE<gt>\n"
4726 "#include E<lt>stdlib.hE<gt>\n"
4727
4728 #. type: Plain text
4729 #: build/C/man3/getline.3:157
4730 #, no-wrap
4731 msgid ""
4732 "int\n"
4733 "main(void)\n"
4734 "{\n"
4735 "    FILE *fp;\n"
4736 "    char *line = NULL;\n"
4737 "    size_t len = 0;\n"
4738 "    ssize_t read;\n"
4739 msgstr ""
4740 "int\n"
4741 "main(void)\n"
4742 "{\n"
4743 "    FILE *fp;\n"
4744 "    char *line = NULL;\n"
4745 "    size_t len = 0;\n"
4746 "    ssize_t read;\n"
4747
4748 #. type: Plain text
4749 #: build/C/man3/getline.3:161
4750 #, no-wrap
4751 msgid ""
4752 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4753 "    if (fp == NULL)\n"
4754 "        exit(EXIT_FAILURE);\n"
4755 msgstr ""
4756 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4757 "    if (fp == NULL)\n"
4758 "        exit(EXIT_FAILURE);\n"
4759
4760 #. type: Plain text
4761 #: build/C/man3/getline.3:166
4762 #, no-wrap
4763 msgid ""
4764 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4765 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4766 "        printf(\"%s\", line);\n"
4767 "    }\n"
4768 msgstr ""
4769 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4770 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4771 "        printf(\"%s\", line);\n"
4772 "    }\n"
4773
4774 #. type: Plain text
4775 #: build/C/man3/getline.3:171
4776 #, no-wrap
4777 msgid ""
4778 "    free(line);\n"
4779 "    fclose(fp);\n"
4780 "    exit(EXIT_SUCCESS);\n"
4781 "}\n"
4782 msgstr ""
4783 "    free(line);\n"
4784 "    fclose(fp);\n"
4785 "    exit(EXIT_SUCCESS);\n"
4786 "}\n"
4787
4788 #. type: Plain text
4789 #: build/C/man3/getline.3:178
4790 msgid "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
4791 msgstr "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
4792
4793 #. type: TH
4794 #: build/C/man3/gets.3:29
4795 #, no-wrap
4796 msgid "GETS"
4797 msgstr "GETS"
4798
4799 #. type: TH
4800 #: build/C/man3/gets.3:29
4801 #, no-wrap
4802 msgid "2014-01-24"
4803 msgstr "2014-01-24"
4804
4805 #. type: Plain text
4806 #: build/C/man3/gets.3:32
4807 msgid "gets - get a string from standard input (DEPRECATED)"
4808 msgstr "gets - 標準入力からの文字列を取得する (非推奨)"
4809
4810 #. type: Plain text
4811 #: build/C/man3/gets.3:37
4812 #, no-wrap
4813 msgid "B<char *gets(char *>I<s>B<);>\n"
4814 msgstr "B<char *gets(char *>I<s>B<);>\n"
4815
4816 #. type: Plain text
4817 #: build/C/man3/gets.3:40
4818 msgid "I<Never use this function>."
4819 msgstr "I<この関数は使用しないこと>。"
4820
4821 #. type: Plain text
4822 #: build/C/man3/gets.3:50
4823 msgid ""
4824 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4825 "until either a terminating newline or B<EOF>, which it replaces with a null "
4826 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4827 "below)."
4828 msgstr ""
4829 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4830 "すバッファに格納する (末尾の改行文字や B<EOF> はヌルバイト (\\(aq\\e0\\(aq) "
4831 "に置き換えられる)。 バッファオーバーランのチェックは行われない (下記の「バ"
4832 "グ」を参照)。"
4833
4834 #. type: Plain text
4835 #: build/C/man3/gets.3:58
4836 msgid ""
4837 "B<gets>()  returns I<s> on success, and NULL on error or when end of file "
4838 "occurs while no characters have been read.  However, given the lack of "
4839 "buffer overrun checking, there can be no guarantees that the function will "
4840 "even return."
4841 msgstr ""
4842 "B<gets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのに"
4843 "ファイルの終わりになった 場合に NULL を返す。 しかし、バッファの行き過ぎの"
4844 "チェックが行われないため、この関数が返るという保証はない。"
4845
4846 #. type: Plain text
4847 #: build/C/man3/gets.3:72
4848 msgid ""
4849 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4850 "C11 removes the specification of B<gets>()  from the C language, and since "
4851 "version 2.16, glibc header files don't expose the function declaration if "
4852 "the B<_ISOC11_SOURCE> feature test macro is defined."
4853 msgstr ""
4854 "LSB は B<gets>() を非推奨としている。\n"
4855 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4856 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4857 "glibc バージョン 2.16 以降では、機能検査マクロ B<_ISOC11_SOURCE> が定義され"
4858 "た\n"
4859 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4860
4861 #. type: Plain text
4862 #: build/C/man3/gets.3:86
4863 msgid ""
4864 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4865 "data in advance how many characters B<gets>()  will read, and because "
4866 "B<gets>()  will continue to store characters past the end of the buffer, it "
4867 "is extremely dangerous to use.  It has been used to break computer "
4868 "security.  Use B<fgets>()  instead."
4869 msgstr ""
4870 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4871 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4872 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4873 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4874 "と。"
4875
4876 #. type: Plain text
4877 #: build/C/man3/gets.3:90
4878 msgid ""
4879 "For more information, see CWE-242 (aka \"Use of Inherently Dangerous Function"
4880 "\") at http://cwe.mitre.org/data/definitions/242.html"
4881 msgstr ""
4882 "詳しい情報については、CWE-242 (別名 \"Use of Inherently Dangerous Function"
4883 "\" (「本質的に危険な関数を使う」)) を参照。 http://cwe.mitre.org/data/"
4884 "definitions/242.html で参照できる。"
4885
4886 #. type: Plain text
4887 #: build/C/man3/gets.3:108
4888 msgid ""
4889 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), "
4890 "B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), "
4891 "B<getline>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
4892 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4893 msgstr ""
4894 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), "
4895 "B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), "
4896 "B<getline>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), "
4897 "B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4898
4899 #. type: TH
4900 #: build/C/man3/getw.3:25
4901 #, no-wrap
4902 msgid "GETW"
4903 msgstr "GETW"
4904
4905 #. type: TH
4906 #: build/C/man3/getw.3:25
4907 #, no-wrap
4908 msgid "2010-09-26"
4909 msgstr "2010-09-26"
4910
4911 #. type: Plain text
4912 #: build/C/man3/getw.3:28
4913 msgid "getw, putw - input and output of words (ints)"
4914 msgstr "getw, putw - ワード(int)の入出力"
4915
4916 #. type: Plain text
4917 #: build/C/man3/getw.3:33
4918 #, no-wrap
4919 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4920 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4921
4922 #. type: Plain text
4923 #: build/C/man3/getw.3:35
4924 #, no-wrap
4925 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4926 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4927
4928 #. type: Plain text
4929 #: build/C/man3/getw.3:44
4930 msgid "B<getw>(), B<putw>():"
4931 msgstr "B<getw>(), B<putw>():"
4932
4933 #. type: TP
4934 #: build/C/man3/getw.3:47
4935 #, no-wrap
4936 msgid "Since glibc 2.3.3:"
4937 msgstr "glibc 2.3.3 以降:"
4938
4939 #. type: Plain text
4940 #: build/C/man3/getw.3:50
4941 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4942 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4943
4944 #. type: Plain text
4945 #: build/C/man3/getw.3:53
4946 #, no-wrap
4947 msgid ""
4948 "(_XOPEN_SOURCE &&\n"
4949 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4950 msgstr ""
4951 "(_XOPEN_SOURCE &&\n"
4952 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4953
4954 #. type: TP
4955 #: build/C/man3/getw.3:53
4956 #, no-wrap
4957 msgid "Before glibc 2.3.3:"
4958 msgstr "glibc 2.3.3 より前:"
4959
4960 #. type: Plain text
4961 #: build/C/man3/getw.3:56
4962 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4963 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4964
4965 #. type: Plain text
4966 #: build/C/man3/getw.3:66
4967 msgid ""
4968 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4969 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4970 msgstr ""
4971 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4972 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4973 "ことを勧める。"
4974
4975 #. type: Plain text
4976 #: build/C/man3/getw.3:73
4977 msgid ""
4978 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4979 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4980 "instead."
4981 msgstr ""
4982 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4983 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4984 "使用することを勧める。"
4985
4986 #. type: Plain text
4987 #: build/C/man3/getw.3:80
4988 msgid ""
4989 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4990 "error, they return B<EOF>."
4991 msgstr ""
4992 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4993 "が発生した場合、これらの関数は B<EOF> を返す。"
4994
4995 #. type: Plain text
4996 #: build/C/man3/getw.3:83
4997 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4998 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4999
5000 #. type: Plain text
5001 #: build/C/man3/getw.3:87
5002 msgid ""
5003 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
5004 "can be used to distinguish between the two cases."
5005 msgstr ""
5006 "エラーの時に返される値は、正しいデータとして返されることもある。 "
5007 "B<ferror>(3)  を用いると、この二つの場合を区別することが出来る。"
5008
5009 #. type: Plain text
5010 #: build/C/man3/getw.3:93
5011 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
5012 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
5013
5014 #. type: TH
5015 #: build/C/man2/link.2:32
5016 #, no-wrap
5017 msgid "LINK"
5018 msgstr "LINK"
5019
5020 #. type: Plain text
5021 #: build/C/man2/link.2:35
5022 msgid "link, linkat - make a new name for a file"
5023 msgstr "link, linkat - ファイルの新しい名前を作成する"
5024
5025 #. type: Plain text
5026 #: build/C/man2/link.2:38 build/C/man2/pipe.2:42 build/C/man2/read.2:41
5027 #: build/C/man2/readlink.2:50 build/C/man2/symlink.2:39
5028 #: build/C/man2/unlink.2:39
5029 #, no-wrap
5030 msgid "B<#include E<lt>unistd.hE<gt>>\n"
5031 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
5032
5033 #. type: Plain text
5034 #: build/C/man2/link.2:40
5035 #, no-wrap
5036 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
5037 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
5038
5039 #. type: Plain text
5040 #: build/C/man2/link.2:43 build/C/man2/readlink.2:56 build/C/man2/symlink.2:44
5041 #: build/C/man2/unlink.2:44
5042 #, no-wrap
5043 msgid ""
5044 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
5045 "B<#include E<lt>unistd.hE<gt>>\n"
5046 msgstr ""
5047 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
5048 "B<#include E<lt>unistd.hE<gt>>\n"
5049
5050 #. type: Plain text
5051 #: build/C/man2/link.2:46
5052 #, no-wrap
5053 msgid ""
5054 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
5055 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
5056 msgstr ""
5057 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
5058 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
5059
5060 #. type: Plain text
5061 #: build/C/man2/link.2:54
5062 msgid "B<linkat>():"
5063 msgstr "B<linkat>():"
5064
5065 #. type: Plain text
5066 #: build/C/man2/link.2:63 build/C/man2/open.2:85 build/C/man2/readlink.2:83
5067 #: build/C/man2/rename.2:69 build/C/man2/symlink.2:71 build/C/man2/unlink.2:63
5068 msgid "_ATFILE_SOURCE"
5069 msgstr "_ATFILE_SOURCE"
5070
5071 #. type: Plain text
5072 #: build/C/man2/link.2:69
5073 msgid ""
5074 "B<link>()  creates a new link (also known as a hard link) to an existing "
5075 "file."
5076 msgstr ""
5077 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
5078 "link) ともいう) を作成する。"
5079
5080 #. type: Plain text
5081 #: build/C/man2/link.2:75
5082 msgid "If I<newpath> exists, it will I<not> be overwritten."
5083 msgstr "I<newpath> が存在する場合には、上書きはI<されない>。"
5084
5085 #. type: Plain text
5086 #: build/C/man2/link.2:80
5087 msgid ""
5088 "This new name may be used exactly as the old one for any operation; both "
5089 "names refer to the same file (and so have the same permissions and "
5090 "ownership) and it is impossible to tell which name was the \"original\"."
5091 msgstr ""
5092 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
5093 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
5094 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
5095
5096 #. type: SS
5097 #: build/C/man2/link.2:80
5098 #, no-wrap
5099 msgid "linkat()"
5100 msgstr "linkat()"
5101
5102 #. type: Plain text
5103 #: build/C/man2/link.2:86
5104 msgid ""
5105 "The B<linkat>()  system call operates in exactly the same way as B<link>(), "
5106 "except for the differences described here."
5107 msgstr ""
5108 "B<linkat>() システムコールは B<link>() と全く同様に動作するが、以下で説明する"
5109 "点が異なる。"
5110
5111 #. type: Plain text
5112 #: build/C/man2/link.2:96
5113 msgid ""
5114 "If the pathname given in I<oldpath> is relative, then it is interpreted "
5115 "relative to the directory referred to by the file descriptor I<olddirfd> "
5116 "(rather than relative to the current working directory of the calling "
5117 "process, as is done by B<link>()  for a relative pathname)."
5118 msgstr ""
5119 "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリ"
5120 "プター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される "
5121 "(B<link>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
5122 "ワーキングディレクトリに対する相対パスではない)。"
5123
5124 #. type: Plain text
5125 #: build/C/man2/link.2:108
5126 msgid ""
5127 "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, "
5128 "then I<oldpath> is interpreted relative to the current working directory of "
5129 "the calling process (like B<link>())."
5130 msgstr ""
5131 "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 "
5132 "B<AT_FDCWD> の場合、 (B<link>(2) と同様に) I<oldpath> は呼び出したプロセスの"
5133 "カレントワーキングディレクトリに対する相対パスと解釈される。"
5134
5135 #. type: Plain text
5136 #: build/C/man2/link.2:114 build/C/man2/rename.2:158
5137 msgid "If I<oldpath> is absolute, then I<olddirfd> is ignored."
5138 msgstr ""
5139 "I<oldpath> で指定されたパス名が絶対パスの場合、 I<olddirfd> は無視される。"
5140
5141 #. type: Plain text
5142 #: build/C/man2/link.2:122 build/C/man2/rename.2:166
5143 msgid ""
5144 "The interpretation of I<newpath> is as for I<oldpath>, except that a "
5145 "relative pathname is interpreted relative to the directory referred to by "
5146 "the file descriptor I<newdirfd>."
5147 msgstr ""
5148 "I<newpath> の解釈は I<oldpath> と同じである。 相対パスのパス名がファイルディ"
5149 "スクリプター I<newdirfd> が参照するディレクトリと解釈される点だけが異なる。"
5150
5151 #. type: Plain text
5152 #: build/C/man2/link.2:125
5153 msgid "The following values can be bitwise ORed in I<flags>:"
5154 msgstr "以下の値のビット単位の論理和を I<flags> に指定できる。"
5155
5156 #. type: TP
5157 #: build/C/man2/link.2:125
5158 #, no-wrap
5159 msgid "B<AT_EMPTY_PATH> (since Linux 2.6.39)"
5160 msgstr "B<AT_EMPTY_PATH> (Linux 2.6.39 以降)"
5161
5162 #.  commit 11a7b371b64ef39fc5fb1b6f2218eef7c4d035e3
5163 #.  Before glibc 2.16, defining _ATFILE_SOURCE sufficed
5164 #. type: Plain text
5165 #: build/C/man2/link.2:152
5166 msgid ""
5167 "If I<oldpath> is an empty string, create a link to the file referenced by "
5168 "I<olddirfd> (which may have been obtained using the B<open>(2)  B<O_PATH> "
5169 "flag).  In this case, I<olddirfd> can refer to any type of file, not just a "
5170 "directory.  This will generally not work if the file has a link count of "
5171 "zero (files created with B<O_TMPFILE> and without B<O_EXCL> are an "
5172 "exception).  The caller must have the B<CAP_DAC_READ_SEARCH> capability in "
5173 "order to use this flag.  This flag is Linux-specific; define B<_GNU_SOURCE> "
5174 "to obtain its definition."
5175 msgstr ""
5176 "I<oldpath> が空文字列の場合、 I<olddirfd> が参照するファイルへのリンクを作成"
5177 "する (I<olddirfd> は B<open>(2) の B<O_PATH> フラグを使って取得する)。 この場"
5178 "合、 I<olddirfd> はディレクトリ以外の任意の型のファイルを参照することができ"
5179 "る。 一般的には、 ファイルのリンクカウントが 0 の場合は、この操作は成功しな"
5180 "い (ただし、 B<O_TMPFILE> が指定され B<O_EXCL> を指定せずに作成されたファイル"
5181 "は例外である)。 このフラグを使用するためには、 呼び出し元は "
5182 "B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなければならない。 このフラグ"
5183 "は Linux 固有で、 この定義を得るには B<_GNU_SOURCE> を定義すること。"
5184
5185 #. type: TP
5186 #: build/C/man2/link.2:152
5187 #, no-wrap
5188 msgid "B<AT_SYMLINK_FOLLOW> (since Linux 2.6.18)"
5189 msgstr "B<AT_SYMLINK_FOLLOW> (Linux 2.6.18 以降)"
5190
5191 #. type: Plain text
5192 #: build/C/man2/link.2:171
5193 msgid ""
5194 "By default, B<linkat>(), does not dereference I<oldpath> if it is a symbolic "
5195 "link (like B<link>()).  The flag B<AT_SYMLINK_FOLLOW> can be specified in "
5196 "I<flags> to cause I<oldpath> to be dereferenced if it is a symbolic link.  "
5197 "If procfs is mounted, this can be used as an alternative to "
5198 "B<AT_EMPTY_PATH>, like this:"
5199 msgstr ""
5200 "B<linkat>() は (B<link>() 同様) デフォルトでは I<oldpath> がシンボリックリン"
5201 "クの場合リンクの展開を行わない。 フラグ B<AT_SYMLINK_FOLLOW> を I<flags> に指"
5202 "定することができ、指定した場合 I<oldpath> がシンボリックリンクの場合リンクの"
5203 "展開が行われる。 procfs がマウントされている場合、これは B<AT_EMPTY_PATH> の"
5204 "代替として以下のように使うことができる。"
5205
5206 #. type: Plain text
5207 #: build/C/man2/link.2:176
5208 #, no-wrap
5209 msgid ""
5210 "linkat(AT_FDCWD, \"/proc/self/fd/E<lt>fdE<gt>\", newdirfd,\n"
5211 "       newname, AT_SYMLINK_FOLLOW);\n"
5212 msgstr ""
5213 "linkat(AT_FDCWD, \"/proc/self/fd/E<lt>fdE<gt>\", newdirfd,\n"
5214 "       newname, AT_SYMLINK_FOLLOW);\n"
5215
5216 #. type: Plain text
5217 #: build/C/man2/link.2:182
5218 msgid ""
5219 "Before kernel 2.6.18, the I<flags> argument was unused, and had to be "
5220 "specified as 0."
5221 msgstr ""
5222 "カーネル 2.6.18 より前では、 I<flags> 引き数は未使用で、 0 を指定しなければな"
5223 "らなかった。"
5224
5225 #. type: Plain text
5226 #: build/C/man2/link.2:187
5227 msgid "See B<openat>(2)  for an explanation of the need for B<linkat>()."
5228 msgstr "B<linkat>() の必要性についての説明については B<openat>(2) を参照。"
5229
5230 #. type: Plain text
5231 #: build/C/man2/link.2:192 build/C/man2/pipe.2:138 build/C/man3/remove.3:65
5232 #: build/C/man2/rename.2:208 build/C/man2/rmdir.2:45
5233 #: build/C/man2/symlink.2:145 build/C/man2/unlink.2:158
5234 msgid ""
5235 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5236 "appropriately."
5237 msgstr ""
5238 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
5239 "定される。"
5240
5241 #. type: TP
5242 #: build/C/man2/link.2:193 build/C/man2/open.2:789 build/C/man2/readlink.2:160
5243 #: build/C/man2/rename.2:209 build/C/man2/rmdir.2:46
5244 #: build/C/man2/symlink.2:146 build/C/man3/tmpfile.3:57
5245 #: build/C/man2/unlink.2:159
5246 #, no-wrap
5247 msgid "B<EACCES>"
5248 msgstr "B<EACCES>"
5249
5250 #. type: Plain text
5251 #: build/C/man2/link.2:204
5252 msgid ""
5253 "Write access to the directory containing I<newpath> is denied, or search "
5254 "permission is denied for one of the directories in the path prefix of "
5255 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
5256 msgstr ""
5257 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
5258 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
5259 "(B<path_resolution>(7)  を参照)。"
5260
5261 #. type: TP
5262 #: build/C/man2/link.2:204 build/C/man2/open.2:798 build/C/man2/rename.2:245
5263 #: build/C/man2/symlink.2:155 build/C/man2/write.2:135
5264 #, no-wrap
5265 msgid "B<EDQUOT>"
5266 msgstr "B<EDQUOT>"
5267
5268 #. type: Plain text
5269 #: build/C/man2/link.2:207 build/C/man2/rename.2:248
5270 msgid "The user's quota of disk blocks on the filesystem has been exhausted."
5271 msgstr ""
5272 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
5273
5274 #. type: TP
5275 #: build/C/man2/link.2:207 build/C/man2/open.2:804 build/C/man2/rename.2:368
5276 #: build/C/man2/symlink.2:160 build/C/man3/tmpfile.3:60
5277 #, no-wrap
5278 msgid "B<EEXIST>"
5279 msgstr "B<EEXIST>"
5280
5281 #. type: Plain text
5282 #: build/C/man2/link.2:211
5283 msgid "I<newpath> already exists."
5284 msgstr "I<newpath> が既に存在する。"
5285
5286 #. type: TP
5287 #: build/C/man2/link.2:211 build/C/man2/llseek.2:74 build/C/man2/open.2:810
5288 #: build/C/man2/open_by_handle_at.2:266 build/C/man2/open_by_handle_at.2:321
5289 #: build/C/man2/pipe.2:139 build/C/man2/read.2:118 build/C/man2/readlink.2:165
5290 #: build/C/man2/rename.2:248 build/C/man2/rmdir.2:64
5291 #: build/C/man2/symlink.2:164 build/C/man2/unlink.2:178
5292 #: build/C/man2/write.2:141
5293 #, no-wrap
5294 msgid "B<EFAULT>"
5295 msgstr "B<EFAULT>"
5296
5297 #. type: Plain text
5298 #: build/C/man2/link.2:214 build/C/man2/rename.2:251
5299 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5300 msgstr ""
5301 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5302
5303 #. type: TP
5304 #: build/C/man2/link.2:214 build/C/man2/read.2:147 build/C/man2/readlink.2:181
5305 #: build/C/man2/symlink.2:167 build/C/man2/unlink.2:182
5306 #: build/C/man2/write.2:165
5307 #, no-wrap
5308 msgid "B<EIO>"
5309 msgstr "B<EIO>"
5310
5311 #. type: Plain text
5312 #: build/C/man2/link.2:217 build/C/man2/symlink.2:170
5313 #: build/C/man2/unlink.2:185
5314 msgid "An I/O error occurred."
5315 msgstr "I/O エラーが発生した。"
5316
5317 #. type: TP
5318 #: build/C/man2/link.2:217 build/C/man2/open.2:871 build/C/man2/open.2:875
5319 #: build/C/man2/open_by_handle_at.2:331 build/C/man2/readlink.2:184
5320 #: build/C/man2/rename.2:261 build/C/man2/rmdir.2:73
5321 #: build/C/man2/symlink.2:170 build/C/man2/unlink.2:190
5322 #, no-wrap
5323 msgid "B<ELOOP>"
5324 msgstr "B<ELOOP>"
5325
5326 #. type: Plain text
5327 #: build/C/man2/link.2:221 build/C/man2/rename.2:265
5328 msgid ""
5329 "Too many symbolic links were encountered in resolving I<oldpath> or "
5330 "I<newpath>."
5331 msgstr ""
5332 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5333 "る。"
5334
5335 #. type: TP
5336 #: build/C/man2/link.2:221 build/C/man2/rename.2:265
5337 #, no-wrap
5338 msgid "B<EMLINK>"
5339 msgstr "B<EMLINK>"
5340
5341 #. type: Plain text
5342 #: build/C/man2/link.2:226
5343 msgid ""
5344 "The file referred to by I<oldpath> already has the maximum number of links "
5345 "to it."
5346 msgstr ""
5347 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5348
5349 #. type: TP
5350 #: build/C/man2/link.2:226 build/C/man2/open.2:887 build/C/man2/readlink.2:187
5351 #: build/C/man2/rename.2:272 build/C/man2/rmdir.2:77
5352 #: build/C/man2/symlink.2:174 build/C/man2/unlink.2:194
5353 #, no-wrap
5354 msgid "B<ENAMETOOLONG>"
5355 msgstr "B<ENAMETOOLONG>"
5356
5357 #. type: Plain text
5358 #: build/C/man2/link.2:229 build/C/man2/rename.2:275
5359 msgid "I<oldpath> or I<newpath> was too long."
5360 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5361
5362 #. type: TP
5363 #: build/C/man2/link.2:229 build/C/man2/link.2:286 build/C/man2/link.2:294
5364 #: build/C/man2/link.2:304 build/C/man2/open.2:901 build/C/man2/open.2:908
5365 #: build/C/man2/open_by_handle_at.2:282 build/C/man2/readlink.2:190
5366 #: build/C/man2/rename.2:275 build/C/man2/rename.2:389 build/C/man2/rmdir.2:80
5367 #: build/C/man2/symlink.2:177 build/C/man2/symlink.2:212
5368 #: build/C/man2/unlink.2:197
5369 #, no-wrap
5370 msgid "B<ENOENT>"
5371 msgstr "B<ENOENT>"
5372
5373 #. type: Plain text
5374 #: build/C/man2/link.2:234
5375 msgid ""
5376 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5377 "dangling symbolic link."
5378 msgstr ""
5379 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5380 "(dangling)シンボリックリンクである。"
5381
5382 #. type: TP
5383 #: build/C/man2/link.2:234 build/C/man2/open.2:922 build/C/man2/readlink.2:193
5384 #: build/C/man2/rename.2:288 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5385 #: build/C/man2/symlink.2:184 build/C/man3/tempnam.3:102
5386 #: build/C/man2/unlink.2:204
5387 #, no-wrap
5388 msgid "B<ENOMEM>"
5389 msgstr "B<ENOMEM>"
5390
5391 #. type: Plain text
5392 #: build/C/man2/link.2:237 build/C/man2/open.2:925 build/C/man2/readlink.2:196
5393 #: build/C/man2/rename.2:291 build/C/man2/rmdir.2:88
5394 #: build/C/man2/symlink.2:187 build/C/man2/unlink.2:207
5395 msgid "Insufficient kernel memory was available."
5396 msgstr "十分なカーネルメモリーがない。"
5397
5398 #. type: TP
5399 #: build/C/man2/link.2:237 build/C/man2/open.2:925 build/C/man2/rename.2:291
5400 #: build/C/man2/symlink.2:187 build/C/man3/tmpfile.3:72
5401 #: build/C/man2/write.2:168
5402 #, no-wrap
5403 msgid "B<ENOSPC>"
5404 msgstr "B<ENOSPC>"
5405
5406 #. type: Plain text
5407 #: build/C/man2/link.2:241 build/C/man2/rename.2:295
5408 #: build/C/man2/symlink.2:191
5409 msgid "The device containing the file has no room for the new directory entry."
5410 msgstr ""
5411 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5412 "空きがない。"
5413
5414 #. type: TP
5415 #: build/C/man2/link.2:241 build/C/man2/link.2:315 build/C/man2/open.2:931
5416 #: build/C/man2/open.2:1002 build/C/man2/open_by_handle_at.2:289
5417 #: build/C/man2/readlink.2:196 build/C/man2/readlink.2:206
5418 #: build/C/man2/rename.2:295 build/C/man2/rename.2:355 build/C/man2/rmdir.2:88
5419 #: build/C/man2/symlink.2:191 build/C/man2/symlink.2:218
5420 #: build/C/man2/unlink.2:207 build/C/man2/unlink.2:263
5421 #, no-wrap
5422 msgid "B<ENOTDIR>"
5423 msgstr "B<ENOTDIR>"
5424
5425 #. type: Plain text
5426 #: build/C/man2/link.2:246
5427 msgid ""
5428 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5429 "a directory."
5430 msgstr ""
5431 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5432 "い。"
5433
5434 #. type: TP
5435 #: build/C/man2/link.2:246 build/C/man2/link.2:250 build/C/man2/link.2:325
5436 #: build/C/man2/open.2:970 build/C/man2/open_by_handle_at.2:338
5437 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5438 #: build/C/man2/symlink.2:196 build/C/man2/unlink.2:212
5439 #, no-wrap
5440 msgid "B<EPERM>"
5441 msgstr "B<EPERM>"
5442
5443 #. type: Plain text
5444 #: build/C/man2/link.2:250
5445 msgid "I<oldpath> is a directory."
5446 msgstr "I<oldpath> がディレクトリである。"
5447
5448 #. type: Plain text
5449 #: build/C/man2/link.2:255
5450 msgid ""
5451 "The filesystem containing I<oldpath> and I<newpath> does not support the "
5452 "creation of hard links."
5453 msgstr ""
5454 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5455 "していない。"
5456
5457 #. type: TP
5458 #: build/C/man2/link.2:255
5459 #, no-wrap
5460 msgid "B<EPERM> (since Linux 3.6)"
5461 msgstr "B<EPERM> (Linux 3.6 以降)"
5462
5463 #. type: Plain text
5464 #: build/C/man2/link.2:262
5465 msgid ""
5466 "The caller does not have permission to create a hard link to this file (see "
5467 "the description of I</proc/sys/fs/protected_hardlinks> in B<proc>(5))."
5468 msgstr ""
5469 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5470 "の I</proc/sys/fs/protected_hardlinks> の説明を参照)。"
5471
5472 #. type: TP
5473 #: build/C/man2/link.2:262 build/C/man2/open.2:978 build/C/man2/rename.2:333
5474 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:201
5475 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:235
5476 #, no-wrap
5477 msgid "B<EROFS>"
5478 msgstr "B<EROFS>"
5479
5480 #. type: Plain text
5481 #: build/C/man2/link.2:265 build/C/man2/rename.2:336
5482 msgid "The file is on a read-only filesystem."
5483 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5484
5485 #. type: TP
5486 #: build/C/man2/link.2:265 build/C/man2/rename.2:336
5487 #, no-wrap
5488 msgid "B<EXDEV>"
5489 msgstr "B<EXDEV>"
5490
5491 #. type: Plain text
5492 #: build/C/man2/link.2:273
5493 msgid ""
5494 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
5495 "permits a filesystem to be mounted at multiple points, but B<link>()  does "
5496 "not work across different mount points, even if the same filesystem is "
5497 "mounted on both.)"
5498 msgstr ""
5499 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5500 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5501 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5502 "のマウント位置を跨いでは動作しない。)"
5503
5504 #. type: Plain text
5505 #: build/C/man2/link.2:276
5506 msgid "The following additional errors can occur for B<linkat>():"
5507 msgstr "B<linkat>() では以下のエラーも発生する。"
5508
5509 #. type: Plain text
5510 #: build/C/man2/link.2:282 build/C/man2/rename.2:355
5511 msgid "I<olddirfd> or I<newdirfd> is not a valid file descriptor."
5512 msgstr "I<olddirfd> か I<newdirfd> が有効なファイルディスクリプタでない。"
5513
5514 #. type: Plain text
5515 #: build/C/man2/link.2:286 build/C/man2/unlink.2:256
5516 msgid "An invalid flag value was specified in I<flags>."
5517 msgstr "無効なフラグ値が I<flags> に指定された。"
5518
5519 #. type: Plain text
5520 #: build/C/man2/link.2:294
5521 msgid ""
5522 "B<AT_EMPTY_PATH> was specified in I<flags>, but the caller did not have the "
5523 "B<CAP_DAC_READ_SEARCH> capability."
5524 msgstr ""
5525 "B<AT_EMPTY_PATH> が I<flags> に指定されたが、呼び出し元が "
5526 "B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなかった。"
5527
5528 #. type: Plain text
5529 #: build/C/man2/link.2:299
5530 msgid ""
5531 "An attempt was made to link to the I</proc/self/fd/NN> file corresponding to "
5532 "a file descriptor created with"
5533 msgstr ""
5534 "以下の呼び出しで作成されたファイルディスクリプターに対応する I</proc/self/fd/"
5535 "NN> ファイルに対してリンクを行おおうとした。"
5536
5537 #. type: Plain text
5538 #: build/C/man2/link.2:301
5539 #, no-wrap
5540 msgid "    open(path, O_TMPFILE | O_EXCL, mode);\n"
5541 msgstr "    open(path, O_TMPFILE | O_EXCL, mode);\n"
5542
5543 #. type: Plain text
5544 #: build/C/man2/link.2:304
5545 msgid "See B<open>(2)."
5546 msgstr "B<open>(2) 参照。"
5547
5548 #. type: Plain text
5549 #: build/C/man2/link.2:315
5550 msgid ""
5551 "I<oldpath> is a relative pathname and I<olddirfd> refers to a directory that "
5552 "has been deleted, or I<newpath> is a relative pathname and I<newdirfd> "
5553 "refers to a directory that has been deleted."
5554 msgstr ""
5555 "I<oldpath> が相対パス名で、 I<olddirfd> が削除されたディレクトリを参照してい"
5556 "る。 または、 I<newpath> が相対パス名で、 I<newdirfd> が削除されたディレクト"
5557 "リを参照している。"
5558
5559 #. type: Plain text
5560 #: build/C/man2/link.2:325 build/C/man2/rename.2:365
5561 msgid ""
5562 "I<oldpath> is relative and I<olddirfd> is a file descriptor referring to a "
5563 "file other than a directory; or similar for I<newpath> and I<newdirfd>"
5564 msgstr ""
5565 "I<oldpath> が相対パスで、 I<olddirfd> がディレクトリ以外のファイルを参照して"
5566 "いる。または I<newpath> と I<newdirfd> に関して同じ状況である。"
5567
5568 #. type: Plain text
5569 #: build/C/man2/link.2:334
5570 msgid ""
5571 "B<AT_EMPTY_PATH> was specified in I<flags>, I<oldpath> is an empty string, "
5572 "and I<olddirfd> refers to a directory."
5573 msgstr ""
5574 "I<flags> に B<AT_EMPTY_PATH> が指定され、 I<oldpath> が空文字列で、 "
5575 "I<olddirfd> がディレクトリを参照している。"
5576
5577 #. type: Plain text
5578 #: build/C/man2/link.2:338
5579 msgid ""
5580 "B<linkat>()  was added to Linux in kernel 2.6.16; library support was added "
5581 "to glibc in version 2.4."
5582 msgstr ""
5583 "B<linkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポー"
5584 "トはバージョン 2.4 で glibc に追加された。"
5585
5586 #.  SVr4 documents additional ENOLINK and
5587 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5588 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5589 #. type: Plain text
5590 #: build/C/man2/link.2:344
5591 msgid "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES), POSIX.1-2008."
5592 msgstr ""
5593 "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照), POSIX.1-2008."
5594
5595 #. type: Plain text
5596 #: build/C/man2/link.2:347
5597 msgid "B<linkat>(): POSIX.1-2008."
5598 msgstr "B<linkat>(): POSIX.1-2008."
5599
5600 #. type: Plain text
5601 #: build/C/man2/link.2:354
5602 msgid ""
5603 "Hard links, as created by B<link>(), cannot span filesystems.  Use "
5604 "B<symlink>(2)  if this is required."
5605 msgstr ""
5606 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5607 "このような場合は B<symlink>(2)  を使用すること。"
5608
5609 #.  more precisely: since kernel 1.3.56
5610 #.  For example, the default Solaris compilation environment
5611 #.  behaves like Linux, and contributors to a March 2005
5612 #.  thread in the Austin mailing list reported that some
5613 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5614 #. type: Plain text
5615 #: build/C/man2/link.2:385
5616 msgid ""
5617 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5618 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5619 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5620 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5621 "the same file that I<oldpath> refers to).  Some other implementations behave "
5622 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5623 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5624 "dereferenced if it is a symbolic link.  For precise control over the "
5625 "treatment of symbolic links when creating a link, use B<linkat>(2)."
5626 msgstr ""
5627 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5628 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5629 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5630 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5631 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5632 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5633 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5634 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5635 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御を行う場合"
5636 "には B<linkat>(2) を使用すること。"
5637
5638 #. type: Plain text
5639 #: build/C/man2/link.2:405
5640 msgid ""
5641 "On older kernels where B<linkat>()  is unavailable, the glibc wrapper "
5642 "function falls back to the use of B<link>(), unless the B<AT_SYMLINK_FOLLOW> "
5643 "is specified.  When I<oldpath> and I<newpath> are relative pathnames, glibc "
5644 "constructs pathnames based on the symbolic links in I</proc/self/fd> that "
5645 "correspond to the I<olddirfd> and I<newdirfd> arguments."
5646 msgstr ""
5647 "B<linkat>() が利用できない古いカーネルでは、 B<AT_SYMLINK_FOLLOW> が指定され"
5648 "ていない場合、 glibc ラッパー関数は B<link>() を使用するモードにフォールバッ"
5649 "クする。 I<oldpath> と I<newpath> が相対パスの場合、 glibc は I<olddirfd> と "
5650 "I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいて"
5651 "それぞれパス名を構成する。"
5652
5653 #. type: Plain text
5654 #: build/C/man2/link.2:411
5655 msgid ""
5656 "On NFS filesystems, the return code may be wrong in case the NFS server "
5657 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5658 "to find out if the link got created."
5659 msgstr ""
5660 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5661 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5662 "ためには B<stat>(2)  を使用すること。"
5663
5664 #. type: Plain text
5665 #: build/C/man2/link.2:420
5666 msgid ""
5667 "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), "
5668 "B<path_resolution>(7), B<symlink>(7)"
5669 msgstr ""
5670 "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), "
5671 "B<path_resolution>(7), B<symlink>(7)"
5672
5673 #. type: TH
5674 #: build/C/man2/llseek.2:28
5675 #, no-wrap
5676 msgid "LLSEEK"
5677 msgstr "LLSEEK"
5678
5679 #. type: TH
5680 #: build/C/man2/llseek.2:28
5681 #, no-wrap
5682 msgid "2012-07-13"
5683 msgstr "2012-07-13"
5684
5685 #. type: Plain text
5686 #: build/C/man2/llseek.2:31
5687 msgid "_llseek - reposition read/write file offset"
5688 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5689
5690 #. type: Plain text
5691 #: build/C/man2/llseek.2:35
5692 #, no-wrap
5693 msgid ""
5694 "B<#include E<lt>sys/types.hE<gt>>\n"
5695 "B<#include E<lt>unistd.hE<gt>>\n"
5696 msgstr ""
5697 "B<#include E<lt>sys/types.hE<gt>>\n"
5698 "B<#include E<lt>unistd.hE<gt>>\n"
5699
5700 #. type: Plain text
5701 #: build/C/man2/llseek.2:39
5702 #, no-wrap
5703 msgid ""
5704 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5705 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5706 "B<            unsigned int >I<whence>B<);>\n"
5707 msgstr ""
5708 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5709 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5710 "B<            unsigned int >I<whence>B<);>\n"
5711
5712 #. type: Plain text
5713 #: build/C/man2/llseek.2:43
5714 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5715 msgstr ""
5716 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5717 "を参照。"
5718
5719 #. type: Plain text
5720 #: build/C/man2/llseek.2:62
5721 msgid ""
5722 "The B<_llseek>()  function repositions the offset of the open file "
5723 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5724 "offset_low> bytes relative to the beginning of the file, the current "
5725 "position in the file, or the end of the file, depending on whether I<whence> "
5726 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5727 "resulting file position in the argument I<result>."
5728 msgstr ""
5729 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5730 "れたオープンされたファイルのオフセットの位置を、相対的に "
5731 "I<(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置"
5732 "を表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5733 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5734 "のファイル位置を I<result> 引き数に返す。"
5735
5736 #. type: Plain text
5737 #: build/C/man2/llseek.2:69
5738 msgid ""
5739 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5740 "-1 is returned and I<errno> is set to indicate the error."
5741 msgstr ""
5742 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5743 "エラーを示す I<errno> が設定される。"
5744
5745 #. type: Plain text
5746 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:192
5747 msgid "I<fd> is not an open file descriptor."
5748 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5749
5750 #. type: Plain text
5751 #: build/C/man2/llseek.2:77
5752 msgid "Problem with copying results to user space."
5753 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5754
5755 #. type: Plain text
5756 #: build/C/man2/llseek.2:81
5757 msgid "I<whence> is invalid."
5758 msgstr "I<whence> が不正である。"
5759
5760 #. type: Plain text
5761 #: build/C/man2/llseek.2:84
5762 msgid ""
5763 "This function is Linux-specific, and should not be used in programs intended "
5764 "to be portable."
5765 msgstr ""
5766 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5767
5768 #. type: Plain text
5769 #: build/C/man2/llseek.2:87
5770 msgid ""
5771 "Glibc does not provide a wrapper for this system call; call it using "
5772 "B<syscall>(2)."
5773 msgstr ""
5774 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
5775 "B<syscall>(2)  を使って呼び出すこと。"
5776
5777 #. type: Plain text
5778 #: build/C/man2/llseek.2:90
5779 msgid "B<lseek>(2), B<lseek64>(3)"
5780 msgstr "B<lseek>(2), B<lseek64>(3)"
5781
5782 #. type: TH
5783 #: build/C/man2/lseek.2:47
5784 #, no-wrap
5785 msgid "LSEEK"
5786 msgstr "LSEEK"
5787
5788 #. type: TH
5789 #: build/C/man2/lseek.2:47 build/C/man2/open_by_handle_at.2:25
5790 #, no-wrap
5791 msgid "2014-06-13"
5792 msgstr "2014-06-13"
5793
5794 #. type: Plain text
5795 #: build/C/man2/lseek.2:50
5796 msgid "lseek - reposition read/write file offset"
5797 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5798
5799 #. type: Plain text
5800 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5801 msgid "B<#include E<lt>sys/types.hE<gt>>"
5802 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5803
5804 #. type: Plain text
5805 #: build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34 build/C/man2/rmdir.2:35
5806 #: build/C/man2/write.2:44
5807 msgid "B<#include E<lt>unistd.hE<gt>>"
5808 msgstr "B<#include E<lt>unistd.hE<gt>>"
5809
5810 #. type: Plain text
5811 #: build/C/man2/lseek.2:56
5812 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5813 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5814
5815 #. type: Plain text
5816 #: build/C/man2/lseek.2:67
5817 msgid ""
5818 "The B<lseek>()  function repositions the offset of the open file associated "
5819 "with the file descriptor I<fd> to the argument I<offset> according to the "
5820 "directive I<whence> as follows:"
5821 msgstr ""
5822 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5823 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5824 "へ以下のように変更する:"
5825
5826 #. type: Plain text
5827 #: build/C/man2/lseek.2:72
5828 msgid "The offset is set to I<offset> bytes."
5829 msgstr "オフセットは I<offset> バイトに設定される。"
5830
5831 #. type: Plain text
5832 #: build/C/man2/lseek.2:77
5833 msgid "The offset is set to its current location plus I<offset> bytes."
5834 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5835
5836 #. type: Plain text
5837 #: build/C/man2/lseek.2:82
5838 msgid "The offset is set to the size of the file plus I<offset> bytes."
5839 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5840
5841 #. type: Plain text
5842 #: build/C/man2/lseek.2:90
5843 msgid ""
5844 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5845 "the file (but this does not change the size of the file).  If data is later "
5846 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5847 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5848 "gap."
5849 msgstr ""
5850 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5851 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5852 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5853 "実際にそこにデータを書き込まれるまではヌルバイト (\\(aq\\e0\\(aq) の列が返さ"
5854 "れる。"
5855
5856 #. type: SS
5857 #: build/C/man2/lseek.2:90
5858 #, no-wrap
5859 msgid "Seeking file data and holes"
5860 msgstr "ファイルのデータとホールの探索"
5861
5862 #. type: Plain text
5863 #: build/C/man2/lseek.2:93
5864 msgid ""
5865 "Since version 3.1, Linux supports the following additional values for "
5866 "I<whence>:"
5867 msgstr ""
5868 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5869
5870 #. type: TP
5871 #: build/C/man2/lseek.2:93
5872 #, no-wrap
5873 msgid "B<SEEK_DATA>"
5874 msgstr "B<SEEK_DATA>"
5875
5876 #. type: Plain text
5877 #: build/C/man2/lseek.2:104
5878 msgid ""
5879 "Adjust the file offset to the next location in the file greater than or "
5880 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5881 "file offset is set to I<offset>."
5882 msgstr ""
5883 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5884 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5885 "定される。"
5886
5887 #. type: TP
5888 #: build/C/man2/lseek.2:104
5889 #, no-wrap
5890 msgid "B<SEEK_HOLE>"
5891 msgstr "B<SEEK_HOLE>"
5892
5893 #. type: Plain text
5894 #: build/C/man2/lseek.2:118
5895 msgid ""
5896 "Adjust the file offset to the next hole in the file greater than or equal to "
5897 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5898 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5899 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5900 "hole at the end of any file)."
5901 msgstr ""
5902 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5903 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5904 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5905 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5906 "だ)。"
5907
5908 #. type: Plain text
5909 #: build/C/man2/lseek.2:124
5910 msgid ""
5911 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5912 "end of the file."
5913 msgstr ""
5914 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5915 "B<lseek>() は失敗する。"
5916
5917 #. type: Plain text
5918 #: build/C/man2/lseek.2:130
5919 msgid ""
5920 "These operations allow applications to map holes in a sparsely allocated "
5921 "file.  This can be useful for applications such as file backup tools, which "
5922 "can save space when creating backups and preserve holes, if they have a "
5923 "mechanism for discovering holes."
5924 msgstr ""
5925 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5926 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5927 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5928 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5929 "約し、ホールを保持することができる。"
5930
5931 #.  https://lkml.org/lkml/2011/4/22/79
5932 #.  http://lwn.net/Articles/440255/
5933 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5934 #. type: Plain text
5935 #: build/C/man2/lseek.2:153
5936 msgid ""
5937 "For the purposes of these operations, a hole is a sequence of zeros that "
5938 "(normally) has not been allocated in the underlying file storage.  However, "
5939 "a filesystem is not obliged to report holes, so these operations are not a "
5940 "guaranteed mechanism for mapping the storage space actually allocated to a "
5941 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5942 "the underlying storage may not be reported as a hole.)  In the simplest "
5943 "implementation, a filesystem can support the operations by making "
5944 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5945 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5946 "by I<offset> is a hole, it can be considered to consist of data that is a "
5947 "sequence of zeros)."
5948 msgstr ""
5949 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5950 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5951 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5952 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5953 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5954 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5955 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5956 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5957 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5958 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5959 "ということである)。"
5960
5961 #. type: Plain text
5962 #: build/C/man2/lseek.2:162
5963 msgid ""
5964 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5965 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5966 msgstr ""
5967 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5968 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5969
5970 #. type: Plain text
5971 #: build/C/man2/lseek.2:168
5972 msgid ""
5973 "The B<SEEK_HOLE> and B<SEEK_DATA> operations are supported for the following "
5974 "filesystems:"
5975 msgstr ""
5976 "B<SEEK_HOLE>, B<SEEK_DATA> 操作に対応しているのは以下のファイルシステムであ"
5977 "る。"
5978
5979 #. type: Plain text
5980 #: build/C/man2/lseek.2:170
5981 msgid "Btrfs (since Linux 3.1)"
5982 msgstr "Btrfs (Linux 3.1 以降)"
5983
5984 #.  commit 93862d5e1ab875664c6cc95254fc365028a48bb1
5985 #. type: Plain text
5986 #: build/C/man2/lseek.2:173
5987 msgid "OCFS (since Linux 3.2)"
5988 msgstr "OCFS (Linux 3.2 以降)"
5989
5990 #. type: Plain text
5991 #: build/C/man2/lseek.2:175
5992 msgid "XFS (since Linux 3.5)"
5993 msgstr "XFS (Linux 3.5 以降)"
5994
5995 #. type: Plain text
5996 #: build/C/man2/lseek.2:177
5997 msgid "ext4 (since Linux 3.8)"
5998 msgstr "ext4 (Linux 3.8 以降)"
5999
6000 #. type: Plain text
6001 #: build/C/man2/lseek.2:179
6002 msgid "tmpfs (since Linux 3.8)"
6003 msgstr "tmpfs (Linux 3.8 以降)"
6004
6005 #. type: Plain text
6006 #: build/C/man2/lseek.2:187
6007 msgid ""
6008 "Upon successful completion, B<lseek>()  returns the resulting offset "
6009 "location as measured in bytes from the beginning of the file.  On error, the "
6010 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
6011 msgstr ""
6012 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
6013 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
6014 "される。"
6015
6016 #.  Some systems may allow negative offsets for character devices
6017 #.  and/or for remote filesystems.
6018 #. type: Plain text
6019 #: build/C/man2/lseek.2:200
6020 msgid ""
6021 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
6022 "beyond the end of a seekable device."
6023 msgstr ""
6024 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
6025 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
6026
6027 #. type: TP
6028 #: build/C/man2/lseek.2:200 build/C/man2/open.2:950
6029 #: build/C/man2/open_by_handle_at.2:304
6030 #, no-wrap
6031 msgid "B<EOVERFLOW>"
6032 msgstr "B<EOVERFLOW>"
6033
6034 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
6035 #. type: Plain text
6036 #: build/C/man2/lseek.2:205
6037 msgid "The resulting file offset cannot be represented in an I<off_t>."
6038 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
6039
6040 #. type: TP
6041 #: build/C/man2/lseek.2:205
6042 #, no-wrap
6043 msgid "B<ESPIPE>"
6044 msgstr "B<ESPIPE>"
6045
6046 #. type: Plain text
6047 #: build/C/man2/lseek.2:209
6048 msgid "I<fd> is associated with a pipe, socket, or FIFO."
6049 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
6050
6051 #. type: TP
6052 #: build/C/man2/lseek.2:209 build/C/man2/open.2:938
6053 #, no-wrap
6054 msgid "B<ENXIO>"
6055 msgstr "B<ENXIO>"
6056
6057 #. type: Plain text
6058 #: build/C/man2/lseek.2:217
6059 msgid ""
6060 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
6061 "beyond the end of the file."
6062 msgstr ""
6063 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
6064 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
6065
6066 #.  SVr4 documents additional error
6067 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
6068 #. type: Plain text
6069 #: build/C/man2/lseek.2:219 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
6070 #: build/C/man2/write.2:189
6071 msgid "SVr4, 4.3BSD, POSIX.1-2001."
6072 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
6073
6074 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
6075 #. type: Plain text
6076 #: build/C/man2/lseek.2:227
6077 msgid ""
6078 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
6079 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
6080 "next POSIX revision (Issue 8)."
6081 msgstr ""
6082 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
6083 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
6084 "る。"
6085
6086 #. type: Plain text
6087 #: build/C/man2/lseek.2:232
6088 msgid ""
6089 "See B<open>(2)  for a discussion of the relationship between file "
6090 "descriptors, open file descriptions, and files."
6091 msgstr ""
6092 "ファイルディスクリプタ、オープンファイル記述、ファイルの関係の説明については "
6093 "B<open>(2) を参照。"
6094
6095 #. type: Plain text
6096 #: build/C/man2/lseek.2:236
6097 msgid ""
6098 "Some devices are incapable of seeking and POSIX does not specify which "
6099 "devices must support B<lseek>()."
6100 msgstr ""
6101 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
6102 "に対応すべきかは規定していない。"
6103
6104 #.  Other systems return the number of written characters,
6105 #.  using SEEK_SET to set the counter. (Of written characters.)
6106 #. type: Plain text
6107 #: build/C/man2/lseek.2:243
6108 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
6109 msgstr ""
6110 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
6111 "る。"
6112
6113 #. type: Plain text
6114 #: build/C/man2/lseek.2:246
6115 msgid ""
6116 "When converting old code, substitute values for I<whence> with the following "
6117 "macros:"
6118 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
6119
6120 #. type: tbl table
6121 #: build/C/man2/lseek.2:249
6122 #, no-wrap
6123 msgid "old\tnew\n"
6124 msgstr "old \tnew\n"
6125
6126 #. type: tbl table
6127 #: build/C/man2/lseek.2:250
6128 #, no-wrap
6129 msgid "0\tSEEK_SET\n"
6130 msgstr "0\tSEEK_SET\n"
6131
6132 #. type: tbl table
6133 #: build/C/man2/lseek.2:251
6134 #, no-wrap
6135 msgid "1\tSEEK_CUR\n"
6136 msgstr "1\tSEEK_CUR\n"
6137
6138 #. type: tbl table
6139 #: build/C/man2/lseek.2:252
6140 #, no-wrap
6141 msgid "2\tSEEK_END\n"
6142 msgstr "2\tSEEK_END\n"
6143
6144 #. type: tbl table
6145 #: build/C/man2/lseek.2:253
6146 #, no-wrap
6147 msgid "L_SET\tSEEK_SET\n"
6148 msgstr "L_SET\tSEEK_SET\n"
6149
6150 #. type: tbl table
6151 #: build/C/man2/lseek.2:254
6152 #, no-wrap
6153 msgid "L_INCR\tSEEK_CUR\n"
6154 msgstr "L_INCR\tSEEK_CUR\n"
6155
6156 #. type: tbl table
6157 #: build/C/man2/lseek.2:255
6158 #, no-wrap
6159 msgid "L_XTND\tSEEK_END\n"
6160 msgstr "L_XTND\tSEEK_END\n"
6161
6162 #. type: Plain text
6163 #: build/C/man2/lseek.2:267
6164 msgid ""
6165 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
6166 "current file position pointer, so seeking on such files may be subject to "
6167 "race conditions."
6168 msgstr ""
6169 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
6170 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
6171 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
6172
6173 #. type: Plain text
6174 #: build/C/man2/lseek.2:274
6175 msgid ""
6176 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
6177 "B<posix_fallocate>(3)"
6178 msgstr ""
6179 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
6180 "B<posix_fallocate>(3)"
6181
6182 #. type: TH
6183 #: build/C/man3/lseek64.3:25
6184 #, no-wrap
6185 msgid "LSEEK64"
6186 msgstr "LSEEK64"
6187
6188 #. type: Plain text
6189 #: build/C/man3/lseek64.3:28
6190 msgid "lseek64 - reposition 64-bit read/write file offset"
6191 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
6192
6193 #. type: Plain text
6194 #: build/C/man3/lseek64.3:30
6195 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
6196 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
6197
6198 #. type: Plain text
6199 #: build/C/man3/lseek64.3:36
6200 msgid ""
6201 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
6202 msgstr ""
6203 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
6204
6205 #. type: Plain text
6206 #: build/C/man3/lseek64.3:53
6207 msgid ""
6208 "The B<lseek>(2)  family of functions reposition the offset of the open file "
6209 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
6210 "start, current position, or end of the file, when I<whence> has the value "
6211 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
6212 msgstr ""
6213 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
6214 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
6215 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
6216 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
6217
6218 #. type: Plain text
6219 #: build/C/man3/lseek64.3:56
6220 msgid "For more details, return value, and errors, see B<lseek>(2)."
6221 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
6222
6223 #. type: Plain text
6224 #: build/C/man3/lseek64.3:63
6225 msgid ""
6226 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
6227 "the raw system call B<_llseek>(2)."
6228 msgstr ""
6229 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), "
6230 "B<llseek>(2)  と元となるシステムコール B<_llseek>(2)  である。"
6231
6232 #. type: SS
6233 #: build/C/man3/lseek64.3:63
6234 #, no-wrap
6235 msgid "lseek"
6236 msgstr "lseek"
6237
6238 #. type: Plain text
6239 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
6240 #: build/C/man3/lseek64.3:116
6241 msgid "Prototype:"
6242 msgstr "プロトタイプ:"
6243
6244 #. type: Plain text
6245 #: build/C/man3/lseek64.3:69
6246 #, no-wrap
6247 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
6248 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
6249
6250 #. type: Plain text
6251 #: build/C/man3/lseek64.3:77
6252 msgid ""
6253 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
6254 "architectures, unless one compiles with"
6255 msgstr ""
6256 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
6257 "ビット符号付き型である。 ただし、"
6258
6259 #. type: Plain text
6260 #: build/C/man3/lseek64.3:81
6261 #, no-wrap
6262 msgid "#define _FILE_OFFSET_BITS 64\n"
6263 msgstr "#define _FILE_OFFSET_BITS 64\n"
6264
6265 #. type: Plain text
6266 #: build/C/man3/lseek64.3:85
6267 msgid "in which case it is a 64-bit signed type."
6268 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
6269
6270 #. type: SS
6271 #: build/C/man3/lseek64.3:85
6272 #, no-wrap
6273 msgid "lseek64"
6274 msgstr "lseek64"
6275
6276 #. type: Plain text
6277 #: build/C/man3/lseek64.3:91
6278 #, no-wrap
6279 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
6280 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
6281
6282 #. type: Plain text
6283 #: build/C/man3/lseek64.3:102
6284 msgid ""
6285 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
6286 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
6287 "when one compiles with"
6288 msgstr ""
6289 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
6290 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
6291 "ルした場合にのみ使用可能である。"
6292
6293 #. type: Plain text
6294 #: build/C/man3/lseek64.3:106
6295 #, no-wrap
6296 msgid "#define _LARGEFILE64_SOURCE\n"
6297 msgstr "#define _LARGEFILE64_SOURCE\n"
6298
6299 #.  in glibc 2.0.94, not in 2.0.6
6300 #. type: Plain text
6301 #: build/C/man3/lseek64.3:114
6302 msgid ""
6303 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
6304 "be an alias for B<llseek>()."
6305 msgstr ""
6306 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
6307 "アスとして定義されている。"
6308
6309 #. type: SS
6310 #: build/C/man3/lseek64.3:114
6311 #, no-wrap
6312 msgid "llseek"
6313 msgstr "llseek"
6314
6315 #. type: Plain text
6316 #: build/C/man3/lseek64.3:120
6317 #, no-wrap
6318 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
6319 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
6320
6321 #.  in libc 5.0.9, not in 4.7.6
6322 #. type: Plain text
6323 #: build/C/man3/lseek64.3:136
6324 msgid ""
6325 "The type I<loff_t> is a 64-bit signed type.  The library routine "
6326 "B<llseek>()  is available in the glibc and works without special defines.  "
6327 "However, the glibc headers do not provide a prototype.  Users should add the "
6328 "above prototype, or something equivalent, to their own source.  When users "
6329 "complained about data loss caused by a miscompilation of B<e2fsck>(8), glibc "
6330 "2.1.3 added the link-time warning"
6331 msgstr ""
6332 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>() "
6333 "は glibc で利用可能であり、 特別な定義なしに動作する。 しかしながら、 glibc "
6334 "のヘッダーはプロトタイプを供していない。 ユーザは上記のプロトタイプまたはそれ"
6335 "と同等のものを、 自身のソースに追加しなければならない。 このデータがないこと"
6336 "によって B<e2fsck>(8)  のコンパイルが失敗するという苦情がユーザから出たの"
6337 "で、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
6338
6339 #. type: Plain text
6340 #: build/C/man3/lseek64.3:139
6341 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
6342 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
6343
6344 #. type: Plain text
6345 #: build/C/man3/lseek64.3:143
6346 msgid ""
6347 "This makes this function unusable if one desires a warning-free compilation."
6348 msgstr ""
6349 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
6350
6351 #. type: SS
6352 #: build/C/man3/lseek64.3:143
6353 #, no-wrap
6354 msgid "_llseek"
6355 msgstr "_llseek"
6356
6357 #. type: Plain text
6358 #: build/C/man3/lseek64.3:146
6359 msgid ""
6360 "All the above functions are implemented in terms of this system call.  The "
6361 "prototype is:"
6362 msgstr ""
6363 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
6364 "下の通り:"
6365
6366 #. type: Plain text
6367 #: build/C/man3/lseek64.3:151
6368 #, no-wrap
6369 msgid ""
6370 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
6371 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
6372 msgstr ""
6373 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
6374 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
6375
6376 #. type: Plain text
6377 #: build/C/man3/lseek64.3:156
6378 msgid "For more details, see B<llseek>(2)."
6379 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
6380
6381 #. type: Plain text
6382 #: build/C/man3/lseek64.3:161
6383 msgid "The B<lseek64>()  function is thread-safe."
6384 msgstr "関数 B<lseek64>() はスレッドセーフである。"
6385
6386 #. type: Plain text
6387 #: build/C/man3/lseek64.3:164
6388 msgid "B<llseek>(2), B<lseek>(2)"
6389 msgstr "B<llseek>(2), B<lseek>(2)"
6390
6391 #. type: TH
6392 #: build/C/man2/open.2:51
6393 #, no-wrap
6394 msgid "OPEN"
6395 msgstr "OPEN"
6396
6397 #. type: TH
6398 #: build/C/man2/open.2:51
6399 #, no-wrap
6400 msgid "2014-12-31"
6401 msgstr "2014-12-31"
6402
6403 #. type: Plain text
6404 #: build/C/man2/open.2:54
6405 msgid "open, openat, creat - open and possibly create a file"
6406 msgstr "open, openat, creat - ファイルのオープン、作成を行う"
6407
6408 #. type: Plain text
6409 #: build/C/man2/open.2:59
6410 #, no-wrap
6411 msgid ""
6412 "B<#include E<lt>sys/types.hE<gt>>\n"
6413 "B<#include E<lt>sys/stat.hE<gt>>\n"
6414 "B<#include E<lt>fcntl.hE<gt>>\n"
6415 msgstr ""
6416 "B<#include E<lt>sys/types.hE<gt>>\n"
6417 "B<#include E<lt>sys/stat.hE<gt>>\n"
6418 "B<#include E<lt>fcntl.hE<gt>>\n"
6419
6420 #. type: Plain text
6421 #: build/C/man2/open.2:62
6422 #, no-wrap
6423 msgid ""
6424 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
6425 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6426 msgstr ""
6427 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
6428 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6429
6430 #. type: Plain text
6431 #: build/C/man2/open.2:64
6432 #, no-wrap
6433 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6434 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6435
6436 #. type: Plain text
6437 #: build/C/man2/open.2:68
6438 #, no-wrap
6439 msgid ""
6440 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
6441 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6442 msgstr ""
6443 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
6444 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6445
6446 #. type: Plain text
6447 #: build/C/man2/open.2:76
6448 msgid "B<openat>():"
6449 msgstr "B<openat>():"
6450
6451 #. type: Plain text
6452 #: build/C/man2/open.2:98
6453 msgid ""
6454 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
6455 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
6456 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
6457 "by a successful call will be the lowest-numbered file descriptor not "
6458 "currently open for the process."
6459 msgstr ""
6460 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
6461 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
6462 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6463 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
6464 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
6465 "のものとなる。"
6466
6467 #. type: Plain text
6468 #: build/C/man2/open.2:110
6469 msgid ""
6470 "By default, the new file descriptor is set to remain open across an "
6471 "B<execve>(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in "
6472 "B<fcntl>(2)  is initially disabled); the B<O_CLOEXEC> flag, described below, "
6473 "can be used to change this default.  The file offset is set to the beginning "
6474 "of the file (see B<lseek>(2))."
6475 msgstr ""
6476 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
6477 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6478 "ファイルディスクリプタフラグは最初は無効である); 後述の B<O_CLOEXEC> フラグ\n"
6479 "を使うとこのデフォルトを変更することができる。 ファイルオフセット \n"
6480 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6481
6482 #. type: Plain text
6483 #: build/C/man2/open.2:123
6484 #, fuzzy
6485 #| msgid ""
6486 #| "A call to B<open>()  creates a new I<open file description>, an entry in "
6487 #| "the system-wide table of open files.  This entry records the file offset "
6488 #| "and the file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> "
6489 #| "operation).  A file descriptor is a reference to one of these entries; "
6490 #| "this reference is unaffected if I<pathname> is subsequently removed or "
6491 #| "modified to refer to a different file.  The new open file description is "
6492 #| "initially not shared with any other process, but sharing may arise via "
6493 #| "B<fork>(2)."
6494 msgid ""
6495 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6496 "system-wide table of open files.  The open file description records the file "
6497 "offset and the file status flags (see below).  A file descriptor is a "
6498 "reference to an open file description; this reference is unaffected if "
6499 "I<pathname> is subsequently removed or modified to refer to a different "
6500 "file.  For further details on open file descriptions, see NOTES."
6501 msgstr ""
6502 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6503 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6504 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6505 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6506 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6507 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6508 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6509 "が、 B<fork>(2)  で共有が起こる場合がある。"
6510
6511 #. type: Plain text
6512 #: build/C/man2/open.2:131
6513 msgid ""
6514 "The argument I<flags> must include one of the following I<access modes>: "
6515 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6516 "only, write-only, or read/write, respectively."
6517 msgstr ""
6518 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6519 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6520 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6521
6522 #.  SUSv4 divides the flags into:
6523 #.  * Access mode
6524 #.  * File creation
6525 #.  * File status
6526 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6527 #.  though it's not clear what the difference between "other" and
6528 #.  "File creation" flags is.  I raised an Aardvark to see if this
6529 #.  can be clarified in SUSv4; 10 Oct 2008.
6530 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6531 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6532 #.  are also categorized" as file status flags.
6533 #. type: Plain text
6534 #: build/C/man2/open.2:170
6535 msgid ""
6536 "In addition, zero or more file creation flags and file status flags can be "
6537 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6538 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6539 "B<O_TMPFILE>, B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are "
6540 "all of the remaining flags listed below.  The distinction between these two "
6541 "groups of flags is that the file status flags can be retrieved and (in some "
6542 "cases)  modified; see B<fcntl>(2)  for details."
6543 msgstr ""
6544 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6545 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6546 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6547 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TMPFILE>, "
6548 "B<O_TRUNC>, B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち"
6549 "上記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は"
6550 "その内容を取得したり (場合によっては) 変更したりできる点にある。詳細は "
6551 "B<fcntl>(2) を参照。"
6552
6553 #. type: Plain text
6554 #: build/C/man2/open.2:172
6555 msgid ""
6556 "The full list of file creation flags and file status flags is as follows:"
6557 msgstr "すべてのファイル作成フラグとファイル状態フラグを以下のリストに示す。"
6558
6559 #. type: TP
6560 #: build/C/man2/open.2:172
6561 #, no-wrap
6562 msgid "B<O_APPEND>"
6563 msgstr "B<O_APPEND>"
6564
6565 #.  For more background, see
6566 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6567 #.  http://nfs.sourceforge.net/
6568 #. type: Plain text
6569 #: build/C/man2/open.2:189
6570 msgid ""
6571 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6572 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6573 "may lead to corrupted files on NFS filesystems if more than one process "
6574 "appends data to a file at once.  This is because NFS does not support "
6575 "appending to a file, so the client kernel has to simulate it, which can't be "
6576 "done without a race condition."
6577 msgstr ""
6578 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6579 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6580 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6581 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6582 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6583 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6584 "とはできないからである。"
6585
6586 #. type: TP
6587 #: build/C/man2/open.2:189
6588 #, no-wrap
6589 msgid "B<O_ASYNC>"
6590 msgstr "B<O_ASYNC>"
6591
6592 #. type: Plain text
6593 #: build/C/man2/open.2:203
6594 msgid ""
6595 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6596 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6597 "this file descriptor.  This feature is available only for terminals, "
6598 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6599 "B<fcntl>(2)  for further details.  See also BUGS, below."
6600 msgstr ""
6601 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6602 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6603 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6604 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6605 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。 "
6606 "下記の「バグ」も参照。"
6607
6608 #. type: TP
6609 #: build/C/man2/open.2:203
6610 #, no-wrap
6611 msgid "B<O_CLOEXEC> (since Linux 2.6.23)"
6612 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6613
6614 #.  NOTE! several other man pages refer to this text
6615 #. type: Plain text
6616 #: build/C/man2/open.2:213
6617 msgid ""
6618 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6619 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6620 "operations to set the B<FD_CLOEXEC> flag."
6621 msgstr ""
6622 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6623 "フラグを指定することで、 プログラムは B<FD_CLOEXEC> フラグをセットするために "
6624 "B<fcntl>(2) B<F_SETFD> 操作を別途呼び出す必要がなくなる。"
6625
6626 #.  This flag fixes only one form of the race condition;
6627 #.  The race can also occur with, for example, descriptors
6628 #.  returned by accept(), pipe(), etc.
6629 #. type: Plain text
6630 #: build/C/man2/open.2:242
6631 msgid ""
6632 "Note that the use of this flag is essential in some multithreaded programs, "
6633 "because using a separate B<fcntl>(2)  B<F_SETFD> operation to set the "
6634 "B<FD_CLOEXEC> flag does not suffice to avoid race conditions where one "
6635 "thread opens a file descriptor and attempts to set its close-on-exec flag "
6636 "using B<fcntl>(2)  at the same time as another thread does a B<fork>(2)  "
6637 "plus B<execve>(2).  Depending on the order of execution, the race may lead "
6638 "to the file descriptor returned by B<open>()  being unintentionally leaked "
6639 "to the program executed by the child process created by B<fork>(2).  (This "
6640 "kind of race is in principle possible for any system call that creates a "
6641 "file descriptor whose close-on-exec flag should be set, and various other "
6642 "Linux system calls provide an equivalent of the B<O_CLOEXEC> flag to deal "
6643 "with this problem.)"
6644 msgstr ""
6645 "ある種のマルチスレッドのプログラムはこのフラグの使用は不可欠である点に注意す"
6646 "ること。 なぜなら、個別に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2) "
6647 "B<F_SETFD> 操作を呼び出したとしても、あるスレッドがファイルディスクリプタを "
6648 "オープンするのと同時に別のスレッドが B<fork>(2) と B<execve>(2) を実行すると"
6649 "いう競合条件を避けるのには十分ではないからである。 実行の順序に依存して、この"
6650 "競合条件の結果、 B<open>() が返したファイルディスクリプタが B<fork>(2) で作成"
6651 "された子プロセスにより実行されるプログラムに意図せず見えてしまう可能性があ"
6652 "る。 (この種の競合は、 本質的に、 close-on-exec フラグをセットすべきファイル"
6653 "ディスクリプタを作成するどのシステムコールでも起こり得るものであり、 他のいろ"
6654 "いろな Linux システムコールでこの問題に対処するために B<O_CLOEXEC> と同等の機"
6655 "能が提供されている。)"
6656
6657 #. type: TP
6658 #: build/C/man2/open.2:242
6659 #, no-wrap
6660 msgid "B<O_CREAT>"
6661 msgstr "B<O_CREAT>"
6662
6663 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6664 #.  XFS (since 2.6.14).
6665 #. type: Plain text
6666 #: build/C/man2/open.2:258
6667 msgid ""
6668 "If the file does not exist, it will be created.  The owner (user ID) of the "
6669 "file is set to the effective user ID of the process.  The group ownership "
6670 "(group ID) is set either to the effective group ID of the process or to the "
6671 "group ID of the parent directory (depending on filesystem type and mount "
6672 "options, and the mode of the parent directory; see the mount options "
6673 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6674 msgstr ""
6675 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6676 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6677 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6678 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6679 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6680 "I<bsdgroups> と I<sysvgroups> を参照)。"
6681
6682 #. type: Plain text
6683 #: build/C/man2/open.2:285
6684 msgid ""
6685 "I<mode> specifies the permissions to use in case a new file is created.  "
6686 "This argument must be supplied when B<O_CREAT> or B<O_TMPFILE> is specified "
6687 "in I<flags>; if neither B<O_CREAT> nor B<O_TMPFILE> is specified, then "
6688 "I<mode> is ignored.  The effective permissions are modified by the process's "
6689 "I<umask> in the usual way: The permissions of the created file are I<(mode\\ "
6690 "&\\ ~umask)>.  Note that this mode applies only to future accesses of the "
6691 "newly created file; the B<open>()  call that creates a read-only file may "
6692 "well return a read/write file descriptor."
6693 msgstr ""
6694 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6695 "指定する。 I<flags> に B<O_CREAT> か B<O_TMPFILE> が指定されている場合、 "
6696 "I<mode> を指定しなければならない。 B<O_CREAT> も B<O_TMPFILE> も指定されてい"
6697 "ない場合、 I<mode> は無視される。 有効なアクセス許可は、普段と同じようにプロ"
6698 "セスの I<umask> によって修正され、作成されたファイルの許可は I<(mode\\ &\\ "
6699 "~umask)> となる。 このモードは、新しく作成されたファイルに対するそれ以降のア"
6700 "クセス にのみ適用される点に注意すること。 読み取り専用のファイルを作成する "
6701 "B<open>()  コールであっても、 読み書き可能なファイルディスクリプタを返すこと"
6702 "がありうる。"
6703
6704 #. type: Plain text
6705 #: build/C/man2/open.2:288
6706 msgid "The following symbolic constants are provided for I<mode>:"
6707 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6708
6709 #. type: TP
6710 #: build/C/man2/open.2:288
6711 #, no-wrap
6712 msgid "B<S_IRWXU>"
6713 msgstr "B<S_IRWXU>"
6714
6715 #. type: Plain text
6716 #: build/C/man2/open.2:291
6717 msgid "00700 user (file owner) has read, write and execute permission"
6718 msgstr ""
6719 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6720
6721 #. type: TP
6722 #: build/C/man2/open.2:291
6723 #, no-wrap
6724 msgid "B<S_IRUSR>"
6725 msgstr "B<S_IRUSR>"
6726
6727 #. type: Plain text
6728 #: build/C/man2/open.2:294
6729 msgid "00400 user has read permission"
6730 msgstr "00400 ユーザーに読み込みの許可がある。"
6731
6732 #. type: TP
6733 #: build/C/man2/open.2:294
6734 #, no-wrap
6735 msgid "B<S_IWUSR>"
6736 msgstr "B<S_IWUSR>"
6737
6738 #. type: Plain text
6739 #: build/C/man2/open.2:297
6740 msgid "00200 user has write permission"
6741 msgstr "00200 ユーザーに書き込みの許可がある。"
6742
6743 #. type: TP
6744 #: build/C/man2/open.2:297
6745 #, no-wrap
6746 msgid "B<S_IXUSR>"
6747 msgstr "B<S_IXUSR>"
6748
6749 #. type: Plain text
6750 #: build/C/man2/open.2:300
6751 msgid "00100 user has execute permission"
6752 msgstr "00100 ユーザーに実行の許可がある。"
6753
6754 #. type: TP
6755 #: build/C/man2/open.2:300
6756 #, no-wrap
6757 msgid "B<S_IRWXG>"
6758 msgstr "B<S_IRWXG>"
6759
6760 #. type: Plain text
6761 #: build/C/man2/open.2:303
6762 msgid "00070 group has read, write and execute permission"
6763 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6764
6765 #. type: TP
6766 #: build/C/man2/open.2:303
6767 #, no-wrap
6768 msgid "B<S_IRGRP>"
6769 msgstr "B<S_IRGRP>"
6770
6771 #. type: Plain text
6772 #: build/C/man2/open.2:306
6773 msgid "00040 group has read permission"
6774 msgstr "00040 グループに読み込みの許可がある。"
6775
6776 #. type: TP
6777 #: build/C/man2/open.2:306
6778 #, no-wrap
6779 msgid "B<S_IWGRP>"
6780 msgstr "B<S_IWGRP>"
6781
6782 #. type: Plain text
6783 #: build/C/man2/open.2:309
6784 msgid "00020 group has write permission"
6785 msgstr "00020 グループに書き込みの許可がある。"
6786
6787 #. type: TP
6788 #: build/C/man2/open.2:309
6789 #, no-wrap
6790 msgid "B<S_IXGRP>"
6791 msgstr "B<S_IXGRP>"
6792
6793 #. type: Plain text
6794 #: build/C/man2/open.2:312
6795 msgid "00010 group has execute permission"
6796 msgstr "00010 グループに実行の許可がある。"
6797
6798 #. type: TP
6799 #: build/C/man2/open.2:312
6800 #, no-wrap
6801 msgid "B<S_IRWXO>"
6802 msgstr "B<S_IRWXO>"
6803
6804 #. type: Plain text
6805 #: build/C/man2/open.2:315
6806 msgid "00007 others have read, write and execute permission"
6807 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6808
6809 #. type: TP
6810 #: build/C/man2/open.2:315
6811 #, no-wrap
6812 msgid "B<S_IROTH>"
6813 msgstr "B<S_IROTH>"
6814
6815 #. type: Plain text
6816 #: build/C/man2/open.2:318
6817 msgid "00004 others have read permission"
6818 msgstr "00004 他人に読み込みの許可がある。"
6819
6820 #. type: TP
6821 #: build/C/man2/open.2:318
6822 #, no-wrap
6823 msgid "B<S_IWOTH>"
6824 msgstr "B<S_IWOTH>"
6825
6826 #. type: Plain text
6827 #: build/C/man2/open.2:321
6828 msgid "00002 others have write permission"
6829 msgstr "00002 他人に書き込みの許可がある。"
6830
6831 #. type: TP
6832 #: build/C/man2/open.2:321
6833 #, no-wrap
6834 msgid "B<S_IXOTH>"
6835 msgstr "B<S_IXOTH>"
6836
6837 #. type: Plain text
6838 #: build/C/man2/open.2:324
6839 msgid "00001 others have execute permission"
6840 msgstr "00001 他人に実行の許可がある。"
6841
6842 #. type: TP
6843 #: build/C/man2/open.2:325
6844 #, no-wrap
6845 msgid "B<O_DIRECT> (since Linux 2.4.10)"
6846 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6847
6848 #. type: Plain text
6849 #: build/C/man2/open.2:342
6850 msgid ""
6851 "Try to minimize cache effects of the I/O to and from this file.  In general "
6852 "this will degrade performance, but it is useful in special situations, such "
6853 "as when applications do their own caching.  File I/O is done directly to/"
6854 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6855 "transfer data synchronously, but does not give the guarantees of the "
6856 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6857 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6858 "B<O_DIRECT>.  See NOTES below for further discussion."
6859 msgstr ""
6860 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6861 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6862 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6863 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6864 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6865 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6866 "使用しなければならない。下記の「注意」の節の議論も参照。"
6867
6868 #. type: Plain text
6869 #: build/C/man2/open.2:346
6870 msgid ""
6871 "A semantically similar (but deprecated) interface for block devices is "
6872 "described in B<raw>(8)."
6873 msgstr ""
6874 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6875 "れている (但し、このインタフェースは非推奨である)。"
6876
6877 #. type: TP
6878 #: build/C/man2/open.2:346
6879 #, no-wrap
6880 msgid "B<O_DIRECTORY>"
6881 msgstr "B<O_DIRECTORY>"
6882
6883 #.  But see the following and its replies:
6884 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6885 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6886 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6887 #. type: Plain text
6888 #: build/C/man2/open.2:358
6889 msgid ""
6890 "If I<pathname> is not a directory, cause the open to fail.  This flag was "
6891 "added in kernel version 2.1.126, to avoid denial-of-service problems if "
6892 "B<opendir>(3)  is called on a FIFO or tape device."
6893 msgstr ""
6894 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは、 "
6895 "B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合の サービス不"
6896 "能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追加された。"
6897
6898 #. type: TP
6899 #: build/C/man2/open.2:358
6900 #, no-wrap
6901 msgid "B<O_DSYNC>"
6902 msgstr "B<O_DSYNC>"
6903
6904 #. type: Plain text
6905 #: build/C/man2/open.2:364
6906 msgid ""
6907 "Write operations on the file will complete according to the requirements of "
6908 "synchronized I/O I<data> integrity completion."
6909 msgstr ""
6910 "ファイルに対する書き込み操作は、同期 I/O のI<データ>完全性完了の要件に基づい"
6911 "て行われる。"
6912
6913 #. type: Plain text
6914 #: build/C/man2/open.2:376
6915 msgid ""
6916 "By the time B<write>(2)  (and similar)  return, the output data has been "
6917 "transferred to the underlying hardware, along with any file metadata that "
6918 "would be required to retrieve that data (i.e., as though each B<write>(2)  "
6919 "was followed by a call to B<fdatasync>(2)).  I<See NOTES below>."
6920 msgstr ""
6921 "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータおよびデータを"
6922 "取得するのに必要なファイルメタデータが裏で利用されているハードウェアに転送さ"
6923 "れる (つまり、B<write>(2) の後に B<fdatasync>(2) を呼び出したのと同じようにな"
6924 "る)。 I<下記の「注意」も参照のこと>。"
6925
6926 #. type: TP
6927 #: build/C/man2/open.2:376
6928 #, no-wrap
6929 msgid "B<O_EXCL>"
6930 msgstr "B<O_EXCL>"
6931
6932 #. type: Plain text
6933 #: build/C/man2/open.2:386
6934 msgid ""
6935 "Ensure that this call creates the file: if this flag is specified in "
6936 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6937 "will fail."
6938 msgstr ""
6939 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6940 "と\n"
6941 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6942 "敗\n"
6943 "する。"
6944
6945 #.  POSIX.1-2001 explicitly requires this behavior.
6946 #. type: Plain text
6947 #: build/C/man2/open.2:394
6948 msgid ""
6949 "When these two flags are specified, symbolic links are not followed: if "
6950 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6951 "the symbolic link points to."
6952 msgstr ""
6953 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6954 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6955 "かに関わらず B<open>()  は失敗する。"
6956
6957 #. type: Plain text
6958 #: build/C/man2/open.2:410
6959 msgid ""
6960 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6961 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6962 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6963 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6964 "the error B<EBUSY>."
6965 msgstr ""
6966 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6967 "B<O_EXCL> の動作は規定されていない。\n"
6968 "これには一つ例外があり、Linux 2.6 以降では、\n"
6969 "I<pathname> がブロックデバイスを参照している場合、\n"
6970 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6971 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6972 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6973
6974 #. type: Plain text
6975 #: build/C/man2/open.2:432
6976 msgid ""
6977 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6978 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6979 "programs that rely on it for performing locking tasks will contain a race "
6980 "condition.  Portable programs that want to perform atomic file locking using "
6981 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6982 "create a unique file on the same filesystem (e.g., incorporating hostname "
6983 "and PID), and use B<link>(2)  to make a link to the lockfile.  If "
6984 "B<link>(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  "
6985 "on the unique file to check if its link count has increased to 2, in which "
6986 "case the lock is also successful."
6987 msgstr ""
6988 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6989 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6990 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6991 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6992 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6993 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6994 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6995 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6996 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6997 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6998 "じくロックに成功しているということである。"
6999
7000 #. type: TP
7001 #: build/C/man2/open.2:432
7002 #, no-wrap
7003 msgid "B<O_LARGEFILE>"
7004 msgstr "B<O_LARGEFILE>"
7005
7006 #. type: Plain text
7007 #: build/C/man2/open.2:454
7008 msgid ""
7009 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
7010 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
7011 "macro must be defined (before including I<any> header files)  in order to "
7012 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
7013 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
7014 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
7015 msgstr ""
7016 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
7017 "ファ\n"
7018 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
7019 "イ\n"
7020 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
7021 "ば\n"
7022 "ならない。\n"
7023 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
7024 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
7025 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
7026
7027 #. type: TP
7028 #: build/C/man2/open.2:454
7029 #, no-wrap
7030 msgid "B<O_NOATIME> (since Linux 2.6.8)"
7031 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
7032
7033 #.  The O_NOATIME flag also affects the treatment of st_atime
7034 #.  by mmap() and readdir(2), MTK, Dec 04.
7035 #. type: Plain text
7036 #: build/C/man2/open.2:467
7037 msgid ""
7038 "Do not update the file last access time (I<st_atime> in the inode)  when the "
7039 "file is B<read>(2).  This flag is intended for use by indexing or backup "
7040 "programs, where its use can significantly reduce the amount of disk "
7041 "activity.  This flag may not be effective on all filesystems.  One example "
7042 "is NFS, where the server maintains the access time."
7043 msgstr ""
7044 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
7045 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
7046 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
7047 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
7048 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
7049
7050 #. type: TP
7051 #: build/C/man2/open.2:467
7052 #, no-wrap
7053 msgid "B<O_NOCTTY>"
7054 msgstr "B<O_NOCTTY>"
7055
7056 #. type: Plain text
7057 #: build/C/man2/open.2:475
7058 msgid ""
7059 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
7060 "become the process's controlling terminal even if the process does not have "
7061 "one."
7062 msgstr ""
7063 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
7064 "る\n"
7065 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
7066 "ル\n"
7067 "は制御端末にはならない。"
7068
7069 #. type: TP
7070 #: build/C/man2/open.2:475
7071 #, no-wrap
7072 msgid "B<O_NOFOLLOW>"
7073 msgstr "B<O_NOFOLLOW>"
7074
7075 #.  The headers from glibc 2.0.100 and later include a
7076 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
7077 #.  used\fP.
7078 #. type: Plain text
7079 #: build/C/man2/open.2:487
7080 msgid ""
7081 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
7082 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
7083 "earlier components of the pathname will still be followed.  See also "
7084 "B<O_PATH> below."
7085 msgstr ""
7086 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
7087 "FreeBSD の拡張で、Linux には バージョン 2.1.126 で追加された。 このフラグが指"
7088 "定された場合でも I<pathname> の前の方の要素 (最後のディレクトリセパレータより"
7089 "前の部分) にあるシンボリックリンクについてはリンクが辿られる。 下記の "
7090 "B<O_PATH> も参照のこと。"
7091
7092 #. type: TP
7093 #: build/C/man2/open.2:487
7094 #, no-wrap
7095 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
7096 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
7097
7098 #. type: Plain text
7099 #: build/C/man2/open.2:500
7100 msgid ""
7101 "When possible, the file is opened in nonblocking mode.  Neither the "
7102 "B<open>()  nor any subsequent operations on the file descriptor which is "
7103 "returned will cause the calling process to wait.  For the handling of FIFOs "
7104 "(named pipes), see also B<fifo>(7).  For a discussion of the effect of "
7105 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
7106 "see B<fcntl>(2)."
7107 msgstr ""
7108 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
7109 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
7110 "出\n"
7111 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
7112 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
7113 "イ\n"
7114 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
7115 "議論は、 B<fcntl>(2) を参照すること。"
7116
7117 #. type: TP
7118 #: build/C/man2/open.2:500
7119 #, no-wrap
7120 msgid "B<O_PATH> (since Linux 2.6.39)"
7121 msgstr "B<O_PATH> (Linux 2.6.39 以降)"
7122
7123 #
7124 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
7125 #.  commit 326be7b484843988afe57566b627fb7a70beac56
7126 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
7127 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
7128 #.      Subject: Re: [PATCH] open(2): document O_PATH
7129 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
7130 #. type: Plain text
7131 #: build/C/man2/open.2:522
7132 msgid ""
7133 "Obtain a file descriptor that can be used for two purposes: to indicate a "
7134 "location in the filesystem tree and to perform operations that act purely at "
7135 "the file descriptor level.  The file itself is not opened, and other file "
7136 "operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), "
7137 "B<fgetxattr>(2), B<mmap>(2))  fail with the error B<EBADF>."
7138 msgstr ""
7139 "このフラグを指定して取得したファイルディスクリプタは、 ファイルシステムツリー"
7140 "内での場所を示すため、 純粋にファイルディスクリプタレベルでの作用する操作を実"
7141 "行するため、 の二つの目的で使用することができる。 ファイル自身はオープンされ"
7142 "ず、 他のファイル操作 (例えば B<read>(2), B<write>(2), B<fchmod>(2), "
7143 "B<fchown>(2), B<fgetxattr>(2), B<mmap>(2)) はエラー B<EBADF> で失敗する。"
7144
7145 #. type: Plain text
7146 #: build/C/man2/open.2:526
7147 msgid ""
7148 "The following operations I<can> be performed on the resulting file "
7149 "descriptor:"
7150 msgstr ""
7151 "取得したファイルディスクリプタに対して以下の操作を行うことが「できる」。"
7152
7153 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
7154 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
7155 #. type: Plain text
7156 #: build/C/man2/open.2:535
7157 msgid ""
7158 "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
7159 msgstr ""
7160 "B<close>(2); B<fchdir>(2)  (Linux 3.5 以降); B<fstat>(2)  (Linux 3.6 以降)"
7161
7162 #. type: Plain text
7163 #: build/C/man2/open.2:541
7164 msgid ""
7165 "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
7166 msgstr "ファイルディスクリプタの複製 (B<dup>(2), B<fcntl>(2)  B<F_DUPFD> など)"
7167
7168 #. type: Plain text
7169 #: build/C/man2/open.2:547
7170 msgid ""
7171 "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and "
7172 "B<F_SETFD>)."
7173 msgstr ""
7174 "ファイルディスクリプタフラグの取得と設定 (B<fcntl>(2) の B<F_GETFD> と "
7175 "B<F_SETFD>)"
7176
7177 #. type: Plain text
7178 #: build/C/man2/open.2:553
7179 msgid ""
7180 "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> "
7181 "operation: the returned flags will include the bit B<O_PATH>."
7182 msgstr ""
7183 "B<fcntl>(2) の B<F_GETFL> 操作を使ったオープンされたファイルの状態フラグの取"
7184 "得。 返されるフラグには B<O_PATH> ビットが含まれる。"
7185
7186 #. type: Plain text
7187 #: build/C/man2/open.2:566
7188 #, fuzzy
7189 #| msgid ""
7190 #| "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
7191 #| "the other \"*at()\" system calls."
7192 msgid ""
7193 "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
7194 "the other \"*at()\" system calls.  This includes B<linkat>(2)  with "
7195 "B<AT_EMPTY_PATH> (or via procfs using B<AT_SYMLINK_FOLLOW>)  even if the "
7196 "file is not a directory."
7197 msgstr ""
7198 "B<openat>(2) や他の \"*at()\" 系のシステムコールの I<dirfd> 引数としてその"
7199 "ファイルディスクリプタを渡す。"
7200
7201 #. type: Plain text
7202 #: build/C/man2/open.2:572
7203 msgid ""
7204 "Passing the file descriptor to another process via a UNIX domain socket (see "
7205 "B<SCM_RIGHTS> in B<unix>(7))."
7206 msgstr ""
7207 "そのファイルディスクリプタを別のプロセスに UNIX ドメインソケット経由で渡す。 "
7208 "(B<unix>(7) の B<SCM_RIGHTS> を参照)"
7209
7210 #. type: Plain text
7211 #: build/C/man2/open.2:584
7212 msgid ""
7213 "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_CLOEXEC>, "
7214 "B<O_DIRECTORY>, and B<O_NOFOLLOW> are ignored."
7215 msgstr ""
7216 "I<flags> に B<O_PATH> が指定された場合、 B<O_CLOEXEC>, B<O_DIRECTORY>, "
7217 "B<O_NOFOLLOW> 以外のフラグビットは無視される。"
7218
7219 #. type: Plain text
7220 #: build/C/man2/open.2:600
7221 msgid ""
7222 "If I<pathname> is a symbolic link and the B<O_NOFOLLOW> flag is also "
7223 "specified, then the call returns a file descriptor referring to the symbolic "
7224 "link.  This file descriptor can be used as the I<dirfd> argument in calls to "
7225 "B<fchownat>(2), B<fstatat>(2), B<linkat>(2), and B<readlinkat>(2)  with an "
7226 "empty pathname to have the calls operate on the symbolic link."
7227 msgstr ""
7228 "I<pathname> がシンボリックリンクで B<O_NOFOLLOW> フラグも合わせて指定された場"
7229 "合、 この呼び出しではシンボリックリンクを参照するファイルディスクリプタを返"
7230 "す。 このファイルディスクリプタは、 空のパス名を指定した B<fchownat>(2), "
7231 "B<fstatat>(2), B<linkat>(2), B<readlinkat>(2) の呼び出しで I<dirfd> 引数とし"
7232 "て使うことで、 そのシンボリックリンクに対して操作を行うことができる。"
7233
7234 #. type: TP
7235 #: build/C/man2/open.2:600
7236 #, no-wrap
7237 msgid "B<O_SYNC>"
7238 msgstr "B<O_SYNC>"
7239
7240 #. type: Plain text
7241 #: build/C/man2/open.2:612
7242 msgid ""
7243 "Write operations on the file will complete according to the requirements of "
7244 "synchronized I/O I<file> integrity completion (by contrast with the "
7245 "synchronized I/O I<data> integrity completion provided by B<O_DSYNC>.)"
7246 msgstr ""
7247 "ファイルに対する書き込み操作は、同期 I/O のI<ファイル>完全性完了の要件に基づ"
7248 "いて行われる (これに対し B<O_DSYNC> では同期 I/O のI<データ>完全性完了が提供"
7249 "される)。"
7250
7251 #. type: Plain text
7252 #: build/C/man2/open.2:623
7253 msgid ""
7254 "By the time B<write>(2)  (and similar)  return, the output data and "
7255 "associated file metadata have been transferred to the underlying hardware (i."
7256 "e., as though each B<write>(2)  was followed by a call to B<fsync>(2)).  "
7257 "I<See NOTES below>."
7258 msgstr ""
7259 "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータと関連するファ"
7260 "イルメタデータが裏で利用されているハードウェアに転送される (つまり、"
7261 "B<write>(2) の後に B<fsync>(2) を呼び出したのと同じようになる)。 I<下記の「注"
7262 "意」も参照のこと>。"
7263
7264 #. type: TP
7265 #: build/C/man2/open.2:623
7266 #, no-wrap
7267 msgid "B<O_TMPFILE> (since Linux 3.11)"
7268 msgstr "B<O_TMPFILE> (Linux 3.11 以降)"
7269
7270 #.  commit 60545d0d4610b02e55f65d141c95b18ccf855b6e
7271 #.  commit f4e0c30c191f87851c4a53454abb55ee276f4a7e
7272 #.  commit bb458c644a59dbba3a1fe59b27106c5e68e1c4bd
7273 #. type: Plain text
7274 #: build/C/man2/open.2:635
7275 msgid ""
7276 "Create an unnamed temporary file.  The I<pathname> argument specifies a "
7277 "directory; an unnamed inode will be created in that directory's filesystem.  "
7278 "Anything written to the resulting file will be lost when the last file "
7279 "descriptor is closed, unless the file is given a name."
7280 msgstr ""
7281 "名前なしの一時ファイルを作成する。 I<pathname> 引き数はディレクトリを指定す"
7282 "る。 名前なしの inode がそのディレクトリが存在するファイルシステムに作成され"
7283 "る。 そのファイルに名前を付与しない限り、 作成されたファイルに書き込まれた内"
7284 "容は、 最後のファイルディスクリプタがクローズされる際に失われる。"
7285
7286 #. type: Plain text
7287 #: build/C/man2/open.2:649
7288 msgid ""
7289 "B<O_TMPFILE> must be specified with one of B<O_RDWR> or B<O_WRONLY> and, "
7290 "optionally, B<O_EXCL>.  If B<O_EXCL> is not specified, then B<linkat>(2)  "
7291 "can be used to link the temporary file into the filesystem, making it "
7292 "permanent, using code like the following:"
7293 msgstr ""
7294 "B<O_TMPFILE> は必ず B<O_RDWR> か B<O_WRONLY> のいずれかと一緒に使わなければな"
7295 "らない。 B<O_EXCL> も指定することができる。 B<O_EXCL> が指定されなかった場"
7296 "合、 B<linkat>(2) を使って、そのファイルシステムにこの一時ファイルへのリンク"
7297 "を作成し、ファイルを永続化することができる。 以下のコードのようにすればよい。"
7298
7299 #. type: Plain text
7300 #: build/C/man2/open.2:655
7301 #, no-wrap
7302 msgid ""
7303 "char path[PATH_MAX];\n"
7304 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
7305 "                        S_IRUSR | S_IWUSR);\n"
7306 msgstr ""
7307 "char path[PATH_MAX];\n"
7308 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
7309 "                        S_IRUSR | S_IWUSR);\n"
7310
7311 #. type: Plain text
7312 #: build/C/man2/open.2:657
7313 #, no-wrap
7314 msgid "/* File I/O on 'fd'... */\n"
7315 msgstr "/* 'fd' に対するファイル I/O ... */\n"
7316
7317 #. type: Plain text
7318 #: build/C/man2/open.2:661
7319 #, no-wrap
7320 msgid ""
7321 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
7322 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
7323 "                        AT_SYMLINK_FOLLOW);\n"
7324 msgstr ""
7325 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
7326 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
7327 "                        AT_SYMLINK_FOLLOW);\n"
7328
7329 #. type: Plain text
7330 #: build/C/man2/open.2:670
7331 msgid ""
7332 "In this case, the B<open>()  I<mode> argument determines the file permission "
7333 "mode, as with B<O_CREAT>."
7334 msgstr ""
7335 "この場合、 B<open>() の I<mode> 引き数は B<O_CREAT> と同様にファイルのアクセ"
7336 "ス許可モードの決定に使われる。"
7337
7338 #. type: Plain text
7339 #: build/C/man2/open.2:682
7340 msgid ""
7341 "Specifying B<O_EXCL> in conjunction with B<O_TMPFILE> prevents a temporary "
7342 "file from being linked into the filesystem in the above manner.  (Note that "
7343 "the meaning of B<O_EXCL> in this case is different from the meaning of "
7344 "B<O_EXCL> otherwise.)"
7345 msgstr ""
7346 "B<O_TMPFILE> とともに B<O_EXCL> を指定すると、 一時ファイルに対して上記の方法"
7347 "でファイルシステムへのリンクを行うことができなくなる (この場合の B<O_EXCL> の"
7348 "意味は他の場合の B<O_EXCL> の意味とは異なる点に注意)。"
7349
7350 #.  Inspired by http://lwn.net/Articles/559147/
7351 #. type: Plain text
7352 #: build/C/man2/open.2:687
7353 msgid "There are two main use cases for B<O_TMPFILE>:"
7354 msgstr "B<O_TMPFILE> には主に二つの用途がある。"
7355
7356 #. type: Plain text
7357 #: build/C/man2/open.2:696
7358 msgid ""
7359 "Improved B<tmpfile>(3)  functionality: race-free creation of temporary files "
7360 "that (1) are automatically deleted when closed; (2) can never be reached via "
7361 "any pathname; (3) are not subject to symlink attacks; and (4) do not require "
7362 "the caller to devise unique names."
7363 msgstr ""
7364 "改善された B<tmpfile>(3) の機能: (1) クローズ時に自動的に削除される、 (2) パ"
7365 "ス名では決して参照できない、 (3) シンボリックリンク攻撃ができない、 (4) 呼び"
7366 "出し元が一意な名前を考える必要がない、 という特長を持つ競合のない一時ファイル"
7367 "の作成。"
7368
7369 #. type: Plain text
7370 #: build/C/man2/open.2:707
7371 msgid ""
7372 "Creating a file that is initially invisible, which is then populated with "
7373 "data and adjusted to have appropriate filesystem attributes (B<chown>(2), "
7374 "B<chmod>(2), B<fsetxattr>(2), etc.)  before being atomically linked into the "
7375 "filesystem in a fully formed state (using B<linkat>(2)  as described above)."
7376 msgstr ""
7377 "最初は見えないファイルを作成し、 それからデータを書き込んだり、適切なファイル"
7378 "システム属性を持つように調整したり (B<chown>(2), B<chmod>(2), "
7379 "B<fsetxattr>(2) など) した後、 準備が全て整った状態で (上述の B<linkat>(2) を"
7380 "使って) ファイルシステム内にアトミックにリンクを行う。"
7381
7382 #.  commit 99b6436bc29e4f10e4388c27a3e4810191cc4788
7383 #.  commit ab29743117f9f4c22ac44c13c1647fb24fb2bafe
7384 #. type: Plain text
7385 #: build/C/man2/open.2:718
7386 msgid ""
7387 "B<O_TMPFILE> requires support by the underlying filesystem; only a subset of "
7388 "Linux filesystems provide that support.  In the initial implementation, "
7389 "support was provided in the ext2, ext3, ext4, UDF, Minix, and shmem "
7390 "filesystems.  XFS support was added in Linux 3.15."
7391 msgstr ""
7392 "B<O_TMPFILE> は、 裏で利用されるファイルシステムによるサポートが必要である。 "
7393 "一部の Linux ファイルシステムだけがこの機能をサポートしている。 最初の実装で"
7394 "は、 ext2, ext3, ext4, UDF, Minix, shmem ファイルシステムがサポートしてい"
7395 "た。 XFS でのサポートが Linux 3.15 で追加された。"
7396
7397 #. type: TP
7398 #: build/C/man2/open.2:718
7399 #, no-wrap
7400 msgid "B<O_TRUNC>"
7401 msgstr "B<O_TRUNC>"
7402
7403 #. type: Plain text
7404 #: build/C/man2/open.2:732
7405 msgid ""
7406 "If the file already exists and is a regular file and the access mode allows "
7407 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
7408 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
7409 "ignored.  Otherwise, the effect of B<O_TRUNC> is unspecified."
7410 msgstr ""
7411 "ファイルが既に存在し、通常ファイルであり、 アクセスモードで書き込みが許可され"
7412 "ている (つまり、 B<O_RDWR> または B<O_WRONLY> の) 場合、長さ 0 に切り詰め "
7413 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
7414 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
7415 "ある。"
7416
7417 #. type: SS
7418 #: build/C/man2/open.2:732
7419 #, no-wrap
7420 msgid "creat()"
7421 msgstr "creat()"
7422
7423 #. type: Plain text
7424 #: build/C/man2/open.2:740
7425 msgid ""
7426 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
7427 "O_WRONLY|O_TRUNC>."
7428 msgstr ""
7429 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
7430 "を行うのと等価である。"
7431
7432 #. type: SS
7433 #: build/C/man2/open.2:740
7434 #, no-wrap
7435 msgid "openat()"
7436 msgstr "openat()"
7437
7438 #. type: Plain text
7439 #: build/C/man2/open.2:746
7440 msgid ""
7441 "The B<openat>()  system call operates in exactly the same way as B<open>(), "
7442 "except for the differences described here."
7443 msgstr ""
7444 "B<openat>() システムコールは B<open>() と全く同様に動作するが、以下で説明する"
7445 "点が異なる。"
7446
7447 #. type: Plain text
7448 #: build/C/man2/open.2:756
7449 msgid ""
7450 "If the pathname given in I<pathname> is relative, then it is interpreted "
7451 "relative to the directory referred to by the file descriptor I<dirfd> "
7452 "(rather than relative to the current working directory of the calling "
7453 "process, as is done by B<open>()  for a relative pathname)."
7454 msgstr ""
7455 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
7456 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
7457 "(B<open>() に相対パス名を渡した場合のように、呼び出したプロセスのカレントワー"
7458 "キングディレクトリに対する相対パスではない)。"
7459
7460 #. type: Plain text
7461 #: build/C/man2/open.2:768
7462 msgid ""
7463 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
7464 "then I<pathname> is interpreted relative to the current working directory of "
7465 "the calling process (like B<open>())."
7466 msgstr ""
7467 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
7468 "の場合、 (B<open>() と同様に) I<pathname> は呼び出したプロセスのカレントワー"
7469 "キングディレクトリに対する相対パスと解釈される。"
7470
7471 #. type: Plain text
7472 #: build/C/man2/open.2:774 build/C/man2/readlink.2:134
7473 msgid "If I<pathname> is absolute, then I<dirfd> is ignored."
7474 msgstr ""
7475 "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
7476
7477 #. type: Plain text
7478 #: build/C/man2/open.2:783
7479 msgid ""
7480 "B<open>(), B<openat>(), and B<creat>()  return the new file descriptor, or "
7481 "-1 if an error occurred (in which case, I<errno> is set appropriately)."
7482 msgstr ""
7483 "B<open>(), B<openat>(), B<creat>() は新しいファイルディスクリプタを返す。 エ"
7484 "ラーが発生した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
7485
7486 #. type: Plain text
7487 #: build/C/man2/open.2:789
7488 msgid ""
7489 "B<open>(), B<openat>(), and B<creat>()  can fail with the following errors:"
7490 msgstr "B<open>(), B<openat>(), B<creat>() は以下のエラーで失敗する。"
7491
7492 #. type: Plain text
7493 #: build/C/man2/open.2:798
7494 msgid ""
7495 "The requested access to the file is not allowed, or search permission is "
7496 "denied for one of the directories in the path prefix of I<pathname>, or the "
7497 "file did not exist yet and write access to the parent directory is not "
7498 "allowed.  (See also B<path_resolution>(7).)"
7499 msgstr ""
7500 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
7501 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
7502 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
7503 "すること。)"
7504
7505 #. type: Plain text
7506 #: build/C/man2/open.2:804
7507 msgid ""
7508 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
7509 "of disk blocks or inodes on the filesystem has been exhausted."
7510 msgstr ""
7511 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
7512 "inode がそのファイルシステムのユーザクォータに達していた。"
7513
7514 #. type: Plain text
7515 #: build/C/man2/open.2:810
7516 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
7517 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
7518
7519 #. type: Plain text
7520 #: build/C/man2/open.2:814 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:182
7521 msgid "I<pathname> points outside your accessible address space."
7522 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
7523
7524 #. type: TP
7525 #: build/C/man2/open.2:814 build/C/man2/write.2:145
7526 #, no-wrap
7527 msgid "B<EFBIG>"
7528 msgstr "B<EFBIG>"
7529
7530 #. type: Plain text
7531 #: build/C/man2/open.2:818
7532 msgid "See B<EOVERFLOW>."
7533 msgstr "B<EOVERFLOW> 参照。"
7534
7535 #. type: TP
7536 #: build/C/man2/open.2:818 build/C/man2/read.2:122 build/C/man3/scanf.3:561
7537 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
7538 #, no-wrap
7539 msgid "B<EINTR>"
7540 msgstr "B<EINTR>"
7541
7542 #. type: Plain text
7543 #: build/C/man2/open.2:825
7544 msgid ""
7545 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
7546 "see B<fifo>(7)), the call was interrupted by a signal handler; see "
7547 "B<signal>(7)."
7548 msgstr ""
7549 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
7550 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
7551 "B<signal>(7)  参照。"
7552
7553 #. type: Plain text
7554 #: build/C/man2/open.2:833
7555 msgid ""
7556 "The filesystem does not support the B<O_DIRECT> flag.  See B<NOTES> for more "
7557 "information."
7558 msgstr ""
7559 "ファイルシステムが B<O_DIRECT> フラグをサポートしていない。 詳細はB<注意>を参"
7560 "照。"
7561
7562 #.  In particular, __O_TMPFILE instead of O_TMPFILE
7563 #. type: Plain text
7564 #: build/C/man2/open.2:838
7565 msgid "Invalid value in I<flags>."
7566 msgstr "I<flags> に無効な値が入っている。"
7567
7568 #. type: Plain text
7569 #: build/C/man2/open.2:848
7570 msgid ""
7571 "B<O_TMPFILE> was specified in I<flags>, but neither B<O_WRONLY> nor "
7572 "B<O_RDWR> was specified."
7573 msgstr ""
7574 "I<flags> に B<O_TMPFILE> が指定されたが、 B<O_WRONLY> も B<O_RDWR> も指定され"
7575 "ていなかった。"
7576
7577 #. type: TP
7578 #: build/C/man2/open.2:848 build/C/man2/open.2:857 build/C/man2/read.2:158
7579 #: build/C/man2/rename.2:255 build/C/man2/unlink.2:185
7580 #: build/C/man2/unlink.2:256
7581 #, no-wrap
7582 msgid "B<EISDIR>"
7583 msgstr "B<EISDIR>"
7584
7585 #. type: Plain text
7586 #: build/C/man2/open.2:857
7587 msgid ""
7588 "I<pathname> refers to a directory and the access requested involved writing "
7589 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
7590 msgstr ""
7591 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
7592 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
7593
7594 #. type: Plain text
7595 #: build/C/man2/open.2:871
7596 msgid ""
7597 "I<pathname> refers to an existing directory, B<O_TMPFILE> and one of "
7598 "B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version "
7599 "does not provide the B<O_TMPFILE> functionality."
7600 msgstr ""
7601 "I<pathname> が存在するディレクトリを参照していて、 B<O_TMPFILE> および "
7602 "B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネル"
7603 "バージョンでは B<O_TMPFILE> 機能が提供されていない。"
7604
7605 #. type: Plain text
7606 #: build/C/man2/open.2:875 build/C/man2/rmdir.2:77
7607 msgid "Too many symbolic links were encountered in resolving I<pathname>."
7608 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
7609
7610 #. type: Plain text
7611 #: build/C/man2/open.2:884
7612 msgid ""
7613 "I<pathname> was a symbolic link, and I<flags> specified B<O_NOFOLLOW> but "
7614 "not B<O_PATH>."
7615 msgstr ""
7616 "I<pathname> がシンボリックリンクで、 I<flags> に B<O_NOFOLLOW> が指定された"
7617 "が、 B<O_PATH> が指定されていなかった。"
7618
7619 #. type: TP
7620 #: build/C/man2/open.2:884 build/C/man2/pipe.2:148 build/C/man3/tmpfile.3:66
7621 #, no-wrap
7622 msgid "B<EMFILE>"
7623 msgstr "B<EMFILE>"
7624
7625 #. type: Plain text
7626 #: build/C/man2/open.2:887
7627 msgid "The process already has the maximum number of files open."
7628 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
7629
7630 #. type: Plain text
7631 #: build/C/man2/open.2:891 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:197
7632 msgid "I<pathname> was too long."
7633 msgstr "I<pathname> が長過ぎる。"
7634
7635 #. type: TP
7636 #: build/C/man2/open.2:891 build/C/man2/pipe.2:151 build/C/man3/tmpfile.3:69
7637 #, no-wrap
7638 msgid "B<ENFILE>"
7639 msgstr "B<ENFILE>"
7640
7641 #. type: Plain text
7642 #: build/C/man2/open.2:894 build/C/man2/pipe.2:154
7643 msgid "The system limit on the total number of open files has been reached."
7644 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
7645
7646 #. type: TP
7647 #: build/C/man2/open.2:894
7648 #, no-wrap
7649 msgid "B<ENODEV>"
7650 msgstr "B<ENODEV>"
7651
7652 #. type: Plain text
7653 #: build/C/man2/open.2:901
7654 msgid ""
7655 "I<pathname> refers to a device special file and no corresponding device "
7656 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
7657 "returned.)"
7658 msgstr ""
7659 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
7660 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
7661 "るべきである)"
7662
7663 #. type: Plain text
7664 #: build/C/man2/open.2:908
7665 msgid ""
7666 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
7667 "component in I<pathname> does not exist or is a dangling symbolic link."
7668 msgstr ""
7669 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
7670 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
7671 "ンクである。"
7672
7673 #. type: Plain text
7674 #: build/C/man2/open.2:922
7675 msgid ""
7676 "I<pathname> refers to a nonexistent directory, B<O_TMPFILE> and one of "
7677 "B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version "
7678 "does not provide the B<O_TMPFILE> functionality."
7679 msgstr ""
7680 "I<pathname> が存在しないディレクトリを参照していて、 B<O_TMPFILE> および "
7681 "B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネル"
7682 "バージョンでは B<O_TMPFILE> 機能が提供されていない。"
7683
7684 #. type: Plain text
7685 #: build/C/man2/open.2:931
7686 msgid ""
7687 "I<pathname> was to be created but the device containing I<pathname> has no "
7688 "room for the new file."
7689 msgstr ""
7690 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
7691 "ファイルのための空き容量がない。"
7692
7693 #. type: Plain text
7694 #: build/C/man2/open.2:938
7695 msgid ""
7696 "A component used as a directory in I<pathname> is not, in fact, a directory, "
7697 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
7698 msgstr ""
7699 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
7700 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
7701
7702 #. type: Plain text
7703 #: build/C/man2/open.2:944
7704 msgid ""
7705 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO, and no process "
7706 "has the FIFO open for reading.  Or, the file is a device special file and no "
7707 "corresponding device exists."
7708 msgstr ""
7709 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
7710 "ファイルを読み込み用でオープンしている FIFO が存在しない。 または、ファイルが"
7711 "デバイススペシャルファイルで 対応するデバイスが存在しない。"
7712
7713 #. type: TP
7714 #: build/C/man2/open.2:944 build/C/man2/open_by_handle_at.2:301
7715 #, no-wrap
7716 msgid "B<EOPNOTSUPP>"
7717 msgstr "B<EOPNOTSUPP>"
7718
7719 #. type: Plain text
7720 #: build/C/man2/open.2:950
7721 msgid "The filesystem containing I<pathname> does not support B<O_TMPFILE>."
7722 msgstr ""
7723 "I<pathname> を含んでいるファイルシステムが B<O_TMPFILE> をサポートしていな"
7724 "い。"
7725
7726 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
7727 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
7728 #.  Reported 2006-10-03
7729 #. type: Plain text
7730 #: build/C/man2/open.2:970
7731 msgid ""
7732 "I<pathname> refers to a regular file that is too large to be opened.  The "
7733 "usual scenario here is that an application compiled on a 32-bit platform "
7734 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds "
7735 "I<(1E<lt>E<lt>31)-1> bytes; see also B<O_LARGEFILE> above.  This is the "
7736 "error specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the "
7737 "error B<EFBIG> for this case."
7738 msgstr ""
7739 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
7740 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
7741 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
7742 "ルサイズが I<(1E<lt>31)-1> バイトを超えるファイルを開こうとした場合である。 "
7743 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
7744 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
7745 "いた。"
7746
7747 #.  Strictly speaking, it's the filesystem UID... (MTK)
7748 #. type: Plain text
7749 #: build/C/man2/open.2:978
7750 msgid ""
7751 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
7752 "did not match the owner of the file and the caller was not privileged "
7753 "(B<CAP_FOWNER>)."
7754 msgstr ""
7755 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
7756 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
7757
7758 #. type: Plain text
7759 #: build/C/man2/open.2:983
7760 msgid ""
7761 "I<pathname> refers to a file on a read-only filesystem and write access was "
7762 "requested."
7763 msgstr ""
7764 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
7765 "込みアクセスが要求された。"
7766
7767 #. type: TP
7768 #: build/C/man2/open.2:983
7769 #, no-wrap
7770 msgid "B<ETXTBSY>"
7771 msgstr "B<ETXTBSY>"
7772
7773 #. type: Plain text
7774 #: build/C/man2/open.2:988
7775 msgid ""
7776 "I<pathname> refers to an executable image which is currently being executed "
7777 "and write access was requested."
7778 msgstr ""
7779 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
7780
7781 #. type: TP
7782 #: build/C/man2/open.2:988
7783 #, no-wrap
7784 msgid "B<EWOULDBLOCK>"
7785 msgstr "B<EWOULDBLOCK>"
7786
7787 #. type: Plain text
7788 #: build/C/man2/open.2:995
7789 msgid ""
7790 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
7791 "the file (see B<fcntl>(2))."
7792 msgstr ""
7793 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
7794 "ていた (B<fcntl>(2)  参照)。"
7795
7796 #. type: Plain text
7797 #: build/C/man2/open.2:998
7798 msgid "The following additional errors can occur for B<openat>():"
7799 msgstr "B<openat>() では以下のエラーも発生する。"
7800
7801 #. type: Plain text
7802 #: build/C/man2/open.2:1002 build/C/man2/readlink.2:206
7803 #: build/C/man2/unlink.2:252
7804 msgid "I<dirfd> is not a valid file descriptor."
7805 msgstr "I<dirfd> が有効なファイルディスクリプタではない。"
7806
7807 #. type: Plain text
7808 #: build/C/man2/open.2:1008
7809 msgid ""
7810 "I<pathname> is a relative pathname and I<dirfd> is a file descriptor "
7811 "referring to a file other than a directory."
7812 msgstr ""
7813 "I<pathname> が相対パス名で、 I<dirfd> がディレクトリ以外のファイルを参照して"
7814 "いるファイルディスクリプタである。"
7815
7816 #. type: Plain text
7817 #: build/C/man2/open.2:1012
7818 msgid ""
7819 "B<openat>()  was added to Linux in kernel 2.6.16; library support was added "
7820 "to glibc in version 2.4."
7821 msgstr ""
7822 "B<openat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポー"
7823 "トはバージョン 2.4 で glibc に追加された。"
7824
7825 #. type: Plain text
7826 #: build/C/man2/open.2:1016
7827 msgid "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
7828 msgstr "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
7829
7830 #. type: Plain text
7831 #: build/C/man2/open.2:1019
7832 msgid "B<openat>(): POSIX.1-2008."
7833 msgstr "B<openat>(): POSIX.1-2008."
7834
7835 #. type: Plain text
7836 #: build/C/man2/open.2:1030
7837 msgid ""
7838 "The B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, and B<O_TMPFILE> flags are Linux-"
7839 "specific.  One must define B<_GNU_SOURCE> to obtain their definitions."
7840 msgstr ""
7841 "フラグ B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, B<O_TMPFILE> は Linux 特有のもの"
7842 "である。 これらのフラグの定義を得るためには B<_GNU_SOURCE> を定義しなければな"
7843 "らない。"
7844
7845 #. type: Plain text
7846 #: build/C/man2/open.2:1045
7847 msgid ""
7848 "The B<O_CLOEXEC>, B<O_DIRECTORY>, and B<O_NOFOLLOW> flags are not specified "
7849 "in POSIX.1-2001, but are specified in POSIX.1-2008.  Since glibc 2.12, one "
7850 "can obtain their definitions by defining either B<_POSIX_C_SOURCE> with a "
7851 "value greater than or equal to 200809L or B<_XOPEN_SOURCE> with a value "
7852 "greater than or equal to 700.  In glibc 2.11 and earlier, one obtains the "
7853 "definitions by defining B<_GNU_SOURCE>."
7854 msgstr ""
7855 "フラグ B<O_CLOEXEC>, B<O_DIRECTORY>, B<O_NOFOLLOW> は POSIX.1-2001 では規定さ"
7856 "れていないが、 POSIX.1-2008 では規定されている。 glibc 2.12 以降では、これら"
7857 "の定義を得るには、 B<_POSIX_C_SOURCE> を 200809L 以上の値で定義するか、 "
7858 "B<_XOPEN_SOURCE> を 700 以上の値で定義する。 glibc 2.11 以前では、 これらの定"
7859 "義を得るには B<_GNU_SOURCE> を定義する。"
7860
7861 #. type: Plain text
7862 #: build/C/man2/open.2:1056
7863 msgid ""
7864 "As noted in B<feature_test_macros>(7), feature test macros such as "
7865 "B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, and B<_GNU_SOURCE> must be defined "
7866 "before including I<any> header files."
7867 msgstr ""
7868 "B<feature_test_macros>(7) に注意書きがあるように、 B<_POSIX_C_SOURCE>, "
7869 "B<_XOPEN_SOURCE>, B<_GNU_SOURCE> などの機能検査マクロはI<どの>ヘッダーファイ"
7870 "ルをインクルードするより前に定義しなければならない。"
7871
7872 #. type: Plain text
7873 #: build/C/man2/open.2:1064
7874 msgid ""
7875 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
7876 "does not necessarily have the intention to read or write.  This is typically "
7877 "used to open devices in order to get a file descriptor for use with "
7878 "B<ioctl>(2)."
7879 msgstr ""
7880 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
7881 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
7882 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
7883 "られる。"
7884
7885 #.  Linux 2.0, 2.5: truncate
7886 #.  Solaris 5.7, 5.8: truncate
7887 #.  Irix 6.5: truncate
7888 #.  Tru64 5.1B: truncate
7889 #.  HP-UX 11.22: truncate
7890 #.  FreeBSD 4.7: truncate
7891 #. type: Plain text
7892 #: build/C/man2/open.2:1076
7893 msgid ""
7894 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
7895 "implementations.  On many systems the file is actually truncated."
7896 msgstr ""
7897 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
7898 "くのシステムではファイルは実際に切り詰められる。"
7899
7900 #. type: Plain text
7901 #: build/C/man2/open.2:1084
7902 msgid ""
7903 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7904 "create them; use B<mknod>(2)  instead."
7905 msgstr ""
7906 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7907 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7908 "用する。"
7909
7910 #. type: Plain text
7911 #: build/C/man2/open.2:1105
7912 msgid ""
7913 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7914 "fields (respectively, time of last access, time of last status change, and "
7915 "time of last modification; see B<stat>(2))  are set to the current time, and "
7916 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7917 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7918 "st_ctime and st_mtime fields are set to the current time."
7919 msgstr ""
7920 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7921 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7922 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7923 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7924 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7925 "I<st_mtime> フィールドが現在時刻に設定される。"
7926
7927 #. type: SS
7928 #: build/C/man2/open.2:1105
7929 #, no-wrap
7930 msgid "Open file descriptions"
7931 msgstr "オープンファイル記述"
7932
7933 #. type: Plain text
7934 #: build/C/man2/open.2:1113
7935 msgid ""
7936 "The term open file description is the one used by POSIX to refer to the "
7937 "entries in the system-wide table of open files.  In other contexts, this "
7938 "object is variously also called an \"open file object\", a \"file handle\", "
7939 "an \"open file table entry\", or\\(emin kernel-developer parlance\\(ema "
7940 "I<struct file>."
7941 msgstr ""
7942
7943 #. type: Plain text
7944 #: build/C/man2/open.2:1126
7945 msgid ""
7946 "When a file descriptor is duplicated (using B<dup>(2)  or similar), the "
7947 "duplicate refers to the same open file description as the original file "
7948 "descriptor, and the two file descriptors consequently share the file offset "
7949 "and file status flags.  Such sharing can also occur between processes: a "
7950 "child process created via B<fork>(2)  inherits duplicates of its parent's "
7951 "file descriptors, and those duplicates refer to the same open file "
7952 "descriptions."
7953 msgstr ""
7954
7955 #. type: Plain text
7956 #: build/C/man2/open.2:1134
7957 msgid ""
7958 "Each B<open>(2)  of a file creates a new open file description; thus, there "
7959 "may be multiple open file descriptions corresponding to a file inode."
7960 msgstr ""
7961
7962 #. type: SS
7963 #: build/C/man2/open.2:1134
7964 #, no-wrap
7965 msgid "Synchronized I/O"
7966 msgstr "同期 I/O"
7967
7968 #. type: Plain text
7969 #: build/C/man2/open.2:1149
7970 msgid ""
7971 "The POSIX.1-2008 \"synchronized I/O\" option specifies different variants of "
7972 "synchronized I/O, and specifies the B<open>()  flags B<O_SYNC>, B<O_DSYNC>, "
7973 "and B<O_RSYNC> for controlling the behavior.  Regardless of whether an "
7974 "implementation supports this option, it must at least support the use of "
7975 "B<O_SYNC> for regular files."
7976 msgstr ""
7977 "POSIX.1-2008 の「同期 I/O」の選択肢として複数種類が規定されており、 動作を制"
7978 "御するために B<open>() フラグとして B<O_SYNC>, B<O_DSYNC>, B<O_RSYNC> が規定"
7979 "されている。 この選択肢を実装がサポートしているかに関わらず、 各実装では少な"
7980 "くとも通常のファイルに対して B<O_SYNC> が利用できなければならない。"
7981
7982 #. type: Plain text
7983 #: build/C/man2/open.2:1160
7984 msgid ""
7985 "Linux implements B<O_SYNC> and B<O_DSYNC>, but not B<O_RSYNC>.  (Somewhat "
7986 "incorrectly, glibc defines B<O_RSYNC> to have the same value as B<O_SYNC>.)"
7987 msgstr ""
7988 "Linux は B<O_SYNC> と B<O_DSYNC> を実装しているが、 B<O_RSYNC> は実装していな"
7989 "い (少し間違っているのだが、 glibc では B<O_RSYNC> が B<O_SYNC> と同じ値で定"
7990 "義されている)。"
7991
7992 #. type: Plain text
7993 #: build/C/man2/open.2:1178
7994 msgid ""
7995 "B<O_SYNC> provides synchronized I/O I<file> integrity completion, meaning "
7996 "write operations will flush data and all associated metadata to the "
7997 "underlying hardware.  B<O_DSYNC> provides synchronized I/O I<data> integrity "
7998 "completion, meaning write operations will flush data to the underlying "
7999 "hardware, but will only flush metadata updates that are required to allow a "
8000 "subsequent read operation to complete successfully.  Data integrity "
8001 "completion can reduce the number of disk operations that are required for "
8002 "applications that don't need the guarantees of file integrity completion."
8003 msgstr ""
8004 "B<O_SYNC> は、 同期 I/O でのI<ファイル>完全性完了を提供する。 つまり、 書き込"
8005 "み操作はデータとすべての関連メタデータを裏で利用されているハードウェアにフ"
8006 "ラッシュすることを意味する。 B<O_DSYNC> は、 同期 I/O でのI<データ>完全性完了"
8007 "を提供する。 つまり、 書き込み操作はデータを裏で利用されているハードウェアに"
8008 "フラッシュするが、 それ以降の読み出し操作が正常に完了するのに必要なメタデータ"
8009 "の更新のみをフラッシュする。 データ完全性完了は、 ファイル完全性完了を必要と"
8010 "しないアプリケーションで、 ディスク操作の数を減らすことができる。"
8011
8012 #. type: Plain text
8013 #: build/C/man2/open.2:1195
8014 msgid ""
8015 "To understand the difference between the two types of completion, consider "
8016 "two pieces of file metadata: the file last modification timestamp "
8017 "(I<st_mtime>)  and the file length.  All write operations will update the "
8018 "last file modification timestamp, but only writes that add data to the end "
8019 "of the file will change the file length.  The last modification timestamp is "
8020 "not needed to ensure that a read completes successfully, but the file length "
8021 "is.  Thus, B<O_DSYNC> would only guarantee to flush updates to the file "
8022 "length metadata (whereas B<O_SYNC> would also always flush the last "
8023 "modification timestamp metadata)."
8024 msgstr ""
8025 "2 種類の完了の違いを理解するために、 ファイルメタデータの 2 つの要素、 ファイ"
8026 "ルの最終修正時刻 (I<st_mtime>) とファイル長、を考える。 すべての書き込み操作"
8027 "は最終修正時刻を更新するが、 ファイルの末尾にデータを追加する書き込み操作のみ"
8028 "がファイル長を変更する。 最終修正時刻は、 読み出しが正常に完了するのに必要で"
8029 "はないが、 ファイル長は必要である。 したがって、 B<O_DSYNC> はファイル長のメ"
8030 "タデータの更新がフラッシュされることだけを保証する (これに対して B<O_SYNC> で"
8031 "は最終修正時刻のメタデータも常にフラッシュされる)。"
8032
8033 #. type: Plain text
8034 #: build/C/man2/open.2:1207
8035 msgid ""
8036 "Before Linux 2.6.33, Linux implemented only the B<O_SYNC> flag for "
8037 "B<open>().  However, when that flag was specified, most filesystems actually "
8038 "provided the equivalent of synchronized I/O I<data> integrity completion (i."
8039 "e., B<O_SYNC> was actually implemented as the equivalent of B<O_DSYNC>)."
8040 msgstr ""
8041 "Linux 2.6.33 より前では、 Linux は B<open>() では B<O_SYNC> フラグのみを実装"
8042 "していた。 しかしながら、 このフラグが指定された場合、 ほとんどのファイルシス"
8043 "テムで提供されていたのは実際には同期 I/O でのI<データ>完全性完了と等価なもの"
8044 "であった (つまり、 B<O_SYNC> は実際には B<O_DSYNC> と等価なものとして実装され"
8045 "ていた)。"
8046
8047 #. type: Plain text
8048 #: build/C/man2/open.2:1226
8049 msgid ""
8050 "Since Linux 2.6.33, proper B<O_SYNC> support is provided.  However, to "
8051 "ensure backward binary compatibility, B<O_DSYNC> was defined with the same "
8052 "value as the historical B<O_SYNC>, and B<O_SYNC> was defined as a new (two-"
8053 "bit) flag value that includes the B<O_DSYNC> flag value.  This ensures that "
8054 "applications compiled against new headers get at least B<O_DSYNC> semantics "
8055 "on pre-2.6.33 kernels."
8056 msgstr ""
8057 "Linux 2.6.33 行こう では、 正しい B<O_SYNC> のサポートが提供されている。 しか"
8058 "しながら、 バイナリレベルの後方互換性を保証するため、 B<O_DSYNC> は以前の "
8059 "B<O_SYNC> と同じ値で定義されており、 B<O_SYNC> は B<O_DSYNC> フラグの値を含む"
8060 "新しい (2 ビットの) フラグ値として定義されている。 これにより、 新しいヘッダ"
8061 "を使ってコンパイルされたアプリケーションで、 2.6.33 より前のカーネルで少なく"
8062 "とも B<O_DSYNC> の動作は同じになることが保証される。"
8063
8064 #. type: SS
8065 #: build/C/man2/open.2:1226
8066 #, no-wrap
8067 msgid "NFS"
8068 msgstr "NFS"
8069
8070 #. type: Plain text
8071 #: build/C/man2/open.2:1230
8072 msgid ""
8073 "There are many infelicities in the protocol underlying NFS, affecting "
8074 "amongst others B<O_SYNC> and B<O_NDELAY>."
8075 msgstr ""
8076 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
8077 "B<O_NDELAY> に影響する。"
8078
8079 #. type: Plain text
8080 #: build/C/man2/open.2:1245
8081 msgid ""
8082 "On NFS filesystems with UID mapping enabled, B<open>()  may return a file "
8083 "descriptor but, for example, B<read>(2)  requests are denied with "
8084 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
8085 "permissions, but UID mapping is performed by the server upon read and write "
8086 "requests."
8087 msgstr ""
8088 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
8089 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
8090 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
8091 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
8092 "る。"
8093
8094 #. type: SS
8095 #: build/C/man2/open.2:1245
8096 #, no-wrap
8097 msgid "File access mode"
8098 msgstr "ファイルアクセスモード"
8099
8100 #. type: Plain text
8101 #: build/C/man2/open.2:1260
8102 msgid ""
8103 "Unlike the other values that can be specified in I<flags>, the I<access "
8104 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR> do not specify "
8105 "individual bits.  Rather, they define the low order two bits of I<flags>, "
8106 "and are defined respectively as 0, 1, and 2.  In other words, the "
8107 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
8108 "not have the same meaning as B<O_RDWR>."
8109 msgstr ""
8110 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
8111 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
8112 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
8113 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
8114 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。"
8115
8116 #.  See for example util-linux's disk-utils/setfdprm.c
8117 #.  For some background on access mode 3, see
8118 #.  http://thread.gmane.org/gmane.linux.kernel/653123
8119 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
8120 #.  LKML, 12 Mar 2008
8121 #. type: Plain text
8122 #: build/C/man2/open.2:1277
8123 msgid ""
8124 "Linux reserves the special, nonstandard access mode 3 (binary 11) in "
8125 "I<flags> to mean: check for read and write permission on the file and return "
8126 "a descriptor that can't be used for reading or writing.  This nonstandard "
8127 "access mode is used by some Linux drivers to return a descriptor that is to "
8128 "be used only for device-specific B<ioctl>(2)  operations."
8129 msgstr ""
8130 "Linux では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約"
8131 "されており I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの"
8132 "読み出し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディ"
8133 "スクリプタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、"
8134 "デバイス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使わ"
8135 "れている。"
8136
8137 #. type: SS
8138 #: build/C/man2/open.2:1277
8139 #, no-wrap
8140 msgid "Rationale for openat() and other directory file descriptor APIs"
8141 msgstr "openat() や他のディレクトリファイルディスクリプタ API の基本原理"
8142
8143 #. type: Plain text
8144 #: build/C/man2/open.2:1305
8145 msgid ""
8146 "B<openat>()  and the other system calls and library functions that take a "
8147 "directory file descriptor argument (i.e., B<faccessat>(2), "
8148 "B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), "
8149 "B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), "
8150 "B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), "
8151 "B<unlinkat>(2), B<utimensat>(2)  B<mkfifoat>(3), and B<scandirat>(3))  are "
8152 "supported for two reasons.  Here, the explanation is in terms of the "
8153 "B<openat>()  call, but the rationale is analogous for the other interfaces."
8154 msgstr ""
8155 "B<openat>() やディレクトリファイルディスクリプタを引き数を取る他のシステム"
8156 "コールやライブラリ関数 (B<faccessat>(2), B<fanotify_mark>(2), "
8157 "B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), B<futimesat>(2), "
8158 "B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), B<name_to_handle_at>(2), "
8159 "B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), B<unlinkat>(2), "
8160 "B<utimensat>(2) B<mkfifoat>(3), B<scandirat>(3)) は二つの理由から用意されてい"
8161 "る。 ここでは、 B<openat> コールに関して説明するが、この基本原理は他のイン"
8162 "ターフェースでも同じである。"
8163
8164 #. type: Plain text
8165 #: build/C/man2/open.2:1336
8166 #, fuzzy
8167 #| msgid ""
8168 #| "First, B<openat>()  allows an application to avoid race conditions that "
8169 #| "could occur when using B<open>()  to open files in directories other than "
8170 #| "the current working directory.  These race conditions result from the "
8171 #| "fact that some component of the directory prefix given to B<open>()  "
8172 #| "could be changed in parallel with the call to B<open>().  Such races can "
8173 #| "be avoided by opening a file descriptor for the target directory, and "
8174 #| "then specifying that file descriptor as the I<dirfd> argument of "
8175 #| "B<openat>()."
8176 msgid ""
8177 "First, B<openat>()  allows an application to avoid race conditions that "
8178 "could occur when using B<open>()  to open files in directories other than "
8179 "the current working directory.  These race conditions result from the fact "
8180 "that some component of the directory prefix given to B<open>()  could be "
8181 "changed in parallel with the call to B<open>().  Suppose, for example, that "
8182 "we wish to create the file I<path/to/xxx.dep> if the file I<path/to/xxx> "
8183 "exists.  The problem is that between the existence check and the file "
8184 "creation step, I<path> or I<to> (which might be symbolic links)  could be "
8185 "modified to point to a different location.  Such races can be avoided by "
8186 "opening a file descriptor for the target directory, and then specifying that "
8187 "file descriptor as the I<dirfd> argument of (say)  B<fstatat>(2)  and "
8188 "B<openat>()."
8189 msgstr ""
8190 "最初の理由として、 B<openat>() を使うと、 アプリケーションは、 カレントワーキ"
8191 "ングディレクトリ以外のディレクトリで B<open>() を使ってファイルをオープンする"
8192 "際に起こり得る競合条件を避けることができる。 これらの競合条件は、 B<open>() "
8193 "に渡されたディレクトリプレフィックスの構成要素が B<open>() の呼び出しと並行し"
8194 "て変化する可能性があるという点に由来している。 このような競合条件は、 対象の"
8195 "ディレクトリに対するファイルディスクリプタをオープンし、 それから "
8196 "B<openat>() の I<dirfd> 引き数としてそのファイルディスクリプタを指定すること"
8197 "で、 避けることができる。"
8198
8199 #. type: Plain text
8200 #: build/C/man2/open.2:1347
8201 msgid ""
8202 "Second, B<openat>()  allows the implementation of a per-thread \"current "
8203 "working directory\", via file descriptor(s) maintained by the application.  "
8204 "(This functionality can also be obtained by tricks based on the use of I</"
8205 "proc/self/fd/>dirfd, but less efficiently.)"
8206 msgstr ""
8207 "二つ目として、 B<openat>() を使うと、アプリケーションが管理するファイルディス"
8208 "クリプタにより、 スレッド単位の「カレントワーキングディレクトリ」を実装するこ"
8209 "とができる (この機能は、 I</proc/self/fd/dirfd> を使った方法でも実現すること"
8210 "ができるが、 効率の面で落とる)。"
8211
8212 #. type: SS
8213 #: build/C/man2/open.2:1347
8214 #, no-wrap
8215 msgid "O_DIRECT"
8216 msgstr "O_DIRECT"
8217
8218 #. type: Plain text
8219 #: build/C/man2/open.2:1364
8220 msgid ""
8221 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
8222 "address of user-space buffers and the file offset of I/Os.  In Linux "
8223 "alignment restrictions vary by filesystem and kernel version and might be "
8224 "absent entirely.  However there is currently no filesystem-independent "
8225 "interface for an application to discover these restrictions for a given file "
8226 "or filesystem.  Some filesystems provide their own interfaces for doing so, "
8227 "for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
8228 msgstr ""
8229 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
8230 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
8231 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
8232 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
8233 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
8234 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
8235 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
8236 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
8237
8238 #. type: Plain text
8239 #: build/C/man2/open.2:1374
8240 #, fuzzy
8241 #| msgid ""
8242 #| "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
8243 #| "the file offset must all be multiples of the logical block size of the "
8244 #| "filesystem.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
8245 msgid ""
8246 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
8247 "the file offset must all be multiples of the logical block size of the "
8248 "filesystem.  Since Linux 2.6.0, alignment to the logical block size of the "
8249 "underlying storage (typically 512 bytes) suffices.  The logical block size "
8250 "can be determined using the B<ioctl>(2)  B<BLKSSZGET> operation or from the "
8251 "shell using the command:"
8252 msgstr ""
8253 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
8254 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
8255 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
8256
8257 #. type: Plain text
8258 #: build/C/man2/open.2:1376
8259 #, no-wrap
8260 msgid "    blockdev --getss\n"
8261 msgstr ""
8262
8263 #. type: Plain text
8264 #: build/C/man2/open.2:1410
8265 msgid ""
8266 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
8267 "system call, if the memory buffer is a private mapping (i.e., any mapping "
8268 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
8269 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
8270 "whether submitted via an asynchronous I/O interface or from another thread "
8271 "in the process, should be completed before B<fork>(2)  is called.  Failure "
8272 "to do so can result in data corruption and undefined behavior in parent and "
8273 "child processes.  This restriction does not apply when the memory buffer for "
8274 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
8275 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
8276 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
8277 "will not be available to the child after B<fork>(2)."
8278 msgstr ""
8279 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
8280 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
8281 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
8282 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
8283 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
8284 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
8285 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
8286 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
8287 "動作が起こる可能性がある。\n"
8288 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
8289 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
8290 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
8291 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
8292 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
8293 "のである)。"
8294
8295 #. type: Plain text
8296 #: build/C/man2/open.2:1420
8297 msgid ""
8298 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
8299 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
8300 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
8301 "flag of the same name, but without alignment restrictions."
8302 msgstr ""
8303 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
8304 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
8305 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
8306 "ラグを導入したが、アラインメントの制限はない。"
8307
8308 #. type: Plain text
8309 #: build/C/man2/open.2:1429
8310 msgid ""
8311 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
8312 "Linux kernels simply ignore this flag.  Some filesystems may not implement "
8313 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
8314 msgstr ""
8315 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
8316 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
8317 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
8318 "と B<open>()  は B<EINVAL> で失敗する。"
8319
8320 #. type: Plain text
8321 #: build/C/man2/open.2:1440
8322 msgid ""
8323 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
8324 "file, and especially to overlapping byte regions in the same file.  Even "
8325 "when the filesystem correctly handles the coherency issues in this "
8326 "situation, overall I/O throughput is likely to be slower than using either "
8327 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
8328 "with direct I/O to the same files."
8329 msgstr ""
8330 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
8331 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
8332 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
8333 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
8334 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
8335 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
8336
8337 #. type: Plain text
8338 #: build/C/man2/open.2:1462
8339 msgid ""
8340 "The behavior of B<O_DIRECT> with NFS will differ from local filesystems.  "
8341 "Older kernels, or kernels configured in certain ways, may not support this "
8342 "combination.  The NFS protocol does not support passing the flag to the "
8343 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
8344 "the server may still cache the I/O.  The client asks the server to make the "
8345 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
8346 "servers will perform poorly under these circumstances, especially if the I/O "
8347 "size is small.  Some servers may also be configured to lie to clients about "
8348 "the I/O having reached stable storage; this will avoid the performance "
8349 "penalty at some risk to data integrity in the event of server power "
8350 "failure.  The Linux NFS client places no alignment restrictions on "
8351 "B<O_DIRECT> I/O."
8352 msgstr ""
8353 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
8354 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
8355 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
8356 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
8357 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
8358 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
8359 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
8360 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
8361 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
8362 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
8363 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
8364 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
8365
8366 #. type: Plain text
8367 #: build/C/man2/open.2:1469
8368 msgid ""
8369 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
8370 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
8371 "as a performance option which is disabled by default."
8372 msgstr ""
8373 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
8374 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
8375 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
8376
8377 #. type: Plain text
8378 #: build/C/man2/open.2:1474
8379 msgid ""
8380 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
8381 "interface is just stupid, and was probably designed by a deranged monkey on "
8382 "some serious mind-controlling substances.\"\\(emLinus"
8383 msgstr ""
8384 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
8385 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
8386 "な」 \\(em Linus"
8387
8388 #.  FIXME . Check bugzilla report on open(O_ASYNC)
8389 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
8390 #. type: Plain text
8391 #: build/C/man2/open.2:1486
8392 msgid ""
8393 "Currently, it is not possible to enable signal-driven I/O by specifying "
8394 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
8395 msgstr ""
8396 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
8397 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
8398 "すること。"
8399
8400 #. type: Plain text
8401 #: build/C/man2/open.2:1494
8402 msgid ""
8403 "One must check for two different error codes, B<EISDIR> and B<ENOENT>, when "
8404 "trying to determine whether the kernel supports B<O_TMPFILE> functionality."
8405 msgstr ""
8406 "カーネルが B<O_TMPFILE> 機能をサポートしているかを判定する際に、 B<EISDIR> "
8407 "と B<ENOENT> の 2 つのエラーコードをチェックしなければならない。"
8408
8409 #. type: Plain text
8410 #: build/C/man2/open.2:1516
8411 msgid ""
8412 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
8413 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), "
8414 "B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
8415 "B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
8416 msgstr ""
8417 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
8418 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), "
8419 "B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
8420 "B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
8421
8422 #. type: TH
8423 #: build/C/man2/open_by_handle_at.2:25
8424 #, no-wrap
8425 msgid "OPEN_BY_HANDLE_AT"
8426 msgstr "OPEN_BY_HANDLE_AT"
8427
8428 #. type: Plain text
8429 #: build/C/man2/open_by_handle_at.2:29
8430 msgid ""
8431 "name_to_handle_at, open_by_handle_at - obtain handle for a pathname and open "
8432 "file via a handle"
8433 msgstr ""
8434
8435 #. type: Plain text
8436 #: build/C/man2/open_by_handle_at.2:35
8437 #, no-wrap
8438 msgid ""
8439 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8440 "B<#include E<lt>sys/types.hE<gt>>\n"
8441 "B<#include E<lt>sys/stat.hE<gt>>\n"
8442 "B<#include E<lt>fcntl.hE<gt>>\n"
8443 msgstr ""
8444 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8445 "B<#include E<lt>sys/types.hE<gt>>\n"
8446 "B<#include E<lt>sys/stat.hE<gt>>\n"
8447 "B<#include E<lt>fcntl.hE<gt>>\n"
8448
8449 #. type: Plain text
8450 #: build/C/man2/open_by_handle_at.2:39
8451 #, no-wrap
8452 msgid ""
8453 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8454 "B<                      struct file_handle *>I<handle>B<,>\n"
8455 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
8456 msgstr ""
8457 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8458 "B<                      struct file_handle *>I<handle>B<,>\n"
8459 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
8460
8461 #. type: Plain text
8462 #: build/C/man2/open_by_handle_at.2:42
8463 #, no-wrap
8464 msgid ""
8465 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
8466 "B<                      int >I<flags>B<);>\n"
8467 msgstr ""
8468 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
8469 "B<                      int >I<flags>B<);>\n"
8470
8471 #. type: Plain text
8472 #: build/C/man2/open_by_handle_at.2:59
8473 msgid ""
8474 "The B<name_to_handle_at>()  and B<open_by_handle_at>()  system calls split "
8475 "the functionality of B<openat>(2)  into two parts: B<name_to_handle_at>()  "
8476 "returns an opaque handle that corresponds to a specified file; "
8477 "B<open_by_handle_at>()  opens the file corresponding to a handle returned by "
8478 "a previous call to B<name_to_handle_at>()  and returns an open file "
8479 "descriptor."
8480 msgstr ""
8481
8482 #. type: SS
8483 #: build/C/man2/open_by_handle_at.2:59
8484 #, no-wrap
8485 msgid "name_to_handle_at()"
8486 msgstr ""
8487
8488 #. type: Plain text
8489 #: build/C/man2/open_by_handle_at.2:71
8490 msgid ""
8491 "The B<name_to_handle_at>()  system call returns a file handle and a mount ID "
8492 "corresponding to the file specified by the I<dirfd> and I<pathname> "
8493 "arguments.  The file handle is returned via the argument I<handle>, which is "
8494 "a pointer to a structure of the following form:"
8495 msgstr ""
8496
8497 #. type: Plain text
8498 #: build/C/man2/open_by_handle_at.2:80
8499 #, no-wrap
8500 msgid ""
8501 "struct file_handle {\n"
8502 "    unsigned int  handle_bytes;   /* Size of f_handle [in, out] */\n"
8503 "    int           handle_type;    /* Handle type [out] */\n"
8504 "    unsigned char f_handle[0];    /* File identifier (sized by\n"
8505 "                                     caller) [out] */\n"
8506 "};\n"
8507 msgstr ""
8508
8509 #. type: Plain text
8510 #: build/C/man2/open_by_handle_at.2:99
8511 msgid ""
8512 "It is the caller's responsibility to allocate the structure with a size "
8513 "large enough to hold the handle returned in I<f_handle>.  Before the call, "
8514 "the I<handle_bytes> field should be initialized to contain the allocated "
8515 "size for I<f_handle>.  (The constant B<MAX_HANDLE_SZ>, defined in "
8516 "I<E<lt>fcntl.hE<gt>>, specifies the maximum possible size for a file "
8517 "handle.)  Upon successful return, the I<handle_bytes> field is updated to "
8518 "contain the number of bytes actually written to I<f_handle>."
8519 msgstr ""
8520
8521 #. type: Plain text
8522 #: build/C/man2/open_by_handle_at.2:112
8523 msgid ""
8524 "The caller can discover the required size for the I<file_handle> structure "
8525 "by making a call in which I<handle-E<gt>handle_bytes> is zero; in this case, "
8526 "the call fails with the error B<EOVERFLOW> and I<handle-E<gt>handle_bytes> "
8527 "is set to indicate the required size; the caller can then use this "
8528 "information to allocate a structure of the correct size (see EXAMPLE below)."
8529 msgstr ""
8530
8531 #. type: Plain text
8532 #: build/C/man2/open_by_handle_at.2:123
8533 msgid ""
8534 "Other than the use of the I<handle_bytes> field, the caller should treat the "
8535 "I<file_handle> structure as an opaque data type: the I<handle_type> and "
8536 "I<f_handle> fields are needed only by a subsequent call to "
8537 "B<open_by_handle_at>()."
8538 msgstr ""
8539
8540 #. type: Plain text
8541 #: build/C/man2/open_by_handle_at.2:131
8542 msgid ""
8543 "The I<flags> argument is a bit mask constructed by ORing together zero or "
8544 "more of B<AT_EMPTY_PATH> and B<AT_SYMLINK_FOLLOW>, described below."
8545 msgstr ""
8546
8547 #. type: Plain text
8548 #: build/C/man2/open_by_handle_at.2:138
8549 msgid ""
8550 "Together, the I<pathname> and I<dirfd> arguments identify the file for which "
8551 "a handle is to be obtained.  There are four distinct cases:"
8552 msgstr ""
8553
8554 #. type: Plain text
8555 #: build/C/man2/open_by_handle_at.2:146
8556 msgid ""
8557 "If I<pathname> is a nonempty string containing an absolute pathname, then a "
8558 "handle is returned for the file referred to by that pathname.  In this case, "
8559 "I<dirfd> is ignored."
8560 msgstr ""
8561
8562 #. type: Plain text
8563 #: build/C/man2/open_by_handle_at.2:157
8564 msgid ""
8565 "If I<pathname> is a nonempty string containing a relative pathname and "
8566 "I<dirfd> has the special value B<AT_FDCWD>, then I<pathname> is interpreted "
8567 "relative to the current working directory of the caller, and a handle is "
8568 "returned for the file to which it refers."
8569 msgstr ""
8570 "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> が特別な値 "
8571 "B<AT_FDCWD> の場合、 I<pathname> は呼び出し元のカレントワーキングディレクトリ"
8572 "に対する相対パスと解釈され、 そのファイルを参照するハンドルが返される。"
8573
8574 #. type: Plain text
8575 #: build/C/man2/open_by_handle_at.2:170
8576 #, fuzzy
8577 #| msgid ""
8578 #| "If I<pathname> is a nonempty string containing a relative pathname and "
8579 #| "I<dirfd> has the special value B<AT_FDCWD>, then I<pathname> is "
8580 #| "interpreted relative to the current working directory of the caller, and "
8581 #| "a handle is returned for the file to which it refers."
8582 msgid ""
8583 "If I<pathname> is a nonempty string containing a relative pathname and "
8584 "I<dirfd> is a file descriptor referring to a directory, then I<pathname> is "
8585 "interpreted relative to the directory referred to by I<dirfd>, and a handle "
8586 "is returned for the file to which it refers.  (See B<openat>(2)  for an "
8587 "explanation of why \"directory file descriptors\" are useful.)"
8588 msgstr ""
8589 "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> が特別な値 "
8590 "B<AT_FDCWD> の場合、 I<pathname> は呼び出し元のカレントワーキングディレクトリ"
8591 "に対する相対パスと解釈され、 そのファイルを参照するハンドルが返される。"
8592
8593 #. type: Plain text
8594 #: build/C/man2/open_by_handle_at.2:184
8595 msgid ""
8596 "If I<pathname> is an empty string and I<flags> specifies the value "
8597 "B<AT_EMPTY_PATH>, then I<dirfd> can be an open file descriptor referring to "
8598 "any type of file, or B<AT_FDCWD>, meaning the current working directory, and "
8599 "a handle is returned for the file to which it refers."
8600 msgstr ""
8601
8602 #. type: Plain text
8603 #: build/C/man2/open_by_handle_at.2:196
8604 msgid ""
8605 "The I<mount_id> argument returns an identifier for the filesystem mount that "
8606 "corresponds to I<pathname>.  This corresponds to the first field in one of "
8607 "the records in I</proc/self/mountinfo>.  Opening the pathname in the fifth "
8608 "field of that record yields a file descriptor for the mount point; that file "
8609 "descriptor can be used in a subsequent call to B<open_by_handle_at>()."
8610 msgstr ""
8611
8612 #. type: Plain text
8613 #: build/C/man2/open_by_handle_at.2:209
8614 msgid ""
8615 "By default, B<name_to_handle_at>()  does not dereference I<pathname> if it "
8616 "is a symbolic link, and thus returns a handle for the link itself.  If "
8617 "B<AT_SYMLINK_FOLLOW> is specified in I<flags>, I<pathname> is dereferenced "
8618 "if it is a symbolic link (so that the call returns a handle for the file "
8619 "referred to by the link)."
8620 msgstr ""
8621
8622 #. type: SS
8623 #: build/C/man2/open_by_handle_at.2:209
8624 #, no-wrap
8625 msgid "open_by_handle_at()"
8626 msgstr ""
8627
8628 #. type: Plain text
8629 #: build/C/man2/open_by_handle_at.2:216
8630 msgid ""
8631 "The B<open_by_handle_at>()  system call opens the file referred to by "
8632 "I<handle>, a file handle returned by a previous call to "
8633 "B<name_to_handle_at>()."
8634 msgstr ""
8635
8636 #. type: Plain text
8637 #: build/C/man2/open_by_handle_at.2:226
8638 msgid ""
8639 "The I<mount_fd> argument is a file descriptor for any object (file, "
8640 "directory, etc.)  in the mounted filesystem with respect to which I<handle> "
8641 "should be interpreted.  The special value B<AT_FDCWD> can be specified, "
8642 "meaning the current working directory of the caller."
8643 msgstr ""
8644
8645 #. type: Plain text
8646 #: build/C/man2/open_by_handle_at.2:239
8647 msgid ""
8648 "The I<flags> argument is as for B<open>(2).  If I<handle> refers to a "
8649 "symbolic link, the caller must specify the B<O_PATH> flag, and the symbolic "
8650 "link is not dereferenced; the B<O_NOFOLLOW> flag, if specified, is ignored."
8651 msgstr ""
8652
8653 #. type: Plain text
8654 #: build/C/man2/open_by_handle_at.2:245
8655 msgid ""
8656 "The caller must have the B<CAP_DAC_READ_SEARCH> capability to invoke "
8657 "B<open_by_handle_at>()."
8658 msgstr ""
8659
8660 #. type: Plain text
8661 #: build/C/man2/open_by_handle_at.2:252
8662 msgid ""
8663 "On success, B<name_to_handle_at>()  returns 0, and B<open_by_handle_at>()  "
8664 "returns a nonnegative file descriptor."
8665 msgstr ""
8666
8667 #. type: Plain text
8668 #: build/C/man2/open_by_handle_at.2:256
8669 msgid ""
8670 "In the event of an error, both system calls return -1 and set I<errno> to "
8671 "indicate the cause of the error."
8672 msgstr ""
8673
8674 #. type: Plain text
8675 #: build/C/man2/open_by_handle_at.2:263
8676 msgid ""
8677 "B<name_to_handle_at>()  and B<open_by_handle_at>()  can fail for the same "
8678 "errors as B<openat>(2).  In addition, they can fail with the errors noted "
8679 "below."
8680 msgstr ""
8681
8682 #. type: Plain text
8683 #: build/C/man2/open_by_handle_at.2:266
8684 msgid "B<name_to_handle_at>()  can fail with the following errors:"
8685 msgstr ""
8686
8687 #. type: Plain text
8688 #: build/C/man2/open_by_handle_at.2:273
8689 msgid ""
8690 "I<pathname>, I<mount_id>, or I<handle> points outside your accessible "
8691 "address space."
8692 msgstr ""
8693 "I<pathname>, I<mount_id>, I<handle> のどれかがアクセス可能なアドレス空間の外"
8694 "を指している。"
8695
8696 #. type: Plain text
8697 #: build/C/man2/open_by_handle_at.2:277
8698 msgid "I<flags> includes an invalid bit value."
8699 msgstr ""
8700
8701 #. type: Plain text
8702 #: build/C/man2/open_by_handle_at.2:282
8703 msgid "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ>."
8704 msgstr ""
8705
8706 #. type: Plain text
8707 #: build/C/man2/open_by_handle_at.2:289
8708 msgid ""
8709 "I<pathname> is an empty string, but B<AT_EMPTY_PATH> was not specified in "
8710 "I<flags>."
8711 msgstr ""
8712 "I<pathname> が空文字列だが、 I<flags> に B<AT_EMPTY_PATH> がされていなかっ"
8713 "た。"
8714
8715 #. type: Plain text
8716 #: build/C/man2/open_by_handle_at.2:301
8717 msgid ""
8718 "The file descriptor supplied in I<dirfd> does not refer to a directory, and "
8719 "it is not the case that both I<flags> includes B<AT_EMPTY_PATH> and "
8720 "I<pathname> is an empty string."
8721 msgstr ""
8722
8723 #. type: Plain text
8724 #: build/C/man2/open_by_handle_at.2:304
8725 msgid ""
8726 "The filesystem does not support decoding of a pathname to a file handle."
8727 msgstr ""
8728
8729 #. type: Plain text
8730 #: build/C/man2/open_by_handle_at.2:314
8731 msgid ""
8732 "The I<handle-E<gt>handle_bytes> value passed into the call was too small.  "
8733 "When this error occurs, I<handle-E<gt>handle_bytes> is updated to indicate "
8734 "the required size for the handle."
8735 msgstr ""
8736
8737 #. type: Plain text
8738 #: build/C/man2/open_by_handle_at.2:317
8739 msgid "B<open_by_handle_at>()  can fail with the following errors:"
8740 msgstr ""
8741
8742 #. type: Plain text
8743 #: build/C/man2/open_by_handle_at.2:321
8744 msgid "I<mount_fd> is not an open file descriptor."
8745 msgstr "I<mount_fd> がオープンされたファイルディスクリプタでない。"
8746
8747 #. type: Plain text
8748 #: build/C/man2/open_by_handle_at.2:325
8749 msgid "I<handle> points outside your accessible address space."
8750 msgstr "I<handle> がアクセス可能なアドレス空間の外を指している。"
8751
8752 #. type: Plain text
8753 #: build/C/man2/open_by_handle_at.2:331
8754 msgid ""
8755 "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ> or is equal to "
8756 "zero."
8757 msgstr ""
8758
8759 #. type: Plain text
8760 #: build/C/man2/open_by_handle_at.2:338
8761 msgid ""
8762 "I<handle> refers to a symbolic link, but B<O_PATH> was not specified in "
8763 "I<flags>."
8764 msgstr ""
8765 "I<handle> がシンボリックリンクを参照しているが、 I<flags> に B<O_PATH> がされ"
8766 "ていなかった。"
8767
8768 #. type: Plain text
8769 #: build/C/man2/open_by_handle_at.2:343
8770 msgid "The caller does not have the B<CAP_DAC_READ_SEARCH> capability."
8771 msgstr "呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていない。"
8772
8773 #. type: TP
8774 #: build/C/man2/open_by_handle_at.2:343
8775 #, no-wrap
8776 msgid "B<ESTALE>"
8777 msgstr "B<ESTALE>"
8778
8779 #. type: Plain text
8780 #: build/C/man2/open_by_handle_at.2:349
8781 msgid ""
8782 "The specified I<handle> is not valid.  This error will occur if, for "
8783 "example, the file has been deleted."
8784 msgstr ""
8785
8786 #. type: Plain text
8787 #: build/C/man2/open_by_handle_at.2:352
8788 msgid ""
8789 "These system calls first appeared in Linux 2.6.39.  Library support is "
8790 "provided in glibc since version 2.14."
8791 msgstr ""
8792 "これらのシステムコールは Linux 2.6.39 で初めて登場した。ライブラリによるサ"
8793 "ポートはバージョン 2.14 以降の glibc で提供されている。"
8794
8795 #. type: Plain text
8796 #: build/C/man2/open_by_handle_at.2:354
8797 msgid "These system calls are nonstandard Linux extensions."
8798 msgstr ""
8799
8800 #. type: Plain text
8801 #: build/C/man2/open_by_handle_at.2:359
8802 msgid ""
8803 "FreeBSD has a broadly similar pair of system calls in the form of "
8804 "B<getfh>()  and B<openfh>()."
8805 msgstr ""
8806
8807 #. type: Plain text
8808 #: build/C/man2/open_by_handle_at.2:364
8809 msgid ""
8810 "A file handle can be generated in one process using B<name_to_handle_at>()  "
8811 "and later used in a different process that calls B<open_by_handle_at>()."
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man2/open_by_handle_at.2:370
8816 msgid ""
8817 "Some filesystem don't support the translation of pathnames to file handles, "
8818 "for example, I</proc>, I</sys>, and various network filesystems."
8819 msgstr ""
8820
8821 #. type: Plain text
8822 #: build/C/man2/open_by_handle_at.2:377
8823 msgid ""
8824 "A file handle may become invalid (\"stale\") if a file is deleted, or for "
8825 "other filesystem-specific reasons.  Invalid handles are notified by an "
8826 "B<ESTALE> error from B<open_by_handle_at>()."
8827 msgstr ""
8828
8829 #.  https://lwn.net/Articles/375888/
8830 #.      "Open by handle" - Jonathan Corbet, 2010-02-23
8831 #. type: Plain text
8832 #: build/C/man2/open_by_handle_at.2:387
8833 msgid ""
8834 "These system calls are designed for use by user-space file servers.  For "
8835 "example, a user-space NFS server might generate a file handle and pass it to "
8836 "an NFS client.  Later, when the client wants to open the file, it could pass "
8837 "the handle back to the server.  This sort of functionality allows a user-"
8838 "space file server to operate in a stateless fashion with respect to the "
8839 "files it serves."
8840 msgstr ""
8841
8842 #.  commit bcda76524cd1fa32af748536f27f674a13e56700
8843 #. type: Plain text
8844 #: build/C/man2/open_by_handle_at.2:409
8845 msgid ""
8846 "If I<pathname> refers to a symbolic link and I<flags> does not specify "
8847 "B<AT_SYMLINK_FOLLOW>, then B<name_to_handle_at>()  returns a handle for the "
8848 "link (rather than the file to which it refers).  The process receiving the "
8849 "handle can later perform operations on the symbolic link by converting the "
8850 "handle to a file descriptor using B<open_by_handle_at>()  with the B<O_PATH> "
8851 "flag, and then passing the file descriptor as the I<dirfd> argument in "
8852 "system calls such as B<readlinkat>(2)  and B<fchownat>(2)."
8853 msgstr ""
8854
8855 #. type: SS
8856 #: build/C/man2/open_by_handle_at.2:409
8857 #, no-wrap
8858 msgid "Obtaining a persistent filesystem ID"
8859 msgstr ""
8860
8861 #. type: Plain text
8862 #: build/C/man2/open_by_handle_at.2:423
8863 msgid ""
8864 "The mount IDs in I</proc/self/mountinfo> can be reused as filesystems are "
8865 "unmounted and mounted.  Therefore, the mount ID returned by "
8866 "B<name_to_handle_at>()  (in I<*mount_id>)  should not be treated as a "
8867 "persistent identifier for the corresponding mounted filesystem.  However, an "
8868 "application can use the information in the I<mountinfo> record that "
8869 "corresponds to the mount ID to derive a persistent identifier."
8870 msgstr ""
8871
8872 #.  e.g., http://stackoverflow.com/questions/6748429/using-libblkid-to-find-uuid-of-a-partition
8873 #. type: Plain text
8874 #: build/C/man2/open_by_handle_at.2:439
8875 msgid ""
8876 "For example, one can use the device name in the fifth field of the "
8877 "I<mountinfo> record to search for the corresponding device UUID via the "
8878 "symbolic links in I</dev/disks/by-uuid>.  (A more comfortable way of "
8879 "obtaining the UUID is to use the B<libblkid>(3)  library.)  That process can "
8880 "then be reversed, using the UUID to look up the device name, and then "
8881 "obtaining the corresponding mount point, in order to produce the I<mount_fd> "
8882 "argument used by B<open_by_handle_at>()."
8883 msgstr ""
8884
8885 #. type: Plain text
8886 #: build/C/man2/open_by_handle_at.2:451
8887 msgid ""
8888 "The two programs below demonstrate the use of B<name_to_handle_at>()  and "
8889 "B<open_by_handle_at>().  The first program (I<t_name_to_handle_at.c>)  uses "
8890 "B<name_to_handle_at>()  to obtain the file handle and mount ID for the file "
8891 "specified in its command-line argument; the handle and mount ID are written "
8892 "to standard output."
8893 msgstr ""
8894
8895 #. type: Plain text
8896 #: build/C/man2/open_by_handle_at.2:471
8897 msgid ""
8898 "The second program (I<t_open_by_handle_at.c>)  reads a mount ID and file "
8899 "handle from standard input.  The program then employs "
8900 "B<open_by_handle_at>()  to open the file using that handle.  If an optional "
8901 "command-line argument is supplied, then the I<mount_fd> argument for "
8902 "B<open_by_handle_at>()  is obtained by opening the directory named in that "
8903 "argument.  Otherwise, I<mount_fd> is obtained by scanning I</proc/self/"
8904 "mountinfo> to find a record whose mount ID matches the mount ID read from "
8905 "standard input, and the mount directory specified in that record is opened.  "
8906 "(These programs do not deal with the fact that mount IDs are not persistent.)"
8907 msgstr ""
8908
8909 #. type: Plain text
8910 #: build/C/man2/open_by_handle_at.2:473
8911 msgid "The following shell session demonstrates the use of these two programs:"
8912 msgstr "以下のシェルセッションは、これら 2 つのプログラムの使用例である。"
8913
8914 #. type: Plain text
8915 #: build/C/man2/open_by_handle_at.2:483
8916 #, no-wrap
8917 msgid ""
8918 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8919 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
8920 "$ B<./t_open_by_handle_at E<lt> fh>\n"
8921 "open_by_handle_at: Operation not permitted\n"
8922 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
8923 "Read 31 bytes\n"
8924 "$ B<rm cecilia.txt>\n"
8925 msgstr ""
8926 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8927 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
8928 "$ B<./t_open_by_handle_at E<lt> fh>\n"
8929 "open_by_handle_at: Operation not permitted\n"
8930 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
8931 "Read 31 bytes\n"
8932 "$ B<rm cecilia.txt>\n"
8933
8934 #.  Christoph Hellwig: That's why the file handles contain a generation
8935 #.  counter that gets incremented in this case.
8936 #. type: Plain text
8937 #: build/C/man2/open_by_handle_at.2:494
8938 msgid ""
8939 "Now we delete and (quickly) re-create the file so that it has the same "
8940 "content and (by chance) the same inode.  Nevertheless, "
8941 "B<open_by_handle_at>()  recognizes that the original file referred to by the "
8942 "file handle no longer exists."
8943 msgstr ""
8944
8945 #. type: Plain text
8946 #: build/C/man2/open_by_handle_at.2:505
8947 #, no-wrap
8948 msgid ""
8949 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
8950 "4072121\n"
8951 "$ B<rm cecilia.txt>\n"
8952 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8953 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
8954 "4072121\n"
8955 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
8956 "open_by_handle_at: Stale NFS file handle\n"
8957 msgstr ""
8958 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
8959 "4072121\n"
8960 "$ B<rm cecilia.txt>\n"
8961 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8962 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
8963 "4072121\n"
8964 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
8965 "open_by_handle_at: Stale NFS file handle\n"
8966
8967 #. type: SS
8968 #: build/C/man2/open_by_handle_at.2:507
8969 #, no-wrap
8970 msgid "Program source: t_name_to_handle_at.c"
8971 msgstr ""
8972
8973 #. type: Plain text
8974 #: build/C/man2/open_by_handle_at.2:519
8975 #, no-wrap
8976 msgid ""
8977 "#define _GNU_SOURCE\n"
8978 "#include E<lt>sys/types.hE<gt>\n"
8979 "#include E<lt>sys/stat.hE<gt>\n"
8980 "#include E<lt>fcntl.hE<gt>\n"
8981 "#include E<lt>stdio.hE<gt>\n"
8982 "#include E<lt>stdlib.hE<gt>\n"
8983 "#include E<lt>unistd.hE<gt>\n"
8984 "#include E<lt>errno.hE<gt>\n"
8985 "#include E<lt>string.hE<gt>\n"
8986 msgstr ""
8987 "#define _GNU_SOURCE\n"
8988 "#include E<lt>sys/types.hE<gt>\n"
8989 "#include E<lt>sys/stat.hE<gt>\n"
8990 "#include E<lt>fcntl.hE<gt>\n"
8991 "#include E<lt>stdio.hE<gt>\n"
8992 "#include E<lt>stdlib.hE<gt>\n"
8993 "#include E<lt>unistd.hE<gt>\n"
8994 "#include E<lt>errno.hE<gt>\n"
8995 "#include E<lt>string.hE<gt>\n"
8996
8997 #. type: Plain text
8998 #: build/C/man2/open_by_handle_at.2:522 build/C/man2/open_by_handle_at.2:595
8999 #, no-wrap
9000 msgid ""
9001 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9002 "                        } while (0)\n"
9003 msgstr ""
9004 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9005 "                        } while (0)\n"
9006
9007 #. type: Plain text
9008 #: build/C/man2/open_by_handle_at.2:529
9009 #, no-wrap
9010 msgid ""
9011 "int\n"
9012 "main(int argc, char *argv[])\n"
9013 "{\n"
9014 "    struct file_handle *fhp;\n"
9015 "    int mount_id, fhsize, flags, dirfd, j;\n"
9016 "    char *pathname;\n"
9017 msgstr ""
9018 "int\n"
9019 "main(int argc, char *argv[])\n"
9020 "{\n"
9021 "    struct file_handle *fhp;\n"
9022 "    int mount_id, fhsize, flags, dirfd, j;\n"
9023 "    char *pathname;\n"
9024
9025 #. type: Plain text
9026 #: build/C/man2/open_by_handle_at.2:534
9027 #, no-wrap
9028 msgid ""
9029 "    if (argc != 2) {\n"
9030 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
9031 "        exit(EXIT_FAILURE);\n"
9032 "    }\n"
9033 msgstr ""
9034 "    if (argc != 2) {\n"
9035 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
9036 "        exit(EXIT_FAILURE);\n"
9037 "    }\n"
9038
9039 #. type: Plain text
9040 #: build/C/man2/open_by_handle_at.2:536
9041 #, no-wrap
9042 msgid "    pathname = argv[1];\n"
9043 msgstr "    pathname = argv[1];\n"
9044
9045 #. type: Plain text
9046 #: build/C/man2/open_by_handle_at.2:538
9047 #, no-wrap
9048 msgid "    /* Allocate file_handle structure */\n"
9049 msgstr "    /* Allocate file_handle structure */\n"
9050
9051 #. type: Plain text
9052 #: build/C/man2/open_by_handle_at.2:543
9053 #, no-wrap
9054 msgid ""
9055 "    fhsize = sizeof(*fhp);\n"
9056 "    fhp = malloc(fhsize);\n"
9057 "    if (fhp == NULL)\n"
9058 "        errExit(\"malloc\");\n"
9059 msgstr ""
9060 "    fhsize = sizeof(*fhp);\n"
9061 "    fhp = malloc(fhsize);\n"
9062 "    if (fhp == NULL)\n"
9063 "        errExit(\"malloc\");\n"
9064
9065 #. type: Plain text
9066 #: build/C/man2/open_by_handle_at.2:546
9067 #, no-wrap
9068 msgid ""
9069 "    /* Make an initial call to name_to_handle_at() to discover\n"
9070 "       the size required for file handle */\n"
9071 msgstr ""
9072 "    /* Make an initial call to name_to_handle_at() to discover\n"
9073 "       the size required for file handle */\n"
9074
9075 #. type: Plain text
9076 #: build/C/man2/open_by_handle_at.2:555
9077 #, no-wrap
9078 msgid ""
9079 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
9080 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
9081 "    fhp-E<gt>handle_bytes = 0;\n"
9082 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
9083 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
9084 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
9085 "        exit(EXIT_FAILURE);\n"
9086 "    }\n"
9087 msgstr ""
9088 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
9089 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
9090 "    fhp-E<gt>handle_bytes = 0;\n"
9091 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
9092 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
9093 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
9094 "        exit(EXIT_FAILURE);\n"
9095 "    }\n"
9096
9097 #. type: Plain text
9098 #: build/C/man2/open_by_handle_at.2:557
9099 #, no-wrap
9100 msgid "    /* Reallocate file_handle structure with correct size */\n"
9101 msgstr "    /* Reallocate file_handle structure with correct size */\n"
9102
9103 #. type: Plain text
9104 #: build/C/man2/open_by_handle_at.2:562
9105 #, no-wrap
9106 msgid ""
9107 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
9108 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
9109 "    if (fhp == NULL)\n"
9110 "        errExit(\"realloc\");\n"
9111 msgstr ""
9112 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
9113 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
9114 "    if (fhp == NULL)\n"
9115 "        errExit(\"realloc\");\n"
9116
9117 #. type: Plain text
9118 #: build/C/man2/open_by_handle_at.2:564
9119 #, no-wrap
9120 msgid "    /* Get file handle from pathname supplied on command line */\n"
9121 msgstr "    /* Get file handle from pathname supplied on command line */\n"
9122
9123 #. type: Plain text
9124 #: build/C/man2/open_by_handle_at.2:567
9125 #, no-wrap
9126 msgid ""
9127 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
9128 "        errExit(\"name_to_handle_at\");\n"
9129 msgstr ""
9130 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
9131 "        errExit(\"name_to_handle_at\");\n"
9132
9133 #. type: Plain text
9134 #: build/C/man2/open_by_handle_at.2:570
9135 #, no-wrap
9136 msgid ""
9137 "    /* Write mount ID, file handle size, and file handle to stdout,\n"
9138 "       for later reuse by t_open_by_handle_at.c */\n"
9139 msgstr ""
9140 "    /* Write mount ID, file handle size, and file handle to stdout,\n"
9141 "       for later reuse by t_open_by_handle_at.c */\n"
9142
9143 #. type: Plain text
9144 #: build/C/man2/open_by_handle_at.2:576
9145 #, no-wrap
9146 msgid ""
9147 "    printf(\"%d\\en\", mount_id);\n"
9148 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
9149 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9150 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
9151 "    printf(\"\\en\");\n"
9152 msgstr ""
9153 "    printf(\"%d\\en\", mount_id);\n"
9154 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
9155 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9156 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
9157 "    printf(\"\\en\");\n"
9158
9159 #. type: SS
9160 #: build/C/man2/open_by_handle_at.2:580
9161 #, no-wrap
9162 msgid "Program source: t_open_by_handle_at.c"
9163 msgstr ""
9164
9165 #. type: Plain text
9166 #: build/C/man2/open_by_handle_at.2:592
9167 #, no-wrap
9168 msgid ""
9169 "#define _GNU_SOURCE\n"
9170 "#include E<lt>sys/types.hE<gt>\n"
9171 "#include E<lt>sys/stat.hE<gt>\n"
9172 "#include E<lt>fcntl.hE<gt>\n"
9173 "#include E<lt>limits.hE<gt>\n"
9174 "#include E<lt>stdio.hE<gt>\n"
9175 "#include E<lt>stdlib.hE<gt>\n"
9176 "#include E<lt>unistd.hE<gt>\n"
9177 "#include E<lt>string.hE<gt>\n"
9178 msgstr ""
9179 "#define _GNU_SOURCE\n"
9180 "#include E<lt>sys/types.hE<gt>\n"
9181 "#include E<lt>sys/stat.hE<gt>\n"
9182 "#include E<lt>fcntl.hE<gt>\n"
9183 "#include E<lt>limits.hE<gt>\n"
9184 "#include E<lt>stdio.hE<gt>\n"
9185 "#include E<lt>stdlib.hE<gt>\n"
9186 "#include E<lt>unistd.hE<gt>\n"
9187 "#include E<lt>string.hE<gt>\n"
9188
9189 #. type: Plain text
9190 #: build/C/man2/open_by_handle_at.2:601
9191 #, no-wrap
9192 msgid ""
9193 "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
9194 "   \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
9195 "   \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
9196 "   Open the corresponding mount path and return the resulting file\n"
9197 "   descriptor. */\n"
9198 msgstr ""
9199 "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
9200 "   \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
9201 "   \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
9202 "   Open the corresponding mount path and return the resulting file\n"
9203 "   descriptor. */\n"
9204
9205 #. type: Plain text
9206 #: build/C/man2/open_by_handle_at.2:611
9207 #, no-wrap
9208 msgid ""
9209 "static int\n"
9210 "open_mount_path_by_id(int mount_id)\n"
9211 "{\n"
9212 "    char *linep;\n"
9213 "    size_t lsize;\n"
9214 "    char mount_path[PATH_MAX];\n"
9215 "    int mi_mount_id, found;\n"
9216 "    ssize_t nread;\n"
9217 "    FILE *fp;\n"
9218 msgstr ""
9219 "static int\n"
9220 "open_mount_path_by_id(int mount_id)\n"
9221 "{\n"
9222 "    char *linep;\n"
9223 "    size_t lsize;\n"
9224 "    char mount_path[PATH_MAX];\n"
9225 "    int mi_mount_id, found;\n"
9226 "    ssize_t nread;\n"
9227 "    FILE *fp;\n"
9228
9229 #. type: Plain text
9230 #: build/C/man2/open_by_handle_at.2:615
9231 #, no-wrap
9232 msgid ""
9233 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
9234 "    if (fp == NULL)\n"
9235 "        errExit(\"fopen\");\n"
9236 msgstr ""
9237 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
9238 "    if (fp == NULL)\n"
9239 "        errExit(\"fopen\");\n"
9240
9241 #. type: Plain text
9242 #: build/C/man2/open_by_handle_at.2:622
9243 #, no-wrap
9244 msgid ""
9245 "    found = 0;\n"
9246 "    linep = NULL;\n"
9247 "    while (!found) {\n"
9248 "        nread = getline(&linep, &lsize, fp);\n"
9249 "        if (nread == -1)\n"
9250 "            break;\n"
9251 msgstr ""
9252 "    found = 0;\n"
9253 "    linep = NULL;\n"
9254 "    while (!found) {\n"
9255 "        nread = getline(&linep, &lsize, fp);\n"
9256 "        if (nread == -1)\n"
9257 "            break;\n"
9258
9259 #. type: Plain text
9260 #: build/C/man2/open_by_handle_at.2:629
9261 #, no-wrap
9262 msgid ""
9263 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
9264 "                       &mi_mount_id, mount_path);\n"
9265 "        if (nread != 2) {\n"
9266 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
9267 "            exit(EXIT_FAILURE);\n"
9268 "        }\n"
9269 msgstr ""
9270 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
9271 "                       &mi_mount_id, mount_path);\n"
9272 "        if (nread != 2) {\n"
9273 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
9274 "            exit(EXIT_FAILURE);\n"
9275 "        }\n"
9276
9277 #. type: Plain text
9278 #: build/C/man2/open_by_handle_at.2:634
9279 #, no-wrap
9280 msgid ""
9281 "        if (mi_mount_id == mount_id)\n"
9282 "            found = 1;\n"
9283 "    }\n"
9284 "    free(linep);\n"
9285 msgstr ""
9286 "        if (mi_mount_id == mount_id)\n"
9287 "            found = 1;\n"
9288 "    }\n"
9289 "    free(linep);\n"
9290
9291 #. type: Plain text
9292 #: build/C/man2/open_by_handle_at.2:636
9293 #, no-wrap
9294 msgid "    fclose(fp);\n"
9295 msgstr "    fclose(fp);\n"
9296
9297 #. type: Plain text
9298 #: build/C/man2/open_by_handle_at.2:641
9299 #, no-wrap
9300 msgid ""
9301 "    if (!found) {\n"
9302 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
9303 "        exit(EXIT_FAILURE);\n"
9304 "    }\n"
9305 msgstr ""
9306 "    if (!found) {\n"
9307 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
9308 "        exit(EXIT_FAILURE);\n"
9309 "    }\n"
9310
9311 #. type: Plain text
9312 #: build/C/man2/open_by_handle_at.2:644
9313 #, no-wrap
9314 msgid ""
9315 "    return open(mount_path, O_RDONLY);\n"
9316 "}\n"
9317 msgstr ""
9318 "    return open(mount_path, O_RDONLY);\n"
9319 "}\n"
9320
9321 #. type: Plain text
9322 #: build/C/man2/open_by_handle_at.2:655
9323 #, no-wrap
9324 msgid ""
9325 "int\n"
9326 "main(int argc, char *argv[])\n"
9327 "{\n"
9328 "    struct file_handle *fhp;\n"
9329 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
9330 "    ssize_t nread;\n"
9331 "    char buf[1000];\n"
9332 "#define LINE_SIZE 100\n"
9333 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
9334 "    char *nextp;\n"
9335 msgstr ""
9336 "int\n"
9337 "main(int argc, char *argv[])\n"
9338 "{\n"
9339 "    struct file_handle *fhp;\n"
9340 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
9341 "    ssize_t nread;\n"
9342 "    char buf[1000];\n"
9343 "#define LINE_SIZE 100\n"
9344 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
9345 "    char *nextp;\n"
9346
9347 #. type: Plain text
9348 #: build/C/man2/open_by_handle_at.2:660
9349 #, no-wrap
9350 msgid ""
9351 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
9352 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
9353 "        exit(EXIT_FAILURE);\n"
9354 "    }\n"
9355 msgstr ""
9356 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
9357 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
9358 "        exit(EXIT_FAILURE);\n"
9359 "    }\n"
9360
9361 #. type: Plain text
9362 #: build/C/man2/open_by_handle_at.2:662
9363 #, no-wrap
9364 msgid "    /* Standard input contains mount ID and file handle information:\n"
9365 msgstr "    /* Standard input contains mount ID and file handle information:\n"
9366
9367 #. type: Plain text
9368 #: build/C/man2/open_by_handle_at.2:666
9369 #, no-wrap
9370 msgid ""
9371 "         Line 1: E<lt>mount_idE<gt>\n"
9372 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
9373 "    */\n"
9374 msgstr ""
9375 "         Line 1: E<lt>mount_idE<gt>\n"
9376 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
9377 "    */\n"
9378
9379 #. type: Plain text
9380 #: build/C/man2/open_by_handle_at.2:672
9381 #, no-wrap
9382 msgid ""
9383 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
9384 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
9385 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
9386 "        exit(EXIT_FAILURE);\n"
9387 "    }\n"
9388 msgstr ""
9389 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
9390 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
9391 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
9392 "        exit(EXIT_FAILURE);\n"
9393 "    }\n"
9394
9395 #. type: Plain text
9396 #: build/C/man2/open_by_handle_at.2:674
9397 #, no-wrap
9398 msgid "    mount_id = atoi(line1);\n"
9399 msgstr "    mount_id = atoi(line1);\n"
9400
9401 #. type: Plain text
9402 #: build/C/man2/open_by_handle_at.2:676
9403 #, no-wrap
9404 msgid "    handle_bytes = strtoul(line2, &nextp, 0);\n"
9405 msgstr "    handle_bytes = strtoul(line2, &nextp, 0);\n"
9406
9407 #. type: Plain text
9408 #: build/C/man2/open_by_handle_at.2:678
9409 #, no-wrap
9410 msgid "    /* Given handle_bytes, we can now allocate file_handle structure */\n"
9411 msgstr "    /* Given handle_bytes, we can now allocate file_handle structure */\n"
9412
9413 #. type: Plain text
9414 #: build/C/man2/open_by_handle_at.2:682
9415 #, no-wrap
9416 msgid ""
9417 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
9418 "    if (fhp == NULL)\n"
9419 "        errExit(\"malloc\");\n"
9420 msgstr ""
9421 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
9422 "    if (fhp == NULL)\n"
9423 "        errExit(\"malloc\");\n"
9424
9425 #. type: Plain text
9426 #: build/C/man2/open_by_handle_at.2:684
9427 #, no-wrap
9428 msgid "    fhp-E<gt>handle_bytes = handle_bytes;\n"
9429 msgstr "    fhp-E<gt>handle_bytes = handle_bytes;\n"
9430
9431 #. type: Plain text
9432 #: build/C/man2/open_by_handle_at.2:686
9433 #, no-wrap
9434 msgid "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
9435 msgstr "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
9436
9437 #. type: Plain text
9438 #: build/C/man2/open_by_handle_at.2:689
9439 #, no-wrap
9440 msgid ""
9441 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9442 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
9443 msgstr ""
9444 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9445 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
9446
9447 #. type: Plain text
9448 #: build/C/man2/open_by_handle_at.2:694
9449 #, no-wrap
9450 msgid ""
9451 "    /* Obtain file descriptor for mount point, either by opening\n"
9452 "       the pathname specified on the command line, or by scanning\n"
9453 "       /proc/self/mounts to find a mount that matches the \\(aqmount_id\\(aq\n"
9454 "       that we received from stdin. */\n"
9455 msgstr ""
9456 "    /* Obtain file descriptor for mount point, either by opening\n"
9457 "       the pathname specified on the command line, or by scanning\n"
9458 "       /proc/self/mounts to find a mount that matches the \\(aqmount_id\\(aq\n"
9459 "       that we received from stdin. */\n"
9460
9461 #. type: Plain text
9462 #: build/C/man2/open_by_handle_at.2:699
9463 #, no-wrap
9464 msgid ""
9465 "    if (argc E<gt> 1)\n"
9466 "        mount_fd = open(argv[1], O_RDONLY);\n"
9467 "    else\n"
9468 "        mount_fd = open_mount_path_by_id(mount_id);\n"
9469 msgstr ""
9470 "    if (argc E<gt> 1)\n"
9471 "        mount_fd = open(argv[1], O_RDONLY);\n"
9472 "    else\n"
9473 "        mount_fd = open_mount_path_by_id(mount_id);\n"
9474
9475 #. type: Plain text
9476 #: build/C/man2/open_by_handle_at.2:702
9477 #, no-wrap
9478 msgid ""
9479 "    if (mount_fd == -1)\n"
9480 "        errExit(\"opening mount fd\");\n"
9481 msgstr ""
9482 "    if (mount_fd == -1)\n"
9483 "        errExit(\"opening mount fd\");\n"
9484
9485 #. type: Plain text
9486 #: build/C/man2/open_by_handle_at.2:704
9487 #, no-wrap
9488 msgid "    /* Open file using handle and mount point */\n"
9489 msgstr "    /* Open file using handle and mount point */\n"
9490
9491 #. type: Plain text
9492 #: build/C/man2/open_by_handle_at.2:708
9493 #, no-wrap
9494 msgid ""
9495 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
9496 "    if (fd == -1)\n"
9497 "        errExit(\"open_by_handle_at\");\n"
9498 msgstr ""
9499 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
9500 "    if (fd == -1)\n"
9501 "        errExit(\"open_by_handle_at\");\n"
9502
9503 #. type: Plain text
9504 #: build/C/man2/open_by_handle_at.2:710
9505 #, no-wrap
9506 msgid "    /* Try reading a few bytes from the file */\n"
9507 msgstr "    /* Try reading a few bytes from the file */\n"
9508
9509 #. type: Plain text
9510 #: build/C/man2/open_by_handle_at.2:714
9511 #, no-wrap
9512 msgid ""
9513 "    nread = read(fd, buf, sizeof(buf));\n"
9514 "    if (nread == -1)\n"
9515 "        errExit(\"read\");\n"
9516 msgstr ""
9517 "    nread = read(fd, buf, sizeof(buf));\n"
9518 "    if (nread == -1)\n"
9519 "        errExit(\"read\");\n"
9520
9521 #. type: Plain text
9522 #: build/C/man2/open_by_handle_at.2:716
9523 #, no-wrap
9524 msgid "    printf(\"Read %zd bytes\\en\", nread);\n"
9525 msgstr "    printf(\"Read %zd bytes\\en\", nread);\n"
9526
9527 #. type: Plain text
9528 #: build/C/man2/open_by_handle_at.2:726
9529 msgid "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
9530 msgstr "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
9531
9532 #. type: Plain text
9533 #: build/C/man2/open_by_handle_at.2:736
9534 msgid ""
9535 "The I<libblkid> and I<libmount> documentation in the latest I<util-linux> "
9536 "release at E<.UR https://www.kernel.org/pub/linux/utils/util-linux/> E<.UE>"
9537 msgstr ""
9538
9539 #. type: TH
9540 #: build/C/man3/perror.3:31
9541 #, no-wrap
9542 msgid "PERROR"
9543 msgstr "PERROR"
9544
9545 #. type: Plain text
9546 #: build/C/man3/perror.3:34
9547 msgid "perror - print a system error message"
9548 msgstr "perror - システムエラーメッセージを出力する"
9549
9550 #. type: Plain text
9551 #: build/C/man3/perror.3:38
9552 msgid "B<void perror(const char *>I<s>B<);>"
9553 msgstr "B<void perror(const char *>I<s>B<);>"
9554
9555 #. type: Plain text
9556 #: build/C/man3/perror.3:40
9557 msgid "B<#include E<lt>errno.hE<gt>>"
9558 msgstr "B<#include E<lt>errno.hE<gt>>"
9559
9560 #. type: Plain text
9561 #: build/C/man3/perror.3:42
9562 msgid "B<const char * const >I<sys_errlist>B<[];>"
9563 msgstr "B<const char * const >I<sys_errlist>B<[];>"
9564
9565 #. type: Plain text
9566 #: build/C/man3/perror.3:44
9567 msgid "B<int >I<sys_nerr>B<;>"
9568 msgstr "B<int >I<sys_nerr>B<;>"
9569
9570 #. type: Plain text
9571 #: build/C/man3/perror.3:46
9572 msgid "B<int >I<errno>B<; /* Not really declared this way; see errno(3). */>"
9573 msgstr ""
9574 "B<int >I<errno>B<; /* 実際にこのように宣言されているわけではない。 errno(3) "
9575 "参照 */>"
9576
9577 #. type: Plain text
9578 #: build/C/man3/perror.3:55
9579 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
9580 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
9581
9582 #. type: Plain text
9583 #: build/C/man3/perror.3:68
9584 msgid ""
9585 "The routine B<perror>()  produces a message on the standard error output, "
9586 "describing the last error encountered during a call to a system or library "
9587 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
9588 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
9589 "blank.  Then the message and a new-line."
9590 msgstr ""
9591 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
9592 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
9593 "(I<s> が NULL でなく、 I<*s> がヌルバイト (\\(aq\\e0\\(aq) でない場合には) 引"
9594 "き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それからメッ"
9595 "セージと改行が出力される。"
9596
9597 #. type: Plain text
9598 #: build/C/man3/perror.3:76
9599 msgid ""
9600 "To be of most use, the argument string should include the name of the "
9601 "function that incurred the error.  The error number is taken from the "
9602 "external variable I<errno>, which is set when errors occur but not cleared "
9603 "when successful calls are made."
9604 msgstr ""
9605 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
9606 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
9607 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
9608
9609 #. type: Plain text
9610 #: build/C/man3/perror.3:90
9611 msgid ""
9612 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
9613 "obtain the error message without the newline.  The largest message number "
9614 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
9615 "this list because new error values may not have been added to "
9616 "I<sys_errlist>[].  The use of I<sys_errlist>[] is nowadays deprecated."
9617 msgstr ""
9618 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
9619 "の\n"
9620 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
9621 "ジ\n"
9622 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
9623 "と。\n"
9624 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
9625 "る。\n"
9626 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
9627
9628 #. type: Plain text
9629 #: build/C/man3/perror.3:111
9630 msgid ""
9631 "When a system call fails, it usually returns -1 and sets the variable "
9632 "I<errno> to a value describing what went wrong.  (These values can be found "
9633 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
9634 "B<perror>()  serves to translate this error code into human-readable form.  "
9635 "Note that I<errno> is undefined after a successful library call: this call "
9636 "may well change this variable, even though it succeeds, for example because "
9637 "it internally used some other library function that failed.  Thus, if a "
9638 "failing call is not immediately followed by a call to B<perror>(), the value "
9639 "of I<errno> should be saved."
9640 msgstr ""
9641 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
9642 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
9643 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
9644 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
9645 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
9646 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
9647 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
9648 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
9649 "い。"
9650
9651 #. type: Plain text
9652 #: build/C/man3/perror.3:124
9653 msgid ""
9654 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
9655 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
9656 "I<sys_errlist> conform to BSD."
9657 msgstr ""
9658 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
9659 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
9660 "に準拠している。"
9661
9662 #.  and only when _BSD_SOURCE is defined.
9663 #.  When
9664 #.  .B _GNU_SOURCE
9665 #.  is defined, the symbols
9666 #.  .I _sys_nerr
9667 #.  and
9668 #.  .I _sys_errlist
9669 #.  are provided.
9670 #. type: Plain text
9671 #: build/C/man3/perror.3:139
9672 msgid ""
9673 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
9674 "I<E<lt>stdio.hE<gt>>."
9675 msgstr ""
9676 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
9677 "I<E<lt>stdio.hE<gt>> に含まれている。"
9678
9679 #. type: Plain text
9680 #: build/C/man3/perror.3:144
9681 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
9682 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
9683
9684 #. type: TH
9685 #: build/C/man2/pipe.2:36
9686 #, no-wrap
9687 msgid "PIPE"
9688 msgstr "PIPE"
9689
9690 #. type: TH
9691 #: build/C/man2/pipe.2:36 build/C/man3/printf.3:34
9692 #, no-wrap
9693 msgid "2014-07-08"
9694 msgstr "2014-07-08"
9695
9696 #. type: Plain text
9697 #: build/C/man2/pipe.2:39
9698 msgid "pipe, pipe2 - create pipe"
9699 msgstr "pipe, pipe2 - パイプを生成する"
9700
9701 #. type: Plain text
9702 #: build/C/man2/pipe.2:44
9703 #, no-wrap
9704 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
9705 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
9706
9707 #. type: Plain text
9708 #: build/C/man2/pipe.2:48
9709 #, no-wrap
9710 msgid ""
9711 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
9712 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
9713 "B<#include E<lt>unistd.hE<gt>>\n"
9714 msgstr ""
9715 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
9716 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
9717 "B<#include E<lt>unistd.hE<gt>>\n"
9718
9719 #. type: Plain text
9720 #: build/C/man2/pipe.2:50
9721 #, no-wrap
9722 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
9723 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
9724
9725 #. type: Plain text
9726 #: build/C/man2/pipe.2:66
9727 msgid ""
9728 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
9729 "for interprocess communication.  The array I<pipefd> is used to return two "
9730 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
9731 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
9732 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
9733 "until it is read from the read end of the pipe.  For further details, see "
9734 "B<pipe>(7)."
9735 msgstr ""
9736 "B<pipe>()  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
9737 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
9738 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
9739 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
9740 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
9741 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
9742
9743 #. type: Plain text
9744 #: build/C/man2/pipe.2:76
9745 msgid ""
9746 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
9747 "values can be bitwise ORed in I<flags> to obtain different behavior:"
9748 msgstr ""
9749 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
9750 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
9751 "きる。"
9752
9753 #. type: TP
9754 #: build/C/man2/pipe.2:76
9755 #, no-wrap
9756 msgid "B<O_CLOEXEC>"
9757 msgstr "B<O_CLOEXEC>"
9758
9759 #. type: Plain text
9760 #: build/C/man2/pipe.2:84
9761 msgid ""
9762 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
9763 "descriptors.  See the description of the same flag in B<open>(2)  for "
9764 "reasons why this may be useful."
9765 msgstr ""
9766 "新しく生成される二つのファイルディスクリプタの close-on-exec "
9767 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
9768 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
9769
9770 #. type: TP
9771 #: build/C/man2/pipe.2:84
9772 #, no-wrap
9773 msgid "B<O_DIRECT> (since Linux 3.4)"
9774 msgstr "B<O_DIRECT> (Linux 3.4 以降)"
9775
9776 #.  commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
9777 #. type: Plain text
9778 #: build/C/man2/pipe.2:94
9779 msgid ""
9780 "Create a pipe that performs I/O in \"packet\" mode.  Each B<write>(2)  to "
9781 "the pipe is dealt with as a separate packet, and B<read>(2)s from the pipe "
9782 "will read one packet at a time.  Note the following points:"
9783 msgstr ""
9784 "「パケット」モードで入出力を行うパイプを作成する。 このパイプへの "
9785 "B<write>(2) それぞれが別のパケットとして扱われ、 このパイプからの B<read>(2) "
9786 "では一度に一つパケットが読み出される。 以下の点に注意すること。"
9787
9788 #. type: Plain text
9789 #: build/C/man2/pipe.2:105
9790 msgid ""
9791 "Writes of greater than B<PIPE_BUF> bytes (see B<pipe>(7))  will be split "
9792 "into multiple packets.  The constant B<PIPE_BUF> is defined in I<E<lt>limits."
9793 "hE<gt>>."
9794 msgstr ""
9795 "B<PIPE_BUF> バイト (B<pipe>(7) 参照) より大きいデータを書き込んだ場合、複数の"
9796 "パケットに分割される。\n"
9797 "定数 B<PIPE_BUF> は I<E<lt>limits.hE<gt>> で定義されている。"
9798
9799 #. type: Plain text
9800 #: build/C/man2/pipe.2:115
9801 msgid ""
9802 "If a B<read>(2)  specifies a buffer size that is smaller than the next "
9803 "packet, then the requested number of bytes are read, and the excess bytes in "
9804 "the packet are discarded.  Specifying a buffer size of B<PIPE_BUF> will be "
9805 "sufficient to read the largest possible packets (see the previous point)."
9806 msgstr ""
9807 "B<read>(2) で次のパケットよりも小さなバッファサイズを指定した場合、要求された"
9808 "バイト数のデータが読み出され、そのパケットの超過分のバイトは破棄される。 可能"
9809 "性のある最大サイズのパケットを読み出すには、B<PIPE_BUF> のバッファサイズを指"
9810 "定すれば十分である (上の項目を参照)。"
9811
9812 #. type: Plain text
9813 #: build/C/man2/pipe.2:120
9814 msgid ""
9815 "Zero-length packets are not supported.  (A B<read>(2)  that specifies a "
9816 "buffer size of zero is a no-op, and returns 0.)"
9817 msgstr ""
9818 "長さ 0 のパケットはサポートされていない。 (バッファサイズ 0 を指定した "
9819 "B<read>(2) は何も行わず 0 を返す)。"
9820
9821 #. type: Plain text
9822 #: build/C/man2/pipe.2:125
9823 msgid ""
9824 "Older kernels that do not support this flag will indicate this via an "
9825 "B<EINVAL> error."
9826 msgstr ""
9827 "このフラグをサポートしていない古いカーネルでは、エラー B<EINVAL> が返る。これ"
9828 "によりカーネルがサポートしていないことが分かる。"
9829
9830 #. type: TP
9831 #: build/C/man2/pipe.2:125
9832 #, no-wrap
9833 msgid "B<O_NONBLOCK>"
9834 msgstr "B<O_NONBLOCK>"
9835
9836 #. type: Plain text
9837 #: build/C/man2/pipe.2:133
9838 msgid ""
9839 "Set the B<O_NONBLOCK> file status flag on the two new open file "
9840 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
9841 "the same result."
9842 msgstr ""
9843 "新しく生成される二つのオープンファイル記述 (open file description) の "
9844 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
9845 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
9846 "なる。"
9847
9848 #. type: Plain text
9849 #: build/C/man2/pipe.2:143
9850 msgid "I<pipefd> is not valid."
9851 msgstr "I<pipefd> が無効な値である。"
9852
9853 #. type: Plain text
9854 #: build/C/man2/pipe.2:148
9855 msgid "(B<pipe2>())  Invalid value in I<flags>."
9856 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
9857
9858 #. type: Plain text
9859 #: build/C/man2/pipe.2:151
9860 msgid "Too many file descriptors are in use by the process."
9861 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
9862
9863 #. type: Plain text
9864 #: build/C/man2/pipe.2:159
9865 msgid ""
9866 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
9867 "starting with version 2.9."
9868 msgstr ""
9869 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
9870 "はバージョン 2.9 以降で利用できる。"
9871
9872 #. type: Plain text
9873 #: build/C/man2/pipe.2:162
9874 msgid "B<pipe>(): POSIX.1-2001."
9875 msgstr "B<pipe>(): POSIX.1-2001."
9876
9877 #. type: Plain text
9878 #: build/C/man2/pipe.2:165
9879 msgid "B<pipe2>()  is Linux-specific."
9880 msgstr "B<pipe2>()  は Linux 固有である。"
9881
9882 #.  fork.2 refers to this example program.
9883 #. type: Plain text
9884 #: build/C/man2/pipe.2:181
9885 msgid ""
9886 "The following program creates a pipe, and then B<fork>(2)s to create a child "
9887 "process; the child inherits a duplicate set of file descriptors that refer "
9888 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
9889 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
9890 "the string contained in the program's command-line argument to the pipe, and "
9891 "the child reads this string a byte at a time from the pipe and echoes it on "
9892 "standard output."
9893 msgstr ""
9894 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
9895 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
9896 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
9897 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
9898 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
9899 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
9900
9901 #. type: Plain text
9902 #: build/C/man2/pipe.2:189
9903 #, no-wrap
9904 msgid ""
9905 "#include E<lt>sys/types.hE<gt>\n"
9906 "#include E<lt>sys/wait.hE<gt>\n"
9907 "#include E<lt>stdio.hE<gt>\n"
9908 "#include E<lt>stdlib.hE<gt>\n"
9909 "#include E<lt>unistd.hE<gt>\n"
9910 "#include E<lt>string.hE<gt>\n"
9911 msgstr ""
9912 "#include E<lt>sys/types.hE<gt>\n"
9913 "#include E<lt>sys/wait.hE<gt>\n"
9914 "#include E<lt>stdio.hE<gt>\n"
9915 "#include E<lt>stdlib.hE<gt>\n"
9916 "#include E<lt>unistd.hE<gt>\n"
9917 "#include E<lt>string.hE<gt>\n"
9918
9919 #. type: Plain text
9920 #: build/C/man2/pipe.2:196
9921 #, no-wrap
9922 msgid ""
9923 "int\n"
9924 "main(int argc, char *argv[])\n"
9925 "{\n"
9926 "    int pipefd[2];\n"
9927 "    pid_t cpid;\n"
9928 "    char buf;\n"
9929 msgstr ""
9930 "int\n"
9931 "main(int argc, char *argv[])\n"
9932 "{\n"
9933 "    int pipefd[2];\n"
9934 "    pid_t cpid;\n"
9935 "    char buf;\n"
9936
9937 #. type: Plain text
9938 #: build/C/man2/pipe.2:201
9939 #, no-wrap
9940 msgid ""
9941 "    if (argc != 2) {\n"
9942 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
9943 "        exit(EXIT_FAILURE);\n"
9944 "    }\n"
9945 msgstr ""
9946 "    if (argc != 2) {\n"
9947 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
9948 "        exit(EXIT_FAILURE);\n"
9949 "    }\n"
9950
9951 #. type: Plain text
9952 #: build/C/man2/pipe.2:206
9953 #, no-wrap
9954 msgid ""
9955 "    if (pipe(pipefd) == -1) {\n"
9956 "        perror(\"pipe\");\n"
9957 "        exit(EXIT_FAILURE);\n"
9958 "    }\n"
9959 msgstr ""
9960 "    if (pipe(pipefd) == -1) {\n"
9961 "        perror(\"pipe\");\n"
9962 "        exit(EXIT_FAILURE);\n"
9963 "    }\n"
9964
9965 #. type: Plain text
9966 #: build/C/man2/pipe.2:212
9967 #, no-wrap
9968 msgid ""
9969 "    cpid = fork();\n"
9970 "    if (cpid == -1) {\n"
9971 "        perror(\"fork\");\n"
9972 "        exit(EXIT_FAILURE);\n"
9973 "    }\n"
9974 msgstr ""
9975 "    cpid = fork();\n"
9976 "    if (cpid == -1) {\n"
9977 "        perror(\"fork\");\n"
9978 "        exit(EXIT_FAILURE);\n"
9979 "    }\n"
9980
9981 #. type: Plain text
9982 #: build/C/man2/pipe.2:215
9983 #, no-wrap
9984 msgid ""
9985 "    if (cpid == 0) {    /* Child reads from pipe */\n"
9986 "        close(pipefd[1]);          /* Close unused write end */\n"
9987 msgstr ""
9988 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
9989 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
9990
9991 #. type: Plain text
9992 #: build/C/man2/pipe.2:218
9993 #, no-wrap
9994 msgid ""
9995 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
9996 "            write(STDOUT_FILENO, &buf, 1);\n"
9997 msgstr ""
9998 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
9999 "            write(STDOUT_FILENO, &buf, 1);\n"
10000
10001 #. type: Plain text
10002 #: build/C/man2/pipe.2:222
10003 #, no-wrap
10004 msgid ""
10005 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
10006 "        close(pipefd[0]);\n"
10007 "        _exit(EXIT_SUCCESS);\n"
10008 msgstr ""
10009 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
10010 "        close(pipefd[0]);\n"
10011 "        _exit(EXIT_SUCCESS);\n"
10012
10013 #. type: Plain text
10014 #: build/C/man2/pipe.2:231
10015 #, no-wrap
10016 msgid ""
10017 "    } else {            /* Parent writes argv[1] to pipe */\n"
10018 "        close(pipefd[0]);          /* Close unused read end */\n"
10019 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
10020 "        close(pipefd[1]);          /* Reader will see EOF */\n"
10021 "        wait(NULL);                /* Wait for child */\n"
10022 "        exit(EXIT_SUCCESS);\n"
10023 "    }\n"
10024 "}\n"
10025 msgstr ""
10026 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
10027 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
10028 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
10029 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
10030 "        wait(NULL);                /* 子プロセスを待つ */\n"
10031 "        exit(EXIT_SUCCESS);\n"
10032 "    }\n"
10033 "}\n"
10034
10035 #. type: Plain text
10036 #: build/C/man2/pipe.2:239
10037 msgid ""
10038 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), "
10039 "B<pipe>(7)"
10040 msgstr ""
10041 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), "
10042 "B<pipe>(7)"
10043
10044 #. type: TH
10045 #: build/C/man3/popen.3:40
10046 #, no-wrap
10047 msgid "POPEN"
10048 msgstr "POPEN"
10049
10050 #. type: Plain text
10051 #: build/C/man3/popen.3:43
10052 msgid "popen, pclose - pipe stream to or from a process"
10053 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
10054
10055 #. type: Plain text
10056 #: build/C/man3/popen.3:48
10057 #, no-wrap
10058 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
10059 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
10060
10061 #. type: Plain text
10062 #: build/C/man3/popen.3:50
10063 #, no-wrap
10064 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
10065 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
10066
10067 #. type: Plain text
10068 #: build/C/man3/popen.3:60
10069 msgid "B<popen>(), B<pclose>():"
10070 msgstr "B<popen>(), B<pclose>():"
10071
10072 #. type: Plain text
10073 #: build/C/man3/popen.3:62
10074 msgid ""
10075 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
10076 msgstr ""
10077 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
10078
10079 #. type: Plain text
10080 #: build/C/man3/popen.3:73
10081 msgid ""
10082 "The B<popen>()  function opens a process by creating a pipe, forking, and "
10083 "invoking the shell.  Since a pipe is by definition unidirectional, the "
10084 "I<type> argument may specify only reading or writing, not both; the "
10085 "resulting stream is correspondingly read-only or write-only."
10086 msgstr ""
10087 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
10088 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
10089 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
10090 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
10091 "たは 書き込み専用のいずれかとなる。"
10092
10093 #. type: Plain text
10094 #: build/C/man3/popen.3:97
10095 msgid ""
10096 "The I<command> argument is a pointer to a null-terminated string containing "
10097 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
10098 "flag; interpretation, if any, is performed by the shell.  The I<type> "
10099 "argument is a pointer to a null-terminated string which must contain either "
10100 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
10101 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
10102 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
10103 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
10104 "B<open>(2)  for reasons why this may be useful."
10105 msgstr ""
10106 "I<command> 引き数は、シェルのコマンドラインを含むヌル終端された文字列へのポイ"
10107 "ンタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コマ"
10108 "ンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、ヌル"
10109 "終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き込み"
10110 "を示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc 2.9 以"
10111 "降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe\\(aq を"
10112 "指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec フラグ "
10113 "(B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 B<open>(2)  "
10114 "の B<O_CLOEXEC> フラグの説明を参照のこと。"
10115
10116 #. type: Plain text
10117 #: build/C/man3/popen.3:113
10118 msgid ""
10119 "The return value from B<popen>()  is a normal standard I/O stream in all "
10120 "respects save that it must be closed with B<pclose>()  rather than "
10121 "B<fclose>(3).  Writing to such a stream writes to the standard input of the "
10122 "command; the command's standard output is the same as that of the process "
10123 "that called B<popen>(), unless this is altered by the command itself.  "
10124 "Conversely, reading from the stream reads the command's standard output, and "
10125 "the command's standard input is the same as that of the process that called "
10126 "B<popen>()."
10127 msgstr ""
10128 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
10129 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
10130 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
10131 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 "
10132 "B<popen>()  を呼んだプロセスの標準出力と同じことになる。 逆に、 ストリームか"
10133 "らの読み込みは、 そのコマンドの標準出力を読み込むことになる。 そして、そのコ"
10134 "マンドの標準入力は B<popen>()  を呼んだプロセスの標準入力と同一である。"
10135
10136 #. type: Plain text
10137 #: build/C/man3/popen.3:117
10138 msgid "Note that output B<popen>()  streams are fully buffered by default."
10139 msgstr ""
10140 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
10141 "に注意しよう。"
10142
10143 #. type: Plain text
10144 #: build/C/man3/popen.3:123
10145 msgid ""
10146 "The B<pclose>()  function waits for the associated process to terminate and "
10147 "returns the exit status of the command as returned by B<wait4>(2)."
10148 msgstr ""
10149 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
10150 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
10151
10152 #. type: Plain text
10153 #: build/C/man3/popen.3:131
10154 msgid ""
10155 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
10156 "calls fail, or if it cannot allocate memory."
10157 msgstr ""
10158 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
10159 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
10160
10161 #.  These conditions actually give undefined results, so I commented
10162 #.  them out.
10163 #.  .I stream
10164 #.  is not associated with a "popen()ed" command, if
10165 #. .I stream
10166 #.  already "pclose()d", or if
10167 #. type: Plain text
10168 #: build/C/man3/popen.3:146
10169 msgid ""
10170 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
10171 "some other error is detected.  In the event of an error, these functions set "
10172 "I<errno> to indicate the cause of the error."
10173 msgstr ""
10174 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
10175 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
10176 "る。"
10177
10178 #. type: Plain text
10179 #: build/C/man3/popen.3:165
10180 msgid ""
10181 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
10182 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
10183 "appropriately.  If the I<type> argument is invalid, and this condition is "
10184 "detected, I<errno> is set to B<EINVAL>."
10185 msgstr ""
10186 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
10187 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
10188 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
10189 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
10190
10191 #. type: Plain text
10192 #: build/C/man3/popen.3:172
10193 msgid ""
10194 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
10195 msgstr ""
10196 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
10197 "B<ECHILD> にセットされる。"
10198
10199 #. type: Plain text
10200 #: build/C/man3/popen.3:178
10201 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
10202 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
10203
10204 #. type: Plain text
10205 #: build/C/man3/popen.3:191
10206 msgid ""
10207 "Since the standard input of a command opened for reading shares its seek "
10208 "offset with the process that called B<popen>(), if the original process has "
10209 "done a buffered read, the command's input position may not be as expected.  "
10210 "Similarly, the output from a command opened for writing may become "
10211 "intermingled with that of the original process.  The latter can be avoided "
10212 "by calling B<fflush>(3)  before B<popen>()."
10213 msgstr ""
10214 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
10215 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
10216 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
10217 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
10218 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
10219 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
10220
10221 #.  .SH HISTORY
10222 #.  A
10223 #.  .BR popen ()
10224 #.  and a
10225 #.  .BR pclose ()
10226 #.  function appeared in Version 7 AT&T UNIX.
10227 #. type: Plain text
10228 #: build/C/man3/popen.3:201
10229 msgid ""
10230 "Failure to execute the shell is indistinguishable from the shell's failure "
10231 "to execute command, or an immediate exit of the command.  The only hint is "
10232 "an exit status of 127."
10233 msgstr ""
10234 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
10235 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
10236 "なることである。"
10237
10238 #. type: Plain text
10239 #: build/C/man3/popen.3:211
10240 msgid ""
10241 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
10242 "B<fopen>(3), B<stdio>(3), B<system>(3)"
10243 msgstr ""
10244 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
10245 "B<fopen>(3), B<stdio>(3), B<system>(3)"
10246
10247 #. type: TH
10248 #: build/C/man3/printf.3:34
10249 #, no-wrap
10250 msgid "PRINTF"
10251 msgstr "PRINTF"
10252
10253 #. type: Plain text
10254 #: build/C/man3/printf.3:38
10255 msgid ""
10256 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
10257 "formatted output conversion"
10258 msgstr ""
10259 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
10260 "指定された書式に変換して出力を行う"
10261
10262 #. type: Plain text
10263 #: build/C/man3/printf.3:42
10264 msgid "B<int printf(const char *>I<format>B<, ...);>"
10265 msgstr "B<int printf(const char *>I<format>B<, ...);>"
10266
10267 #. type: Plain text
10268 #: build/C/man3/printf.3:44
10269 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
10270 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
10271
10272 #. type: Plain text
10273 #: build/C/man3/printf.3:46
10274 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
10275 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
10276
10277 #. type: Plain text
10278 #: build/C/man3/printf.3:48
10279 msgid ""
10280 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10281 "*>I<format>B<, ...);>"
10282 msgstr ""
10283 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10284 "*>I<format>B<, ...);>"
10285
10286 #. type: Plain text
10287 #: build/C/man3/printf.3:50
10288 msgid "B<#include E<lt>stdarg.hE<gt>>"
10289 msgstr "B<#include E<lt>stdarg.hE<gt>>"
10290
10291 #. type: Plain text
10292 #: build/C/man3/printf.3:52
10293 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
10294 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
10295
10296 #. type: Plain text
10297 #: build/C/man3/printf.3:54
10298 msgid ""
10299 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
10300 ">I<ap>B<);>"
10301 msgstr ""
10302 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
10303 ">I<ap>B<);>"
10304
10305 #. type: Plain text
10306 #: build/C/man3/printf.3:56
10307 msgid ""
10308 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
10309 msgstr ""
10310 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
10311
10312 #. type: Plain text
10313 #: build/C/man3/printf.3:59
10314 msgid ""
10315 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10316 "*>I<format>B<, va_list >I<ap>B<);>"
10317 msgstr ""
10318 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10319 "*>I<format>B<, va_list >I<ap>B<);>"
10320
10321 #. type: Plain text
10322 #: build/C/man3/printf.3:68
10323 msgid "B<snprintf>(), B<vsnprintf>():"
10324 msgstr "B<snprintf>(), B<vsnprintf>():"
10325
10326 #. type: Plain text
10327 #: build/C/man3/printf.3:71
10328 msgid ""
10329 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
10330 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
10331 msgstr ""
10332 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
10333 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
10334
10335 #. type: Plain text
10336 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
10337 msgid "or I<cc -std=c99>"
10338 msgstr "または I<cc -std=c99>"
10339
10340 #. type: Plain text
10341 #: build/C/man3/printf.3:101
10342 msgid ""
10343 "The functions in the B<printf>()  family produce output according to a "
10344 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
10345 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
10346 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
10347 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
10348 "string I<str>."
10349 msgstr ""
10350 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
10351 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
10352 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
10353 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
10354 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
10355
10356 #. type: Plain text
10357 #: build/C/man3/printf.3:110
10358 msgid ""
10359 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
10360 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
10361 msgstr ""
10362 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
10363 "む (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) もを含まれる)。"
10364
10365 #. type: Plain text
10366 #: build/C/man3/printf.3:134
10367 msgid ""
10368 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
10369 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
10370 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
10371 "instead of a variable number of arguments.  These functions do not call the "
10372 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
10373 "I<ap> is undefined after the call.  See B<stdarg>(3)."
10374 msgstr ""
10375 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
10376 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
10377 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
10378 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
10379 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 "
10380 "B<stdarg>(3)  を参照のこと。"
10381
10382 #. type: Plain text
10383 #: build/C/man3/printf.3:141
10384 msgid ""
10385 "These eight functions write the output under the control of a I<format> "
10386 "string that specifies how subsequent arguments (or arguments accessed via "
10387 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
10388 "output."
10389 msgstr ""
10390 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
10391 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
10392 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
10393
10394 #. type: Plain text
10395 #: build/C/man3/printf.3:152
10396 msgid ""
10397 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
10398 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
10399 "copying to take place between objects that overlap (e.g., if the target "
10400 "string array and one of the supplied input arguments refer to the same "
10401 "buffer).  See NOTES."
10402 msgstr ""
10403 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
10404 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
10405 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
10406 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
10407 "照。"
10408
10409 #. type: SS
10410 #: build/C/man3/printf.3:152
10411 #, no-wrap
10412 msgid "Return value"
10413 msgstr "Return Values"
10414
10415 #. type: Plain text
10416 #: build/C/man3/printf.3:155
10417 msgid ""
10418 "Upon successful return, these functions return the number of characters "
10419 "printed (excluding the null byte used to end output to strings)."
10420 msgstr ""
10421 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
10422 "用するヌルバイトは数に含まれない)。"
10423
10424 #. type: Plain text
10425 #: build/C/man3/printf.3:171
10426 msgid ""
10427 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
10428 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
10429 "the output was truncated due to this limit, then the return value is the "
10430 "number of characters (excluding the terminating null byte)  which would have "
10431 "been written to the final string if enough space had been available.  Thus, "
10432 "a return value of I<size> or more means that the output was truncated.  (See "
10433 "also below under NOTES.)"
10434 msgstr ""
10435 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
10436 "ない (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) も含まれる)。 "
10437 "この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれば書き"
10438 "込まれたであろう文字の個数 (文字列を終端するヌルバイトを除く) を返す。 従っ"
10439 "て、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味する (後述"
10440 "の注意も参照のこと)。"
10441
10442 #. type: Plain text
10443 #: build/C/man3/printf.3:173
10444 msgid "If an output error is encountered, a negative value is returned."
10445 msgstr "エラーが発生した場合は、負の数を返す。"
10446
10447 #. type: SS
10448 #: build/C/man3/printf.3:173
10449 #, no-wrap
10450 msgid "Format of the format string"
10451 msgstr "フォーマット文字列のフォーマット"
10452
10453 #. type: Plain text
10454 #: build/C/man3/printf.3:195
10455 msgid ""
10456 "The format string is a character string, beginning and ending in its initial "
10457 "shift state, if any.  The format string is composed of zero or more "
10458 "directives: ordinary characters (not B<%>), which are copied unchanged to "
10459 "the output stream; and conversion specifications, each of which results in "
10460 "fetching zero or more subsequent arguments.  Each conversion specification "
10461 "is introduced by the character B<%>, and ends with a I<conversion "
10462 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
10463 "an optional minimum I<field width>, an optional I<precision> and an optional "
10464 "I<length modifier>."
10465 msgstr ""
10466 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
10467 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
10468 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
10469 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
10470 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
10471 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
10472 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
10473 "子> を (この順序で) 置くことができる。"
10474
10475 #. type: Plain text
10476 #: build/C/man3/printf.3:208
10477 msgid ""
10478 "The arguments must correspond properly (after type promotion) with the "
10479 "conversion specifier.  By default, the arguments are used in the order "
10480 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
10481 "next argument (and it is an error if insufficiently many arguments are "
10482 "given).  One can also specify explicitly which argument is taken, at each "
10483 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
10484 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
10485 "denotes the position in the argument list of the desired argument, indexed "
10486 "starting from 1.  Thus,"
10487 msgstr ""
10488 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
10489 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
10490 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
10491 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
10492 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
10493 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
10494 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
10495
10496 #. type: Plain text
10497 #: build/C/man3/printf.3:212
10498 #, no-wrap
10499 msgid "printf(\"%*d\", width, num);\n"
10500 msgstr "printf(\"%*d\", width, num);\n"
10501
10502 #. type: Plain text
10503 #: build/C/man3/printf.3:216
10504 msgid "and"
10505 msgstr "と"
10506
10507 #. type: Plain text
10508 #: build/C/man3/printf.3:220
10509 #, no-wrap
10510 msgid "printf(\"%2$*1$d\", width, num);\n"
10511 msgstr "printf(\"%2$*1$d\", width, num);\n"
10512
10513 #. type: Plain text
10514 #: build/C/man3/printf.3:236
10515 msgid ""
10516 "are equivalent.  The second style allows repeated references to the same "
10517 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
10518 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
10519 "\\(aq is used, it must be used throughout for all conversions taking an "
10520 "argument and all width and precision arguments, but it may be mixed with \"%%"
10521 "\" formats which do not consume an argument.  There may be no gaps in the "
10522 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
10523 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
10524 "format string."
10525 msgstr ""
10526 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
10527 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
10528 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
10529 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
10530 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
10531 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
10532 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
10533
10534 #. type: Plain text
10535 #: build/C/man3/printf.3:246
10536 msgid ""
10537 "For some numeric conversions a radix character (\"decimal point\") or "
10538 "thousands' grouping character is used.  The actual character used depends on "
10539 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
10540 "radix character, and does not have a grouping character.  Thus,"
10541 msgstr ""
10542 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
10543 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
10544 "\\(aq を用い、 区切り文字は使わない。 従って、"
10545
10546 #. type: Plain text
10547 #: build/C/man3/printf.3:250
10548 #, no-wrap
10549 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
10550 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
10551
10552 #. type: Plain text
10553 #: build/C/man3/printf.3:255
10554 msgid ""
10555 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
10556 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
10557 msgstr ""
10558 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
10559 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
10560
10561 #. type: SS
10562 #: build/C/man3/printf.3:255
10563 #, no-wrap
10564 msgid "The flag characters"
10565 msgstr "フラグ文字"
10566
10567 #. type: Plain text
10568 #: build/C/man3/printf.3:257
10569 msgid "The character % is followed by zero or more of the following flags:"
10570 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
10571
10572 #. type: TP
10573 #: build/C/man3/printf.3:257
10574 #, no-wrap
10575 msgid "B<#>"
10576 msgstr "B<#>"
10577
10578 #. type: Plain text
10579 #: build/C/man3/printf.3:291
10580 msgid ""
10581 "The value should be converted to an \"alternate form\".  For B<o> "
10582 "conversions, the first character of the output string is made zero (by "
10583 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
10584 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
10585 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
10586 "conversions, the result will always contain a decimal point, even if no "
10587 "digits follow it (normally, a decimal point appears in the results of those "
10588 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
10589 "trailing zeros are not removed from the result as they would otherwise be.  "
10590 "For other conversions, the result is undefined."
10591 msgstr ""
10592 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
10593 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
10594 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
10595 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
10596 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
10597 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
10598 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
10599 "変換では、結果は未定義である。"
10600
10601 #. type: TP
10602 #: build/C/man3/printf.3:291
10603 #, no-wrap
10604 msgid "B<\\&0>"
10605 msgstr "B<\\&0>"
10606
10607 #. type: Plain text
10608 #: build/C/man3/printf.3:331
10609 msgid ""
10610 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
10611 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
10612 "converted value is padded on the left with zeros rather than blanks.  If the "
10613 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
10614 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
10615 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
10616 "is undefined."
10617 msgstr ""
10618 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
10619 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
10620 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
10621 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
10622 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
10623 "である。"
10624
10625 #. type: TP
10626 #: build/C/man3/printf.3:331
10627 #, no-wrap
10628 msgid "B<->"
10629 msgstr "B<->"
10630
10631 #. type: Plain text
10632 #: build/C/man3/printf.3:342
10633 msgid ""
10634 "The converted value is to be left adjusted on the field boundary.  (The "
10635 "default is right justification.)  The converted value is padded on the right "
10636 "with blanks, rather than on the left with blanks or zeros.  A B<-> overrides "
10637 "a B<\\&0> if both are given."
10638 msgstr ""
10639 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 変換された"
10640 "値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> と B<\\&0> の両方が"
10641 "指定された場合には、 B<-> が優先される。"
10642
10643 #. type: TP
10644 #: build/C/man3/printf.3:342
10645 #, no-wrap
10646 msgid "B<\\(aq \\(aq>"
10647 msgstr "B<' '>"
10648
10649 #. type: Plain text
10650 #: build/C/man3/printf.3:346
10651 msgid ""
10652 "(a space) A blank should be left before a positive number (or empty string) "
10653 "produced by a signed conversion."
10654 msgstr ""
10655 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
10656 "列) が置かれる。"
10657
10658 #. type: TP
10659 #: build/C/man3/printf.3:346
10660 #, no-wrap
10661 msgid "B<+>"
10662 msgstr "B<+>"
10663
10664 #. type: Plain text
10665 #: build/C/man3/printf.3:354
10666 msgid ""
10667 "A sign (+ or -) should always be placed before a number produced by a signed "
10668 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
10669 "overrides a space if both are used."
10670 msgstr ""
10671 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
10672 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
10673 "が使われている場合には、 B<+> が優先される。"
10674
10675 #. type: Plain text
10676 #: build/C/man3/printf.3:357
10677 msgid ""
10678 "The five flag characters above are defined in the C99 standard.  The Single "
10679 "UNIX Specification specifies one further flag character."
10680 msgstr ""
10681 "上記の 5 つのフラグは C99 標準で定義されている。 Single UNIX Specified では、"
10682 "さらにもう一つフラグ文字が規定されている。"
10683
10684 #. type: TP
10685 #: build/C/man3/printf.3:357
10686 #, no-wrap
10687 msgid "B<\\(aq>"
10688 msgstr "B<\\(aq>"
10689
10690 #. type: Plain text
10691 #: build/C/man3/printf.3:374
10692 msgid ""
10693 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
10694 "output is to be grouped with thousands' grouping characters if the locale "
10695 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
10696 "parse this option and will issue a warning.  (SUSv2 did not include I<%"
10697 "\\(aqF>, but SUSv3 added it.)"
10698 msgstr ""
10699 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
10700 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
10701 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 "
10702 "(I<%\\(aqF> は SUSv2 には含まれていなかったが、 SUSv3 で追加された。"
10703
10704 #. type: Plain text
10705 #: build/C/man3/printf.3:376
10706 msgid "glibc 2.2 adds one further flag character."
10707 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
10708
10709 #. type: TP
10710 #: build/C/man3/printf.3:376
10711 #, no-wrap
10712 msgid "B<I>"
10713 msgstr "B<I>"
10714
10715 #.  outdigits keyword in locale file
10716 #. type: Plain text
10717 #: build/C/man3/printf.3:386
10718 msgid ""
10719 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
10720 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
10721 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
10722 msgstr ""
10723 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
10724 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
10725 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
10726
10727 #. type: SS
10728 #: build/C/man3/printf.3:386
10729 #, no-wrap
10730 msgid "The field width"
10731 msgstr "フィールド幅"
10732
10733 #. type: Plain text
10734 #: build/C/man3/printf.3:402
10735 msgid ""
10736 "An optional decimal digit string (with nonzero first digit) specifying a "
10737 "minimum field width.  If the converted value has fewer characters than the "
10738 "field width, it will be padded with spaces on the left (or right, if the "
10739 "left-adjustment flag has been given).  Instead of a decimal digit string one "
10740 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
10741 "the field width is given in the next argument, or in the I<m>-th argument, "
10742 "respectively, which must be of type I<int>.  A negative field width is taken "
10743 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
10744 "nonexistent or small field width cause truncation of a field; if the result "
10745 "of a conversion is wider than the field width, the field is expanded to "
10746 "contain the conversion result."
10747 msgstr ""
10748 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
10749 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
10750 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
10751 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
10752 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
10753 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
10754 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
10755 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
10756 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
10757 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
10758
10759 #. type: SS
10760 #: build/C/man3/printf.3:402
10761 #, no-wrap
10762 msgid "The precision"
10763 msgstr "精度"
10764
10765 #. type: Plain text
10766 #: build/C/man3/printf.3:439
10767 msgid ""
10768 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
10769 "optional decimal digit string.  Instead of a decimal digit string one may "
10770 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
10771 "precision is given in the next argument, or in the m-th argument, "
10772 "respectively, which must be of type I<int>.  If the precision is given as "
10773 "just \\(aq.\\(aq, the precision is taken to be zero.  A negative precision "
10774 "is taken as if the precision were omitted.  This gives the minimum number of "
10775 "digits to appear for B<d>, B<i>, B<o>, B<u>, B<x>, and B<X> conversions, the "
10776 "number of digits to appear after the radix character for B<a>, B<A>, B<e>, "
10777 "B<E>, B<f>, and B<F> conversions, the maximum number of significant digits "
10778 "for B<g> and B<G> conversions, or the maximum number of characters to be "
10779 "printed from a string for B<s> and B<S> conversions."
10780 msgstr ""
10781 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
10782 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
10783 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
10784 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
10785 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定された場合、 精度は"
10786 "ゼロとみなされる。 精度が負の数だった場合、 精度は指定されなかったものとみな"
10787 "される。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換では、表示される最小の桁数を"
10788 "指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> 変換では、小数点以下に表示され"
10789 "る数字の桁数を指定する。 B<g> と B<G> 変換では、有効数字の最大桁数を指定す"
10790 "る。 B<s> と B<S> 変換では、文字列から出力される最大文字数を指定する。"
10791
10792 #. type: SS
10793 #: build/C/man3/printf.3:439
10794 #, no-wrap
10795 msgid "The length modifier"
10796 msgstr "長さ修飾子"
10797
10798 #. type: Plain text
10799 #: build/C/man3/printf.3:449
10800 msgid ""
10801 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
10802 "B<X> conversion."
10803 msgstr ""
10804 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
10805
10806 #. type: TP
10807 #: build/C/man3/printf.3:449 build/C/man3/scanf.3:294
10808 #, no-wrap
10809 msgid "B<hh>"
10810 msgstr "B<hh>"
10811
10812 #. type: Plain text
10813 #: build/C/man3/printf.3:460
10814 msgid ""
10815 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
10816 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
10817 "I<signed char> argument."
10818 msgstr ""
10819 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
10820 "に対応する引き数が I<signed char> へのポインタであることを示す。"
10821
10822 #. type: TP
10823 #: build/C/man3/printf.3:460 build/C/man3/scanf.3:284
10824 #, no-wrap
10825 msgid "B<h>"
10826 msgstr "B<h>"
10827
10828 #. type: Plain text
10829 #: build/C/man3/printf.3:471
10830 msgid ""
10831 "A following integer conversion corresponds to a I<short int> or I<unsigned "
10832 "short int> argument, or a following B<n> conversion corresponds to a pointer "
10833 "to a I<short int> argument."
10834 msgstr ""
10835 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
10836 "換に対応する引き数が I<short int> へのポインタであることを示す。"
10837
10838 #. type: TP
10839 #: build/C/man3/printf.3:471 build/C/man3/scanf.3:311
10840 #, no-wrap
10841 msgid "B<l>"
10842 msgstr "B<l>"
10843
10844 #. type: Plain text
10845 #: build/C/man3/printf.3:490
10846 msgid ""
10847 "(ell) A following integer conversion corresponds to a I<long int> or "
10848 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
10849 "a pointer to a I<long int> argument, or a following B<c> conversion "
10850 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
10851 "corresponds to a pointer to I<wchar_t> argument."
10852 msgstr ""
10853 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
10854 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
10855 "変換では I<wchar_t> へのポインタであることを示す。"
10856
10857 #. type: TP
10858 #: build/C/man3/printf.3:490
10859 #, no-wrap
10860 msgid "B<ll>"
10861 msgstr "B<ll> (エルエル)"
10862
10863 #. type: Plain text
10864 #: build/C/man3/printf.3:502
10865 msgid ""
10866 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
10867 "or I<unsigned long long int> argument, or a following B<n> conversion "
10868 "corresponds to a pointer to a I<long long int> argument."
10869 msgstr ""
10870 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
10871 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
10872
10873 #. type: TP
10874 #: build/C/man3/printf.3:502 build/C/man3/scanf.3:338
10875 #, no-wrap
10876 msgid "B<L>"
10877 msgstr "B<L>"
10878
10879 #.  .TP
10880 #.  .B q
10881 #.  ("quad". 4.4BSD and Linux libc5 only.
10882 #.  Don't use.)
10883 #. type: Plain text
10884 #: build/C/man3/printf.3:524
10885 msgid ""
10886 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
10887 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
10888 "not.)  This is a synonym for B<ll>."
10889 msgstr ""
10890 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
10891 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
10892 "認められていない。) これは B<ll> の同義語である。"
10893
10894 #. type: TP
10895 #: build/C/man3/printf.3:524 build/C/man3/scanf.3:302
10896 #, no-wrap
10897 msgid "B<j>"
10898 msgstr "B<j>"
10899
10900 #. type: Plain text
10901 #: build/C/man3/printf.3:535
10902 #, fuzzy
10903 #| msgid ""
10904 #| "A following integer conversion corresponds to a I<short int> or "
10905 #| "I<unsigned short int> argument, or a following B<n> conversion "
10906 #| "corresponds to a pointer to a I<short int> argument."
10907 msgid ""
10908 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
10909 "argument, or a following B<n> conversion corresponds to a pointer to an "
10910 "I<intmax_t> argument."
10911 msgstr ""
10912 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
10913 "換に対応する引き数が I<short int> へのポインタであることを示す。"
10914
10915 #. type: TP
10916 #: build/C/man3/printf.3:535 build/C/man3/scanf.3:366
10917 #, no-wrap
10918 msgid "B<z>"
10919 msgstr "B<z>"
10920
10921 #.  (Linux libc5 has
10922 #.  .B Z
10923 #.  with this meaning.
10924 #.  Don't use it.)
10925 #. type: Plain text
10926 #: build/C/man3/printf.3:550
10927 #, fuzzy
10928 #| msgid ""
10929 #| "A following integer conversion corresponds to a I<short int> or "
10930 #| "I<unsigned short int> argument, or a following B<n> conversion "
10931 #| "corresponds to a pointer to a I<short int> argument."
10932 msgid ""
10933 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
10934 "argument, or a following B<n> conversion corresponds to a pointer to a "
10935 "I<size_t> argument."
10936 msgstr ""
10937 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
10938 "換に対応する引き数が I<short int> へのポインタであることを示す。"
10939
10940 #. type: TP
10941 #: build/C/man3/printf.3:550 build/C/man3/scanf.3:359
10942 #, no-wrap
10943 msgid "B<t>"
10944 msgstr "B<t>"
10945
10946 #. type: Plain text
10947 #: build/C/man3/printf.3:559
10948 #, fuzzy
10949 #| msgid ""
10950 #| "A following integer conversion corresponds to a I<short int> or "
10951 #| "I<unsigned short int> argument, or a following B<n> conversion "
10952 #| "corresponds to a pointer to a I<short int> argument."
10953 msgid ""
10954 "A following integer conversion corresponds to a I<ptrdiff_t> argument, or a "
10955 "following B<n> conversion corresponds to a pointer to a I<ptrdiff_t> "
10956 "argument."
10957 msgstr ""
10958 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
10959 "換に対応する引き数が I<short int> へのポインタであることを示す。"
10960
10961 #. type: Plain text
10962 #: build/C/man3/printf.3:589
10963 msgid ""
10964 "SUSv3 specifies all of the above.  SUSv2 specified only the length modifiers "
10965 "B<h> (in B<hd>, B<hi>, B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, "
10966 "B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, "
10967 "B<Lf>, B<Lg>, B<LG>)."
10968 msgstr ""
10969 "SUSv3 では上記のすべてが規定されている。 SUSv2 で規定されていたのは、 長さ修"
10970 "飾子 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, B<hX>, B<hn>), B<l> (B<ld>, B<li>, "
10971 "B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, "
10972 "B<LG>)  だけであった。"
10973
10974 #. type: SS
10975 #: build/C/man3/printf.3:589
10976 #, no-wrap
10977 msgid "The conversion specifier"
10978 msgstr "変換指定子"
10979
10980 #. type: Plain text
10981 #: build/C/man3/printf.3:592
10982 msgid ""
10983 "A character that specifies the type of conversion to be applied.  The "
10984 "conversion specifiers and their meanings are:"
10985 msgstr ""
10986 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
10987
10988 #. type: TP
10989 #: build/C/man3/printf.3:592
10990 #, no-wrap
10991 msgid "B<d>, B<i>"
10992 msgstr "B<d>, B<i>"
10993
10994 #. type: Plain text
10995 #: build/C/man3/printf.3:602
10996 msgid ""
10997 "The I<int> argument is converted to signed decimal notation.  The precision, "
10998 "if any, gives the minimum number of digits that must appear; if the "
10999 "converted value requires fewer digits, it is padded on the left with zeros.  "
11000 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
11001 "the output is empty."
11002 msgstr ""
11003 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
11004 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
11005 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
11006 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
11007
11008 #. type: TP
11009 #: build/C/man3/printf.3:602
11010 #, no-wrap
11011 msgid "B<o>, B<u>, B<x>, B<X>"
11012 msgstr "B<o>, B<u>, B<x>, B<X>"
11013
11014 #. type: Plain text
11015 #: build/C/man3/printf.3:629
11016 msgid ""
11017 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
11018 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
11019 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
11020 "used for B<X> conversions.  The precision, if any, gives the minimum number "
11021 "of digits that must appear; if the converted value requires fewer digits, it "
11022 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
11023 "printed with an explicit precision 0, the output is empty."
11024 msgstr ""
11025 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
11026 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
11027 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
11028 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
11029 "られる。"
11030
11031 #. type: TP
11032 #: build/C/man3/printf.3:629
11033 #, no-wrap
11034 msgid "B<e>, B<E>"
11035 msgstr "B<e>, B<E>"
11036
11037 #. type: Plain text
11038 #: build/C/man3/printf.3:648
11039 msgid ""
11040 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
11041 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
11042 "and the number of digits after it is equal to the precision; if the "
11043 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
11044 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
11045 "than B<e>)  to introduce the exponent.  The exponent always contains at "
11046 "least two digits; if the value is zero, the exponent is 00."
11047 msgstr ""
11048 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
11049 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
11050 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
11051 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
11052 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
11053 "指数の値が 0 の場合には、00 と表示される。"
11054
11055 #. type: TP
11056 #: build/C/man3/printf.3:648
11057 #, no-wrap
11058 msgid "B<f>, B<F>"
11059 msgstr "B<f>, B<F>"
11060
11061 #. type: Plain text
11062 #: build/C/man3/printf.3:659
11063 msgid ""
11064 "The I<double> argument is rounded and converted to decimal notation in the "
11065 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
11066 "character is equal to the precision specification.  If the precision is "
11067 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
11068 "point character appears.  If a decimal point appears, at least one digit "
11069 "appears before it."
11070 msgstr ""
11071 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
11072 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
11073 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
11074 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
11075
11076 #. type: Plain text
11077 #: build/C/man3/printf.3:672
11078 #, fuzzy
11079 #| msgid ""
11080 #| "(The SUSv2 does not know about B<F> and says that character string "
11081 #| "representations for infinity and NaN may be made available.  The C99 "
11082 #| "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a "
11083 #| "string starting with \"nan\" for NaN, in the case of B<f> conversion, and "
11084 #| "\"[-]INF\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
11085 msgid ""
11086 "(SUSv2 does not know about B<F> and says that character string "
11087 "representations for infinity and NaN may be made available.  SUSv3 adds a "
11088 "specification for B<F>.  The C99 standard specifies \"[-]inf\" or "
11089 "\"[-]infinity\" for infinity, and a string starting with \"nan\" for NaN, in "
11090 "the case of B<f> conversion, and \"[-]INF\" or \"[-]INFINITY\" or \"NAN*\" "
11091 "in the case of B<F> conversion.)"
11092 msgstr ""
11093 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
11094 "行ってもよいことになっている。\n"
11095 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
11096 "し、\n"
11097 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
11098 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
11099
11100 #. type: TP
11101 #: build/C/man3/printf.3:672
11102 #, no-wrap
11103 msgid "B<g>, B<G>"
11104 msgstr "B<g>, B<G>"
11105
11106 #. type: Plain text
11107 #: build/C/man3/printf.3:697
11108 msgid ""
11109 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
11110 "for B<G> conversions).  The precision specifies the number of significant "
11111 "digits.  If the precision is missing, 6 digits are given; if the precision "
11112 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
11113 "conversion is less than -4 or greater than or equal to the precision.  "
11114 "Trailing zeros are removed from the fractional part of the result; a decimal "
11115 "point appears only if it is followed by at least one digit."
11116 msgstr ""
11117 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
11118 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
11119 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
11120 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
11121 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
11122 "一つある場合にだけである。"
11123
11124 #. type: TP
11125 #: build/C/man3/printf.3:697
11126 #, no-wrap
11127 msgid "B<a>, B<A>"
11128 msgstr "B<a>, B<A>"
11129
11130 #. type: Plain text
11131 #: build/C/man3/printf.3:722
11132 #, fuzzy
11133 #| msgid ""
11134 #| "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is "
11135 #| "converted to hexadecimal notation (using the letters abcdef)  in the "
11136 #| "style [-]B<0x>hB<\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix "
11137 #| "B<0X>, the letters ABCDEF, and the exponent separator B<P> is used.  "
11138 #| "There is one hexadecimal digit before the decimal point, and the number "
11139 #| "of digits after it is equal to the precision.  The default precision "
11140 #| "suffices for an exact representation of the value if an exact "
11141 #| "representation in base 2 exists and otherwise is sufficiently large to "
11142 #| "distinguish values of type I<double>.  The digit before the decimal point "
11143 #| "is unspecified for nonnormalized numbers, and nonzero but otherwise "
11144 #| "unspecified for normalized numbers."
11145 msgid ""
11146 "(C99; not in SUSv2, but added in SUSv3)  For B<a> conversion, the I<double> "
11147 "argument is converted to hexadecimal notation (using the letters abcdef)  in "
11148 "the style [-]B<0x>hB<\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix "
11149 "B<0X>, the letters ABCDEF, and the exponent separator B<P> is used.  There "
11150 "is one hexadecimal digit before the decimal point, and the number of digits "
11151 "after it is equal to the precision.  The default precision suffices for an "
11152 "exact representation of the value if an exact representation in base 2 "
11153 "exists and otherwise is sufficiently large to distinguish values of type "
11154 "I<double>.  The digit before the decimal point is unspecified for "
11155 "nonnormalized numbers, and nonzero but otherwise unspecified for normalized "
11156 "numbers."
11157 msgstr ""
11158 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
11159 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
11160 "16 進表記に変換する。\n"
11161 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
11162 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
11163 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
11164 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
11165 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
11166 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
11167 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
11168
11169 #. type: TP
11170 #: build/C/man3/printf.3:722 build/C/man3/scanf.3:459
11171 #: build/C/man3/wprintf.3:149
11172 #, no-wrap
11173 msgid "B<c>"
11174 msgstr "B<c>"
11175
11176 #. type: Plain text
11177 #: build/C/man3/printf.3:740
11178 msgid ""
11179 "If no B<l> modifier is present, the I<int> argument is converted to an "
11180 "I<unsigned char>, and the resulting character is written.  If an B<l> "
11181 "modifier is present, the I<wint_t> (wide character) argument is converted to "
11182 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
11183 "conversion state starting in the initial state, and the resulting multibyte "
11184 "string is written."
11185 msgstr ""
11186 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
11187 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
11188 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
11189 "換し、 変換されたマルチバイト文字列を出力する。"
11190
11191 #. type: TP
11192 #: build/C/man3/printf.3:740 build/C/man3/scanf.3:451
11193 #: build/C/man3/wprintf.3:163
11194 #, no-wrap
11195 msgid "B<s>"
11196 msgstr "B<s>"
11197
11198 #. type: Plain text
11199 #: build/C/man3/printf.3:755
11200 msgid ""
11201 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
11202 "to be a pointer to an array of character type (pointer to a string).  "
11203 "Characters from the array are written up to (but not including) a "
11204 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
11205 "than the number specified are written.  If a precision is given, no null "
11206 "byte need be present; if the precision is not specified, or is greater than "
11207 "the size of the array, the array must contain a terminating null byte."
11208 msgstr ""
11209 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
11210 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
11211 "ヌルバイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
11212 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
11213 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
11214 "精度の値が配列の大きさより大きい場合には、 配列は終端のヌルバイトを含んでいな"
11215 "ければならない。"
11216
11217 #. type: Plain text
11218 #: build/C/man3/printf.3:782
11219 msgid ""
11220 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
11221 "expected to be a pointer to an array of wide characters.  Wide characters "
11222 "from the array are converted to multibyte characters (each by a call to the "
11223 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
11224 "state before the first wide character), up to and including a terminating "
11225 "null wide character.  The resulting multibyte characters are written up to "
11226 "(but not including) the terminating null byte.  If a precision is specified, "
11227 "no more bytes than the number specified are written, but no partial "
11228 "multibyte characters are written.  Note that the precision determines the "
11229 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
11230 "positions>.  The array must contain a terminating null wide character, "
11231 "unless a precision is given and it is so small that the number of bytes "
11232 "written exceeds it before the end of the array is reached."
11233 msgstr ""
11234 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
11235 "字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字"
11236 "毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド"
11237 "文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
11238 "る)。 マルチバイト文字への変換は、文字列を終端するヌルワイド文字が 出てくるま"
11239 "で行われ、終端ヌルワイド文字も含めて変換される。 結果のマルチバイト文字列は、"
11240 "終端のヌルバイトが出てくるまで 出力される (終端のヌルバイトは出力されない)。 "
11241 "精度が指定された場合、指定されたバイト数以上には出力されない。 但し、マルチバ"
11242 "イト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定するもの"
11243 "であり、「ワイド文字」数や 「画面での位置」を指定するものではないことに注"
11244 "意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数が "
11245 "精度の値を超える場合だけは、配列はヌルワイド文字で終端されていなくてもよい。 "
11246 "それ以外の場合は、必ず配列はヌルワイド文字で終端されていなければならない。"
11247
11248 #. type: TP
11249 #: build/C/man3/printf.3:782
11250 #, no-wrap
11251 msgid "B<C>"
11252 msgstr "B<C>"
11253
11254 #. type: Plain text
11255 #: build/C/man3/printf.3:788
11256 #, fuzzy
11257 #| msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
11258 msgid ""
11259 "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for B<lc>.  "
11260 "Don't use."
11261 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
11262
11263 #. type: TP
11264 #: build/C/man3/printf.3:788
11265 #, no-wrap
11266 msgid "B<S>"
11267 msgstr "B<S>"
11268
11269 #. type: Plain text
11270 #: build/C/man3/printf.3:794
11271 #, fuzzy
11272 #| msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
11273 msgid ""
11274 "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for B<ls>.  "
11275 "Don't use."
11276 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
11277
11278 #. type: TP
11279 #: build/C/man3/printf.3:794 build/C/man3/scanf.3:502
11280 #, no-wrap
11281 msgid "B<p>"
11282 msgstr "B<p>"
11283
11284 #. type: Plain text
11285 #: build/C/man3/printf.3:802
11286 msgid ""
11287 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
11288 "or B<%#lx>)."
11289 msgstr ""
11290 "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
11291
11292 #. type: TP
11293 #: build/C/man3/printf.3:802 build/C/man3/scanf.3:510
11294 #, no-wrap
11295 msgid "B<n>"
11296 msgstr "B<n>"
11297
11298 #. type: Plain text
11299 #: build/C/man3/printf.3:813
11300 msgid ""
11301 "The number of characters written so far is stored into the integer pointed "
11302 "to by the corresponding argument.  That argument shall be an I<int\\ * ,> or "
11303 "variant whose size matches the (optionally)  supplied integer length "
11304 "modifier.  No argument is converted.  The behavior is undefined if the "
11305 "conversion specification includes any flags, a field width, or a precision."
11306 msgstr ""
11307
11308 #. type: TP
11309 #: build/C/man3/printf.3:813
11310 #, no-wrap
11311 msgid "B<m>"
11312 msgstr "B<m>"
11313
11314 #. type: Plain text
11315 #: build/C/man3/printf.3:819
11316 msgid ""
11317 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
11318 "required."
11319 msgstr ""
11320 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
11321
11322 #. type: TP
11323 #: build/C/man3/printf.3:819 build/C/man3/scanf.3:377
11324 #, no-wrap
11325 msgid "B<%>"
11326 msgstr "B<%>"
11327
11328 #. type: Plain text
11329 #: build/C/man3/printf.3:825
11330 msgid ""
11331 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
11332 "conversion specification is \\(aq%%\\(aq."
11333 msgstr ""
11334 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
11335 "%\" となる。"
11336
11337 #. type: Plain text
11338 #: build/C/man3/printf.3:840
11339 msgid ""
11340 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
11341 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
11342 "B<vsnprintf>()  functions conform to C99."
11343 msgstr ""
11344 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
11345 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
11346 "B<vsnprintf>()  は C99 に準拠している。"
11347
11348 #.  .PP
11349 #.  Linux libc4 knows about the five C standard flags.
11350 #.  It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
11351 #.  and the conversions
11352 #.  \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP,
11353 #.  \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP,
11354 #.  \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP,
11355 #.  where \fBF\fP is a synonym for \fBf\fP.
11356 #.  Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms
11357 #.  for \fBld\fP, \fBlo\fP, and \fBlu\fP.
11358 #.  (This is bad, and caused serious bugs later, when
11359 #.  support for \fB%D\fP disappeared.)
11360 #.  No locale-dependent radix character,
11361 #.  no thousands' separator, no NaN or infinity, no "%m$" and "*m$".
11362 #.  .PP
11363 #.  Linux libc5 knows about the five C standard flags and the \(aq flag,
11364 #.  locale, "%m$" and "*m$".
11365 #.  It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
11366 #.  \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP
11367 #.  both for \fIlong double\fP and for \fIlong long int\fP (this is a bug).
11368 #.  It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP,
11369 #.  but adds the conversion character
11370 #.  .BR m ,
11371 #.  which outputs
11372 #.  .IR strerror(errno) .
11373 #.  .PP
11374 #.  glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP.
11375 #. type: Plain text
11376 #: build/C/man3/printf.3:883
11377 #, fuzzy
11378 #| msgid ""
11379 #| "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict "
11380 #| "each other: when B<snprintf>()  is called with I<size>=0 then SUSv2 "
11381 #| "stipulates an unspecified return value less than 1, while C99 allows "
11382 #| "I<str> to be NULL in this case, and gives the return value (as always)  "
11383 #| "as the number of characters that would have been written in case the "
11384 #| "output string has been large enough."
11385 msgid ""
11386 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
11387 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
11388 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
11389 "this case, and gives the return value (as always)  as the number of "
11390 "characters that would have been written in case the output string has been "
11391 "large enough.  SUSv3 and later align their specification of B<snprintf>()  "
11392 "with C99."
11393 msgstr ""
11394 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
11395 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
11396 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
11397 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
11398 "出力されるであろう文字数を返す。"
11399
11400 #. type: Plain text
11401 #: build/C/man3/printf.3:886
11402 msgid ""
11403 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
11404 "characters B<a> and B<A>."
11405 msgstr ""
11406 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
11407 "加された。"
11408
11409 #. type: Plain text
11410 #: build/C/man3/printf.3:889
11411 msgid ""
11412 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
11413 "flag character B<I>."
11414 msgstr ""
11415 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
11416 "追加された。"
11417
11418 #. type: Plain text
11419 #: build/C/man3/printf.3:891
11420 msgid "Some programs imprudently rely on code such as the following"
11421 msgstr ""
11422 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
11423 "ラムがある。"
11424
11425 #. type: Plain text
11426 #: build/C/man3/printf.3:893
11427 #, no-wrap
11428 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
11429 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
11430
11431 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
11432 #. type: Plain text
11433 #: build/C/man3/printf.3:909
11434 msgid ""
11435 "to append text to I<buf>.  However, the standards explicitly note that the "
11436 "results are undefined if source and destination buffers overlap when calling "
11437 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
11438 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
11439 "such as the above will B<not> produce the expected results."
11440 msgstr ""
11441 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
11442 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
11443 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
11444 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
11445 "結果が得られ「ない」ことがある。"
11446
11447 #.  .SH HISTORY
11448 #.  UNIX V7 defines the three routines
11449 #.  .BR printf (),
11450 #.  .BR fprintf (),
11451 #.  .BR sprintf (),
11452 #.  and has the flag \-, the width or precision *, the length modifier l,
11453 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
11454 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
11455 #.  #, + and <space> and no longer mentions D,O,U,X.
11456 #.  2.11BSD has
11457 #.  .BR vprintf (),
11458 #.  .BR vfprintf (),
11459 #.  .BR vsprintf (),
11460 #.  and warns not to use D,O,U,X.
11461 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
11462 #.  and the conversions n, p, E, G, X (with current meaning)
11463 #.  and deprecates D,O,U.
11464 #.  4.4BSD introduces the functions
11465 #.  .BR snprintf ()
11466 #.  and
11467 #.  .BR vsnprintf (),
11468 #.  and the length modifier q.
11469 #.  FreeBSD also has functions
11470 #.  .BR asprintf ()
11471 #.  and
11472 #.  .BR vasprintf (),
11473 #.  that allocate a buffer large enough for
11474 #.  .BR sprintf ().
11475 #.  In glibc there are functions
11476 #.  .BR dprintf ()
11477 #.  and
11478 #.  .BR vdprintf ()
11479 #.  that print to a file descriptor instead of a stream.
11480 #. type: Plain text
11481 #: build/C/man3/printf.3:951
11482 msgid ""
11483 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
11484 "conforms to the C99 standard, that is, behaves as described above, since "
11485 "glibc version 2.1.  Until glibc 2.0.6, they would return -1 when the output "
11486 "was truncated."
11487 msgstr ""
11488 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
11489 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
11490 "切り詰められた場合は -1 を返す。"
11491
11492 #.  .PP
11493 #.  Linux libc4.[45] does not have a
11494 #.  .BR snprintf (),
11495 #.  but provides a libbsd that contains an
11496 #.  .BR snprintf ()
11497 #.  equivalent to
11498 #.  .BR sprintf (),
11499 #.  that is, one that ignores the
11500 #.  .I size
11501 #.  argument.
11502 #.  Thus, the use of
11503 #.  .BR snprintf ()
11504 #.  with early libc4 leads to serious security problems.
11505 #. type: Plain text
11506 #: build/C/man3/printf.3:981
11507 msgid ""
11508 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
11509 "callers must be careful not to overflow the actual space; this is often "
11510 "impossible to assure.  Note that the length of the strings produced is "
11511 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
11512 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
11513 msgstr ""
11514 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
11515 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
11516 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
11517 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
11518 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
11519
11520 #.  .PP
11521 #.  Some floating-point conversions under early libc4
11522 #.  caused memory leaks.
11523 #. type: Plain text
11524 #: build/C/man3/printf.3:995
11525 msgid ""
11526 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
11527 "contain a % character.  If I<foo> comes from untrusted user input, it may "
11528 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
11529 "a security hole."
11530 msgstr ""
11531 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
11532 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
11533 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
11534 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
11535 "ルを作ることになるかもしれない。"
11536
11537 #. type: Plain text
11538 #: build/C/man3/printf.3:999
11539 msgid "To print I<Pi> to five decimal places:"
11540 msgstr "I<Pi> を 5 桁で出力する。"
11541
11542 #. type: Plain text
11543 #: build/C/man3/printf.3:1005
11544 #, no-wrap
11545 msgid ""
11546 "#include E<lt>math.hE<gt>\n"
11547 "#include E<lt>stdio.hE<gt>\n"
11548 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
11549 msgstr ""
11550 "#include E<lt>math.hE<gt>\n"
11551 "#include E<lt>stdio.hE<gt>\n"
11552 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
11553
11554 #. type: Plain text
11555 #: build/C/man3/printf.3:1014
11556 msgid ""
11557 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
11558 "I<weekday> and I<month> are pointers to strings:"
11559 msgstr ""
11560 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
11561 "I<month> は文字列へのポインタである)"
11562
11563 #. type: Plain text
11564 #: build/C/man3/printf.3:1020
11565 #, no-wrap
11566 msgid ""
11567 "#include E<lt>stdio.hE<gt>\n"
11568 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
11569 "        weekday, month, day, hour, min);\n"
11570 msgstr ""
11571 "#include E<lt>stdio.hE<gt>\n"
11572 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
11573 "\tweekday, month, day, hour, min);\n"
11574
11575 #. type: Plain text
11576 #: build/C/man3/printf.3:1026
11577 msgid ""
11578 "Many countries use the day-month-year order.  Hence, an internationalized "
11579 "version must be able to print the arguments in an order specified by the "
11580 "format:"
11581 msgstr ""
11582 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
11583 "順番で 引き数を表示できなければならない。"
11584
11585 #. type: Plain text
11586 #: build/C/man3/printf.3:1032
11587 #, no-wrap
11588 msgid ""
11589 "#include E<lt>stdio.hE<gt>\n"
11590 "fprintf(stdout, format,\n"
11591 "        weekday, month, day, hour, min);\n"
11592 msgstr ""
11593 "#include E<lt>stdio.hE<gt>\n"
11594 "fprintf(stdout, format,\n"
11595 "\tweekday, month, day, hour, min);\n"
11596
11597 #. type: Plain text
11598 #: build/C/man3/printf.3:1039
11599 msgid ""
11600 "where I<format> depends on locale, and may permute the arguments.  With the "
11601 "value:"
11602 msgstr ""
11603 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
11604 "I<format> が"
11605
11606 #. type: Plain text
11607 #: build/C/man3/printf.3:1043
11608 #, no-wrap
11609 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
11610 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
11611
11612 #. type: Plain text
11613 #: build/C/man3/printf.3:1047
11614 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
11615 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
11616
11617 #. type: Plain text
11618 #: build/C/man3/printf.3:1050
11619 msgid ""
11620 "To allocate a sufficiently large string and print into it (code correct for "
11621 "both glibc 2.0 and glibc 2.1):"
11622 msgstr ""
11623 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
11624 "と glibc 2.1 の両方で正しく動作するコード):"
11625
11626 #. type: Plain text
11627 #: build/C/man3/printf.3:1055
11628 #, no-wrap
11629 msgid ""
11630 "#include E<lt>stdio.hE<gt>\n"
11631 "#include E<lt>stdlib.hE<gt>\n"
11632 "#include E<lt>stdarg.hE<gt>\n"
11633 msgstr ""
11634 "#include E<lt>stdio.hE<gt>\n"
11635 "#include E<lt>stdlib.hE<gt>\n"
11636 "#include E<lt>stdarg.hE<gt>\n"
11637
11638 #. type: Plain text
11639 #: build/C/man3/printf.3:1063
11640 #, no-wrap
11641 msgid ""
11642 "char *\n"
11643 "make_message(const char *fmt, ...)\n"
11644 "{\n"
11645 "    int n;\n"
11646 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
11647 "    char *p, *np;\n"
11648 "    va_list ap;\n"
11649 msgstr ""
11650 "char *\n"
11651 "make_message(const char *fmt, ...)\n"
11652 "{\n"
11653 "    int n;\n"
11654 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
11655 "    char *p, *np;\n"
11656 "    va_list ap;\n"
11657
11658 #. type: Plain text
11659 #: build/C/man3/printf.3:1067
11660 #, no-wrap
11661 msgid ""
11662 "    p = malloc(size);\n"
11663 "    if (p == NULL)\n"
11664 "        return NULL;\n"
11665 msgstr ""
11666 "    p = malloc(size);\n"
11667 "    if (p == NULL)\n"
11668 "        return NULL;\n"
11669
11670 #. type: Plain text
11671 #: build/C/man3/printf.3:1069
11672 #, no-wrap
11673 msgid "    while (1) {\n"
11674 msgstr "    while (1) {\n"
11675
11676 #. type: Plain text
11677 #: build/C/man3/printf.3:1071
11678 #, no-wrap
11679 msgid "        /* Try to print in the allocated space */\n"
11680 msgstr "        /* Try to print in the allocated space */\n"
11681
11682 #. type: Plain text
11683 #: build/C/man3/printf.3:1075
11684 #, no-wrap
11685 msgid ""
11686 "        va_start(ap, fmt);\n"
11687 "        n = vsnprintf(p, size, fmt, ap);\n"
11688 "        va_end(ap);\n"
11689 msgstr ""
11690 "        va_start(ap, fmt);\n"
11691 "        n = vsnprintf(p, size, fmt, ap);\n"
11692 "        va_end(ap);\n"
11693
11694 #. type: Plain text
11695 #: build/C/man3/printf.3:1077
11696 #, no-wrap
11697 msgid "        /* Check error code */\n"
11698 msgstr "        /* Check error code */\n"
11699
11700 #. type: Plain text
11701 #: build/C/man3/printf.3:1082
11702 #, no-wrap
11703 msgid ""
11704 "        if (n E<lt> 0) {\n"
11705 "            free(p);\n"
11706 "            return NULL;\n"
11707 "        }\n"
11708 msgstr ""
11709 "        if (n E<lt> 0) {\n"
11710 "            free(p);\n"
11711 "            return NULL;\n"
11712 "        }\n"
11713
11714 #. type: Plain text
11715 #: build/C/man3/printf.3:1084
11716 #, no-wrap
11717 msgid "        /* If that worked, return the string */\n"
11718 msgstr "        /* If that worked, return the string */\n"
11719
11720 #. type: Plain text
11721 #: build/C/man3/printf.3:1087
11722 #, no-wrap
11723 msgid ""
11724 "        if (n E<lt> size)\n"
11725 "            return p;\n"
11726 msgstr ""
11727 "        if (n E<lt> size)\n"
11728 "            return p;\n"
11729
11730 #. type: Plain text
11731 #: build/C/man3/printf.3:1089
11732 #, no-wrap
11733 msgid "        /* Else try again with more space */\n"
11734 msgstr "        /* Else try again with more space */\n"
11735
11736 #. type: Plain text
11737 #: build/C/man3/printf.3:1091
11738 #, no-wrap
11739 msgid "        size = n + 1;       /* Precisely what is needed */\n"
11740 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
11741
11742 #. type: Plain text
11743 #: build/C/man3/printf.3:1102
11744 #, no-wrap
11745 msgid ""
11746 "        np = realloc(p, size);\n"
11747 "        if (np == NULL) {\n"
11748 "            free(p);\n"
11749 "            return NULL;\n"
11750 "        } else {\n"
11751 "            p = np;\n"
11752 "        }\n"
11753 "    }\n"
11754 "}\n"
11755 msgstr ""
11756 "        np = realloc(p, size);\n"
11757 "        if (np == NULL) {\n"
11758 "            free(p);\n"
11759 "            return NULL;\n"
11760 "        } else {\n"
11761 "            p = np;\n"
11762 "        }\n"
11763 "    }\n"
11764 "}\n"
11765
11766 #. type: Plain text
11767 #: build/C/man3/printf.3:1106
11768 msgid ""
11769 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
11770 "error instead of being handled gracefully."
11771 msgstr ""
11772 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
11773 "理されず、エラーとして扱われる。"
11774
11775 #. type: Plain text
11776 #: build/C/man3/printf.3:1115
11777 msgid ""
11778 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
11779 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
11780 msgstr ""
11781 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
11782 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
11783
11784 #. type: TH
11785 #: build/C/man3/puts.3:26
11786 #, no-wrap
11787 msgid "PUTS"
11788 msgstr "PUTS"
11789
11790 #. type: TH
11791 #: build/C/man3/puts.3:26 build/C/man3/scanf.3:52
11792 #, no-wrap
11793 msgid "2014-01-11"
11794 msgstr "2014-01-11"
11795
11796 #. type: Plain text
11797 #: build/C/man3/puts.3:29
11798 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
11799 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
11800
11801 #. type: Plain text
11802 #: build/C/man3/puts.3:34
11803 #, no-wrap
11804 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11805 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11806
11807 #. type: Plain text
11808 #: build/C/man3/puts.3:36
11809 #, no-wrap
11810 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11811 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11812
11813 #. type: Plain text
11814 #: build/C/man3/puts.3:38
11815 #, no-wrap
11816 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11817 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11818
11819 #. type: Plain text
11820 #: build/C/man3/puts.3:40
11821 #, no-wrap
11822 msgid "B<int putchar(int >I<c>B<);>\n"
11823 msgstr "B<int putchar(int >I<c>B<);>\n"
11824
11825 #. type: Plain text
11826 #: build/C/man3/puts.3:42
11827 #, no-wrap
11828 msgid "B<int puts(const char *>I<s>B<);>\n"
11829 msgstr "B<int puts(const char *>I<s>B<);>\n"
11830
11831 #. type: Plain text
11832 #: build/C/man3/puts.3:51
11833 msgid ""
11834 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
11835 "I<stream>."
11836 msgstr ""
11837 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
11838 "に書き込む。"
11839
11840 #. type: Plain text
11841 #: build/C/man3/puts.3:58
11842 msgid ""
11843 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
11844 "null byte (\\(aq\\e0\\(aq)."
11845 msgstr ""
11846 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端のヌルバイト "
11847 "(\\(aq\\e0\\(aq) は出力しない。"
11848
11849 #. type: Plain text
11850 #: build/C/man3/puts.3:65
11851 msgid ""
11852 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
11853 "a macro which evaluates I<stream> more than once."
11854 msgstr ""
11855 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
11856 "れないという点を除き、 B<fputc>()  と同じである。"
11857
11858 #. type: Plain text
11859 #: build/C/man3/puts.3:69
11860 msgid "B<putchar(>I<c>B<)> is equivalent to B<putc(>I<c>B<, >I<stdout>B<).>"
11861 msgstr "B<putchar(>I<c>B<)> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
11862
11863 #. type: Plain text
11864 #: build/C/man3/puts.3:76
11865 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
11866 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
11867
11868 #. type: Plain text
11869 #: build/C/man3/puts.3:81
11870 msgid ""
11871 "Calls to the functions described here can be mixed with each other and with "
11872 "calls to other output functions from the I<stdio> library for the same "
11873 "output stream."
11874 msgstr ""
11875 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
11876 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
11877 "る。"
11878
11879 #. type: Plain text
11880 #: build/C/man3/puts.3:96
11881 msgid ""
11882 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
11883 "I<unsigned char> cast to an I<int> or B<EOF> on error."
11884 msgstr ""
11885 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
11886 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
11887
11888 #. type: Plain text
11889 #: build/C/man3/puts.3:103
11890 msgid ""
11891 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
11892 "on error."
11893 msgstr ""
11894 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
11895 "は B<EOF> を返す。"
11896
11897 #. type: Plain text
11898 #: build/C/man3/puts.3:112
11899 msgid ""
11900 "It is not advisable to mix calls to output functions from the I<stdio> "
11901 "library with low-level calls to B<write>(2)  for the file descriptor "
11902 "associated with the same output stream; the results will be undefined and "
11903 "very probably not what you want."
11904 msgstr ""
11905 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
11906 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
11907 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
11908 "性が高い。"
11909
11910 #. type: Plain text
11911 #: build/C/man3/puts.3:124
11912 msgid ""
11913 "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), "
11914 "B<fputws>(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), "
11915 "B<unlocked_stdio>(3)"
11916 msgstr ""
11917 "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), "
11918 "B<fputws>(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), "
11919 "B<unlocked_stdio>(3)"
11920
11921 #. type: TH
11922 #: build/C/man2/read.2:35
11923 #, no-wrap
11924 msgid "READ"
11925 msgstr "READ"
11926
11927 #. type: TH
11928 #: build/C/man2/read.2:35 build/C/man2/write.2:39
11929 #, no-wrap
11930 msgid "2014-05-04"
11931 msgstr "2014-05-04"
11932
11933 #. type: Plain text
11934 #: build/C/man2/read.2:38
11935 msgid "read - read from a file descriptor"
11936 msgstr "read - ファイルディスクリプタから読み込む"
11937
11938 #. type: Plain text
11939 #: build/C/man2/read.2:43
11940 #, no-wrap
11941 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
11942 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
11943
11944 #. type: Plain text
11945 #: build/C/man2/read.2:52
11946 msgid ""
11947 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
11948 "into the buffer starting at I<buf>."
11949 msgstr ""
11950 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
11951 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
11952
11953 #. type: Plain text
11954 #: build/C/man2/read.2:60
11955 msgid ""
11956 "On files that support seeking, the read operation commences at the current "
11957 "file offset, and the file offset is incremented by the number of bytes "
11958 "read.  If the current file offset is at or past the end of file, no bytes "
11959 "are read, and B<read>()  returns zero."
11960 msgstr ""
11961 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
11962 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
11963 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
11964 "0 を返す。"
11965
11966 #. type: Plain text
11967 #: build/C/man2/read.2:75
11968 msgid ""
11969 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
11970 "In the absence of any errors, or if B<read>()  does not check for errors, a "
11971 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
11972 msgstr ""
11973 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
11974 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
11975 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
11976
11977 #. type: Plain text
11978 #: build/C/man2/read.2:81
11979 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
11980 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
11981
11982 #. type: Plain text
11983 #: build/C/man2/read.2:95
11984 msgid ""
11985 "On success, the number of bytes read is returned (zero indicates end of "
11986 "file), and the file position is advanced by this number.  It is not an error "
11987 "if this number is smaller than the number of bytes requested; this may "
11988 "happen for example because fewer bytes are actually available right now "
11989 "(maybe because we were close to end-of-file, or because we are reading from "
11990 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
11991 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
11992 "this case, it is left unspecified whether the file position (if any) changes."
11993 msgstr ""
11994 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
11995 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
11996 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
11997 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
11998 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
11999 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
12000 "の場合はファイル位置が変更されるかどうかは 不定である。"
12001
12002 #. type: TP
12003 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
12004 #, no-wrap
12005 msgid "B<EAGAIN>"
12006 msgstr "B<EAGAIN>"
12007
12008 #. type: Plain text
12009 #: build/C/man2/read.2:103
12010 msgid ""
12011 "The file descriptor I<fd> refers to a file other than a socket and has been "
12012 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
12013 msgstr ""
12014 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
12015 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
12016 "する状況にある。"
12017
12018 #. type: TP
12019 #: build/C/man2/read.2:103 build/C/man2/write.2:115
12020 #, no-wrap
12021 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
12022 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
12023
12024 #.  Actually EAGAIN on Linux
12025 #. type: Plain text
12026 #: build/C/man2/read.2:114
12027 msgid ""
12028 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
12029 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
12030 "to be returned for this case, and does not require these constants to have "
12031 "the same value, so a portable application should check for both "
12032 "possibilities."
12033 msgstr ""
12034 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
12035 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
12036 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
12037 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
12038 "プリケーションでは、両方の可能性を 確認すべきである。"
12039
12040 #. type: Plain text
12041 #: build/C/man2/read.2:118
12042 msgid "I<fd> is not a valid file descriptor or is not open for reading."
12043 msgstr ""
12044 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
12045 "(open) されていない。"
12046
12047 #. type: Plain text
12048 #: build/C/man2/read.2:122 build/C/man2/write.2:145
12049 msgid "I<buf> is outside your accessible address space."
12050 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
12051
12052 #. type: Plain text
12053 #: build/C/man2/read.2:126
12054 msgid ""
12055 "The call was interrupted by a signal before any data was read; see "
12056 "B<signal>(7)."
12057 msgstr ""
12058 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
12059
12060 #. type: Plain text
12061 #: build/C/man2/read.2:137
12062 msgid ""
12063 "I<fd> is attached to an object which is unsuitable for reading; or the file "
12064 "was opened with the B<O_DIRECT> flag, and either the address specified in "
12065 "I<buf>, the value specified in I<count>, or the current file offset is not "
12066 "suitably aligned."
12067 msgstr ""
12068 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
12069 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
12070 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
12071 "ンメントが不適切である。"
12072
12073 #. type: Plain text
12074 #: build/C/man2/read.2:147
12075 msgid ""
12076 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
12077 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
12078 "information."
12079 msgstr ""
12080 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
12081 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
12082 "こと。"
12083
12084 #. type: Plain text
12085 #: build/C/man2/read.2:158
12086 msgid ""
12087 "I/O error.  This will happen for example when the process is in a background "
12088 "process group, tries to read from its controlling terminal, and either it is "
12089 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
12090 "also occur when there is a low-level I/O error while reading from a disk or "
12091 "tape."
12092 msgstr ""
12093 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
12094 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
12095 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
12096 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
12097 "た場合にも起こる。"
12098
12099 #. type: Plain text
12100 #: build/C/man2/read.2:162
12101 msgid "I<fd> refers to a directory."
12102 msgstr "I<fd> がディレクトリを参照している。"
12103
12104 #. type: Plain text
12105 #: build/C/man2/read.2:173
12106 msgid ""
12107 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
12108 "allows a B<read>()  that is interrupted after reading some data to return -1 "
12109 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
12110 "read."
12111 msgstr ""
12112 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
12113 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
12114 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
12115 "数を返してもよい。"
12116
12117 #. type: Plain text
12118 #: build/C/man2/read.2:187
12119 msgid ""
12120 "On NFS filesystems, reading small amounts of data will update the timestamp "
12121 "only the first time, subsequent calls may not do so.  This is caused by "
12122 "client side attribute caching, because most if not all NFS clients leave "
12123 "st_atime (last file access time)  updates to the server and client side "
12124 "reads satisfied from the client's cache will not cause st_atime updates on "
12125 "the server as there are no server side reads.  UNIX semantics can be "
12126 "obtained by disabling client side attribute caching, but in most situations "
12127 "this will substantially increase server load and decrease performance."
12128 msgstr ""
12129 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
12130 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
12131 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
12132 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
12133 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
12134 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
12135 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
12136 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
12137
12138 #. type: Plain text
12139 #: build/C/man2/read.2:190 build/C/man2/write.2:214
12140 msgid ""
12141 "According to POSIX.1-2008/SUSv4 Section XSI 2.9.7 (\"Thread Interactions "
12142 "with Regular File Operations\"):"
12143 msgstr ""
12144
12145 #. type: Plain text
12146 #: build/C/man2/read.2:195 build/C/man2/write.2:219
12147 msgid ""
12148 "All of the following functions shall be atomic with respect to each other in "
12149 "the effects specified in POSIX.1-2008 when they operate on regular files or "
12150 "symbolic links: ..."
12151 msgstr ""
12152
12153 #
12154 #.  http://thread.gmane.org/gmane.linux.kernel/1649458
12155 #.     From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
12156 #.     Subject: Update of file offset on write() etc. is non-atomic with I/O
12157 #.     Date: 2014-02-17 15:41:37 GMT
12158 #.     Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
12159 #.  commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
12160 #.     Author: Linus Torvalds <torvalds@linux-foundation.org>
12161 #.     Date:   Mon Mar 3 09:36:58 2014 -0800
12162 #.         vfs: atomic f_pos accesses as per POSIX
12163 #. type: Plain text
12164 #: build/C/man2/read.2:226
12165 msgid ""
12166 "Among the APIs subsequently listed are B<read>()  and B<readv>(2).  And "
12167 "among the effects that should be atomic across threads (and processes)  are "
12168 "updates of the file offset.  However, on Linux before version 3.14, this was "
12169 "not the case: if two processes that share an open file description (see "
12170 "B<open>(2))  perform a B<read>()  (or B<readv>(2))  at the same time, then "
12171 "the I/O operations were not atomic with respect updating the file offset, "
12172 "with the result that the reads in the two processes might (incorrectly) "
12173 "overlap in the blocks of data that they obtained.  This problem was fixed in "
12174 "Linux 3.14."
12175 msgstr ""
12176
12177 #. type: Plain text
12178 #: build/C/man2/read.2:239
12179 msgid ""
12180 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
12181 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
12182 "B<fread>(3)"
12183 msgstr ""
12184 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
12185 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
12186 "B<fread>(3)"
12187
12188 #. type: TH
12189 #: build/C/man2/readlink.2:44
12190 #, no-wrap
12191 msgid "READLINK"
12192 msgstr "READLINK"
12193
12194 #. type: TH
12195 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:32
12196 #, no-wrap
12197 msgid "2014-10-15"
12198 msgstr "2014-10-15"
12199
12200 #. type: Plain text
12201 #: build/C/man2/readlink.2:47
12202 msgid "readlink, readlinkat - read value of a symbolic link"
12203 msgstr "readlink, readlinkat - シンボリックリンクの値を読む"
12204
12205 #. type: Plain text
12206 #: build/C/man2/readlink.2:53
12207 #, no-wrap
12208 msgid "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12209 msgstr "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12210
12211 #. type: Plain text
12212 #: build/C/man2/readlink.2:59
12213 #, no-wrap
12214 msgid ""
12215 "B<ssize_t readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
12216 "B<                   char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12217 msgstr ""
12218 "B<ssize_t readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
12219 "B<                   char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
12220
12221 #. type: Plain text
12222 #: build/C/man2/readlink.2:68
12223 msgid "B<readlink>():"
12224 msgstr "B<readlink>():"
12225
12226 #. type: Plain text
12227 #: build/C/man2/readlink.2:71 build/C/man2/symlink.2:59
12228 msgid ""
12229 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
12230 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
12231 msgstr ""
12232 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
12233 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
12234
12235 #. type: Plain text
12236 #: build/C/man2/readlink.2:74
12237 msgid "B<readlinkat>():"
12238 msgstr "B<readlinkat>():"
12239
12240 #. type: Plain text
12241 #: build/C/man2/readlink.2:100
12242 msgid ""
12243 "B<readlink>()  places the contents of the symbolic link I<pathname> in the "
12244 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
12245 "null byte to I<buf>.  It will truncate the contents (to a length of "
12246 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
12247 "contents."
12248 msgstr ""
12249 "B<readlink>()  は I<pathname> で与えられたシンボリックリンクの内容を I<buf> "
12250 "バッファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は"
12251 "ヌルバイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小さ"
12252 "過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
12253
12254 #. type: SS
12255 #: build/C/man2/readlink.2:100
12256 #, no-wrap
12257 msgid "readlinkat()"
12258 msgstr "readlinkat()"
12259
12260 #. type: Plain text
12261 #: build/C/man2/readlink.2:106
12262 msgid ""
12263 "The B<readlinkat>()  system call operates in exactly the same way as "
12264 "B<readlink>(), except for the differences described here."
12265 msgstr ""
12266 "B<readlinkat>() システムコールは B<readlink>() と全く同様に動作するが、以下で"
12267 "説明する点が異なる。"
12268
12269 #. type: Plain text
12270 #: build/C/man2/readlink.2:116
12271 msgid ""
12272 "If the pathname given in I<pathname> is relative, then it is interpreted "
12273 "relative to the directory referred to by the file descriptor I<dirfd> "
12274 "(rather than relative to the current working directory of the calling "
12275 "process, as is done by B<readlink>()  for a relative pathname)."
12276 msgstr ""
12277 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
12278 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
12279 "(B<readlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
12280 "ワーキングディレクトリに対する相対パスではない)。"
12281
12282 #. type: Plain text
12283 #: build/C/man2/readlink.2:128
12284 msgid ""
12285 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
12286 "then I<pathname> is interpreted relative to the current working directory of "
12287 "the calling process (like B<readlink>())."
12288 msgstr ""
12289 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
12290 "の場合、 (B<readlink>() と同様に) I<pathname> は呼び出したプロセスのカレント"
12291 "ワーキングディレクトリに対する相対パスと解釈される。"
12292
12293 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
12294 #. type: Plain text
12295 #: build/C/man2/readlink.2:148
12296 msgid ""
12297 "Since Linux 2.6.39, I<pathname> can be an empty string, in which case the "
12298 "call operates on the symbolic link referred to by I<dirfd> (which should "
12299 "have been obtained using B<open>(2)  with the B<O_PATH> and B<O_NOFOLLOW> "
12300 "flags)."
12301 msgstr ""
12302 "Linux 2.6.39 以降では、 I<pathname> に空文字列を指定できる。 その場合、呼び出"
12303 "しは I<dirfd> が参照するシンボリックリンクに対して行われる (I<dirfd> はフラ"
12304 "グ B<O_PATH> と B<O_NOFOLLOW> を指定した B<open>(2) を使って取得すべきであ"
12305 "る)。"
12306
12307 #. type: Plain text
12308 #: build/C/man2/readlink.2:153
12309 msgid "See B<openat>(2)  for an explanation of the need for B<readlinkat>()."
12310 msgstr "B<readlinkat>() の必要性についての説明については B<openat>(2) を参照。"
12311
12312 #. type: Plain text
12313 #: build/C/man2/readlink.2:159
12314 msgid ""
12315 "On success, these calls return the number of bytes placed in I<buf>.  On "
12316 "error, -1 is returned and I<errno> is set to indicate the error."
12317 msgstr ""
12318 "成功すると、これらのシステムコールは I<buf> に格納されたバイト数を返す。 エ"
12319 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
12320
12321 #. type: Plain text
12322 #: build/C/man2/readlink.2:165
12323 msgid ""
12324 "Search permission is denied for a component of the path prefix.  (See also "
12325 "B<path_resolution>(7).)"
12326 msgstr ""
12327 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
12328 "参照すること)。"
12329
12330 #. type: Plain text
12331 #: build/C/man2/readlink.2:169
12332 msgid "I<buf> extends outside the process's allocated address space."
12333 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
12334
12335 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
12336 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
12337 #.  and this error can also occur if bufsiz < 0.
12338 #.  See: http://thread.gmane.org/gmane.linux.man/380
12339 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
12340 #. type: Plain text
12341 #: build/C/man2/readlink.2:178
12342 msgid "I<bufsiz> is not positive."
12343 msgstr "I<bufsiz> が正でない。"
12344
12345 #. type: Plain text
12346 #: build/C/man2/readlink.2:181
12347 msgid "The named file is not a symbolic link."
12348 msgstr "指定したファイルがシンボリックリンクでない。"
12349
12350 #. type: Plain text
12351 #: build/C/man2/readlink.2:184
12352 msgid "An I/O error occurred while reading from the filesystem."
12353 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
12354
12355 #. type: Plain text
12356 #: build/C/man2/readlink.2:187
12357 msgid "Too many symbolic links were encountered in translating the pathname."
12358 msgstr "パス名にシンボリックリンクが多すぎる。"
12359
12360 #. type: Plain text
12361 #: build/C/man2/readlink.2:190
12362 msgid "A pathname, or a component of a pathname, was too long."
12363 msgstr "パス名かパス名の一部分が長過ぎる。"
12364
12365 #. type: Plain text
12366 #: build/C/man2/readlink.2:193
12367 msgid "The named file does not exist."
12368 msgstr "その名前のファイルが存在しない。"
12369
12370 #. type: Plain text
12371 #: build/C/man2/readlink.2:199
12372 msgid "A component of the path prefix is not a directory."
12373 msgstr "パスのディレクトリ部分がディレクトリでない。"
12374
12375 #. type: Plain text
12376 #: build/C/man2/readlink.2:202
12377 msgid "The following additional errors can occur for B<readlinkat>():"
12378 msgstr "B<readlinkat>() では以下のエラーも発生する。"
12379
12380 #. type: Plain text
12381 #: build/C/man2/readlink.2:212 build/C/man2/unlink.2:269
12382 msgid ""
12383 "I<pathname> is relative and I<dirfd> is a file descriptor referring to a "
12384 "file other than a directory."
12385 msgstr ""
12386 "I<pathname> が相対パスで、 I<dirfd> がディレクトリ以外のファイルを参照してい"
12387 "るファイルディスクリプタである。"
12388
12389 #. type: Plain text
12390 #: build/C/man2/readlink.2:216
12391 msgid ""
12392 "B<readlinkat>()  was added to Linux in kernel 2.6.16; library support was "
12393 "added to glibc in version 2.4."
12394 msgstr ""
12395 "B<readlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
12396 "ポートはバージョン 2.4 で glibc に追加された。"
12397
12398 #. type: Plain text
12399 #: build/C/man2/readlink.2:222
12400 msgid ""
12401 "B<readlink>(): 4.4BSD (B<readlink>()  first appeared in 4.2BSD), "
12402 "POSIX.1-2001, POSIX.1-2008."
12403 msgstr ""
12404 "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001, "
12405 "POSIX.1-2008."
12406
12407 #. type: Plain text
12408 #: build/C/man2/readlink.2:225
12409 msgid "B<readlinkat>(): POSIX.1-2008."
12410 msgstr "B<readlinkat>(): POSIX.1-2008."
12411
12412 #. type: Plain text
12413 #: build/C/man2/readlink.2:233
12414 msgid ""
12415 "In versions of glibc up to and including glibc 2.4, the return type of "
12416 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
12417 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
12418 msgstr ""
12419 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
12420 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
12421 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
12422
12423 #. type: Plain text
12424 #: build/C/man2/readlink.2:256
12425 msgid ""
12426 "Using a statically sized buffer might not provide enough room for the "
12427 "symbolic link contents.  The required size for the buffer can be obtained "
12428 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
12429 "link.  However, the number of bytes written by B<readlink>()  and "
12430 "B<readlinkat>()  should be checked to make sure that the size of the "
12431 "symbolic link did not increase between the calls.  Dynamically allocating "
12432 "the buffer for B<readlink>()  and B<readlinkat>()  also addresses a common "
12433 "portability problem when using I<PATH_MAX> for the buffer size, as this "
12434 "constant is not guaranteed to be defined per POSIX if the system does not "
12435 "have such limit."
12436 msgstr ""
12437 "静的な大きさのバッファを使うと、 シンボリックリンクの内容を格納するのに十分な"
12438 "領域がない場合がある。 バッファに必要なサイズは、 そのシンボリックリンクに対"
12439 "して B<lstat>(2) の呼び出しで返される I<stat.st_size> の値から取得できる。 た"
12440 "だし、 B<readlink>() や B<readlinkat>() が書き込んだバイト数をチェックして、 "
12441 "シンボリックリンクのサイズが二つの呼び出しの間で増えていないことを確認すべき"
12442 "である。 B<readlink>() や B<readlinkat>() 用のバッファを動的に割り当てる方法"
12443 "でも、 バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の問題"
12444 "を解決することができる。 なぜなら、POSIX では、 システムがそのような上限値を"
12445 "定義していない場合には、 I<PATH_MAX> が定義されることが保証されていないからで"
12446 "ある。"
12447
12448 #. type: Plain text
12449 #: build/C/man2/readlink.2:269
12450 msgid ""
12451 "On older kernels where B<readlinkat>()  is unavailable, the glibc wrapper "
12452 "function falls back to the use of B<readlink>().  When I<pathname> is a "
12453 "relative pathname, glibc constructs a pathname based on the symbolic link in "
12454 "I</proc/self/fd> that corresponds to the I<dirfd> argument."
12455 msgstr ""
12456 "B<readlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
12457 "B<readlink>() を使用するモードにフォールバックする。 I<pathname> が相対パスの"
12458 "場合、 glibc は I<dirfd> 引き数に対応する I</proc/self/fd> のシンボリックリン"
12459 "クに基づいてパス名を構成する。"
12460
12461 #. type: Plain text
12462 #: build/C/man2/readlink.2:275
12463 msgid ""
12464 "The following program allocates the buffer needed by B<readlink>()  "
12465 "dynamically from the information provided by B<lstat>(), making sure there's "
12466 "no race condition between the calls."
12467 msgstr ""
12468 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
12469 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
12470 "また、両方の呼び出し間で競合条件がないことを保証している。"
12471
12472 #. type: Plain text
12473 #: build/C/man2/readlink.2:282
12474 #, no-wrap
12475 msgid ""
12476 "#include E<lt>sys/types.hE<gt>\n"
12477 "#include E<lt>sys/stat.hE<gt>\n"
12478 "#include E<lt>stdio.hE<gt>\n"
12479 "#include E<lt>stdlib.hE<gt>\n"
12480 "#include E<lt>unistd.hE<gt>\n"
12481 msgstr ""
12482 "#include E<lt>sys/types.hE<gt>\n"
12483 "#include E<lt>sys/stat.hE<gt>\n"
12484 "#include E<lt>stdio.hE<gt>\n"
12485 "#include E<lt>stdlib.hE<gt>\n"
12486 "#include E<lt>unistd.hE<gt>\n"
12487
12488 #. type: Plain text
12489 #: build/C/man2/readlink.2:289
12490 #, no-wrap
12491 msgid ""
12492 "int\n"
12493 "main(int argc, char *argv[])\n"
12494 "{\n"
12495 "    struct stat sb;\n"
12496 "    char *linkname;\n"
12497 "    ssize_t r;\n"
12498 msgstr ""
12499 "int\n"
12500 "main(int argc, char *argv[])\n"
12501 "{\n"
12502 "    struct stat sb;\n"
12503 "    char *linkname;\n"
12504 "    ssize_t r;\n"
12505
12506 #. type: Plain text
12507 #: build/C/man2/readlink.2:294
12508 #, no-wrap
12509 msgid ""
12510 "    if (argc != 2) {\n"
12511 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
12512 "        exit(EXIT_FAILURE);\n"
12513 "    }\n"
12514 msgstr ""
12515 "    if (argc != 2) {\n"
12516 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
12517 "        exit(EXIT_FAILURE);\n"
12518 "    }\n"
12519
12520 #. type: Plain text
12521 #: build/C/man2/readlink.2:299
12522 #, no-wrap
12523 msgid ""
12524 "    if (lstat(argv[1], &sb) == -1) {\n"
12525 "        perror(\"lstat\");\n"
12526 "        exit(EXIT_FAILURE);\n"
12527 "    }\n"
12528 msgstr ""
12529 "    if (lstat(argv[1], &sb) == -1) {\n"
12530 "        perror(\"lstat\");\n"
12531 "        exit(EXIT_FAILURE);\n"
12532 "    }\n"
12533
12534 #. type: Plain text
12535 #: build/C/man2/readlink.2:305
12536 #, no-wrap
12537 msgid ""
12538 "    linkname = malloc(sb.st_size + 1);\n"
12539 "    if (linkname == NULL) {\n"
12540 "        fprintf(stderr, \"insufficient memory\\en\");\n"
12541 "        exit(EXIT_FAILURE);\n"
12542 "    }\n"
12543 msgstr ""
12544 "    linkname = malloc(sb.st_size + 1);\n"
12545 "    if (linkname == NULL) {\n"
12546 "        fprintf(stderr, \"insufficient memory\\en\");\n"
12547 "        exit(EXIT_FAILURE);\n"
12548 "    }\n"
12549
12550 #. type: Plain text
12551 #: build/C/man2/readlink.2:307
12552 #, no-wrap
12553 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
12554 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
12555
12556 #. type: Plain text
12557 #: build/C/man2/readlink.2:312
12558 #, no-wrap
12559 msgid ""
12560 "    if (r == -1) {\n"
12561 "        perror(\"readlink\");\n"
12562 "        exit(EXIT_FAILURE);\n"
12563 "    }\n"
12564 msgstr ""
12565 "    if (r == -1) {\n"
12566 "        perror(\"readlink\");\n"
12567 "        exit(EXIT_FAILURE);\n"
12568 "    }\n"
12569
12570 #. type: Plain text
12571 #: build/C/man2/readlink.2:318
12572 #, no-wrap
12573 msgid ""
12574 "    if (r E<gt> sb.st_size) {\n"
12575 "        fprintf(stderr, \"symlink increased in size \"\n"
12576 "                        \"between lstat() and readlink()\\en\");\n"
12577 "        exit(EXIT_FAILURE);\n"
12578 "    }\n"
12579 msgstr ""
12580 "    if (r E<gt> sb.st_size) {\n"
12581 "        fprintf(stderr, \"symlink increased in size \"\n"
12582 "                        \"between lstat() and readlink()\\en\");\n"
12583 "        exit(EXIT_FAILURE);\n"
12584 "    }\n"
12585
12586 #. type: Plain text
12587 #: build/C/man2/readlink.2:320
12588 #, no-wrap
12589 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
12590 msgstr "    linkname[r] = \\(aq\\e0\\(aq;\n"
12591
12592 #. type: Plain text
12593 #: build/C/man2/readlink.2:322
12594 #, no-wrap
12595 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
12596 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
12597
12598 #. type: Plain text
12599 #: build/C/man2/readlink.2:324
12600 #, no-wrap
12601 msgid "    free(linkname);\n"
12602 msgstr "    free(linkname);\n"
12603
12604 #. type: Plain text
12605 #: build/C/man2/readlink.2:336
12606 msgid ""
12607 "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<realpath>(3), "
12608 "B<path_resolution>(7), B<symlink>(7)"
12609 msgstr ""
12610 "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<realpath>(3), "
12611 "B<path_resolution>(7), B<symlink>(7)"
12612
12613 #. type: TH
12614 #: build/C/man2/readv.2:32
12615 #, no-wrap
12616 msgid "READV"
12617 msgstr "READV"
12618
12619 #. type: Plain text
12620 #: build/C/man2/readv.2:35
12621 msgid ""
12622 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
12623 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
12624
12625 #. type: Plain text
12626 #: build/C/man2/readv.2:38
12627 #, no-wrap
12628 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
12629 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
12630
12631 #. type: Plain text
12632 #: build/C/man2/readv.2:40
12633 #, no-wrap
12634 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12635 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12636
12637 #. type: Plain text
12638 #: build/C/man2/readv.2:42
12639 #, no-wrap
12640 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12641 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12642
12643 #. type: Plain text
12644 #: build/C/man2/readv.2:45
12645 #, no-wrap
12646 msgid ""
12647 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12648 "B<               off_t >I<offset>B<);>\n"
12649 msgstr ""
12650 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12651 "B<               off_t >I<offset>B<);>\n"
12652
12653 #. type: Plain text
12654 #: build/C/man2/readv.2:48
12655 #, no-wrap
12656 msgid ""
12657 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12658 "B<                off_t >I<offset>B<);>\n"
12659 msgstr ""
12660 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12661 "B<                off_t >I<offset>B<);>\n"
12662
12663 #. type: Plain text
12664 #: build/C/man2/readv.2:58
12665 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
12666 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
12667
12668 #. type: Plain text
12669 #: build/C/man2/readv.2:68
12670 msgid ""
12671 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
12672 "with the file descriptor I<fd> into the buffers described by I<iov> "
12673 "(\"scatter input\")."
12674 msgstr ""
12675 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
12676 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
12677 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
12678
12679 #. type: Plain text
12680 #: build/C/man2/readv.2:78
12681 msgid ""
12682 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
12683 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
12684 "\")."
12685 msgstr ""
12686 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
12687 "I<iovcnt>\n"
12688 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
12689 "ら\n"
12690 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
12691
12692 #. type: Plain text
12693 #: build/C/man2/readv.2:87
12694 msgid ""
12695 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
12696 "I<E<lt>sys/uio.hE<gt>> as:"
12697 msgstr ""
12698 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
12699 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
12700
12701 #. type: Plain text
12702 #: build/C/man2/readv.2:95
12703 #, no-wrap
12704 msgid ""
12705 "struct iovec {\n"
12706 "    void  *iov_base;    /* Starting address */\n"
12707 "    size_t iov_len;     /* Number of bytes to transfer */\n"
12708 "};\n"
12709 msgstr ""
12710 "struct iovec {\n"
12711 "    void  *iov_base;    /* Starting address */\n"
12712 "    size_t iov_len;     /* Number of bytes to transfer */\n"
12713 "};\n"
12714
12715 #. type: Plain text
12716 #: build/C/man2/readv.2:103
12717 msgid ""
12718 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
12719 "buffers are filled."
12720 msgstr ""
12721 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
12722 "B<read>(2) と全く同様の動作を行う。"
12723
12724 #. type: Plain text
12725 #: build/C/man2/readv.2:109
12726 msgid ""
12727 "The B<writev>()  system call works just like B<write>(2)  except that "
12728 "multiple buffers are written out."
12729 msgstr ""
12730 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
12731 "B<write>(2) と全く同様の動作を行う。"
12732
12733 #. type: Plain text
12734 #: build/C/man2/readv.2:128
12735 msgid ""
12736 "Buffers are processed in array order.  This means that B<readv>()  "
12737 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
12738 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
12739 "filled.)  Similarly, B<writev>()  writes out the entire contents of "
12740 "I<iov>[0] before proceeding to I<iov>[1], and so on."
12741 msgstr ""
12742 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
12743 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
12744 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
12745 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
12746
12747 #. type: Plain text
12748 #: build/C/man2/readv.2:146
12749 msgid ""
12750 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
12751 "data written by B<writev>()  is written as a single block that is not "
12752 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
12753 "for an exception); analogously, B<readv>()  is guaranteed to read a "
12754 "contiguous block of data from the file, regardless of read operations "
12755 "performed in other threads or processes that have file descriptors referring "
12756 "to the same open file description (see B<open>(2))."
12757 msgstr ""
12758 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
12759 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
12760 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
12761 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
12762 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
12763 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
12764 "作の影響を受けることはない。"
12765
12766 #. type: SS
12767 #: build/C/man2/readv.2:146
12768 #, no-wrap
12769 msgid "preadv() and pwritev()"
12770 msgstr "preadv() と pwritev()"
12771
12772 #. type: Plain text
12773 #: build/C/man2/readv.2:159
12774 msgid ""
12775 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
12776 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
12777 "argument, I<offset>, which specifies the file offset at which the input "
12778 "operation is to be performed."
12779 msgstr ""
12780 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
12781 "組み合わせたものである。\n"
12782 "B<readv>() と同じ処理を実行するが、\n"
12783 "4 番目の引き数 I<offset> が追加されており、\n"
12784 "この引き数は入力操作を行うファイルオフセットを指定する。"
12785
12786 #. type: Plain text
12787 #: build/C/man2/readv.2:172
12788 msgid ""
12789 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
12790 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
12791 "argument, I<offset>, which specifies the file offset at which the output "
12792 "operation is to be performed."
12793 msgstr ""
12794 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
12795 "組み合わせたものである。\n"
12796 "B<writev>() と同じ処理を実行するが、\n"
12797 "4 番目の引き数 I<offset> が追加されており、\n"
12798 "この引き数は出力操作を行うファイルオフセットを指定する。"
12799
12800 #. type: Plain text
12801 #: build/C/man2/readv.2:177
12802 msgid ""
12803 "The file offset is not changed by these system calls.  The file referred to "
12804 "by I<fd> must be capable of seeking."
12805 msgstr ""
12806 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
12807 "I<fd> が参照するファイルは seek 可能でなければならない。"
12808
12809 #. type: Plain text
12810 #: build/C/man2/readv.2:188
12811 msgid ""
12812 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
12813 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
12814 "error, -1 is returned, and I<errno> is set appropriately."
12815 msgstr ""
12816 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
12817 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
12818 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
12819
12820 #. type: Plain text
12821 #: build/C/man2/readv.2:200
12822 msgid ""
12823 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
12824 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as "
12825 "B<lseek>(2).  Additionally, the following error is defined:"
12826 msgstr ""
12827 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
12828 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
12829 "る。\n"
12830 "また、追加で以下のエラーが定義されている:"
12831
12832 #. type: Plain text
12833 #: build/C/man2/readv.2:209
12834 msgid ""
12835 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
12836 "vector count I<iovcnt> is less than zero or greater than the permitted "
12837 "maximum."
12838 msgstr ""
12839 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
12840 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
12841
12842 #. type: Plain text
12843 #: build/C/man2/readv.2:214
12844 msgid ""
12845 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
12846 "support was added in glibc 2.10."
12847 msgstr ""
12848 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
12849 "ライブラリによるサポートは glibc 2.10 で追加された。"
12850
12851 #.  Linux libc5 used \fIsize_t\fP as the type of the \fIiovcnt\fP argument,
12852 #.  and \fIint\fP as the return type.
12853 #.  The readv/writev system calls were buggy before Linux 1.3.40.
12854 #.  (Says release.libc.)
12855 #. type: Plain text
12856 #: build/C/man2/readv.2:222
12857 msgid ""
12858 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
12859 "4.2BSD), POSIX.1-2001."
12860 msgstr ""
12861 "B<readv>(), B<writev>(): 4.4BSD (これらのシステムコールは 4.2BSD で初めて登場"
12862 "した), POSIX.1-2001."
12863
12864 #. type: Plain text
12865 #: build/C/man2/readv.2:226
12866 msgid ""
12867 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
12868 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
12869
12870 #. type: SS
12871 #: build/C/man2/readv.2:227
12872 #, no-wrap
12873 msgid "C library/kernel ABI differences"
12874 msgstr "C ライブラリとカーネル ABI の違い"
12875
12876 #. type: Plain text
12877 #: build/C/man2/readv.2:258
12878 msgid ""
12879 "POSIX.1-2001 allows an implementation to place a limit on the number of "
12880 "items that can be passed in I<iov>.  An implementation can advertise its "
12881 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
12882 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
12883 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
12884 "glibc wrapper functions do some extra work if they detect that the "
12885 "underlying kernel system call failed because this limit was exceeded.  In "
12886 "the case of B<readv>(), the wrapper function allocates a temporary buffer "
12887 "large enough for all of the items specified by I<iov>, passes that buffer in "
12888 "a call to B<read>(2), copies data from the buffer to the locations specified "
12889 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
12890 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
12891 "using a temporary buffer and a call to B<write>(2)."
12892 msgstr ""
12893 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
12894 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
12895 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
12896 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
12897 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
12898 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
12899 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
12900 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
12901 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
12902 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
12903 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って "
12904 "B<write>(2)  を呼び出す。"
12905
12906 #. type: Plain text
12907 #: build/C/man2/readv.2:268
12908 msgid ""
12909 "The raw B<preadv>()  and B<pwritev>()  system calls have call signatures "
12910 "that differ slightly from that of the corresponding GNU C library wrapper "
12911 "functions shown in the SYNOPSIS.  The final argument, I<offset>, is unpacked "
12912 "by the wrapper functions into two arguments in the system calls:"
12913 msgstr ""
12914 "素のシステムコール B<preadv>() と B<pwritev>() のシグネチャーは、 「書式」に"
12915 "書かれている対応する GNU C ライブラリのラッパー関数のものとは少し異なる。 最"
12916 "後の引き数 I<offset> はラッパー関数によりシステムコールの 2 つの引き数に展開"
12917 "される。"
12918
12919 #. type: Plain text
12920 #: build/C/man2/readv.2:270
12921 msgid "B< unsigned long >I<pos_l>B<, unsigned long >I<pos>"
12922 msgstr "B< unsigned long >I<pos_l>B<, unsigned long >I<pos>"
12923
12924 #. type: Plain text
12925 #: build/C/man2/readv.2:273
12926 msgid ""
12927 "These arguments contain, respectively, the low order and high order 32 bits "
12928 "of I<offset>."
12929 msgstr ""
12930 "これらの引き数は、それぞれ、 I<offset> の下位 32 ビットと上位 32 ビットであ"
12931 "る。"
12932
12933 #. type: Plain text
12934 #: build/C/man2/readv.2:280
12935 msgid ""
12936 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
12937 "operate on file descriptors, with the functions from the stdio library; the "
12938 "results will be undefined and probably not what you want."
12939 msgstr ""
12940 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
12941 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
12942 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
12943 "得られないだろう。"
12944
12945 #. type: Plain text
12946 #: build/C/man2/readv.2:283
12947 msgid "The following code sample demonstrates the use of B<writev>():"
12948 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
12949
12950 #. type: Plain text
12951 #: build/C/man2/readv.2:290
12952 #, no-wrap
12953 msgid ""
12954 "char *str0 = \"hello \";\n"
12955 "char *str1 = \"world\\en\";\n"
12956 "struct iovec iov[2];\n"
12957 "ssize_t nwritten;\n"
12958 msgstr ""
12959 "char *str0 = \"hello \";\n"
12960 "char *str1 = \"world\\en\";\n"
12961 "struct iovec iov[2];\n"
12962 "ssize_t nwritten;\n"
12963
12964 #. type: Plain text
12965 #: build/C/man2/readv.2:295
12966 #, no-wrap
12967 msgid ""
12968 "iov[0].iov_base = str0;\n"
12969 "iov[0].iov_len = strlen(str0);\n"
12970 "iov[1].iov_base = str1;\n"
12971 "iov[1].iov_len = strlen(str1);\n"
12972 msgstr ""
12973 "iov[0].iov_base = str0;\n"
12974 "iov[0].iov_len = strlen(str0);\n"
12975 "iov[1].iov_base = str1;\n"
12976 "iov[1].iov_len = strlen(str1);\n"
12977
12978 #. type: Plain text
12979 #: build/C/man2/readv.2:297
12980 #, no-wrap
12981 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
12982 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
12983
12984 #. type: Plain text
12985 #: build/C/man2/readv.2:303
12986 msgid "B<pread>(2), B<read>(2), B<write>(2)"
12987 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
12988
12989 #. type: TH
12990 #: build/C/man3/remove.3:31
12991 #, no-wrap
12992 msgid "REMOVE"
12993 msgstr "REMOVE"
12994
12995 #. type: Plain text
12996 #: build/C/man3/remove.3:34
12997 msgid "remove - remove a file or directory"
12998 msgstr "remove - ファイルやディレクトリを削除する"
12999
13000 #. type: Plain text
13001 #: build/C/man3/remove.3:38
13002 msgid "B<int remove(const char *>I<pathname>B<);>"
13003 msgstr "B<int remove(const char *>I<pathname>B<);>"
13004
13005 #. type: Plain text
13006 #: build/C/man3/remove.3:46
13007 msgid ""
13008 "B<remove>()  deletes a name from the filesystem.  It calls B<unlink>(2)  for "
13009 "files, and B<rmdir>(2)  for directories."
13010 msgstr ""
13011 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
13012 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
13013
13014 #. type: Plain text
13015 #: build/C/man3/remove.3:50
13016 msgid ""
13017 "If the removed name was the last link to a file and no processes have the "
13018 "file open, the file is deleted and the space it was using is made available "
13019 "for reuse."
13020 msgstr ""
13021 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
13022 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
13023 "ことができるようになる。"
13024
13025 #. type: Plain text
13026 #: build/C/man3/remove.3:55
13027 msgid ""
13028 "If the name was the last link to a file, but any processes still have the "
13029 "file open, the file will remain in existence until the last file descriptor "
13030 "referring to it is closed."
13031 msgstr ""
13032 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
13033 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
13034 "でファイルは存在し続ける。"
13035
13036 #. type: Plain text
13037 #: build/C/man3/remove.3:57 build/C/man2/unlink.2:78
13038 msgid "If the name referred to a symbolic link, the link is removed."
13039 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
13040
13041 #. type: Plain text
13042 #: build/C/man3/remove.3:60
13043 msgid ""
13044 "If the name referred to a socket, FIFO, or device, the name is removed, but "
13045 "processes which have the object open may continue to use it."
13046 msgstr ""
13047 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
13048 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
13049
13050 #. type: Plain text
13051 #: build/C/man3/remove.3:70
13052 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
13053 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
13054
13055 #. type: Plain text
13056 #: build/C/man3/remove.3:75
13057 msgid "The B<remove>()  function is thread-safe."
13058 msgstr "関数 B<remove>() はスレッドセーフである。"
13059
13060 #.  .SH NOTES
13061 #.  Under libc4 and libc5,
13062 #.  .BR remove ()
13063 #.  was an alias for
13064 #.  .BR unlink (2)
13065 #.  (and hence would not remove directories).
13066 #. type: Plain text
13067 #: build/C/man3/remove.3:83
13068 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
13069 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
13070
13071 #. type: Plain text
13072 #: build/C/man3/remove.3:86 build/C/man2/unlink.2:300
13073 msgid ""
13074 "Infelicities in the protocol underlying NFS can cause the unexpected "
13075 "disappearance of files which are still being used."
13076 msgstr ""
13077 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
13078 "うことがありえる。"
13079
13080 #. type: Plain text
13081 #: build/C/man3/remove.3:97
13082 msgid ""
13083 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
13084 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
13085 msgstr ""
13086 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
13087 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
13088
13089 #. type: TH
13090 #: build/C/man2/rename.2:33
13091 #, no-wrap
13092 msgid "RENAME"
13093 msgstr "RENAME"
13094
13095 #. type: Plain text
13096 #: build/C/man2/rename.2:36
13097 msgid "rename, renameat, renameat2 - change the name or location of a file"
13098 msgstr "rename, renameat, renameat2 - ファイルの名前や位置を変更する"
13099
13100 #. type: Plain text
13101 #: build/C/man2/rename.2:41
13102 #, no-wrap
13103 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
13104 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
13105
13106 #. type: Plain text
13107 #: build/C/man2/rename.2:44
13108 #, no-wrap
13109 msgid ""
13110 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
13111 "B<#include E<lt>stdio.hE<gt>>\n"
13112 msgstr ""
13113 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
13114 "B<#include E<lt>stdio.hE<gt>>\n"
13115
13116 #. type: Plain text
13117 #: build/C/man2/rename.2:47
13118 #, no-wrap
13119 msgid ""
13120 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13121 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
13122 msgstr ""
13123 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13124 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
13125
13126 #. type: Plain text
13127 #: build/C/man2/rename.2:51
13128 #, no-wrap
13129 msgid ""
13130 "B<int renameat2(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13131 "B<              int >I<newdirfd>B<, const char *>I<newpath>B<, unsigned int >I<flags>B<);>\n"
13132 msgstr ""
13133 "B<int renameat2(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
13134 "B<              int >I<newdirfd>B<, const char *>I<newpath>B<, unsigned int >I<flags>B<);>\n"
13135
13136 #. type: Plain text
13137 #: build/C/man2/rename.2:59
13138 msgid "B<renameat>():"
13139 msgstr "B<renameat>():"
13140
13141 #. type: Plain text
13142 #: build/C/man2/rename.2:81
13143 msgid ""
13144 "B<rename>()  renames a file, moving it between directories if required.  Any "
13145 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
13146 "Open file descriptors for I<oldpath> are also unaffected."
13147 msgstr ""
13148 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
13149 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
13150 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
13151 "リプタにも影響はない。"
13152
13153 #. type: Plain text
13154 #: build/C/man2/rename.2:89
13155 msgid ""
13156 "If I<newpath> already exists, it will be atomically replaced (subject to a "
13157 "few conditions; see ERRORS below), so that there is no point at which "
13158 "another process attempting to access I<newpath> will find it missing."
13159 msgstr ""
13160 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
13161 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
13162 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
13163 "とはない (訳註: 常にアクセス可能である)。"
13164
13165 #. type: Plain text
13166 #: build/C/man2/rename.2:97
13167 msgid ""
13168 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
13169 "file, then B<rename>()  does nothing, and returns a success status."
13170 msgstr ""
13171 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
13172 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
13173
13174 #. type: Plain text
13175 #: build/C/man2/rename.2:105
13176 msgid ""
13177 "If I<newpath> exists but the operation fails for some reason, B<rename>()  "
13178 "guarantees to leave an instance of I<newpath> in place."
13179 msgstr ""
13180 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
13181 "I<newpath> の実体を元のまま残すことを保証する。"
13182
13183 #. type: Plain text
13184 #: build/C/man2/rename.2:111
13185 msgid ""
13186 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
13187 "not exist, or it must specify an empty directory."
13188 msgstr ""
13189 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
13190 "存在しないか、空のディレクトリでなければならない。"
13191
13192 #. type: Plain text
13193 #: build/C/man2/rename.2:118
13194 msgid ""
13195 "However, when overwriting there will probably be a window in which both "
13196 "I<oldpath> and I<newpath> refer to the file being renamed."
13197 msgstr ""
13198 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
13199 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
13200
13201 #. type: Plain text
13202 #: build/C/man2/rename.2:124
13203 msgid ""
13204 "If I<oldpath> refers to a symbolic link, the link is renamed; if I<newpath> "
13205 "refers to a symbolic link, the link will be overwritten."
13206 msgstr ""
13207 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
13208 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
13209 "は、リンクが上書きされる。"
13210
13211 #. type: SS
13212 #: build/C/man2/rename.2:124
13213 #, no-wrap
13214 msgid "renameat()"
13215 msgstr "renameat()"
13216
13217 #. type: Plain text
13218 #: build/C/man2/rename.2:130
13219 msgid ""
13220 "The B<renameat>()  system call operates in exactly the same way as "
13221 "B<rename>(), except for the differences described here."
13222 msgstr ""
13223 "B<renameat>() システムコールは B<rename>() と全く同様に動作するが、以下で説明"
13224 "する点が異なる。"
13225
13226 #. type: Plain text
13227 #: build/C/man2/rename.2:140
13228 msgid ""
13229 "If the pathname given in I<oldpath> is relative, then it is interpreted "
13230 "relative to the directory referred to by the file descriptor I<olddirfd> "
13231 "(rather than relative to the current working directory of the calling "
13232 "process, as is done by B<rename>()  for a relative pathname)."
13233 msgstr ""
13234 "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリ"
13235 "プター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される "
13236 "(B<rename>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
13237 "ワーキングディレクトリに対する相対パスではない)。"
13238
13239 #. type: Plain text
13240 #: build/C/man2/rename.2:152
13241 msgid ""
13242 "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, "
13243 "then I<oldpath> is interpreted relative to the current working directory of "
13244 "the calling process (like B<rename>())."
13245 msgstr ""
13246 "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 "
13247 "B<AT_FDCWD> の場合、 (B<rename>(2) と同様に) I<oldpath> は呼び出したプロセス"
13248 "のカレントワーキングディレクトリに対する相対パスと解釈される。"
13249
13250 #. type: Plain text
13251 #: build/C/man2/rename.2:171
13252 msgid "See B<openat>(2)  for an explanation of the need for B<renameat>()."
13253 msgstr "B<renameat>() の必要性についての説明については B<openat>(2) を参照。"
13254
13255 #. type: SS
13256 #: build/C/man2/rename.2:171
13257 #, no-wrap
13258 msgid "renameat2()"
13259 msgstr "renameat2()"
13260
13261 #. type: Plain text
13262 #: build/C/man2/rename.2:182
13263 msgid ""
13264 "B<renameat2>()  has an additional I<flags> argument.  A B<renameat2>()  call "
13265 "with a zero I<flags> argument is equivalent to B<renameat>()."
13266 msgstr ""
13267
13268 #. type: Plain text
13269 #: build/C/man2/rename.2:186
13270 #, fuzzy
13271 #| msgid "The character % is followed by zero or more of the following flags:"
13272 msgid ""
13273 "The I<flags> argument is a bit mask consisting of zero or more of the "
13274 "following flags:"
13275 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
13276
13277 #. type: TP
13278 #: build/C/man2/rename.2:186
13279 #, no-wrap
13280 msgid "B<RENAME_NOREPLACE>"
13281 msgstr ""
13282
13283 #. type: Plain text
13284 #: build/C/man2/rename.2:194
13285 msgid ""
13286 "Don't overwrite I<newpath>.  of the rename.  Return an error if I<newpath> "
13287 "already exists."
13288 msgstr ""
13289
13290 #. type: TP
13291 #: build/C/man2/rename.2:194
13292 #, no-wrap
13293 msgid "B<RENAME_EXCHANGE>"
13294 msgstr "B<RENAME_EXCHANGE>"
13295
13296 #. type: Plain text
13297 #: build/C/man2/rename.2:203
13298 msgid ""
13299 "Atomically exchange I<oldpath> and I<newpath>.  Both pathnames must exist "
13300 "but may be of different types (e.g., one could be a non-empty directory and "
13301 "the other a symbolic link)."
13302 msgstr ""
13303
13304 #. type: Plain text
13305 #: build/C/man2/rename.2:228
13306 msgid ""
13307 "Write permission is denied for the directory containing I<oldpath> or "
13308 "I<newpath>, or, search permission is denied for one of the directories in "
13309 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
13310 "and does not allow write permission (needed to update the I<..> entry).  "
13311 "(See also B<path_resolution>(7).)"
13312 msgstr ""
13313 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
13314 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
13315 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
13316 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
13317
13318 #. type: TP
13319 #: build/C/man2/rename.2:228 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:169
13320 #, no-wrap
13321 msgid "B<EBUSY>"
13322 msgstr "B<EBUSY>"
13323
13324 #. type: Plain text
13325 #: build/C/man2/rename.2:245
13326 msgid ""
13327 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
13328 "use by some process (perhaps as current working directory, or as root "
13329 "directory, or because it was open for reading) or is in use by the system "
13330 "(for example as mount point), while the system considers this an error.  "
13331 "(Note that there is no requirement to return B<EBUSY> in such cases"
13332 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
13333 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
13334 "situations.)"
13335 msgstr ""
13336 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
13337 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
13338 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
13339 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
13340 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
13341 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
13342 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
13343 "B<EBUSY> を返すことが許されている。)"
13344
13345 #. type: Plain text
13346 #: build/C/man2/rename.2:255
13347 msgid ""
13348 "The new pathname contained a path prefix of the old, or, more generally, an "
13349 "attempt was made to make a directory a subdirectory of itself."
13350 msgstr ""
13351 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
13352 "ディレクトリに 変更しようとした場合がほとんどである。"
13353
13354 #. type: Plain text
13355 #: build/C/man2/rename.2:261
13356 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
13357 msgstr ""
13358 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
13359 "い。"
13360
13361 #. type: Plain text
13362 #: build/C/man2/rename.2:272
13363 msgid ""
13364 "I<oldpath> already has the maximum number of links to it, or it was a "
13365 "directory and the directory containing I<newpath> has the maximum number of "
13366 "links."
13367 msgstr ""
13368 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
13369 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
13370
13371 #. type: Plain text
13372 #: build/C/man2/rename.2:288
13373 msgid ""
13374 "The link named by I<oldpath> does not exist; or, a directory component in "
13375 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
13376 msgstr ""
13377 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
13378 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
13379
13380 #. type: Plain text
13381 #: build/C/man2/rename.2:305
13382 msgid ""
13383 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
13384 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
13385 "not a directory."
13386 msgstr ""
13387 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
13388 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
13389 "トリでない。"
13390
13391 #. type: TP
13392 #: build/C/man2/rename.2:305
13393 #, no-wrap
13394 msgid "B<ENOTEMPTY> or B<EEXIST>"
13395 msgstr "B<ENOTEMPTY  または  EEXIST>"
13396
13397 #. type: Plain text
13398 #: build/C/man2/rename.2:309
13399 msgid ""
13400 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
13401 "\" and \"..\"."
13402 msgstr ""
13403 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
13404 "でいる。"
13405
13406 #. type: TP
13407 #: build/C/man2/rename.2:309 build/C/man2/unlink.2:224
13408 #, no-wrap
13409 msgid "B<EPERM> or B<EACCES>"
13410 msgstr "B<EPERM> または B<EACCES>"
13411
13412 #. type: Plain text
13413 #: build/C/man2/rename.2:333
13414 msgid ""
13415 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
13416 "the process's effective user ID is neither the user ID of the file to be "
13417 "deleted nor that of the directory containing it, and the process is not "
13418 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
13419 "I<newpath> is an existing file and the directory containing it has the "
13420 "sticky bit set and the process's effective user ID is neither the user ID of "
13421 "the file to be replaced nor that of the directory containing it, and the "
13422 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
13423 "capability); or the filesystem containing I<pathname> does not support "
13424 "renaming of the type requested."
13425 msgstr ""
13426 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
13427 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
13428 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
13429 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
13430 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
13431 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
13432 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
13433 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
13434 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
13435 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
13436
13437 #. type: Plain text
13438 #: build/C/man2/rename.2:344
13439 msgid ""
13440 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
13441 "permits a filesystem to be mounted at multiple points, but B<rename>()  does "
13442 "not work across different mount points, even if the same filesystem is "
13443 "mounted on both.)"
13444 msgstr ""
13445 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
13446 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
13447 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
13448 "別々のマウント位置を跨いでは動作しない。)"
13449
13450 #. type: Plain text
13451 #: build/C/man2/rename.2:349
13452 msgid ""
13453 "The following additional errors can occur for B<renameat>()  and "
13454 "B<renameat2>():"
13455 msgstr "B<renameat>() と B<renameat2>() では以下のエラーも発生する。"
13456
13457 #. type: Plain text
13458 #: build/C/man2/rename.2:368
13459 msgid "The following additional errors can occur for B<renameat2>():"
13460 msgstr "B<renameat2>() では以下のエラーも発生する。"
13461
13462 #. type: Plain text
13463 #: build/C/man2/rename.2:376
13464 msgid "I<flags> contains B<RENAME_NOREPLACE> and I<newpath> already exists."
13465 msgstr ""
13466
13467 #. type: Plain text
13468 #: build/C/man2/rename.2:385
13469 msgid ""
13470 "An invalid flag was specified in I<flags>, or both B<RENAME_NOREPLACE> and "
13471 "B<RENAME_EXCHANGE> were specified."
13472 msgstr ""
13473
13474 #. type: Plain text
13475 #: build/C/man2/rename.2:389
13476 msgid "The filesystem does not support one of the flags in I<flags>."
13477 msgstr ""
13478
13479 #. type: Plain text
13480 #: build/C/man2/rename.2:397
13481 msgid "I<flags> contains B<RENAME_EXCHANGE> and I<newpath> does not exist."
13482 msgstr ""
13483
13484 #. type: Plain text
13485 #: build/C/man2/rename.2:401
13486 msgid ""
13487 "B<renameat>()  was added to Linux in kernel 2.6.16; library support was "
13488 "added to glibc in version 2.4."
13489 msgstr ""
13490 "B<renameat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
13491 "ポートはバージョン 2.4 で glibc に追加された。"
13492
13493 #.  FIXME . glibc support is pending.
13494 #. type: Plain text
13495 #: build/C/man2/rename.2:405
13496 msgid "B<renameat2>()  was added to Linux in kernel 3.15."
13497 msgstr "B<renameat2>()  はカーネル 2.6.16 で Linux に追加された。"
13498
13499 #. type: Plain text
13500 #: build/C/man2/rename.2:408
13501 msgid "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
13502 msgstr "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
13503
13504 #. type: Plain text
13505 #: build/C/man2/rename.2:411
13506 msgid "B<renameat>(): POSIX.1-2008."
13507 msgstr "B<renameat>(): POSIX.1-2008."
13508
13509 #. type: Plain text
13510 #: build/C/man2/rename.2:414
13511 msgid "B<renameat2>()  is Linux-specific."
13512 msgstr "B<renameat2>()  は Linux 固有である。"
13513
13514 #. type: Plain text
13515 #: build/C/man2/rename.2:432
13516 msgid ""
13517 "On older kernels where B<renameat>()  is unavailable, the glibc wrapper "
13518 "function falls back to the use of B<rename>().  When I<oldpath> and "
13519 "I<newpath> are relative pathnames, glibc constructs pathnames based on the "
13520 "symbolic links in I</proc/self/fd> that correspond to the I<olddirfd> and "
13521 "I<newdirfd> arguments."
13522 msgstr ""
13523 "B<renameat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
13524 "B<rename>() を使用するモードにフォールバックする。 I<oldpath> と I<newpath> "
13525 "が相対パスの場合、 glibc は I<olddirfd> と I<newdirfd> 引き数に対応する I</"
13526 "proc/self/fd> のシンボリックリンクに基づいてそれぞれパス名を構成する。"
13527
13528 #. type: Plain text
13529 #: build/C/man2/rename.2:443
13530 msgid ""
13531 "On NFS filesystems, you can not assume that if the operation failed, the "
13532 "file was not renamed.  If the server does the rename operation and then "
13533 "crashes, the retransmitted RPC which will be processed when the server is up "
13534 "again causes a failure.  The application is expected to deal with this.  See "
13535 "B<link>(2)  for a similar problem."
13536 msgstr ""
13537 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
13538 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
13539 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
13540 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
13541 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
13542
13543 #. type: Plain text
13544 #: build/C/man2/rename.2:451
13545 msgid ""
13546 "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), "
13547 "B<path_resolution>(7), B<symlink>(7)"
13548 msgstr ""
13549 "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), "
13550 "B<path_resolution>(7), B<symlink>(7)"
13551
13552 #. type: TH
13553 #: build/C/man2/rmdir.2:30
13554 #, no-wrap
13555 msgid "RMDIR"
13556 msgstr "RMDIR"
13557
13558 #. type: TH
13559 #: build/C/man2/rmdir.2:30
13560 #, no-wrap
13561 msgid "2008-05-08"
13562 msgstr "2008-05-08"
13563
13564 #. type: Plain text
13565 #: build/C/man2/rmdir.2:33
13566 msgid "rmdir - delete a directory"
13567 msgstr "rmdir - ディレクトリを削除する"
13568
13569 #. type: Plain text
13570 #: build/C/man2/rmdir.2:37
13571 msgid "B<int rmdir(const char *>I<pathname>B<);>"
13572 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
13573
13574 #. type: Plain text
13575 #: build/C/man2/rmdir.2:40
13576 msgid "B<rmdir>()  deletes a directory, which must be empty."
13577 msgstr ""
13578 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
13579 "ない。"
13580
13581 #. type: Plain text
13582 #: build/C/man2/rmdir.2:55
13583 msgid ""
13584 "Write access to the directory containing I<pathname> was not allowed, or one "
13585 "of the directories in the path prefix of I<pathname> did not allow search "
13586 "permission.  (See also B<path_resolution>(7)."
13587 msgstr ""
13588 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
13589 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
13590 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
13591 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
13592 "と)"
13593
13594 #. type: Plain text
13595 #: build/C/man2/rmdir.2:64
13596 msgid ""
13597 "I<pathname> is currently in use by the system or some process that prevents "
13598 "its removal.  On Linux this means I<pathname> is currently used as a mount "
13599 "point or is the root directory of the calling process."
13600 msgstr ""
13601 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
13602 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
13603 "たプロセスのルートディレクトリであることを意味する。"
13604
13605 #. type: Plain text
13606 #: build/C/man2/rmdir.2:73
13607 msgid "I<pathname> has I<.> as last component."
13608 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
13609
13610 #. type: Plain text
13611 #: build/C/man2/rmdir.2:85
13612 msgid ""
13613 "A directory component in I<pathname> does not exist or is a dangling "
13614 "symbolic link."
13615 msgstr ""
13616 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
13617 "リックリンク (symbolic link) である。"
13618
13619 #. type: Plain text
13620 #: build/C/man2/rmdir.2:94
13621 msgid ""
13622 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
13623 "fact, a directory."
13624 msgstr ""
13625 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
13626 "クトリでない。"
13627
13628 #. type: TP
13629 #: build/C/man2/rmdir.2:94
13630 #, no-wrap
13631 msgid "B<ENOTEMPTY>"
13632 msgstr "B<ENOTEMPTY>"
13633
13634 #. type: Plain text
13635 #: build/C/man2/rmdir.2:107
13636 msgid ""
13637 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
13638 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
13639 "condition."
13640 msgstr ""
13641 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
13642 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
13643 "で B<EEXIST> を返すことを認めている。"
13644
13645 #. type: Plain text
13646 #: build/C/man2/rmdir.2:118
13647 msgid ""
13648 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
13649 "and the process's effective user ID is neither the user ID of the file to be "
13650 "deleted nor that of the directory containing it, and the process is not "
13651 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
13652 msgstr ""
13653 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
13654 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
13655 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
13656 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
13657
13658 #. type: Plain text
13659 #: build/C/man2/rmdir.2:123
13660 msgid ""
13661 "The filesystem containing I<pathname> does not support the removal of "
13662 "directories."
13663 msgstr ""
13664 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
13665 "ない。"
13666
13667 #. type: Plain text
13668 #: build/C/man2/rmdir.2:127
13669 msgid "I<pathname> refers to a directory on a read-only filesystem."
13670 msgstr ""
13671 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
13672
13673 #. type: Plain text
13674 #: build/C/man2/rmdir.2:132
13675 msgid ""
13676 "Infelicities in the protocol underlying NFS can cause the unexpected "
13677 "disappearance of directories which are still being used."
13678 msgstr ""
13679 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
13680 "する現象が引き起こされることがある。"
13681
13682 #. type: Plain text
13683 #: build/C/man2/rmdir.2:141
13684 msgid ""
13685 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
13686 "B<unlink>(2), B<unlinkat>(2)"
13687 msgstr ""
13688 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
13689 "B<unlink>(2), B<unlinkat>(2)"
13690
13691 #. type: TH
13692 #: build/C/man3/scanf.3:52
13693 #, no-wrap
13694 msgid "SCANF"
13695 msgstr "SCANF"
13696
13697 #. type: Plain text
13698 #: build/C/man3/scanf.3:55
13699 msgid ""
13700 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
13701 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
13702
13703 #. type: Plain text
13704 #: build/C/man3/scanf.3:62
13705 #, no-wrap
13706 msgid ""
13707 "B<int scanf(const char *>I<format>B<, ...);>\n"
13708 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
13709 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
13710 msgstr ""
13711 "B<int scanf(const char *>I<format>B<, ...);>\n"
13712 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
13713 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
13714
13715 #. type: Plain text
13716 #: build/C/man3/scanf.3:64
13717 #, no-wrap
13718 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
13719 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
13720
13721 #. type: Plain text
13722 #: build/C/man3/scanf.3:68
13723 #, no-wrap
13724 msgid ""
13725 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
13726 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13727 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13728 msgstr ""
13729 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
13730 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13731 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13732
13733 #. type: Plain text
13734 #: build/C/man3/scanf.3:79
13735 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
13736 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
13737
13738 #. type: Plain text
13739 #: build/C/man3/scanf.3:82
13740 msgid ""
13741 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
13742 "200112L;"
13743 msgstr ""
13744 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
13745 "200112L;"
13746
13747 #. type: Plain text
13748 #: build/C/man3/scanf.3:104
13749 msgid ""
13750 "The B<scanf>()  family of functions scans input according to I<format> as "
13751 "described below.  This format may contain I<conversion specifications>; the "
13752 "results from such conversions, if any, are stored in the locations pointed "
13753 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
13754 "argument must be of a type that is appropriate for the value returned by the "
13755 "corresponding conversion specification."
13756 msgstr ""
13757 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
13758 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
13759 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
13760 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
13761 "は、対応する変換指定が返す値に 適合していなければならない。"
13762
13763 #. type: Plain text
13764 #: build/C/man3/scanf.3:115
13765 msgid ""
13766 "If the number of conversion specifications in I<format> exceeds the number "
13767 "of I<pointer> arguments, the results are undefined.  If the number of "
13768 "I<pointer> arguments exceeds the number of conversion specifications, then "
13769 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
13770 msgstr ""
13771 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
13772 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
13773 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
13774
13775 #. type: Plain text
13776 #: build/C/man3/scanf.3:127
13777 msgid ""
13778 "The B<scanf>()  function reads input from the standard input stream "
13779 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
13780 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
13781 msgstr ""
13782 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
13783 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 "
13784 "B<sscanf>()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
13785
13786 #. type: Plain text
13787 #: build/C/man3/scanf.3:145
13788 msgid ""
13789 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
13790 "from the stream pointer I<stream> using a variable argument list of pointers "
13791 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
13792 "from the standard input and the B<vsscanf>()  function scans it from a "
13793 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
13794 "functions respectively."
13795 msgstr ""
13796 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
13797 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
13798 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
13799 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
13800 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
13801
13802 #. type: Plain text
13803 #: build/C/man3/scanf.3:159
13804 msgid ""
13805 "The I<format> string consists of a sequence of I<directives> which describe "
13806 "how to process the sequence of input characters.  If processing of a "
13807 "directive fails, no further input is read, and B<scanf>()  returns.  A "
13808 "\"failure\" can be either of the following: I<input failure>, meaning that "
13809 "input characters were unavailable, or I<matching failure>, meaning that the "
13810 "input was inappropriate (see below)."
13811 msgstr ""
13812 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
13813 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
13814 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
13815 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
13816 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
13817 "であったこと (下記参照) を意味する。"
13818
13819 #. type: Plain text
13820 #: build/C/man3/scanf.3:161
13821 msgid "A directive is one of the following:"
13822 msgstr "命令は以下のいずれかである:"
13823
13824 #. type: TP
13825 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
13826 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
13827 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
13828 #, no-wrap
13829 msgid "\\(bu"
13830 msgstr "\\(bu"
13831
13832 #. type: Plain text
13833 #: build/C/man3/scanf.3:167
13834 msgid ""
13835 "A sequence of white-space characters (space, tab, newline, etc.; see "
13836 "B<isspace>(3)).  This directive matches any amount of white space, including "
13837 "none, in the input."
13838 msgstr ""
13839 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
13840 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
13841 "致する)。"
13842
13843 #. type: Plain text
13844 #: build/C/man3/scanf.3:171
13845 msgid ""
13846 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
13847 "This character must exactly match the next character of input."
13848 msgstr ""
13849 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
13850 "の次の文字に正確に一致しなければならない。"
13851
13852 #. type: Plain text
13853 #: build/C/man3/scanf.3:182
13854 msgid ""
13855 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
13856 "character.  A sequence of characters from the input is converted according "
13857 "to this specification, and the result is placed in the corresponding "
13858 "I<pointer> argument.  If the next item of input does not match the "
13859 "conversion specification, the conversion fails\\(emthis is a I<matching "
13860 "failure>."
13861 msgstr ""
13862 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
13863 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
13864 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
13865 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
13866
13867 #. type: Plain text
13868 #: build/C/man3/scanf.3:190
13869 msgid ""
13870 "Each I<conversion specification> in I<format> begins with either the "
13871 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
13872 "for the distinction) followed by:"
13873 msgstr ""
13874 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
13875 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
13876
13877 #. type: Plain text
13878 #: build/C/man3/scanf.3:201
13879 msgid ""
13880 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
13881 "input as directed by the conversion specification, but discards the input.  "
13882 "No corresponding I<pointer> argument is required, and this specification is "
13883 "not included in the count of successful assignments returned by B<scanf>()."
13884 msgstr ""
13885 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
13886 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
13887 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
13888
13889 #. type: Plain text
13890 #: build/C/man3/scanf.3:220
13891 msgid ""
13892 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
13893 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
13894 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
13895 "buffer of sufficient size, and assigns the address of this buffer to the "
13896 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
13897 "*> variable (this variable does not need to be initialized before the "
13898 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
13899 "longer required."
13900 msgstr ""
13901 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
13902 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
13903 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
13904 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
13905 "は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に"
13906 "初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファ"
13907 "を B<free>(3) すべきである。"
13908
13909 #. type: Plain text
13910 #: build/C/man3/scanf.3:232
13911 msgid ""
13912 "An optional decimal integer which specifies the I<maximum field width>.  "
13913 "Reading of characters stops either when this maximum is reached or when a "
13914 "nonmatching character is found, whichever happens first.  Most conversions "
13915 "discard initial white space characters (the exceptions are noted below), and "
13916 "these discarded characters don't count toward the maximum field width.  "
13917 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
13918 "mark the end of the input; the maximum field width does not include this "
13919 "terminator."
13920 msgstr ""
13921 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
13922 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
13923 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
13924 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
13925 "の入力変換では、入力の末尾を示す終端のヌルバイト (\\(aq\\e0\\(aq)  も格納され"
13926 "るが、最大フィールド幅にはこの終端バイトは含まれない。"
13927
13928 #. type: Plain text
13929 #: build/C/man3/scanf.3:246
13930 msgid ""
13931 "An optional I<type modifier character>.  For example, the B<l> type modifier "
13932 "is used with integer conversions such as B<%d> to specify that the "
13933 "corresponding I<pointer> argument refers to a I<long int> rather than a "
13934 "pointer to an I<int>."
13935 msgstr ""
13936 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
13937 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
13938 "I<int> ではなく I<long int> を参照していることを指定できる。"
13939
13940 #. type: Plain text
13941 #: build/C/man3/scanf.3:251
13942 msgid ""
13943 "A I<conversion specifier> that specifies the type of input conversion to be "
13944 "performed."
13945 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
13946
13947 #. type: Plain text
13948 #: build/C/man3/scanf.3:280
13949 msgid ""
13950 "The conversion specifications in I<format> are of two forms, either "
13951 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
13952 "forms should not be mixed in the same I<format> string, except that a string "
13953 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
13954 "I<format> contains \\(aq%\\(aq specifications, then these correspond in "
13955 "order with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form "
13956 "(which is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer "
13957 "that specifies that the converted input should be placed in the location "
13958 "referred to by the I<n>-th I<pointer> argument following I<format>."
13959 msgstr ""
13960 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
13961 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
13962 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
13963 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
13964 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
13965 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
13966 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
13967 "I<pointer> 引き数が参照する場所に格納することを指定する。"
13968
13969 #. type: SS
13970 #: build/C/man3/scanf.3:280
13971 #, no-wrap
13972 msgid "Conversions"
13973 msgstr "変換"
13974
13975 #. type: Plain text
13976 #: build/C/man3/scanf.3:284
13977 msgid ""
13978 "The following I<type modifier characters> can appear in a conversion "
13979 "specification:"
13980 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
13981
13982 #. type: Plain text
13983 #: build/C/man3/scanf.3:294
13984 msgid ""
13985 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
13986 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
13987 "I<unsigned short int> (rather than I<int>)."
13988 msgstr ""
13989 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
13990 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
13991 "あることを示す。"
13992
13993 #. type: Plain text
13994 #: build/C/man3/scanf.3:302
13995 msgid ""
13996 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
13997 "I<unsigned char>."
13998 msgstr ""
13999 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
14000 "タであることを示す。"
14001
14002 #. type: Plain text
14003 #: build/C/man3/scanf.3:311
14004 msgid ""
14005 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
14006 "I<uintmax_t>.  This modifier was introduced in C99."
14007 msgstr ""
14008 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
14009 "ることを示す。 この修飾子は C99 で導入された。"
14010
14011 #.  This use of l was introduced in Amendment 1 to ISO C90.
14012 #. type: Plain text
14013 #: build/C/man3/scanf.3:338
14014 msgid ""
14015 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
14016 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
14017 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
14018 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
14019 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
14020 "B<L>.  If used with B<%c> or B<%s>, the corresponding parameter is "
14021 "considered as a pointer to a wide character or wide-character string "
14022 "respectively."
14023 msgstr ""
14024 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
14025 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
14026 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
14027 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
14028 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
14029 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
14030 "ンタであると みなされる。"
14031
14032 #.  MTK, Jul 05: The following is no longer true for modern
14033 #.  ANSI C (i.e., C99):
14034 #.  (Note that long long is not an
14035 #.  ANSI C
14036 #.  type. Any program using this will not be portable to all
14037 #.  architectures).
14038 #. type: Plain text
14039 #: build/C/man3/scanf.3:354
14040 msgid ""
14041 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
14042 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
14043 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
14044 msgstr ""
14045 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
14046 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
14047 "I<long long> へのポインタであることのいずれかであることを示す。"
14048
14049 #. type: TP
14050 #: build/C/man3/scanf.3:354
14051 #, no-wrap
14052 msgid "B<q>"
14053 msgstr "B<q>"
14054
14055 #. type: Plain text
14056 #: build/C/man3/scanf.3:359
14057 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
14058 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
14059
14060 #. type: Plain text
14061 #: build/C/man3/scanf.3:366
14062 msgid ""
14063 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
14064 "modifier was introduced in C99."
14065 msgstr ""
14066 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
14067 "この修飾子は C99 で導入された。"
14068
14069 #. type: Plain text
14070 #: build/C/man3/scanf.3:373
14071 msgid ""
14072 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
14073 "modifier was introduced in C99."
14074 msgstr ""
14075 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
14076 "修飾子は C99 で導入された。"
14077
14078 #. type: Plain text
14079 #: build/C/man3/scanf.3:377
14080 msgid "The following I<conversion specifiers> are available:"
14081 msgstr "以下の I<「変換指定子」> が利用可能である。"
14082
14083 #. type: Plain text
14084 #: build/C/man3/scanf.3:386
14085 msgid ""
14086 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
14087 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
14088 "initial white space characters are discarded), and assignment does not occur."
14089 msgstr ""
14090 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
14091 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
14092 "る)、 変数への代入は生じない。"
14093
14094 #. type: TP
14095 #: build/C/man3/scanf.3:386
14096 #, no-wrap
14097 msgid "B<d>"
14098 msgstr "B<d>"
14099
14100 #. type: Plain text
14101 #: build/C/man3/scanf.3:391
14102 msgid ""
14103 "Matches an optionally signed decimal integer; the next pointer must be a "
14104 "pointer to I<int>."
14105 msgstr ""
14106 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
14107 "ばならない。"
14108
14109 #. type: TP
14110 #: build/C/man3/scanf.3:391
14111 #, no-wrap
14112 msgid "B<D>"
14113 msgstr "B<D>"
14114
14115 #. type: Plain text
14116 #: build/C/man3/scanf.3:400
14117 msgid ""
14118 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
14119 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
14120 "causing old programs to fail mysteriously.)"
14121 msgstr ""
14122 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
14123 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
14124 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
14125
14126 #. type: TP
14127 #: build/C/man3/scanf.3:400
14128 #, no-wrap
14129 msgid "B<i>"
14130 msgstr "B<i>"
14131
14132 #. type: Plain text
14133 #: build/C/man3/scanf.3:412
14134 msgid ""
14135 "Matches an optionally signed integer; the next pointer must be a pointer to "
14136 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
14137 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
14138 "that correspond to the base are used."
14139 msgstr ""
14140 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
14141 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
14142 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
14143 "される文字は、これらの基数に対応しているものだけである。"
14144
14145 #. type: TP
14146 #: build/C/man3/scanf.3:412
14147 #, no-wrap
14148 msgid "B<o>"
14149 msgstr "B<o>"
14150
14151 #. type: Plain text
14152 #: build/C/man3/scanf.3:416
14153 msgid ""
14154 "Matches an unsigned octal integer; the next pointer must be a pointer to "
14155 "I<unsigned int>."
14156 msgstr ""
14157 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
14158 "らない。"
14159
14160 #. type: TP
14161 #: build/C/man3/scanf.3:416
14162 #, no-wrap
14163 msgid "B<u>"
14164 msgstr "B<u>"
14165
14166 #. type: Plain text
14167 #: build/C/man3/scanf.3:421
14168 msgid ""
14169 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
14170 "I<unsigned int>."
14171 msgstr ""
14172 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
14173 "でなければならない。"
14174
14175 #. type: Plain text
14176 #: build/C/man3/scanf.3:426
14177 msgid ""
14178 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
14179 "to I<unsigned int>."
14180 msgstr ""
14181 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
14182 "タでなければならない。"
14183
14184 #. type: TP
14185 #: build/C/man3/scanf.3:426
14186 #, no-wrap
14187 msgid "B<X>"
14188 msgstr "B<X>"
14189
14190 #. type: Plain text
14191 #: build/C/man3/scanf.3:430
14192 msgid "Equivalent to B<x>."
14193 msgstr "B<x> と同一である。"
14194
14195 #. type: TP
14196 #: build/C/man3/scanf.3:430
14197 #, no-wrap
14198 msgid "B<f>"
14199 msgstr "B<f>"
14200
14201 #. type: Plain text
14202 #: build/C/man3/scanf.3:435
14203 msgid ""
14204 "Matches an optionally signed floating-point number; the next pointer must be "
14205 "a pointer to I<float>."
14206 msgstr ""
14207 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
14208 "ればならない。"
14209
14210 #. type: TP
14211 #: build/C/man3/scanf.3:435
14212 #, no-wrap
14213 msgid "B<e>"
14214 msgstr "B<e>"
14215
14216 #. type: Plain text
14217 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
14218 msgid "Equivalent to B<f>."
14219 msgstr "B<f> と同一である。"
14220
14221 #. type: TP
14222 #: build/C/man3/scanf.3:439
14223 #, no-wrap
14224 msgid "B<g>"
14225 msgstr "B<g>"
14226
14227 #. type: TP
14228 #: build/C/man3/scanf.3:443
14229 #, no-wrap
14230 msgid "B<E>"
14231 msgstr "B<E>"
14232
14233 #. type: Plain text
14234 #: build/C/man3/scanf.3:451
14235 msgid "(C99) Equivalent to B<f>."
14236 msgstr "(C99)  B<f> と同一である。"
14237
14238 #. type: Plain text
14239 #: build/C/man3/scanf.3:459
14240 msgid ""
14241 "Matches a sequence of non-white-space characters; the next pointer must be a "
14242 "pointer to character array that is long enough to hold the input sequence "
14243 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
14244 "automatically.  The input string stops at white space or at the maximum "
14245 "field width, whichever occurs first."
14246 msgstr ""
14247 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
14248 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
14249 "的に追加される) 終端のヌルバイト (\\(aq\\e0\\(aq) を格納するのに十分な大きさ"
14250 "でなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
14251 "フィールド幅に 達するか、のどちらかが起こると停止される。"
14252
14253 #. type: Plain text
14254 #: build/C/man3/scanf.3:469
14255 msgid ""
14256 "Matches a sequence of characters whose length is specified by the I<maximum "
14257 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
14258 "there must be enough room for all the characters (no terminating null byte "
14259 "is added).  The usual skip of leading white space is suppressed.  To skip "
14260 "white space first, use an explicit space in the format."
14261 msgstr ""
14262 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
14263 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
14264 "領域が なければならない (終端のヌルバイトは追加されない)。 通常行われる先頭の"
14265 "ホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ばす"
14266 "ためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
14267
14268 #. type: TP
14269 #: build/C/man3/scanf.3:469
14270 #, no-wrap
14271 msgid "B<\\&[>"
14272 msgstr "B<\\&[>"
14273
14274 #. type: Plain text
14275 #: build/C/man3/scanf.3:502
14276 msgid ""
14277 "Matches a nonempty sequence of characters from the specified set of accepted "
14278 "characters; the next pointer must be a pointer to I<char>, and there must be "
14279 "enough room for all the characters in the string, plus a terminating null "
14280 "byte.  The usual skip of leading white space is suppressed.  The string is "
14281 "to be made up of characters in (or not in) a particular set; the set is "
14282 "defined by the characters between the open bracket B<[> character and a "
14283 "close bracket B<]> character.  The set I<excludes> those characters if the "
14284 "first character after the open bracket is a circumflex (B<^>).  To include a "
14285 "close bracket in the set, make it the first character after the open bracket "
14286 "or the circumflex; any other position will end the set.  The hyphen "
14287 "character B<-> is also special; when placed between two other characters, it "
14288 "adds all intervening characters to the set.  To include a hyphen, make it "
14289 "the last character before the final close bracket.  For instance, "
14290 "B<[^]0-9-]> means the set \"everything except close bracket, zero through "
14291 "nine, and hyphen\".  The string ends with the appearance of a character not "
14292 "in the (or, with a circumflex, in) set or when the field width runs out."
14293 msgstr ""
14294 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
14295 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
14296 "ず、 そこには文字列中のすべての文字と終端のヌルバイト を格納するための十分な"
14297 "領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行わ"
14298 "れない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き括"
14299 "弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字が"
14300 "曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 閉"
14301 "じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号のあ"
14302 "との最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が終"
14303 "る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた時、"
14304 "この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませるた"
14305 "めには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 "
14306 "B<[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を"
14307 "意味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれ"
14308 "る) 文字の 出現または確保された領域が使い切られた時に終了する。"
14309
14310 #. type: Plain text
14311 #: build/C/man3/scanf.3:510
14312 msgid ""
14313 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
14314 "pointer must be a pointer to a pointer to I<void>."
14315 msgstr ""
14316 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
14317 "タは I<void> へのポインタへのポインタでなければならない。"
14318
14319 #. type: Plain text
14320 #: build/C/man3/scanf.3:530
14321 msgid ""
14322 "Nothing is expected; instead, the number of characters consumed thus far "
14323 "from the input is stored through the next pointer, which must be a pointer "
14324 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
14325 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
14326 "of a B<%n> directive does not increment the assignment count returned at the "
14327 "completion of execution\" but the Corrigendum seems to contradict this.  "
14328 "Probably it is wise not to make any assumptions on the effect of B<%n> "
14329 "conversions on the return value."
14330 msgstr ""
14331 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
14332 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
14333 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
14334 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
14335 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
14336 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
14337 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
14338
14339 #. type: Plain text
14340 #: build/C/man3/scanf.3:535
14341 msgid ""
14342 "These functions return the number of input items successfully matched and "
14343 "assigned, which can be fewer than provided for, or even zero in the event of "
14344 "an early matching failure."
14345 msgstr ""
14346 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
14347 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
14348 "ることもある。"
14349
14350 #. type: Plain text
14351 #: build/C/man3/scanf.3:547
14352 msgid ""
14353 "The value B<EOF> is returned if the end of input is reached before either "
14354 "the first successful conversion or a matching failure occurs.  B<EOF> is "
14355 "also returned if a read error occurs, in which case the error indicator for "
14356 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
14357 "error."
14358 msgstr ""
14359 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
14360 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
14361 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
14362 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
14363
14364 #. type: Plain text
14365 #: build/C/man3/scanf.3:553
14366 msgid ""
14367 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
14368 "operation would block."
14369 msgstr ""
14370 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
14371 "込み操作は停止 (block) することになる。"
14372
14373 #. type: Plain text
14374 #: build/C/man3/scanf.3:558
14375 msgid ""
14376 "The file descriptor underlying I<stream> is invalid, or not open for reading."
14377 msgstr ""
14378 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
14379 "ンされていない。"
14380
14381 #. type: Plain text
14382 #: build/C/man3/scanf.3:561
14383 msgid "Input byte sequence does not form a valid character."
14384 msgstr "入力されたバイト列が有効な文字を構成していない。"
14385
14386 #. type: Plain text
14387 #: build/C/man3/scanf.3:565
14388 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
14389 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
14390
14391 #. type: Plain text
14392 #: build/C/man3/scanf.3:570
14393 msgid "Not enough arguments; or I<format> is NULL."
14394 msgstr "引き数が十分でない。または I<format> が NULL である。"
14395
14396 #. type: Plain text
14397 #: build/C/man3/scanf.3:573
14398 msgid "Out of memory."
14399 msgstr "メモリ不足。"
14400
14401 #. type: TP
14402 #: build/C/man3/scanf.3:573
14403 #, no-wrap
14404 msgid "B<ERANGE>"
14405 msgstr "B<ERANGE>"
14406
14407 #. type: Plain text
14408 #: build/C/man3/scanf.3:577
14409 msgid ""
14410 "The result of an integer conversion would exceed the size that can be stored "
14411 "in the corresponding integer type."
14412 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
14413
14414 #. type: Plain text
14415 #: build/C/man3/scanf.3:587
14416 msgid ""
14417 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
14418 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
14419 msgstr ""
14420 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
14421 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
14422
14423 #. type: Plain text
14424 #: build/C/man3/scanf.3:597
14425 msgid ""
14426 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
14427 "the usage of B<L> in integer conversions is the GNU notation."
14428 msgstr ""
14429 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
14430 "B<ll> または B<L> の使用は GNU での拡張である。"
14431
14432 #. type: Plain text
14433 #: build/C/man3/scanf.3:608
14434 msgid ""
14435 "The Linux version of these functions is based on the I<GNU> I<libio> "
14436 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
14437 "(glibc-1.08)> for a more concise description."
14438 msgstr ""
14439 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
14440 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
14441
14442 #. type: SS
14443 #: build/C/man3/scanf.3:609
14444 #, no-wrap
14445 msgid "The 'a' assignment-allocation modifier"
14446 msgstr "'a' 代入割り当て (assignment-allocation) 修飾子"
14447
14448 #. type: Plain text
14449 #: build/C/man3/scanf.3:620
14450 msgid ""
14451 "Originally, the GNU C library supported dynamic allocation for string inputs "
14452 "(as a nonstandard extension) via the B<a> character.  (This feature is "
14453 "present at least as far back as glibc 2.0.)  Thus, one could write the "
14454 "following to have B<scanf>()  allocate a buffer for an input string, with a "
14455 "pointer to that buffer being returned in I<*buf>:"
14456 msgstr ""
14457 "元々、 GNU C ライブラリ (glibc) では、 B<a> 文字による文字列入力に対する動的"
14458 "割り当て変換指定子 (dynamic allocation conversion specifier) を (非標準の拡張"
14459 "として) サポートしている。この機能は少なくとも glibc 2.0 の時点ではすでに存在"
14460 "している。 したがって、以下のようにして、 B<scanf>() に入力文字列に対してバッ"
14461 "ファを割り当てさせることができる。割り当てられたバッファは I<*buf> で返され"
14462 "る。"
14463
14464 #. type: Plain text
14465 #: build/C/man3/scanf.3:623
14466 #, no-wrap
14467 msgid ""
14468 "    char *buf;\n"
14469 "    scanf(\"%as\", &buf);\n"
14470 msgstr ""
14471 "    char *buf;\n"
14472 "    scanf(\"%as\", &buf);\n"
14473
14474 #. type: Plain text
14475 #: build/C/man3/scanf.3:634
14476 msgid ""
14477 "The use of the letter B<a> for this purpose was problematic, since B<a> is "
14478 "also specified by the ISO C standard as a synonym for B<f> (floating-point "
14479 "input).  POSIX.1-2008 instead specifies the B<m> modifier for assignment "
14480 "allocation (as documented in DESCRIPTION, above)."
14481 msgstr ""
14482 "この目的で文字 B<a> を使うのは問題をはらんでいる。 なぜなら、 B<a> は ISO C "
14483 "標準では (浮動小数点入力を表す) の B<f> の同義語として定義されているからであ"
14484 "る。 その代わり、 POSIX.1-2008 では、(上記の「説明」に書かれている通り) 代入"
14485 "割り当てを行う修飾子として B<m> が規定されている。"
14486
14487 #. type: Plain text
14488 #: build/C/man3/scanf.3:646
14489 msgid ""
14490 "Note that the B<a> modifier is not available if the program is compiled with "
14491 "I<gcc -std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also "
14492 "specified), in which case the B<a> is interpreted as a specifier for "
14493 "floating-point numbers (see above)."
14494 msgstr ""
14495 "B<a> 修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
14496 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない点に注意。"
14497 "この場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
14498
14499 #. type: Plain text
14500 #: build/C/man3/scanf.3:652
14501 msgid ""
14502 "Support for the B<m> modifier was added to glibc starting with version 2.7, "
14503 "and new programs should use that modifier instead of B<a>."
14504 msgstr ""
14505 "B<m> 修飾子への対応はバージョン 2.7 以降の glibc で追加されている。新しいプロ"
14506 "グラムでぇあ B<a> の代わりに B<m> を使用すべきである。"
14507
14508 #. type: Plain text
14509 #: build/C/man3/scanf.3:658
14510 msgid ""
14511 "As well as being standardized by POSIX, the B<m> modifier has the following "
14512 "further advantages over the use of B<a:>"
14513 msgstr ""
14514 "POSIX で標準化されているだけでなく、 B<m> 修飾子には B<a> を利用する場合に比"
14515 "べて以下のような利点がある。"
14516
14517 #. type: Plain text
14518 #: build/C/man3/scanf.3:663
14519 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
14520 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
14521
14522 #. type: Plain text
14523 #: build/C/man3/scanf.3:669
14524 msgid ""
14525 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
14526 "specifier (and is unaffected by I<gcc -std=c99> etc.)."
14527 msgstr ""
14528 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
14529 "std=c99> などの影響も避けられる)。"
14530
14531 #. type: Plain text
14532 #: build/C/man3/scanf.3:682
14533 msgid ""
14534 "All functions are fully C89 conformant, but provide the additional "
14535 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
14536 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
14537 "the behavior of specifiers defined in C89."
14538 msgstr ""
14539 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
14540 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
14541 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
14542 "れない。"
14543
14544 #. type: Plain text
14545 #: build/C/man3/scanf.3:698
14546 msgid ""
14547 "Some combinations of the type modifiers and conversion specifiers defined by "
14548 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
14549 "behavior on Linux, this need not to be so on other architectures.  Therefore "
14550 "it usually is better to use modifiers that are not defined by ANSI C at all, "
14551 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
14552 "B<u>, B<x>, and B<X> conversions or B<ll>."
14553 msgstr ""
14554 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
14555 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
14556 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
14557 "他のアーキテクチャでも同様になっているとは限らない。\n"
14558 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
14559 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
14560 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
14561
14562 #. type: Plain text
14563 #: build/C/man3/scanf.3:704
14564 msgid ""
14565 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
14566 "conversions equivalently to B<L>."
14567 msgstr ""
14568 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
14569 "動小数の変換に使用される。"
14570
14571 #. type: Plain text
14572 #: build/C/man3/scanf.3:714
14573 msgid ""
14574 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
14575 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
14576 "the returned string, as in the following example:"
14577 msgstr ""
14578 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
14579 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
14580 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
14581
14582 #. type: Plain text
14583 #: build/C/man3/scanf.3:719
14584 #, no-wrap
14585 msgid ""
14586 "char *p;\n"
14587 "int n;\n"
14588 msgstr ""
14589 "char *p;\n"
14590 "int n;\n"
14591
14592 #. type: Plain text
14593 #: build/C/man3/scanf.3:730
14594 #, no-wrap
14595 msgid ""
14596 "errno = 0;\n"
14597 "n = scanf(\"%m[a-z]\", &p);\n"
14598 "if (n == 1) {\n"
14599 "    printf(\"read: %s\\en\", p);\n"
14600 "    free(p);\n"
14601 "} else if (errno != 0) {\n"
14602 "    perror(\"scanf\");\n"
14603 "} else {\n"
14604 "    fprintf(stderr, \"No matching characters\\en\");\n"
14605 "}\n"
14606 msgstr ""
14607 "errno = 0;\n"
14608 "n = scanf(\"%m[a-z]\", &p);\n"
14609 "if (n == 1) {\n"
14610 "    printf(\"read: %s\\en\", p);\n"
14611 "    free(p);\n"
14612 "} else if (errno != 0) {\n"
14613 "    perror(\"scanf\");\n"
14614 "} else {\n"
14615 "    fprintf(stderr, \"No matching characters\\en\");\n"
14616 "}\n"
14617
14618 #. type: Plain text
14619 #: build/C/man3/scanf.3:738
14620 msgid ""
14621 "As shown in the above example, it is necessary to call B<free>(3)  only if "
14622 "the B<scanf>()  call successfully read a string."
14623 msgstr ""
14624 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
14625 "B<free>(3)  を呼び出す必要がある。"
14626
14627 #. type: Plain text
14628 #: build/C/man3/scanf.3:745
14629 msgid ""
14630 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
14631 "B<strtoul>(3)"
14632 msgstr ""
14633 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
14634 "B<strtoul>(3),"
14635
14636 #. type: TH
14637 #: build/C/man3/setbuf.3:48
14638 #, no-wrap
14639 msgid "SETBUF"
14640 msgstr "SETBUF"
14641
14642 #. type: Plain text
14643 #: build/C/man3/setbuf.3:51
14644 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
14645 msgstr ""
14646 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
14647
14648 #. type: Plain text
14649 #: build/C/man3/setbuf.3:56
14650 #, no-wrap
14651 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
14652 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
14653
14654 #. type: Plain text
14655 #: build/C/man3/setbuf.3:58
14656 #, no-wrap
14657 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
14658 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
14659
14660 #. type: Plain text
14661 #: build/C/man3/setbuf.3:60
14662 #, no-wrap
14663 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
14664 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
14665
14666 #. type: Plain text
14667 #: build/C/man3/setbuf.3:63
14668 #, no-wrap
14669 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
14670 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
14671
14672 #. type: Plain text
14673 #: build/C/man3/setbuf.3:73
14674 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
14675 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
14676
14677 #. type: Plain text
14678 #: build/C/man3/setbuf.3:96
14679 msgid ""
14680 "The three types of buffering available are unbuffered, block buffered, and "
14681 "line buffered.  When an output stream is unbuffered, information appears on "
14682 "the destination file or terminal as soon as written; when it is block "
14683 "buffered many characters are saved up and written as a block; when it is "
14684 "line buffered characters are saved up until a newline is output or input is "
14685 "read from any stream attached to a terminal device (typically I<stdin>).  "
14686 "The function B<fflush>(3)  may be used to force the block out early.  (See "
14687 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
14688 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
14689 "obtained.  If a stream refers to a terminal (as I<stdout> normally does), it "
14690 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
14691 "by default."
14692 msgstr ""
14693 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
14694 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
14695 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
14696 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
14697 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
14698 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
14699 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
14700 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
14701 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
14702 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
14703 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
14704 "unbuffered である。"
14705
14706 #. type: Plain text
14707 #: build/C/man3/setbuf.3:103
14708 msgid ""
14709 "The B<setvbuf>()  function may be used on any open stream to change its "
14710 "buffer.  The I<mode> argument must be one of the following three macros:"
14711 msgstr ""
14712 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
14713 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
14714
14715 #. type: TP
14716 #: build/C/man3/setbuf.3:104
14717 #, no-wrap
14718 msgid "B<_IONBF>"
14719 msgstr "B<_IONBF>"
14720
14721 #. type: Plain text
14722 #: build/C/man3/setbuf.3:107
14723 msgid "unbuffered"
14724 msgstr "unbuffered"
14725
14726 #. type: TP
14727 #: build/C/man3/setbuf.3:107
14728 #, no-wrap
14729 msgid "B<_IOLBF>"
14730 msgstr "B<_IOLBF>"
14731
14732 #. type: Plain text
14733 #: build/C/man3/setbuf.3:110
14734 msgid "line buffered"
14735 msgstr "line buffered"
14736
14737 #. type: TP
14738 #: build/C/man3/setbuf.3:110
14739 #, no-wrap
14740 msgid "B<_IOFBF>"
14741 msgstr "B<_IOFBF>"
14742
14743 #. type: Plain text
14744 #: build/C/man3/setbuf.3:113
14745 msgid "fully buffered"
14746 msgstr "fully buffered"
14747
14748 #. type: Plain text
14749 #: build/C/man3/setbuf.3:129
14750 msgid ""
14751 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
14752 "least I<size> bytes long; this buffer will be used instead of the current "
14753 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
14754 "buffer will be allocated on the next read or write operation.  The "
14755 "B<setvbuf>()  function may be used only after opening a stream and before "
14756 "any other operations have been performed on it."
14757 msgstr ""
14758 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
14759 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
14760 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
14761 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
14762 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
14763
14764 #. type: Plain text
14765 #: build/C/man3/setbuf.3:135
14766 msgid ""
14767 "The other three calls are, in effect, simply aliases for calls to "
14768 "B<setvbuf>().  The B<setbuf>()  function is exactly equivalent to the call"
14769 msgstr ""
14770 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
14771 "B<setbuf>()  関数は、"
14772
14773 #. type: Plain text
14774 #: build/C/man3/setbuf.3:138
14775 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
14776 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
14777
14778 #. type: Plain text
14779 #: build/C/man3/setbuf.3:148
14780 msgid ""
14781 "The B<setbuffer>()  function is the same, except that the size of the buffer "
14782 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
14783 "The B<setlinebuf>()  function is exactly equivalent to the call:"
14784 msgstr ""
14785 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
14786 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
14787 "は以下と同じである。"
14788
14789 #. type: Plain text
14790 #: build/C/man3/setbuf.3:151
14791 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
14792 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
14793
14794 #. type: Plain text
14795 #: build/C/man3/setbuf.3:162
14796 msgid ""
14797 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
14798 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
14799 "I<errno> on failure."
14800 msgstr ""
14801 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
14802 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
14803 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
14804
14805 #. type: Plain text
14806 #: build/C/man3/setbuf.3:164
14807 msgid "The other functions do not return a value."
14808 msgstr "その他の関数は値を返さない。"
14809
14810 #. type: Plain text
14811 #: build/C/man3/setbuf.3:173
14812 msgid ""
14813 "The B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), and B<setvbuf>()  "
14814 "functions are thread-safe."
14815 msgstr ""
14816 "関数 B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), B<setvbuf>() はスレッド"
14817 "セーフである。"
14818
14819 #. type: Plain text
14820 #: build/C/man3/setbuf.3:179
14821 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
14822 msgstr ""
14823 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
14824
14825 #. type: Plain text
14826 #: build/C/man3/setbuf.3:196
14827 msgid ""
14828 "You must make sure that the space that I<buf> points to still exists by the "
14829 "time I<stream> is closed, which also happens at program termination.  For "
14830 "example, the following is invalid:"
14831 msgstr ""
14832 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
14833 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
14834 "な使い方は許されない:"
14835
14836 #. type: Plain text
14837 #: build/C/man3/setbuf.3:199
14838 #, no-wrap
14839 msgid "#include E<lt>stdio.hE<gt>\n"
14840 msgstr "#include E<lt>stdio.hE<gt>\n"
14841
14842 #. type: Plain text
14843 #: build/C/man3/setbuf.3:208
14844 #, no-wrap
14845 msgid ""
14846 "int\n"
14847 "main(void)\n"
14848 "{\n"
14849 "    char buf[BUFSIZ];\n"
14850 "    setbuf(stdin, buf);\n"
14851 "    printf(\"Hello, world!\\en\");\n"
14852 "    return 0;\n"
14853 "}\n"
14854 msgstr ""
14855 "int\n"
14856 "main(void)\n"
14857 "{\n"
14858 "    char buf[BUFSIZ];\n"
14859 "    setbuf(stdin, buf);\n"
14860 "    printf(\"Hello, world!\\en\");\n"
14861 "    return 0;\n"
14862 "}\n"
14863
14864 #. type: Plain text
14865 #: build/C/man3/setbuf.3:217
14866 msgid ""
14867 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), "
14868 "B<printf>(3), B<puts>(3)"
14869 msgstr ""
14870 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), "
14871 "B<printf>(3), B<puts>(3)"
14872
14873 #. type: TH
14874 #: build/C/man3/stdin.3:13
14875 #, no-wrap
14876 msgid "STDIN"
14877 msgstr "STDIN"
14878
14879 #. type: TH
14880 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
14881 #, no-wrap
14882 msgid "2008-07-14"
14883 msgstr "2008-07-14"
14884
14885 #. type: Plain text
14886 #: build/C/man3/stdin.3:16
14887 msgid "stdin, stdout, stderr - standard I/O streams"
14888 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
14889
14890 #. type: Plain text
14891 #: build/C/man3/stdin.3:23
14892 #, no-wrap
14893 msgid ""
14894 "B<extern FILE *>I<stdin>B<;>\n"
14895 "B<extern FILE *>I<stdout>B<;>\n"
14896 "B<extern FILE *>I<stderr>B<;>\n"
14897 msgstr ""
14898 "B<extern FILE *>I<stdin>B<;>\n"
14899 "B<extern FILE *>I<stdout>B<;>\n"
14900 "B<extern FILE *>I<stderr>B<;>\n"
14901
14902 #. type: Plain text
14903 #: build/C/man3/stdin.3:35
14904 msgid ""
14905 "Under normal circumstances every UNIX program has three streams opened for "
14906 "it when it starts up, one for input, one for output, and one for printing "
14907 "diagnostic or error messages.  These are typically attached to the user's "
14908 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
14909 "depending on what the parent process chose to set up.  (See also the "
14910 "\"Redirection\" section of B<sh>(1).)"
14911 msgstr ""
14912 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
14913 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
14914 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
14915 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
14916 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
14917
14918 #. type: Plain text
14919 #: build/C/man3/stdin.3:45
14920 msgid ""
14921 "The input stream is referred to as \"standard input\"; the output stream is "
14922 "referred to as \"standard output\"; and the error stream is referred to as "
14923 "\"standard error\".  These terms are abbreviated to form the symbols used to "
14924 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
14925 msgstr ""
14926 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
14927 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
14928 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
14929 "I<stdout>, I<stderr> である。"
14930
14931 #. type: Plain text
14932 #: build/C/man3/stdin.3:54
14933 msgid ""
14934 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
14935 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
14936 msgstr ""
14937 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
14938 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
14939
14940 #. type: Plain text
14941 #: build/C/man3/stdin.3:63
14942 msgid ""
14943 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
14944 "same underlying files may also be accessed using the raw UNIX file "
14945 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
14946 msgstr ""
14947 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
14948 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
14949 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
14950 "る。"
14951
14952 #. type: Plain text
14953 #: build/C/man3/stdin.3:82
14954 msgid ""
14955 "On program startup, the integer file descriptors associated with the streams "
14956 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
14957 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
14958 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying "
14959 "B<freopen>(3)  to one of these streams can change the file descriptor number "
14960 "associated with the stream.)"
14961 msgstr ""
14962 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
14963 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
14964 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
14965 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
14966 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
14967 "たファイルディスクリプタ の番号を変更することができる。)"
14968
14969 #. type: Plain text
14970 #: build/C/man3/stdin.3:95
14971 msgid ""
14972 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
14973 "unexpected results and should generally be avoided.  (For the masochistic "
14974 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
14975 "is supposed to work.)  A general rule is that file descriptors are handled "
14976 "in the kernel, while stdio is just a library.  This means for example, that "
14977 "after an B<exec>(3), the child inherits all open file descriptors, but all "
14978 "old streams have become inaccessible."
14979 msgstr ""
14980 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
14981 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
14982 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
14983 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
14984 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
14985 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
14986 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
14987
14988 #. type: Plain text
14989 #: build/C/man3/stdin.3:113
14990 msgid ""
14991 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
14992 "macros, assigning to them is nonportable.  The standard streams can be made "
14993 "to refer to different files with help of the library function B<freopen>(3), "
14994 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
14995 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
14996 "by normal program termination."
14997 msgstr ""
14998 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
14999 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
15000 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
15001 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
15002 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
15003 "グラムの正常終了によってクローズされる。"
15004
15005 #. type: Plain text
15006 #: build/C/man3/stdin.3:122
15007 msgid ""
15008 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
15009 "standard also stipulates that these three streams shall be open at program "
15010 "startup."
15011 msgstr ""
15012 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
15013 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
15014 "とが規定されている。"
15015
15016 #. type: Plain text
15017 #: build/C/man3/stdin.3:154
15018 msgid ""
15019 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
15020 "when it points to a terminal.  Partial lines will not appear until "
15021 "B<fflush>(3)  or B<exit>(3)  is called, or a newline is printed.  This can "
15022 "produce unexpected results, especially with debugging output.  The buffering "
15023 "mode of the standard streams (or any other stream)  can be changed using the "
15024 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
15025 "associated with a terminal, there may also be input buffering in the "
15026 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
15027 "terminal input is line buffered in the kernel.)  This kernel input handling "
15028 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
15029 "B<termios>(3)."
15030 msgstr ""
15031 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
15032 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
15033 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
15034 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
15035 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
15036 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
15037 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
15038 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
15039 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
15040 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
15041 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
15042 "B<termios>(3)  も参照すること。"
15043
15044 #. type: Plain text
15045 #: build/C/man3/stdin.3:160
15046 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
15047 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
15048
15049 #. type: TH
15050 #: build/C/man3/stdio.3:39
15051 #, no-wrap
15052 msgid "STDIO"
15053 msgstr "STDIO"
15054
15055 #. type: TH
15056 #: build/C/man3/stdio.3:39
15057 #, no-wrap
15058 msgid "2001-12-26"
15059 msgstr "2001-12-26"
15060
15061 #. type: Plain text
15062 #: build/C/man3/stdio.3:42
15063 msgid "stdio - standard input/output library functions"
15064 msgstr "stdio - 標準入出力ライブラリ関数"
15065
15066 #. type: Plain text
15067 #: build/C/man3/stdio.3:46
15068 msgid "B<FILE *>I<stdin>B<;>"
15069 msgstr "B<FILE *>I<stdin>B<;>"
15070
15071 #. type: Plain text
15072 #: build/C/man3/stdio.3:48
15073 msgid "B<FILE *>I<stdout>B<;>"
15074 msgstr "B<FILE *>I<stdout>B<;>"
15075
15076 #. type: Plain text
15077 #: build/C/man3/stdio.3:50
15078 msgid "B<FILE *>I<stderr>B<;>"
15079 msgstr "B<FILE *>I<stderr>B<;>"
15080
15081 #. type: Plain text
15082 #: build/C/man3/stdio.3:57
15083 msgid ""
15084 "The standard I/O library provides a simple and efficient buffered stream I/O "
15085 "interface.  Input and output is mapped into logical data streams and the "
15086 "physical I/O characteristics are concealed.  The functions and macros are "
15087 "listed below; more information is available from the individual man pages."
15088 msgstr ""
15089 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
15090 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
15091 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
15092 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
15093
15094 #. type: Plain text
15095 #: build/C/man3/stdio.3:80
15096 msgid ""
15097 "A stream is associated with an external file (which may be a physical "
15098 "device) by I<opening> a file, which may involve creating a new file.  "
15099 "Creating an existing file causes its former contents to be discarded.  If a "
15100 "file can support positioning requests (such as a disk file, as opposed to a "
15101 "terminal), then a I<file position indicator> associated with the stream is "
15102 "positioned at the start of the file (byte zero), unless the file is opened "
15103 "with append mode.  If append mode is used, it is unspecified whether the "
15104 "position indicator will be placed at the start or the end of the file.  The "
15105 "position indicator is maintained by subsequent reads, writes and positioning "
15106 "requests.  All input occurs as if the characters were read by successive "
15107 "calls to the B<fgetc>(3)  function; all output takes place as if all "
15108 "characters were written by successive calls to the B<fputc>(3)  function."
15109 msgstr ""
15110 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
15111 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
15112 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
15113 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
15114 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
15115 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
15116 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
15117 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
15118 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
15119 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
15120 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
15121 "字を書き込んだかのように行われる。"
15122
15123 #. type: Plain text
15124 #: build/C/man3/stdio.3:90
15125 msgid ""
15126 "A file is disassociated from a stream by I<closing> the file.  Output "
15127 "streams are flushed (any unwritten buffer contents are transferred to the "
15128 "host environment) before the stream is disassociated from the file.  The "
15129 "value of a pointer to a I<FILE> object is indeterminate after a file is "
15130 "closed (garbage)."
15131 msgstr ""
15132 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
15133 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
15134 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
15135 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
15136 "確定になる (ゴミになってしまう)。"
15137
15138 #. type: Plain text
15139 #: build/C/man3/stdio.3:103
15140 msgid ""
15141 "A file may be subsequently reopened, by the same or another program "
15142 "execution, and its contents reclaimed or modified (if it can be repositioned "
15143 "at the start).  If the main function returns to its original caller, or the "
15144 "B<exit>(3)  function is called, all open files are closed (hence all output "
15145 "streams are flushed) before program termination.  Other methods of program "
15146 "termination, such as B<abort>(3)  do not bother about closing files properly."
15147 msgstr ""
15148 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
15149 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
15150 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
15151 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
15152 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
15153 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
15154 "保証はない。"
15155
15156 #. type: Plain text
15157 #: build/C/man3/stdio.3:119
15158 msgid ""
15159 "At program startup, three text streams are predefined and need not be opened "
15160 "explicitly: I<standard input> (for reading conventional input), I<standard "
15161 "output> (for writing conventional output), and I<standard error> (for "
15162 "writing diagnostic output).  These streams are abbreviated I<stdin>,"
15163 "I<stdout> and I<stderr>.  When opened, the standard error stream is not "
15164 "fully buffered; the standard input and output streams are fully buffered if "
15165 "and only if the streams do not refer to an interactive device."
15166 msgstr ""
15167 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
15168 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
15169 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
15170 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
15171 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
15172 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
15173 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
15174 "スを参照していなければ、 完全にバッファリングされている。"
15175
15176 #. type: Plain text
15177 #: build/C/man3/stdio.3:129
15178 msgid ""
15179 "Output streams that refer to terminal devices are always line buffered by "
15180 "default; pending output to such streams is written automatically whenever an "
15181 "input stream that refers to a terminal device is read.  In cases where a "
15182 "large amount of computation is done after printing part of a line on an "
15183 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
15184 "going off and computing so that the output will appear."
15185 msgstr ""
15186 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
15187 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
15188 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
15189 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
15190 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
15191 "必要がある。"
15192
15193 #. type: Plain text
15194 #: build/C/man3/stdio.3:143
15195 msgid ""
15196 "The I<stdio> library is a part of the library B<libc> and routines are "
15197 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
15198 "SYNOPSIS sections of the following manual pages indicate which include files "
15199 "are to be used, what the compiler declaration for the function looks like "
15200 "and which external variables are of interest."
15201 msgstr ""
15202 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
15203 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
15204 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
15205 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
15206 "数が関係するのかが示されている。"
15207
15208 #.  Not on Linux: .BR fropen ,
15209 #.  Not on Linux: .BR fwopen ,
15210 #. type: Plain text
15211 #: build/C/man3/stdio.3:183
15212 msgid ""
15213 "The following are defined as macros; these names may not be reused without "
15214 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
15215 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
15216 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
15217 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
15218 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
15219 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
15220 "and B<putchar> exist and will be used if the macros definitions are "
15221 "explicitly removed."
15222 msgstr ""
15223 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
15224 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
15225 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
15226 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
15227 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
15228 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
15229 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
15230 "示的に消去されている場合には、 これらを使用することになるだろう。"
15231
15232 #. type: SS
15233 #: build/C/man3/stdio.3:183
15234 #, no-wrap
15235 msgid "List of functions"
15236 msgstr "関数のリスト"
15237
15238 #. type: tbl table
15239 #: build/C/man3/stdio.3:188
15240 #, no-wrap
15241 msgid "Function\tDescription\n"
15242 msgstr "関数\t説明\n"
15243
15244 #. type: tbl table
15245 #: build/C/man3/stdio.3:189
15246 #, no-wrap
15247 msgid "_\n"
15248 msgstr "_\n"
15249
15250 #. type: tbl table
15251 #: build/C/man3/stdio.3:190
15252 #, no-wrap
15253 msgid "clearerr\tcheck and reset stream status\n"
15254 msgstr "clearerr\tストリームの状態の確認とリセット\n"
15255
15256 #. type: tbl table
15257 #: build/C/man3/stdio.3:191
15258 #, no-wrap
15259 msgid "fclose\tclose a stream\n"
15260 msgstr "fclose\tストリームをクローズする\n"
15261
15262 #. type: tbl table
15263 #: build/C/man3/stdio.3:192
15264 #, no-wrap
15265 msgid "fdopen\tstream open functions\n"
15266 msgstr "fdopen\tストリームをオープンする\n"
15267
15268 #. type: tbl table
15269 #: build/C/man3/stdio.3:193
15270 #, no-wrap
15271 msgid "feof\tcheck and reset stream status\n"
15272 msgstr "feof\tストリームの状態の確認とリセット\n"
15273
15274 #. type: tbl table
15275 #: build/C/man3/stdio.3:194
15276 #, no-wrap
15277 msgid "ferror\tcheck and reset stream status\n"
15278 msgstr "ferror\tストリームの状態の確認とリセット\n"
15279
15280 #. type: tbl table
15281 #: build/C/man3/stdio.3:195
15282 #, no-wrap
15283 msgid "fflush\tflush a stream\n"
15284 msgstr "fflush\tストリームをフラッシュする\n"
15285
15286 #. type: tbl table
15287 #: build/C/man3/stdio.3:196
15288 #, no-wrap
15289 msgid "fgetc\tget next character or word from input stream\n"
15290 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
15291
15292 #. type: tbl table
15293 #: build/C/man3/stdio.3:197
15294 #, no-wrap
15295 msgid "fgetpos\treposition a stream\n"
15296 msgstr "fgetpos\tストリームの位置を取得する\n"
15297
15298 #. type: tbl table
15299 #: build/C/man3/stdio.3:198
15300 #, no-wrap
15301 msgid "fgets\tget a line from a stream\n"
15302 msgstr "fgets\tストリームから行を取得する\n"
15303
15304 #. type: tbl table
15305 #: build/C/man3/stdio.3:199
15306 #, no-wrap
15307 msgid "fileno\treturn the integer descriptor of the argument stream\n"
15308 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
15309
15310 #. type: tbl table
15311 #: build/C/man3/stdio.3:200
15312 #, no-wrap
15313 msgid "fopen\tstream open functions\n"
15314 msgstr "fopen\tストリームをオープンする\n"
15315
15316 #. type: tbl table
15317 #: build/C/man3/stdio.3:201
15318 #, no-wrap
15319 msgid "fprintf\tformatted output conversion\n"
15320 msgstr "fprintf\t書式付き出力変換\n"
15321
15322 #. type: tbl table
15323 #: build/C/man3/stdio.3:202
15324 #, no-wrap
15325 msgid "fpurge\tflush a stream\n"
15326 msgstr "fpurge\tストリームをフラッシュする\n"
15327
15328 #. type: tbl table
15329 #: build/C/man3/stdio.3:203
15330 #, no-wrap
15331 msgid "fputc\toutput a character or word to a stream\n"
15332 msgstr "fputc\t文字または語をストリームに出力する\n"
15333
15334 #. type: tbl table
15335 #: build/C/man3/stdio.3:204
15336 #, no-wrap
15337 msgid "fputs\toutput a line to a stream\n"
15338 msgstr "fputs\t行をストリームに出力する\n"
15339
15340 #. type: tbl table
15341 #: build/C/man3/stdio.3:205
15342 #, no-wrap
15343 msgid "fread\tbinary stream input/output\n"
15344 msgstr "fread\tバイナリーストリーム入出力\n"
15345
15346 #. type: tbl table
15347 #: build/C/man3/stdio.3:206
15348 #, no-wrap
15349 msgid "freopen\tstream open functions\n"
15350 msgstr "freopen\tストリームをオープンする\n"
15351
15352 #. type: tbl table
15353 #: build/C/man3/stdio.3:207
15354 #, no-wrap
15355 msgid "fscanf\tinput format conversion\n"
15356 msgstr "fscanf\t書式付き入力変換\n"
15357
15358 #. type: tbl table
15359 #: build/C/man3/stdio.3:208
15360 #, no-wrap
15361 msgid "fseek\treposition a stream\n"
15362 msgstr "fseek\tストリームの位置指示子を移動する\n"
15363
15364 #. type: tbl table
15365 #: build/C/man3/stdio.3:209
15366 #, no-wrap
15367 msgid "fsetpos\treposition a stream\n"
15368 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
15369
15370 #. type: tbl table
15371 #: build/C/man3/stdio.3:210
15372 #, no-wrap
15373 msgid "ftell\treposition a stream\n"
15374 msgstr "ftell\tストリームの位置を取得する\n"
15375
15376 #. type: tbl table
15377 #: build/C/man3/stdio.3:211
15378 #, no-wrap
15379 msgid "fwrite\tbinary stream input/output\n"
15380 msgstr "fwrite\tバイナリーストリーム入出力\n"
15381
15382 #. type: tbl table
15383 #: build/C/man3/stdio.3:212
15384 #, no-wrap
15385 msgid "getc\tget next character or word from input stream\n"
15386 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
15387
15388 #. type: tbl table
15389 #: build/C/man3/stdio.3:213
15390 #, no-wrap
15391 msgid "getchar\tget next character or word from input stream\n"
15392 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
15393
15394 #. type: tbl table
15395 #: build/C/man3/stdio.3:214
15396 #, no-wrap
15397 msgid "gets\tget a line from a stream\n"
15398 msgstr "gets\t行を入力ストリームから取得する\n"
15399
15400 #. type: tbl table
15401 #: build/C/man3/stdio.3:215
15402 #, no-wrap
15403 msgid "getw\tget next character or word from input stream\n"
15404 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
15405
15406 #. type: tbl table
15407 #: build/C/man3/stdio.3:216
15408 #, no-wrap
15409 msgid "mktemp\tmake temporary filename (unique)\n"
15410 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
15411
15412 #. type: tbl table
15413 #: build/C/man3/stdio.3:217
15414 #, no-wrap
15415 msgid "perror\tsystem error messages\n"
15416 msgstr "perror\tシステムエラーメッセージ\n"
15417
15418 #. type: tbl table
15419 #: build/C/man3/stdio.3:218
15420 #, no-wrap
15421 msgid "printf\tformatted output conversion\n"
15422 msgstr "printf\t書式付き出力変換\n"
15423
15424 #. type: tbl table
15425 #: build/C/man3/stdio.3:219
15426 #, no-wrap
15427 msgid "putc\toutput a character or word to a stream\n"
15428 msgstr "putc\t文字または語をストリームに出力する\n"
15429
15430 #. type: tbl table
15431 #: build/C/man3/stdio.3:220
15432 #, no-wrap
15433 msgid "putchar\toutput a character or word to a stream\n"
15434 msgstr "putchar\t文字または語をストリームに出力する\n"
15435
15436 #. type: tbl table
15437 #: build/C/man3/stdio.3:221
15438 #, no-wrap
15439 msgid "puts\toutput a line to a stream\n"
15440 msgstr "puts\t行をストリームに出力する\n"
15441
15442 #. type: tbl table
15443 #: build/C/man3/stdio.3:222
15444 #, no-wrap
15445 msgid "putw\toutput a character or word to a stream\n"
15446 msgstr "putw\t文字または語をストリームに出力する\n"
15447
15448 #. type: tbl table
15449 #: build/C/man3/stdio.3:223
15450 #, no-wrap
15451 msgid "remove\tremove directory entry\n"
15452 msgstr "remove\tディレクトリエントリを削除する\n"
15453
15454 #. type: tbl table
15455 #: build/C/man3/stdio.3:224
15456 #, no-wrap
15457 msgid "rewind\treposition a stream\n"
15458 msgstr "rewind\tストリームの位置指示子を移動する\n"
15459
15460 #. type: tbl table
15461 #: build/C/man3/stdio.3:225
15462 #, no-wrap
15463 msgid "scanf\tinput format conversion\n"
15464 msgstr "scanf\t書式付き入力変換\n"
15465
15466 #. type: tbl table
15467 #: build/C/man3/stdio.3:226
15468 #, no-wrap
15469 msgid "setbuf\tstream buffering operations\n"
15470 msgstr "setbuf\tストリームのバッファリングの操作\n"
15471
15472 #. type: tbl table
15473 #: build/C/man3/stdio.3:227
15474 #, no-wrap
15475 msgid "setbuffer\tstream buffering operations\n"
15476 msgstr "setbuffer\tストリームのバッファリングの操作\n"
15477
15478 #. type: tbl table
15479 #: build/C/man3/stdio.3:228
15480 #, no-wrap
15481 msgid "setlinebuf\tstream buffering operations\n"
15482 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
15483
15484 #. type: tbl table
15485 #: build/C/man3/stdio.3:229
15486 #, no-wrap
15487 msgid "setvbuf\tstream buffering operations\n"
15488 msgstr "setvbuf\tストリームのバッファリングの操作\n"
15489
15490 #. type: tbl table
15491 #: build/C/man3/stdio.3:230
15492 #, no-wrap
15493 msgid "sprintf\tformatted output conversion\n"
15494 msgstr "sprintf\t書式付き出力変換\n"
15495
15496 #. type: tbl table
15497 #: build/C/man3/stdio.3:231
15498 #, no-wrap
15499 msgid "sscanf\tinput format conversion\n"
15500 msgstr "sscanf\t書式付き入力変換\n"
15501
15502 #. type: tbl table
15503 #: build/C/man3/stdio.3:232
15504 #, no-wrap
15505 msgid "strerror\tsystem error messages\n"
15506 msgstr "strerror\tシステムエラーメッセージ\n"
15507
15508 #. type: tbl table
15509 #: build/C/man3/stdio.3:233
15510 #, no-wrap
15511 msgid "sys_errlist\tsystem error messages\n"
15512 msgstr "sys_errlist\tシステムエラーメッセージ\n"
15513
15514 #. type: tbl table
15515 #: build/C/man3/stdio.3:234
15516 #, no-wrap
15517 msgid "sys_nerr\tsystem error messages\n"
15518 msgstr "sys_nerr\tシステムエラーメッセージ\n"
15519
15520 #. type: tbl table
15521 #: build/C/man3/stdio.3:235
15522 #, no-wrap
15523 msgid "tempnam\ttemporary file routines\n"
15524 msgstr "tempnam\tテンポラリファイルの操作\n"
15525
15526 #. type: tbl table
15527 #: build/C/man3/stdio.3:236
15528 #, no-wrap
15529 msgid "tmpfile\ttemporary file routines\n"
15530 msgstr "tmpfile\tテンポラリファイルの操作\n"
15531
15532 #. type: tbl table
15533 #: build/C/man3/stdio.3:237
15534 #, no-wrap
15535 msgid "tmpnam\ttemporary file routines\n"
15536 msgstr "tmpnam\tテンポラリファイルの操作\n"
15537
15538 #. type: tbl table
15539 #: build/C/man3/stdio.3:238
15540 #, no-wrap
15541 msgid "ungetc\tun-get character from input stream\n"
15542 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
15543
15544 #. type: tbl table
15545 #: build/C/man3/stdio.3:239
15546 #, no-wrap
15547 msgid "vfprintf\tformatted output conversion\n"
15548 msgstr "vfprintf\t書式付き出力変換\n"
15549
15550 #. type: tbl table
15551 #: build/C/man3/stdio.3:240
15552 #, no-wrap
15553 msgid "vfscanf\tinput format conversion\n"
15554 msgstr "vfscanf\t書式付き入力変換\n"
15555
15556 #. type: tbl table
15557 #: build/C/man3/stdio.3:241
15558 #, no-wrap
15559 msgid "vprintf\tformatted output conversion\n"
15560 msgstr "vprintf\t書式付き出力変換\n"
15561
15562 #. type: tbl table
15563 #: build/C/man3/stdio.3:242
15564 #, no-wrap
15565 msgid "vscanf\tinput format conversion\n"
15566 msgstr "vscanf\t書式付き入力変換\n"
15567
15568 #. type: tbl table
15569 #: build/C/man3/stdio.3:243
15570 #, no-wrap
15571 msgid "vsprintf\tformatted output conversion\n"
15572 msgstr "vsprintf\t書式付き出力変換\n"
15573
15574 #. type: tbl table
15575 #: build/C/man3/stdio.3:244
15576 #, no-wrap
15577 msgid "vsscanf\tinput format conversion\n"
15578 msgstr "vsscanf\t書式付き入力変換\n"
15579
15580 #. type: Plain text
15581 #: build/C/man3/stdio.3:250
15582 msgid "The I<stdio> library conforms to C89."
15583 msgstr "I<stdio> ライブラリは C89 に準拠している。"
15584
15585 #. type: Plain text
15586 #: build/C/man3/stdio.3:257
15587 msgid ""
15588 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
15589 "B<unlocked_stdio>(3)"
15590 msgstr ""
15591 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
15592 "B<unlocked_stdio>(3)"
15593
15594 #. type: TH
15595 #: build/C/man3/stdio_ext.3:25
15596 #, no-wrap
15597 msgid "STDIO_EXT"
15598 msgstr "STDIO_EXT"
15599
15600 #. type: Plain text
15601 #: build/C/man3/stdio_ext.3:30
15602 msgid ""
15603 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
15604 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
15605 "structure"
15606 msgstr ""
15607 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
15608 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
15609 "へのインタフェース"
15610
15611 #. type: Plain text
15612 #: build/C/man3/stdio_ext.3:34
15613 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
15614 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
15615
15616 #. type: Plain text
15617 #: build/C/man3/stdio_ext.3:36
15618 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
15619 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
15620
15621 #. type: Plain text
15622 #: build/C/man3/stdio_ext.3:38
15623 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
15624 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
15625
15626 #. type: Plain text
15627 #: build/C/man3/stdio_ext.3:40
15628 msgid "B<int __flbf(FILE *>I<stream>B<);>"
15629 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
15630
15631 #. type: Plain text
15632 #: build/C/man3/stdio_ext.3:42
15633 msgid "B<int __freadable(FILE *>I<stream>B<);>"
15634 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
15635
15636 #. type: Plain text
15637 #: build/C/man3/stdio_ext.3:44
15638 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
15639 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
15640
15641 #. type: Plain text
15642 #: build/C/man3/stdio_ext.3:46
15643 msgid "B<int __freading(FILE *>I<stream>B<);>"
15644 msgstr "B<int __freading(FILE *>I<stream>B<);>"
15645
15646 #. type: Plain text
15647 #: build/C/man3/stdio_ext.3:48
15648 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
15649 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
15650
15651 #. type: Plain text
15652 #: build/C/man3/stdio_ext.3:50
15653 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
15654 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
15655
15656 #. type: Plain text
15657 #: build/C/man3/stdio_ext.3:52
15658 msgid "B<void _flushlbf(void);>"
15659 msgstr "B<void _flushlbf(void);>"
15660
15661 #. type: Plain text
15662 #: build/C/man3/stdio_ext.3:54
15663 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
15664 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
15665
15666 #. type: Plain text
15667 #: build/C/man3/stdio_ext.3:59
15668 msgid ""
15669 "Solaris introduced routines to allow portable access to the internals of the "
15670 "I<FILE> structure, and glibc also implemented these."
15671 msgstr ""
15672 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
15673 "が導入されており、これらは glibc でも実装されている。"
15674
15675 #. type: Plain text
15676 #: build/C/man3/stdio_ext.3:64
15677 msgid ""
15678 "The B<__fbufsize>()  function returns the size of the buffer currently used "
15679 "by the given stream."
15680 msgstr ""
15681 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
15682 "す。"
15683
15684 #. type: Plain text
15685 #: build/C/man3/stdio_ext.3:71
15686 msgid ""
15687 "The B<__fpending>()  function returns the number of bytes in the output "
15688 "buffer.  For wide-oriented streams the unit is wide characters.  This "
15689 "function is undefined on buffers in reading mode, or opened read-only."
15690 msgstr ""
15691 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
15692 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
15693 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
15694 "は未定義である。"
15695
15696 #. type: Plain text
15697 #: build/C/man3/stdio_ext.3:76
15698 msgid ""
15699 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
15700 "buffered, and zero otherwise."
15701 msgstr ""
15702 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
15703 "場合は 0 を返す。"
15704
15705 #. type: Plain text
15706 #: build/C/man3/stdio_ext.3:81
15707 msgid ""
15708 "The B<__freadable>()  function returns a nonzero value if the stream allows "
15709 "reading, and zero otherwise."
15710 msgstr ""
15711 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
15712 "外の場合は 0 を返す。"
15713
15714 #. type: Plain text
15715 #: build/C/man3/stdio_ext.3:86
15716 msgid ""
15717 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
15718 "writing, and zero otherwise."
15719 msgstr ""
15720 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
15721 "外の場合は 0 を返す。"
15722
15723 #. type: Plain text
15724 #: build/C/man3/stdio_ext.3:92
15725 msgid ""
15726 "The B<__freading>()  function returns a nonzero value if the stream is read-"
15727 "only, or if the last operation on the stream was a read operation, and zero "
15728 "otherwise."
15729 msgstr ""
15730 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
15731 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
15732 "を返す。"
15733
15734 #. type: Plain text
15735 #: build/C/man3/stdio_ext.3:98
15736 msgid ""
15737 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
15738 "only (or append-only), or if the last operation on the stream was a write "
15739 "operation, and zero otherwise."
15740 msgstr ""
15741 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
15742 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
15743 "し、 それ以外の場合は 0 を返す。"
15744
15745 #. type: Plain text
15746 #: build/C/man3/stdio_ext.3:106
15747 msgid ""
15748 "The B<__fsetlocking>()  function can be used to select the desired type of "
15749 "locking on the stream.  It returns the current type.  The I<type> argument "
15750 "can take the following three values:"
15751 msgstr ""
15752 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
15753 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
15754 "ることができる :"
15755
15756 #. type: TP
15757 #: build/C/man3/stdio_ext.3:106
15758 #, no-wrap
15759 msgid "B<FSETLOCKING_INTERNAL>"
15760 msgstr "B<FSETLOCKING_INTERNAL>"
15761
15762 #. type: Plain text
15763 #: build/C/man3/stdio_ext.3:111
15764 msgid ""
15765 "Perform implicit locking around every operation on the given stream (except "
15766 "for the *_unlocked ones).  This is the default."
15767 msgstr ""
15768 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
15769 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
15770 "である)。 これがデフォルトのロック形式である。"
15771
15772 #. type: TP
15773 #: build/C/man3/stdio_ext.3:111
15774 #, no-wrap
15775 msgid "B<FSETLOCKING_BYCALLER>"
15776 msgstr "B<FSETLOCKING_BYCALLER>"
15777
15778 #. type: Plain text
15779 #: build/C/man3/stdio_ext.3:118
15780 msgid ""
15781 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
15782 "case there is more than one thread), and the stdio routines will not do "
15783 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
15784 msgstr ""
15785 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
15786 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
15787 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
15788 "理を行わない。"
15789
15790 #. type: TP
15791 #: build/C/man3/stdio_ext.3:118
15792 #, no-wrap
15793 msgid "B<FSETLOCKING_QUERY>"
15794 msgstr "B<FSETLOCKING_QUERY>"
15795
15796 #. type: Plain text
15797 #: build/C/man3/stdio_ext.3:122
15798 msgid "Don't change the type of locking.  (Only return it.)"
15799 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
15800
15801 #. type: Plain text
15802 #: build/C/man3/stdio_ext.3:128
15803 msgid ""
15804 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
15805 "so that output to a terminal is forced out, say before reading keyboard "
15806 "input.)"
15807 msgstr ""
15808 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
15809 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
15810 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
15811 "いだろう)"
15812
15813 #. type: Plain text
15814 #: build/C/man3/stdio_ext.3:132
15815 msgid ""
15816 "The B<__fpurge>()  function discards the contents of the stream's buffer."
15817 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
15818
15819 #. type: Plain text
15820 #: build/C/man3/stdio_ext.3:141
15821 msgid ""
15822 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
15823 "functions do not lock the stream, so they are not thread-safe."
15824 msgstr ""
15825 "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() "
15826 "は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
15827
15828 #. type: Plain text
15829 #: build/C/man3/stdio_ext.3:151
15830 msgid ""
15831 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
15832 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
15833 msgstr ""
15834 "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
15835 "B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
15836
15837 #. type: Plain text
15838 #: build/C/man3/stdio_ext.3:154
15839 msgid "B<flockfile>(3), B<fpurge>(3)"
15840 msgstr "B<flockfile>(3), B<fpurge>(3)"
15841
15842 #. type: TH
15843 #: build/C/man2/symlink.2:33 build/C/man7/symlink.7:37
15844 #, no-wrap
15845 msgid "SYMLINK"
15846 msgstr "SYMLINK"
15847
15848 #. type: Plain text
15849 #: build/C/man2/symlink.2:36
15850 msgid "symlink, symlinkat - make a new name for a file"
15851 msgstr "symlink, symlinkat - ファイルに新しい名前を付ける"
15852
15853 #. type: Plain text
15854 #: build/C/man2/symlink.2:41
15855 #, no-wrap
15856 msgid "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
15857 msgstr "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
15858
15859 #. type: Plain text
15860 #: build/C/man2/symlink.2:47
15861 #, no-wrap
15862 msgid "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
15863 msgstr "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
15864
15865 #. type: Plain text
15866 #: build/C/man2/symlink.2:56
15867 msgid "B<symlink>():"
15868 msgstr "B<symlink>():"
15869
15870 #. type: Plain text
15871 #: build/C/man2/symlink.2:62
15872 msgid "B<symlinkat>():"
15873 msgstr "B<symlinkat>():"
15874
15875 #. type: Plain text
15876 #: build/C/man2/symlink.2:80
15877 msgid ""
15878 "B<symlink>()  creates a symbolic link named I<linkpath> which contains the "
15879 "string I<target>."
15880 msgstr ""
15881 "B<symlink>()  は I<target> という文字列をファイルの内容として持つ "
15882 "I<linkpath> というシンボリックリンク (symbolic link) を作成する。"
15883
15884 #. type: Plain text
15885 #: build/C/man2/symlink.2:84
15886 msgid ""
15887 "Symbolic links are interpreted at run time as if the contents of the link "
15888 "had been substituted into the path being followed to find a file or "
15889 "directory."
15890 msgstr ""
15891 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
15892 "スを辿ることで、 ファイルやディレクトリに到達する。"
15893
15894 #. type: Plain text
15895 #: build/C/man2/symlink.2:89
15896 msgid ""
15897 "Symbolic links may contain I<..> path components, which (if used at the "
15898 "start of the link) refer to the parent directories of that in which the link "
15899 "resides."
15900 msgstr ""
15901 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
15902 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
15903 "される。"
15904
15905 #. type: Plain text
15906 #: build/C/man2/symlink.2:93
15907 msgid ""
15908 "A symbolic link (also known as a soft link) may point to an existing file or "
15909 "to a nonexistent one; the latter case is known as a dangling link."
15910 msgstr ""
15911 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
15912 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
15913 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
15914
15915 #. type: Plain text
15916 #: build/C/man2/symlink.2:100
15917 msgid ""
15918 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
15919 "when following the link, but is checked when removal or renaming of the link "
15920 "is requested and the link is in a directory with the sticky bit "
15921 "(B<S_ISVTX>)  set."
15922 msgstr ""
15923 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
15924 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
15925 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
15926 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
15927
15928 #. type: Plain text
15929 #: build/C/man2/symlink.2:106
15930 msgid "If I<linkpath> exists, it will I<not> be overwritten."
15931 msgstr "I<linkpath> が存在する場合には上書きはI<されない>。"
15932
15933 #. type: SS
15934 #: build/C/man2/symlink.2:106
15935 #, no-wrap
15936 msgid "symlinkat()"
15937 msgstr "symlinkat()"
15938
15939 #. type: Plain text
15940 #: build/C/man2/symlink.2:112
15941 msgid ""
15942 "The B<symlinkat>()  system call operates in exactly the same way as "
15943 "B<symlink>(), except for the differences described here."
15944 msgstr ""
15945 "B<symlinkat>() システムコールは B<symlink>() と全く同様に動作するが、以下で説"
15946 "明する点が異なる。"
15947
15948 #. type: Plain text
15949 #: build/C/man2/symlink.2:122
15950 msgid ""
15951 "If the pathname given in I<linkpath> is relative, then it is interpreted "
15952 "relative to the directory referred to by the file descriptor I<newdirfd> "
15953 "(rather than relative to the current working directory of the calling "
15954 "process, as is done by B<symlink>()  for a relative pathname)."
15955 msgstr ""
15956 "I<linkpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
15957 "リプター I<newdirfd> が参照するディレクトリに対する相対パスと解釈される "
15958 "(B<symlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
15959 "ワーキングディレクトリに対する相対パスではない)。"
15960
15961 #. type: Plain text
15962 #: build/C/man2/symlink.2:134
15963 msgid ""
15964 "If I<linkpath> is relative and I<newdirfd> is the special value B<AT_FDCWD>, "
15965 "then I<linkpath> is interpreted relative to the current working directory of "
15966 "the calling process (like B<symlink>())."
15967 msgstr ""
15968 "I<linkpath> で指定されたパス名が相対パスで、 I<newdirfd> が特別な値 "
15969 "B<AT_FDCWD> の場合、 (B<symlink>() と同様に) I<linkpath> は呼び出したプロセス"
15970 "のカレントワーキングディレクトリに対する相対パスと解釈される。"
15971
15972 #. type: Plain text
15973 #: build/C/man2/symlink.2:140
15974 msgid "If I<linkpath> is absolute, then I<newdirfd> is ignored."
15975 msgstr ""
15976 "I<linkpath> で指定されたパス名が絶対パスの場合、 I<newdirfd> は無視される。"
15977
15978 #. type: Plain text
15979 #: build/C/man2/symlink.2:155
15980 msgid ""
15981 "Write access to the directory containing I<linkpath> is denied, or one of "
15982 "the directories in the path prefix of I<linkpath> did not allow search "
15983 "permission.  (See also B<path_resolution>(7).)"
15984 msgstr ""
15985 "I<linkpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<linkpath> "
15986 "に含まれているディレクトリのどれかに検索許可が与えられていない "
15987 "(B<path_resolution>(7)  も参照すること)。"
15988
15989 #. type: Plain text
15990 #: build/C/man2/symlink.2:160
15991 msgid ""
15992 "The user's quota of resources on the filesystem has been exhausted.  The "
15993 "resources could be inodes or disk blocks, depending on the filesystem "
15994 "implementation."
15995 msgstr ""
15996 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
15997 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
15998 "依存である。"
15999
16000 #. type: Plain text
16001 #: build/C/man2/symlink.2:164
16002 msgid "I<linkpath> already exists."
16003 msgstr "I<linkpath> が既に存在する。"
16004
16005 #. type: Plain text
16006 #: build/C/man2/symlink.2:167
16007 msgid "I<target> or I<linkpath> points outside your accessible address space."
16008 msgstr ""
16009 "I<target> や I<linkpath> がアクセス可能なアドレス空間の外を指している。"
16010
16011 #. type: Plain text
16012 #: build/C/man2/symlink.2:174
16013 msgid "Too many symbolic links were encountered in resolving I<linkpath>."
16014 msgstr "I<linkpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
16015
16016 #. type: Plain text
16017 #: build/C/man2/symlink.2:177
16018 msgid "I<target> or I<linkpath> was too long."
16019 msgstr "I<target> または I<linkpath> が長過ぎる。"
16020
16021 #. type: Plain text
16022 #: build/C/man2/symlink.2:184
16023 msgid ""
16024 "A directory component in I<linkpath> does not exist or is a dangling "
16025 "symbolic link, or I<target> is the empty string."
16026 msgstr ""
16027 "I<linkpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
16028 "I<target> が空文字列である。"
16029
16030 #. type: Plain text
16031 #: build/C/man2/symlink.2:196
16032 msgid ""
16033 "A component used as a directory in I<linkpath> is not, in fact, a directory."
16034 msgstr ""
16035 "I<linkpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
16036
16037 #. type: Plain text
16038 #: build/C/man2/symlink.2:201
16039 msgid ""
16040 "The filesystem containing I<linkpath> does not support the creation of "
16041 "symbolic links."
16042 msgstr ""
16043 "I<linkpath> を含んでいるファイルシステム (file system) が シンボリックリンク"
16044 "の作成をサポートしていない。"
16045
16046 #. type: Plain text
16047 #: build/C/man2/symlink.2:205
16048 msgid "I<linkpath> is on a read-only filesystem."
16049 msgstr "I<linkpath> が読み込み専用のファイルシステムに存在している。"
16050
16051 #. type: Plain text
16052 #: build/C/man2/symlink.2:208
16053 msgid "The following additional errors can occur for B<symlinkat>():"
16054 msgstr "B<symlinkat>() では以下のエラーも発生する。"
16055
16056 #. type: Plain text
16057 #: build/C/man2/symlink.2:212
16058 msgid "I<newdirfd> is not a valid file descriptor."
16059 msgstr "I<newdirfd> が有効なファイルディスクリプタでない。"
16060
16061 #. type: Plain text
16062 #: build/C/man2/symlink.2:218
16063 msgid ""
16064 "I<linkpath> is a relative pathname and I<newdirfd> refers to a directory "
16065 "that has been deleted."
16066 msgstr ""
16067 "I<linkpath> が相対パス名で、 I<newdirfd> が削除されたディレクトリを参照してい"
16068 "る。"
16069
16070 #. type: Plain text
16071 #: build/C/man2/symlink.2:224
16072 msgid ""
16073 "I<linkpath> is relative and I<newdirfd> is a file descriptor referring to a "
16074 "file other than a directory."
16075 msgstr ""
16076 "I<linkpath> が相対パスで、 I<newdirfd> がディレクトリ以外のファイルを参照して"
16077 "いるファイルディスクリプタである。"
16078
16079 #. type: Plain text
16080 #: build/C/man2/symlink.2:228
16081 msgid ""
16082 "B<symlinkat>()  was added to Linux in kernel 2.6.16; library support was "
16083 "added to glibc in version 2.4."
16084 msgstr ""
16085 "B<symlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
16086 "ポートはバージョン 2.4 で glibc に追加された。"
16087
16088 #.  SVr4 documents additional error codes EDQUOT and ENOSYS.
16089 #.  See
16090 #.  .BR open (2)
16091 #.  re multiple files with the same name, and NFS.
16092 #. type: Plain text
16093 #: build/C/man2/symlink.2:235
16094 msgid "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
16095 msgstr "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
16096
16097 #. type: Plain text
16098 #: build/C/man2/symlink.2:238
16099 msgid "B<symlinkat>(): POSIX.1-2008."
16100 msgstr "B<symlinkat>(): POSIX.1-2008."
16101
16102 #. type: Plain text
16103 #: build/C/man2/symlink.2:242
16104 msgid "No checking of I<target> is done."
16105 msgstr "I<target> についてのチェックは行なわれない。"
16106
16107 #. type: Plain text
16108 #: build/C/man2/symlink.2:247
16109 msgid ""
16110 "Deleting the name referred to by a symbolic link will actually delete the "
16111 "file (unless it also has other hard links).  If this behavior is not "
16112 "desired, use B<link>(2)."
16113 msgstr ""
16114 "シンボリックリンクによって参照される名前を削除すると (それが他にハードリンク "
16115 "(hard link) を持たなければ) 実際にファイルが削除される。 この動作が望んだもの"
16116 "でない場合は、 B<link>(2)  を使用すること。"
16117
16118 #. type: Plain text
16119 #: build/C/man2/symlink.2:260
16120 msgid ""
16121 "On older kernels where B<symlinkat>()  is unavailable, the glibc wrapper "
16122 "function falls back to the use of B<symlink>(2).  When I<linkpath> is a "
16123 "relative pathname, glibc constructs a pathname based on the symbolic link in "
16124 "I</proc/self/fd> that corresponds to the I<newdirfd> argument."
16125 msgstr ""
16126 "B<symlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
16127 "B<symlink>(2) を使用するモードにフォールバックする。 I<pathname> が相対パスの"
16128 "場合、 glibc は I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリック"
16129 "リンクに基づいてパス名を構成する。"
16130
16131 #. type: Plain text
16132 #: build/C/man2/symlink.2:271
16133 msgid ""
16134 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
16135 "B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
16136 msgstr ""
16137 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
16138 "B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
16139
16140 #. type: Plain text
16141 #: build/C/man7/symlink.7:40
16142 msgid "symlink - symbolic link handling"
16143 msgstr "symlink - シンボリックリンクの取り扱い"
16144
16145 #. type: Plain text
16146 #: build/C/man7/symlink.7:44
16147 msgid ""
16148 "Symbolic links are files that act as pointers to other files.  To understand "
16149 "their behavior, you must first understand how hard links work."
16150 msgstr ""
16151 "シンボリックリンクは他のファイルへのポインタとして振る舞うファイルである。 そ"
16152 "の挙動を理解するには、まずハードリンクがどのように機能するかを理解しておかな"
16153 "ければならない。"
16154
16155 #. type: Plain text
16156 #: build/C/man7/symlink.7:60
16157 #, fuzzy
16158 #| msgid ""
16159 #| "A hard link to a file is indistinguishable from the original file because "
16160 #| "it is a reference to the object underlying the original filename.  (To be "
16161 #| "precise: each of the hard links to a file is a reference to the same I<i-"
16162 #| "node number>, where an i-node number is an index into the i-node table, "
16163 #| "which contains metadata about all files on a filesystem.  See "
16164 #| "B<stat>(2).)  Changes to a file are independent of the name used to "
16165 #| "reference the file.  Hard links may not refer to directories (to prevent "
16166 #| "the possibility of loops within the filesystem tree, which would confuse "
16167 #| "many programs)  and may not refer to files on different filesystems "
16168 #| "(because i-node numbers are not unique across filesystems)."
16169 msgid ""
16170 "A hard link to a file is indistinguishable from the original file because it "
16171 "is a reference to the object underlying the original filename.  (To be "
16172 "precise: each of the hard links to a file is a reference to the same I<inode "
16173 "number>, where an inode number is an index into the inode table, which "
16174 "contains metadata about all files on a filesystem.  See B<stat>(2).)  "
16175 "Changes to a file are independent of the name used to reference the file.  "
16176 "Hard links may not refer to directories (to prevent the possibility of loops "
16177 "within the filesystem tree, which would confuse many programs)  and may not "
16178 "refer to files on different filesystems (because inode numbers are not "
16179 "unique across filesystems)."
16180 msgstr ""
16181 "あるファイルへのハードリンクは、 元々のファイルと区別することができない。 な"
16182 "ぜなら、 ハードリンクは元々のファイル名の裏にあるオブジェクトへの参照だからで"
16183 "ある。 (より正確には、 あるファイルへのハードリンクはそれぞれ同じ I<i-node 番"
16184 "号> への参照である。 i-node 番号は i-node テーブルへのインデックスで、 i-"
16185 "node テーブルはファイルシステム上のすべてのファイルについてのメタデータを保持"
16186 "している。 B<stat>(2) 参照。) ファイルへの変更は、ファイルの参照に使用された"
16187 "名前とは独立に行われる。 ハードリンクはディレクトリを参照することはできない "
16188 "(これはファイルシステムツリー内でループが発生する可能性を防止するためであ"
16189 "り、 ループが発生すると、 多くのプログラムが混乱してしまうことだろう)。 ま"
16190 "た、 ハードリンクは異なるファイルシステム上のファイルを参照することもできな"
16191 "い (i-node 番号はファイルシステムをまたがると一意ではないからである)。"
16192
16193 #. type: Plain text
16194 #: build/C/man7/symlink.7:69
16195 msgid ""
16196 "A symbolic link is a special type of file whose contents are a string that "
16197 "is the pathname of another file, the file to which the link refers.  (The "
16198 "contents of a symbolic link can be read using B<readlink>(2).)  In other "
16199 "words, a symbolic link is a pointer to another name, and not to an "
16200 "underlying object.  For this reason, symbolic links may refer to directories "
16201 "and may cross filesystem boundaries."
16202 msgstr ""
16203 "シンボリックリンクは特別な種類のファイルで、 ファイルの内容はそのリンクの参照"
16204 "先の別のファイルのパス名を示す文字列である (シンボリックリンクの内容は "
16205 "B<readlink>(2) を使って読むことができる)。 言い換えると、 シンボリックリンク"
16206 "は別の名前へのポインタであり、 ファイルの裏にあるオブジェクトへのポインタでは"
16207 "ない。 この理由から、 シンボリックリンクではディレクトリへの参照やファイルシ"
16208 "ステム境界を越える参照を行うことができる。"
16209
16210 #. type: Plain text
16211 #: build/C/man7/symlink.7:75
16212 msgid ""
16213 "There is no requirement that the pathname referred to by a symbolic link "
16214 "should exist.  A symbolic link that refers to a pathname that does not exist "
16215 "is said to be a I<dangling link>."
16216 msgstr ""
16217 "シンボリックリンクが参照する先のパス名が存在しないといけないという要件はな"
16218 "い。 存在しないパス名を参照するシンボリックリンクは「壊れた (dangling) リン"
16219 "ク」と呼ばれる。"
16220
16221 #. type: Plain text
16222 #: build/C/man7/symlink.7:87
16223 msgid ""
16224 "Because a symbolic link and its referenced object coexist in the filesystem "
16225 "name space, confusion can arise in distinguishing between the link itself "
16226 "and the referenced object.  On historical systems, commands and system calls "
16227 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
16228 "Rules for a more uniform approach, as they are implemented on Linux and "
16229 "other systems, are outlined here.  It is important that site-local "
16230 "applications also conform to these rules, so that the user interface can be "
16231 "as consistent as possible."
16232 msgstr ""
16233 "シンボリックリンクとその参照先のオブジェクトは一つのファイルシステムの名前空"
16234 "間内に共存するので、 リンクそのものと参照先のオブジェクトの間で混乱が生じる可"
16235 "能性がある。 かなり昔からあるシステムでは、 コマンドやシステムコールはいくら"
16236 "かアドホックな方法の独自のリンクの辿り方の決まり事を採用している。 ここで"
16237 "は、 Linux や他のシステムで実装されている、 もっと広く使われている方法のルー"
16238 "ルについて概要を説明する。 サイト固有のアプリケーションもこれらのルールに準拠"
16239 "し、 可能な限りユーザインターフェースが一貫したものになるようにすることが重要"
16240 "である。"
16241
16242 #. type: SS
16243 #: build/C/man7/symlink.7:87
16244 #, no-wrap
16245 msgid "Symbolic link ownership, permissions, and timestamps"
16246 msgstr "シンボリックリンクの所有権、アクセス許可、タイムスタンプ"
16247
16248 #. type: Plain text
16249 #: build/C/man7/symlink.7:95
16250 msgid ""
16251 "The owner and group of an existing symbolic link can be changed using "
16252 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
16253 "is when the link is being removed or renamed in a directory that has the "
16254 "sticky bit set (see B<stat>(2))."
16255 msgstr ""
16256 "既存のシンボリックリンクの所有者とグループは B<lchown>(2) を使って変更するこ"
16257 "とができる。 シンボリックリンクの所有権が問題となる場面は、 スティッキービッ"
16258 "ト (B<stat>(2) 参照) がセットされたディレクトリで、 そのリンクの削除や名前の"
16259 "変更を行おうとしている場合だけである。"
16260
16261 #. type: Plain text
16262 #: build/C/man7/symlink.7:101
16263 msgid ""
16264 "The last access and last modification timestamps of a symbolic link can be "
16265 "changed using B<utimensat>(2)  or B<lutimes>(3)."
16266 msgstr ""
16267 "シンボリックリンクの最終アクセス時刻と最終修正時刻は B<utimensat>(2) や "
16268 "B<lutimes>(3) で変更できる。"
16269
16270 #.  Linux does not currently implement an lchmod(2).
16271 #.  The
16272 #.  4.4BSD
16273 #.  system differs from historical
16274 #.  4BSD
16275 #.  systems in that the system call
16276 #.  .BR chown (2)
16277 #.  has been changed to follow symbolic links.
16278 #.  The
16279 #.  .BR lchown (2)
16280 #.  system call was added later when the limitations of the new
16281 #.  .BR chown (2)
16282 #.  became apparent.
16283 #. type: Plain text
16284 #: build/C/man7/symlink.7:120
16285 msgid ""
16286 "On Linux, the permissions of a symbolic link are not used in any operations; "
16287 "the permissions are always 0777 (read, write, and execute for all user "
16288 "categories), and can't be changed."
16289 msgstr ""
16290 "Linux では、シンボリックリンクのアクセス許可 (permission) はどの操作でも使用"
16291 "されない。 アクセス許可は常に 0777 (すべてのユーザカテゴリにおいて読み出し、"
16292 "書き込み、実行が可能) で、変更できない。"
16293
16294 #. type: SS
16295 #: build/C/man7/symlink.7:120
16296 #, no-wrap
16297 msgid "Obtaining a file descriptor that refers to a symbolic link"
16298 msgstr ""
16299
16300 #. type: Plain text
16301 #: build/C/man7/symlink.7:138
16302 msgid ""
16303 "Using the combination of the B<O_PATH> and B<O_NOFOLLOW> flags to "
16304 "B<open>(2)  yields a file descriptor that can be passed as the I<dirfd> "
16305 "argument in system calls such as B<fstatat>(2), B<fchownat>(2), "
16306 "B<fchmodat>(2), B<linkat>(2), and B<readlinkat>(2), in order to operate on "
16307 "the symbolic link itself (rather than the file to which it refers)."
16308 msgstr ""
16309 "B<open>(2) に B<O_PATH> と B<O_NOFOLLOW> の両方のフラグを指定すると、ファイル"
16310 "ディスクリプターが得られる。このファイルディスクリプターは B<fstatat>(2), "
16311 "B<fchownat>(2), B<fchmodat>(2), B<linkat> (2), B<readlinkat>(2) などのシステ"
16312 "ムコールの I<dirfd> 引き数として渡して、 (シンボリックリンクが参照するファイ"
16313 "ルではなく) シンボリックリンク自身に対する操作を行うことができる。"
16314
16315 #. type: Plain text
16316 #: build/C/man7/symlink.7:154
16317 msgid ""
16318 "By default (i.e., if the B<AT_SYMLINK_FOLLOW> flag is not specified), if "
16319 "B<name_to_handle_at>(2)  is applied to a symbolic link, it yields a handle "
16320 "for the symbolic link (rather than the file to which it refers).  One can "
16321 "then obtain a file descriptor for the symbolic link (rather than the file to "
16322 "which it refers)  by specifying the B<O_PATH> flag in a subsequent call to "
16323 "B<open_by_handle_at>(2).  Again, that file descriptor can be used in the "
16324 "aforementioned system calls to operate on the symbolic link itself."
16325 msgstr ""
16326
16327 #. type: SS
16328 #: build/C/man7/symlink.7:154
16329 #, no-wrap
16330 msgid "Handling of symbolic links by system calls and commands"
16331 msgstr "システムコールやコマンドによるシンボリックリンクの取り扱い"
16332
16333 #. type: Plain text
16334 #: build/C/man7/symlink.7:169
16335 msgid ""
16336 "Symbolic links are handled either by operating on the link itself, or by "
16337 "operating on the object referred to by the link.  In the latter case, an "
16338 "application or system call is said to I<follow> the link.  Symbolic links "
16339 "may refer to other symbolic links, in which case the links are dereferenced "
16340 "until an object that is not a symbolic link is found, a symbolic link that "
16341 "refers to a file which does not exist is found, or a loop is detected.  "
16342 "(Loop detection is done by placing an upper limit on the number of links "
16343 "that may be followed, and an error results if this limit is exceeded.)"
16344 msgstr ""
16345
16346 #. type: Plain text
16347 #: build/C/man7/symlink.7:172
16348 msgid ""
16349 "There are three separate areas that need to be discussed.  They are as "
16350 "follows:"
16351 msgstr "3 つの領域に分けて議論する必要がある。以下の 3 つである。"
16352
16353 #. type: IP
16354 #: build/C/man7/symlink.7:172
16355 #, no-wrap
16356 msgid "1."
16357 msgstr "1."
16358
16359 #. type: Plain text
16360 #: build/C/man7/symlink.7:174
16361 msgid "Symbolic links used as filename arguments for system calls."
16362 msgstr ""
16363 "システムコールのファイル名引き数としてシンボリックリンクが使用される場合。"
16364
16365 #. type: IP
16366 #: build/C/man7/symlink.7:174
16367 #, no-wrap
16368 msgid "2."
16369 msgstr "2."
16370
16371 #. type: Plain text
16372 #: build/C/man7/symlink.7:177
16373 msgid ""
16374 "Symbolic links specified as command-line arguments to utilities that are not "
16375 "traversing a file tree."
16376 msgstr ""
16377 "ファイルツリーを辿っていないユーティリティのコマンドライン引き数としてシンボ"
16378 "リックリンクが指定される場合。"
16379
16380 #. type: IP
16381 #: build/C/man7/symlink.7:177
16382 #, no-wrap
16383 msgid "3."
16384 msgstr "3."
16385
16386 #. type: Plain text
16387 #: build/C/man7/symlink.7:181
16388 msgid ""
16389 "Symbolic links encountered by utilities that are traversing a file tree "
16390 "(either specified on the command line or encountered as part of the file "
16391 "hierarchy walk)."
16392 msgstr ""
16393 "ファイルツリーを辿っているユーティリティがシンボリックリンクを見つけた場合 "
16394 "(コマンドラインで指定される場合もあれば、 ファイル階層を辿っている途中で遭遇"
16395 "する場合もある)。"
16396
16397 #. type: SS
16398 #: build/C/man7/symlink.7:181
16399 #, no-wrap
16400 msgid "System calls"
16401 msgstr "システムコール"
16402
16403 #. type: Plain text
16404 #: build/C/man7/symlink.7:184
16405 msgid ""
16406 "The first area is symbolic links used as filename arguments for system calls."
16407 msgstr ""
16408 "最初の領域は、システムコールのファイル名引き数としてシンボリックリンクが使用"
16409 "される場合である。"
16410
16411 #. type: Plain text
16412 #: build/C/man7/symlink.7:194
16413 msgid ""
16414 "Except as noted below, all system calls follow symbolic links.  For example, "
16415 "if there were a symbolic link I<slink> which pointed to a file named "
16416 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
16417 "descriptor referring to the file I<afile>."
16418 msgstr ""
16419 "以下に述べる場合を除くと、 すべてのシステムコールはシンボリックリンクを辿"
16420 "る。 例えば、 I<afile> という名前のファイルを指しているシンボリックリンク "
16421 "I<slink> があったとすると、 システムコール I<open(\"slink\" ...\\&)> はファイ"
16422 "ル I<afile> を参照するファイルディスクリプタを返す。"
16423
16424 #. type: Plain text
16425 #: build/C/man7/symlink.7:209
16426 msgid ""
16427 "Various system calls do not follow links, and operate on the symbolic link "
16428 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
16429 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), "
16430 "B<rename>(2), B<rmdir>(2), and B<unlink>(2)."
16431 msgstr ""
16432
16433 #.  Maybe one day: .BR fchownat (2)
16434 #. type: Plain text
16435 #: build/C/man7/symlink.7:233
16436 msgid ""
16437 "Certain other system calls optionally follow symbolic links.  They are: "
16438 "B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), B<linkat>(2), "
16439 "B<name_to_handle_at>(2), B<open>(2), B<openat>(2), B<open_by_handle_at>(2), "
16440 "and B<utimensat>(2); see their manual pages for details.  Because "
16441 "B<remove>(3)  is an alias for B<unlink>(2), that library function also does "
16442 "not follow symbolic links.  When B<rmdir>(2)  is applied to a symbolic link, "
16443 "it fails with the error B<ENOTDIR>."
16444 msgstr ""
16445
16446 #. type: Plain text
16447 #: build/C/man7/symlink.7:248
16448 msgid ""
16449 "The B<link>(2)  warrants special discussion.  POSIX.1-2001 specifies that "
16450 "B<link>(2)  should dereference I<oldpath> if it is a symbolic link.  "
16451 "However, Linux does not do this.  (By default Solaris is the same, but the "
16452 "POSIX.1-2001 specified behavior can be obtained with suitable compiler "
16453 "options.)  The upcoming POSIX.1 revision changes the specification to allow "
16454 "either behavior in an implementation."
16455 msgstr ""
16456
16457 #. type: SS
16458 #: build/C/man7/symlink.7:248
16459 #, no-wrap
16460 msgid "Commands not traversing a file tree"
16461 msgstr "ファイルツリーを辿らないコマンド"
16462
16463 #. type: Plain text
16464 #: build/C/man7/symlink.7:251
16465 msgid ""
16466 "The second area is symbolic links, specified as command-line filename "
16467 "arguments, to commands which are not traversing a file tree."
16468 msgstr ""
16469 "二つ目の領域は、ファイルツリーを辿らないコマンドの、コマンドライン引き数の"
16470 "ファイル名としてシンボリックリンクが指定される場合である。"
16471
16472 #. type: Plain text
16473 #: build/C/man7/symlink.7:262
16474 msgid ""
16475 "Except as noted below, commands follow symbolic links named as command-line "
16476 "arguments.  For example, if there were a symbolic link I<slink> which "
16477 "pointed to a file named I<afile>, the command I<cat slink> would display the "
16478 "contents of the file I<afile>."
16479 msgstr ""
16480 "以下に述べる場合を除くと、 コマンドはコマンドライン引き数で指定された名前のシ"
16481 "ンボリックリンクを辿る。 例えば、 I<afile> という名前のファイルを指しているシ"
16482 "ンボリックリンク I<slink> があったとすると、 コマンド I<cat slink> は "
16483 "I<afile> の内容を表示することになる。"
16484
16485 #. type: Plain text
16486 #: build/C/man7/symlink.7:270
16487 msgid ""
16488 "It is important to realize that this rule includes commands which may "
16489 "optionally traverse file trees; for example, the command I<chown file> is "
16490 "included in this rule, while the command I<chown\\ -R file>, which performs "
16491 "a tree traversal, is not.  (The latter is described in the third area, "
16492 "below.)"
16493 msgstr ""
16494
16495 #. type: Plain text
16496 #: build/C/man7/symlink.7:288
16497 msgid ""
16498 "If it is explicitly intended that the command operate on the symbolic link "
16499 "instead of following the symbolic link\\(emfor example, it is desired that "
16500 "I<chown slink> change the ownership of the file that I<slink> is, whether it "
16501 "is a symbolic link or not\\(emthe I<-h> option should be used.  In the above "
16502 "example, I<chown root slink> would change the ownership of the file referred "
16503 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
16504 "I<slink> itself."
16505 msgstr ""
16506
16507 #. type: Plain text
16508 #: build/C/man7/symlink.7:290
16509 msgid "There are some exceptions to this rule:"
16510 msgstr "このルールにはいくつかの例外がある。"
16511
16512 #. type: Plain text
16513 #: build/C/man7/symlink.7:300
16514 msgid ""
16515 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
16516 "arguments, but respectively attempt to rename and delete them.  (Note, if "
16517 "the symbolic link references a file via a relative path, moving it to "
16518 "another directory may very well cause it to stop working, since the path may "
16519 "no longer be correct.)"
16520 msgstr ""
16521 "コマンド B<mv>(1) と B<rm>(1) は引き数で指定された名前のシンボリックリンクを"
16522 "辿らないが、 それぞれシンボリックリンク自身の名前変更と削除を行おうとする。 "
16523 "(シンボリックリンクが相対パスでファイルを参照している場合、 そのシンボリック"
16524 "リンクを別のディレクトリに移動すると、動かなくなることが非常によくある。 移動"
16525 "の結果、 パスが正しくないものになってしまうからである。)"
16526
16527 #. type: Plain text
16528 #: build/C/man7/symlink.7:330
16529 msgid ""
16530 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
16531 "with historic systems (when B<ls>(1)  is not doing a tree walk\\(emthat is, "
16532 "I<-R> option is not specified), the B<ls>(1)  command follows symbolic links "
16533 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
16534 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
16535 "the only command where the I<-H> and I<-L> options affect its behavior even "
16536 "though it is not doing a walk of a file tree.)"
16537 msgstr ""
16538
16539 #. The 4.4BSD system differs from historical 4BSD systems in that the
16540 #. .BR chown (1)
16541 #. and
16542 #. .BR chgrp (1)
16543 #. commands follow symbolic links specified on the command line.
16544 #. type: Plain text
16545 #: build/C/man7/symlink.7:348
16546 msgid ""
16547 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
16548 "command does not follow symbolic links named as argument by default.  The "
16549 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
16550 "L> option is specified."
16551 msgstr ""
16552
16553 #. type: SS
16554 #: build/C/man7/symlink.7:348
16555 #, no-wrap
16556 msgid "Commands traversing a file tree"
16557 msgstr "ファイルツリーを辿るコマンド"
16558
16559 #. type: Plain text
16560 #: build/C/man7/symlink.7:361
16561 msgid ""
16562 "The following commands either optionally or always traverse file trees: "
16563 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), "
16564 "B<ls>(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
16565 msgstr ""
16566
16567 #. type: Plain text
16568 #: build/C/man7/symlink.7:365
16569 msgid ""
16570 "It is important to realize that the following rules apply equally to "
16571 "symbolic links encountered during the file tree traversal and symbolic links "
16572 "listed as command-line arguments."
16573 msgstr ""
16574
16575 #. type: Plain text
16576 #: build/C/man7/symlink.7:370
16577 msgid ""
16578 "The I<first rule> applies to symbolic links that reference files other than "
16579 "directories.  Operations that apply to symbolic links are performed on the "
16580 "links themselves, but otherwise the links are ignored."
16581 msgstr ""
16582
16583 #. type: Plain text
16584 #: build/C/man7/symlink.7:382
16585 msgid ""
16586 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
16587 "symbolic links encountered in the tree traversal of I<directory>, because "
16588 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
16589 "referred to by I<slink>."
16590 msgstr ""
16591
16592 #. type: Plain text
16593 #: build/C/man7/symlink.7:387
16594 msgid ""
16595 "The I<second rule> applies to symbolic links that refer to directories.  "
16596 "Symbolic links that refer to directories are never followed by default.  "
16597 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
16598 "\" walk (where symbolic links the refer to directories are followed)."
16599 msgstr ""
16600
16601 #. type: Plain text
16602 #: build/C/man7/symlink.7:390
16603 msgid ""
16604 "Certain conventions are (should be) followed as consistently as possible by "
16605 "commands that perform file tree walks:"
16606 msgstr ""
16607
16608 #. type: Plain text
16609 #: build/C/man7/symlink.7:403
16610 msgid ""
16611 "A command can be made to follow any symbolic links named on the command "
16612 "line, regardless of the type of file they reference, by specifying the I<-H> "
16613 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
16614 "name space look like the logical name space.  (Note, for commands that do "
16615 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
16616 "R> flag is not also specified.)"
16617 msgstr ""
16618
16619 #. type: Plain text
16620 #: build/C/man7/symlink.7:419
16621 msgid ""
16622 "For example, the command I<chown\\ -HR user slink> will traverse the file "
16623 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
16624 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
16625 "symbolic links specified on the command line to be dereferenced for the "
16626 "purposes of both the action to be performed and the tree walk, and it is as "
16627 "if the user had specified the name of the file to which the symbolic link "
16628 "pointed."
16629 msgstr ""
16630
16631 #. type: Plain text
16632 #: build/C/man7/symlink.7:433
16633 msgid ""
16634 "A command can be made to follow any symbolic links named on the command "
16635 "line, as well as any symbolic links encountered during the traversal, "
16636 "regardless of the type of file they reference, by specifying the I<-L> (for "
16637 "\"logical\") flag.  This flag is intended to make the entire name space look "
16638 "like the logical name space.  (Note, for commands that do not always do file "
16639 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
16640 "also specified.)"
16641 msgstr ""
16642
16643 #. type: Plain text
16644 #: build/C/man7/symlink.7:448
16645 msgid ""
16646 "For example, the command I<chown\\ -LR user slink> will change the owner of "
16647 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
16648 "B<chown> will traverse the file hierarchy rooted in the directory that it "
16649 "references.  In addition, if any symbolic links are encountered in any file "
16650 "tree that B<chown> traverses, they will be treated in the same fashion as "
16651 "I<slink>."
16652 msgstr ""
16653
16654 #. type: Plain text
16655 #: build/C/man7/symlink.7:455
16656 msgid ""
16657 "A command can be made to provide the default behavior by specifying the I<-"
16658 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
16659 "space look like the physical name space."
16660 msgstr ""
16661
16662 #. type: Plain text
16663 #: build/C/man7/symlink.7:473
16664 msgid ""
16665 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
16666 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
16667 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
16668 "once; the last one specified determines the command's behavior.  This is "
16669 "intended to permit you to alias commands to behave one way or the other, and "
16670 "then override that behavior on the command line."
16671 msgstr ""
16672
16673 #. type: Plain text
16674 #: build/C/man7/symlink.7:479
16675 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
16676 msgstr ""
16677 "コマンド B<ls>(1) と B<rm>(1) には、 これらのルールに対する例外がある。"
16678
16679 #. type: Plain text
16680 #: build/C/man7/symlink.7:492
16681 msgid ""
16682 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
16683 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
16684 "command does not support the I<-H>, I<-L>, or I<-P> options."
16685 msgstr ""
16686 "B<rm>(1) コマンドは、 参照先のファイルではなく、シンボリックリンクに対して操"
16687 "作を行う。 したがって、 シンボリックリンクを辿ることはない。 B<rm>(1) コマン"
16688 "ドはオプション I<-H>, I<-L>, I<-P> をサポートしていない。"
16689
16690 #. type: Plain text
16691 #: build/C/man7/symlink.7:512
16692 msgid ""
16693 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
16694 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
16695 "options, B<ls>(1)  will follow symbolic links specified on the command "
16696 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
16697 "regardless of their type, whether specified on the command line or "
16698 "encountered in the tree walk."
16699 msgstr ""
16700
16701 #. type: Plain text
16702 #: build/C/man7/symlink.7:530
16703 msgid ""
16704 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), "
16705 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), "
16706 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
16707 "B<path_resolution>(7)"
16708 msgstr ""
16709 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
16710 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
16711 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
16712 "B<lutimes>(3), B<path_resolution>(7)"
16713
16714 #. type: TH
16715 #: build/C/man3/tempnam.3:25
16716 #, no-wrap
16717 msgid "TEMPNAM"
16718 msgstr "TEMPNAM"
16719
16720 #. type: TH
16721 #: build/C/man3/tempnam.3:25 build/C/man3/tmpnam.3:27
16722 #, no-wrap
16723 msgid "2014-02-27"
16724 msgstr "2014-02-27"
16725
16726 #. type: Plain text
16727 #: build/C/man3/tempnam.3:28
16728 msgid "tempnam - create a name for a temporary file"
16729 msgstr "tempnam - テンポラリファイルの名前を作成する"
16730
16731 #. type: Plain text
16732 #: build/C/man3/tempnam.3:33
16733 #, no-wrap
16734 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
16735 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
16736
16737 #. type: Plain text
16738 #: build/C/man3/tempnam.3:42
16739 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
16740 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
16741
16742 #. type: Plain text
16743 #: build/C/man3/tempnam.3:49
16744 msgid ""
16745 "I<Never use this function.> Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
16746 msgstr ""
16747 "I<決してこの関数を使用しないこと。> 代わりに B<mkstemp>(3)  か B<tmpfile>(3) "
16748 "を使うこと。"
16749
16750 #. type: Plain text
16751 #: build/C/man3/tempnam.3:63
16752 msgid ""
16753 "The B<tempnam>()  function returns a pointer to a string that is a valid "
16754 "filename, and such that a file with this name did not exist when "
16755 "B<tempnam>()  checked.  The filename suffix of the pathname generated will "
16756 "start with I<pfx> in case I<pfx> is a non-NULL string of at most five "
16757 "bytes.  The directory prefix part of the pathname generated is required to "
16758 "be \"appropriate\" (often that at least implies writable)."
16759 msgstr ""
16760 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
16761 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
16762 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
16763 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
16764 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
16765 "ためにはまず少なくとも 書き込み可能でなければならない)。"
16766
16767 #. type: Plain text
16768 #: build/C/man3/tempnam.3:66
16769 msgid ""
16770 "Attempts to find an appropriate directory go through the following steps:"
16771 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
16772
16773 #. type: TP
16774 #: build/C/man3/tempnam.3:66
16775 #, no-wrap
16776 msgid "a)"
16777 msgstr "a)"
16778
16779 #. type: Plain text
16780 #: build/C/man3/tempnam.3:72
16781 msgid ""
16782 "In case the environment variable B<TMPDIR> exists and contains the name of "
16783 "an appropriate directory, that is used."
16784 msgstr ""
16785 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
16786 "ら、それを用いる。"
16787
16788 #. type: TP
16789 #: build/C/man3/tempnam.3:72
16790 #, no-wrap
16791 msgid "b)"
16792 msgstr "b)"
16793
16794 #. type: Plain text
16795 #: build/C/man3/tempnam.3:77
16796 msgid ""
16797 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
16798 msgstr ""
16799 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
16800 "る。"
16801
16802 #. type: TP
16803 #: build/C/man3/tempnam.3:77
16804 #, no-wrap
16805 msgid "c)"
16806 msgstr "c)"
16807
16808 #. type: Plain text
16809 #: build/C/man3/tempnam.3:84
16810 msgid ""
16811 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
16812 "appropriate."
16813 msgstr ""
16814 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
16815 "なら、それを用いる。"
16816
16817 #. type: TP
16818 #: build/C/man3/tempnam.3:84
16819 #, no-wrap
16820 msgid "d)"
16821 msgstr "d)"
16822
16823 #. type: Plain text
16824 #: build/C/man3/tempnam.3:87
16825 msgid "Finally an implementation-defined directory may be used."
16826 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
16827
16828 #. type: Plain text
16829 #: build/C/man3/tempnam.3:94
16830 msgid ""
16831 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
16832 "hence should be freed by B<free>(3)."
16833 msgstr ""
16834 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
16835 "B<free>(3)  で解放すべきである。"
16836
16837 #. type: Plain text
16838 #: build/C/man3/tempnam.3:101
16839 msgid ""
16840 "On success, the B<tempnam>()  function returns a pointer to a unique "
16841 "temporary filename.  It returns NULL if a unique name cannot be generated, "
16842 "with I<errno> set to indicate the cause of the error."
16843 msgstr ""
16844 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返"
16845 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
16846 "値を設定する。"
16847
16848 #. type: Plain text
16849 #: build/C/man3/tempnam.3:105
16850 msgid "Allocation of storage failed."
16851 msgstr "保存領域の割り当てに失敗した。"
16852
16853 #. type: Plain text
16854 #: build/C/man3/tempnam.3:110
16855 msgid ""
16856 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
16857 msgstr ""
16858 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
16859 "る。"
16860
16861 #. type: Plain text
16862 #: build/C/man3/tempnam.3:129
16863 msgid ""
16864 "Although B<tempnam>()  generates names that are difficult to guess, it is "
16865 "nevertheless possible that between the time that B<tempnam>()  returns a "
16866 "pathname, and the time that the program opens it, another program might "
16867 "create that pathname using B<open>(2), or create it as a symbolic link.  "
16868 "This can lead to security holes.  To avoid such possibilities, use the "
16869 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
16870 "B<mkstemp>(3)  or B<tmpfile>(3)."
16871 msgstr ""
16872 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 "
16873 "B<tempnam>()  がパス名を返してから、プログラムがそのファイルをオープンする ま"
16874 "での間に、別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、"
16875 "シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつ"
16876 "ながる可能性がある。 そのような可能性を回避するためには、 B<open>(2)  の "
16877 "B<O_EXCL> フラグを使ってパス名をオープンすればよい。 もっといいのは、 "
16878 "B<mkstemp>(3)  や B<tmpfile>(3)  を使うことである。"
16879
16880 #. type: Plain text
16881 #: build/C/man3/tempnam.3:137
16882 msgid ""
16883 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
16884 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
16885 "tmp> (and this is what glibc does)."
16886 msgstr ""
16887 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
16888 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
16889 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
16890
16891 #. type: Plain text
16892 #: build/C/man3/tempnam.3:142
16893 msgid ""
16894 "Because it dynamically allocates memory used to return the pathname, "
16895 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
16896 msgstr ""
16897 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
16898 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
16899
16900 #. type: Plain text
16901 #: build/C/man3/tempnam.3:155
16902 msgid ""
16903 "The B<tempnam>()  function generates a different string each time it is "
16904 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
16905 "called more than B<TMP_MAX> times, the behavior is implementation defined."
16906 msgstr ""
16907 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
16908 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
16909 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
16910
16911 #. type: Plain text
16912 #: build/C/man3/tempnam.3:159
16913 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
16914 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
16915
16916 #. type: Plain text
16917 #: build/C/man3/tempnam.3:165
16918 msgid ""
16919 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
16920 "upon failure to find a unique name."
16921 msgstr ""
16922 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
16923 "ラー B<EEXIST> で失敗する。"
16924
16925 #. type: Plain text
16926 #: build/C/man3/tempnam.3:168
16927 msgid ""
16928 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
16929 "accessibility of a directory is determined."
16930 msgstr ""
16931 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
16932 "度のアクセス権限が必要なのかは指定されていない。"
16933
16934 #. type: Plain text
16935 #: build/C/man3/tempnam.3:173
16936 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
16937 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
16938
16939 #. type: TH
16940 #: build/C/man3/tmpfile.3:31
16941 #, no-wrap
16942 msgid "TMPFILE"
16943 msgstr "TMPFILE"
16944
16945 #. type: Plain text
16946 #: build/C/man3/tmpfile.3:34
16947 msgid "tmpfile - create a temporary file"
16948 msgstr "tmpfile - テンポラリファイルを作成する"
16949
16950 #. type: Plain text
16951 #: build/C/man3/tmpfile.3:39
16952 #, no-wrap
16953 msgid "B<FILE *tmpfile(void);>\n"
16954 msgstr "B<FILE *tmpfile(void);>\n"
16955
16956 #. type: Plain text
16957 #: build/C/man3/tmpfile.3:47
16958 msgid ""
16959 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
16960 "write (w+b) mode.  The file will be automatically deleted when it is closed "
16961 "or the program terminates."
16962 msgstr ""
16963 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
16964 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
16965 "自動的に削除される。"
16966
16967 #. type: Plain text
16968 #: build/C/man3/tmpfile.3:56
16969 msgid ""
16970 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
16971 "filename cannot be generated or the unique file cannot be opened.  In the "
16972 "latter case, I<errno> is set to indicate the error."
16973 msgstr ""
16974 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
16975 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
16976 "I<errno> を設定する。"
16977
16978 #. type: Plain text
16979 #: build/C/man3/tmpfile.3:60
16980 msgid "Search permission denied for directory in file's path prefix."
16981 msgstr ""
16982 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
16983
16984 #. type: Plain text
16985 #: build/C/man3/tmpfile.3:63
16986 msgid "Unable to generate a unique filename."
16987 msgstr "ユニークなファイル名が作成できなかった。"
16988
16989 #. type: Plain text
16990 #: build/C/man3/tmpfile.3:66
16991 msgid "The call was interrupted by a signal."
16992 msgstr "呼び出しがシグナルによって中断された。"
16993
16994 #. type: Plain text
16995 #: build/C/man3/tmpfile.3:69
16996 msgid "Too many file descriptors in use by the process."
16997 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
16998
16999 #. type: Plain text
17000 #: build/C/man3/tmpfile.3:72
17001 msgid "Too many files open in the system."
17002 msgstr "システム全体でオープン可能なファイル数を超過した。"
17003
17004 #. type: Plain text
17005 #: build/C/man3/tmpfile.3:75
17006 msgid "There was no room in the directory to add the new filename."
17007 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
17008
17009 #. type: Plain text
17010 #: build/C/man3/tmpfile.3:78
17011 msgid "Read-only filesystem."
17012 msgstr "読みだし専用ファイルシステムである。"
17013
17014 #. type: Plain text
17015 #: build/C/man3/tmpfile.3:80
17016 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
17017 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
17018
17019 #. type: Plain text
17020 #: build/C/man3/tmpfile.3:86
17021 msgid ""
17022 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
17023 "stream cannot be opened."
17024 msgstr ""
17025 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
17026 "メッセージが書き出される、と規定されている。"
17027
17028 #. type: Plain text
17029 #: build/C/man3/tmpfile.3:97
17030 msgid ""
17031 "The standard does not specify the directory that B<tmpfile>()  will use.  "
17032 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
17033 "and if that fails the directory I</tmp>."
17034 msgstr ""
17035 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
17036 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
17037 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
17038
17039 #. type: Plain text
17040 #: build/C/man3/tmpfile.3:103
17041 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
17042 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
17043
17044 #. type: TH
17045 #: build/C/man3/tmpnam.3:27
17046 #, no-wrap
17047 msgid "TMPNAM"
17048 msgstr "TMPNAM"
17049
17050 #. type: Plain text
17051 #: build/C/man3/tmpnam.3:30
17052 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
17053 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
17054
17055 #. type: Plain text
17056 #: build/C/man3/tmpnam.3:35
17057 #, no-wrap
17058 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
17059 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
17060
17061 #. type: Plain text
17062 #: build/C/man3/tmpnam.3:45
17063 msgid ""
17064 "B<Note:> Avoid use of B<tmpnam>(); use B<mkstemp>(3)  or B<tmpfile>(3)  "
17065 "instead."
17066 msgstr ""
17067 "B<注意:> B<tmpnam>() の使用は避けること。代わりに B<mkstemp>(3) か "
17068 "B<tmpfile>(3) を使うこと。"
17069
17070 #. type: Plain text
17071 #: build/C/man3/tmpnam.3:67
17072 msgid ""
17073 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
17074 "filename, and such that a file with this name did not exist at some point in "
17075 "time, so that naive programmers may think it a suitable name for a temporary "
17076 "file.  If the argument I<s> is NULL, this name is generated in an internal "
17077 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
17078 "I<s> is not NULL, the name is copied to the character array (of length at "
17079 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
17080 "case of success."
17081 msgstr ""
17082 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
17083 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
17084 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
17085 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
17086 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
17087 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
17088 "ピーされ、 成功した場合は I<s> が返される。"
17089
17090 #. type: Plain text
17091 #: build/C/man3/tmpnam.3:79
17092 msgid ""
17093 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
17094 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
17095 "the B<TMP_MAX> mentioned below.)"
17096 msgstr ""
17097 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
17098 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
17099 "hE<gt>> で定義されている。)"
17100
17101 #. type: Plain text
17102 #: build/C/man3/tmpnam.3:84
17103 msgid ""
17104 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
17105 "or NULL if a unique name cannot be generated."
17106 msgstr ""
17107 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
17108 "が作成できなかった場合は NULL を返す。"
17109
17110 #. type: Plain text
17111 #: build/C/man3/tmpnam.3:86
17112 msgid "No errors are defined."
17113 msgstr "エラーは定義されていない。"
17114
17115 #. type: Plain text
17116 #: build/C/man3/tmpnam.3:92
17117 msgid ""
17118 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
17119 "safe if called with a NULL parameter."
17120 msgstr ""
17121 "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
17122 "れた場合はスレッドセーフではない。"
17123
17124 #. type: Plain text
17125 #: build/C/man3/tmpnam.3:96
17126 msgid "The B<tmpnam_r>()  function is thread-safe."
17127 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
17128
17129 #. type: Plain text
17130 #: build/C/man3/tmpnam.3:101
17131 msgid ""
17132 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
17133 "obsolete."
17134 msgstr ""
17135 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
17136 "定としている。"
17137
17138 #. type: Plain text
17139 #: build/C/man3/tmpnam.3:112
17140 msgid ""
17141 "The B<tmpnam>()  function generates a different string each time it is "
17142 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
17143 "the behavior is implementation defined."
17144 msgstr ""
17145 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
17146 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
17147
17148 #. type: Plain text
17149 #: build/C/man3/tmpnam.3:131
17150 msgid ""
17151 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
17152 "nevertheless possible that between the time that B<tmpnam>()  returns a "
17153 "pathname, and the time that the program opens it, another program might "
17154 "create that pathname using B<open>(2), or create it as a symbolic link.  "
17155 "This can lead to security holes.  To avoid such possibilities, use the "
17156 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
17157 "B<mkstemp>(3)  or B<tmpfile>(3)."
17158 msgstr ""
17159 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 "
17160 "B<tmpnam>()  がパス名を返してから、プログラムがそのファイルをオープンする ま"
17161 "での間に、別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、"
17162 "シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつ"
17163 "ながる可能性がある。 そのような可能性を回避するためには、 B<open>(2)  の "
17164 "B<O_EXCL> フラグを使ってパス名をオープンすればよい。 もっといいのは、 "
17165 "B<mkstemp>(3)  や B<tmpfile>(3)  を使うことである。"
17166
17167 #. type: Plain text
17168 #: build/C/man3/tmpnam.3:139
17169 msgid ""
17170 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
17171 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
17172 "defined."
17173 msgstr ""
17174 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
17175 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
17176 "NULL 引き数で呼び出してはならない。"
17177
17178 #. type: Plain text
17179 #: build/C/man3/tmpnam.3:143
17180 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
17181 msgstr ""
17182 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
17183 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
17184 "扱いしている。"
17185
17186 #. type: Plain text
17187 #: build/C/man3/tmpnam.3:151
17188 #, no-wrap
17189 msgid ""
17190 "char *\n"
17191 "tmpnam_r(char *s)\n"
17192 "{\n"
17193 "    return s ? tmpnam(s) : NULL;\n"
17194 "}\n"
17195 msgstr ""
17196 "char *\n"
17197 "tmpnam_r(char *s)\n"
17198 "{\n"
17199 "    return s ? tmpnam(s) : NULL;\n"
17200 "}\n"
17201
17202 #. type: Plain text
17203 #: build/C/man3/tmpnam.3:165
17204 msgid ""
17205 "apparently as a warning not to use NULL.  A few systems implement it.  To "
17206 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
17207 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
17208 msgstr ""
17209 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
17210 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
17211 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
17212 "がある。"
17213
17214 #. type: Plain text
17215 #: build/C/man3/tmpnam.3:172
17216 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
17217 msgstr ""
17218 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
17219 "を使うこと。"
17220
17221 #. type: Plain text
17222 #: build/C/man3/tmpnam.3:177
17223 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
17224 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
17225
17226 #. type: TH
17227 #: build/C/man2/unlink.2:33
17228 #, no-wrap
17229 msgid "UNLINK"
17230 msgstr "UNLINK"
17231
17232 #. type: Plain text
17233 #: build/C/man2/unlink.2:36
17234 msgid "unlink, unlinkat - delete a name and possibly the file it refers to"
17235 msgstr ""
17236 "unlink, unlinkat - 名前を削除し、場合によってはそれが参照しているファイルも削"
17237 "除する"
17238
17239 #. type: Plain text
17240 #: build/C/man2/unlink.2:41
17241 #, no-wrap
17242 msgid "B<int unlink(const char *>I<pathname>B<);>\n"
17243 msgstr "B<int unlink(const char *>I<pathname>B<);>\n"
17244
17245 #. type: Plain text
17246 #: build/C/man2/unlink.2:46
17247 #, no-wrap
17248 msgid "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
17249 msgstr "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
17250
17251 #. type: Plain text
17252 #: build/C/man2/unlink.2:54
17253 msgid "B<unlinkat>():"
17254 msgstr "B<unlinkat>():"
17255
17256 #. type: Plain text
17257 #: build/C/man2/unlink.2:72
17258 msgid ""
17259 "B<unlink>()  deletes a name from the filesystem.  If that name was the last "
17260 "link to a file and no processes have the file open, the file is deleted and "
17261 "the space it was using is made available for reuse."
17262 msgstr ""
17263 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
17264 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
17265 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
17266 "は再利用が可能になる。"
17267
17268 #. type: Plain text
17269 #: build/C/man2/unlink.2:76
17270 msgid ""
17271 "If the name was the last link to a file but any processes still have the "
17272 "file open, the file will remain in existence until the last file descriptor "
17273 "referring to it is closed."
17274 msgstr ""
17275 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
17276 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
17277 "でファイルは存在し続ける。"
17278
17279 #. type: Plain text
17280 #: build/C/man2/unlink.2:82
17281 msgid ""
17282 "If the name referred to a socket, FIFO, or device, the name for it is "
17283 "removed but processes which have the object open may continue to use it."
17284 msgstr ""
17285 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
17286 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
17287
17288 #. type: SS
17289 #: build/C/man2/unlink.2:82
17290 #, no-wrap
17291 msgid "unlinkat()"
17292 msgstr "unlinkat()"
17293
17294 #. type: Plain text
17295 #: build/C/man2/unlink.2:95
17296 msgid ""
17297 "The B<unlinkat>()  system call operates in exactly the same way as either "
17298 "B<unlink>()  or B<rmdir>(2)  (depending on whether or not I<flags> includes "
17299 "the B<AT_REMOVEDIR> flag)  except for the differences described here."
17300 msgstr ""
17301 "B<unlinkat>() システムコールは、B<unlink>() と B<rmdir>(2) のいずれかと全く同"
17302 "じ動作をする (どちらと同じになるかは I<flags> に B<AT_REMOVEDIR> フラグが指定"
17303 "されたかにより決まる) が、以下で説明する点が異なる。"
17304
17305 #. type: Plain text
17306 #: build/C/man2/unlink.2:107
17307 msgid ""
17308 "If the pathname given in I<pathname> is relative, then it is interpreted "
17309 "relative to the directory referred to by the file descriptor I<dirfd> "
17310 "(rather than relative to the current working directory of the calling "
17311 "process, as is done by B<unlink>()  and B<rmdir>(2)  for a relative "
17312 "pathname)."
17313 msgstr ""
17314 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
17315 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
17316 "(B<unlink>() や B<rmdir>(2) に相対パス名を渡した場合のように、呼び出したプロ"
17317 "セスのカレントワーキングディレクトリに対する相対パスではない)。"
17318
17319 #. type: Plain text
17320 #: build/C/man2/unlink.2:121
17321 msgid ""
17322 "If the pathname given in I<pathname> is relative and I<dirfd> is the special "
17323 "value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current "
17324 "working directory of the calling process (like B<unlink>()  and B<rmdir>(2))."
17325 msgstr ""
17326 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
17327 "の場合、 (B<unlink>() や B<rmdir>(2) と同様に) I<pathname> は呼び出したプロセ"
17328 "スのカレントワーキングディレクトリに対する相対パスと解釈される。"
17329
17330 #. type: Plain text
17331 #: build/C/man2/unlink.2:127
17332 msgid ""
17333 "If the pathname given in I<pathname> is absolute, then I<dirfd> is ignored."
17334 msgstr ""
17335 "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
17336
17337 #. type: Plain text
17338 #: build/C/man2/unlink.2:133
17339 msgid ""
17340 "I<flags> is a bit mask that can either be specified as 0, or by ORing "
17341 "together flag values that control the operation of B<unlinkat>().  Currently "
17342 "only one such flag is defined:"
17343 msgstr ""
17344 "I<flags> はビットマスクで、0 もしくは B<unlinkat>() の動作を制御するフラグ値"
17345 "を論理和の形で指定することができる。現在のところ、定義されているフラグはひと"
17346 "つだけである。"
17347
17348 #. type: TP
17349 #: build/C/man2/unlink.2:133
17350 #, no-wrap
17351 msgid "B<AT_REMOVEDIR>"
17352 msgstr "B<AT_REMOVEDIR>"
17353
17354 #. type: Plain text
17355 #: build/C/man2/unlink.2:148
17356 msgid ""
17357 "By default, B<unlinkat>()  performs the equivalent of B<unlink>()  on "
17358 "I<pathname>.  If the B<AT_REMOVEDIR> flag is specified, then performs the "
17359 "equivalent of B<rmdir>(2)  on I<pathname>."
17360 msgstr ""
17361 "デフォルトでは、 B<unlinkat>() は I<pathname> に対して B<unlink>() と等価な動"
17362 "作をする。 B<AT_REMOVEDIR> フラグが指定された場合、 I<pathname> に対して "
17363 "B<rmdir>(2) と等価な動作をする。"
17364
17365 #. type: Plain text
17366 #: build/C/man2/unlink.2:153
17367 msgid "See B<openat>(2)  for an explanation of the need for B<unlinkat>()."
17368 msgstr "B<unlinkat>() の必要性についての説明については B<openat>(2) を参照。"
17369
17370 #. type: Plain text
17371 #: build/C/man2/unlink.2:169
17372 msgid ""
17373 "Write access to the directory containing I<pathname> is not allowed for the "
17374 "process's effective UID, or one of the directories in I<pathname> did not "
17375 "allow search permission.  (See also B<path_resolution>(7).)"
17376 msgstr ""
17377 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
17378 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
17379 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
17380 "と)。"
17381
17382 #. type: Plain text
17383 #: build/C/man2/unlink.2:178
17384 msgid ""
17385 "The file I<pathname> cannot be unlinked because it is being used by the "
17386 "system or another process; for example, it is a mount point or the NFS "
17387 "client software created it to represent an active but otherwise nameless "
17388 "inode (\"NFS silly renamed\")."
17389 msgstr ""
17390 "システムか別のプロセスがそのファイルを使用中のため、\n"
17391 "ファイル I<pathname> を unlink できない。\n"
17392 "例えば、そのファイルがマウントポイントの場合や、\n"
17393 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
17394 "名前なし inode (nameless inode) であることを示すために作成した\n"
17395 "場合 (\"NFS silly renamed\") などがある。"
17396
17397 #. type: Plain text
17398 #: build/C/man2/unlink.2:190
17399 msgid ""
17400 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
17401 "Linux since 2.1.132.)"
17402 msgstr ""
17403 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
17404 "で、Linux 2.1.132 以降で返される。)"
17405
17406 #. type: Plain text
17407 #: build/C/man2/unlink.2:194
17408 msgid "Too many symbolic links were encountered in translating I<pathname>."
17409 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
17410
17411 #. type: Plain text
17412 #: build/C/man2/unlink.2:204
17413 msgid ""
17414 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
17415 "I<pathname> is empty."
17416 msgstr ""
17417 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
17418 "I<pathname> が空である。"
17419
17420 #. type: Plain text
17421 #: build/C/man2/unlink.2:212
17422 msgid ""
17423 "A component used as a directory in I<pathname> is not, in fact, a directory."
17424 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
17425
17426 #. type: Plain text
17427 #: build/C/man2/unlink.2:221
17428 msgid ""
17429 "The system does not allow unlinking of directories, or unlinking of "
17430 "directories requires privileges that the calling process doesn't have.  "
17431 "(This is the POSIX prescribed error return; as noted above, Linux returns "
17432 "B<EISDIR> for this case.)"
17433 msgstr ""
17434 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
17435 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
17436 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
17437 "合には Linux は B<EISDIR> を返す。)"
17438
17439 #. type: TP
17440 #: build/C/man2/unlink.2:221
17441 #, no-wrap
17442 msgid "B<EPERM> (Linux only)"
17443 msgstr "B<EPERM> (Linux のみ)"
17444
17445 #. type: Plain text
17446 #: build/C/man2/unlink.2:224
17447 msgid "The filesystem does not allow unlinking of files."
17448 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
17449
17450 #. type: Plain text
17451 #: build/C/man2/unlink.2:235
17452 msgid ""
17453 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
17454 "and the process's effective UID is neither the UID of the file to be deleted "
17455 "nor that of the directory containing it, and the process is not privileged "
17456 "(Linux: does not have the B<CAP_FOWNER> capability)."
17457 msgstr ""
17458 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
17459 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
17460 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
17461 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
17462
17463 #. type: Plain text
17464 #: build/C/man2/unlink.2:239
17465 msgid "I<pathname> refers to a file on a read-only filesystem."
17466 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
17467
17468 #. type: Plain text
17469 #: build/C/man2/unlink.2:248
17470 msgid ""
17471 "The same errors that occur for B<unlink>()  and B<rmdir>(2)  can also occur "
17472 "for B<unlinkat>().  The following additional errors can occur for "
17473 "B<unlinkat>():"
17474 msgstr ""
17475 "B<unlink>() と B<rmdir>(2) で発生するのと同じエラーが B<unlinkat>() でも起こ"
17476 "る。 B<unlinkat>() では以下のエラーも発生する。"
17477
17478 #. type: Plain text
17479 #: build/C/man2/unlink.2:263
17480 msgid ""
17481 "I<pathname> refers to a directory, and B<AT_REMOVEDIR> was not specified in "
17482 "I<flags>."
17483 msgstr ""
17484 "I<pathname> がディレクトリを参照していて、 I<flags> に B<AT_REMOVEDIR> がされ"
17485 "ていなかった。"
17486
17487 #. type: Plain text
17488 #: build/C/man2/unlink.2:273
17489 msgid ""
17490 "B<unlinkat>()  was added to Linux in kernel 2.6.16; library support was "
17491 "added to glibc in version 2.4."
17492 msgstr ""
17493 "B<unlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
17494 "ポートはバージョン 2.4 で glibc に追加された。"
17495
17496 #.  SVr4 documents additional error
17497 #.  conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
17498 #. type: Plain text
17499 #: build/C/man2/unlink.2:278
17500 msgid "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
17501 msgstr "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
17502
17503 #. type: Plain text
17504 #: build/C/man2/unlink.2:281
17505 msgid "B<unlinkat>(): POSIX.1-2008."
17506 msgstr "B<unlinkat>(): POSIX.1-2008."
17507
17508 #. type: Plain text
17509 #: build/C/man2/unlink.2:297
17510 msgid ""
17511 "On older kernels where B<unlinkat>()  is unavailable, the glibc wrapper "
17512 "function falls back to the use of B<unlink>(2)  or B<rmdir>(2).  When "
17513 "I<pathname> is a relative pathname, glibc constructs a pathname based on the "
17514 "symbolic link in I</proc/self/fd> that corresponds to the I<dirfd> argument."
17515 msgstr ""
17516 "B<unlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は "
17517 "B<unlink>(2) と B<rmdir>(2) を使用するモードにフォールバックする。 "
17518 "I<pathname> が相対パスの場合、 glibc は I<dirfd> 引き数に対応する I</proc/"
17519 "self/fd> のシンボリックリンクに基づいてパス名を構成する。"
17520
17521 #. type: Plain text
17522 #: build/C/man2/unlink.2:312
17523 msgid ""
17524 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
17525 "B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
17526 msgstr ""
17527 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
17528 "B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
17529
17530 #. type: TH
17531 #: build/C/man3/unlocked_stdio.3:25
17532 #, no-wrap
17533 msgid "UNLOCKED_STDIO"
17534 msgstr "UNLOCKED_STDIO"
17535
17536 #. type: TH
17537 #: build/C/man3/unlocked_stdio.3:25
17538 #, no-wrap
17539 msgid "2008-08-29"
17540 msgstr "2008-08-29"
17541
17542 #. type: Plain text
17543 #: build/C/man3/unlocked_stdio.3:29
17544 msgid ""
17545 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
17546 "nonlocking stdio functions"
17547 msgstr ""
17548 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
17549 "わずに標準入出力を行う関数群"
17550
17551 #. type: Plain text
17552 #: build/C/man3/unlocked_stdio.3:37
17553 #, no-wrap
17554 msgid ""
17555 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
17556 "B<int getchar_unlocked(void);>\n"
17557 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17558 "B<int putchar_unlocked(int >I<c>B<);>\n"
17559 msgstr ""
17560 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
17561 "B<int getchar_unlocked(void);>\n"
17562 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17563 "B<int putchar_unlocked(int >I<c>B<);>\n"
17564
17565 #. type: Plain text
17566 #: build/C/man3/unlocked_stdio.3:49
17567 #, no-wrap
17568 msgid ""
17569 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
17570 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
17571 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
17572 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
17573 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
17574 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
17575 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17576 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17577 "B<                      FILE *>I<stream>B<);>\n"
17578 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17579 "B<                      FILE *>I<stream>B<);>\n"
17580 msgstr ""
17581 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
17582 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
17583 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
17584 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
17585 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
17586 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
17587 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17588 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17589 "B<                      FILE *>I<stream>B<);>\n"
17590 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17591 "B<                      FILE *>I<stream>B<);>\n"
17592
17593 #. type: Plain text
17594 #: build/C/man3/unlocked_stdio.3:52
17595 #, no-wrap
17596 msgid ""
17597 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17598 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
17599 msgstr ""
17600 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17601 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
17602
17603 #. type: Plain text
17604 #: build/C/man3/unlocked_stdio.3:63
17605 #, no-wrap
17606 msgid ""
17607 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
17608 "B<wint_t getwchar_unlocked(void);>\n"
17609 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
17610 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17611 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17612 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
17613 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17614 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
17615 msgstr ""
17616 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
17617 "B<wint_t getwchar_unlocked(void);>\n"
17618 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
17619 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17620 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17621 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
17622 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17623 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
17624
17625 #. type: Plain text
17626 #: build/C/man3/unlocked_stdio.3:75
17627 msgid ""
17628 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17629 "B<putchar_unlocked>():"
17630 msgstr ""
17631 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17632 "B<putchar_unlocked>():"
17633
17634 #. type: Plain text
17635 #: build/C/man3/unlocked_stdio.3:78
17636 msgid ""
17637 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
17638 "_BSD_SOURCE || _SVID_SOURCE"
17639 msgstr ""
17640 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
17641 "_BSD_SOURCE || _SVID_SOURCE"
17642
17643 #. type: Plain text
17644 #: build/C/man3/unlocked_stdio.3:89
17645 msgid ""
17646 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
17647 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
17648 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
17649 msgstr ""
17650 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
17651 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
17652 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
17653
17654 #. type: Plain text
17655 #: build/C/man3/unlocked_stdio.3:91
17656 msgid "_BSD_SOURCE || _SVID_SOURCE"
17657 msgstr "_BSD_SOURCE || _SVID_SOURCE"
17658
17659 #. type: Plain text
17660 #: build/C/man3/unlocked_stdio.3:102
17661 msgid ""
17662 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
17663 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
17664 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
17665 msgstr ""
17666 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
17667 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
17668 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
17669
17670 #. type: Plain text
17671 #: build/C/man3/unlocked_stdio.3:113
17672 msgid ""
17673 "Each of these functions has the same behavior as its counterpart without the "
17674 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
17675 "locks themselves, and do not test for the presence of locks set by others) "
17676 "and hence are thread-unsafe.  See B<flockfile>(3)."
17677 msgstr ""
17678 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
17679 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
17680 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
17681 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
17682 "B<flockfile>(3)  を参照のこと。"
17683
17684 #. type: Plain text
17685 #: build/C/man3/unlocked_stdio.3:120
17686 msgid ""
17687 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
17688 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
17689 msgstr ""
17690 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17691 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
17692
17693 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
17694 #.  moved to a compatibility library.
17695 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
17696 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
17697 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
17698 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
17699 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17700 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
17701 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
17702 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
17703 #.  ungetc_unlocked, ungetwc_unlocked.
17704 #. type: Plain text
17705 #: build/C/man3/unlocked_stdio.3:136
17706 msgid ""
17707 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
17708 "are available in recent glibc.  They should probably not be used."
17709 msgstr ""
17710 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
17711 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
17712
17713 #. type: Plain text
17714 #: build/C/man3/unlocked_stdio.3:139
17715 msgid "B<flockfile>(3), B<stdio>(3)"
17716 msgstr "B<flockfile>(3), B<stdio>(3)"
17717
17718 #. type: TH
17719 #: build/C/man3/wprintf.3:16
17720 #, no-wrap
17721 msgid "WPRINTF"
17722 msgstr "WPRINTF"
17723
17724 #. type: TH
17725 #: build/C/man3/wprintf.3:16
17726 #, no-wrap
17727 msgid "2014-03-19"
17728 msgstr "2014-03-19"
17729
17730 #. type: Plain text
17731 #: build/C/man3/wprintf.3:20
17732 msgid ""
17733 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
17734 "character output conversion"
17735 msgstr ""
17736 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
17737 "フォーマットして出力する"
17738
17739 #. type: Plain text
17740 #: build/C/man3/wprintf.3:24
17741 #, no-wrap
17742 msgid ""
17743 "B<#include E<lt>stdio.hE<gt>>\n"
17744 "B<#include E<lt>wchar.hE<gt>>\n"
17745 msgstr ""
17746 "B<#include E<lt>stdio.hE<gt>>\n"
17747 "B<#include E<lt>wchar.hE<gt>>\n"
17748
17749 #. type: Plain text
17750 #: build/C/man3/wprintf.3:29
17751 #, no-wrap
17752 msgid ""
17753 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
17754 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
17755 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17756 "B<             const wchar_t *>I<format>B<, ...);>\n"
17757 msgstr ""
17758 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
17759 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
17760 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17761 "B<             const wchar_t *>I<format>B<, ...);>\n"
17762
17763 #. type: Plain text
17764 #: build/C/man3/wprintf.3:34
17765 #, no-wrap
17766 msgid ""
17767 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17768 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17769 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17770 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17771 msgstr ""
17772 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17773 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17774 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17775 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17776
17777 #.  .BR wprintf (),
17778 #.  .BR fwprintf (),
17779 #.  .BR swprintf (),
17780 #.  .BR vwprintf (),
17781 #.  .BR vfwprintf (),
17782 #.  .BR vswprintf ():
17783 #. type: Plain text
17784 #: build/C/man3/wprintf.3:51
17785 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
17786 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
17787
17788 #. type: Plain text
17789 #: build/C/man3/wprintf.3:53
17790 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
17791 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
17792
17793 #. type: Plain text
17794 #: build/C/man3/wprintf.3:56
17795 msgid "or I<cc\\ -std=c99>"
17796 msgstr "or I<cc\\ -std=c99>"
17797
17798 #. type: Plain text
17799 #: build/C/man3/wprintf.3:67
17800 msgid ""
17801 "The B<wprintf>()  family of functions is the wide-character equivalent of "
17802 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
17803 "characters."
17804 msgstr ""
17805 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
17806 "版である。これらはワイド文字をフォーマットして出力する。"
17807
17808 #. type: Plain text
17809 #: build/C/man3/wprintf.3:79
17810 msgid ""
17811 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
17812 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
17813 "more information."
17814 msgstr ""
17815 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
17816 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
17817 "ること。"
17818
17819 #. type: Plain text
17820 #: build/C/man3/wprintf.3:91
17821 msgid ""
17822 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
17823 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
17824 "for more information."
17825 msgstr ""
17826 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
17827 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
17828 "B<fwide>(3)  を参照すること。"
17829
17830 #. type: Plain text
17831 #: build/C/man3/wprintf.3:105
17832 msgid ""
17833 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
17834 "output to an array of wide characters.  The programmer must ensure that "
17835 "there is room for at least I<maxlen> wide characters at I<wcs>."
17836 msgstr ""
17837 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
17838 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
17839 "空きがあることを保証しなければ ならない。"
17840
17841 #. type: Plain text
17842 #: build/C/man3/wprintf.3:116
17843 msgid ""
17844 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
17845 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
17846 "following differences:"
17847 msgstr ""
17848 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
17849 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
17850
17851 #. type: TP
17852 #: build/C/man3/wprintf.3:116 build/C/man3/wprintf.3:121
17853 #: build/C/man3/wprintf.3:124
17854 #, no-wrap
17855 msgid "B<\\(bu>"
17856 msgstr "B<\\(bu>"
17857
17858 #. type: Plain text
17859 #: build/C/man3/wprintf.3:121
17860 msgid "The I<format> string is a wide-character string."
17861 msgstr "I<format> がワイド文字列で与えられる。"
17862
17863 #. type: Plain text
17864 #: build/C/man3/wprintf.3:124
17865 msgid "The output consists of wide characters, not bytes."
17866 msgstr "出力がバイトではなくワイド文字で構成される。"
17867
17868 #. type: Plain text
17869 #: build/C/man3/wprintf.3:143
17870 msgid ""
17871 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
17872 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
17873 "I<maxlen> argument, but these functions do not return -1 upon buffer "
17874 "overflow on Linux.)"
17875 msgstr ""
17876 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 "
17877 "B<sprintf>()  と B<vsprintf>()  は取らない (B<snprintf>()  と "
17878 "B<vsnprintf>()  は I<maxlen> 引き数を取るが これらの関数が Linux では、バッ"
17879 "ファーが溢れた場合でも -1 を返さない)。"
17880
17881 #. type: Plain text
17882 #: build/C/man3/wprintf.3:149
17883 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
17884 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
17885
17886 #. type: Plain text
17887 #: build/C/man3/wprintf.3:163
17888 msgid ""
17889 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
17890 "character by a call to the B<btowc>(3)  function, and the resulting wide "
17891 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
17892 "character) argument is written."
17893 msgstr ""
17894 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
17895 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
17896 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
17897
17898 #. type: Plain text
17899 #: build/C/man3/wprintf.3:203
17900 msgid ""
17901 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
17902 "to be a pointer to an array of character type (pointer to a string) "
17903 "containing a multibyte character sequence beginning in the initial shift "
17904 "state.  Characters from the array are converted to wide characters (each by "
17905 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
17906 "the initial state before the first byte).  The resulting wide characters are "
17907 "written up to (but not including) the terminating null wide character (L\\(aq"
17908 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
17909 "number specified are written.  Note that the precision determines the number "
17910 "of I<wide characters> written, not the number of I<bytes> or I<screen "
17911 "positions>.  The array must contain a terminating null byte (\\(aq"
17912 "\\e0\\(aq), unless a precision is given and it is so small that the number "
17913 "of converted wide characters reaches it before the end of the array is "
17914 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
17915 "argument is expected to be a pointer to an array of wide characters.  Wide "
17916 "characters from the array are written up to (but not including) a "
17917 "terminating null wide character.  If a precision is specified, no more than "
17918 "the number specified are written.  The array must contain a terminating null "
17919 "wide character, unless a precision is given and it is smaller than or equal "
17920 "to the number of wide characters in the array."
17921 msgstr ""
17922 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
17923 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
17924 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
17925 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
17926 "字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度"
17927 "(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれな"
17928 "い。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字"
17929 "> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
17930 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
17931 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
17932 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
17933 "引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端の"
17934 "ナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精"
17935 "度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含"
17936 "む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さ"
17937 "くな ければならない。"
17938
17939 #. type: Plain text
17940 #: build/C/man3/wprintf.3:211
17941 msgid ""
17942 "The functions return the number of wide characters written, excluding the "
17943 "terminating null wide character in case of the functions B<swprintf>()  and "
17944 "B<vswprintf>().  They return -1 when an error occurs."
17945 msgstr ""
17946 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
17947 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
17948 "場合は -1 を返す。"
17949
17950 #. type: Plain text
17951 #: build/C/man3/wprintf.3:213
17952 msgid "C99."
17953 msgstr "C99."
17954
17955 #. type: Plain text
17956 #: build/C/man3/wprintf.3:221
17957 msgid ""
17958 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
17959 "the current locale."
17960 msgstr ""
17961 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
17962
17963 #. type: Plain text
17964 #: build/C/man3/wprintf.3:251
17965 msgid ""
17966 "If the I<format> string contains non-ASCII wide characters, the program will "
17967 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
17968 "time is the same as the B<LC_CTYPE> category of the current locale at "
17969 "compile time.  This is because the I<wchar_t> representation is platform- "
17970 "and locale-dependent.  (The glibc represents wide characters using their "
17971 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
17972 "the use of C99 universal character names of the form \\eunnnn does not solve "
17973 "this problem.)  Therefore, in internationalized programs, the I<format> "
17974 "string should consist of ASCII wide characters only, or should be "
17975 "constructed at run time in an internationalized way (e.g., using "
17976 "B<gettext>(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
17977 msgstr ""
17978 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
17979 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
17980 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
17981 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
17982 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
17983 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
17984 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
17985 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
17986 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
17987
17988 #.  .BR wscanf (3)
17989 #. type: Plain text
17990 #: build/C/man3/wprintf.3:258
17991 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
17992 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
17993
17994 #. type: TH
17995 #: build/C/man2/write.2:39
17996 #, no-wrap
17997 msgid "WRITE"
17998 msgstr "WRITE"
17999
18000 #. type: Plain text
18001 #: build/C/man2/write.2:42
18002 msgid "write - write to a file descriptor"
18003 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
18004
18005 #. type: Plain text
18006 #: build/C/man2/write.2:46
18007 msgid ""
18008 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
18009 msgstr ""
18010 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
18011
18012 #. type: Plain text
18013 #: build/C/man2/write.2:54
18014 msgid ""
18015 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
18016 "the file referred to by the file descriptor I<fd>."
18017 msgstr ""
18018 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
18019 "照するファイルへ、最大 I<count> バイトを書き込む。"
18020
18021 #. type: Plain text
18022 #: build/C/man2/write.2:68
18023 msgid ""
18024 "The number of bytes written may be less than I<count> if, for example, there "
18025 "is insufficient space on the underlying physical medium, or the "
18026 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
18027 "call was interrupted by a signal handler after having written less than "
18028 "I<count> bytes.  (See also B<pipe>(7).)"
18029 msgstr ""
18030 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
18031 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
18032 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
18033 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 "
18034 "(B<pipe>(7)  も参照のこと。)"
18035
18036 #. type: Plain text
18037 #: build/C/man2/write.2:82
18038 msgid ""
18039 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
18040 "example, a regular file)  writing takes place at the current file offset, "
18041 "and the file offset is incremented by the number of bytes actually written.  "
18042 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
18043 "to the end of the file before writing.  The adjustment of the file offset "
18044 "and the write operation are performed as an atomic step."
18045 msgstr ""
18046 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
18047 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
18048 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
18049 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
18050 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
18051 "処理として 実行される。"
18052
18053 #. type: Plain text
18054 #: build/C/man2/write.2:89
18055 msgid ""
18056 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
18057 "B<write>()  has returned returns the new data.  Note that not all "
18058 "filesystems are POSIX conforming."
18059 msgstr ""
18060 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
18061 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
18062 "ること。"
18063
18064 #. type: Plain text
18065 #: build/C/man2/write.2:94
18066 msgid ""
18067 "On success, the number of bytes written is returned (zero indicates nothing "
18068 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
18069 msgstr ""
18070 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
18071 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
18072
18073 #. type: Plain text
18074 #: build/C/man2/write.2:107
18075 msgid ""
18076 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
18077 "return a failure status if one of the errors below is detected.  If no "
18078 "errors are detected, 0 will be returned without causing any other effect.  "
18079 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
18080 "the results are not specified."
18081 msgstr ""
18082 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
18083 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
18084 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
18085 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
18086 "その結果は規定されていない。"
18087
18088 #. type: Plain text
18089 #: build/C/man2/write.2:115
18090 msgid ""
18091 "The file descriptor I<fd> refers to a file other than a socket and has been "
18092 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
18093 msgstr ""
18094 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
18095 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
18096 "する状況にある。"
18097
18098 #.  Actually EAGAIN on Linux
18099 #. type: Plain text
18100 #: build/C/man2/write.2:126
18101 msgid ""
18102 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
18103 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
18104 "error to be returned for this case, and does not require these constants to "
18105 "have the same value, so a portable application should check for both "
18106 "possibilities."
18107 msgstr ""
18108 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
18109 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
18110 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
18111 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
18112 "プリケーションでは、両方の可能性を 確認すべきである。"
18113
18114 #. type: Plain text
18115 #: build/C/man2/write.2:130
18116 msgid "I<fd> is not a valid file descriptor or is not open for writing."
18117 msgstr ""
18118 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
18119 "されていない。"
18120
18121 #. type: TP
18122 #: build/C/man2/write.2:130
18123 #, no-wrap
18124 msgid "B<EDESTADDRREQ>"
18125 msgstr "B<EDESTADDRREQ>"
18126
18127 #. type: Plain text
18128 #: build/C/man2/write.2:135
18129 msgid ""
18130 "I<fd> refers to a datagram socket for which a peer address has not been set "
18131 "using B<connect>(2)."
18132 msgstr ""
18133 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
18134 "グラムソケットを 参照している。"
18135
18136 #. type: Plain text
18137 #: build/C/man2/write.2:141
18138 msgid ""
18139 "The user's quota of disk blocks on the filesystem containing the file "
18140 "referred to by I<fd> has been exhausted."
18141 msgstr ""
18142 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
18143 "クォータの上限に達している。"
18144
18145 #. type: Plain text
18146 #: build/C/man2/write.2:150
18147 msgid ""
18148 "An attempt was made to write a file that exceeds the implementation-defined "
18149 "maximum file size or the process's file size limit, or to write at a "
18150 "position past the maximum allowed offset."
18151 msgstr ""
18152 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
18153 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
18154 "書き込もうとした。"
18155
18156 #. type: Plain text
18157 #: build/C/man2/write.2:154
18158 msgid ""
18159 "The call was interrupted by a signal before any data was written; see "
18160 "B<signal>(7)."
18161 msgstr ""
18162 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 "
18163 "B<signal>(7)  参照。"
18164
18165 #. type: Plain text
18166 #: build/C/man2/write.2:165
18167 msgid ""
18168 "I<fd> is attached to an object which is unsuitable for writing; or the file "
18169 "was opened with the B<O_DIRECT> flag, and either the address specified in "
18170 "I<buf>, the value specified in I<count>, or the current file offset is not "
18171 "suitably aligned."
18172 msgstr ""
18173 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
18174 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
18175 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
18176 "メントが不適切である。"
18177
18178 #. type: Plain text
18179 #: build/C/man2/write.2:168
18180 msgid "A low-level I/O error occurred while modifying the inode."
18181 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
18182
18183 #. type: Plain text
18184 #: build/C/man2/write.2:173
18185 msgid ""
18186 "The device containing the file referred to by I<fd> has no room for the data."
18187 msgstr ""
18188 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
18189
18190 #. type: TP
18191 #: build/C/man2/write.2:173
18192 #, no-wrap
18193 msgid "B<EPIPE>"
18194 msgstr "B<EPIPE>"
18195
18196 #. type: Plain text
18197 #: build/C/man2/write.2:182
18198 msgid ""
18199 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
18200 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
18201 "(Thus, the write return value is seen only if the program catches, blocks or "
18202 "ignores this signal.)"
18203 msgstr ""
18204 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
18205 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
18206 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
18207 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
18208 "write の返り値を参照できる。)"
18209
18210 #. type: Plain text
18211 #: build/C/man2/write.2:185
18212 msgid "Other errors may occur, depending on the object connected to I<fd>."
18213 msgstr ""
18214 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
18215
18216 #. type: Plain text
18217 #: build/C/man2/write.2:194
18218 msgid ""
18219 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
18220 "just before any data is written."
18221 msgstr ""
18222 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
18223 "で B<EINTR> が返る。"
18224
18225 #. type: Plain text
18226 #: build/C/man2/write.2:203
18227 msgid ""
18228 "A successful return from B<write>()  does not make any guarantee that data "
18229 "has been committed to disk.  In fact, on some buggy implementations, it does "
18230 "not even guarantee that space has successfully been reserved for the data.  "
18231 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
18232 "all your data."
18233 msgstr ""
18234 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
18235 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
18236 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
18237 "write した後に B<fsync>(2)  を呼び出すことである。"
18238
18239 #. type: Plain text
18240 #: build/C/man2/write.2:211
18241 msgid ""
18242 "If a B<write>()  is interrupted by a signal handler before any bytes are "
18243 "written, then the call fails with the error B<EINTR>; if it is interrupted "
18244 "after at least one byte has been written, the call succeeds, and returns the "
18245 "number of bytes written."
18246 msgstr ""
18247 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
18248 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
18249 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
18250
18251 #
18252 #.  http://thread.gmane.org/gmane.linux.kernel/1649458
18253 #.     From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
18254 #.     Subject: Update of file offset on write() etc. is non-atomic with I/O
18255 #.     Date: 2014-02-17 15:41:37 GMT
18256 #.     Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
18257 #.  commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
18258 #.     Author: Linus Torvalds <torvalds@linux-foundation.org>
18259 #.     Date:   Mon Mar 3 09:36:58 2014 -0800
18260 #.         vfs: atomic f_pos accesses as per POSIX
18261 #. type: Plain text
18262 #: build/C/man2/write.2:250
18263 msgid ""
18264 "Among the APIs subsequently listed are B<write>()  and B<writev>(2).  And "
18265 "among the effects that should be atomic across threads (and processes)  are "
18266 "updates of the file offset.  However, on Linux before version 3.14, this was "
18267 "not the case: if two processes that share an open file description (see "
18268 "B<open>(2))  perform a B<write>()  (or B<writev>(2))  at the same time, then "
18269 "the I/O operations were not atomic with respect updating the file offset, "
18270 "with the result that the blocks of data output by the two processes might "
18271 "(incorrectly) overlap.  This problem was fixed in Linux 3.14."
18272 msgstr ""
18273
18274 #. type: Plain text
18275 #: build/C/man2/write.2:262
18276 msgid ""
18277 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
18278 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
18279 msgstr ""
18280 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
18281 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
18282
18283 #~ msgid "2013-07-23"
18284 #~ msgstr "2013-07-23"
18285
18286 #~ msgid "2014-03-20"
18287 #~ msgstr "2014-03-20"
18288
18289 #~ msgid ""
18290 #~ "On many architectures both I<off_t> and I<long> are 32-bit types, but "
18291 #~ "compilation with"
18292 #~ msgstr ""
18293 #~ "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型である"
18294 #~ "が、"
18295
18296 #~ msgid "will turn I<off_t> into a 64-bit type."
18297 #~ msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
18298
18299 #~ msgid ""
18300 #~ "These functions are found on System V-like systems.  They are not present "
18301 #~ "in libc4, libc5, glibc 2.0 but are available since glibc 2.1."
18302 #~ msgstr ""
18303 #~ "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 には"
18304 #~ "なかったが、 glibc 2.1 から使えるようになった。"
18305
18306 #~ msgid "2014-05-10"
18307 #~ msgstr "2014-05-10"
18308
18309 #~ msgid "2014-01-22"
18310 #~ msgstr "2014-01-22"
18311
18312 #~ msgid "2014-02-11"
18313 #~ msgstr "2014-02-11"
18314
18315 #~ msgid "2013-12-30"
18316 #~ msgstr "2013-12-30"
18317
18318 #~ msgid ""
18319 #~ "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym "
18320 #~ "for B<ll>."
18321 #~ msgstr ""
18322 #~ "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と"
18323 #~ "同じ意味である。"
18324
18325 #~ msgid ""
18326 #~ "A following integer conversion corresponds to an I<intmax_t> or "
18327 #~ "I<uintmax_t> argument."
18328 #~ msgstr ""
18329 #~ "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
18330
18331 #~ msgid ""
18332 #~ "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
18333 #~ "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
18334 #~ msgstr ""
18335 #~ "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 "
18336 #~ "(Linux libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
18337
18338 #~ msgid ""
18339 #~ "A following integer conversion corresponds to a I<ptrdiff_t> argument."
18340 #~ msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
18341
18342 #~ msgid ""
18343 #~ "The number of characters written so far is stored into the integer "
18344 #~ "indicated by the I<int\\ *> (or variant) pointer argument.  No argument "
18345 #~ "is converted."
18346 #~ msgstr ""
18347 #~ "これまでに出力された文字数を I<int\\ *> (または類似の型) のポインタ引き数"
18348 #~ "が指す整数に保存する。 引き数の変換は行われない。"
18349
18350 #~ msgid ""
18351 #~ "Linux libc4 knows about the five C standard flags.  It knows about the "
18352 #~ "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
18353 #~ "B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, B<s>, B<u>, B<x>, "
18354 #~ "and B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts "
18355 #~ "B<D>, B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is "
18356 #~ "bad, and caused serious bugs later, when support for B<%D> disappeared.)  "
18357 #~ "No locale-dependent radix character, no thousands' separator, no NaN or "
18358 #~ "infinity, no \"%m$\" and \"*m$\"."
18359 #~ msgstr ""
18360 #~ "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変"
18361 #~ "換 B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, "
18362 #~ "B<p>, B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 "
18363 #~ "また、 B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使"
18364 #~ "える (これはまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグ"
18365 #~ "を 引き起こした)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$"
18366 #~ "\" と \"*m$\" は使えない。"
18367
18368 #~ msgid ""
18369 #~ "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
18370 #~ "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
18371 #~ "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
18372 #~ "double> and for I<long long int> (this is a bug).  It no longer "
18373 #~ "recognizes B<F>, B<D>, B<O>, and B<U>, but adds the conversion character "
18374 #~ "B<m>, which outputs I<strerror(errno)>."
18375 #~ msgstr ""
18376 #~ "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$"
18377 #~ "\" と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand "
18378 #~ "B<q> が使えるが、 B<L> と B<q> は両方とも I<long double> と I<long long "
18379 #~ "int> に対応している (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, "
18380 #~ "B<U> は認識されないが、変換文字 B<m> が追加された。これは "
18381 #~ "I<strerror(errno)> を出力するものである。"
18382
18383 #~ msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
18384 #~ msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
18385
18386 #~ msgid ""
18387 #~ "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd "
18388 #~ "that contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one "
18389 #~ "that ignores the I<size> argument.  Thus, the use of B<snprintf>()  with "
18390 #~ "early libc4 leads to serious security problems."
18391 #~ msgstr ""
18392 #~ "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 "
18393 #~ "その中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
18394 #~ "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使う"
18395 #~ "と、深刻なセキュリティ問題を引き起こすことがある。"
18396
18397 #~ msgid "2010-11-17"
18398 #~ msgstr "2010-11-17"
18399
18400 #~ msgid ""
18401 #~ "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
18402 #~ "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
18403 #~ "I<iovcnt> argument, and I<int> as the return type."
18404 #~ msgstr ""
18405 #~ "B<readv>(), B<writev>(): \n"
18406 #~ "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、"
18407 #~ "POSIX.1-2001。 \n"
18408 #~ "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
18409 #~ "返り値の型として I<int> を使用していた。"
18410
18411 #~ msgid "Linux notes"
18412 #~ msgstr "Linux での注意"
18413
18414 #~ msgid "2014-03-10"
18415 #~ msgstr "2014-03-10"
18416
18417 #~ msgid ""
18418 #~ "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
18419 #~ "hence would not remove directories)."
18420 #~ msgstr ""
18421 #~ "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
18422 #~ "(従ってディレクトリを削除できなかった)。"
18423
18424 #~ msgid "2014-02-18"
18425 #~ msgstr "2014-02-18"
18426
18427 #~ msgid ""
18428 #~ "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
18429 #~ "versions of BSD before 4.2BSD, and are available under Linux since libc "
18430 #~ "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a "
18431 #~ "suboptimal buffer size and should be avoided."
18432 #~ msgstr ""
18433 #~ "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD と"
18434 #~ "は互換性がない。また Linux でも(古いバージョン では)利用できないかもしれな"
18435 #~ "い。4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッ"
18436 #~ "ファーのサイズを使用するので、これも使うべきでない。"
18437
18438 #~ msgid "2014-05-05"
18439 #~ msgstr "2014-05-05"
18440
18441 #~ msgid "2014-02-21"
18442 #~ msgstr "2014-02-21"
18443
18444 #~ msgid "2012-04-17"
18445 #~ msgstr "2012-04-17"
18446
18447 #~ msgid "B<int >I<errno>B<;>"
18448 #~ msgstr "B<int >I<errno>B<;>"
18449
18450 #~ msgid "2014-04-20"
18451 #~ msgstr "2014-04-20"
18452
18453 #~ msgid ""
18454 #~ "If the pathname given in I<pathname> is relative, then it is interpreted "
18455 #~ "relative to the directory relative to by the file descriptor I<dirfd> "
18456 #~ "(rather than relative to the current working directory of the calling "
18457 #~ "process, as is done by B<open>()  for a relative pathname)."
18458 #~ msgstr ""
18459 #~ "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディス"
18460 #~ "クリプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
18461 #~ "(B<open>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
18462 #~ "ワーキングディレクトリに対する相対パスではない)。"
18463
18464 #~ msgid "2014-03-24"
18465 #~ msgstr "2014-03-24"
18466
18467 #~ msgid "2013-02-12"
18468 #~ msgstr "2013-02-12"
18469
18470 #~ msgid "2013-01-27"
18471 #~ msgstr "2013-01-27"
18472
18473 #~ msgid ""
18474 #~ "Enable the close-on-exec flag for the new file descriptor.  Specifying "
18475 #~ "this flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
18476 #~ "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag "
18477 #~ "is essential in some multithreaded programs since using a separate "
18478 #~ "B<fcntl>(2)  B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not "
18479 #~ "suffice to avoid race conditions where one thread opens a file descriptor "
18480 #~ "at the same time as another thread does a B<fork>(2)  plus B<execve>(2)."
18481 #~ msgstr ""
18482 #~ "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 こ"
18483 #~ "のフラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするた"
18484 #~ "めの B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある"
18485 #~ "種のマルチスレッドのプログラムはこのフラグの使用は 不可欠である。なぜな"
18486 #~ "ら、個別に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼"
18487 #~ "び出したとしても、あるスレッドがファイルディスクリプタを オープンするのと"
18488 #~ "同時に別のスレッドが B<fork>(2)  と B<execve>(2)  を実行するという競合条件"
18489 #~ "を避けるのには十分ではないからである。"
18490
18491 #~ msgid "SYMBOLIC LINK HANDLING"
18492 #~ msgstr "シンボリックリンクの取り扱い"
18493
18494 #~ msgid ""
18495 #~ "Various system calls do not follow links, and operate on the symbolic "
18496 #~ "link itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
18497 #~ "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), "
18498 #~ "B<rename>(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls "
18499 #~ "optionally follow symbolic links.  They are: B<faccessat>(2), "
18500 #~ "B<fchownat>(2), B<fstatat>(2), B<linkat>(2), B<open>(2), B<openat>(2), "
18501 #~ "and B<utimensat>(2); see their manual pages for details.  Because "
18502 #~ "B<remove>(3)  is an alias for B<unlink>(2), that library function also "
18503 #~ "does not follow symbolic links.  When B<rmdir>(2)  is applied to a "
18504 #~ "symbolic link, it fails with the error B<ENOTDIR>.  The B<link>(2)  "
18505 #~ "warrants special discussion.  POSIX.1-2001 specifies that B<link>(2)  "
18506 #~ "should dereference I<oldpath> if it is a symbolic link.  However, Linux "
18507 #~ "does not do this.  (By default Solaris is the same, but the POSIX.1-2001 "
18508 #~ "specified behavior can be obtained with suitable compiler options.)  The "
18509 #~ "upcoming POSIX.1 revision changes the specification to allow either "
18510 #~ "behavior in an implementation."
18511 #~ msgstr ""
18512 #~ "いくつかのシステムコールは、 シンボリックリンクを辿らず、 シンボリックリン"
18513 #~ "ク自身に対して操作を行う。 B<lchown>(2), B<lgetxattr>(2), "
18514 #~ "B<llistxattr>(2), B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), "
18515 #~ "B<readlink>(2), B<rename>(2), B<rmdir>(2), B<unlink>(2) が該当する。 他の"
18516 #~ "いくつかのシステムコールは、 シンボリックリンクを辿る場合と辿らない場合が"
18517 #~ "ある。 該当するのは B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), "
18518 #~ "B<linkat>(2), B<open>(2), B<openat>(2), B<utimensat>(2) である。 詳細はそ"
18519 #~ "れぞれのマニュアルページを参照。 ライブラリ関数 B<remove>(3) は "
18520 #~ "B<unlink>(2) の別名なので、 この関数もシンボリックリンクを辿らない。 "
18521 #~ "B<rmdir>(2) をシンボリックリンクに対して行った場合、 エラー B<ENOTDIR> で"
18522 #~ "失敗する。 B<link>(2) は特別に議論が必要である。 POSIX.1-2001 は、 "
18523 #~ "B<link>(2) は I<oldpath> がシンボリックリンクの場合にはこのリンクを展開す"
18524 #~ "べきだと規定している。 しかし、 Linux はこれを行っていない。 (デフォルトで"
18525 #~ "は Solaris も同じだが、 適切なコンパイルオプションを指定することで "
18526 #~ "POSIX.1-2001 で規定された動作にすることもできる。) POSIX.1-2001 の次の版で"
18527 #~ "は、仕様が変更され、 どちらの動作の実装も認められるようになる。"
18528
18529 #~ msgid ""
18530 #~ "If the name was the last link to a file but any processes still have the "
18531 #~ "file open the file will remain in existence until the last file "
18532 #~ "descriptor referring to it is closed."
18533 #~ msgstr ""
18534 #~ "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが その"
18535 #~ "ファイルをまだオープンしている場合は、 そのファイルを参照している最後の"
18536 #~ "ファイルディスクリプタ (file descriptor)  がクローズ (close) されるまで"
18537 #~ "ファイルは存在し続ける。"
18538
18539 #~ msgid "If the name referred to a symbolic link the link is removed."
18540 #~ msgstr ""
18541 #~ "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンク"
18542 #~ "は削除される。"
18543
18544 #~ msgid ""
18545 #~ "If the name referred to a socket, fifo or device the name for it is "
18546 #~ "removed but processes which have the object open may continue to use it."
18547 #~ msgstr ""
18548 #~ "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば "
18549 #~ "名前は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い"
18550 #~ "続けることができる。"
18551
18552 #~ msgid ""
18553 #~ "The file is opened for synchronous I/O.  Any B<write>(2)s on the "
18554 #~ "resulting file descriptor will block the calling process until the data "
18555 #~ "has been physically written to the underlying hardware.  I<But see NOTES "
18556 #~ "below>."
18557 #~ msgstr ""
18558 #~ "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返"
18559 #~ "したファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプ"
18560 #~ "ロセスをブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 "
18561 #~ "I<以下の「注意」の章も参照。>"
18562
18563 #~ msgid ""
18564 #~ "Some of these optional flags can be altered using B<fcntl>(2)  after the "
18565 #~ "file has been opened."
18566 #~ msgstr ""
18567 #~ "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を"
18568 #~ "使用して変更することができる。"
18569
18570 #~ msgid ""
18571 #~ "Too many symbolic links were encountered in resolving I<pathname>, or "
18572 #~ "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
18573 #~ msgstr ""
18574 #~ "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
18575 #~ "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
18576
18577 #~ msgid ""
18578 #~ "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified "
18579 #~ "in POSIX.1-2008."
18580 #~ msgstr ""
18581 #~ "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 "
18582 #~ "で規定されている。"
18583
18584 #~ msgid ""
18585 #~ "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
18586 #~ "(before including I<any> header files)  to get its definition."
18587 #~ msgstr ""
18588 #~ "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
18589 #~ "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定"
18590 #~ "義しなければならない。"
18591
18592 #~ msgid ""
18593 #~ "POSIX provides for three different variants of synchronized I/O, "
18594 #~ "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  "
18595 #~ "Currently (2.6.31), Linux implements only B<O_SYNC>, but glibc maps "
18596 #~ "B<O_DSYNC> and B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most "
18597 #~ "Linux filesystems don't actually implement the POSIX B<O_SYNC> semantics, "
18598 #~ "which require all metadata updates of a write to be on disk on returning "
18599 #~ "to user space, but only the B<O_DSYNC> semantics, which require only "
18600 #~ "actual file data and metadata necessary to retrieve it to be on disk by "
18601 #~ "the time the system call returns."
18602 #~ msgstr ""
18603 #~ "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
18604 #~ "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル "
18605 #~ "2.6.31)、 Linux では B<O_SYNC> だけが実装されているが、 glibc は "
18606 #~ "B<O_DSYNC> と B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとん"
18607 #~ "どの Linux のファイルシステムは、実際には POSIX の B<O_SYNC> の動作ではな"
18608 #~ "く B<O_DSYNC> の動作だけを実装している。 POSIX の B<O_SYNC> では、 "
18609 #~ "B<open>()  がユーザ空間に返る際に、書き込みに関する全てのメタデータの 更新"
18610 #~ "がディスクに書き込まれている必要がある。 一方、 B<O_DSYNC> では、 "
18611 #~ "B<open>()  が返るまでに、実際のファイルのデータとそのデータを取得するため"
18612 #~ "に 必要なメタデータだけがディスクに書き込まれていればよい。"