OSDN Git Service

(split) LDP: Translate open.2
[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: 2014-04-27 09:26+0900\n"
10 "PO-Revision-Date: 2014-04-28 00:05+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:67
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 B<sprintf>"
187 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
188 "hold the output including the terminating null byte (\\(aq\\e0\\(aq), and "
189 "return a pointer to it via the first argument.  This pointer should be "
190 "passed to B<free>(3)  to release the allocated storage when it is no longer "
191 "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:92 build/C/man3/getline.3:112 build/C/man3/gets.3:50
208 #: build/C/man3/getw.3:73 build/C/man2/link.2:176 build/C/man2/llseek.2:62
209 #: build/C/man2/lseek.2:179 build/C/man2/open.2:773
210 #: build/C/man2/open_by_handle_at.2:245 build/C/man2/pipe.2:129
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:166 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:104 build/C/man3/getline.3:139 build/C/man3/gets.3:58
245 #: build/C/man3/getw.3:80 build/C/man2/link.2:316 build/C/man2/llseek.2:81
246 #: build/C/man2/lseek.2:217 build/C/man2/open.2:1011
247 #: build/C/man2/open_by_handle_at.2:352 build/C/man3/perror.3:111
248 #: build/C/man2/pipe.2:155 build/C/man3/popen.3:172 build/C/man3/printf.3:807
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:330
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:222 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:143 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:110 build/C/man3/getline.3:173 build/C/man3/gets.3:90
282 #: build/C/man3/getw.3:87 build/C/man2/link.2:369 build/C/man2/llseek.2:87
283 #: build/C/man2/lseek.2:262 build/C/man3/lseek64.3:164
284 #: build/C/man2/open.2:1444 build/C/man2/open_by_handle_at.2:715
285 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:228 build/C/man3/popen.3:201
286 #: build/C/man3/printf.3:1085 build/C/man3/puts.3:112 build/C/man2/read.2:187
287 #: build/C/man2/readlink.2:313 build/C/man2/readv.2:284
288 #: build/C/man3/remove.3:86 build/C/man2/rename.2:347 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:241 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:284
294 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:251
295 #: build/C/man2/write.2:211
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:145 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:112 build/C/man3/getline.3:179
315 #: build/C/man3/gets.3:108 build/C/man3/getw.3:93 build/C/man2/link.2:378
316 #: build/C/man2/llseek.2:90 build/C/man2/lseek.2:269
317 #: build/C/man3/lseek64.3:167 build/C/man2/open.2:1466
318 #: build/C/man2/open_by_handle_at.2:731 build/C/man3/perror.3:144
319 #: build/C/man2/pipe.2:235 build/C/man3/popen.3:211 build/C/man3/printf.3:1094
320 #: build/C/man3/puts.3:124 build/C/man2/read.2:200 build/C/man2/readlink.2:320
321 #: build/C/man2/readv.2:288 build/C/man3/remove.3:97 build/C/man2/rename.2:355
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:252
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:296 build/C/man3/unlocked_stdio.3:139
328 #: build/C/man3/wprintf.3:258 build/C/man2/write.2:223
329 #, no-wrap
330 msgid "COLOPHON"
331 msgstr "この文書について"
332
333 #. type: Plain text
334 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:86
335 #: build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115
336 #: build/C/man3/fcloseall.3:75 build/C/man3/ferror.3:138
337 #: build/C/man3/fflush.3:128 build/C/man3/fgetc.3:157 build/C/man3/fgetwc.3:99
338 #: build/C/man3/flockfile.3:152 build/C/man3/fmemopen.3:351
339 #: build/C/man3/fmtmsg.3:319 build/C/man3/fopen.3:361
340 #: build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92
341 #: build/C/man3/fputwc.3:96 build/C/man3/fread.3:118 build/C/man3/fseek.3:181
342 #: build/C/man3/fseeko.3:119 build/C/man3/getline.3:186
343 #: build/C/man3/gets.3:115 build/C/man3/getw.3:100 build/C/man2/link.2:385
344 #: build/C/man2/llseek.2:97 build/C/man2/lseek.2:276
345 #: build/C/man3/lseek64.3:174 build/C/man2/open.2:1473
346 #: build/C/man2/open_by_handle_at.2:738 build/C/man3/perror.3:151
347 #: build/C/man2/pipe.2:242 build/C/man3/popen.3:218 build/C/man3/printf.3:1101
348 #: build/C/man3/puts.3:131 build/C/man2/read.2:207 build/C/man2/readlink.2:327
349 #: build/C/man2/readv.2:295 build/C/man3/remove.3:104
350 #: build/C/man2/rename.2:362 build/C/man2/rmdir.2:148 build/C/man3/scanf.3:752
351 #: build/C/man3/setbuf.3:224 build/C/man3/stdin.3:167 build/C/man3/stdio.3:264
352 #: build/C/man3/stdio_ext.3:161 build/C/man2/symlink.2:259
353 #: build/C/man7/symlink.7:537 build/C/man3/tempnam.3:180
354 #: build/C/man3/tmpfile.3:110 build/C/man3/tmpnam.3:184
355 #: build/C/man2/unlink.2:303 build/C/man3/unlocked_stdio.3:146
356 #: build/C/man3/wprintf.3:265 build/C/man2/write.2:230
357 msgid ""
358 "This page is part of release 3.65 of the Linux I<man-pages> project.  A "
359 "description of the project, and information about reporting bugs, can be "
360 "found at \\%http://www.kernel.org/doc/man-pages/."
361 msgstr ""
362 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.65 の一部\n"
363 "である。プロジェクトの説明とバグ報告に関する情報は\n"
364 "http://www.kernel.org/doc/man-pages/ に書かれている。"
365
366 #. type: TH
367 #: build/C/man3/ctermid.3:26
368 #, no-wrap
369 msgid "CTERMID"
370 msgstr "CTERMID"
371
372 #. type: TH
373 #: build/C/man3/ctermid.3:26
374 #, no-wrap
375 msgid "2013-07-04"
376 msgstr "2013-07-04"
377
378 #. type: Plain text
379 #: build/C/man3/ctermid.3:29
380 msgid "ctermid - get controlling terminal name"
381 msgstr "ctermid - 制御端末名の取得"
382
383 #. type: Plain text
384 #: build/C/man3/ctermid.3:34 build/C/man3/fgetc.3:33 build/C/man3/fgetwc.3:24
385 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
386 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
387 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:35
388 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
389 #: build/C/man2/rename.2:39 build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54
390 #: build/C/man3/stdin.3:19 build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
391 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
392 #, no-wrap
393 msgid "B<#include E<lt>stdio.hE<gt>>\n"
394 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
395
396 #. type: Plain text
397 #: build/C/man3/ctermid.3:36
398 #, no-wrap
399 msgid "B<char *ctermid(char *>I<s>B<);>\n"
400 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
401
402 #. type: Plain text
403 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
404 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
405 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61 build/C/man3/fseeko.3:41
406 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man2/link.2:51
407 #: build/C/man2/open.2:73 build/C/man3/perror.3:50 build/C/man3/popen.3:55
408 #: build/C/man3/printf.3:63 build/C/man2/readlink.2:64 build/C/man2/readv.2:53
409 #: build/C/man2/rename.2:52 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
410 #: build/C/man2/symlink.2:52 build/C/man3/tempnam.3:38
411 #: build/C/man2/unlink.2:51 build/C/man3/unlocked_stdio.3:68
412 #: build/C/man3/wprintf.3:39
413 msgid ""
414 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
415 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
416
417 #.  From <unistd.h>: _XOPEN_SOURCE
418 #. type: Plain text
419 #: build/C/man3/ctermid.3:46
420 msgid ""
421 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
422 msgstr ""
423 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
424
425 #. type: Plain text
426 #: build/C/man3/ctermid.3:59
427 msgid ""
428 "B<ctermid>()  returns a string which is the pathname for the current "
429 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
430 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
431 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
432 "the returned pathname."
433 msgstr ""
434 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
435 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
436 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
437 "ス名の最大文字数である。"
438
439 #. type: Plain text
440 #: build/C/man3/ctermid.3:61
441 msgid "The pointer to the pathname."
442 msgstr "パス名へのポインタ。"
443
444 #. type: SH
445 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55
446 #: build/C/man3/ferror.3:106 build/C/man3/fflush.3:93
447 #: build/C/man3/flockfile.3:127 build/C/man3/fmtmsg.3:225
448 #: build/C/man3/lseek64.3:159 build/C/man3/remove.3:70
449 #: build/C/man3/setbuf.3:164 build/C/man3/stdio_ext.3:132
450 #: build/C/man3/tmpnam.3:86
451 #, no-wrap
452 msgid "ATTRIBUTES"
453 msgstr "属性"
454
455 #. type: SS
456 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
457 #: build/C/man3/ferror.3:107 build/C/man3/fflush.3:94
458 #: build/C/man3/flockfile.3:128 build/C/man3/fmtmsg.3:226
459 #: build/C/man3/lseek64.3:160 build/C/man3/remove.3:71
460 #: build/C/man3/setbuf.3:165 build/C/man3/stdio_ext.3:133
461 #: build/C/man3/tmpnam.3:87
462 #, no-wrap
463 msgid "Multithreading (see pthreads(7))"
464 msgstr "マルチスレッディング (pthreads(7) 参照)"
465
466 #. type: Plain text
467 #: build/C/man3/ctermid.3:67
468 msgid ""
469 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
470 "safe if called with a NULL parameter."
471 msgstr ""
472 "B<ctermid>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
473 "れた場合はスレッドセーフではない。"
474
475 #. type: Plain text
476 #: build/C/man3/ctermid.3:69
477 msgid "Svr4, POSIX.1-2001."
478 msgstr "SVr4, POSIX.1-2001."
479
480 #. type: SH
481 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213
482 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:72 build/C/man3/getw.3:83
483 #: build/C/man2/link.2:363 build/C/man2/open.2:1425 build/C/man3/popen.3:178
484 #: build/C/man3/printf.3:930 build/C/man3/puts.3:105 build/C/man2/readv.2:258
485 #: build/C/man3/remove.3:83 build/C/man2/rename.2:336 build/C/man2/rmdir.2:129
486 #: build/C/man3/scanf.3:669 build/C/man3/setbuf.3:179
487 #: build/C/man3/tempnam.3:165 build/C/man3/tmpnam.3:165
488 #: build/C/man2/unlink.2:281
489 #, no-wrap
490 msgid "BUGS"
491 msgstr "バグ"
492
493 #. type: Plain text
494 #: build/C/man3/ctermid.3:73
495 msgid ""
496 "The path returned may not uniquely identify the controlling terminal; it "
497 "may, for example, be I</dev/tty>."
498 msgstr ""
499 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
500 "ように。"
501
502 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
503 #.  if ctermid() was given an argument; fixed in 2.4.
504 #. type: Plain text
505 #: build/C/man3/ctermid.3:77
506 msgid "It is not assured that the program can open the terminal."
507 msgstr "プログラムが端末をオープンできることは保証されていない。"
508
509 #. type: Plain text
510 #: build/C/man3/ctermid.3:79
511 msgid "B<ttyname>(3)"
512 msgstr "B<ttyname>(3)"
513
514 #. type: TH
515 #: build/C/man3/dprintf.3:26
516 #, no-wrap
517 msgid "DPRINTF"
518 msgstr "DPRINTF"
519
520 #. type: TH
521 #: build/C/man3/dprintf.3:26
522 #, no-wrap
523 msgid "2010-09-15"
524 msgstr "2010-09-15"
525
526 #. type: Plain text
527 #: build/C/man3/dprintf.3:29
528 msgid "dprintf, vdprintf - print to a file descriptor"
529 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
530
531 #. type: Plain text
532 #: build/C/man3/dprintf.3:33
533 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
534 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
535
536 #. type: Plain text
537 #: build/C/man3/dprintf.3:35
538 msgid ""
539 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
540 msgstr ""
541 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
542
543 #. type: Plain text
544 #: build/C/man3/dprintf.3:43
545 msgid "B<dprintf>(), B<vdprintf>():"
546 msgstr "B<dprintf>(), B<vdprintf>():"
547
548 #. type: TP
549 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
550 #: build/C/man3/getline.3:49 build/C/man2/link.2:57 build/C/man2/open.2:79
551 #: build/C/man2/readlink.2:77 build/C/man2/rename.2:58
552 #: build/C/man2/symlink.2:65 build/C/man2/unlink.2:57
553 #, no-wrap
554 msgid "Since glibc 2.10:"
555 msgstr "glibc 2.10 以降:"
556
557 #. type: Plain text
558 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40 build/C/man2/link.2:60
559 #: build/C/man2/open.2:82 build/C/man2/readlink.2:80 build/C/man2/rename.2:61
560 #: build/C/man2/symlink.2:68 build/C/man2/unlink.2:60
561 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
562 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
563
564 #. type: TP
565 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
566 #: build/C/man3/getline.3:52 build/C/man2/link.2:60 build/C/man2/open.2:82
567 #: build/C/man2/readlink.2:80 build/C/man2/rename.2:61
568 #: build/C/man2/symlink.2:68 build/C/man2/unlink.2:60
569 #, no-wrap
570 msgid "Before glibc 2.10:"
571 msgstr "glibc 2.10 より前:"
572
573 #. type: Plain text
574 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
575 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
576 msgid "_GNU_SOURCE"
577 msgstr "_GNU_SOURCE"
578
579 #. type: Plain text
580 #: build/C/man3/dprintf.3:69
581 msgid ""
582 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
583 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
584 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
585 msgstr ""
586 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
587 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
588 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
589 "行う。"
590
591 #.  .SH NOTES
592 #.  These functions are GNU extensions, not in C or POSIX.
593 #.  Clearly, the names were badly chosen.
594 #.  Many systems (like MacOS) have incompatible functions called
595 #.  .BR dprintf (),
596 #.  usually some debugging version of
597 #.  .BR printf (3),
598 #.  perhaps with a prototype like
599 #.  .BI "void dprintf(int level, const char *" format ", ...);"
600 #.  where the first argument is a debugging level (and output is to
601 #.  .IR stderr ).
602 #.  Moreover,
603 #.  .BR dprintf ()
604 #.  (or
605 #.  .BR DPRINTF )
606 #.  is also a popular macro name for a debugging printf.
607 #.  So, probably, it is better to avoid this function in programs
608 #.  intended to be portable.
609 #.  A better name would have been
610 #.  .BR fdprintf ().
611 #. type: Plain text
612 #: build/C/man3/dprintf.3:95
613 msgid ""
614 "These functions are GNU extensions that are nowadays specified in "
615 "POSIX.1-2008."
616 msgstr ""
617 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
618 "る。"
619
620 #. type: Plain text
621 #: build/C/man3/dprintf.3:97
622 msgid "B<printf>(3)"
623 msgstr "B<printf>(3)"
624
625 #. type: TH
626 #: build/C/man3/fclose.3:44
627 #, no-wrap
628 msgid "FCLOSE"
629 msgstr "FCLOSE"
630
631 #. type: TH
632 #: build/C/man3/fclose.3:44
633 #, no-wrap
634 msgid "2009-02-23"
635 msgstr "2009-02-23"
636
637 #. type: Plain text
638 #: build/C/man3/fclose.3:47
639 msgid "fclose - close a stream"
640 msgstr "fclose - ストリームを閉じる"
641
642 #. type: Plain text
643 #: build/C/man3/fclose.3:51
644 msgid "B<int fclose(FILE *>I<fp>B<);>"
645 msgstr "B<int fclose(FILE *>I<fp>B<);>"
646
647 #. type: Plain text
648 #: build/C/man3/fclose.3:59
649 msgid ""
650 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
651 "any buffered output data using B<fflush>(3))  and closes the underlying file "
652 "descriptor."
653 msgstr ""
654 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
655 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
656 "対応するファイルディスクリプタをクローズする。"
657
658 #. type: Plain text
659 #: build/C/man3/fclose.3:70
660 msgid ""
661 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
662 "I<errno> is set to indicate the error.  In either case any further access "
663 "(including another call to B<fclose>())  to the stream results in undefined "
664 "behavior."
665 msgstr ""
666 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
667 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
668 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
669 "は 未定義の動作を生じさせる。"
670
671 #. type: SH
672 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
673 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
674 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
675 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:101
676 #: build/C/man3/getline.3:127 build/C/man2/link.2:181 build/C/man2/llseek.2:69
677 #: build/C/man2/lseek.2:187 build/C/man2/open.2:782
678 #: build/C/man2/open_by_handle_at.2:256 build/C/man2/pipe.2:134
679 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:159
680 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:171
681 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:145
682 #: build/C/man3/tempnam.3:101 build/C/man3/tmpfile.3:56
683 #: build/C/man3/tmpnam.3:84 build/C/man2/unlink.2:158 build/C/man2/write.2:107
684 #, no-wrap
685 msgid "ERRORS"
686 msgstr "エラー"
687
688 #. type: TP
689 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
690 #: build/C/man3/fseek.3:137 build/C/man2/link.2:265 build/C/man2/llseek.2:70
691 #: build/C/man2/lseek.2:188 build/C/man2/open.2:997
692 #: build/C/man2/open_by_handle_at.2:317 build/C/man2/read.2:114
693 #: build/C/man2/readlink.2:202 build/C/man2/rename.2:310
694 #: build/C/man3/scanf.3:553 build/C/man2/symlink.2:208
695 #: build/C/man2/unlink.2:248 build/C/man2/write.2:126
696 #, no-wrap
697 msgid "B<EBADF>"
698 msgstr "B<EBADF>"
699
700 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
701 #.   low-level file operations on the same stream. If you do get this error,
702 #.   you must have closed the stream's low-level file descriptor using
703 #.   something like close(fileno(fp)).
704 #. type: Plain text
705 #: build/C/man3/fclose.3:80
706 msgid "The file descriptor underlying I<fp> is not valid."
707 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
708
709 #. type: Plain text
710 #: build/C/man3/fclose.3:90
711 msgid ""
712 "The B<fclose>()  function may also fail and set I<errno> for any of the "
713 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
714 msgstr ""
715 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
716 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
717 "された値に設定される。"
718
719 #. type: Plain text
720 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:171 build/C/man3/puts.3:105
721 msgid "C89, C99."
722 msgstr "C89, C99."
723
724 #. type: SH
725 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
726 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
727 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
728 #: build/C/man3/fseeko.3:106 build/C/man2/link.2:325 build/C/man2/llseek.2:84
729 #: build/C/man2/lseek.2:227 build/C/man2/open.2:1055
730 #: build/C/man2/open_by_handle_at.2:354 build/C/man3/perror.3:124
731 #: build/C/man3/printf.3:868 build/C/man2/read.2:175
732 #: build/C/man2/readlink.2:225 build/C/man2/readv.2:226
733 #: build/C/man3/remove.3:77 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
734 #: build/C/man2/symlink.2:232 build/C/man3/tempnam.3:110
735 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:101
736 #: build/C/man3/wprintf.3:213 build/C/man2/write.2:194
737 #, no-wrap
738 msgid "NOTES"
739 msgstr "注意"
740
741 #. type: Plain text
742 #: build/C/man3/fclose.3:102
743 msgid ""
744 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
745 "library.  To ensure that the data is physically stored on disk the kernel "
746 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
747 msgstr ""
748 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
749 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
750 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
751 "ればならない。"
752
753 #. type: Plain text
754 #: build/C/man3/fclose.3:108
755 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
756 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
757
758 #. type: TH
759 #: build/C/man3/fcloseall.3:25
760 #, no-wrap
761 msgid "FCLOSEALL"
762 msgstr "FCLOSEALL"
763
764 #. type: Plain text
765 #: build/C/man3/fcloseall.3:28
766 msgid "fcloseall - close all open streams"
767 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
768
769 #. type: Plain text
770 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
771 #, no-wrap
772 msgid ""
773 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
774 "B<#include E<lt>stdio.hE<gt>>\n"
775 msgstr ""
776 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
777 "B<#include E<lt>stdio.hE<gt>>\n"
778
779 #. type: Plain text
780 #: build/C/man3/fcloseall.3:34
781 #, no-wrap
782 msgid "B<int fcloseall(void);>\n"
783 msgstr "B<int fcloseall(void);>\n"
784
785 #. type: Plain text
786 #: build/C/man3/fcloseall.3:43
787 msgid ""
788 "The B<fcloseall>()  function closes all of the calling process's open "
789 "streams.  Buffered output for each stream is written before it is closed (as "
790 "for B<fflush>(3)); buffered input is discarded."
791 msgstr ""
792 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
793 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
794 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
795 "れる。"
796
797 #. type: Plain text
798 #: build/C/man3/fcloseall.3:50
799 msgid ""
800 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
801 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
802
803 #. type: Plain text
804 #: build/C/man3/fcloseall.3:55
805 msgid ""
806 "This function returns 0 if all files were successfully closed; on error, "
807 "B<EOF> is returned."
808 msgstr ""
809 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
810 "B<EOF> を返す。"
811
812 #. type: Plain text
813 #: build/C/man3/fcloseall.3:60
814 msgid ""
815 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
816 "safe."
817 msgstr ""
818 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
819 "はない。"
820
821 #. type: Plain text
822 #: build/C/man3/fcloseall.3:62
823 msgid "This function is a GNU extension."
824 msgstr "この関数は GNU 拡張である。"
825
826 #. type: Plain text
827 #: build/C/man3/fcloseall.3:68
828 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
829 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
830
831 #. type: TH
832 #: build/C/man3/ferror.3:44
833 #, no-wrap
834 msgid "FERROR"
835 msgstr "FERROR"
836
837 #. type: TH
838 #: build/C/man3/ferror.3:44
839 #, no-wrap
840 msgid "2014-01-15"
841 msgstr "2014-01-15"
842
843 #. type: Plain text
844 #: build/C/man3/ferror.3:47
845 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
846 msgstr ""
847 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
848
849 #. type: Plain text
850 #: build/C/man3/ferror.3:51
851 msgid "B<void clearerr(FILE *>I<stream>B<);>"
852 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
853
854 #. type: Plain text
855 #: build/C/man3/ferror.3:53
856 msgid "B<int feof(FILE *>I<stream>B<);>"
857 msgstr "B<int feof(FILE *>I<stream>B<);>"
858
859 #. type: Plain text
860 #: build/C/man3/ferror.3:55
861 msgid "B<int ferror(FILE *>I<stream>B<);>"
862 msgstr "B<int ferror(FILE *>I<stream>B<);>"
863
864 #. type: Plain text
865 #: build/C/man3/ferror.3:57
866 msgid "B<int fileno(FILE *>I<stream>B<);>"
867 msgstr "B<int fileno(FILE *>I<stream>B<);>"
868
869 #. type: Plain text
870 #: build/C/man3/ferror.3:65
871 msgid ""
872 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
873 msgstr ""
874 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
875
876 #. type: Plain text
877 #: build/C/man3/ferror.3:70
878 msgid ""
879 "The function B<clearerr>()  clears the end-of-file and error indicators for "
880 "the stream pointed to by I<stream>."
881 msgstr ""
882 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
883 "子とエラー指示子をクリアする。"
884
885 #. type: Plain text
886 #: build/C/man3/ferror.3:78
887 msgid ""
888 "The function B<feof>()  tests the end-of-file indicator for the stream "
889 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
890 "indicator can be cleared only by the function B<clearerr>()."
891 msgstr ""
892 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
893 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
894 "よってのみクリアすることができる。"
895
896 #. type: Plain text
897 #: build/C/man3/ferror.3:87
898 msgid ""
899 "The function B<ferror>()  tests the error indicator for the stream pointed "
900 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
901 "reset only by the B<clearerr>()  function."
902 msgstr ""
903 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
904 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
905 "()  によってのみリセットすることができる。"
906
907 #. type: Plain text
908 #: build/C/man3/ferror.3:93
909 msgid ""
910 "The function B<fileno>()  examines the argument I<stream> and returns its "
911 "integer descriptor."
912 msgstr ""
913 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
914
915 #. type: Plain text
916 #: build/C/man3/ferror.3:96 build/C/man3/fgetc.3:99 build/C/man3/fgetwc.3:55
917 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/puts.3:84
918 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
919 msgstr ""
920 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
921
922 #. type: Plain text
923 #: build/C/man3/ferror.3:106
924 msgid ""
925 "These functions should not fail and do not set the external variable "
926 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
927 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
928 msgstr ""
929 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
930 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
931 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
932
933 #. type: Plain text
934 #: build/C/man3/ferror.3:115
935 msgid ""
936 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
937 "thread-safe."
938 msgstr ""
939 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
940 "る。"
941
942 #. type: Plain text
943 #: build/C/man3/ferror.3:122
944 msgid ""
945 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89, "
946 "C99, POSIX.1-2001, and POSIX.1-2008."
947 msgstr ""
948 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89, C99, POSIX.1-2001, "
949 "POSIX.1-2008 に準拠している。"
950
951 #. type: Plain text
952 #: build/C/man3/ferror.3:126
953 msgid "The function B<fileno>()  conforms to POSIX.1-2001 and POSIX.1-2008."
954 msgstr "関数 B<fileno>() は POSIX.1-2001 と POSIX.1-2008 に準拠している。"
955
956 #. type: Plain text
957 #: build/C/man3/ferror.3:131
958 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
959 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
960
961 #. type: TH
962 #: build/C/man3/fflush.3:45
963 #, no-wrap
964 msgid "FFLUSH"
965 msgstr "FFLUSH"
966
967 #. type: TH
968 #: build/C/man3/fflush.3:45
969 #, no-wrap
970 msgid "2013-07-15"
971 msgstr "2013-07-15"
972
973 #. type: Plain text
974 #: build/C/man3/fflush.3:48
975 msgid "fflush - flush a stream"
976 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
977
978 #. type: Plain text
979 #: build/C/man3/fflush.3:52
980 msgid "B<int fflush(FILE *>I<stream>B<);>"
981 msgstr "B<int fflush(FILE *>I<stream>B<);>"
982
983 #. type: Plain text
984 #: build/C/man3/fflush.3:63
985 msgid ""
986 "For output streams, B<fflush>()  forces a write of all user-space buffered "
987 "data for the given output or update I<stream> via the stream's underlying "
988 "write function.  For input streams, B<fflush>()  discards any buffered data "
989 "that has been fetched from the underlying file, but has not been consumed by "
990 "the application.  The open status of the stream is unaffected."
991 msgstr ""
992 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
993 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
994 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
995 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
996 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
997 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
998 "い。"
999
1000 #. type: Plain text
1001 #: build/C/man3/fflush.3:71
1002 msgid ""
1003 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
1004 "streams."
1005 msgstr ""
1006 "I<stream> 引数が NULL ならば、 B<fflush>()  は開いているI<すべての>出力スト"
1007 "リームをフラッシュする。"
1008
1009 #. type: Plain text
1010 #: build/C/man3/fflush.3:74
1011 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
1012 msgstr ""
1013 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
1014 "と。"
1015
1016 #. type: Plain text
1017 #: build/C/man3/fflush.3:81
1018 msgid ""
1019 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
1020 "I<errno> is set to indicate the error."
1021 msgstr ""
1022 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
1023 "ラーに対応した値に設定される。"
1024
1025 #. type: Plain text
1026 #: build/C/man3/fflush.3:86
1027 msgid "I<Stream> is not an open stream, or is not open for writing."
1028 msgstr ""
1029 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
1030 "ない。"
1031
1032 #. type: Plain text
1033 #: build/C/man3/fflush.3:93
1034 msgid ""
1035 "The function B<fflush>()  may also fail and set I<errno> for any of the "
1036 "errors specified for B<write>(2)."
1037 msgstr ""
1038 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1039 "ある。 この場合 I<errno> もその値に設定される。"
1040
1041 #. type: Plain text
1042 #: build/C/man3/fflush.3:98
1043 msgid "The B<fflush>()  function is thread-safe."
1044 msgstr "関数 B<fflush>() はスレッドセーフである。"
1045
1046 #. type: Plain text
1047 #: build/C/man3/fflush.3:100
1048 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1049 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1050
1051 #.  Verified on: Solaris 8.
1052 #. type: Plain text
1053 #: build/C/man3/fflush.3:104
1054 msgid ""
1055 "The standards do not specify the behavior for input streams.  Most other "
1056 "implementations behave the same as Linux."
1057 msgstr ""
1058 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1059 "は Linux と同じ動作をする。"
1060
1061 #. type: Plain text
1062 #: build/C/man3/fflush.3:113
1063 msgid ""
1064 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1065 "library.  To ensure that the data is physically stored on disk the kernel "
1066 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1067 msgstr ""
1068 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1069 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1070 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1071 "B<fsync>(2)  を用いる。"
1072
1073 #. type: Plain text
1074 #: build/C/man3/fflush.3:121
1075 msgid ""
1076 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1077 "(3), B<unlocked_stdio>(3)"
1078 msgstr ""
1079 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1080 "(3), B<unlocked_stdio>(3)"
1081
1082 #. type: TH
1083 #: build/C/man3/fgetc.3:27
1084 #, no-wrap
1085 msgid "FGETC"
1086 msgstr "FGETC"
1087
1088 #. type: TH
1089 #: build/C/man3/fgetc.3:27
1090 #, no-wrap
1091 msgid "2013-12-31"
1092 msgstr "2013-12-31"
1093
1094 #. type: Plain text
1095 #: build/C/man3/fgetc.3:30
1096 msgid "fgetc, fgets, getc, getchar, ungetc - input of characters and strings"
1097 msgstr "fgetc, fgets, getc, getchar, ungetc - 文字と文字列の入力"
1098
1099 #. type: Plain text
1100 #: build/C/man3/fgetc.3:35
1101 #, no-wrap
1102 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
1103 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
1104
1105 #. type: Plain text
1106 #: build/C/man3/fgetc.3:37
1107 #, no-wrap
1108 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
1109 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
1110
1111 #. type: Plain text
1112 #: build/C/man3/fgetc.3:39
1113 #, no-wrap
1114 msgid "B<int getc(FILE *>I<stream>B<);>\n"
1115 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
1116
1117 #. type: Plain text
1118 #: build/C/man3/fgetc.3:41
1119 #, no-wrap
1120 msgid "B<int getchar(void);>\n"
1121 msgstr "B<int getchar(void);>\n"
1122
1123 #. type: Plain text
1124 #: build/C/man3/fgetc.3:43
1125 #, no-wrap
1126 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
1127 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
1128
1129 #. type: Plain text
1130 #: build/C/man3/fgetc.3:55
1131 msgid ""
1132 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
1133 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
1134 msgstr ""
1135 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
1136 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
1137 "す。"
1138
1139 #. type: Plain text
1140 #: build/C/man3/fgetc.3:62
1141 msgid ""
1142 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
1143 "a macro which evaluates I<stream> more than once."
1144 msgstr ""
1145 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
1146 "実装されているかもしれない。"
1147
1148 #. type: Plain text
1149 #: build/C/man3/fgetc.3:66
1150 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
1151 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
1152
1153 #. type: Plain text
1154 #: build/C/man3/fgetc.3:80
1155 msgid ""
1156 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
1157 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
1158 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
1159 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
1160 "in the buffer."
1161 msgstr ""
1162 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
1163 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
1164 "する。 読み込まれた改行文字はバッファに格納される。 終端のヌルバイト (\\(aq"
1165 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
1166
1167 #. type: Plain text
1168 #: build/C/man3/fgetc.3:91
1169 msgid ""
1170 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
1171 "it is available for subsequent read operations.  Pushed-back characters will "
1172 "be returned in reverse order; only one pushback is guaranteed."
1173 msgstr ""
1174 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
1175 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
1176 "しとして保証されているのは、一文字だけである。"
1177
1178 #. type: Plain text
1179 #: build/C/man3/fgetc.3:96
1180 msgid ""
1181 "Calls to the functions described here can be mixed with each other and with "
1182 "calls to other input functions from the I<stdio> library for the same input "
1183 "stream."
1184 msgstr ""
1185 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
1186 "互いに混ぜて使うことができる。"
1187
1188 #. type: Plain text
1189 #: build/C/man3/fgetc.3:111
1190 msgid ""
1191 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
1192 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
1193 msgstr ""
1194 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
1195 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
1196 "す。"
1197
1198 #. type: Plain text
1199 #: build/C/man3/fgetc.3:117
1200 msgid ""
1201 "B<fgets>()  returns I<s> on success, and NULL on error or when end of file "
1202 "occurs while no characters have been read."
1203 msgstr ""
1204 "B<fgets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのに"
1205 "ファイルの終わりになった 場合に NULL を返す。"
1206
1207 #. type: Plain text
1208 #: build/C/man3/fgetc.3:124
1209 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
1210 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
1211
1212 #. type: Plain text
1213 #: build/C/man3/fgetc.3:126 build/C/man3/gets.3:60
1214 msgid "C89, C99, POSIX.1-2001."
1215 msgstr "C89, C99, POSIX.1-2001."
1216
1217 #. type: Plain text
1218 #: build/C/man3/fgetc.3:133
1219 msgid ""
1220 "It is not advisable to mix calls to input functions from the I<stdio> "
1221 "library with low-level calls to B<read>(2)  for the file descriptor "
1222 "associated with the input stream; the results will be undefined and very "
1223 "probably not what you want."
1224 msgstr ""
1225 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
1226 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
1227 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
1228
1229 #. type: Plain text
1230 #: build/C/man3/fgetc.3:150
1231 msgid ""
1232 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
1233 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), B<getwchar>(3), "
1234 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), "
1235 "B<feature_test_macros>(7)"
1236 msgstr ""
1237 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
1238 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), B<getwchar>(3), "
1239 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), "
1240 "B<feature_test_macros>(7)"
1241
1242 #. type: TH
1243 #: build/C/man3/fgetwc.3:18
1244 #, no-wrap
1245 msgid "FGETWC"
1246 msgstr "FGETWC"
1247
1248 #. type: TH
1249 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/popen.3:40
1250 #, no-wrap
1251 msgid "2013-04-19"
1252 msgstr "2013-04-19"
1253
1254 #. type: Plain text
1255 #: build/C/man3/fgetwc.3:21
1256 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1257 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1258
1259 #. type: Plain text
1260 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1261 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1262 #, no-wrap
1263 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1264 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1265
1266 #. type: Plain text
1267 #: build/C/man3/fgetwc.3:29
1268 #, no-wrap
1269 msgid ""
1270 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1271 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1272 msgstr ""
1273 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1274 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1275
1276 #. type: Plain text
1277 #: build/C/man3/fgetwc.3:44
1278 msgid ""
1279 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1280 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1281 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1282 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1283 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1284 msgstr ""
1285 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1286 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1287 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1288 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1289 "し、 B<WEOF> を返す。"
1290
1291 #. type: Plain text
1292 #: build/C/man3/fgetwc.3:52
1293 msgid ""
1294 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1295 "may be implemented as a macro, and may evaluate its argument more than "
1296 "once.  There is no reason ever to use it."
1297 msgstr ""
1298 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1299 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1300 "ない。この関数を使う理由はもはや存在しない。"
1301
1302 #. type: Plain text
1303 #: build/C/man3/fgetwc.3:64
1304 msgid ""
1305 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1306 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1307 msgstr ""
1308 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1309 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1310
1311 #. type: Plain text
1312 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1313 msgid "Apart from the usual ones, there is"
1314 msgstr "通常のエラーに加えて、以下のエラーがある:"
1315
1316 #. type: TP
1317 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1318 #, no-wrap
1319 msgid "B<EILSEQ>"
1320 msgstr "B<EILSEQ>"
1321
1322 #. type: Plain text
1323 #: build/C/man3/fgetwc.3:70
1324 msgid ""
1325 "The data obtained from the input stream does not form a valid character."
1326 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1327
1328 #. type: Plain text
1329 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1330 msgid "C99, POSIX.1-2001."
1331 msgstr "C99, POSIX.1-2001."
1332
1333 #. type: Plain text
1334 #: build/C/man3/fgetwc.3:79
1335 msgid ""
1336 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1337 "current locale."
1338 msgstr ""
1339 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1340
1341 #. type: Plain text
1342 #: build/C/man3/fgetwc.3:87
1343 msgid ""
1344 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1345 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1346 "sequence from the stream and then convert it to a wide character."
1347 msgstr ""
1348 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1349 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1350 "換すると期待することは適切である。"
1351
1352 #. type: Plain text
1353 #: build/C/man3/fgetwc.3:92
1354 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1355 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1356
1357 #. type: TH
1358 #: build/C/man3/flockfile.3:25
1359 #, no-wrap
1360 msgid "FLOCKFILE"
1361 msgstr "FLOCKFILE"
1362
1363 #. type: TH
1364 #: build/C/man3/flockfile.3:25
1365 #, no-wrap
1366 msgid "2013-07-23"
1367 msgstr "2013-07-23"
1368
1369 #. type: Plain text
1370 #: build/C/man3/flockfile.3:28
1371 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1372 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1373
1374 #. type: Plain text
1375 #: build/C/man3/flockfile.3:33
1376 #, no-wrap
1377 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1378 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1379
1380 #. type: Plain text
1381 #: build/C/man3/flockfile.3:35
1382 #, no-wrap
1383 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1384 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1385
1386 #. type: Plain text
1387 #: build/C/man3/flockfile.3:37
1388 #, no-wrap
1389 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1390 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1391
1392 #. type: Plain text
1393 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1394 msgid "All functions shown above:"
1395 msgstr "上記の全ての関数:"
1396
1397 #. type: Plain text
1398 #: build/C/man3/flockfile.3:49
1399 msgid ""
1400 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1401 "|| _POSIX_SOURCE"
1402 msgstr ""
1403 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1404 "|| _POSIX_SOURCE"
1405
1406 #. type: Plain text
1407 #: build/C/man3/flockfile.3:63
1408 msgid ""
1409 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1410 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1411 "thread.  For each library call, these functions wait until the I<FILE> "
1412 "object is no longer locked by a different thread, then lock it, do the "
1413 "requested I/O, and unlock the object again."
1414 msgstr ""
1415 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1416 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1417 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1418 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1419 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1420 "オブジェクトのロックを解除する。"
1421
1422 #. type: Plain text
1423 #: build/C/man3/flockfile.3:69
1424 msgid ""
1425 "(Note: this locking has nothing to do with the file locking done by "
1426 "functions like B<flock>(2)  and B<lockf>(3).)"
1427 msgstr ""
1428 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1429 "全く無関係である。)"
1430
1431 #. type: Plain text
1432 #: build/C/man3/flockfile.3:77
1433 msgid ""
1434 "All this is invisible to the C-programmer, but there may be two reasons to "
1435 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1436 "actions by one thread belongs together, and should not be interrupted by the "
1437 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1438 "should be avoided for greater efficiency."
1439 msgstr ""
1440 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1441 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1442 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1443 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1444 "避ける必要があるということであろう。"
1445
1446 #. type: Plain text
1447 #: build/C/man3/flockfile.3:94
1448 msgid ""
1449 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1450 "series of I/O actions, then unlock.  This prevents other threads from coming "
1451 "in between.  If the reason for doing this was to achieve greater efficiency, "
1452 "one does the I/O with the nonlocking versions of the stdio functions: with "
1453 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1454 "B<putc>(3)."
1455 msgstr ""
1456 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1457 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1458 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1459 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1460 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1461 "B<putc_unlocked>(3)  を使用する。"
1462
1463 #. type: Plain text
1464 #: build/C/man3/flockfile.3:105
1465 msgid ""
1466 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1467 "by a different thread, then makes the current thread owner of "
1468 "I<*filehandle>, and increments the lockcount."
1469 msgstr ""
1470 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1471 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1472 "ロック数を加算する。"
1473
1474 #. type: Plain text
1475 #: build/C/man3/flockfile.3:109
1476 msgid "The B<funlockfile>()  function decrements the lock count."
1477 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1478
1479 #. type: Plain text
1480 #: build/C/man3/flockfile.3:120
1481 msgid ""
1482 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1483 "It does nothing in case some other thread owns I<*filehandle>, and it "
1484 "obtains ownership and increments the lockcount otherwise."
1485 msgstr ""
1486 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1487 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1488 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1489
1490 #. type: Plain text
1491 #: build/C/man3/flockfile.3:125
1492 msgid ""
1493 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1494 "obtained), and nonzero for failure."
1495 msgstr ""
1496 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1497 "の値を返す。"
1498
1499 #. type: Plain text
1500 #: build/C/man3/flockfile.3:127
1501 msgid "None."
1502 msgstr "なし。"
1503
1504 #. type: Plain text
1505 #: build/C/man3/flockfile.3:135
1506 msgid ""
1507 "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are "
1508 "thread-safe."
1509 msgstr ""
1510 "関数 B<flockfile>(), B<ftrylockfile>(), B<funlockfile>() はスレッドセーフであ"
1511 "る。"
1512
1513 #. type: Plain text
1514 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1515 msgid "POSIX.1-2001."
1516 msgstr "POSIX.1-2001."
1517
1518 #. type: SH
1519 #: build/C/man3/flockfile.3:137
1520 #, no-wrap
1521 msgid "AVAILABILITY"
1522 msgstr "可用性"
1523
1524 #. type: Plain text
1525 #: build/C/man3/flockfile.3:143
1526 msgid ""
1527 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1528 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1529 msgstr ""
1530 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1531 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1532
1533 #. type: Plain text
1534 #: build/C/man3/flockfile.3:145
1535 msgid "B<unlocked_stdio>(3)"
1536 msgstr "B<unlocked_stdio>(3)"
1537
1538 #. type: TH
1539 #: build/C/man3/fmemopen.3:10
1540 #, no-wrap
1541 msgid "FMEMOPEN"
1542 msgstr "FMEMOPEN"
1543
1544 #. type: TH
1545 #: build/C/man3/fmemopen.3:10 build/C/man3/getline.3:26
1546 #: build/C/man7/symlink.7:37
1547 #, no-wrap
1548 msgid "2014-04-06"
1549 msgstr "2014-04-06"
1550
1551 #. type: Plain text
1552 #: build/C/man3/fmemopen.3:13
1553 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1554 msgstr ""
1555 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1556 "する"
1557
1558 #. type: Plain text
1559 #: build/C/man3/fmemopen.3:18
1560 #, no-wrap
1561 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1562 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1563
1564 #. type: Plain text
1565 #: build/C/man3/fmemopen.3:20
1566 #, no-wrap
1567 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1568 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1569
1570 #. type: Plain text
1571 #: build/C/man3/fmemopen.3:24
1572 #, no-wrap
1573 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1574 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1575
1576 #. type: Plain text
1577 #: build/C/man3/fmemopen.3:34
1578 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1579 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1580
1581 #. type: Plain text
1582 #: build/C/man3/fmemopen.3:57
1583 msgid ""
1584 "The B<fmemopen>()  function opens a stream that permits the access specified "
1585 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1586 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1587 "long."
1588 msgstr ""
1589 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1590 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1591 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1592 "I<size> バイトの長さでなければならない。"
1593
1594 #. type: Plain text
1595 #: build/C/man3/fmemopen.3:77
1596 msgid ""
1597 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1598 "an append mode, then the initial file position is set to the location of the "
1599 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1600 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1601 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1602 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1603 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1604 "e., the value specified by the I<size> argument), rather than the current "
1605 "string length."
1606 msgstr ""
1607 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1608 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1609 "最初のヌルバイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1610 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1611 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1612 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1613 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1614 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1615 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1616
1617 #. type: Plain text
1618 #: build/C/man3/fmemopen.3:89
1619 msgid ""
1620 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1621 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1622 "there is space.  The caller should ensure that an extra byte is available in "
1623 "the buffer (and that I<size> counts that byte)  to allow for this."
1624 msgstr ""
1625 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1626 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) ヌルバイトがバッファの末"
1627 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1628 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1629
1630 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1631 #.  and
1632 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1633 #. type: Plain text
1634 #: build/C/man3/fmemopen.3:107
1635 msgid ""
1636 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1637 "(By default, such errors will be visible only when the I<stdio> buffer is "
1638 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1639 "detect errors at the time of an output operation.  Alternatively, the caller "
1640 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1641 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1642 msgstr ""
1643 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1644 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1645 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1646 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1647 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1648 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1649 "stdio に教える方法がある。)"
1650
1651 #. type: Plain text
1652 #: build/C/man3/fmemopen.3:115
1653 msgid ""
1654 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1655 "not cause read operations to return an end-of-file indication.  A read from "
1656 "the buffer will only indicate end-of-file when the file pointer advances "
1657 "I<size> bytes past the start of the buffer."
1658 msgstr ""
1659 "読み出し用にオープンされたストリームでは、 バッファ内にヌルバイト (\\(aq"
1660 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1661 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1662 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1663
1664 #. type: Plain text
1665 #: build/C/man3/fmemopen.3:130
1666 msgid ""
1667 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1668 "buffer I<size> bytes long.  This is useful for an application that wants to "
1669 "write data to a temporary buffer and then read it back again.  The buffer is "
1670 "automatically freed when the stream is closed.  Note that the caller has no "
1671 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1672 "see B<open_memstream>()  below)."
1673 msgstr ""
1674 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1675 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1676 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1677 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1678 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1679 "の B<open_memstream>()  も参照)。"
1680
1681 #. type: Plain text
1682 #: build/C/man3/fmemopen.3:141
1683 msgid ""
1684 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1685 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1686 "automatically grows as required.  After closing the stream, the caller "
1687 "should B<free>(3)  this buffer."
1688 msgstr ""
1689 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1690 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1691 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1692 "B<free>(3)  すべきである。"
1693
1694 #. type: Plain text
1695 #: build/C/man3/fmemopen.3:156
1696 msgid ""
1697 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1698 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1699 "respectively, a pointer to the buffer and the current size of the buffer.  "
1700 "These values remain valid only as long as the caller performs no further "
1701 "output on the stream.  If further output is performed, then the stream must "
1702 "again be flushed before trying to access these variables."
1703 msgstr ""
1704 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1705 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1706 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1707 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1708 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1709
1710 #. type: Plain text
1711 #: build/C/man3/fmemopen.3:162
1712 msgid ""
1713 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1714 "included in the size value stored at I<sizeloc>."
1715 msgstr ""
1716 "バッファ末尾のヌルバイトは保持される。 このヌルバイトは I<sizeloc> に格納され"
1717 "るサイズには「含まれない」。"
1718
1719 #. type: Plain text
1720 #: build/C/man3/fmemopen.3:170
1721 msgid ""
1722 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1723 "(3).  Moving the file position past the end of the data already written "
1724 "fills the intervening space with zeros."
1725 msgstr ""
1726 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1727 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1728 "は 0 で埋められる。"
1729
1730 #. type: Plain text
1731 #: build/C/man3/fmemopen.3:176
1732 msgid ""
1733 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1734 "wide characters instead of bytes."
1735 msgstr ""
1736 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1737 "ド文字に対して操作を行う点が異なる。"
1738
1739 #. type: Plain text
1740 #: build/C/man3/fmemopen.3:188
1741 msgid ""
1742 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1743 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1744 "and I<errno> is set to indicate the error."
1745 msgstr ""
1746 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1747 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1748 "し、 I<errno> にエラーを示す値をセットする。"
1749
1750 #. type: SH
1751 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1752 #: build/C/man3/getline.3:137 build/C/man2/link.2:312 build/C/man2/open.2:1007
1753 #: build/C/man2/open_by_handle_at.2:349 build/C/man2/pipe.2:150
1754 #: build/C/man2/readlink.2:212 build/C/man2/readv.2:209
1755 #: build/C/man2/rename.2:326 build/C/man2/symlink.2:218
1756 #: build/C/man2/unlink.2:269
1757 #, no-wrap
1758 msgid "VERSIONS"
1759 msgstr "バージョン"
1760
1761 #. type: Plain text
1762 #: build/C/man3/fmemopen.3:195
1763 msgid ""
1764 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1765 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1766 msgstr ""
1767 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1768 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1769
1770 #. type: Plain text
1771 #: build/C/man3/fmemopen.3:199
1772 msgid ""
1773 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1774 "not widely available on other systems."
1775 msgstr ""
1776 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1777 "のシステムで広く利用可能である。"
1778
1779 #.  http://austingroupbugs.net/view.php?id=396
1780 #. type: Plain text
1781 #: build/C/man3/fmemopen.3:207
1782 msgid ""
1783 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1784 "However, Technical Corrigendum 1 adjusts the standard to allow "
1785 "implementation-specific treatment for this case, thus permitting the glibc "
1786 "treatment of \\(aqb\\(aq."
1787 msgstr ""
1788 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1789 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1790 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1791 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1792
1793 #. type: Plain text
1794 #: build/C/man3/fmemopen.3:213
1795 msgid ""
1796 "There is no file descriptor associated with the file stream returned by "
1797 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1798 "returned stream)."
1799 msgstr ""
1800 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1801 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1802 "とになる)。"
1803
1804 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1805 #. type: Plain text
1806 #: build/C/man3/fmemopen.3:220
1807 msgid ""
1808 "In glibc before version 2.7, seeking past the end of a stream created by "
1809 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1810 "call fails, returning -1."
1811 msgstr ""
1812 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1813 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1814 "B<fseek>(3)  が失敗し -1 が返る。"
1815
1816 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1817 #. type: Plain text
1818 #: build/C/man3/fmemopen.3:231
1819 msgid ""
1820 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1821 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1822 "stream that then returned end of file on the first attempt at reading.  "
1823 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1824 msgstr ""
1825 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1826 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1827 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1828 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1829
1830 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1831 #. type: Plain text
1832 #: build/C/man3/fmemopen.3:239
1833 msgid ""
1834 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1835 "file position to the first null byte, but (if the file offset is reset to a "
1836 "location other than the end of the stream)  does not force subsequent writes "
1837 "to append at the end of the stream."
1838 msgstr ""
1839 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1840 "ファイル位置の初期値は最初のヌルバイトに設定されるが、(ファイル\n"
1841 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1842 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1843
1844 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1845 #. type: Plain text
1846 #: build/C/man3/fmemopen.3:255
1847 msgid ""
1848 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1849 "\"), and the I<size> argument does not cover a null byte in I<buf>, then, "
1850 "according to POSIX.1-2008, the initial file position should be set to the "
1851 "next byte after the end of the buffer.  However, in this case the glibc "
1852 "B<fmemopen>()  sets the file position to -1."
1853 msgstr ""
1854 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1855 "I<size> 引き数で指定した範囲の I<buf> 内にヌルバイトがない場合、\n"
1856 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1857 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1858 "この場合ファイル位置は -1 に設定される。"
1859
1860 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1861 #. type: Plain text
1862 #: build/C/man3/fmemopen.3:268
1863 msgid ""
1864 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1865 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1866 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1867 "I<mode> by B<fopen>(3)."
1868 msgstr ""
1869 "B<fmemopen>() でバイナリモードを指定するには、\n"
1870 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1871 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1872 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1873
1874 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1875 #. type: Plain text
1876 #: build/C/man3/fmemopen.3:276
1877 msgid ""
1878 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1879 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1880 msgstr ""
1881 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1882 "ABI (Application Binary Interface) が黙って変更された。\n"
1883 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1884
1885 #. type: SH
1886 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1887 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:146
1888 #: build/C/man2/open_by_handle_at.2:434 build/C/man2/pipe.2:161
1889 #: build/C/man3/printf.3:974 build/C/man2/readlink.2:256
1890 #: build/C/man2/readv.2:265 build/C/man3/scanf.3:704
1891 #, no-wrap
1892 msgid "EXAMPLE"
1893 msgstr "例"
1894
1895 #. type: Plain text
1896 #: build/C/man3/fmemopen.3:286
1897 msgid ""
1898 "The program below uses B<fmemopen>()  to open an input buffer, and "
1899 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1900 "scans its input string (taken from the program's first command-line "
1901 "argument) reading integers, and writes the squares of these integers to the "
1902 "output buffer.  An example of the output produced by this program is the "
1903 "following:"
1904 msgstr ""
1905 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1906 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1907 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1908 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1909 "ムの実行例は以下のようになる。"
1910
1911 #. type: Plain text
1912 #: build/C/man3/fmemopen.3:291
1913 #, no-wrap
1914 msgid ""
1915 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1916 "size=11; ptr=1 529 1849\n"
1917 msgstr ""
1918 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1919 "size=11; ptr=1 529 1849\n"
1920
1921 #. type: SS
1922 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1923 #: build/C/man2/pipe.2:177
1924 #, no-wrap
1925 msgid "Program source"
1926 msgstr "プログラムのソース"
1927
1928 #. type: Plain text
1929 #: build/C/man3/fmemopen.3:300
1930 #, no-wrap
1931 msgid ""
1932 "#define _GNU_SOURCE\n"
1933 "#include E<lt>string.hE<gt>\n"
1934 "#include E<lt>stdio.hE<gt>\n"
1935 "#include E<lt>stdlib.hE<gt>\n"
1936 msgstr ""
1937 "#define _GNU_SOURCE\n"
1938 "#include E<lt>string.hE<gt>\n"
1939 "#include E<lt>stdio.hE<gt>\n"
1940 "#include E<lt>stdlib.hE<gt>\n"
1941
1942 #. type: Plain text
1943 #: build/C/man3/fmemopen.3:303
1944 #, no-wrap
1945 msgid ""
1946 "#define handle_error(msg) \\e\n"
1947 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1948 msgstr ""
1949 "#define handle_error(msg) \\e\n"
1950 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1951
1952 #. type: Plain text
1953 #: build/C/man3/fmemopen.3:311
1954 #, no-wrap
1955 msgid ""
1956 "int\n"
1957 "main(int argc, char *argv[])\n"
1958 "{\n"
1959 "    FILE *out, *in;\n"
1960 "    int v, s;\n"
1961 "    size_t size;\n"
1962 "    char *ptr;\n"
1963 msgstr ""
1964 "int\n"
1965 "main(int argc, char *argv[])\n"
1966 "{\n"
1967 "    FILE *out, *in;\n"
1968 "    int v, s;\n"
1969 "    size_t size;\n"
1970 "    char *ptr;\n"
1971
1972 #. type: Plain text
1973 #: build/C/man3/fmemopen.3:316
1974 #, no-wrap
1975 msgid ""
1976 "    if (argc != 2) {\n"
1977 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1978 "        exit(EXIT_FAILURE);\n"
1979 "    }\n"
1980 msgstr ""
1981 "    if (argc != 2) {\n"
1982 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1983 "        exit(EXIT_FAILURE);\n"
1984 "    }\n"
1985
1986 #. type: Plain text
1987 #: build/C/man3/fmemopen.3:320
1988 #, no-wrap
1989 msgid ""
1990 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1991 "    if (in == NULL)\n"
1992 "        handle_error(\"fmemopen\");\n"
1993 msgstr ""
1994 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1995 "    if (in == NULL)\n"
1996 "        handle_error(\"fmemopen\");\n"
1997
1998 #. type: Plain text
1999 #: build/C/man3/fmemopen.3:324
2000 #, no-wrap
2001 msgid ""
2002 "    out = open_memstream(&ptr, &size);\n"
2003 "    if (out == NULL)\n"
2004 "        handle_error(\"open_memstream\");\n"
2005 msgstr ""
2006 "    out = open_memstream(&ptr, &size);\n"
2007 "    if (out == NULL)\n"
2008 "        handle_error(\"open_memstream\");\n"
2009
2010 #. type: Plain text
2011 #: build/C/man3/fmemopen.3:329
2012 #, no-wrap
2013 msgid ""
2014 "    for (;;) {\n"
2015 "        s = fscanf(in, \"%d\", &v);\n"
2016 "        if (s E<lt>= 0)\n"
2017 "            break;\n"
2018 msgstr ""
2019 "    for (;;) {\n"
2020 "        s = fscanf(in, \"%d\", &v);\n"
2021 "        if (s E<lt>= 0)\n"
2022 "            break;\n"
2023
2024 #. type: Plain text
2025 #: build/C/man3/fmemopen.3:340
2026 #, no-wrap
2027 msgid ""
2028 "        s = fprintf(out, \"%d \", v * v);\n"
2029 "        if (s == -1)\n"
2030 "            handle_error(\"fprintf\");\n"
2031 "    }\n"
2032 "    fclose(in);\n"
2033 "    fclose(out);\n"
2034 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
2035 "    free(ptr);\n"
2036 "    exit(EXIT_SUCCESS);\n"
2037 "}\n"
2038 msgstr ""
2039 "        s = fprintf(out, \"%d \", v * v);\n"
2040 "        if (s == -1)\n"
2041 "            handle_error(\"fprintf\");\n"
2042 "    }\n"
2043 "    fclose(in);\n"
2044 "    fclose(out);\n"
2045 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
2046 "    free(ptr);\n"
2047 "    exit(EXIT_SUCCESS);\n"
2048 "}\n"
2049
2050 #. type: Plain text
2051 #: build/C/man3/fmemopen.3:344
2052 msgid "B<fopen>(3), B<fopencookie>(3)"
2053 msgstr "B<fopen>(3), B<fopencookie>(3)"
2054
2055 #. type: TH
2056 #: build/C/man3/fmtmsg.3:13
2057 #, no-wrap
2058 msgid "FMTMSG"
2059 msgstr "FMTMSG"
2060
2061 #. type: Plain text
2062 #: build/C/man3/fmtmsg.3:16
2063 msgid "fmtmsg - print formatted error messages"
2064 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
2065
2066 #. type: Plain text
2067 #: build/C/man3/fmtmsg.3:19
2068 #, no-wrap
2069 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
2070 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
2071
2072 #. type: Plain text
2073 #: build/C/man3/fmtmsg.3:21
2074 #, no-wrap
2075 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
2076 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
2077
2078 #. type: Plain text
2079 #: build/C/man3/fmtmsg.3:23
2080 #, no-wrap
2081 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
2082 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
2083
2084 #. type: Plain text
2085 #: build/C/man3/fmtmsg.3:25
2086 #, no-wrap
2087 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
2088 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
2089
2090 #. type: Plain text
2091 #: build/C/man3/fmtmsg.3:36
2092 msgid ""
2093 "This function displays a message described by its arguments on the device"
2094 "(s)  specified in the I<classification> argument.  For messages written to "
2095 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
2096 msgstr ""
2097 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
2098 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
2099 "は、 B<MSGVERB> 環境変数に依存する。"
2100
2101 #. type: Plain text
2102 #: build/C/man3/fmtmsg.3:43
2103 msgid ""
2104 "The I<label> argument identifies the source of the message.  The string must "
2105 "consist of two colon separated parts where the first part has not more than "
2106 "10 and the second part not more than 14 characters."
2107 msgstr ""
2108 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
2109 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
2110 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
2111
2112 #. type: Plain text
2113 #: build/C/man3/fmtmsg.3:47
2114 msgid "The I<text> argument describes the condition of the error."
2115 msgstr "I<text> 引き数にはエラー条件を記述する。"
2116
2117 #. type: Plain text
2118 #: build/C/man3/fmtmsg.3:52
2119 msgid ""
2120 "The I<action> argument describes possible steps to recover from the error.  "
2121 "If it is printed, it is prefixed by \"TO FIX: \"."
2122 msgstr ""
2123 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
2124 "れが表示される場合、\"TO FIX: \" が前に付く。"
2125
2126 #. type: Plain text
2127 #: build/C/man3/fmtmsg.3:60
2128 msgid ""
2129 "The I<tag> argument is a reference to the online documentation where more "
2130 "information can be found.  It should contain the I<label> value and a unique "
2131 "identification number."
2132 msgstr ""
2133 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
2134 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
2135
2136 #. type: SS
2137 #: build/C/man3/fmtmsg.3:60
2138 #, no-wrap
2139 msgid "Dummy arguments"
2140 msgstr "ダミー引き数"
2141
2142 #. type: Plain text
2143 #: build/C/man3/fmtmsg.3:79
2144 msgid ""
2145 "Each of the arguments can have a dummy value.  The dummy classification "
2146 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
2147 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
2148 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
2149 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
2150 "synonym for B<NO_SEV>."
2151 msgstr ""
2152 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
2153 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
2154 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
2155 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
2156 "((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名"
2157 "である。"
2158
2159 #. type: SS
2160 #: build/C/man3/fmtmsg.3:79
2161 #, no-wrap
2162 msgid "The classification argument"
2163 msgstr "classification 引き数"
2164
2165 #. type: Plain text
2166 #: build/C/man3/fmtmsg.3:83
2167 msgid ""
2168 "The I<classification> argument is the sum of values describing 4 types of "
2169 "information."
2170 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
2171
2172 #. type: Plain text
2173 #: build/C/man3/fmtmsg.3:86
2174 msgid "The first value defines the output channel."
2175 msgstr "最初の値は出力チャンネルを定義する。"
2176
2177 #. type: TP
2178 #: build/C/man3/fmtmsg.3:86
2179 #, no-wrap
2180 msgid "B<MM_PRINT>"
2181 msgstr "B<MM_PRINT>"
2182
2183 #. type: Plain text
2184 #: build/C/man3/fmtmsg.3:90
2185 msgid "Output to I<stderr>."
2186 msgstr "I<stderr> に出力する。"
2187
2188 #. type: TP
2189 #: build/C/man3/fmtmsg.3:90
2190 #, no-wrap
2191 msgid "B<MM_CONSOLE>"
2192 msgstr "B<MM_CONSOLE>"
2193
2194 #. type: Plain text
2195 #: build/C/man3/fmtmsg.3:93
2196 msgid "Output to the system console."
2197 msgstr "システムコンソールに出力する。"
2198
2199 #. type: TP
2200 #: build/C/man3/fmtmsg.3:93
2201 #, no-wrap
2202 msgid "B<MM_PRINT | MM_CONSOLE>"
2203 msgstr "B<MM_PRINT | MM_CONSOLE>"
2204
2205 #. type: Plain text
2206 #: build/C/man3/fmtmsg.3:96
2207 msgid "Output to both."
2208 msgstr "両方に出力する。"
2209
2210 #. type: Plain text
2211 #: build/C/man3/fmtmsg.3:98
2212 msgid "The second value is the source of the error:"
2213 msgstr "2 番目の値はエラーの発生源である:"
2214
2215 #. type: TP
2216 #: build/C/man3/fmtmsg.3:98
2217 #, no-wrap
2218 msgid "B<MM_HARD>"
2219 msgstr "B<MM_HARD>"
2220
2221 #. type: Plain text
2222 #: build/C/man3/fmtmsg.3:101
2223 msgid "A hardware error occurred."
2224 msgstr "ハードウェアエラーが起こった。"
2225
2226 #. type: TP
2227 #: build/C/man3/fmtmsg.3:101
2228 #, no-wrap
2229 msgid "B<MM_FIRM>"
2230 msgstr "B<MM_FIRM>"
2231
2232 #. type: Plain text
2233 #: build/C/man3/fmtmsg.3:104
2234 msgid "A firmware error occurred."
2235 msgstr "ファームウェアエラーが起こった。"
2236
2237 #. type: TP
2238 #: build/C/man3/fmtmsg.3:104
2239 #, no-wrap
2240 msgid "B<MM_SOFT>"
2241 msgstr "B<MM_SOFT>"
2242
2243 #. type: Plain text
2244 #: build/C/man3/fmtmsg.3:107
2245 msgid "A software error occurred."
2246 msgstr "ソフトウェアエラーが起こった。"
2247
2248 #. type: Plain text
2249 #: build/C/man3/fmtmsg.3:109
2250 msgid "The third value encodes the detector of the problem:"
2251 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2252
2253 #. type: TP
2254 #: build/C/man3/fmtmsg.3:109
2255 #, no-wrap
2256 msgid "B<MM_APPL>"
2257 msgstr "B<MM_APPL>"
2258
2259 #. type: Plain text
2260 #: build/C/man3/fmtmsg.3:112
2261 msgid "It is detected by an application."
2262 msgstr "アプリケーションによって検知された。"
2263
2264 #. type: TP
2265 #: build/C/man3/fmtmsg.3:112
2266 #, no-wrap
2267 msgid "B<MM_UTIL>"
2268 msgstr "B<MM_UTIL>"
2269
2270 #. type: Plain text
2271 #: build/C/man3/fmtmsg.3:115
2272 msgid "It is detected by a utility."
2273 msgstr "ユーティリティによって検知された。"
2274
2275 #. type: TP
2276 #: build/C/man3/fmtmsg.3:115
2277 #, no-wrap
2278 msgid "B<MM_OPSYS>"
2279 msgstr "B<MM_OPSYS>"
2280
2281 #. type: Plain text
2282 #: build/C/man3/fmtmsg.3:118
2283 msgid "It is detected by the operating system."
2284 msgstr "オペレーティングシステムによって検知された。"
2285
2286 #. type: Plain text
2287 #: build/C/man3/fmtmsg.3:120
2288 msgid "The fourth value shows the severity of the incident:"
2289 msgstr "4 番目の値は問題の重大度を表す:"
2290
2291 #. type: TP
2292 #: build/C/man3/fmtmsg.3:120
2293 #, no-wrap
2294 msgid "B<MM_RECOVER>"
2295 msgstr "B<MM_RECOVER>"
2296
2297 #. type: Plain text
2298 #: build/C/man3/fmtmsg.3:123
2299 msgid "It is a recoverable error."
2300 msgstr "回復可能なエラーである。"
2301
2302 #. type: TP
2303 #: build/C/man3/fmtmsg.3:123
2304 #, no-wrap
2305 msgid "B<MM_NRECOV>"
2306 msgstr "B<MM_NRECOV>"
2307
2308 #. type: Plain text
2309 #: build/C/man3/fmtmsg.3:126
2310 msgid "It is a nonrecoverable error."
2311 msgstr "回復不可能なエラーである。"
2312
2313 #. type: SS
2314 #: build/C/man3/fmtmsg.3:126
2315 #, no-wrap
2316 msgid "The severity argument"
2317 msgstr "severity 引き数"
2318
2319 #. type: Plain text
2320 #: build/C/man3/fmtmsg.3:130
2321 msgid "The I<severity> argument can take one of the following values:"
2322 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2323
2324 #. type: TP
2325 #: build/C/man3/fmtmsg.3:130
2326 #, no-wrap
2327 msgid "B<MM_NOSEV>"
2328 msgstr "B<MM_NOSEV>"
2329
2330 #. type: Plain text
2331 #: build/C/man3/fmtmsg.3:133
2332 msgid "No severity is printed."
2333 msgstr "重大度は表示されない。"
2334
2335 #. type: TP
2336 #: build/C/man3/fmtmsg.3:133
2337 #, no-wrap
2338 msgid "B<MM_HALT>"
2339 msgstr "B<MM_HALT>"
2340
2341 #. type: Plain text
2342 #: build/C/man3/fmtmsg.3:136
2343 msgid "This value is printed as HALT."
2344 msgstr "この値は HALT として表示される。"
2345
2346 #. type: TP
2347 #: build/C/man3/fmtmsg.3:136
2348 #, no-wrap
2349 msgid "B<MM_ERROR>"
2350 msgstr "B<MM_ERROR>"
2351
2352 #. type: Plain text
2353 #: build/C/man3/fmtmsg.3:139
2354 msgid "This value is printed as ERROR."
2355 msgstr "この値は ERROR として表示される。"
2356
2357 #. type: TP
2358 #: build/C/man3/fmtmsg.3:139
2359 #, no-wrap
2360 msgid "B<MM_WARNING>"
2361 msgstr "B<MM_WARNING>"
2362
2363 #. type: Plain text
2364 #: build/C/man3/fmtmsg.3:142
2365 msgid "This value is printed as WARNING."
2366 msgstr "この値は WARNING として表示される。"
2367
2368 #. type: TP
2369 #: build/C/man3/fmtmsg.3:142
2370 #, no-wrap
2371 msgid "B<MM_INFO>"
2372 msgstr "B<MM_INFO>"
2373
2374 #. type: Plain text
2375 #: build/C/man3/fmtmsg.3:145
2376 msgid "This value is printed as INFO."
2377 msgstr "この値は INFO として表示される。"
2378
2379 #. type: Plain text
2380 #: build/C/man3/fmtmsg.3:152
2381 msgid ""
2382 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2383 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2384 "print."
2385 msgstr ""
2386 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2387 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2388
2389 #. type: Plain text
2390 #: build/C/man3/fmtmsg.3:154
2391 msgid "The function can return 4 values:"
2392 msgstr "関数は 4 つの値を返す:"
2393
2394 #. type: TP
2395 #: build/C/man3/fmtmsg.3:154
2396 #, no-wrap
2397 msgid "B<MM_OK>"
2398 msgstr "B<MM_OK>"
2399
2400 #. type: Plain text
2401 #: build/C/man3/fmtmsg.3:157
2402 msgid "Everything went smooth."
2403 msgstr "全てがうまくいった。"
2404
2405 #. type: TP
2406 #: build/C/man3/fmtmsg.3:157
2407 #, no-wrap
2408 msgid "B<MM_NOTOK>"
2409 msgstr "B<MM_NOTOK>"
2410
2411 #. type: Plain text
2412 #: build/C/man3/fmtmsg.3:160
2413 msgid "Complete failure."
2414 msgstr "完全に失敗した。"
2415
2416 #. type: TP
2417 #: build/C/man3/fmtmsg.3:160
2418 #, no-wrap
2419 msgid "B<MM_NOMSG>"
2420 msgstr "B<MM_NOMSG>"
2421
2422 #. type: Plain text
2423 #: build/C/man3/fmtmsg.3:164
2424 msgid "Error writing to I<stderr>."
2425 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2426
2427 #. type: TP
2428 #: build/C/man3/fmtmsg.3:164
2429 #, no-wrap
2430 msgid "B<MM_NOCON>"
2431 msgstr "B<MM_NOCON>"
2432
2433 #. type: Plain text
2434 #: build/C/man3/fmtmsg.3:167
2435 msgid "Error writing to the console."
2436 msgstr "コンソールに書き込むときにエラーが起こった。"
2437
2438 #. type: SH
2439 #: build/C/man3/fmtmsg.3:167
2440 #, no-wrap
2441 msgid "ENVIRONMENT"
2442 msgstr "環境変数"
2443
2444 #. type: Plain text
2445 #: build/C/man3/fmtmsg.3:178
2446 msgid ""
2447 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2448 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2449 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2450 "separated list of valid keywords, then only the parts of the message "
2451 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2452 "\"severity\", \"text\", \"action\" and \"tag\"."
2453 msgstr ""
2454 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2455 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2456 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2457 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2458 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2459
2460 #. type: Plain text
2461 #: build/C/man3/fmtmsg.3:190
2462 msgid ""
2463 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2464 "levels.  By default, only the five severity levels described above are "
2465 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2466 "If the user puts B<SEV_LEVEL> with a format like"
2467 msgstr ""
2468 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2469 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2470 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2471 "B<SEV_LEVEL> を"
2472
2473 #. type: Plain text
2474 #: build/C/man3/fmtmsg.3:193
2475 msgid "SEV_LEVEL=[description[:description[:...]]]"
2476 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2477
2478 #. type: Plain text
2479 #: build/C/man3/fmtmsg.3:198
2480 msgid ""
2481 "in the environment of the process before the first call to B<fmtmsg>(), "
2482 "where each description is of the form"
2483 msgstr ""
2484 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2485 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2486 "指定された printstring を表示する。 各 description は"
2487
2488 #. type: Plain text
2489 #: build/C/man3/fmtmsg.3:201
2490 msgid "severity-keyword,level,printstring"
2491 msgstr "severity-keyword,level,printstring"
2492
2493 #. type: Plain text
2494 #: build/C/man3/fmtmsg.3:208
2495 msgid ""
2496 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2497 "addition to the standard levels 0-4), and use the indicated printstring when "
2498 "such a level occurs."
2499 msgstr "という形式である。"
2500
2501 #. type: Plain text
2502 #: build/C/man3/fmtmsg.3:222
2503 msgid ""
2504 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2505 "present.  The level part is a string representation of a number.  The "
2506 "numeric value must be a number greater than 4.  This value must be used in "
2507 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2508 "possible to overwrite any of the predefined classes.  The printstring is the "
2509 "string printed when a message of this class is processed by B<fmtmsg>()."
2510 msgstr ""
2511 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2512 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2513 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2514 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2515 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2516 "た場合に表示される文字列である。"
2517
2518 #. type: Plain text
2519 #: build/C/man3/fmtmsg.3:225
2520 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2521 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2522
2523 #. type: Plain text
2524 #: build/C/man3/fmtmsg.3:231
2525 msgid ""
2526 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2527 "not protected, so it is not thread-safe."
2528 msgstr ""
2529 "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的"
2530 "な変数を使うため、 スレッドセーフではない。"
2531
2532 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2533 #. type: Plain text
2534 #: build/C/man3/fmtmsg.3:237
2535 msgid ""
2536 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2537 "static variable, so it is thread-safe."
2538 msgstr ""
2539 "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護してお"
2540 "り、 スレッドセーフである。"
2541
2542 #. type: Plain text
2543 #: build/C/man3/fmtmsg.3:252
2544 msgid ""
2545 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2546 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2547 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2548 msgstr ""
2549 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2550 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2551 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2552
2553 #. type: Plain text
2554 #: build/C/man3/fmtmsg.3:256
2555 msgid ""
2556 "System V and UnixWare man pages tell us that these functions have been "
2557 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2558 "vlfmt()\", and will be removed later."
2559 msgstr ""
2560 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2561 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2562 "は削除される予定である」と書かれている。"
2563
2564 #. type: Plain text
2565 #: build/C/man3/fmtmsg.3:261
2566 #, no-wrap
2567 msgid ""
2568 "#include E<lt>stdio.hE<gt>\n"
2569 "#include E<lt>stdlib.hE<gt>\n"
2570 "#include E<lt>fmtmsg.hE<gt>\n"
2571 msgstr ""
2572 "#include E<lt>stdio.hE<gt>\n"
2573 "#include E<lt>stdlib.hE<gt>\n"
2574 "#include E<lt>fmtmsg.hE<gt>\n"
2575
2576 #. type: Plain text
2577 #: build/C/man3/fmtmsg.3:267
2578 #, no-wrap
2579 msgid ""
2580 "int\n"
2581 "main(void)\n"
2582 "{\n"
2583 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2584 "    int err;\n"
2585 msgstr ""
2586 "int\n"
2587 "main(void)\n"
2588 "{\n"
2589 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2590 "    int err;\n"
2591
2592 #. type: Plain text
2593 #: build/C/man3/fmtmsg.3:288
2594 #, no-wrap
2595 msgid ""
2596 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2597 "                \"unknown mount option\", \"See mount(8).\",\n"
2598 "                \"util-linux:mount:017\");\n"
2599 "    switch (err) {\n"
2600 "    case MM_OK:\n"
2601 "        break;\n"
2602 "    case MM_NOTOK:\n"
2603 "        printf(\"Nothing printed\\en\");\n"
2604 "        break;\n"
2605 "    case MM_NOMSG:\n"
2606 "        printf(\"Nothing printed to stderr\\en\");\n"
2607 "        break;\n"
2608 "    case MM_NOCON:\n"
2609 "        printf(\"No console output\\en\");\n"
2610 "        break;\n"
2611 "    default:\n"
2612 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2613 "    }\n"
2614 "    exit(EXIT_SUCCESS);\n"
2615 "}\n"
2616 msgstr ""
2617 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2618 "                \"unknown mount option\", \"See mount(8).\",\n"
2619 "                \"util-linux:mount:017\");\n"
2620 "    switch (err) {\n"
2621 "    case MM_OK:\n"
2622 "      break;\n"
2623 "    case MM_NOTOK:\n"
2624 "        printf(\"Nothing printed\\en\");\n"
2625 "        break;\n"
2626 "    case MM_NOMSG:\n"
2627 "        printf(\"Nothing printed to stderr\\en\");\n"
2628 "        break;\n"
2629 "    case MM_NOCON:\n"
2630 "        printf(\"No console output\\en\");\n"
2631 "        break;\n"
2632 "    default:\n"
2633 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2634 "    }\n"
2635 "    exit(EXIT_SUCCESS);\n"
2636 "}\n"
2637
2638 #. type: Plain text
2639 #: build/C/man3/fmtmsg.3:291
2640 msgid "The output should be:"
2641 msgstr "出力は"
2642
2643 #. type: Plain text
2644 #: build/C/man3/fmtmsg.3:295
2645 #, no-wrap
2646 msgid ""
2647 "    util-linux:mount: ERROR: unknown mount option\n"
2648 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2649 msgstr ""
2650 "    util-linux:mount: ERROR: unknown mount option\n"
2651 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2652
2653 #. type: Plain text
2654 #: build/C/man3/fmtmsg.3:298
2655 msgid "and after"
2656 msgstr "のようになり、"
2657
2658 #. type: Plain text
2659 #: build/C/man3/fmtmsg.3:301
2660 #, no-wrap
2661 msgid "    MSGVERB=text:action; export MSGVERB\n"
2662 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2663
2664 #. type: Plain text
2665 #: build/C/man3/fmtmsg.3:304
2666 msgid "the output becomes:"
2667 msgstr "を実行すると、次のようになる。"
2668
2669 #. type: Plain text
2670 #: build/C/man3/fmtmsg.3:308
2671 #, no-wrap
2672 msgid ""
2673 "    unknown mount option\n"
2674 "    TO FIX: See mount(8).\n"
2675 msgstr ""
2676 "    unknown mount option\n"
2677 "    TO FIX: See mount(8).\n"
2678
2679 #. type: Plain text
2680 #: build/C/man3/fmtmsg.3:312
2681 msgid "B<addseverity>(3), B<perror>(3)"
2682 msgstr "B<addseverity>(3), B<perror>(3)"
2683
2684 #. type: TH
2685 #: build/C/man3/fopen.3:44
2686 #, no-wrap
2687 msgid "FOPEN"
2688 msgstr "FOPEN"
2689
2690 #. type: TH
2691 #: build/C/man3/fopen.3:44
2692 #, no-wrap
2693 msgid "2012-04-22"
2694 msgstr "2012-04-22"
2695
2696 #. type: Plain text
2697 #: build/C/man3/fopen.3:47
2698 msgid "fopen, fdopen, freopen - stream open functions"
2699 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2700
2701 #. type: Plain text
2702 #: build/C/man3/fopen.3:52
2703 #, no-wrap
2704 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2705 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2706
2707 #. type: Plain text
2708 #: build/C/man3/fopen.3:54
2709 #, no-wrap
2710 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2711 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2712
2713 #. type: Plain text
2714 #: build/C/man3/fopen.3:56
2715 #, no-wrap
2716 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2717 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2718
2719 #. type: Plain text
2720 #: build/C/man3/fopen.3:65
2721 msgid ""
2722 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2723 msgstr ""
2724 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2725
2726 #. type: Plain text
2727 #: build/C/man3/fopen.3:71
2728 msgid ""
2729 "The B<fopen>()  function opens the file whose name is the string pointed to "
2730 "by I<path> and associates a stream with it."
2731 msgstr ""
2732 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2733 "びつける。"
2734
2735 #. type: Plain text
2736 #: build/C/man3/fopen.3:76
2737 msgid ""
2738 "The argument I<mode> points to a string beginning with one of the following "
2739 "sequences (possibly followed by additional characters, as described below):"
2740 msgstr ""
2741 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2742 "る (以下の述べる、追加の文字が後に続くこともある):"
2743
2744 #. type: TP
2745 #: build/C/man3/fopen.3:76
2746 #, no-wrap
2747 msgid "B<r>"
2748 msgstr "B<r>"
2749
2750 #. type: Plain text
2751 #: build/C/man3/fopen.3:80
2752 msgid ""
2753 "Open text file for reading.  The stream is positioned at the beginning of "
2754 "the file."
2755 msgstr ""
2756 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2757 "る。"
2758
2759 #. type: TP
2760 #: build/C/man3/fopen.3:80
2761 #, no-wrap
2762 msgid "B<r+>"
2763 msgstr "B<r+>"
2764
2765 #. type: Plain text
2766 #: build/C/man3/fopen.3:84
2767 msgid ""
2768 "Open for reading and writing.  The stream is positioned at the beginning of "
2769 "the file."
2770 msgstr ""
2771 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2772 "る。"
2773
2774 #. type: TP
2775 #: build/C/man3/fopen.3:84
2776 #, no-wrap
2777 msgid "B<w>"
2778 msgstr "B<w>"
2779
2780 #. type: Plain text
2781 #: build/C/man3/fopen.3:88
2782 msgid ""
2783 "Truncate file to zero length or create text file for writing.  The stream is "
2784 "positioned at the beginning of the file."
2785 msgstr ""
2786 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2787 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2788 "頭に位置される。"
2789
2790 #. type: TP
2791 #: build/C/man3/fopen.3:88
2792 #, no-wrap
2793 msgid "B<w+>"
2794 msgstr "B<w+>"
2795
2796 #. type: Plain text
2797 #: build/C/man3/fopen.3:94
2798 msgid ""
2799 "Open for reading and writing.  The file is created if it does not exist, "
2800 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2801 "file."
2802 msgstr ""
2803 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2804 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2805 "の先頭に位置される。"
2806
2807 #. type: TP
2808 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2809 #, no-wrap
2810 msgid "B<a>"
2811 msgstr "B<a>"
2812
2813 #. type: Plain text
2814 #: build/C/man3/fopen.3:99
2815 msgid ""
2816 "Open for appending (writing at end of file).  The file is created if it does "
2817 "not exist.  The stream is positioned at the end of the file."
2818 msgstr ""
2819 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2820 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2821
2822 #. type: TP
2823 #: build/C/man3/fopen.3:99
2824 #, no-wrap
2825 msgid "B<a+>"
2826 msgstr "B<a+>"
2827
2828 #. type: Plain text
2829 #: build/C/man3/fopen.3:105
2830 msgid ""
2831 "Open for reading and appending (writing at end of file).  The file is "
2832 "created if it does not exist.  The initial file position for reading is at "
2833 "the beginning of the file, but output is always appended to the end of the "
2834 "file."
2835 msgstr ""
2836 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2837 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2838 "あるが、 書き込みは常にファイルの最後に追加される。"
2839
2840 #. type: Plain text
2841 #: build/C/man3/fopen.3:118
2842 msgid ""
2843 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2844 "character or as a character between the characters in any of the two-"
2845 "character strings described above.  This is strictly for compatibility with "
2846 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2847 "systems, including Linux.  (Other systems may treat text files and binary "
2848 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2849 "O to a binary file and expect that your program may be ported to non-UNIX "
2850 "environments.)"
2851 msgstr ""
2852 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2853 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2854 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2855 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2856 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2857 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2858 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2859 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2860
2861 #. type: Plain text
2862 #: build/C/man3/fopen.3:121
2863 msgid "See NOTES below for details of glibc extensions for I<mode>."
2864 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2865
2866 #. type: Plain text
2867 #: build/C/man3/fopen.3:126
2868 msgid ""
2869 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2870 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2871 "umask value (see B<umask>(2))."
2872 msgstr ""
2873 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2874 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2875 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2876
2877 #. type: Plain text
2878 #: build/C/man3/fopen.3:141
2879 msgid ""
2880 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2881 "that ANSI C requires that a file positioning function intervene between "
2882 "output and input, unless an input operation encounters end-of-file.  (If "
2883 "this condition is not met, then a read is allowed to return the result of "
2884 "writes other than the most recent.)  Therefore it is good practice (and "
2885 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2886 "(3)  operation between write and read operations on such a stream.  This "
2887 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2888 "for its synchronizing side effect)."
2889 msgstr ""
2890 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2891 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2892 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2893 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2894 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2895 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2896 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2897 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2898 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2899 "い)。"
2900
2901 #. type: Plain text
2902 #: build/C/man3/fopen.3:146
2903 msgid ""
2904 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2905 "causes all subsequent write operations to this stream to occur at end-of-"
2906 "file, as if preceded the call:"
2907 msgstr ""
2908 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2909 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2910 "かのように) ファイルの末尾で行われる。"
2911
2912 #. type: Plain text
2913 #: build/C/man3/fopen.3:149
2914 #, no-wrap
2915 msgid "    fseek(stream, 0, SEEK_END);\n"
2916 msgstr "    fseek(stream, 0, SEEK_END);\n"
2917
2918 #. type: Plain text
2919 #: build/C/man3/fopen.3:171
2920 msgid ""
2921 "The B<fdopen>()  function associates a stream with the existing file "
2922 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2923 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2924 "file descriptor.  The file position indicator of the new stream is set to "
2925 "that belonging to I<fd>, and the error and end-of-file indicators are "
2926 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2927 "file descriptor is not dup'ed, and will be closed when the stream created by "
2928 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2929 "memory object is undefined."
2930 msgstr ""
2931 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2932 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2933 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2934 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2935 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2936 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2937 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2938 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2939
2940 #. type: Plain text
2941 #: build/C/man3/fopen.3:189
2942 msgid ""
2943 "The B<freopen>()  function opens the file whose name is the string pointed "
2944 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2945 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2946 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2947 "function is to change the file associated with a standard text stream "
2948 "(I<stderr>, I<stdin>, or I<stdout>)."
2949 msgstr ""
2950 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2951 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2952 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2953 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2954 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2955
2956 #. type: Plain text
2957 #: build/C/man3/fopen.3:201
2958 msgid ""
2959 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2960 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2961 "indicate the error."
2962 msgstr ""
2963 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2964 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2965
2966 #. type: TP
2967 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2968 #: build/C/man3/getline.3:128 build/C/man2/link.2:271 build/C/man2/llseek.2:77
2969 #: build/C/man2/lseek.2:192 build/C/man2/open.2:824 build/C/man2/open.2:832
2970 #: build/C/man2/open.2:837 build/C/man2/open_by_handle_at.2:273
2971 #: build/C/man2/open_by_handle_at.2:277 build/C/man2/open_by_handle_at.2:325
2972 #: build/C/man2/pipe.2:139 build/C/man2/read.2:126 build/C/man2/read.2:137
2973 #: build/C/man2/readlink.2:169 build/C/man2/readlink.2:178
2974 #: build/C/man2/readv.2:200 build/C/man2/rename.2:214 build/C/man2/rmdir.2:67
2975 #: build/C/man3/scanf.3:565 build/C/man2/unlink.2:252 build/C/man2/write.2:154
2976 #, no-wrap
2977 msgid "B<EINVAL>"
2978 msgstr "B<EINVAL>"
2979
2980 #. type: Plain text
2981 #: build/C/man3/fopen.3:212
2982 msgid ""
2983 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2984 "invalid."
2985 msgstr ""
2986 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2987
2988 #. type: Plain text
2989 #: build/C/man3/fopen.3:222
2990 msgid ""
2991 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2992 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2993 msgstr ""
2994 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2995 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2996 "する。"
2997
2998 #. type: Plain text
2999 #: build/C/man3/fopen.3:229
3000 msgid ""
3001 "The B<fopen>()  function may also fail and set I<errno> for any of the "
3002 "errors specified for the routine B<open>(2)."
3003 msgstr ""
3004 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
3005 "があり、 その時は対応する値に I<errno> をセットする。"
3006
3007 #. type: Plain text
3008 #: build/C/man3/fopen.3:236
3009 msgid ""
3010 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
3011 "errors specified for the routine B<fcntl>(2)."
3012 msgstr ""
3013 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
3014 "とがあり、 その時は対応する値に I<errno> をセットする。"
3015
3016 #. type: Plain text
3017 #: build/C/man3/fopen.3:246
3018 msgid ""
3019 "The B<freopen>()  function may also fail and set I<errno> for any of the "
3020 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
3021 msgstr ""
3022 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
3023 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
3024 "トする。"
3025
3026 #. type: Plain text
3027 #: build/C/man3/fopen.3:255
3028 msgid ""
3029 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
3030 "()  function conforms to POSIX.1-1990."
3031 msgstr ""
3032 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
3033 "は POSIX.1-1990 に準拠している。"
3034
3035 #. type: SS
3036 #: build/C/man3/fopen.3:256
3037 #, no-wrap
3038 msgid "Glibc notes"
3039 msgstr "glibc での注意"
3040
3041 #. type: Plain text
3042 #: build/C/man3/fopen.3:259
3043 msgid ""
3044 "The GNU C library allows the following extensions for the string specified "
3045 "in I<mode>:"
3046 msgstr ""
3047 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
3048 "いる:"
3049
3050 #. type: TP
3051 #: build/C/man3/fopen.3:259
3052 #, no-wrap
3053 msgid "B<c> (since glibc 2.3.3)"
3054 msgstr "B<c> (glibc 2.3.3 以降)"
3055
3056 #. type: Plain text
3057 #: build/C/man3/fopen.3:266
3058 msgid ""
3059 "Do not make the open operation, or subsequent read and write operations, "
3060 "thread cancellation points.  This flag is ignored for B<fdopen>()."
3061 msgstr ""
3062 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
3063 "(cancellation points) を作成しない。\n"
3064 "このフラグは B<fdopen>() では無視される。"
3065
3066 #. type: TP
3067 #: build/C/man3/fopen.3:266
3068 #, no-wrap
3069 msgid "B<e> (since glibc 2.7)"
3070 msgstr "B<e> (glibc 2.7 以降)"
3071
3072 #. type: Plain text
3073 #: build/C/man3/fopen.3:276
3074 msgid ""
3075 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
3076 "information.  This flag is ignored for B<fdopen>()."
3077 msgstr ""
3078 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
3079 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
3080
3081 #. type: TP
3082 #: build/C/man3/fopen.3:276
3083 #, no-wrap
3084 msgid "B<m> (since glibc 2.3)"
3085 msgstr "B<m> (glibc 2.3 以降)"
3086
3087 #.  As at glibc 2.4:
3088 #. type: Plain text
3089 #: build/C/man3/fopen.3:288
3090 msgid ""
3091 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
3092 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
3093 "for a file opened for reading."
3094 msgstr ""
3095 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
3096 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
3097 "オープンするファイルについてだけである。"
3098
3099 #. type: TP
3100 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
3101 #, no-wrap
3102 msgid "B<x>"
3103 msgstr "B<x>"
3104
3105 #.  Since glibc 2.0?
3106 #.  FIXME C11 specifies this flag
3107 #. type: Plain text
3108 #: build/C/man3/fopen.3:305
3109 msgid ""
3110 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
3111 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
3112 "This flag is ignored for B<fdopen>()."
3113 msgstr ""
3114 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
3115 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
3116 "セットされる。 このフラグは B<fdopen>()  では無視される。"
3117
3118 #. type: Plain text
3119 #: build/C/man3/fopen.3:313
3120 msgid ""
3121 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
3122 "the following syntax in I<mode>:"
3123 msgstr ""
3124 "上記の文字に加えて、\n"
3125 "B<fopen>() と B<freopen>() では I<mode> に\n"
3126 "以下の書式を 指定することができる。"
3127
3128 #. type: Plain text
3129 #: build/C/man3/fopen.3:315
3130 msgid "B< ,ccs=>I<string>"
3131 msgstr "B< ,ccs=>I<string>"
3132
3133 #. type: Plain text
3134 #: build/C/man3/fopen.3:331
3135 msgid ""
3136 "The given I<string> is taken as the name of a coded character set and the "
3137 "stream is marked as wide-oriented.  Thereafter, internal conversion "
3138 "functions convert I/O to and from the character set I<string>.  If the B<,"
3139 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
3140 "stream is determined by the first file operation.  If that operation is a "
3141 "wide-character operation, the stream is marked wide-oriented, and functions "
3142 "to convert to the coded character set are loaded."
3143 msgstr ""
3144 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
3145 "ストリームではワイド文字のストリームとして扱われる。\n"
3146 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
3147 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
3148 "ストリームをワイド文字のストリームとして扱うかは\n"
3149 "最初のファイル操作時に決定される。\n"
3150 "最初のファイル操作がワイド文字操作であった場合は、\n"
3151 "そのストリームはワイド文字のストリームとして扱われ、\n"
3152 "符号化文字集合との変換を行う関数が読み込まれる。"
3153
3154 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
3155 #. type: Plain text
3156 #: build/C/man3/fopen.3:348
3157 msgid ""
3158 "When parsing for individual flag characters in I<mode> (i.e., the characters "
3159 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
3160 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
3161 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
3162 "possible specifications such as \"rb+cmxe\").  The current implementation of "
3163 "B<fdopen>()  parses at most 5 characters in I<mode>."
3164 msgstr ""
3165 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
3166 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
3167 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
3168 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
3169 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
3170 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
3171
3172 #. type: Plain text
3173 #: build/C/man3/fopen.3:354
3174 msgid ""
3175 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
3176 msgstr ""
3177 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
3178
3179 #. type: TH
3180 #: build/C/man3/fopencookie.3:26
3181 #, no-wrap
3182 msgid "FOPENCOOKIE"
3183 msgstr "FOPENCOOKIE"
3184
3185 #. type: TH
3186 #: build/C/man3/fopencookie.3:26
3187 #, no-wrap
3188 msgid "2013-03-17"
3189 msgstr "2013-03-17"
3190
3191 #. type: TH
3192 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:32
3193 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
3194 #: build/C/man2/open.2:51 build/C/man2/open_by_handle_at.2:25
3195 #: build/C/man2/pipe.2:36 build/C/man2/read.2:35 build/C/man2/readlink.2:44
3196 #: build/C/man2/readv.2:32 build/C/man2/rename.2:33 build/C/man2/rmdir.2:30
3197 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man2/symlink.2:33
3198 #: build/C/man7/symlink.7:37 build/C/man2/unlink.2:33 build/C/man2/write.2:39
3199 #, no-wrap
3200 msgid "Linux"
3201 msgstr "Linux"
3202
3203 #. type: Plain text
3204 #: build/C/man3/fopencookie.3:29
3205 msgid "fopencookie - opening a custom stream"
3206 msgstr ""
3207
3208 #. type: Plain text
3209 #: build/C/man3/fopencookie.3:36
3210 #, no-wrap
3211 msgid ""
3212 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3213 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3214 msgstr ""
3215 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3216 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3217
3218 #. type: Plain text
3219 #: build/C/man3/fopencookie.3:49
3220 msgid ""
3221 "The B<fopencookie>()  function allows the programmer to create a custom "
3222 "implementation for a standard I/O stream.  This implementation can store the "
3223 "stream's data at a location of its own choosing; for example, B<fopencookie>"
3224 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
3225 "to data that is stored in a buffer in memory."
3226 msgstr ""
3227
3228 #. type: Plain text
3229 #: build/C/man3/fopencookie.3:51
3230 msgid "In order to create a custom stream the programmer must:"
3231 msgstr ""
3232
3233 #. type: IP
3234 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3235 #: build/C/man3/fopencookie.3:65 build/C/man2/lseek.2:168
3236 #: build/C/man2/lseek.2:170 build/C/man2/lseek.2:173 build/C/man2/lseek.2:175
3237 #: build/C/man2/lseek.2:177 build/C/man2/open.2:533 build/C/man2/open.2:541
3238 #: build/C/man2/open.2:547 build/C/man2/open.2:553 build/C/man2/open.2:560
3239 #: build/C/man2/open.2:566 build/C/man2/open.2:687 build/C/man2/open.2:695
3240 #: build/C/man2/open_by_handle_at.2:138 build/C/man2/open_by_handle_at.2:146
3241 #: build/C/man2/open_by_handle_at.2:157 build/C/man2/open_by_handle_at.2:170
3242 #: build/C/man2/pipe.2:95 build/C/man2/pipe.2:101 build/C/man2/pipe.2:111
3243 #: build/C/man3/scanf.3:658 build/C/man3/scanf.3:663
3244 #: build/C/man7/symlink.7:290 build/C/man7/symlink.7:300
3245 #: build/C/man7/symlink.7:330 build/C/man7/symlink.7:390
3246 #: build/C/man7/symlink.7:419 build/C/man7/symlink.7:448
3247 #: build/C/man7/symlink.7:479 build/C/man7/symlink.7:492
3248 #, no-wrap
3249 msgid "*"
3250 msgstr "*"
3251
3252 #. type: Plain text
3253 #: build/C/man3/fopencookie.3:54
3254 msgid ""
3255 "Implement four \"hook\" functions that are used internally by the standard I/"
3256 "O library when performing I/O on the stream."
3257 msgstr ""
3258
3259 #. type: Plain text
3260 #: build/C/man3/fopencookie.3:65
3261 msgid ""
3262 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3263 "information (e.g., where to store data) used by the aforementioned hook "
3264 "functions.  The standard I/O package knows nothing about the contents of "
3265 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3266 "()), but automatically supplies the cookie as the first argument when "
3267 "calling the hook functions."
3268 msgstr ""
3269
3270 #. type: Plain text
3271 #: build/C/man3/fopencookie.3:70
3272 msgid ""
3273 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3274 "hook functions with that stream."
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man3/fopencookie.3:78
3279 msgid ""
3280 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3281 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3282 "operate on that stream."
3283 msgstr ""
3284
3285 #. type: Plain text
3286 #: build/C/man3/fopencookie.3:85
3287 msgid ""
3288 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3289 "to be associated with the new stream.  This pointer is supplied as the first "
3290 "argument when the standard I/O library invokes any of the hook functions "
3291 "described below."
3292 msgstr ""
3293
3294 #. type: Plain text
3295 #: build/C/man3/fopencookie.3:101
3296 msgid ""
3297 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3298 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3299 "See B<fopen>(3)  for details."
3300 msgstr ""
3301
3302 #. type: Plain text
3303 #: build/C/man3/fopencookie.3:107
3304 msgid ""
3305 "The I<io_funcs> argument is a structure that contains four fields pointing "
3306 "to the programmer-defined hook functions that are used to implement this "
3307 "stream.  The structure is defined as follows"
3308 msgstr ""
3309
3310 #. type: Plain text
3311 #: build/C/man3/fopencookie.3:116
3312 #, no-wrap
3313 msgid ""
3314 "typedef struct {\n"
3315 "    cookie_read_function_t  *read;\n"
3316 "    cookie_write_function_t *write;\n"
3317 "    cookie_seek_function_t  *seek;\n"
3318 "    cookie_close_function_t *close;\n"
3319 "} cookie_io_functions_t;\n"
3320 msgstr ""
3321 "typedef struct {\n"
3322 "    cookie_read_function_t  *read;\n"
3323 "    cookie_write_function_t *write;\n"
3324 "    cookie_seek_function_t  *seek;\n"
3325 "    cookie_close_function_t *close;\n"
3326 "} cookie_io_functions_t;\n"
3327
3328 #. type: Plain text
3329 #: build/C/man3/fopencookie.3:120
3330 msgid "The four fields are as follows:"
3331 msgstr ""
3332
3333 #. type: TP
3334 #: build/C/man3/fopencookie.3:120
3335 #, no-wrap
3336 msgid "I<cookie_read_function_t *read>"
3337 msgstr "I<cookie_read_function_t *read>"
3338
3339 #. type: Plain text
3340 #: build/C/man3/fopencookie.3:124
3341 msgid ""
3342 "This function implements read operations for the stream.  When called, it "
3343 "receives three arguments:"
3344 msgstr ""
3345
3346 #. type: Plain text
3347 #: build/C/man3/fopencookie.3:126
3348 #, no-wrap
3349 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3350 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3351
3352 #. type: Plain text
3353 #: build/C/man3/fopencookie.3:141
3354 msgid ""
3355 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3356 "input data can be placed and the size of that buffer.  As its function "
3357 "result, the I<read> function should return the number of bytes copied into "
3358 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3359 "update the stream offset appropriately."
3360 msgstr ""
3361
3362 #. type: Plain text
3363 #: build/C/man3/fopencookie.3:146
3364 msgid ""
3365 "If I<*read> is a null pointer, then reads from the custom stream always "
3366 "return end of file."
3367 msgstr ""
3368
3369 #. type: TP
3370 #: build/C/man3/fopencookie.3:146
3371 #, no-wrap
3372 msgid "I<cookie_write_function_t *write>"
3373 msgstr "I<cookie_write_function_t *write>"
3374
3375 #. type: Plain text
3376 #: build/C/man3/fopencookie.3:150
3377 msgid ""
3378 "This function implements write operations for the stream.  When called, it "
3379 "receives three arguments:"
3380 msgstr ""
3381
3382 #. type: Plain text
3383 #: build/C/man3/fopencookie.3:152
3384 #, no-wrap
3385 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3386 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3387
3388 #. type: Plain text
3389 #: build/C/man3/fopencookie.3:168
3390 msgid ""
3391 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3392 "output to the stream and the size of that buffer.  As its function result, "
3393 "the I<write> function should return the number of bytes copied from I<buf>, "
3394 "or 0 on error.  (The function must not return a negative value.)  The "
3395 "I<write> function should update the stream offset appropriately."
3396 msgstr ""
3397
3398 #. type: Plain text
3399 #: build/C/man3/fopencookie.3:173
3400 msgid "If I<*write> is a null pointer, then output to the stream is discarded."
3401 msgstr ""
3402
3403 #. type: TP
3404 #: build/C/man3/fopencookie.3:173
3405 #, no-wrap
3406 msgid "I<cookie_seek_function_t *seek>"
3407 msgstr "I<cookie_seek_function_t *seek>"
3408
3409 #. type: Plain text
3410 #: build/C/man3/fopencookie.3:177
3411 msgid ""
3412 "This function implements seek operations on the stream.  When called, it "
3413 "receives three arguments:"
3414 msgstr ""
3415
3416 #. type: Plain text
3417 #: build/C/man3/fopencookie.3:179
3418 #, no-wrap
3419 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3420 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3421
3422 #. type: Plain text
3423 #: build/C/man3/fopencookie.3:185
3424 msgid ""
3425 "The I<*offset> argument specifies the new file offset depending on which of "
3426 "the following three values is supplied in I<whence>:"
3427 msgstr ""
3428
3429 #. type: TP
3430 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3431 #, no-wrap
3432 msgid "B<SEEK_SET>"
3433 msgstr "B<SEEK_SET>"
3434
3435 #. type: Plain text
3436 #: build/C/man3/fopencookie.3:191
3437 msgid ""
3438 "The stream offset should be set I<*offset> bytes from the start of the "
3439 "stream."
3440 msgstr ""
3441
3442 #. type: TP
3443 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3444 #, no-wrap
3445 msgid "B<SEEK_CUR>"
3446 msgstr "B<SEEK_CUR>"
3447
3448 #. type: Plain text
3449 #: build/C/man3/fopencookie.3:195
3450 msgid "I<*offset> should be added to the current stream offset."
3451 msgstr ""
3452
3453 #. type: TP
3454 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3455 #, no-wrap
3456 msgid "B<SEEK_END>"
3457 msgstr "B<SEEK_END>"
3458
3459 #. type: Plain text
3460 #: build/C/man3/fopencookie.3:199
3461 msgid ""
3462 "The stream offset should be set to the size of the stream plus I<*offset>."
3463 msgstr ""
3464
3465 #. type: Plain text
3466 #: build/C/man3/fopencookie.3:206
3467 msgid ""
3468 "Before returning, the I<seek> function should update I<*offset> to indicate "
3469 "the new stream offset."
3470 msgstr ""
3471
3472 #. type: Plain text
3473 #: build/C/man3/fopencookie.3:210
3474 msgid ""
3475 "As its function result, the I<seek> function should return 0 on success, and "
3476 "-1 on error."
3477 msgstr ""
3478
3479 #. type: Plain text
3480 #: build/C/man3/fopencookie.3:215
3481 msgid ""
3482 "If I<*seek> is a null pointer, then it is not possible to perform seek "
3483 "operations on the stream."
3484 msgstr ""
3485
3486 #. type: TP
3487 #: build/C/man3/fopencookie.3:215
3488 #, no-wrap
3489 msgid "I<cookie_close_function_t *close>"
3490 msgstr "I<cookie_close_function_t *close>"
3491
3492 #. type: Plain text
3493 #: build/C/man3/fopencookie.3:221
3494 msgid ""
3495 "This function closes the stream.  The hook function can do things such as "
3496 "freeing buffers allocated for the stream.  When called, it receives one "
3497 "argument:"
3498 msgstr ""
3499
3500 #. type: Plain text
3501 #: build/C/man3/fopencookie.3:223
3502 #, no-wrap
3503 msgid "    int close(void *cookie);\n"
3504 msgstr "    int close(void *cookie);\n"
3505
3506 #. type: Plain text
3507 #: build/C/man3/fopencookie.3:228
3508 msgid ""
3509 "The I<cookie> argument is the cookie that the programmer supplied when "
3510 "calling B<fopencookie>()."
3511 msgstr ""
3512
3513 #. type: Plain text
3514 #: build/C/man3/fopencookie.3:234
3515 msgid ""
3516 "As its function result, the I<close> function should return 0 on success, "
3517 "and B<EOF> on error."
3518 msgstr ""
3519
3520 #. type: Plain text
3521 #: build/C/man3/fopencookie.3:238
3522 msgid ""
3523 "If I<*close> is NULL, then no special action is performed when the stream is "
3524 "closed."
3525 msgstr ""
3526
3527 #.  .SH ERRORS
3528 #.  It's not clear if errno ever gets set...
3529 #. type: Plain text
3530 #: build/C/man3/fopencookie.3:245
3531 msgid ""
3532 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3533 "NULL is returned."
3534 msgstr ""
3535
3536 #. type: Plain text
3537 #: build/C/man3/fopencookie.3:247
3538 msgid "This function is a nonstandard GNU extension."
3539 msgstr ""
3540
3541 #. type: Plain text
3542 #: build/C/man3/fopencookie.3:256
3543 msgid ""
3544 "The program below implements a custom stream whose functionality is similar "
3545 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3546 "stream whose data is stored in a memory buffer.  The program writes its "
3547 "command-line arguments to the stream, and then seeks through the stream "
3548 "reading two out of every five characters and writing them to standard "
3549 "output.  The following shell session demonstrates the use of the program:"
3550 msgstr ""
3551
3552 #. type: Plain text
3553 #: build/C/man3/fopencookie.3:264
3554 #, no-wrap
3555 msgid ""
3556 "$B< ./a.out \\(aqhello world\\(aq>\n"
3557 "/he/\n"
3558 "/ w/\n"
3559 "/d/\n"
3560 "Reached end of file\n"
3561 msgstr ""
3562 "$B< ./a.out \\(aqhello world\\(aq>\n"
3563 "/he/\n"
3564 "/ w/\n"
3565 "/d/\n"
3566 "Reached end of file\n"
3567
3568 #. type: Plain text
3569 #: build/C/man3/fopencookie.3:271
3570 msgid ""
3571 "Note that a more general version of the program below could be improved to "
3572 "more robustly handle various error situations (e.g., opening a stream with a "
3573 "cookie that already has an open stream; closing a stream that has already "
3574 "been closed)."
3575 msgstr ""
3576
3577 #. type: Plain text
3578 #: build/C/man3/fopencookie.3:280
3579 #, no-wrap
3580 msgid ""
3581 "#define _GNU_SOURCE\n"
3582 "#include E<lt>sys/types.hE<gt>\n"
3583 "#include E<lt>stdio.hE<gt>\n"
3584 "#include E<lt>stdlib.hE<gt>\n"
3585 "#include E<lt>unistd.hE<gt>\n"
3586 "#include E<lt>string.hE<gt>\n"
3587 msgstr ""
3588 "#define _GNU_SOURCE\n"
3589 "#include E<lt>sys/types.hE<gt>\n"
3590 "#include E<lt>stdio.hE<gt>\n"
3591 "#include E<lt>stdlib.hE<gt>\n"
3592 "#include E<lt>unistd.hE<gt>\n"
3593 "#include E<lt>string.hE<gt>\n"
3594
3595 #. type: Plain text
3596 #: build/C/man3/fopencookie.3:282
3597 #, no-wrap
3598 msgid "#define INIT_BUF_SIZE 4\n"
3599 msgstr "#define INIT_BUF_SIZE 4\n"
3600
3601 #. type: Plain text
3602 #: build/C/man3/fopencookie.3:289
3603 #, no-wrap
3604 msgid ""
3605 "struct memfile_cookie {\n"
3606 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3607 "    size_t  allocated;  /* Size of buf */\n"
3608 "    size_t  endpos;     /* Number of characters in buf */\n"
3609 "    off_t   offset;     /* Current file offset in buf */\n"
3610 "};\n"
3611 msgstr ""
3612 "struct memfile_cookie {\n"
3613 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3614 "    size_t  allocated;  /* Size of buf */\n"
3615 "    size_t  endpos;     /* Number of characters in buf */\n"
3616 "    off_t   offset;     /* Current file offset in buf */\n"
3617 "};\n"
3618
3619 #. type: Plain text
3620 #: build/C/man3/fopencookie.3:295
3621 #, no-wrap
3622 msgid ""
3623 "ssize_t\n"
3624 "memfile_write(void *c, const char *buf, size_t size)\n"
3625 "{\n"
3626 "    char *new_buff;\n"
3627 "    struct memfile_cookie *cookie = c;\n"
3628 msgstr ""
3629 "ssize_t\n"
3630 "memfile_write(void *c, const char *buf, size_t size)\n"
3631 "{\n"
3632 "    char *new_buff;\n"
3633 "    struct memfile_cookie *cookie = c;\n"
3634
3635 #. type: Plain text
3636 #: build/C/man3/fopencookie.3:297
3637 #, no-wrap
3638 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3639 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3640
3641 #. type: Plain text
3642 #: build/C/man3/fopencookie.3:307
3643 #, no-wrap
3644 msgid ""
3645 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3646 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3647 "        if (new_buff == NULL) {\n"
3648 "            return -1;\n"
3649 "        } else {\n"
3650 "            cookie-E<gt>allocated *= 2;\n"
3651 "            cookie-E<gt>buf = new_buff;\n"
3652 "        }\n"
3653 "    }\n"
3654 msgstr ""
3655 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3656 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3657 "        if (new_buff == NULL) {\n"
3658 "            return -1;\n"
3659 "        } else {\n"
3660 "            cookie-E<gt>allocated *= 2;\n"
3661 "            cookie-E<gt>buf = new_buff;\n"
3662 "        }\n"
3663 "    }\n"
3664
3665 #. type: Plain text
3666 #: build/C/man3/fopencookie.3:309
3667 #, no-wrap
3668 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3669 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3670
3671 #. type: Plain text
3672 #: build/C/man3/fopencookie.3:313
3673 #, no-wrap
3674 msgid ""
3675 "    cookie-E<gt>offset += size;\n"
3676 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3677 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3678 msgstr ""
3679 "    cookie-E<gt>offset += size;\n"
3680 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3681 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3682
3683 #. type: Plain text
3684 #: build/C/man3/fopencookie.3:316
3685 #, no-wrap
3686 msgid ""
3687 "    return size;\n"
3688 "}\n"
3689 msgstr ""
3690 "    return size;\n"
3691 "}\n"
3692
3693 #. type: Plain text
3694 #: build/C/man3/fopencookie.3:322
3695 #, no-wrap
3696 msgid ""
3697 "ssize_t\n"
3698 "memfile_read(void *c, char *buf, size_t size)\n"
3699 "{\n"
3700 "    ssize_t xbytes;\n"
3701 "    struct memfile_cookie *cookie = c;\n"
3702 msgstr ""
3703 "ssize_t\n"
3704 "memfile_read(void *c, char *buf, size_t size)\n"
3705 "{\n"
3706 "    ssize_t xbytes;\n"
3707 "    struct memfile_cookie *cookie = c;\n"
3708
3709 #. type: Plain text
3710 #: build/C/man3/fopencookie.3:324
3711 #, no-wrap
3712 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3713 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3714
3715 #. type: Plain text
3716 #: build/C/man3/fopencookie.3:330
3717 #, no-wrap
3718 msgid ""
3719 "    xbytes = size;\n"
3720 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3721 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3722 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3723 "       xbytes = 0;\n"
3724 msgstr ""
3725 "    xbytes = size;\n"
3726 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3727 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3728 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3729 "       xbytes = 0;\n"
3730
3731 #. type: Plain text
3732 #: build/C/man3/fopencookie.3:332
3733 #, no-wrap
3734 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3735 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3736
3737 #. type: Plain text
3738 #: build/C/man3/fopencookie.3:336
3739 #, no-wrap
3740 msgid ""
3741 "    cookie-E<gt>offset += xbytes;\n"
3742 "    return xbytes;\n"
3743 "}\n"
3744 msgstr ""
3745 "    cookie-E<gt>offset += xbytes;\n"
3746 "    return xbytes;\n"
3747 "}\n"
3748
3749 #. type: Plain text
3750 #: build/C/man3/fopencookie.3:342
3751 #, no-wrap
3752 msgid ""
3753 "int\n"
3754 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3755 "{\n"
3756 "    off64_t new_offset;\n"
3757 "    struct memfile_cookie *cookie = c;\n"
3758 msgstr ""
3759 "int\n"
3760 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3761 "{\n"
3762 "    off64_t new_offset;\n"
3763 "    struct memfile_cookie *cookie = c;\n"
3764
3765 #. type: Plain text
3766 #: build/C/man3/fopencookie.3:351
3767 #, no-wrap
3768 msgid ""
3769 "    if (whence == SEEK_SET)\n"
3770 "        new_offset = *offset;\n"
3771 "    else if (whence == SEEK_END)\n"
3772 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3773 "    else if (whence == SEEK_CUR)\n"
3774 "        new_offset = cookie-E<gt>offset + *offset;\n"
3775 "    else\n"
3776 "        return -1;\n"
3777 msgstr ""
3778 "    if (whence == SEEK_SET)\n"
3779 "        new_offset = *offset;\n"
3780 "    else if (whence == SEEK_END)\n"
3781 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3782 "    else if (whence == SEEK_CUR)\n"
3783 "        new_offset = cookie-E<gt>offset + *offset;\n"
3784 "    else\n"
3785 "        return -1;\n"
3786
3787 #. type: Plain text
3788 #: build/C/man3/fopencookie.3:354
3789 #, no-wrap
3790 msgid ""
3791 "    if (new_offset E<lt> 0)\n"
3792 "        return -1;\n"
3793 msgstr ""
3794 "    if (new_offset E<lt> 0)\n"
3795 "        return -1;\n"
3796
3797 #. type: Plain text
3798 #: build/C/man3/fopencookie.3:359
3799 #, no-wrap
3800 msgid ""
3801 "    cookie-E<gt>offset = new_offset;\n"
3802 "    *offset = new_offset;\n"
3803 "    return 0;\n"
3804 "}\n"
3805 msgstr ""
3806 "    cookie-E<gt>offset = new_offset;\n"
3807 "    *offset = new_offset;\n"
3808 "    return 0;\n"
3809 "}\n"
3810
3811 #. type: Plain text
3812 #: build/C/man3/fopencookie.3:364
3813 #, no-wrap
3814 msgid ""
3815 "int\n"
3816 "memfile_close(void *c)\n"
3817 "{\n"
3818 "    struct memfile_cookie *cookie = c;\n"
3819 msgstr ""
3820 "int\n"
3821 "memfile_close(void *c)\n"
3822 "{\n"
3823 "    struct memfile_cookie *cookie = c;\n"
3824
3825 #. type: Plain text
3826 #: build/C/man3/fopencookie.3:368
3827 #, no-wrap
3828 msgid ""
3829 "    free(cookie-E<gt>buf);\n"
3830 "    cookie-E<gt>allocated = 0;\n"
3831 "    cookie-E<gt>buf = NULL;\n"
3832 msgstr ""
3833 "    free(cookie-E<gt>buf);\n"
3834 "    cookie-E<gt>allocated = 0;\n"
3835 "    cookie-E<gt>buf = NULL;\n"
3836
3837 #. type: Plain text
3838 #: build/C/man3/fopencookie.3:371
3839 #, no-wrap
3840 msgid ""
3841 "    return 0;\n"
3842 "}\n"
3843 msgstr ""
3844 "    return 0;\n"
3845 "}\n"
3846
3847 #. type: Plain text
3848 #: build/C/man3/fopencookie.3:387
3849 #, no-wrap
3850 msgid ""
3851 "int\n"
3852 "main(int argc, char *argv[])\n"
3853 "{\n"
3854 "    cookie_io_functions_t  memfile_func = {\n"
3855 "        .read  = memfile_read,\n"
3856 "        .write = memfile_write,\n"
3857 "        .seek  = memfile_seek,\n"
3858 "        .close = memfile_close\n"
3859 "    };\n"
3860 "    FILE *fp;\n"
3861 "    struct memfile_cookie mycookie;\n"
3862 "    ssize_t nread;\n"
3863 "    long p;\n"
3864 "    int j;\n"
3865 "    char buf[1000];\n"
3866 msgstr ""
3867 "int\n"
3868 "main(int argc, char *argv[])\n"
3869 "{\n"
3870 "    cookie_io_functions_t  memfile_func = {\n"
3871 "        .read  = memfile_read,\n"
3872 "        .write = memfile_write,\n"
3873 "        .seek  = memfile_seek,\n"
3874 "        .close = memfile_close\n"
3875 "    };\n"
3876 "    FILE *fp;\n"
3877 "    struct memfile_cookie mycookie;\n"
3878 "    ssize_t nread;\n"
3879 "    long p;\n"
3880 "    int j;\n"
3881 "    char buf[1000];\n"
3882
3883 #. type: Plain text
3884 #: build/C/man3/fopencookie.3:389
3885 #, no-wrap
3886 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3887 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3888
3889 #. type: Plain text
3890 #: build/C/man3/fopencookie.3:395
3891 #, no-wrap
3892 msgid ""
3893 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3894 "    if (mycookie.buf == NULL) {\n"
3895 "        perror(\"malloc\");\n"
3896 "        exit(EXIT_FAILURE);\n"
3897 "    }\n"
3898 msgstr ""
3899 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3900 "    if (mycookie.buf == NULL) {\n"
3901 "        perror(\"malloc\");\n"
3902 "        exit(EXIT_FAILURE);\n"
3903 "    }\n"
3904
3905 #. type: Plain text
3906 #: build/C/man3/fopencookie.3:399
3907 #, no-wrap
3908 msgid ""
3909 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3910 "    mycookie.offset = 0;\n"
3911 "    mycookie.endpos = 0;\n"
3912 msgstr ""
3913 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3914 "    mycookie.offset = 0;\n"
3915 "    mycookie.endpos = 0;\n"
3916
3917 #. type: Plain text
3918 #: build/C/man3/fopencookie.3:405
3919 #, no-wrap
3920 msgid ""
3921 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3922 "    if (fp == NULL) {\n"
3923 "        perror(\"fopencookie\");\n"
3924 "        exit(EXIT_FAILURE);\n"
3925 "    }\n"
3926 msgstr ""
3927 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3928 "    if (fp == NULL) {\n"
3929 "        perror(\"fopencookie\");\n"
3930 "        exit(EXIT_FAILURE);\n"
3931 "    }\n"
3932
3933 #. type: Plain text
3934 #: build/C/man3/fopencookie.3:407
3935 #, no-wrap
3936 msgid "    /* Write command-line arguments to our file */\n"
3937 msgstr "    /* Write command-line arguments to our file */\n"
3938
3939 #. type: Plain text
3940 #: build/C/man3/fopencookie.3:413
3941 #, no-wrap
3942 msgid ""
3943 "    for (j = 1; j E<lt> argc; j++)\n"
3944 "        if (fputs(argv[j], fp) == EOF) {\n"
3945 "            perror(\"fputs\");\n"
3946 "            exit(EXIT_FAILURE);\n"
3947 "        }\n"
3948 msgstr ""
3949 "    for (j = 1; j E<lt> argc; j++)\n"
3950 "        if (fputs(argv[j], fp) == EOF) {\n"
3951 "            perror(\"fputs\");\n"
3952 "            exit(EXIT_FAILURE);\n"
3953 "        }\n"
3954
3955 #. type: Plain text
3956 #: build/C/man3/fopencookie.3:415
3957 #, no-wrap
3958 msgid "    /* Read two bytes out of every five, until EOF */\n"
3959 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3960
3961 #. type: Plain text
3962 #: build/C/man3/fopencookie.3:430
3963 #, no-wrap
3964 msgid ""
3965 "    for (p = 0; ; p += 5) {\n"
3966 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3967 "            perror(\"fseek\");\n"
3968 "            exit(EXIT_FAILURE);\n"
3969 "        }\n"
3970 "        nread = fread(buf, 1, 2, fp);\n"
3971 "        if (nread == -1) {\n"
3972 "            perror(\"fread\");\n"
3973 "            exit(EXIT_FAILURE);\n"
3974 "        }\n"
3975 "        if (nread == 0) {\n"
3976 "            printf(\"Reached end of file\\en\");\n"
3977 "            break;\n"
3978 "        }\n"
3979 msgstr ""
3980 "    for (p = 0; ; p += 5) {\n"
3981 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3982 "            perror(\"fseek\");\n"
3983 "            exit(EXIT_FAILURE);\n"
3984 "        }\n"
3985 "        nread = fread(buf, 1, 2, fp);\n"
3986 "        if (nread == -1) {\n"
3987 "            perror(\"fread\");\n"
3988 "            exit(EXIT_FAILURE);\n"
3989 "        }\n"
3990 "        if (nread == 0) {\n"
3991 "            printf(\"Reached end of file\\en\");\n"
3992 "            break;\n"
3993 "        }\n"
3994
3995 #. type: Plain text
3996 #: build/C/man3/fopencookie.3:433
3997 #, no-wrap
3998 msgid ""
3999 "        printf(\"/%.*s/\\en\", nread, buf);\n"
4000 "    }\n"
4001 msgstr ""
4002 "        printf(\"/%.*s/\\en\", nread, buf);\n"
4003 "    }\n"
4004
4005 #. type: Plain text
4006 #: build/C/man3/fopencookie.3:436 build/C/man2/open_by_handle_at.2:574
4007 #: build/C/man2/open_by_handle_at.2:714 build/C/man2/readlink.2:312
4008 #, no-wrap
4009 msgid ""
4010 "    exit(EXIT_SUCCESS);\n"
4011 "}\n"
4012 msgstr ""
4013 "    exit(EXIT_SUCCESS);\n"
4014 "}\n"
4015
4016 #. type: Plain text
4017 #: build/C/man3/fopencookie.3:442
4018 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
4019 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
4020
4021 #. type: TH
4022 #: build/C/man3/fpurge.3:25
4023 #, no-wrap
4024 msgid "FPURGE"
4025 msgstr "FPURGE"
4026
4027 #. type: TH
4028 #: build/C/man3/fpurge.3:25
4029 #, no-wrap
4030 msgid "2001-12-15"
4031 msgstr "2001-12-15"
4032
4033 #. type: Plain text
4034 #: build/C/man3/fpurge.3:28
4035 msgid "fpurge, __fpurge - purge a stream"
4036 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
4037
4038 #. type: Plain text
4039 #: build/C/man3/fpurge.3:32
4040 #, no-wrap
4041 msgid ""
4042 "/* unsupported */\n"
4043 "B<#include E<lt>stdio.hE<gt>>\n"
4044 msgstr ""
4045 "/* unsupported */\n"
4046 "B<#include E<lt>stdio.hE<gt>>\n"
4047
4048 #. type: Plain text
4049 #: build/C/man3/fpurge.3:34
4050 #, no-wrap
4051 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
4052 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
4053
4054 #. type: Plain text
4055 #: build/C/man3/fpurge.3:37
4056 #, no-wrap
4057 msgid ""
4058 "/* supported */\n"
4059 "B<#include E<lt>stdio.hE<gt>>\n"
4060 msgstr ""
4061 "/* supported */\n"
4062 "B<#include E<lt>stdio.hE<gt>>\n"
4063
4064 #. type: Plain text
4065 #: build/C/man3/fpurge.3:39
4066 #, no-wrap
4067 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
4068 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
4069
4070 #. type: Plain text
4071 #: build/C/man3/fpurge.3:41
4072 #, no-wrap
4073 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
4074 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
4075
4076 #. type: Plain text
4077 #: build/C/man3/fpurge.3:54
4078 msgid ""
4079 "The function B<fpurge>()  clears the buffers of the given stream.  For "
4080 "output streams this discards any unwritten output.  For input streams this "
4081 "discards any input read from the underlying object but not yet obtained via "
4082 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
4083 "B<fflush>(3)."
4084 msgstr ""
4085 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
4086 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
4087 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
4088 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
4089 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
4090
4091 #. type: Plain text
4092 #: build/C/man3/fpurge.3:58
4093 msgid ""
4094 "The function B<__fpurge>()  does precisely the same, but without returning a "
4095 "value."
4096 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
4097
4098 #. type: Plain text
4099 #: build/C/man3/fpurge.3:65
4100 msgid ""
4101 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
4102 "and sets I<errno> appropriately."
4103 msgstr ""
4104 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
4105 "を適切な値に設定する。"
4106
4107 #. type: Plain text
4108 #: build/C/man3/fpurge.3:70
4109 msgid "I<stream> is not an open stream."
4110 msgstr "I<stream> がオープンされていない。"
4111
4112 #. type: Plain text
4113 #: build/C/man3/fpurge.3:78
4114 msgid ""
4115 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
4116 "was introduced in 4.4BSD and is not available under Linux.  The function "
4117 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
4118 "later."
4119 msgstr ""
4120 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
4121 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
4122 "され、glibc 2.1.95 以降には存在している。"
4123
4124 #. type: Plain text
4125 #: build/C/man3/fpurge.3:80
4126 msgid "Usually it is a mistake to want to discard input buffers."
4127 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
4128
4129 #.  .BR fclean (3),
4130 #. type: Plain text
4131 #: build/C/man3/fpurge.3:85
4132 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
4133 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
4134
4135 #. type: TH
4136 #: build/C/man3/fputwc.3:16
4137 #, no-wrap
4138 msgid "FPUTWC"
4139 msgstr "FPUTWC"
4140
4141 #. type: Plain text
4142 #: build/C/man3/fputwc.3:19
4143 msgid "fputwc, putwc - write a wide character to a FILE stream"
4144 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
4145
4146 #. type: Plain text
4147 #: build/C/man3/fputwc.3:27
4148 #, no-wrap
4149 msgid ""
4150 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4151 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4152 msgstr ""
4153 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4154 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
4155
4156 #. type: Plain text
4157 #: build/C/man3/fputwc.3:43
4158 msgid ""
4159 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
4160 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
4161 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
4162 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
4163 "it returns I<wc>."
4164 msgstr ""
4165 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
4166 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
4167 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
4168 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
4169 "関数は I<wc> を返す。"
4170
4171 #. type: Plain text
4172 #: build/C/man3/fputwc.3:51
4173 msgid ""
4174 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
4175 "may be implemented as a macro, and may evaluate its argument more than "
4176 "once.  There is no reason ever to use it."
4177 msgstr ""
4178 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
4179 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
4180 "ない。この関数を使う理由はもはや存在しない。"
4181
4182 #. type: Plain text
4183 #: build/C/man3/fputwc.3:63
4184 msgid ""
4185 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
4186 "indicate an error.  In the event of an error, I<errno> is set to indicate "
4187 "the cause."
4188 msgstr ""
4189 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
4190 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
4191
4192 #. type: Plain text
4193 #: build/C/man3/fputwc.3:68
4194 msgid "Conversion of I<wc> to the stream's encoding fails."
4195 msgstr "I<wc> からストリームの符号への変換に失敗した。"
4196
4197 #. type: Plain text
4198 #: build/C/man3/fputwc.3:77
4199 msgid ""
4200 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
4201 "current locale."
4202 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
4203
4204 #. type: Plain text
4205 #: build/C/man3/fputwc.3:85
4206 msgid ""
4207 "In the absence of additional information passed to the B<fopen>(3)  call, it "
4208 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4209 "sequence corresponding to the wide character I<wc>."
4210 msgstr ""
4211 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4212 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4213 "よい。"
4214
4215 #. type: Plain text
4216 #: build/C/man3/fputwc.3:89
4217 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4218 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4219
4220 #. type: TH
4221 #: build/C/man3/fread.3:45
4222 #, no-wrap
4223 msgid "FREAD"
4224 msgstr "FREAD"
4225
4226 #. type: TH
4227 #: build/C/man3/fread.3:45
4228 #, no-wrap
4229 msgid "2012-03-30"
4230 msgstr "2012-03-30"
4231
4232 #. type: Plain text
4233 #: build/C/man3/fread.3:48
4234 msgid "fread, fwrite - binary stream input/output"
4235 msgstr "fread, fwrite - バイナリストリームの入出力"
4236
4237 #. type: Plain text
4238 #: build/C/man3/fread.3:54
4239 #, no-wrap
4240 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4241 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4242
4243 #. type: Plain text
4244 #: build/C/man3/fread.3:57
4245 #, no-wrap
4246 msgid ""
4247 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4248 "B<              FILE *>I<stream>B<);>\n"
4249 msgstr ""
4250 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4251 "B<              FILE *>I<stream>B<);>\n"
4252
4253 #. type: Plain text
4254 #: build/C/man3/fread.3:69
4255 msgid ""
4256 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4257 "long, from the stream pointed to by I<stream>, storing them at the location "
4258 "given by I<ptr>."
4259 msgstr ""
4260 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4261 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4262 "I<size> バイトの長さを持つ。"
4263
4264 #. type: Plain text
4265 #: build/C/man3/fread.3:80
4266 msgid ""
4267 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4268 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4269 "location given by I<ptr>."
4270 msgstr ""
4271 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4272 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4273 "バイトの長さを持つ。"
4274
4275 #. type: Plain text
4276 #: build/C/man3/fread.3:96
4277 msgid ""
4278 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4279 "or written.  This number equals the number of bytes transferred only when "
4280 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4281 "return value is a short item count (or zero)."
4282 msgstr ""
4283 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4284 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4285 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4286 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4287
4288 #. type: Plain text
4289 #: build/C/man3/fread.3:103
4290 msgid ""
4291 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4292 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4293 msgstr ""
4294 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4295 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4296 "らない。"
4297
4298 #. type: Plain text
4299 #: build/C/man3/fread.3:105
4300 msgid "C89, POSIX.1-2001."
4301 msgstr "C89, POSIX.1-2001."
4302
4303 #. type: Plain text
4304 #: build/C/man3/fread.3:111
4305 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4306 msgstr ""
4307 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4308
4309 #. type: TH
4310 #: build/C/man3/fseek.3:42
4311 #, no-wrap
4312 msgid "FSEEK"
4313 msgstr "FSEEK"
4314
4315 #. type: TH
4316 #: build/C/man3/fseek.3:42
4317 #, no-wrap
4318 msgid "2014-04-02"
4319 msgstr "2014-04-02"
4320
4321 #. type: Plain text
4322 #: build/C/man3/fseek.3:45
4323 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4324 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4325
4326 #. type: Plain text
4327 #: build/C/man3/fseek.3:49
4328 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4329 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4330
4331 #. type: Plain text
4332 #: build/C/man3/fseek.3:51
4333 msgid "B<long ftell(FILE *>I<stream>B<);>"
4334 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4335
4336 #. type: Plain text
4337 #: build/C/man3/fseek.3:53
4338 msgid "B<void rewind(FILE *>I<stream>B<);>"
4339 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4340
4341 #. type: Plain text
4342 #: build/C/man3/fseek.3:55
4343 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4344 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4345
4346 #. type: Plain text
4347 #: build/C/man3/fseek.3:57
4348 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4349 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4350
4351 #. type: Plain text
4352 #: build/C/man3/fseek.3:81
4353 msgid ""
4354 "The B<fseek>()  function sets the file position indicator for the stream "
4355 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4356 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4357 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4358 "relative to the start of the file, the current position indicator, or end-of-"
4359 "file, respectively.  A successful call to the B<fseek>()  function clears "
4360 "the end-of-file indicator for the stream and undoes any effects of the "
4361 "B<ungetc>(3)  function on the same stream."
4362 msgstr ""
4363 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4364 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4365 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4366 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4367 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4368 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4369 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4370 "かったことになる。"
4371
4372 #. type: Plain text
4373 #: build/C/man3/fseek.3:87
4374 msgid ""
4375 "The B<ftell>()  function obtains the current value of the file position "
4376 "indicator for the stream pointed to by I<stream>."
4377 msgstr ""
4378 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4379 "置表示子 の現時点での値を与える。"
4380
4381 #. type: Plain text
4382 #: build/C/man3/fseek.3:94
4383 msgid ""
4384 "The B<rewind>()  function sets the file position indicator for the stream "
4385 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4386 msgstr ""
4387 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4388 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4389
4390 #. type: Plain text
4391 #: build/C/man3/fseek.3:97
4392 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4393 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4394
4395 #. type: Plain text
4396 #: build/C/man3/fseek.3:101
4397 msgid ""
4398 "except that the error indicator for the stream is also cleared (see "
4399 "B<clearerr>(3))."
4400 msgstr ""
4401 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4402 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4403
4404 #. type: Plain text
4405 #: build/C/man3/fseek.3:121
4406 msgid ""
4407 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4408 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4409 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4410 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4411 "I<fpos_t> object may be a complex object and these routines may be the only "
4412 "way to portably reposition a text stream."
4413 msgstr ""
4414 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4415 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4416 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4417 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4418 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4419 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4420 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4421
4422 #. type: Plain text
4423 #: build/C/man3/fseek.3:136
4424 msgid ""
4425 "The B<rewind>()  function returns no value.  Upon successful completion, "
4426 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4427 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4428 "indicate the error."
4429 msgstr ""
4430 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4431 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4432 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4433
4434 #. type: Plain text
4435 #: build/C/man3/fseek.3:142
4436 msgid "The I<stream> specified is not a seekable stream."
4437 msgstr "指定した I<stream> がシークできない。"
4438
4439 #. type: Plain text
4440 #: build/C/man3/fseek.3:154
4441 msgid ""
4442 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4443 "B<SEEK_CUR>.  Or: the resulting file offset would be negative."
4444 msgstr ""
4445 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4446 "B<SEEK_CUR> 以外の値であった。 または、更新後のファイルオフセットが負になって"
4447 "しまう。"
4448
4449 #. type: Plain text
4450 #: build/C/man3/fseek.3:169
4451 msgid ""
4452 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4453 "also fail and set I<errno> for any of the errors specified for the routines "
4454 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4455 msgstr ""
4456 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4457 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4458 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4459
4460 #. type: Plain text
4461 #: build/C/man3/fseek.3:174
4462 msgid "B<lseek>(2), B<fseeko>(3)"
4463 msgstr "B<lseek>(2), B<fseeko>(3)"
4464
4465 #. type: TH
4466 #: build/C/man3/fseeko.3:25
4467 #, no-wrap
4468 msgid "FSEEKO"
4469 msgstr "FSEEKO"
4470
4471 #. type: TH
4472 #: build/C/man3/fseeko.3:25
4473 #, no-wrap
4474 msgid "2014-03-20"
4475 msgstr "2014-03-20"
4476
4477 #. type: Plain text
4478 #: build/C/man3/fseeko.3:28
4479 msgid "fseeko, ftello - seek to or report file position"
4480 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4481
4482 #. type: Plain text
4483 #: build/C/man3/fseeko.3:33
4484 #, no-wrap
4485 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4486 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4487
4488 #. type: Plain text
4489 #: build/C/man3/fseeko.3:36
4490 #, no-wrap
4491 msgid ""
4492 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4493 "\n"
4494 msgstr ""
4495 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4496 "\n"
4497
4498 #. type: Plain text
4499 #: build/C/man3/fseeko.3:45
4500 msgid "B<fseeko>(), B<ftello>():"
4501 msgstr "B<fseeko>(), B<ftello>():"
4502
4503 #. type: Plain text
4504 #: build/C/man3/fseeko.3:50
4505 msgid ""
4506 "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || "
4507 "_XOPEN_SOURCE\\ E<gt>=\\ 600"
4508 msgstr ""
4509 "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || "
4510 "_XOPEN_SOURCE\\ E<gt>=\\ 600"
4511
4512 #. type: Plain text
4513 #: build/C/man3/fseeko.3:52
4514 msgid "(defining the obsolete _LARGEFILE_SOURCE macro also works)"
4515 msgstr "(廃止予定のマクロ _LARGEFILE_SOURCE を指定しても動作する)"
4516
4517 #. type: Plain text
4518 #: build/C/man3/fseeko.3:75
4519 msgid ""
4520 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4521 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4522 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4523 "I<off_t> instead of I<long>."
4524 msgstr ""
4525 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4526 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4527 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4528 "I<off_t> になっている。"
4529
4530 #. type: Plain text
4531 #: build/C/man3/fseeko.3:82
4532 msgid ""
4533 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4534 "compilation with"
4535 msgstr ""
4536 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4537
4538 #. type: Plain text
4539 #: build/C/man3/fseeko.3:86 build/C/man3/lseek64.3:81
4540 #, no-wrap
4541 msgid "#define _FILE_OFFSET_BITS 64\n"
4542 msgstr "#define _FILE_OFFSET_BITS 64\n"
4543
4544 #. type: Plain text
4545 #: build/C/man3/fseeko.3:92
4546 msgid "will turn I<off_t> into a 64-bit type."
4547 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4548
4549 #. type: Plain text
4550 #: build/C/man3/fseeko.3:101
4551 msgid ""
4552 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4553 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4554 "indicate the error."
4555 msgstr ""
4556 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4557 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4558
4559 #. type: Plain text
4560 #: build/C/man3/fseeko.3:104
4561 msgid "See the ERRORS in B<fseek>(3)."
4562 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4563
4564 #. type: Plain text
4565 #: build/C/man3/fseeko.3:106
4566 msgid "SUSv2, POSIX.1-2001."
4567 msgstr "SUSv2, POSIX.1-2001."
4568
4569 #. type: Plain text
4570 #: build/C/man3/fseeko.3:110
4571 msgid ""
4572 "These functions are found on System V-like systems.  They are not present in "
4573 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4574 msgstr ""
4575 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4576 "かったが、 glibc 2.1 から使えるようになった。"
4577
4578 #. type: Plain text
4579 #: build/C/man3/fseeko.3:112
4580 msgid "B<fseek>(3)"
4581 msgstr "B<fseek>(3)"
4582
4583 #. type: TH
4584 #: build/C/man3/getline.3:26
4585 #, no-wrap
4586 msgid "GETLINE"
4587 msgstr "GETLINE"
4588
4589 #. type: Plain text
4590 #: build/C/man3/getline.3:29
4591 msgid "getline, getdelim - delimited string input"
4592 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4593
4594 #. type: Plain text
4595 #: build/C/man3/getline.3:34
4596 #, no-wrap
4597 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4598 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4599
4600 #. type: Plain text
4601 #: build/C/man3/getline.3:37
4602 #, no-wrap
4603 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4604 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4605
4606 #. type: Plain text
4607 #: build/C/man3/getline.3:47
4608 msgid "B<getline>(), B<getdelim>():"
4609 msgstr "B<getline>(), B<getdelim>():"
4610
4611 #. type: Plain text
4612 #: build/C/man3/getline.3:52
4613 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4614 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4615
4616 #. type: Plain text
4617 #: build/C/man3/getline.3:65
4618 msgid ""
4619 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4620 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4621 "terminated and includes the newline character, if one was found."
4622 msgstr ""
4623 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4624 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4625 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4626
4627 #. type: Plain text
4628 #: build/C/man3/getline.3:77
4629 msgid ""
4630 "If I<*lineptr> is set to NULL and I<*n> is set 0 before the call, then "
4631 "B<getline>()  will allocate a buffer for storing the line.  This buffer "
4632 "should be freed by the user program even if B<getline>()  failed."
4633 msgstr ""
4634 "I<*lineptr> が NULL にセットされ、 I<*n> が呼び出し前に 0 にセットされた場"
4635 "合、 B<getline>()  は行の内容を格納するためのバッファを確保する。 このバッ"
4636 "ファは、 B<getline>() が失敗した場合であっても、ユーザーのプログラムで解放す"
4637 "べきである。"
4638
4639 #. type: Plain text
4640 #: build/C/man3/getline.3:95
4641 msgid ""
4642 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4643 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4644 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4645 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4646 msgstr ""
4647 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4648 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4649 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4650 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4651 "I<*n> を更新する。"
4652
4653 #. type: Plain text
4654 #: build/C/man3/getline.3:101
4655 msgid ""
4656 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4657 "to reflect the buffer address and allocated size respectively."
4658 msgstr ""
4659 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4660 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4661
4662 #. type: Plain text
4663 #: build/C/man3/getline.3:112
4664 msgid ""
4665 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4666 "than newline can be specified as the I<delimiter> argument.  As with "
4667 "B<getline>(), a delimiter character is not added if one was not present in "
4668 "the input before end of file was reached."
4669 msgstr ""
4670 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4671 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4672 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4673 "ファに追加しない。"
4674
4675 #. type: Plain text
4676 #: build/C/man3/getline.3:121
4677 msgid ""
4678 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4679 "read, including the delimiter character, but not including the terminating "
4680 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4681 "bytes in the line read."
4682 msgstr ""
4683 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4684 "字数には区切り文字は含まれるが、終端に使うヌルバイト (\\(aq\\e0\\(aq) は含ま"
4685 "れない。 この値によって、読み込んだ行に含まれるヌルバイトを操作することができ"
4686 "る。"
4687
4688 #. type: Plain text
4689 #: build/C/man3/getline.3:127
4690 msgid ""
4691 "Both functions return -1 on failure to read a line (including end-of-file "
4692 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4693 msgstr ""
4694 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4695 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4696 "を示す値が設定される。"
4697
4698 #. type: Plain text
4699 #: build/C/man3/getline.3:137
4700 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4701 msgstr ""
4702 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4703 "I<stream> が有効でない)。"
4704
4705 #. type: Plain text
4706 #: build/C/man3/getline.3:139
4707 msgid "These functions are available since libc 4.6.27."
4708 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4709
4710 #. type: Plain text
4711 #: build/C/man3/getline.3:146
4712 msgid ""
4713 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4714 "were standardized in POSIX.1-2008."
4715 msgstr ""
4716 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4717 "POSIX.1-2008 で標準化された。"
4718
4719 #. type: Plain text
4720 #: build/C/man3/getline.3:151
4721 #, no-wrap
4722 msgid ""
4723 "#define _GNU_SOURCE\n"
4724 "#include E<lt>stdio.hE<gt>\n"
4725 "#include E<lt>stdlib.hE<gt>\n"
4726 msgstr ""
4727 "#define _GNU_SOURCE\n"
4728 "#include E<lt>stdio.hE<gt>\n"
4729 "#include E<lt>stdlib.hE<gt>\n"
4730
4731 #. type: Plain text
4732 #: build/C/man3/getline.3:159
4733 #, no-wrap
4734 msgid ""
4735 "int\n"
4736 "main(void)\n"
4737 "{\n"
4738 "    FILE *fp;\n"
4739 "    char *line = NULL;\n"
4740 "    size_t len = 0;\n"
4741 "    ssize_t read;\n"
4742 msgstr ""
4743 "int\n"
4744 "main(void)\n"
4745 "{\n"
4746 "    FILE *fp;\n"
4747 "    char *line = NULL;\n"
4748 "    size_t len = 0;\n"
4749 "    ssize_t read;\n"
4750
4751 #. type: Plain text
4752 #: build/C/man3/getline.3:163
4753 #, no-wrap
4754 msgid ""
4755 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4756 "    if (fp == NULL)\n"
4757 "        exit(EXIT_FAILURE);\n"
4758 msgstr ""
4759 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4760 "    if (fp == NULL)\n"
4761 "        exit(EXIT_FAILURE);\n"
4762
4763 #. type: Plain text
4764 #: build/C/man3/getline.3:168
4765 #, no-wrap
4766 msgid ""
4767 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4768 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4769 "        printf(\"%s\", line);\n"
4770 "    }\n"
4771 msgstr ""
4772 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4773 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4774 "        printf(\"%s\", line);\n"
4775 "    }\n"
4776
4777 #. type: Plain text
4778 #: build/C/man3/getline.3:172
4779 #, no-wrap
4780 msgid ""
4781 "    free(line);\n"
4782 "    exit(EXIT_SUCCESS);\n"
4783 "}\n"
4784 msgstr ""
4785 "    free(line);\n"
4786 "    exit(EXIT_SUCCESS);\n"
4787 "}\n"
4788
4789 #. type: Plain text
4790 #: build/C/man3/getline.3:179
4791 msgid "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
4792 msgstr "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
4793
4794 #. type: TH
4795 #: build/C/man3/gets.3:29
4796 #, no-wrap
4797 msgid "GETS"
4798 msgstr "GETS"
4799
4800 #. type: TH
4801 #: build/C/man3/gets.3:29
4802 #, no-wrap
4803 msgid "2014-01-24"
4804 msgstr "2014-01-24"
4805
4806 #. type: Plain text
4807 #: build/C/man3/gets.3:32
4808 msgid "gets - get a string from standard input (DEPRECATED)"
4809 msgstr "gets - 標準入力からの文字列を取得する (非推奨)"
4810
4811 #. type: Plain text
4812 #: build/C/man3/gets.3:37
4813 #, no-wrap
4814 msgid "B<char *gets(char *>I<s>B<);>\n"
4815 msgstr "B<char *gets(char *>I<s>B<);>\n"
4816
4817 #. type: Plain text
4818 #: build/C/man3/gets.3:40
4819 msgid "I<Never use this function>."
4820 msgstr "I<この関数は使用しないこと>。"
4821
4822 #. type: Plain text
4823 #: build/C/man3/gets.3:50
4824 msgid ""
4825 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4826 "until either a terminating newline or B<EOF>, which it replaces with a null "
4827 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4828 "below)."
4829 msgstr ""
4830 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4831 "すバッファに格納する (末尾の改行文字や B<EOF> はヌルバイト (\\(aq\\e0\\(aq) "
4832 "に置き換えられる)。 バッファオーバーランのチェックは行われない (下記の「バ"
4833 "グ」を参照)。"
4834
4835 #. type: Plain text
4836 #: build/C/man3/gets.3:58
4837 msgid ""
4838 "B<gets>()  returns I<s> on success, and NULL on error or when end of file "
4839 "occurs while no characters have been read.  However, given the lack of "
4840 "buffer overrun checking, there can be no guarantees that the function will "
4841 "even return."
4842 msgstr ""
4843 "B<gets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのに"
4844 "ファイルの終わりになった 場合に NULL を返す。 しかし、バッファの行き過ぎの"
4845 "チェックが行われないため、この関数が返るという保証はない。"
4846
4847 #. type: Plain text
4848 #: build/C/man3/gets.3:72
4849 msgid ""
4850 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4851 "C11 removes the specification of B<gets>()  from the C language, and since "
4852 "version 2.16, glibc header files don't expose the function declaration if "
4853 "the B<_ISOC11_SOURCE> feature test macro is defined."
4854 msgstr ""
4855 "LSB は B<gets>() を非推奨としている。\n"
4856 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4857 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4858 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4859 "た\n"
4860 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4861
4862 #. type: Plain text
4863 #: build/C/man3/gets.3:86
4864 msgid ""
4865 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4866 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4867 "()  will continue to store characters past the end of the buffer, it is "
4868 "extremely dangerous to use.  It has been used to break computer security.  "
4869 "Use B<fgets>()  instead."
4870 msgstr ""
4871 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4872 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4873 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4874 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4875 "と。"
4876
4877 #. type: Plain text
4878 #: build/C/man3/gets.3:90
4879 msgid ""
4880 "For more information, see CWE-242 (aka \"Use of Inherently Dangerous Function"
4881 "\") at http://cwe.mitre.org/data/definitions/242.html"
4882 msgstr ""
4883 "詳しい情報については、CWE-242 (別名 \"Use of Inherently Dangerous Function"
4884 "\" (「本質的に危険な関数を使う」)) を参照。 http://cwe.mitre.org/data/"
4885 "definitions/242.html で参照できる。"
4886
4887 #. type: Plain text
4888 #: build/C/man3/gets.3:108
4889 msgid ""
4890 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), B<fgetwc>"
4891 "(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), "
4892 "B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>"
4893 "(3), B<feature_test_macros>(7)"
4894 msgstr ""
4895 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), B<fgetwc>"
4896 "(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), "
4897 "B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>"
4898 "(3), B<feature_test_macros>(7)"
4899
4900 #. type: TH
4901 #: build/C/man3/getw.3:25
4902 #, no-wrap
4903 msgid "GETW"
4904 msgstr "GETW"
4905
4906 #. type: TH
4907 #: build/C/man3/getw.3:25
4908 #, no-wrap
4909 msgid "2010-09-26"
4910 msgstr "2010-09-26"
4911
4912 #. type: Plain text
4913 #: build/C/man3/getw.3:28
4914 msgid "getw, putw - input and output of words (ints)"
4915 msgstr "getw, putw - ワード(int)の入出力"
4916
4917 #. type: Plain text
4918 #: build/C/man3/getw.3:33
4919 #, no-wrap
4920 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4921 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4922
4923 #. type: Plain text
4924 #: build/C/man3/getw.3:35
4925 #, no-wrap
4926 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4927 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4928
4929 #. type: Plain text
4930 #: build/C/man3/getw.3:44
4931 msgid "B<getw>(), B<putw>():"
4932 msgstr "B<getw>(), B<putw>():"
4933
4934 #. type: TP
4935 #: build/C/man3/getw.3:47
4936 #, no-wrap
4937 msgid "Since glibc 2.3.3:"
4938 msgstr "glibc 2.3.3 以降:"
4939
4940 #. type: Plain text
4941 #: build/C/man3/getw.3:50
4942 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4943 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4944
4945 #. type: Plain text
4946 #: build/C/man3/getw.3:53
4947 #, no-wrap
4948 msgid ""
4949 "(_XOPEN_SOURCE &&\n"
4950 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4951 msgstr ""
4952 "(_XOPEN_SOURCE &&\n"
4953 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4954
4955 #. type: TP
4956 #: build/C/man3/getw.3:53
4957 #, no-wrap
4958 msgid "Before glibc 2.3.3:"
4959 msgstr "glibc 2.3.3 より前:"
4960
4961 #. type: Plain text
4962 #: build/C/man3/getw.3:56
4963 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4964 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4965
4966 #. type: Plain text
4967 #: build/C/man3/getw.3:66
4968 msgid ""
4969 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4970 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4971 msgstr ""
4972 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4973 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4974 "ことを勧める。"
4975
4976 #. type: Plain text
4977 #: build/C/man3/getw.3:73
4978 msgid ""
4979 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4980 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4981 "instead."
4982 msgstr ""
4983 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4984 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4985 "使用することを勧める。"
4986
4987 #. type: Plain text
4988 #: build/C/man3/getw.3:80
4989 msgid ""
4990 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4991 "error, they return B<EOF>."
4992 msgstr ""
4993 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4994 "が発生した場合、これらの関数は B<EOF> を返す。"
4995
4996 #. type: Plain text
4997 #: build/C/man3/getw.3:83
4998 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4999 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
5000
5001 #. type: Plain text
5002 #: build/C/man3/getw.3:87
5003 msgid ""
5004 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
5005 "can be used to distinguish between the two cases."
5006 msgstr ""
5007 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
5008 "(3)  を用いると、この二つの場合を区別することが出来る。"
5009
5010 #. type: Plain text
5011 #: build/C/man3/getw.3:93
5012 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
5013 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
5014
5015 #. type: TH
5016 #: build/C/man2/link.2:32
5017 #, no-wrap
5018 msgid "LINK"
5019 msgstr "LINK"
5020
5021 #. type: TH
5022 #: build/C/man2/link.2:32 build/C/man3/wprintf.3:16
5023 #, no-wrap
5024 msgid "2014-03-19"
5025 msgstr "2014-03-19"
5026
5027 #. type: Plain text
5028 #: build/C/man2/link.2:35
5029 msgid "link, linkat - make a new name for a file"
5030 msgstr "link, linkat - ファイルの新しい名前を作成する"
5031
5032 #. type: Plain text
5033 #: build/C/man2/link.2:38 build/C/man2/pipe.2:42 build/C/man2/read.2:41
5034 #: build/C/man2/readlink.2:50 build/C/man2/symlink.2:39
5035 #: build/C/man2/unlink.2:39
5036 #, no-wrap
5037 msgid "B<#include E<lt>unistd.hE<gt>>\n"
5038 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
5039
5040 #. type: Plain text
5041 #: build/C/man2/link.2:40
5042 #, no-wrap
5043 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
5044 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
5045
5046 #. type: Plain text
5047 #: build/C/man2/link.2:43 build/C/man2/readlink.2:56 build/C/man2/symlink.2:44
5048 #: build/C/man2/unlink.2:44
5049 #, no-wrap
5050 msgid ""
5051 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
5052 "B<#include E<lt>unistd.hE<gt>>\n"
5053 msgstr ""
5054 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
5055 "B<#include E<lt>unistd.hE<gt>>\n"
5056
5057 #. type: Plain text
5058 #: build/C/man2/link.2:46
5059 #, no-wrap
5060 msgid ""
5061 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
5062 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
5063 msgstr ""
5064 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
5065 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
5066
5067 #. type: Plain text
5068 #: build/C/man2/link.2:54
5069 msgid "B<linkat>():"
5070 msgstr "B<linkat>():"
5071
5072 #. type: Plain text
5073 #: build/C/man2/link.2:63 build/C/man2/open.2:85 build/C/man2/readlink.2:83
5074 #: build/C/man2/rename.2:64 build/C/man2/symlink.2:71 build/C/man2/unlink.2:63
5075 msgid "_ATFILE_SOURCE"
5076 msgstr "_ATFILE_SOURCE"
5077
5078 #. type: Plain text
5079 #: build/C/man2/link.2:69
5080 msgid ""
5081 "B<link>()  creates a new link (also known as a hard link) to an existing "
5082 "file."
5083 msgstr ""
5084 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
5085 "link) ともいう) を作成する。"
5086
5087 #. type: Plain text
5088 #: build/C/man2/link.2:75
5089 msgid "If I<newpath> exists, it will I<not> be overwritten."
5090 msgstr "I<newpath> が存在する場合には、上書きはI<されない>。"
5091
5092 #. type: Plain text
5093 #: build/C/man2/link.2:80
5094 msgid ""
5095 "This new name may be used exactly as the old one for any operation; both "
5096 "names refer to the same file (and so have the same permissions and "
5097 "ownership) and it is impossible to tell which name was the \"original\"."
5098 msgstr ""
5099 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
5100 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
5101 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
5102
5103 #. type: SS
5104 #: build/C/man2/link.2:80
5105 #, no-wrap
5106 msgid "linkat()"
5107 msgstr "linkat()"
5108
5109 #. type: Plain text
5110 #: build/C/man2/link.2:86
5111 msgid ""
5112 "The B<linkat>()  system call operates in exactly the same way as B<link>(), "
5113 "except for the differences described here."
5114 msgstr ""
5115 "B<linkat>() システムコールは B<link>() と全く同様に動作するが、以下で説明する"
5116 "点が異なる。"
5117
5118 #. type: Plain text
5119 #: build/C/man2/link.2:96
5120 msgid ""
5121 "If the pathname given in I<oldpath> is relative, then it is interpreted "
5122 "relative to the directory referred to by the file descriptor I<olddirfd> "
5123 "(rather than relative to the current working directory of the calling "
5124 "process, as is done by B<link>()  for a relative pathname)."
5125 msgstr ""
5126 "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリ"
5127 "プター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される "
5128 "(B<link>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
5129 "ワーキングディレクトリに対する相対パスではない)。"
5130
5131 #. type: Plain text
5132 #: build/C/man2/link.2:108
5133 msgid ""
5134 "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, "
5135 "then I<oldpath> is interpreted relative to the current working directory of "
5136 "the calling process (like B<link>())."
5137 msgstr ""
5138 "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 "
5139 "B<AT_FDCWD> の場合、 (B<link>(2) と同様に) I<oldpath> は呼び出したプロセスの"
5140 "カレントワーキングディレクトリに対する相対パスと解釈される。"
5141
5142 #. type: Plain text
5143 #: build/C/man2/link.2:114 build/C/man2/rename.2:153
5144 msgid "If I<oldpath> is absolute, then I<olddirfd> is ignored."
5145 msgstr ""
5146 "I<oldpath> で指定されたパス名が絶対パスの場合、 I<olddirfd> は無視される。"
5147
5148 #. type: Plain text
5149 #: build/C/man2/link.2:122 build/C/man2/rename.2:161
5150 msgid ""
5151 "The interpretation of I<newpath> is as for I<oldpath>, except that a "
5152 "relative pathname is interpreted relative to the directory referred to by "
5153 "the file descriptor I<newdirfd>."
5154 msgstr ""
5155 "I<newpath> の解釈は I<oldpath> と同じである。 相対パスのパス名がファイルディ"
5156 "スクリプター I<newdirfd> が参照するディレクトリと解釈される点だけが異なる。"
5157
5158 #. type: Plain text
5159 #: build/C/man2/link.2:125
5160 msgid "The following values can be bitwise ORed in I<flags>:"
5161 msgstr "以下の値のビット単位の論理和を I<flags> に指定できる。"
5162
5163 #. type: TP
5164 #: build/C/man2/link.2:125
5165 #, no-wrap
5166 msgid "B<AT_EMPTY_PATH> (since Linux 2.6.39)"
5167 msgstr "B<AT_EMPTY_PATH> (Linux 2.6.39 以降)"
5168
5169 #.  commit 11a7b371b64ef39fc5fb1b6f2218eef7c4d035e3
5170 #.  Before glibc 2.16, defining _ATFILE_SOURCE sufficed
5171 #. type: Plain text
5172 #: build/C/man2/link.2:152
5173 msgid ""
5174 "If I<oldpath> is an empty string, create a link to the file referenced by "
5175 "I<olddirfd> (which may have been obtained using the B<open>(2)  B<O_PATH> "
5176 "flag).  In this case, I<olddirfd> must refer to a file other than a "
5177 "directory.  The caller must have the B<CAP_DAC_READ_SEARCH> capability in "
5178 "order to use this flag; this prevents arbitrary users from creating hard "
5179 "links using file descriptors received via a UNIX domain socket (see the "
5180 "discussion of B<SCM_RIGHTS> in B<unix>(7)).  This flag is Linux-specific; "
5181 "define B<_GNU_SOURCE> to obtain its definition."
5182 msgstr ""
5183 "I<oldpath> が空文字列の場合、 I<olddirfd> が参照するファイルへのリンクを作成"
5184 "する (I<olddirfd> は B<open>(2) の B<O_PATH> フラグを使って取得する)。 この場"
5185 "合、 I<olddirfd> はディレクトリではなくファイルを参照していなければならな"
5186 "い。 このフラグを使用するためには、 呼び出し元は B<CAP_DAC_READ_SEARCH> ケー"
5187 "パビリティを持っていなければならない。 これにより、 任意のユーザーが UNIX ド"
5188 "メインソケット経由で受信したファイルディスクリプターを使ってハードリンクを作"
5189 "成することがないようになっている (B<unix>(7) の B<SCM_RIGHTS> の議論を参"
5190 "照)。 このフラグは Linux 固有で、 この定義を得るには B<_GNU_SOURCE> を定義す"
5191 "ること。"
5192
5193 #. type: TP
5194 #: build/C/man2/link.2:152
5195 #, no-wrap
5196 msgid "B<AT_SYMLINK_FOLLOW> (since Linux 2.6.18)"
5197 msgstr "B<AT_SYMLINK_FOLLOW> (Linux 2.6.18 以降)"
5198
5199 #. type: Plain text
5200 #: build/C/man2/link.2:167
5201 msgid ""
5202 "By default, B<linkat>(), does not dereference I<oldpath> if it is a symbolic "
5203 "link (like B<link>()).  The flag B<AT_SYMLINK_FOLLOW> can be specified in "
5204 "I<flags> to cause I<oldpath> to be dereferenced if it is a symbolic link."
5205 msgstr ""
5206 "B<linkat>() は (B<link>() 同様) デフォルトでは I<oldpath> がシンボリックリン"
5207 "クの場合リンクの展開を行わない。 フラグ B<AT_SYMLINK_FOLLOW> を I<flags> に指"
5208 "定することができ、指定した場合 I<oldpath> がシンボリックリンクの場合リンクの"
5209 "展開が行われる。"
5210
5211 #. type: Plain text
5212 #: build/C/man2/link.2:171
5213 msgid ""
5214 "Before kernel 2.6.18, the I<flags> argument was unused, and had to be "
5215 "specified as 0."
5216 msgstr ""
5217 "カーネル 2.6.18 より前では、 I<flags> 引き数は未使用で、 0 を指定しなければな"
5218 "らなかった。"
5219
5220 #. type: Plain text
5221 #: build/C/man2/link.2:176
5222 msgid "See B<openat>(2)  for an explanation of the need for B<linkat>()."
5223 msgstr "B<linkat>() の必要性についての説明については B<openat>(2) を参照。"
5224
5225 #. type: Plain text
5226 #: build/C/man2/link.2:181 build/C/man2/pipe.2:134 build/C/man3/remove.3:65
5227 #: build/C/man2/rename.2:171 build/C/man2/rmdir.2:45
5228 #: build/C/man2/symlink.2:145 build/C/man2/unlink.2:158
5229 msgid ""
5230 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5231 "appropriately."
5232 msgstr ""
5233 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
5234 "定される。"
5235
5236 #. type: TP
5237 #: build/C/man2/link.2:182 build/C/man2/open.2:788 build/C/man2/readlink.2:160
5238 #: build/C/man2/rename.2:172 build/C/man2/rmdir.2:46
5239 #: build/C/man2/symlink.2:146 build/C/man3/tmpfile.3:57
5240 #: build/C/man2/unlink.2:159
5241 #, no-wrap
5242 msgid "B<EACCES>"
5243 msgstr "B<EACCES>"
5244
5245 #. type: Plain text
5246 #: build/C/man2/link.2:193
5247 msgid ""
5248 "Write access to the directory containing I<newpath> is denied, or search "
5249 "permission is denied for one of the directories in the path prefix of "
5250 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
5251 msgstr ""
5252 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
5253 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
5254 "(B<path_resolution>(7)  を参照)。"
5255
5256 #. type: TP
5257 #: build/C/man2/link.2:193 build/C/man2/open.2:797 build/C/man2/rename.2:208
5258 #: build/C/man2/symlink.2:155 build/C/man2/write.2:135
5259 #, no-wrap
5260 msgid "B<EDQUOT>"
5261 msgstr "B<EDQUOT>"
5262
5263 #. type: Plain text
5264 #: build/C/man2/link.2:196 build/C/man2/rename.2:211
5265 msgid "The user's quota of disk blocks on the filesystem has been exhausted."
5266 msgstr ""
5267 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
5268
5269 #. type: TP
5270 #: build/C/man2/link.2:196 build/C/man2/open.2:803 build/C/man2/symlink.2:160
5271 #: build/C/man3/tmpfile.3:60
5272 #, no-wrap
5273 msgid "B<EEXIST>"
5274 msgstr "B<EEXIST>"
5275
5276 #. type: Plain text
5277 #: build/C/man2/link.2:200
5278 msgid "I<newpath> already exists."
5279 msgstr "I<newpath> が既に存在する。"
5280
5281 #. type: TP
5282 #: build/C/man2/link.2:200 build/C/man2/llseek.2:74 build/C/man2/open.2:809
5283 #: build/C/man2/open_by_handle_at.2:266 build/C/man2/open_by_handle_at.2:321
5284 #: build/C/man2/pipe.2:135 build/C/man2/read.2:118 build/C/man2/readlink.2:165
5285 #: build/C/man2/rename.2:211 build/C/man2/rmdir.2:64
5286 #: build/C/man2/symlink.2:164 build/C/man2/unlink.2:178
5287 #: build/C/man2/write.2:141
5288 #, no-wrap
5289 msgid "B<EFAULT>"
5290 msgstr "B<EFAULT>"
5291
5292 #. type: Plain text
5293 #: build/C/man2/link.2:203 build/C/man2/rename.2:214
5294 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5295 msgstr ""
5296 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5297
5298 #. type: TP
5299 #: build/C/man2/link.2:203 build/C/man2/read.2:147 build/C/man2/readlink.2:181
5300 #: build/C/man2/symlink.2:167 build/C/man2/unlink.2:182
5301 #: build/C/man2/write.2:165
5302 #, no-wrap
5303 msgid "B<EIO>"
5304 msgstr "B<EIO>"
5305
5306 #. type: Plain text
5307 #: build/C/man2/link.2:206 build/C/man2/symlink.2:170
5308 #: build/C/man2/unlink.2:185
5309 msgid "An I/O error occurred."
5310 msgstr "I/O エラーが発生した。"
5311
5312 #. type: TP
5313 #: build/C/man2/link.2:206 build/C/man2/open.2:870 build/C/man2/open.2:874
5314 #: build/C/man2/open_by_handle_at.2:331 build/C/man2/readlink.2:184
5315 #: build/C/man2/rename.2:224 build/C/man2/rmdir.2:73
5316 #: build/C/man2/symlink.2:170 build/C/man2/unlink.2:190
5317 #, no-wrap
5318 msgid "B<ELOOP>"
5319 msgstr "B<ELOOP>"
5320
5321 #. type: Plain text
5322 #: build/C/man2/link.2:210 build/C/man2/rename.2:228
5323 msgid ""
5324 "Too many symbolic links were encountered in resolving I<oldpath> or "
5325 "I<newpath>."
5326 msgstr ""
5327 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5328 "る。"
5329
5330 #. type: TP
5331 #: build/C/man2/link.2:210 build/C/man2/rename.2:228
5332 #, no-wrap
5333 msgid "B<EMLINK>"
5334 msgstr "B<EMLINK>"
5335
5336 #. type: Plain text
5337 #: build/C/man2/link.2:215
5338 msgid ""
5339 "The file referred to by I<oldpath> already has the maximum number of links "
5340 "to it."
5341 msgstr ""
5342 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5343
5344 #. type: TP
5345 #: build/C/man2/link.2:215 build/C/man2/open.2:886 build/C/man2/readlink.2:187
5346 #: build/C/man2/rename.2:235 build/C/man2/rmdir.2:77
5347 #: build/C/man2/symlink.2:174 build/C/man2/unlink.2:194
5348 #, no-wrap
5349 msgid "B<ENAMETOOLONG>"
5350 msgstr "B<ENAMETOOLONG>"
5351
5352 #. type: Plain text
5353 #: build/C/man2/link.2:218 build/C/man2/rename.2:238
5354 msgid "I<oldpath> or I<newpath> was too long."
5355 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5356
5357 #. type: TP
5358 #: build/C/man2/link.2:218 build/C/man2/link.2:275 build/C/man2/link.2:283
5359 #: build/C/man2/open.2:900 build/C/man2/open.2:907
5360 #: build/C/man2/open_by_handle_at.2:282 build/C/man2/readlink.2:190
5361 #: build/C/man2/rename.2:238 build/C/man2/rmdir.2:80
5362 #: build/C/man2/symlink.2:177 build/C/man2/unlink.2:197
5363 #, no-wrap
5364 msgid "B<ENOENT>"
5365 msgstr "B<ENOENT>"
5366
5367 #. type: Plain text
5368 #: build/C/man2/link.2:223
5369 msgid ""
5370 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5371 "dangling symbolic link."
5372 msgstr ""
5373 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5374 "(dangling)シンボリックリンクである。"
5375
5376 #. type: TP
5377 #: build/C/man2/link.2:223 build/C/man2/open.2:921 build/C/man2/readlink.2:193
5378 #: build/C/man2/rename.2:251 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5379 #: build/C/man2/symlink.2:184 build/C/man3/tempnam.3:102
5380 #: build/C/man2/unlink.2:204
5381 #, no-wrap
5382 msgid "B<ENOMEM>"
5383 msgstr "B<ENOMEM>"
5384
5385 #. type: Plain text
5386 #: build/C/man2/link.2:226 build/C/man2/open.2:924 build/C/man2/readlink.2:196
5387 #: build/C/man2/rename.2:254 build/C/man2/rmdir.2:88
5388 #: build/C/man2/symlink.2:187 build/C/man2/unlink.2:207
5389 msgid "Insufficient kernel memory was available."
5390 msgstr "十分なカーネルメモリーがない。"
5391
5392 #. type: TP
5393 #: build/C/man2/link.2:226 build/C/man2/open.2:924 build/C/man2/rename.2:254
5394 #: build/C/man2/symlink.2:187 build/C/man3/tmpfile.3:72
5395 #: build/C/man2/write.2:168
5396 #, no-wrap
5397 msgid "B<ENOSPC>"
5398 msgstr "B<ENOSPC>"
5399
5400 #. type: Plain text
5401 #: build/C/man2/link.2:230 build/C/man2/rename.2:258
5402 #: build/C/man2/symlink.2:191
5403 msgid "The device containing the file has no room for the new directory entry."
5404 msgstr ""
5405 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5406 "空きがない。"
5407
5408 #. type: TP
5409 #: build/C/man2/link.2:230 build/C/man2/link.2:293 build/C/man2/open.2:930
5410 #: build/C/man2/open.2:1001 build/C/man2/open_by_handle_at.2:289
5411 #: build/C/man2/readlink.2:196 build/C/man2/readlink.2:206
5412 #: build/C/man2/rename.2:258 build/C/man2/rename.2:316 build/C/man2/rmdir.2:88
5413 #: build/C/man2/symlink.2:191 build/C/man2/symlink.2:212
5414 #: build/C/man2/unlink.2:207 build/C/man2/unlink.2:263
5415 #, no-wrap
5416 msgid "B<ENOTDIR>"
5417 msgstr "B<ENOTDIR>"
5418
5419 #. type: Plain text
5420 #: build/C/man2/link.2:235
5421 msgid ""
5422 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5423 "a directory."
5424 msgstr ""
5425 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5426 "い。"
5427
5428 #. type: TP
5429 #: build/C/man2/link.2:235 build/C/man2/link.2:239 build/C/man2/link.2:303
5430 #: build/C/man2/open.2:969 build/C/man2/open_by_handle_at.2:338
5431 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5432 #: build/C/man2/symlink.2:196 build/C/man2/unlink.2:212
5433 #, no-wrap
5434 msgid "B<EPERM>"
5435 msgstr "B<EPERM>"
5436
5437 #. type: Plain text
5438 #: build/C/man2/link.2:239
5439 msgid "I<oldpath> is a directory."
5440 msgstr "I<oldpath> がディレクトリである。"
5441
5442 #. type: Plain text
5443 #: build/C/man2/link.2:244
5444 msgid ""
5445 "The filesystem containing I<oldpath> and I<newpath> does not support the "
5446 "creation of hard links."
5447 msgstr ""
5448 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5449 "していない。"
5450
5451 #. type: TP
5452 #: build/C/man2/link.2:244
5453 #, no-wrap
5454 msgid "B<EPERM> (since Linux 3.6)"
5455 msgstr "B<EPERM> (Linux 3.6 以降)"
5456
5457 #. type: Plain text
5458 #: build/C/man2/link.2:251
5459 msgid ""
5460 "The caller does not have permission to create a hard link to this file (see "
5461 "the description of I</proc/sys/fs/protected_hardlinks> in B<proc>(5))."
5462 msgstr ""
5463 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5464 "の I</proc/sys/fs/protected_hardlinks> の説明を参照)。"
5465
5466 #. type: TP
5467 #: build/C/man2/link.2:251 build/C/man2/open.2:977 build/C/man2/rename.2:296
5468 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:201
5469 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:235
5470 #, no-wrap
5471 msgid "B<EROFS>"
5472 msgstr "B<EROFS>"
5473
5474 #. type: Plain text
5475 #: build/C/man2/link.2:254 build/C/man2/rename.2:299
5476 msgid "The file is on a read-only filesystem."
5477 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5478
5479 #. type: TP
5480 #: build/C/man2/link.2:254 build/C/man2/rename.2:299
5481 #, no-wrap
5482 msgid "B<EXDEV>"
5483 msgstr "B<EXDEV>"
5484
5485 #. type: Plain text
5486 #: build/C/man2/link.2:262
5487 msgid ""
5488 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
5489 "permits a filesystem to be mounted at multiple points, but B<link>()  does "
5490 "not work across different mount points, even if the same filesystem is "
5491 "mounted on both.)"
5492 msgstr ""
5493 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5494 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5495 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5496 "のマウント位置を跨いでは動作しない。)"
5497
5498 #. type: Plain text
5499 #: build/C/man2/link.2:265
5500 msgid "The following additional errors can occur for B<linkat>():"
5501 msgstr "B<linkat>() では以下のエラーも発生する。"
5502
5503 #. type: Plain text
5504 #: build/C/man2/link.2:271 build/C/man2/rename.2:316
5505 msgid "I<olddirfd> or I<newdirfd> is not a valid file descriptor."
5506 msgstr "I<olddirfd> か I<newdirfd> が有効なファイルディスクリプタでない。"
5507
5508 #. type: Plain text
5509 #: build/C/man2/link.2:275 build/C/man2/unlink.2:256
5510 msgid "An invalid flag value was specified in I<flags>."
5511 msgstr "無効なフラグ値が I<flags> に指定された。"
5512
5513 #. type: Plain text
5514 #: build/C/man2/link.2:283
5515 msgid ""
5516 "B<AT_EMPTY_PATH> was specified in I<flags>, but the caller did not have the "
5517 "B<CAP_DAC_READ_SEARCH> capability."
5518 msgstr ""
5519 "B<AT_EMPTY_PATH> が I<flags> に指定されたが、呼び出し元が "
5520 "B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなかった。"
5521
5522 #. type: Plain text
5523 #: build/C/man2/link.2:288
5524 msgid ""
5525 "An attempt was made to link to the I</proc/self/fd/NN> file corresponding to "
5526 "a file descriptor created with"
5527 msgstr ""
5528 "以下の呼び出しで作成されたファイルディスクリプターに対応する I</proc/self/fd/"
5529 "NN> ファイルに対してリンクを行おおうとした。"
5530
5531 #. type: Plain text
5532 #: build/C/man2/link.2:290
5533 #, no-wrap
5534 msgid "    open(path, O_TMPFILE | O_EXCL, mode);\n"
5535 msgstr "    open(path, O_TMPFILE | O_EXCL, mode);\n"
5536
5537 #. type: Plain text
5538 #: build/C/man2/link.2:293
5539 msgid "See B<open>(2)."
5540 msgstr "B<open>(2) 参照。"
5541
5542 #. type: Plain text
5543 #: build/C/man2/link.2:303 build/C/man2/rename.2:326
5544 msgid ""
5545 "I<oldpath> is relative and I<olddirfd> is a file descriptor referring to a "
5546 "file other than a directory; or similar for I<newpath> and I<newdirfd>"
5547 msgstr ""
5548 "I<oldpath> が相対パスで、 I<olddirfd> がディレクトリ以外のファイルを参照して"
5549 "いる。または I<newpath> と I<newdirfd> に関して同じ状況である。"
5550
5551 #. type: Plain text
5552 #: build/C/man2/link.2:312
5553 msgid ""
5554 "B<AT_EMPTY_PATH> was specified in I<flags>, I<oldpath> is an empty string, "
5555 "and I<olddirfd> refers to a directory."
5556 msgstr ""
5557 "I<flags> に B<AT_EMPTY_PATH> が指定され、 I<oldpath> が空文字列で、 "
5558 "I<olddirfd> がディレクトリを参照している。"
5559
5560 #. type: Plain text
5561 #: build/C/man2/link.2:316
5562 msgid ""
5563 "B<linkat>()  was added to Linux in kernel 2.6.16; library support was added "
5564 "to glibc in version 2.4."
5565 msgstr ""
5566 "B<linkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポー"
5567 "トはバージョン 2.4 で glibc に追加された。"
5568
5569 #.  SVr4 documents additional ENOLINK and
5570 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5571 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5572 #. type: Plain text
5573 #: build/C/man2/link.2:322
5574 msgid "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES), POSIX.1-2008."
5575 msgstr ""
5576 "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照), POSIX.1-2008."
5577
5578 #. type: Plain text
5579 #: build/C/man2/link.2:325
5580 msgid "B<linkat>(): POSIX.1-2008."
5581 msgstr "B<linkat>(): POSIX.1-2008."
5582
5583 #. type: Plain text
5584 #: build/C/man2/link.2:332
5585 msgid ""
5586 "Hard links, as created by B<link>(), cannot span filesystems.  Use B<symlink>"
5587 "(2)  if this is required."
5588 msgstr ""
5589 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5590 "このような場合は B<symlink>(2)  を使用すること。"
5591
5592 #.  more precisely: since kernel 1.3.56
5593 #.  For example, the default Solaris compilation environment
5594 #.  behaves like Linux, and contributors to a March 2005
5595 #.  thread in the Austin mailing list reported that some
5596 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5597 #. type: Plain text
5598 #: build/C/man2/link.2:363
5599 msgid ""
5600 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5601 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5602 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5603 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5604 "the same file that I<oldpath> refers to).  Some other implementations behave "
5605 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5606 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5607 "dereferenced if it is a symbolic link.  For precise control over the "
5608 "treatment of symbolic links when creating a link, use B<linkat>(2)."
5609 msgstr ""
5610 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5611 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5612 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5613 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5614 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5615 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5616 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5617 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5618 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御を行う場合"
5619 "には B<linkat>(2) を使用すること。"
5620
5621 #. type: Plain text
5622 #: build/C/man2/link.2:369
5623 msgid ""
5624 "On NFS filesystems, the return code may be wrong in case the NFS server "
5625 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5626 "to find out if the link got created."
5627 msgstr ""
5628 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5629 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5630 "ためには B<stat>(2)  を使用すること。"
5631
5632 #. type: Plain text
5633 #: build/C/man2/link.2:378
5634 msgid ""
5635 "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), "
5636 "B<path_resolution>(7), B<symlink>(7)"
5637 msgstr ""
5638 "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), "
5639 "B<path_resolution>(7), B<symlink>(7)"
5640
5641 #. type: TH
5642 #: build/C/man2/llseek.2:28
5643 #, no-wrap
5644 msgid "LLSEEK"
5645 msgstr "LLSEEK"
5646
5647 #. type: TH
5648 #: build/C/man2/llseek.2:28
5649 #, no-wrap
5650 msgid "2012-07-13"
5651 msgstr "2012-07-13"
5652
5653 #. type: Plain text
5654 #: build/C/man2/llseek.2:31
5655 msgid "_llseek - reposition read/write file offset"
5656 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5657
5658 #. type: Plain text
5659 #: build/C/man2/llseek.2:35
5660 #, no-wrap
5661 msgid ""
5662 "B<#include E<lt>sys/types.hE<gt>>\n"
5663 "B<#include E<lt>unistd.hE<gt>>\n"
5664 msgstr ""
5665 "B<#include E<lt>sys/types.hE<gt>>\n"
5666 "B<#include E<lt>unistd.hE<gt>>\n"
5667
5668 #. type: Plain text
5669 #: build/C/man2/llseek.2:39
5670 #, no-wrap
5671 msgid ""
5672 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5673 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5674 "B<            unsigned int >I<whence>B<);>\n"
5675 msgstr ""
5676 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5677 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5678 "B<            unsigned int >I<whence>B<);>\n"
5679
5680 #. type: Plain text
5681 #: build/C/man2/llseek.2:43
5682 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5683 msgstr ""
5684 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5685 "を参照。"
5686
5687 #. type: Plain text
5688 #: build/C/man2/llseek.2:62
5689 msgid ""
5690 "The B<_llseek>()  function repositions the offset of the open file "
5691 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5692 "offset_low> bytes relative to the beginning of the file, the current "
5693 "position in the file, or the end of the file, depending on whether I<whence> "
5694 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5695 "resulting file position in the argument I<result>."
5696 msgstr ""
5697 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5698 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5699 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5700 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5701 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5702 "のファイル位置を I<result> 引き数に返す。"
5703
5704 #. type: Plain text
5705 #: build/C/man2/llseek.2:69
5706 msgid ""
5707 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5708 "-1 is returned and I<errno> is set to indicate the error."
5709 msgstr ""
5710 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5711 "エラーを示す I<errno> が設定される。"
5712
5713 #. type: Plain text
5714 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:192
5715 msgid "I<fd> is not an open file descriptor."
5716 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5717
5718 #. type: Plain text
5719 #: build/C/man2/llseek.2:77
5720 msgid "Problem with copying results to user space."
5721 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5722
5723 #. type: Plain text
5724 #: build/C/man2/llseek.2:81
5725 msgid "I<whence> is invalid."
5726 msgstr "I<whence> が不正である。"
5727
5728 #. type: Plain text
5729 #: build/C/man2/llseek.2:84
5730 msgid ""
5731 "This function is Linux-specific, and should not be used in programs intended "
5732 "to be portable."
5733 msgstr ""
5734 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5735
5736 #. type: Plain text
5737 #: build/C/man2/llseek.2:87
5738 msgid ""
5739 "Glibc does not provide a wrapper for this system call; call it using "
5740 "B<syscall>(2)."
5741 msgstr ""
5742 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5743 "(2)  を使って呼び出すこと。"
5744
5745 #. type: Plain text
5746 #: build/C/man2/llseek.2:90
5747 msgid "B<lseek>(2), B<lseek64>(3)"
5748 msgstr "B<lseek>(2), B<lseek64>(3)"
5749
5750 #. type: TH
5751 #: build/C/man2/lseek.2:47
5752 #, no-wrap
5753 msgid "LSEEK"
5754 msgstr "LSEEK"
5755
5756 #. type: TH
5757 #: build/C/man2/lseek.2:47
5758 #, no-wrap
5759 msgid "2014-01-22"
5760 msgstr "2014-01-22"
5761
5762 #. type: Plain text
5763 #: build/C/man2/lseek.2:50
5764 msgid "lseek - reposition read/write file offset"
5765 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5766
5767 #. type: Plain text
5768 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5769 msgid "B<#include E<lt>sys/types.hE<gt>>"
5770 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5771
5772 #. type: Plain text
5773 #: build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34 build/C/man2/rmdir.2:35
5774 #: build/C/man2/write.2:44
5775 msgid "B<#include E<lt>unistd.hE<gt>>"
5776 msgstr "B<#include E<lt>unistd.hE<gt>>"
5777
5778 #. type: Plain text
5779 #: build/C/man2/lseek.2:56
5780 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5781 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5782
5783 #. type: Plain text
5784 #: build/C/man2/lseek.2:67
5785 msgid ""
5786 "The B<lseek>()  function repositions the offset of the open file associated "
5787 "with the file descriptor I<fd> to the argument I<offset> according to the "
5788 "directive I<whence> as follows:"
5789 msgstr ""
5790 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5791 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5792 "へ以下のように変更する:"
5793
5794 #. type: Plain text
5795 #: build/C/man2/lseek.2:72
5796 msgid "The offset is set to I<offset> bytes."
5797 msgstr "オフセットは I<offset> バイトに設定される。"
5798
5799 #. type: Plain text
5800 #: build/C/man2/lseek.2:77
5801 msgid "The offset is set to its current location plus I<offset> bytes."
5802 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5803
5804 #. type: Plain text
5805 #: build/C/man2/lseek.2:82
5806 msgid "The offset is set to the size of the file plus I<offset> bytes."
5807 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5808
5809 #. type: Plain text
5810 #: build/C/man2/lseek.2:90
5811 msgid ""
5812 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5813 "the file (but this does not change the size of the file).  If data is later "
5814 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5815 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5816 "gap."
5817 msgstr ""
5818 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5819 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5820 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5821 "実際にそこにデータを書き込まれるまではヌルバイト (\\(aq\\e0\\(aq) の列が返さ"
5822 "れる。"
5823
5824 #. type: SS
5825 #: build/C/man2/lseek.2:90
5826 #, no-wrap
5827 msgid "Seeking file data and holes"
5828 msgstr "ファイルのデータとホールの探索"
5829
5830 #. type: Plain text
5831 #: build/C/man2/lseek.2:93
5832 msgid ""
5833 "Since version 3.1, Linux supports the following additional values for "
5834 "I<whence>:"
5835 msgstr ""
5836 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5837
5838 #. type: TP
5839 #: build/C/man2/lseek.2:93
5840 #, no-wrap
5841 msgid "B<SEEK_DATA>"
5842 msgstr "B<SEEK_DATA>"
5843
5844 #. type: Plain text
5845 #: build/C/man2/lseek.2:104
5846 msgid ""
5847 "Adjust the file offset to the next location in the file greater than or "
5848 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5849 "file offset is set to I<offset>."
5850 msgstr ""
5851 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5852 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5853 "定される。"
5854
5855 #. type: TP
5856 #: build/C/man2/lseek.2:104
5857 #, no-wrap
5858 msgid "B<SEEK_HOLE>"
5859 msgstr "B<SEEK_HOLE>"
5860
5861 #. type: Plain text
5862 #: build/C/man2/lseek.2:118
5863 msgid ""
5864 "Adjust the file offset to the next hole in the file greater than or equal to "
5865 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5866 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5867 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5868 "hole at the end of any file)."
5869 msgstr ""
5870 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5871 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5872 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5873 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5874 "だ)。"
5875
5876 #. type: Plain text
5877 #: build/C/man2/lseek.2:124
5878 msgid ""
5879 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5880 "end of the file."
5881 msgstr ""
5882 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5883 "B<lseek>() は失敗する。"
5884
5885 #. type: Plain text
5886 #: build/C/man2/lseek.2:130
5887 msgid ""
5888 "These operations allow applications to map holes in a sparsely allocated "
5889 "file.  This can be useful for applications such as file backup tools, which "
5890 "can save space when creating backups and preserve holes, if they have a "
5891 "mechanism for discovering holes."
5892 msgstr ""
5893 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5894 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5895 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5896 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5897 "約し、ホールを保持することができる。"
5898
5899 #.  https://lkml.org/lkml/2011/4/22/79
5900 #.  http://lwn.net/Articles/440255/
5901 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5902 #. type: Plain text
5903 #: build/C/man2/lseek.2:153
5904 msgid ""
5905 "For the purposes of these operations, a hole is a sequence of zeros that "
5906 "(normally) has not been allocated in the underlying file storage.  However, "
5907 "a filesystem is not obliged to report holes, so these operations are not a "
5908 "guaranteed mechanism for mapping the storage space actually allocated to a "
5909 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5910 "the underlying storage may not be reported as a hole.)  In the simplest "
5911 "implementation, a filesystem can support the operations by making "
5912 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5913 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5914 "by I<offset> is a hole, it can be considered to consist of data that is a "
5915 "sequence of zeros)."
5916 msgstr ""
5917 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5918 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5919 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5920 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5921 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5922 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5923 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5924 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5925 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5926 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5927 "ということである)。"
5928
5929 #. type: Plain text
5930 #: build/C/man2/lseek.2:162
5931 msgid ""
5932 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5933 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5934 msgstr ""
5935 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5936 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5937
5938 #. type: Plain text
5939 #: build/C/man2/lseek.2:168
5940 msgid ""
5941 "The B<SEEK_HOLE> and B<SEEK_DATA> operations are supported for the following "
5942 "filesystems:"
5943 msgstr ""
5944 "B<SEEK_HOLE>, B<SEEK_DATA> 操作に対応しているのは以下のファイルシステムであ"
5945 "る。"
5946
5947 #. type: Plain text
5948 #: build/C/man2/lseek.2:170
5949 msgid "Btrfs (since Linux 3.1)"
5950 msgstr "Btrfs (Linux 3.1 以降)"
5951
5952 #.  commit 93862d5e1ab875664c6cc95254fc365028a48bb1
5953 #. type: Plain text
5954 #: build/C/man2/lseek.2:173
5955 msgid "OCFS (since Linux 3.2)"
5956 msgstr "OCFS (Linux 3.2 以降)"
5957
5958 #. type: Plain text
5959 #: build/C/man2/lseek.2:175
5960 msgid "XFS (since Linux 3.5)"
5961 msgstr "XFS (Linux 3.5 以降)"
5962
5963 #. type: Plain text
5964 #: build/C/man2/lseek.2:177
5965 msgid "ext4 (since Linux 3.8)"
5966 msgstr "ext4 (Linux 3.8 以降)"
5967
5968 #. type: Plain text
5969 #: build/C/man2/lseek.2:179
5970 msgid "tmpfs (since Linux 3.8)"
5971 msgstr "tmpfs (Linux 3.8 以降)"
5972
5973 #. type: Plain text
5974 #: build/C/man2/lseek.2:187
5975 msgid ""
5976 "Upon successful completion, B<lseek>()  returns the resulting offset "
5977 "location as measured in bytes from the beginning of the file.  On error, the "
5978 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5979 msgstr ""
5980 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5981 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5982 "される。"
5983
5984 #.  Some systems may allow negative offsets for character devices
5985 #.  and/or for remote filesystems.
5986 #. type: Plain text
5987 #: build/C/man2/lseek.2:200
5988 msgid ""
5989 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5990 "beyond the end of a seekable device."
5991 msgstr ""
5992 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5993 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5994
5995 #. type: TP
5996 #: build/C/man2/lseek.2:200 build/C/man2/open.2:949
5997 #: build/C/man2/open_by_handle_at.2:304
5998 #, no-wrap
5999 msgid "B<EOVERFLOW>"
6000 msgstr "B<EOVERFLOW>"
6001
6002 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
6003 #. type: Plain text
6004 #: build/C/man2/lseek.2:205
6005 msgid "The resulting file offset cannot be represented in an I<off_t>."
6006 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
6007
6008 #. type: TP
6009 #: build/C/man2/lseek.2:205
6010 #, no-wrap
6011 msgid "B<ESPIPE>"
6012 msgstr "B<ESPIPE>"
6013
6014 #. type: Plain text
6015 #: build/C/man2/lseek.2:209
6016 msgid "I<fd> is associated with a pipe, socket, or FIFO."
6017 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
6018
6019 #. type: TP
6020 #: build/C/man2/lseek.2:209 build/C/man2/open.2:937
6021 #, no-wrap
6022 msgid "B<ENXIO>"
6023 msgstr "B<ENXIO>"
6024
6025 #. type: Plain text
6026 #: build/C/man2/lseek.2:217
6027 msgid ""
6028 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
6029 "beyond the end of the file."
6030 msgstr ""
6031 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
6032 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
6033
6034 #.  SVr4 documents additional error
6035 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
6036 #. type: Plain text
6037 #: build/C/man2/lseek.2:219 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
6038 #: build/C/man2/write.2:189
6039 msgid "SVr4, 4.3BSD, POSIX.1-2001."
6040 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
6041
6042 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
6043 #. type: Plain text
6044 #: build/C/man2/lseek.2:227
6045 msgid ""
6046 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
6047 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
6048 "next POSIX revision (Issue 8)."
6049 msgstr ""
6050 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
6051 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
6052 "る。"
6053
6054 #. type: Plain text
6055 #: build/C/man2/lseek.2:231
6056 msgid ""
6057 "Some devices are incapable of seeking and POSIX does not specify which "
6058 "devices must support B<lseek>()."
6059 msgstr ""
6060 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
6061 "に対応すべきかは規定していない。"
6062
6063 #.  Other systems return the number of written characters,
6064 #.  using SEEK_SET to set the counter. (Of written characters.)
6065 #. type: Plain text
6066 #: build/C/man2/lseek.2:238
6067 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
6068 msgstr ""
6069 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
6070 "る。"
6071
6072 #. type: Plain text
6073 #: build/C/man2/lseek.2:241
6074 msgid ""
6075 "When converting old code, substitute values for I<whence> with the following "
6076 "macros:"
6077 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
6078
6079 #. type: tbl table
6080 #: build/C/man2/lseek.2:244
6081 #, no-wrap
6082 msgid "old\tnew\n"
6083 msgstr "old \tnew\n"
6084
6085 #. type: tbl table
6086 #: build/C/man2/lseek.2:245
6087 #, no-wrap
6088 msgid "0\tSEEK_SET\n"
6089 msgstr "0\tSEEK_SET\n"
6090
6091 #. type: tbl table
6092 #: build/C/man2/lseek.2:246
6093 #, no-wrap
6094 msgid "1\tSEEK_CUR\n"
6095 msgstr "1\tSEEK_CUR\n"
6096
6097 #. type: tbl table
6098 #: build/C/man2/lseek.2:247
6099 #, no-wrap
6100 msgid "2\tSEEK_END\n"
6101 msgstr "2\tSEEK_END\n"
6102
6103 #. type: tbl table
6104 #: build/C/man2/lseek.2:248
6105 #, no-wrap
6106 msgid "L_SET\tSEEK_SET\n"
6107 msgstr "L_SET\tSEEK_SET\n"
6108
6109 #. type: tbl table
6110 #: build/C/man2/lseek.2:249
6111 #, no-wrap
6112 msgid "L_INCR\tSEEK_CUR\n"
6113 msgstr "L_INCR\tSEEK_CUR\n"
6114
6115 #. type: tbl table
6116 #: build/C/man2/lseek.2:250
6117 #, no-wrap
6118 msgid "L_XTND\tSEEK_END\n"
6119 msgstr "L_XTND\tSEEK_END\n"
6120
6121 #. type: Plain text
6122 #: build/C/man2/lseek.2:262
6123 msgid ""
6124 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
6125 "current file position pointer, so seeking on such files may be subject to "
6126 "race conditions."
6127 msgstr ""
6128 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
6129 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
6130 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
6131
6132 #. type: Plain text
6133 #: build/C/man2/lseek.2:269
6134 msgid ""
6135 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
6136 "B<posix_fallocate>(3)"
6137 msgstr ""
6138 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
6139 "B<posix_fallocate>(3)"
6140
6141 #. type: TH
6142 #: build/C/man3/lseek64.3:25
6143 #, no-wrap
6144 msgid "LSEEK64"
6145 msgstr "LSEEK64"
6146
6147 #. type: TH
6148 #: build/C/man3/lseek64.3:25
6149 #, no-wrap
6150 msgid "2013-08-19"
6151 msgstr "2013-08-19"
6152
6153 #. type: Plain text
6154 #: build/C/man3/lseek64.3:28
6155 msgid "lseek64 - reposition 64-bit read/write file offset"
6156 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
6157
6158 #. type: Plain text
6159 #: build/C/man3/lseek64.3:30
6160 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
6161 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
6162
6163 #. type: Plain text
6164 #: build/C/man3/lseek64.3:36
6165 msgid ""
6166 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
6167 msgstr ""
6168 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
6169
6170 #. type: Plain text
6171 #: build/C/man3/lseek64.3:53
6172 msgid ""
6173 "The B<lseek>(2)  family of functions reposition the offset of the open file "
6174 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
6175 "start, current position, or end of the file, when I<whence> has the value "
6176 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
6177 msgstr ""
6178 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
6179 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
6180 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
6181 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
6182
6183 #. type: Plain text
6184 #: build/C/man3/lseek64.3:56
6185 msgid "For more details, return value, and errors, see B<lseek>(2)."
6186 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
6187
6188 #. type: Plain text
6189 #: build/C/man3/lseek64.3:63
6190 msgid ""
6191 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
6192 "the raw system call B<_llseek>(2)."
6193 msgstr ""
6194 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
6195 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
6196
6197 #. type: SS
6198 #: build/C/man3/lseek64.3:63
6199 #, no-wrap
6200 msgid "lseek"
6201 msgstr "lseek"
6202
6203 #. type: Plain text
6204 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
6205 #: build/C/man3/lseek64.3:116
6206 msgid "Prototype:"
6207 msgstr "プロトタイプ:"
6208
6209 #. type: Plain text
6210 #: build/C/man3/lseek64.3:69
6211 #, no-wrap
6212 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
6213 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
6214
6215 #. type: Plain text
6216 #: build/C/man3/lseek64.3:77
6217 msgid ""
6218 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
6219 "architectures, unless one compiles with"
6220 msgstr ""
6221 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
6222 "ビット符号付き型である。 ただし、"
6223
6224 #. type: Plain text
6225 #: build/C/man3/lseek64.3:85
6226 msgid "in which case it is a 64-bit signed type."
6227 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
6228
6229 #. type: SS
6230 #: build/C/man3/lseek64.3:85
6231 #, no-wrap
6232 msgid "lseek64"
6233 msgstr "lseek64"
6234
6235 #. type: Plain text
6236 #: build/C/man3/lseek64.3:91
6237 #, no-wrap
6238 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
6239 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
6240
6241 #. type: Plain text
6242 #: build/C/man3/lseek64.3:102
6243 msgid ""
6244 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
6245 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
6246 "when one compiles with"
6247 msgstr ""
6248 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
6249 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
6250 "ルした場合にのみ使用可能である。"
6251
6252 #. type: Plain text
6253 #: build/C/man3/lseek64.3:106
6254 #, no-wrap
6255 msgid "#define _LARGEFILE64_SOURCE\n"
6256 msgstr "#define _LARGEFILE64_SOURCE\n"
6257
6258 #.  in glibc 2.0.94, not in 2.0.6
6259 #. type: Plain text
6260 #: build/C/man3/lseek64.3:114
6261 msgid ""
6262 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
6263 "be an alias for B<llseek>()."
6264 msgstr ""
6265 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
6266 "アスとして定義されている。"
6267
6268 #. type: SS
6269 #: build/C/man3/lseek64.3:114
6270 #, no-wrap
6271 msgid "llseek"
6272 msgstr "llseek"
6273
6274 #. type: Plain text
6275 #: build/C/man3/lseek64.3:120
6276 #, no-wrap
6277 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
6278 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
6279
6280 #.  in libc 5.0.9, not in 4.7.6
6281 #. type: Plain text
6282 #: build/C/man3/lseek64.3:139
6283 msgid ""
6284 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
6285 "()  is available in libc5 and glibc and works without special defines.  Its "
6286 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
6287 "provide a prototype.  This is bad, since a prototype is needed.  Users "
6288 "should add the above prototype, or something equivalent, to their own "
6289 "source.  When users complained about data loss caused by a miscompilation of "
6290 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
6291 msgstr ""
6292 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
6293 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
6294 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
6295 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
6296 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
6297 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
6298 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
6299
6300 #. type: Plain text
6301 #: build/C/man3/lseek64.3:142
6302 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
6303 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
6304
6305 #. type: Plain text
6306 #: build/C/man3/lseek64.3:146
6307 msgid ""
6308 "This makes this function unusable if one desires a warning-free compilation."
6309 msgstr ""
6310 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
6311
6312 #. type: SS
6313 #: build/C/man3/lseek64.3:146
6314 #, no-wrap
6315 msgid "_llseek"
6316 msgstr "_llseek"
6317
6318 #. type: Plain text
6319 #: build/C/man3/lseek64.3:149
6320 msgid ""
6321 "All the above functions are implemented in terms of this system call.  The "
6322 "prototype is:"
6323 msgstr ""
6324 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
6325 "下の通り:"
6326
6327 #. type: Plain text
6328 #: build/C/man3/lseek64.3:154
6329 #, no-wrap
6330 msgid ""
6331 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
6332 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
6333 msgstr ""
6334 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
6335 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
6336
6337 #. type: Plain text
6338 #: build/C/man3/lseek64.3:159
6339 msgid "For more details, see B<llseek>(2)."
6340 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
6341
6342 #. type: Plain text
6343 #: build/C/man3/lseek64.3:164
6344 msgid "The B<lseek64>()  function is thread-safe."
6345 msgstr "関数 B<lseek64>() はスレッドセーフである。"
6346
6347 #. type: Plain text
6348 #: build/C/man3/lseek64.3:167
6349 msgid "B<llseek>(2), B<lseek>(2)"
6350 msgstr "B<llseek>(2), B<lseek>(2)"
6351
6352 #. type: TH
6353 #: build/C/man2/open.2:51
6354 #, no-wrap
6355 msgid "OPEN"
6356 msgstr "OPEN"
6357
6358 #. type: TH
6359 #: build/C/man2/open.2:51
6360 #, no-wrap
6361 msgid "2014-04-20"
6362 msgstr "2014-04-20"
6363
6364 #. type: Plain text
6365 #: build/C/man2/open.2:54
6366 msgid "open, openat, creat - open and possibly create a file"
6367 msgstr "open, openat, creat - ファイルのオープン、作成を行う"
6368
6369 #. type: Plain text
6370 #: build/C/man2/open.2:59
6371 #, no-wrap
6372 msgid ""
6373 "B<#include E<lt>sys/types.hE<gt>>\n"
6374 "B<#include E<lt>sys/stat.hE<gt>>\n"
6375 "B<#include E<lt>fcntl.hE<gt>>\n"
6376 msgstr ""
6377 "B<#include E<lt>sys/types.hE<gt>>\n"
6378 "B<#include E<lt>sys/stat.hE<gt>>\n"
6379 "B<#include E<lt>fcntl.hE<gt>>\n"
6380
6381 #. type: Plain text
6382 #: build/C/man2/open.2:62
6383 #, no-wrap
6384 msgid ""
6385 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
6386 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6387 msgstr ""
6388 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
6389 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6390
6391 #. type: Plain text
6392 #: build/C/man2/open.2:64
6393 #, no-wrap
6394 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6395 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6396
6397 #. type: Plain text
6398 #: build/C/man2/open.2:68
6399 #, no-wrap
6400 msgid ""
6401 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
6402 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6403 msgstr ""
6404 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
6405 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
6406
6407 #. type: Plain text
6408 #: build/C/man2/open.2:76
6409 msgid "B<openat>():"
6410 msgstr "B<openat>():"
6411
6412 #. type: Plain text
6413 #: build/C/man2/open.2:98
6414 msgid ""
6415 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
6416 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
6417 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
6418 "by a successful call will be the lowest-numbered file descriptor not "
6419 "currently open for the process."
6420 msgstr ""
6421 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
6422 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
6423 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6424 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
6425 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
6426 "のものとなる。"
6427
6428 #. type: Plain text
6429 #: build/C/man2/open.2:110
6430 msgid ""
6431 "By default, the new file descriptor is set to remain open across an B<execve>"
6432 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
6433 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
6434 "to change this default).  The file offset is set to the beginning of the "
6435 "file (see B<lseek>(2))."
6436 msgstr ""
6437 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
6438 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6439 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
6440 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
6441 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6442
6443 #. type: Plain text
6444 #: build/C/man2/open.2:129
6445 msgid ""
6446 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6447 "system-wide table of open files.  This entry records the file offset and the "
6448 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
6449 "file descriptor is a reference to one of these entries; this reference is "
6450 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
6451 "different file.  The new open file description is initially not shared with "
6452 "any other process, but sharing may arise via B<fork>(2)."
6453 msgstr ""
6454 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6455 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6456 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6457 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6458 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6459 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6460 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6461 "が、 B<fork>(2)  で共有が起こる場合がある。"
6462
6463 #. type: Plain text
6464 #: build/C/man2/open.2:137
6465 msgid ""
6466 "The argument I<flags> must include one of the following I<access modes>: "
6467 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6468 "only, write-only, or read/write, respectively."
6469 msgstr ""
6470 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6471 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6472 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6473
6474 #.  SUSv4 divides the flags into:
6475 #.  * Access mode
6476 #.  * File creation
6477 #.  * File status
6478 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6479 #.  though it's not clear what the difference between "other" and
6480 #.  "File creation" flags is.  I raised an Aardvark to see if this
6481 #.  can be clarified in SUSv4; 10 Oct 2008.
6482 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6483 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6484 #.  are also categorized" as file status flags.
6485 #. type: Plain text
6486 #: build/C/man2/open.2:176
6487 msgid ""
6488 "In addition, zero or more file creation flags and file status flags can be "
6489 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6490 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6491 "B<O_TMPFILE>, B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are "
6492 "all of the remaining flags listed below.  The distinction between these two "
6493 "groups of flags is that the file status flags can be retrieved and (in some "
6494 "cases)  modified; see B<fcntl>(2)  for details."
6495 msgstr ""
6496 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6497 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6498 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6499 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TMPFILE>, "
6500 "B<O_TRUNC>, B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち"
6501 "上記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は"
6502 "その内容を取得したり (場合によっては) 変更したりできる点にある。詳細は "
6503 "B<fcntl>(2) を参照。"
6504
6505 #. type: Plain text
6506 #: build/C/man2/open.2:178
6507 msgid ""
6508 "The full list of file creation flags and file status flags is as follows:"
6509 msgstr "すべてのファイル作成フラグとファイル状態フラグを以下のリストに示す。"
6510
6511 #. type: TP
6512 #: build/C/man2/open.2:178
6513 #, no-wrap
6514 msgid "B<O_APPEND>"
6515 msgstr "B<O_APPEND>"
6516
6517 #.  For more background, see
6518 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6519 #.  http://nfs.sourceforge.net/
6520 #. type: Plain text
6521 #: build/C/man2/open.2:195
6522 msgid ""
6523 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6524 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6525 "may lead to corrupted files on NFS filesystems if more than one process "
6526 "appends data to a file at once.  This is because NFS does not support "
6527 "appending to a file, so the client kernel has to simulate it, which can't be "
6528 "done without a race condition."
6529 msgstr ""
6530 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6531 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6532 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6533 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6534 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6535 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6536 "とはできないからである。"
6537
6538 #. type: TP
6539 #: build/C/man2/open.2:195
6540 #, no-wrap
6541 msgid "B<O_ASYNC>"
6542 msgstr "B<O_ASYNC>"
6543
6544 #. type: Plain text
6545 #: build/C/man2/open.2:209
6546 msgid ""
6547 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6548 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6549 "this file descriptor.  This feature is available only for terminals, "
6550 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6551 "B<fcntl>(2)  for further details.  See also BUGS, below."
6552 msgstr ""
6553 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6554 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6555 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6556 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6557 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。 "
6558 "下記の「バグ」も参照。"
6559
6560 #. type: TP
6561 #: build/C/man2/open.2:209
6562 #, no-wrap
6563 msgid "B<O_CLOEXEC> (since Linux 2.6.23)"
6564 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6565
6566 #.  NOTE! several otehr man pages refer to this text
6567 #. type: Plain text
6568 #: build/C/man2/open.2:219
6569 msgid ""
6570 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6571 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6572 "operations to set the B<FD_CLOEXEC> flag."
6573 msgstr ""
6574 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6575 "フラグを指定することで、 プログラムは B<FD_CLOEXEC> フラグをセットするために "
6576 "B<fcntl>(2) B<F_SETFD> 操作を別途呼び出す必要がなくなる。"
6577
6578 #.  This flag fixes only one form of the race condition;
6579 #.  The race can also occur with, for example, descriptors
6580 #.  returned by accept(), pipe(), etc.
6581 #. type: Plain text
6582 #: build/C/man2/open.2:248
6583 msgid ""
6584 "Note that the use of this flag is essential in some multithreaded programs, "
6585 "because using a separate B<fcntl>(2)  B<F_SETFD> operation to set the "
6586 "B<FD_CLOEXEC> flag does not suffice to avoid race conditions where one "
6587 "thread opens a file descriptor and attempts to set its close-on-exec flag "
6588 "using B<fcntl>(2)  at the same time as another thread does a B<fork>(2)  "
6589 "plus B<execve>(2).  Depending on the order of execution, the race may lead "
6590 "to the file desriptor returned by B<open>()  being unintentionally leaked to "
6591 "the program executed by the child process created by B<fork>(2).  (This kind "
6592 "of race is in principle possible for any system call that creates a file "
6593 "descriptor whose close-on-exec flag should be set, and various other Linux "
6594 "system calls provide an equivalent of the B<O_CLOEXEC> flag to deal with "
6595 "this problem.)"
6596 msgstr ""
6597 "ある種のマルチスレッドのプログラムはこのフラグの使用は不可欠である点に注意す"
6598 "ること。 なぜなら、個別に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2) "
6599 "B<F_SETFD> 操作を呼び出したとしても、あるスレッドがファイルディスクリプタを "
6600 "オープンするのと同時に別のスレッドが B<fork>(2) と B<execve>(2) を実行すると"
6601 "いう競合条件を避けるのには十分ではないからである。 実行の順序に依存して、この"
6602 "競合条件の結果、 B<open>() が返したファイルディスクリプタが B<fork>(2) で作成"
6603 "された子プロセスにより実行されるプログラムに意図せず見えてしまう可能性があ"
6604 "る。 (この種の競合は、 本質的に、 close-on-exec フラグをセットすべきファイル"
6605 "ディスクリプタを作成するどのシステムコールでも起こり得るものであり、 他のいろ"
6606 "いろな Linux システムコールでこの問題に対処するために B<O_CLOEXEC> と同等の機"
6607 "能が提供されている。)"
6608
6609 #. type: TP
6610 #: build/C/man2/open.2:248
6611 #, no-wrap
6612 msgid "B<O_CREAT>"
6613 msgstr "B<O_CREAT>"
6614
6615 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6616 #.  XFS (since 2.6.14).
6617 #. type: Plain text
6618 #: build/C/man2/open.2:264
6619 msgid ""
6620 "If the file does not exist, it will be created.  The owner (user ID) of the "
6621 "file is set to the effective user ID of the process.  The group ownership "
6622 "(group ID) is set either to the effective group ID of the process or to the "
6623 "group ID of the parent directory (depending on filesystem type and mount "
6624 "options, and the mode of the parent directory; see the mount options "
6625 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6626 msgstr ""
6627 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6628 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6629 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6630 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6631 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6632 "I<bsdgroups> と I<sysvgroups> を参照)。"
6633
6634 #. type: Plain text
6635 #: build/C/man2/open.2:291
6636 msgid ""
6637 "I<mode> specifies the permissions to use in case a new file is created.  "
6638 "This argument must be supplied when B<O_CREAT> or B<O_TMPFILE> is specified "
6639 "in I<flags>; if neither B<O_CREAT> nor B<O_TMPFILE> is specified, then "
6640 "I<mode> is ignored.  The effective permissions are modified by the process's "
6641 "I<umask> in the usual way: The permissions of the created file are I<(mode\\ "
6642 "&\\ ~umask)>.  Note that this mode applies only to future accesses of the "
6643 "newly created file; the B<open>()  call that creates a read-only file may "
6644 "well return a read/write file descriptor."
6645 msgstr ""
6646 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6647 "指定する。 I<flags> に B<O_CREAT> か B<O_TMPFILE> が指定されている場合、 "
6648 "I<mode> を指定しなければならない。 B<O_CREAT> も B<O_TMPFILE> も指定されてい"
6649 "ない場合、 I<mode> は無視される。 有効なアクセス許可は、普段と同じようにプロ"
6650 "セスの I<umask> によって修正され、作成されたファイルの許可は I<(mode\\ &\\ "
6651 "~umask)> となる。 このモードは、新しく作成されたファイルに対するそれ以降のア"
6652 "クセス にのみ適用される点に注意すること。 読み取り専用のファイルを作成する "
6653 "B<open>()  コールであっても、 読み書き可能なファイルディスクリプタを返すこと"
6654 "がありうる。"
6655
6656 #. type: Plain text
6657 #: build/C/man2/open.2:294
6658 msgid "The following symbolic constants are provided for I<mode>:"
6659 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6660
6661 #. type: TP
6662 #: build/C/man2/open.2:294
6663 #, no-wrap
6664 msgid "B<S_IRWXU>"
6665 msgstr "B<S_IRWXU>"
6666
6667 #. type: Plain text
6668 #: build/C/man2/open.2:297
6669 msgid "00700 user (file owner) has read, write and execute permission"
6670 msgstr ""
6671 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6672
6673 #. type: TP
6674 #: build/C/man2/open.2:297
6675 #, no-wrap
6676 msgid "B<S_IRUSR>"
6677 msgstr "B<S_IRUSR>"
6678
6679 #. type: Plain text
6680 #: build/C/man2/open.2:300
6681 msgid "00400 user has read permission"
6682 msgstr "00400 ユーザーに読み込みの許可がある。"
6683
6684 #. type: TP
6685 #: build/C/man2/open.2:300
6686 #, no-wrap
6687 msgid "B<S_IWUSR>"
6688 msgstr "B<S_IWUSR>"
6689
6690 #. type: Plain text
6691 #: build/C/man2/open.2:303
6692 msgid "00200 user has write permission"
6693 msgstr "00200 ユーザーに書き込みの許可がある。"
6694
6695 #. type: TP
6696 #: build/C/man2/open.2:303
6697 #, no-wrap
6698 msgid "B<S_IXUSR>"
6699 msgstr "B<S_IXUSR>"
6700
6701 #. type: Plain text
6702 #: build/C/man2/open.2:306
6703 msgid "00100 user has execute permission"
6704 msgstr "00100 ユーザーに実行の許可がある。"
6705
6706 #. type: TP
6707 #: build/C/man2/open.2:306
6708 #, no-wrap
6709 msgid "B<S_IRWXG>"
6710 msgstr "B<S_IRWXG>"
6711
6712 #. type: Plain text
6713 #: build/C/man2/open.2:309
6714 msgid "00070 group has read, write and execute permission"
6715 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6716
6717 #. type: TP
6718 #: build/C/man2/open.2:309
6719 #, no-wrap
6720 msgid "B<S_IRGRP>"
6721 msgstr "B<S_IRGRP>"
6722
6723 #. type: Plain text
6724 #: build/C/man2/open.2:312
6725 msgid "00040 group has read permission"
6726 msgstr "00040 グループに読み込みの許可がある。"
6727
6728 #. type: TP
6729 #: build/C/man2/open.2:312
6730 #, no-wrap
6731 msgid "B<S_IWGRP>"
6732 msgstr "B<S_IWGRP>"
6733
6734 #. type: Plain text
6735 #: build/C/man2/open.2:315
6736 msgid "00020 group has write permission"
6737 msgstr "00020 グループに書き込みの許可がある。"
6738
6739 #. type: TP
6740 #: build/C/man2/open.2:315
6741 #, no-wrap
6742 msgid "B<S_IXGRP>"
6743 msgstr "B<S_IXGRP>"
6744
6745 #. type: Plain text
6746 #: build/C/man2/open.2:318
6747 msgid "00010 group has execute permission"
6748 msgstr "00010 グループに実行の許可がある。"
6749
6750 #. type: TP
6751 #: build/C/man2/open.2:318
6752 #, no-wrap
6753 msgid "B<S_IRWXO>"
6754 msgstr "B<S_IRWXO>"
6755
6756 #. type: Plain text
6757 #: build/C/man2/open.2:321
6758 msgid "00007 others have read, write and execute permission"
6759 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6760
6761 #. type: TP
6762 #: build/C/man2/open.2:321
6763 #, no-wrap
6764 msgid "B<S_IROTH>"
6765 msgstr "B<S_IROTH>"
6766
6767 #. type: Plain text
6768 #: build/C/man2/open.2:324
6769 msgid "00004 others have read permission"
6770 msgstr "00004 他人に読み込みの許可がある。"
6771
6772 #. type: TP
6773 #: build/C/man2/open.2:324
6774 #, no-wrap
6775 msgid "B<S_IWOTH>"
6776 msgstr "B<S_IWOTH>"
6777
6778 #. type: Plain text
6779 #: build/C/man2/open.2:327
6780 msgid "00002 others have write permission"
6781 msgstr "00002 他人に書き込みの許可がある。"
6782
6783 #. type: TP
6784 #: build/C/man2/open.2:327
6785 #, no-wrap
6786 msgid "B<S_IXOTH>"
6787 msgstr "B<S_IXOTH>"
6788
6789 #. type: Plain text
6790 #: build/C/man2/open.2:330
6791 msgid "00001 others have execute permission"
6792 msgstr "00001 他人に実行の許可がある。"
6793
6794 #. type: TP
6795 #: build/C/man2/open.2:331
6796 #, no-wrap
6797 msgid "B<O_DIRECT> (since Linux 2.4.10)"
6798 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6799
6800 #. type: Plain text
6801 #: build/C/man2/open.2:348
6802 msgid ""
6803 "Try to minimize cache effects of the I/O to and from this file.  In general "
6804 "this will degrade performance, but it is useful in special situations, such "
6805 "as when applications do their own caching.  File I/O is done directly to/"
6806 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6807 "transfer data synchronously, but does not give the guarantees of the "
6808 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6809 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6810 "B<O_DIRECT>.  See NOTES below for further discussion."
6811 msgstr ""
6812 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6813 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6814 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6815 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6816 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6817 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6818 "使用しなければならない。下記の「注意」の節の議論も参照。"
6819
6820 #. type: Plain text
6821 #: build/C/man2/open.2:352
6822 msgid ""
6823 "A semantically similar (but deprecated) interface for block devices is "
6824 "described in B<raw>(8)."
6825 msgstr ""
6826 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6827 "れている (但し、このインタフェースは非推奨である)。"
6828
6829 #. type: TP
6830 #: build/C/man2/open.2:352
6831 #, no-wrap
6832 msgid "B<O_DIRECTORY>"
6833 msgstr "B<O_DIRECTORY>"
6834
6835 #.  But see the following and its replies:
6836 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6837 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6838 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6839 #. type: Plain text
6840 #: build/C/man2/open.2:364
6841 msgid ""
6842 "If I<pathname> is not a directory, cause the open to fail.  This flag was "
6843 "added in kernel version 2.1.126, to avoid denial-of-service problems if "
6844 "B<opendir>(3)  is called on a FIFO or tape device."
6845 msgstr ""
6846 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは、 "
6847 "B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合の サービス不"
6848 "能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追加された。"
6849
6850 #. type: TP
6851 #: build/C/man2/open.2:364
6852 #, no-wrap
6853 msgid "B<O_DSYNC>"
6854 msgstr "B<O_DSYNC>"
6855
6856 #. type: Plain text
6857 #: build/C/man2/open.2:370
6858 msgid ""
6859 "Write operations on the file will complete according to the requirements of "
6860 "synchronized I/O I<data> integrity completion."
6861 msgstr "ファイルに対する書き込み操作は、同期 I/O のI<データ>完全性完了の要件に基づいて行われる。"
6862
6863 #. type: Plain text
6864 #: build/C/man2/open.2:382
6865 msgid ""
6866 "By the time B<write>(2)  (and similar)  return, the output data has been "
6867 "transferred to the underlying hardware, along with any file metadata that "
6868 "would be required to retrieve that data (i.e., as though each B<write>(2)  "
6869 "was followed by a call to B<fdatasync>(2)).  I<See NOTES below>."
6870 msgstr "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータおよびデータを取得するのに必要なファイルメタデータが裏で利用されているハードウェアに転送される (つまり、B<write>(2) の後に B<fdatasync>(2) を呼び出したのと同じようになる)。 I<下記の「注意」も参照のこと>。"
6871
6872 #. type: TP
6873 #: build/C/man2/open.2:382
6874 #, no-wrap
6875 msgid "B<O_EXCL>"
6876 msgstr "B<O_EXCL>"
6877
6878 #. type: Plain text
6879 #: build/C/man2/open.2:392
6880 msgid ""
6881 "Ensure that this call creates the file: if this flag is specified in "
6882 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6883 "will fail."
6884 msgstr ""
6885 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6886 "と\n"
6887 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6888 "敗\n"
6889 "する。"
6890
6891 #.  POSIX.1-2001 explicitly requires this behavior.
6892 #. type: Plain text
6893 #: build/C/man2/open.2:400
6894 msgid ""
6895 "When these two flags are specified, symbolic links are not followed: if "
6896 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6897 "the symbolic link points to."
6898 msgstr ""
6899 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6900 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6901 "かに関わらず B<open>()  は失敗する。"
6902
6903 #. type: Plain text
6904 #: build/C/man2/open.2:416
6905 msgid ""
6906 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6907 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6908 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6909 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6910 "the error B<EBUSY>."
6911 msgstr ""
6912 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6913 "B<O_EXCL> の動作は規定されていない。\n"
6914 "これには一つ例外があり、Linux 2.6 以降では、\n"
6915 "I<pathname> がブロックデバイスを参照している場合、\n"
6916 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6917 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6918 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6919
6920 #. type: Plain text
6921 #: build/C/man2/open.2:438
6922 msgid ""
6923 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6924 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6925 "programs that rely on it for performing locking tasks will contain a race "
6926 "condition.  Portable programs that want to perform atomic file locking using "
6927 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6928 "create a unique file on the same filesystem (e.g., incorporating hostname "
6929 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6930 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6931 "unique file to check if its link count has increased to 2, in which case the "
6932 "lock is also successful."
6933 msgstr ""
6934 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6935 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6936 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6937 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6938 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6939 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6940 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6941 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6942 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6943 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6944 "じくロックに成功しているということである。"
6945
6946 #. type: TP
6947 #: build/C/man2/open.2:438
6948 #, no-wrap
6949 msgid "B<O_LARGEFILE>"
6950 msgstr "B<O_LARGEFILE>"
6951
6952 #. type: Plain text
6953 #: build/C/man2/open.2:460
6954 msgid ""
6955 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6956 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6957 "macro must be defined (before including I<any> header files)  in order to "
6958 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6959 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6960 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6961 msgstr ""
6962 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6963 "ファ\n"
6964 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6965 "イ\n"
6966 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6967 "ば\n"
6968 "ならない。\n"
6969 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6970 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6971 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6972
6973 #. type: TP
6974 #: build/C/man2/open.2:460
6975 #, no-wrap
6976 msgid "B<O_NOATIME> (since Linux 2.6.8)"
6977 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6978
6979 #.  The O_NOATIME flag also affects the treatment of st_atime
6980 #.  by mmap() and readdir(2), MTK, Dec 04.
6981 #. type: Plain text
6982 #: build/C/man2/open.2:473
6983 msgid ""
6984 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6985 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6986 "programs, where its use can significantly reduce the amount of disk "
6987 "activity.  This flag may not be effective on all filesystems.  One example "
6988 "is NFS, where the server maintains the access time."
6989 msgstr ""
6990 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6991 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
6992 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
6993 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6994 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6995
6996 #. type: TP
6997 #: build/C/man2/open.2:473
6998 #, no-wrap
6999 msgid "B<O_NOCTTY>"
7000 msgstr "B<O_NOCTTY>"
7001
7002 #. type: Plain text
7003 #: build/C/man2/open.2:481
7004 msgid ""
7005 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
7006 "become the process's controlling terminal even if the process does not have "
7007 "one."
7008 msgstr ""
7009 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
7010 "る\n"
7011 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
7012 "ル\n"
7013 "は制御端末にはならない。"
7014
7015 #. type: TP
7016 #: build/C/man2/open.2:481
7017 #, no-wrap
7018 msgid "B<O_NOFOLLOW>"
7019 msgstr "B<O_NOFOLLOW>"
7020
7021 #.  The headers from glibc 2.0.100 and later include a
7022 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
7023 #.  used\fP.
7024 #. type: Plain text
7025 #: build/C/man2/open.2:493
7026 msgid ""
7027 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
7028 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
7029 "earlier components of the pathname will still be followed.  See also "
7030 "B<O_PATH> below."
7031 msgstr ""
7032 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
7033 "FreeBSD の拡張で、Linux には バージョン 2.1.126 で追加された。 このフラグが指"
7034 "定された場合でも I<pathname> の前の方の要素 (最後のディレクトリセパレータより"
7035 "前の部分) にあるシンボリックリンクについてはリンクが辿られる。 下記の "
7036 "B<O_PATH> も参照のこと。"
7037
7038 #. type: TP
7039 #: build/C/man2/open.2:493
7040 #, no-wrap
7041 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
7042 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
7043
7044 #. type: Plain text
7045 #: build/C/man2/open.2:506
7046 msgid ""
7047 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
7048 "()  nor any subsequent operations on the file descriptor which is returned "
7049 "will cause the calling process to wait.  For the handling of FIFOs (named "
7050 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
7051 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
7052 "see B<fcntl>(2)."
7053 msgstr ""
7054 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
7055 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
7056 "出\n"
7057 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
7058 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
7059 "イ\n"
7060 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
7061 "議論は、 B<fcntl>(2) を参照すること。"
7062
7063 #. type: TP
7064 #: build/C/man2/open.2:506
7065 #, no-wrap
7066 msgid "B<O_PATH> (since Linux 2.6.39)"
7067 msgstr "B<O_PATH> (Linux 2.6.39 以降)"
7068
7069 #
7070 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
7071 #.  commit 326be7b484843988afe57566b627fb7a70beac56
7072 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
7073 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
7074 #.      Subject: Re: [PATCH] open(2): document O_PATH
7075 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
7076 #. type: Plain text
7077 #: build/C/man2/open.2:528
7078 msgid ""
7079 "Obtain a file descriptor that can be used for two purposes: to indicate a "
7080 "location in the filesystem tree and to perform operations that act purely at "
7081 "the file descriptor level.  The file itself is not opened, and other file "
7082 "operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), "
7083 "B<fgetxattr>(2), B<mmap>(2))  fail with the error B<EBADF>."
7084 msgstr ""
7085 "このフラグを指定して取得したファイルディスクリプタは、 ファイルシステムツリー"
7086 "内での場所を示すため、 純粋にファイルディスクリプタレベルでの作用する操作を実"
7087 "行するため、 の二つの目的で使用することができる。 ファイル自身はオープンされ"
7088 "ず、 他のファイル操作 (例えば B<read>(2), B<write>(2), B<fchmod>(2), "
7089 "B<fchown>(2), B<fgetxattr>(2), B<mmap>(2)) はエラー B<EBADF> で失敗する。"
7090
7091 #. type: Plain text
7092 #: build/C/man2/open.2:532
7093 msgid ""
7094 "The following operations I<can> be performed on the resulting file "
7095 "descriptor:"
7096 msgstr ""
7097 "取得したファイルディスクリプタに対して以下の操作を行うことが「できる」。"
7098
7099 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
7100 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
7101 #. type: Plain text
7102 #: build/C/man2/open.2:541
7103 msgid ""
7104 "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
7105 msgstr ""
7106 "B<close>(2); B<fchdir>(2)  (Linux 3.5 以降); B<fstat>(2)  (Linux 3.6 以降)"
7107
7108 #. type: Plain text
7109 #: build/C/man2/open.2:547
7110 msgid ""
7111 "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
7112 msgstr "ファイルディスクリプタの複製 (B<dup>(2), B<fcntl>(2)  B<F_DUPFD> など)"
7113
7114 #. type: Plain text
7115 #: build/C/man2/open.2:553
7116 msgid ""
7117 "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and "
7118 "B<F_SETFD>)."
7119 msgstr ""
7120 "ファイルディスクリプタフラグの取得と設定 (B<fcntl>(2) の B<F_GETFD> と "
7121 "B<F_SETFD>)"
7122
7123 #. type: Plain text
7124 #: build/C/man2/open.2:559
7125 msgid ""
7126 "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> "
7127 "operation: the returned flags will include the bit B<O_PATH>."
7128 msgstr ""
7129 "B<fcntl>(2) の B<F_GETFL> 操作を使ったオープンされたファイルの状態フラグの取"
7130 "得。 返されるフラグには B<O_PATH> ビットが含まれる。"
7131
7132 #. type: Plain text
7133 #: build/C/man2/open.2:566
7134 msgid ""
7135 "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
7136 "the other \"*at()\" system calls."
7137 msgstr ""
7138 "B<openat>(2) や他の \"*at()\" 系のシステムコールの I<dirfd> 引数としてその"
7139 "ファイルディスクリプタを渡す。"
7140
7141 #. type: Plain text
7142 #: build/C/man2/open.2:572
7143 msgid ""
7144 "Passing the file descriptor to another process via a UNIX domain socket (see "
7145 "B<SCM_RIGHTS> in B<unix>(7))."
7146 msgstr ""
7147 "そのファイルディスクリプタを別のプロセスに UNIX ドメインソケット経由で渡す。 "
7148 "(B<unix>(7) の B<SCM_RIGHTS> を参照)"
7149
7150 #. type: Plain text
7151 #: build/C/man2/open.2:583
7152 msgid ""
7153 "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_DIRECTORY> "
7154 "and B<O_NOFOLLOW> are ignored."
7155 msgstr ""
7156 "I<flags> に B<O_PATH> が指定された場合、 B<O_DIRECTORY> と B<O_NOFOLLOW> 以外"
7157 "のフラグビットは無視される。"
7158
7159 #. type: Plain text
7160 #: build/C/man2/open.2:599
7161 msgid ""
7162 "If I<pathname> is a symbolic link and the B<O_NOFOLLOW> flag is also "
7163 "specified, then the call returns a file descriptor referring to the symbolic "
7164 "link.  This file descriptor can be used as the I<dirfd> argument in calls to "
7165 "B<fchownat>(2), B<fstatat>(2), B<linkat>(2), and B<readlinkat>(2)  with an "
7166 "empty pathname to have the calls operate on the symbolic link."
7167 msgstr ""
7168 "I<pathname> がシンボリックリンクで B<O_NOFOLLOW> フラグも合わせて指定された場"
7169 "合、 この呼び出しではシンボリックリンクを参照するファイルディスクリプタを返"
7170 "す。 このファイルディスクリプタは、 空のパス名を指定した B<fchownat>(2), "
7171 "B<fstatat>(2), B<linkat>(2), B<readlinkat>(2) の呼び出しで I<dirfd> 引数とし"
7172 "て使うことで、 そのシンボリックリンクに対して操作を行うことができる。"
7173
7174 #. type: TP
7175 #: build/C/man2/open.2:599
7176 #, no-wrap
7177 msgid "B<O_SYNC>"
7178 msgstr "B<O_SYNC>"
7179
7180 #. type: Plain text
7181 #: build/C/man2/open.2:611
7182 msgid ""
7183 "Write operations on the file will complete according to the requirements of "
7184 "synchronized I/O I<file> integrity completion (by contrast with contrast "
7185 "with the synchronized I/O I<data> integrity completion provided by "
7186 "B<O_DSYNC>.)"
7187 msgstr "ファイルに対する書き込み操作は、同期 I/O のI<ファイル>完全性完了の要件に基づいて行われる (これに対し B<O_DSYNC> では同期 I/O のI<データ>完全性完了が提供される)。"
7188
7189 #. type: Plain text
7190 #: build/C/man2/open.2:622
7191 msgid ""
7192 "By the time B<write>(2)  (and similar)  return, the output data and "
7193 "associated file metadata have been transferred to the underlying hardware (i."
7194 "e., as though each B<write>(2)  was followed by a call to B<fsync>(2)).  "
7195 "I<See NOTES below>."
7196 msgstr "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータと関連するファイルメタデータが裏で利用されているハードウェアに転送される (つまり、B<write>(2) の後に B<fsync>(2) を呼び出したのと同じようになる)。 I<下記の「注意」も参照のこと>。"
7197
7198 #. type: TP
7199 #: build/C/man2/open.2:622
7200 #, no-wrap
7201 msgid "B<O_TMPFILE> (since Linux 3.11)"
7202 msgstr "B<O_TMPFILE> (Linux 3.11 以降)"
7203
7204 #.  commit 60545d0d4610b02e55f65d141c95b18ccf855b6e
7205 #.  commit f4e0c30c191f87851c4a53454abb55ee276f4a7e
7206 #.  commit bb458c644a59dbba3a1fe59b27106c5e68e1c4bd
7207 #. type: Plain text
7208 #: build/C/man2/open.2:634
7209 msgid ""
7210 "Create an unnamed temporary file.  The I<pathname> argument specifies a "
7211 "directory; an unnamed inode will be created in that directory's filesystem.  "
7212 "Anything written to the resulting file will be lost when the last file "
7213 "descriptor is closed, unless the file is given a name."
7214 msgstr ""
7215 "名前なしの一時ファイルを作成する。 I<pathname> 引き数はディレクトリを指定す"
7216 "る。 名前なしの inode がそのディレクトリが存在するファイルシステムに作成され"
7217 "る。 そのファイルに名前を付与しない限り、 作成されたファイルに書き込まれた内"
7218 "容は、 最後のファイルディスクリプタがクローズされる際に失われる。"
7219
7220 #. type: Plain text
7221 #: build/C/man2/open.2:648
7222 msgid ""
7223 "B<O_TMPFILE> must be specified with one of B<O_RDWR> or B<O_WRONLY> and, "
7224 "optionally, B<O_EXCL>.  If B<O_EXCL> is not specified, then B<linkat>(2)  "
7225 "can be used to link the temporary file into the filesystem, making it "
7226 "permanent, using code like the following:"
7227 msgstr ""
7228 "B<O_TMPFILE> は必ず B<O_RDWR> か B<O_WRONLY> のいずれかと一緒に使わなければな"
7229 "らない。 B<O_EXCL> も指定することができる。 B<O_EXCL> が指定されなかった場"
7230 "合、 B<linkat>(2) を使って、そのファイルシステムにこの一時ファイルへのリンク"
7231 "を作成し、ファイルを永続化することができる。 以下のコードのようにすればよい。"
7232
7233 #. type: Plain text
7234 #: build/C/man2/open.2:654
7235 #, no-wrap
7236 msgid ""
7237 "char path[PATH_MAX];\n"
7238 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
7239 "                        S_IRUSR | S_IWUSR);\n"
7240 msgstr ""
7241 "char path[PATH_MAX];\n"
7242 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
7243 "                        S_IRUSR | S_IWUSR);\n"
7244
7245 #. type: Plain text
7246 #: build/C/man2/open.2:656
7247 #, no-wrap
7248 msgid "/* File I/O on 'fd'... */\n"
7249 msgstr "/* 'fd' に対するファイル I/O ... */\n"
7250
7251 #. type: Plain text
7252 #: build/C/man2/open.2:660
7253 #, no-wrap
7254 msgid ""
7255 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
7256 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
7257 "                        AT_SYMLINK_FOLLOW);\n"
7258 msgstr ""
7259 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
7260 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
7261 "                        AT_SYMLINK_FOLLOW);\n"
7262
7263 #. type: Plain text
7264 #: build/C/man2/open.2:669
7265 msgid ""
7266 "In this case, the B<open>()  I<mode> argument determines the file permission "
7267 "mode, as with B<O_CREAT>."
7268 msgstr ""
7269 "この場合、 B<open>() の I<mode> 引き数は B<O_CREAT> と同様にファイルのアクセ"
7270 "ス許可モードの決定に使われる。"
7271
7272 #. type: Plain text
7273 #: build/C/man2/open.2:681
7274 msgid ""
7275 "Specifying B<O_EXCL> in conjunction with B<O_TMPFILE> prevents a temporary "
7276 "file from being linked into the filesystem in the above manner.  (Note that "
7277 "the meaning of B<O_EXCL> in this case is different from the meaning of "
7278 "B<O_EXCL> otherwise.)"
7279 msgstr ""
7280 "B<O_TMPFILE> とともに B<O_EXCL> を指定すると、 一時ファイルに対して上記の方法"
7281 "でファイルシステムへのリンクを行うことができなくなる (この場合の B<O_EXCL> の"
7282 "意味は他の場合の B<O_EXCL> の意味とは異なる点に注意)。"
7283
7284 #.  Inspired by http://lwn.net/Articles/559147/
7285 #. type: Plain text
7286 #: build/C/man2/open.2:686
7287 msgid "There are two main use cases for B<O_TMPFILE>:"
7288 msgstr "B<O_TMPFILE> には主に二つの用途がある。"
7289
7290 #. type: Plain text
7291 #: build/C/man2/open.2:695
7292 msgid ""
7293 "Improved B<tmpfile>(3)  functionality: race-free creation of temporary files "
7294 "that (1) are automatically deleted when closed; (2) can never be reached via "
7295 "any pathname; (3) are not subject to symlink attacks; and (4) do not require "
7296 "the caller to devise unique names."
7297 msgstr ""
7298 "改善された B<tmpfile>(3) の機能: (1) クローズ時に自動的に削除される、 (2) パ"
7299 "ス名では決して参照できない、 (3) シンボリックリンク攻撃ができない、 (4) 呼び"
7300 "出し元が一意な名前を考える必要がない、 という特長を持つ競合のない一時ファイル"
7301 "の作成。"
7302
7303 #. type: Plain text
7304 #: build/C/man2/open.2:706
7305 msgid ""
7306 "Creating a file that is initially invisible, which is then populated with "
7307 "data and adjusted to have appropriate filesystem attributes (B<chown>(2), "
7308 "B<chmod>(2), B<fsetxattr>(2), etc.)  before being atomically linked into the "
7309 "filesystem in a fully formed state (using B<linkat>(2)  as described above)."
7310 msgstr ""
7311 "最初は見えないファイルを作成し、 それからデータを書き込んだり、適切なファイル"
7312 "システム属性を持つように調整したり (B<chown>(2), B<chmod>(2), B<fsetxattr>"
7313 "(2) など) した後、 準備が全て整った状態で (上述の B<linkat>(2) を使って) ファ"
7314 "イルシステム内にアトミックにリンクを行う。"
7315
7316 #.  commit 99b6436bc29e4f10e4388c27a3e4810191cc4788
7317 #.  commit ab29743117f9f4c22ac44c13c1647fb24fb2bafe
7318 #. type: Plain text
7319 #: build/C/man2/open.2:717
7320 msgid ""
7321 "B<O_TMPFILE> requires support by the underlying filesystem; only a subset of "
7322 "Linux filesystems provide that support.  In the initial implementation, "
7323 "support was provided in the ext2, ext3, ext4, UDF, Minix, and shmem "
7324 "filesystems.  XFS support was added in Linux 3.15."
7325 msgstr "B<O_TMPFILE> は、 裏で利用されるファイルシステムによるサポートが必要である。 一部の Linux ファイルシステムだけがこの機能をサポートしている。 最初の実装では、 ext2, ext3, ext4, UDF, Minix, shmem ファイルシステムがサポートしていた。 XFS でのサポートが Linux 3.15 で追加された。"
7326
7327 #. type: TP
7328 #: build/C/man2/open.2:717
7329 #, no-wrap
7330 msgid "B<O_TRUNC>"
7331 msgstr "B<O_TRUNC>"
7332
7333 #. type: Plain text
7334 #: build/C/man2/open.2:731
7335 msgid ""
7336 "If the file already exists and is a regular file and the access mode allows "
7337 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
7338 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
7339 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
7340 msgstr ""
7341 "ファイルが既に存在し、通常ファイルであり、 アクセスモードで書き込みが許可され"
7342 "ている (つまり、 B<O_RDWR> または B<O_WRONLY> の) 場合、長さ 0 に切り詰め "
7343 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
7344 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
7345 "ある。"
7346
7347 #. type: SS
7348 #: build/C/man2/open.2:731
7349 #, no-wrap
7350 msgid "creat()"
7351 msgstr "creat()"
7352
7353 #. type: Plain text
7354 #: build/C/man2/open.2:739
7355 msgid ""
7356 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
7357 "O_WRONLY|O_TRUNC>."
7358 msgstr ""
7359 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
7360 "を行うのと等価である。"
7361
7362 #. type: SS
7363 #: build/C/man2/open.2:739
7364 #, no-wrap
7365 msgid "openat()"
7366 msgstr "openat()"
7367
7368 #. type: Plain text
7369 #: build/C/man2/open.2:745
7370 msgid ""
7371 "The B<openat>()  system call operates in exactly the same way as B<open>(), "
7372 "except for the differences described here."
7373 msgstr ""
7374 "B<openat>() システムコールは B<open>() と全く同様に動作するが、以下で説明する"
7375 "点が異なる。"
7376
7377 #. type: Plain text
7378 #: build/C/man2/open.2:755
7379 msgid ""
7380 "If the pathname given in I<pathname> is relative, then it is interpreted "
7381 "relative to the directory relative to by the file descriptor I<dirfd> "
7382 "(rather than relative to the current working directory of the calling "
7383 "process, as is done by B<open>()  for a relative pathname)."
7384 msgstr ""
7385 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
7386 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される (B<open>"
7387 "() に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキング"
7388 "ディレクトリに対する相対パスではない)。"
7389
7390 #. type: Plain text
7391 #: build/C/man2/open.2:767
7392 msgid ""
7393 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
7394 "then I<pathname> is interpreted relative to the current working directory of "
7395 "the calling process (like B<open>())."
7396 msgstr ""
7397 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
7398 "の場合、 (B<open>() と同様に) I<pathname> は呼び出したプロセスのカレントワー"
7399 "キングディレクトリに対する相対パスと解釈される。"
7400
7401 #. type: Plain text
7402 #: build/C/man2/open.2:773 build/C/man2/readlink.2:134
7403 msgid "If I<pathname> is absolute, then I<dirfd> is ignored."
7404 msgstr ""
7405 "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
7406
7407 #. type: Plain text
7408 #: build/C/man2/open.2:782
7409 msgid ""
7410 "B<open>(), B<openat>(), and B<creat>()  return the new file descriptor, or "
7411 "-1 if an error occurred (in which case, I<errno> is set appropriately)."
7412 msgstr ""
7413 "B<open>(), B<openat>(), B<creat>() は新しいファイルディスクリプタを返す。 エ"
7414 "ラーが発生した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
7415
7416 #. type: Plain text
7417 #: build/C/man2/open.2:788
7418 msgid ""
7419 "B<open>(), B<openat>(), and B<creat>()  can fail with the following errors:"
7420 msgstr "B<open>(), B<openat>(), B<creat>() は以下のエラーで失敗する。"
7421
7422 #. type: Plain text
7423 #: build/C/man2/open.2:797
7424 msgid ""
7425 "The requested access to the file is not allowed, or search permission is "
7426 "denied for one of the directories in the path prefix of I<pathname>, or the "
7427 "file did not exist yet and write access to the parent directory is not "
7428 "allowed.  (See also B<path_resolution>(7).)"
7429 msgstr ""
7430 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
7431 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
7432 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
7433 "すること。)"
7434
7435 #. type: Plain text
7436 #: build/C/man2/open.2:803
7437 msgid ""
7438 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
7439 "of disk blocks or inodes on the filesystem has been exhausted."
7440 msgstr ""
7441 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
7442 "inode がそのファイルシステムのユーザクォータに達していた。"
7443
7444 #. type: Plain text
7445 #: build/C/man2/open.2:809
7446 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
7447 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
7448
7449 #. type: Plain text
7450 #: build/C/man2/open.2:813 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:182
7451 msgid "I<pathname> points outside your accessible address space."
7452 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
7453
7454 #. type: TP
7455 #: build/C/man2/open.2:813 build/C/man2/write.2:145
7456 #, no-wrap
7457 msgid "B<EFBIG>"
7458 msgstr "B<EFBIG>"
7459
7460 #. type: Plain text
7461 #: build/C/man2/open.2:817
7462 msgid "See B<EOVERFLOW>."
7463 msgstr "B<EOVERFLOW> 参照。"
7464
7465 #. type: TP
7466 #: build/C/man2/open.2:817 build/C/man2/read.2:122 build/C/man3/scanf.3:561
7467 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
7468 #, no-wrap
7469 msgid "B<EINTR>"
7470 msgstr "B<EINTR>"
7471
7472 #. type: Plain text
7473 #: build/C/man2/open.2:824
7474 msgid ""
7475 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
7476 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
7477 "(7)."
7478 msgstr ""
7479 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
7480 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
7481 "B<signal>(7)  参照。"
7482
7483 #. type: Plain text
7484 #: build/C/man2/open.2:832
7485 msgid ""
7486 "The filesystem does not support the B<O_DIRECT> flag.  See B<NOTES> for more "
7487 "information."
7488 msgstr ""
7489 "ファイルシステムが B<O_DIRECT> フラグをサポートしていない。 詳細はB<注意>を参"
7490 "照。"
7491
7492 #.  In particular, __O_TMPFILE instead of O_TMPFILE
7493 #. type: Plain text
7494 #: build/C/man2/open.2:837
7495 msgid "Invalid value in I<flags>."
7496 msgstr "I<flags> に無効な値が入っている。"
7497
7498 #. type: Plain text
7499 #: build/C/man2/open.2:847
7500 msgid ""
7501 "B<O_TMPFILE> was specified in I<flags>, but neither B<O_WRONLY> nor "
7502 "B<O_RDWR> was specified."
7503 msgstr ""
7504 "I<flags> に B<O_TMPFILE> が指定されたが、 B<O_WRONLY> も B<O_RDWR> も指定され"
7505 "ていなかった。"
7506
7507 #. type: TP
7508 #: build/C/man2/open.2:847 build/C/man2/open.2:856 build/C/man2/read.2:158
7509 #: build/C/man2/rename.2:218 build/C/man2/unlink.2:185
7510 #: build/C/man2/unlink.2:256
7511 #, no-wrap
7512 msgid "B<EISDIR>"
7513 msgstr "B<EISDIR>"
7514
7515 #. type: Plain text
7516 #: build/C/man2/open.2:856
7517 msgid ""
7518 "I<pathname> refers to a directory and the access requested involved writing "
7519 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
7520 msgstr ""
7521 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
7522 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
7523
7524 #. type: Plain text
7525 #: build/C/man2/open.2:870
7526 msgid ""
7527 "I<pathname> refers to an existing directory, B<O_TMPFILE> and one of "
7528 "B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version "
7529 "does not provide the B<O_TMPFILE> functionality."
7530 msgstr ""
7531 "I<pathname> が存在するディレクトリを参照していて、 B<O_TMPFILE> および "
7532 "B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネル"
7533 "バージョンでは B<O_TMPFILE> 機能が提供されていない。"
7534
7535 #. type: Plain text
7536 #: build/C/man2/open.2:874 build/C/man2/rmdir.2:77
7537 msgid "Too many symbolic links were encountered in resolving I<pathname>."
7538 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
7539
7540 #. type: Plain text
7541 #: build/C/man2/open.2:883
7542 msgid ""
7543 "I<pathname> was a symbolic link, and I<flags> specified B<O_NOFOLLOW> but "
7544 "not B<O_PATH>."
7545 msgstr ""
7546 "I<pathname> がシンボリックリンクで、 I<flags> に B<O_NOFOLLOW> が指定された"
7547 "が、 B<O_PATH> が指定されていなかった。"
7548
7549 #. type: TP
7550 #: build/C/man2/open.2:883 build/C/man2/pipe.2:144 build/C/man3/tmpfile.3:66
7551 #, no-wrap
7552 msgid "B<EMFILE>"
7553 msgstr "B<EMFILE>"
7554
7555 #. type: Plain text
7556 #: build/C/man2/open.2:886
7557 msgid "The process already has the maximum number of files open."
7558 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
7559
7560 #. type: Plain text
7561 #: build/C/man2/open.2:890 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:197
7562 msgid "I<pathname> was too long."
7563 msgstr "I<pathname> が長過ぎる。"
7564
7565 #. type: TP
7566 #: build/C/man2/open.2:890 build/C/man2/pipe.2:147 build/C/man3/tmpfile.3:69
7567 #, no-wrap
7568 msgid "B<ENFILE>"
7569 msgstr "B<ENFILE>"
7570
7571 #. type: Plain text
7572 #: build/C/man2/open.2:893 build/C/man2/pipe.2:150
7573 msgid "The system limit on the total number of open files has been reached."
7574 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
7575
7576 #. type: TP
7577 #: build/C/man2/open.2:893
7578 #, no-wrap
7579 msgid "B<ENODEV>"
7580 msgstr "B<ENODEV>"
7581
7582 #. type: Plain text
7583 #: build/C/man2/open.2:900
7584 msgid ""
7585 "I<pathname> refers to a device special file and no corresponding device "
7586 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
7587 "returned.)"
7588 msgstr ""
7589 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
7590 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
7591 "るべきである)"
7592
7593 #. type: Plain text
7594 #: build/C/man2/open.2:907
7595 msgid ""
7596 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
7597 "component in I<pathname> does not exist or is a dangling symbolic link."
7598 msgstr ""
7599 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
7600 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
7601 "ンクである。"
7602
7603 #. type: Plain text
7604 #: build/C/man2/open.2:921
7605 msgid ""
7606 "I<pathname> refers to a nonexistent directory, B<O_TMPFILE> and one of "
7607 "B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version "
7608 "does not provide the B<O_TMPFILE> functionality."
7609 msgstr ""
7610 "I<pathname> が存在しないディレクトリを参照していて、 B<O_TMPFILE> および "
7611 "B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネル"
7612 "バージョンでは B<O_TMPFILE> 機能が提供されていない。"
7613
7614 #. type: Plain text
7615 #: build/C/man2/open.2:930
7616 msgid ""
7617 "I<pathname> was to be created but the device containing I<pathname> has no "
7618 "room for the new file."
7619 msgstr ""
7620 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
7621 "ファイルのための空き容量がない。"
7622
7623 #. type: Plain text
7624 #: build/C/man2/open.2:937
7625 msgid ""
7626 "A component used as a directory in I<pathname> is not, in fact, a directory, "
7627 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
7628 msgstr ""
7629 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
7630 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
7631
7632 #. type: Plain text
7633 #: build/C/man2/open.2:943
7634 msgid ""
7635 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
7636 "has the file open for reading.  Or, the file is a device special file and no "
7637 "corresponding device exists."
7638 msgstr ""
7639 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
7640 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
7641 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
7642
7643 #. type: TP
7644 #: build/C/man2/open.2:943 build/C/man2/open_by_handle_at.2:301
7645 #, no-wrap
7646 msgid "B<EOPNOTSUPP>"
7647 msgstr "B<EOPNOTSUPP>"
7648
7649 #. type: Plain text
7650 #: build/C/man2/open.2:949
7651 msgid "The filesystem containing I<pathname> does not support B<O_TMPFILE>."
7652 msgstr ""
7653 "I<pathname> を含んでいるファイルシステムが B<O_TMPFILE> をサポートしていな"
7654 "い。"
7655
7656 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
7657 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
7658 #.  Reported 2006-10-03
7659 #. type: Plain text
7660 #: build/C/man2/open.2:969
7661 msgid ""
7662 "I<pathname> refers to a regular file that is too large to be opened.  The "
7663 "usual scenario here is that an application compiled on a 32-bit platform "
7664 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
7665 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
7666 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
7667 "B<EFBIG> for this case."
7668 msgstr ""
7669 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
7670 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
7671 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
7672 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
7673 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
7674 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
7675 "いた。"
7676
7677 #.  Strictly speaking, it's the filesystem UID... (MTK)
7678 #. type: Plain text
7679 #: build/C/man2/open.2:977
7680 msgid ""
7681 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
7682 "did not match the owner of the file and the caller was not privileged "
7683 "(B<CAP_FOWNER>)."
7684 msgstr ""
7685 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
7686 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
7687
7688 #. type: Plain text
7689 #: build/C/man2/open.2:982
7690 msgid ""
7691 "I<pathname> refers to a file on a read-only filesystem and write access was "
7692 "requested."
7693 msgstr ""
7694 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
7695 "込みアクセスが要求された。"
7696
7697 #. type: TP
7698 #: build/C/man2/open.2:982
7699 #, no-wrap
7700 msgid "B<ETXTBSY>"
7701 msgstr "B<ETXTBSY>"
7702
7703 #. type: Plain text
7704 #: build/C/man2/open.2:987
7705 msgid ""
7706 "I<pathname> refers to an executable image which is currently being executed "
7707 "and write access was requested."
7708 msgstr ""
7709 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
7710
7711 #. type: TP
7712 #: build/C/man2/open.2:987
7713 #, no-wrap
7714 msgid "B<EWOULDBLOCK>"
7715 msgstr "B<EWOULDBLOCK>"
7716
7717 #. type: Plain text
7718 #: build/C/man2/open.2:994
7719 msgid ""
7720 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
7721 "the file (see B<fcntl>(2))."
7722 msgstr ""
7723 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
7724 "ていた (B<fcntl>(2)  参照)。"
7725
7726 #. type: Plain text
7727 #: build/C/man2/open.2:997
7728 msgid "The following additional errors can occur for B<openat>():"
7729 msgstr "B<openat>() では以下のエラーも発生する。"
7730
7731 #. type: Plain text
7732 #: build/C/man2/open.2:1001 build/C/man2/readlink.2:206
7733 #: build/C/man2/unlink.2:252
7734 msgid "I<dirfd> is not a valid file descriptor."
7735 msgstr "I<dirfd> が有効なファイルディスクリプタではない。"
7736
7737 #. type: Plain text
7738 #: build/C/man2/open.2:1007 build/C/man2/readlink.2:212
7739 #: build/C/man2/unlink.2:269
7740 msgid ""
7741 "I<pathname> is relative and I<dirfd> is a file descriptor referring to a "
7742 "file other than a directory."
7743 msgstr ""
7744 "I<pathname> が相対パスで、 I<dirfd> がディレクトリ以外のファイルを参照してい"
7745 "るファイルディスクリプタである。"
7746
7747 #. type: Plain text
7748 #: build/C/man2/open.2:1011
7749 msgid ""
7750 "B<openat>()  was added to Linux in kernel 2.6.16; library support was added "
7751 "to glibc in version 2.4."
7752 msgstr ""
7753 "B<openat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポー"
7754 "トはバージョン 2.4 で glibc に追加された。"
7755
7756 #. type: Plain text
7757 #: build/C/man2/open.2:1015
7758 msgid "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
7759 msgstr "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
7760
7761 #. type: Plain text
7762 #: build/C/man2/open.2:1018
7763 msgid "B<openat>(): POSIX.1-2008."
7764 msgstr "B<openat>(): POSIX.1-2008."
7765
7766 #. type: Plain text
7767 #: build/C/man2/open.2:1029
7768 msgid ""
7769 "The B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, and B<O_TMPFILE> flags are Linux-"
7770 "specific.  One must define B<_GNU_SOURCE> to obtain their definitions."
7771 msgstr ""
7772 "フラグ B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, B<O_TMPFILE> は Linux 特有のもの"
7773 "である。 これらのフラグの定義を得るためには B<_GNU_SOURCE> を定義しなければな"
7774 "らない。"
7775
7776 #. type: Plain text
7777 #: build/C/man2/open.2:1044
7778 msgid ""
7779 "The B<O_CLOEXEC>, B<O_DIRECTORY>, and B<O_NOFOLLOW> flags are not specified "
7780 "in POSIX.1-2001, but are specified in POSIX.1-2008.  Since glibc 2.12, one "
7781 "can obtain their definitions by defining either B<_POSIX_C_SOURCE> with a "
7782 "value greater than or equal to 200809L or B<_XOPEN_SOURCE> with a value "
7783 "greater than or equal to 700.  In glibc 2.11 and earlier, one obtains the "
7784 "definitions by defining B<_GNU_SOURCE>."
7785 msgstr ""
7786 "フラグ B<O_CLOEXEC>, B<O_DIRECTORY>, B<O_NOFOLLOW> は POSIX.1-2001 では規定さ"
7787 "れていないが、 POSIX.1-2008 では規定されている。 glibc 2.12 以降では、これら"
7788 "の定義を得るには、 B<_POSIX_C_SOURCE> を 200809L 以上の値で定義するか、 "
7789 "B<_XOPEN_SOURCE> を 700 以上の値で定義する。 glibc 2.11 以前では、 これらの定"
7790 "義を得るには B<_GNU_SOURCE> を定義する。"
7791
7792 #. type: Plain text
7793 #: build/C/man2/open.2:1055
7794 msgid ""
7795 "As noted in B<feature_test_macros>(7), feature test macros such as "
7796 "B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, and B<_GNU_SOURCE> must be defined "
7797 "before including I<any> header files."
7798 msgstr ""
7799 "B<feature_test_macros>(7) に注意書きがあるように、 B<_POSIX_C_SOURCE>, "
7800 "B<_XOPEN_SOURCE>, B<_GNU_SOURCE> などの機能検査マクロはI<どの>ヘッダーファイ"
7801 "ルをインクルードするより前に定義しなければならない。"
7802
7803 #. type: Plain text
7804 #: build/C/man2/open.2:1063
7805 msgid ""
7806 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
7807 "does not necessarily have the intention to read or write.  This is typically "
7808 "used to open devices in order to get a file descriptor for use with B<ioctl>"
7809 "(2)."
7810 msgstr ""
7811 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
7812 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
7813 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
7814 "られる。"
7815
7816 #.  Linux 2.0, 2.5: truncate
7817 #.  Solaris 5.7, 5.8: truncate
7818 #.  Irix 6.5: truncate
7819 #.  Tru64 5.1B: truncate
7820 #.  HP-UX 11.22: truncate
7821 #.  FreeBSD 4.7: truncate
7822 #. type: Plain text
7823 #: build/C/man2/open.2:1075
7824 msgid ""
7825 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
7826 "implementations.  On many systems the file is actually truncated."
7827 msgstr ""
7828 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
7829 "くのシステムではファイルは実際に切り詰められる。"
7830
7831 #. type: Plain text
7832 #: build/C/man2/open.2:1083
7833 msgid ""
7834 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7835 "create them; use B<mknod>(2)  instead."
7836 msgstr ""
7837 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7838 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7839 "用する。"
7840
7841 #. type: Plain text
7842 #: build/C/man2/open.2:1104
7843 msgid ""
7844 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7845 "fields (respectively, time of last access, time of last status change, and "
7846 "time of last modification; see B<stat>(2))  are set to the current time, and "
7847 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7848 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7849 "st_ctime and st_mtime fields are set to the current time."
7850 msgstr ""
7851 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7852 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7853 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7854 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7855 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7856 "I<st_mtime> フィールドが現在時刻に設定される。"
7857
7858 #. type: SS
7859 #: build/C/man2/open.2:1104
7860 #, no-wrap
7861 msgid "Synchronized I/O"
7862 msgstr "同期 I/O"
7863
7864 #. type: Plain text
7865 #: build/C/man2/open.2:1119
7866 msgid ""
7867 "The POSIX.1-2008 \"synchronized I/O\" option specifies different variants of "
7868 "synchronized I/O, and specifies the B<open>()  flags B<O_SYNC>, B<O_DSYNC>, "
7869 "and B<O_RSYNC> for controlling the behavior.  Regardless of whether an "
7870 "implementation supports this option, it must at least support the use of "
7871 "B<O_SYNC> for regular files."
7872 msgstr "POSIX.1-2008 の「同期 I/O」の選択肢として複数種類が規定されており、 動作を制御するために B<open>() フラグとして B<O_SYNC>, B<O_DSYNC>, B<O_RSYNC> が規定されている。 この選択肢を実装がサポートしているかに関わらず、 各実装では少なくとも通常のファイルに対して B<O_SYNC> が利用できなければならない。"
7873
7874 #. type: Plain text
7875 #: build/C/man2/open.2:1130
7876 msgid ""
7877 "Linux implements B<O_SYNC> and B<O_DSYNC>, but not B<O_RSYNC>.  (Somewhat "
7878 "incorrectly, glibc defines B<O_RSYNC> to have the same value as B<O_SYNC>.)"
7879 msgstr "Linux は B<O_SYNC> と B<O_DSYNC> を実装しているが、 B<O_RSYNC> は実装していない (少し間違っているのだが、 glibc では B<O_RSYNC> が B<O_SYNC> と同じ値で定義されている)。"
7880
7881 #. type: Plain text
7882 #: build/C/man2/open.2:1148
7883 msgid ""
7884 "B<O_SYNC> provides synchronized I/O I<file> integrity completion, meaning "
7885 "write operations will flush data and all associated metadata to the "
7886 "underlying hardware.  B<O_DSYNC> provides synchronized I/O I<data> integrity "
7887 "completion, meaning write operations will flush data to the underlying "
7888 "hardware, but will only flush metadata updates that are required to allow a "
7889 "subsequent read operation to complete successfully.  Data integrity "
7890 "completion can reduce the number of disk operations that are required for "
7891 "applications that don't need the guarantees of file integrity completion."
7892 msgstr "B<O_SYNC> は、 同期 I/O でのI<ファイル>完全性完了を提供する。 つまり、 書き込み操作はデータとすべての関連メタデータを裏で利用されているハードウェアにフラッシュすることを意味する。 B<O_DSYNC> は、 同期 I/O でのI<データ>完全性完了を提供する。 つまり、 書き込み操作はデータを裏で利用されているハードウェアにフラッシュするが、 それ以降の読み出し操作が正常に完了するのに必要なメタデータの更新のみをフラッシュする。 データ完全性完了は、 ファイル完全性完了を必要としないアプリケーションで、 ディスク操作の数を減らすことができる。"
7893
7894 #. type: Plain text
7895 #: build/C/man2/open.2:1165
7896 msgid ""
7897 "To understand the difference between the the two types of completion, "
7898 "consider two pieces of file metadata: the file last modification timestamp "
7899 "(I<st_mtime>)  and the file length.  All write operations will update the "
7900 "last file modification timestamp, but only writes that add data to the end "
7901 "of the file will change the file length.  The last modification timestamp is "
7902 "not needed to ensure that a read completes successfully, but the file length "
7903 "is.  Thus, B<O_DSYNC> would only guarantee to flush updates to the file "
7904 "length metadata (whereas B<O_SYNC> would also always flush the last "
7905 "modification timestamp metadata)."
7906 msgstr "2 種類の完了の違いを理解するために、 ファイルメタデータの 2 つの要素、 ファイルの最終修正時刻 (I<st_mtime>) とファイル長、を考える。 すべての書き込み操作は最終修正時刻を更新するが、 ファイルの末尾にデータを追加する書き込み操作のみがファイル長を変更する。 最終修正時刻は、 読み出しが正常に完了するのに必要ではないが、 ファイル長は必要である。 したがって、 B<O_DSYNC> はファイル長のメタデータの更新がフラッシュされることだけを保証する (これに対して B<O_SYNC> では最終修正時刻のメタデータも常にフラッシュされる)。"
7907
7908 #. type: Plain text
7909 #: build/C/man2/open.2:1177
7910 msgid ""
7911 "Before Linux 2.6.33, Linux implemented only the B<O_SYNC> flag for B<open>"
7912 "().  However, when that flag was specified, most filesystems actually "
7913 "provided the equivalent of synchronized I/O I<data> integrity completion (i."
7914 "e., B<O_SYNC> was actually implemented as the equivalent of B<O_DSYNC>)."
7915 msgstr "Linux 2.6.33 より前では、 Linux は B<open>() では B<O_SYNC> フラグのみを実装していた。 しかしながら、 このフラグが指定された場合、 ほとんどのファイルシステムで提供されていたのは実際には同期 I/O でのI<データ>完全性完了と等価なものであった (つまり、 B<O_SYNC> は実際には B<O_DSYNC> と等価なものとして実装されていた)。"
7916
7917 #. type: Plain text
7918 #: build/C/man2/open.2:1196
7919 msgid ""
7920 "Since Linux 2.6.33, proper B<O_SYNC> support is provided.  However, to "
7921 "ensure backward binary compatibility, B<O_DSYNC> was defined with the same "
7922 "value as the historical B<O_SYNC>, and B<O_SYNC> was defined as a new (two-"
7923 "bit) flag value that includes the B<O_DSYNC> flag value.  This ensures that "
7924 "applications compiled against new headers get at least B<O_DSYNC> semantics "
7925 "on pre-2.6.33 kernels."
7926 msgstr "Linux 2.6.33 行こう では、 正しい B<O_SYNC> のサポートが提供されている。 しかしながら、 バイナリレベルの後方互換性を保証するため、 B<O_DSYNC> は以前の B<O_SYNC> と同じ値で定義されており、 B<O_SYNC> は B<O_DSYNC> フラグの値を含む新しい (2 ビットの) フラグ値として定義されている。 これにより、 新しいヘッダを使ってコンパイルされたアプリケーションで、 2.6.33 より前のカーネルで少なくとも B<O_DSYNC> の動作は同じになることが保証される。"
7927
7928 #. type: SS
7929 #: build/C/man2/open.2:1196
7930 #, no-wrap
7931 msgid "NFS"
7932 msgstr "NFS"
7933
7934 #. type: Plain text
7935 #: build/C/man2/open.2:1200
7936 msgid ""
7937 "There are many infelicities in the protocol underlying NFS, affecting "
7938 "amongst others B<O_SYNC> and B<O_NDELAY>."
7939 msgstr ""
7940 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
7941 "B<O_NDELAY> に影響する。"
7942
7943 #. type: Plain text
7944 #: build/C/man2/open.2:1215
7945 msgid ""
7946 "On NFS filesystems with UID mapping enabled, B<open>()  may return a file "
7947 "descriptor but, for example, B<read>(2)  requests are denied with "
7948 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
7949 "permissions, but UID mapping is performed by the server upon read and write "
7950 "requests."
7951 msgstr ""
7952 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
7953 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
7954 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7955 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7956 "る。"
7957
7958 #. type: SS
7959 #: build/C/man2/open.2:1215
7960 #, no-wrap
7961 msgid "File access mode"
7962 msgstr "ファイルアクセスモード"
7963
7964 #. type: Plain text
7965 #: build/C/man2/open.2:1230
7966 msgid ""
7967 "Unlike the other values that can be specified in I<flags>, the I<access "
7968 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR> do not specify "
7969 "individual bits.  Rather, they define the low order two bits of I<flags>, "
7970 "and are defined respectively as 0, 1, and 2.  In other words, the "
7971 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
7972 "not have the same meaning as B<O_RDWR>."
7973 msgstr ""
7974 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
7975 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
7976 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
7977 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
7978 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。"
7979
7980 #.  See for example util-linux's disk-utils/setfdprm.c
7981 #.  For some background on access mode 3, see
7982 #.  http://thread.gmane.org/gmane.linux.kernel/653123
7983 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
7984 #.  LKML, 12 Mar 2008
7985 #. type: Plain text
7986 #: build/C/man2/open.2:1247
7987 msgid ""
7988 "Linux reserves the special, nonstandard access mode 3 (binary 11) in "
7989 "I<flags> to mean: check for read and write permission on the file and return "
7990 "a descriptor that can't be used for reading or writing.  This nonstandard "
7991 "access mode is used by some Linux drivers to return a descriptor that is to "
7992 "be used only for device-specific B<ioctl>(2)  operations."
7993 msgstr ""
7994 "Linux では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約"
7995 "されており I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの"
7996 "読み出し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディ"
7997 "スクリプタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、"
7998 "デバイス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使わ"
7999 "れている。"
8000
8001 #. type: SS
8002 #: build/C/man2/open.2:1247
8003 #, no-wrap
8004 msgid "Rationale for openat() and other directory file descriptor APIs"
8005 msgstr "openat() や他のディレクトリファイルディスクリプタ API の基本原理"
8006
8007 #. type: Plain text
8008 #: build/C/man2/open.2:1275
8009 msgid ""
8010 "B<openat>()  and the other system calls and library functions that take a "
8011 "directory file descriptor argument (i.e., B<faccessat>(2), B<fanotify_mark>"
8012 "(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), B<futimesat>(2), "
8013 "B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), B<name_to_handle_at>(2), "
8014 "B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), B<unlinkat>(2), "
8015 "B<utimensat>(2)  B<mkfifoat>(3), and B<scandirat>(3))  are supported for two "
8016 "reasons.  Here, the explanation is in terms of the B<openat>()  call, but "
8017 "the rationale is analogous for the other interfaces."
8018 msgstr "B<openat>() やディレクトリファイルディスクリプタを引き数を取る他のシステムコールやライブラリ関数 (B<faccessat>(2), B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), B<unlinkat>(2), B<utimensat>(2) B<mkfifoat>(3), B<scandirat>(3)) は二つの理由から用意されている。 ここでは、 B<openat> コールに関して説明するが、この基本原理は他のインターフェースでも同じである。"
8019
8020 #. type: Plain text
8021 #: build/C/man2/open.2:1293
8022 msgid ""
8023 "First, B<openat>()  allows an application to avoid race conditions that "
8024 "could occur when using B<open>()  to open files in directories other than "
8025 "the current working directory.  These race conditions result from the fact "
8026 "that some component of the directory prefix given to B<open>()  could be "
8027 "changed in parallel with the call to B<open>().  Such races can be avoided "
8028 "by opening a file descriptor for the target directory, and then specifying "
8029 "that file descriptor as the I<dirfd> argument of B<openat>()."
8030 msgstr "最初の理由として、 B<openat>() を使うと、 アプリケーションは、 カレントワーキングディレクトリ以外のディレクトリで B<open>() を使ってファイルをオープンする際に起こり得る競合条件を避けることができる。 これらの競合条件は、 B<open>() に渡されたディレクトリプレフィックスの構成要素が B<open>() の呼び出しと並行して変化する可能性があるという点に由来している。 このような競合条件は、 対象のディレクトリに対するファイルディスクリプタをオープンし、 それから B<openat>() の I<dirfd> 引き数としてそのファイルディスクリプタを指定することで、 避けることができる。"
8031
8032 #. type: Plain text
8033 #: build/C/man2/open.2:1304
8034 msgid ""
8035 "Second, B<openat>()  allows the implementation of a per-thread \"current "
8036 "working directory\", via file descriptor(s) maintained by the application.  "
8037 "(This functionality can also be obtained by tricks based on the use of I</"
8038 "proc/self/fd/>dirfd, but less efficiently.)"
8039 msgstr "二つ目として、 B<openat>() を使うと、アプリケーションが管理するファイルディスクリプタにより、 スレッド単位の「カレントワーキングディレクトリ」を実装することができる (この機能は、 I</proc/self/fd/dirfd> を使った方法でも実現することができるが、 効率の面で落とる)。"
8040
8041 #. type: SS
8042 #: build/C/man2/open.2:1304
8043 #, no-wrap
8044 msgid "O_DIRECT"
8045 msgstr "O_DIRECT"
8046
8047 #. type: Plain text
8048 #: build/C/man2/open.2:1321
8049 msgid ""
8050 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
8051 "address of user-space buffers and the file offset of I/Os.  In Linux "
8052 "alignment restrictions vary by filesystem and kernel version and might be "
8053 "absent entirely.  However there is currently no filesystem-independent "
8054 "interface for an application to discover these restrictions for a given file "
8055 "or filesystem.  Some filesystems provide their own interfaces for doing so, "
8056 "for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
8057 msgstr ""
8058 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
8059 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
8060 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
8061 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
8062 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
8063 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
8064 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
8065 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
8066
8067 #. type: Plain text
8068 #: build/C/man2/open.2:1326
8069 msgid ""
8070 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
8071 "the file offset must all be multiples of the logical block size of the "
8072 "filesystem.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
8073 msgstr ""
8074 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
8075 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
8076 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
8077
8078 #. type: Plain text
8079 #: build/C/man2/open.2:1360
8080 msgid ""
8081 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
8082 "system call, if the memory buffer is a private mapping (i.e., any mapping "
8083 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
8084 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
8085 "whether submitted via an asynchronous I/O interface or from another thread "
8086 "in the process, should be completed before B<fork>(2)  is called.  Failure "
8087 "to do so can result in data corruption and undefined behavior in parent and "
8088 "child processes.  This restriction does not apply when the memory buffer for "
8089 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
8090 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
8091 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
8092 "will not be available to the child after B<fork>(2)."
8093 msgstr ""
8094 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
8095 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
8096 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
8097 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
8098 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
8099 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
8100 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
8101 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
8102 "動作が起こる可能性がある。\n"
8103 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
8104 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
8105 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
8106 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
8107 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
8108 "のである)。"
8109
8110 #. type: Plain text
8111 #: build/C/man2/open.2:1370
8112 msgid ""
8113 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
8114 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
8115 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
8116 "flag of the same name, but without alignment restrictions."
8117 msgstr ""
8118 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
8119 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
8120 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
8121 "ラグを導入したが、アラインメントの制限はない。"
8122
8123 #. type: Plain text
8124 #: build/C/man2/open.2:1379
8125 msgid ""
8126 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
8127 "Linux kernels simply ignore this flag.  Some filesystems may not implement "
8128 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
8129 msgstr ""
8130 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
8131 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
8132 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
8133 "と B<open>()  は B<EINVAL> で失敗する。"
8134
8135 #. type: Plain text
8136 #: build/C/man2/open.2:1390
8137 msgid ""
8138 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
8139 "file, and especially to overlapping byte regions in the same file.  Even "
8140 "when the filesystem correctly handles the coherency issues in this "
8141 "situation, overall I/O throughput is likely to be slower than using either "
8142 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
8143 "with direct I/O to the same files."
8144 msgstr ""
8145 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
8146 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
8147 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
8148 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
8149 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
8150 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
8151
8152 #. type: Plain text
8153 #: build/C/man2/open.2:1412
8154 msgid ""
8155 "The behaviour of B<O_DIRECT> with NFS will differ from local filesystems.  "
8156 "Older kernels, or kernels configured in certain ways, may not support this "
8157 "combination.  The NFS protocol does not support passing the flag to the "
8158 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
8159 "the server may still cache the I/O.  The client asks the server to make the "
8160 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
8161 "servers will perform poorly under these circumstances, especially if the I/O "
8162 "size is small.  Some servers may also be configured to lie to clients about "
8163 "the I/O having reached stable storage; this will avoid the performance "
8164 "penalty at some risk to data integrity in the event of server power "
8165 "failure.  The Linux NFS client places no alignment restrictions on "
8166 "B<O_DIRECT> I/O."
8167 msgstr ""
8168 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
8169 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
8170 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
8171 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
8172 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
8173 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
8174 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
8175 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
8176 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
8177 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
8178 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
8179 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
8180
8181 #. type: Plain text
8182 #: build/C/man2/open.2:1419
8183 msgid ""
8184 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
8185 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
8186 "as a performance option which is disabled by default."
8187 msgstr ""
8188 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
8189 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
8190 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
8191
8192 #. type: Plain text
8193 #: build/C/man2/open.2:1424
8194 msgid ""
8195 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
8196 "interface is just stupid, and was probably designed by a deranged monkey on "
8197 "some serious mind-controlling substances.\"\\(emLinus"
8198 msgstr ""
8199 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
8200 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
8201 "な」 \\(em Linus"
8202
8203 #.  FIXME . Check bugzilla report on open(O_ASYNC)
8204 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
8205 #. type: Plain text
8206 #: build/C/man2/open.2:1436
8207 msgid ""
8208 "Currently, it is not possible to enable signal-driven I/O by specifying "
8209 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
8210 msgstr ""
8211 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
8212 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
8213 "すること。"
8214
8215 #. type: Plain text
8216 #: build/C/man2/open.2:1444
8217 msgid ""
8218 "One must check for two different error codes, B<EISDIR> and B<ENOENT>, when "
8219 "trying to determine whether the kernel supports B<O_TMPFILE> functionality."
8220 msgstr ""
8221 "カーネルが B<O_TMPFILE> 機能をサポートしているかを判定する際に、 B<EISDIR> "
8222 "と B<ENOENT> の 2 つのエラーコードをチェックしなければならない。"
8223
8224 #. type: Plain text
8225 #: build/C/man2/open.2:1466
8226 msgid ""
8227 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
8228 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_name_at>(2), "
8229 "B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>"
8230 "(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
8231 msgstr ""
8232 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
8233 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_name_at>(2), "
8234 "B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>"
8235 "(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
8236
8237 #. type: TH
8238 #: build/C/man2/open_by_handle_at.2:25
8239 #, no-wrap
8240 msgid "OPEN_BY_HANDLE_AT"
8241 msgstr "OPEN_BY_HANDLE_AT"
8242
8243 #. type: TH
8244 #: build/C/man2/open_by_handle_at.2:25
8245 #, no-wrap
8246 msgid "2014-03-24"
8247 msgstr "2014-03-24"
8248
8249 #. type: Plain text
8250 #: build/C/man2/open_by_handle_at.2:29
8251 msgid ""
8252 "name_to_handle_at, open_by_handle_at - obtain handle for a pathname and open "
8253 "file via a handle"
8254 msgstr ""
8255
8256 #. type: Plain text
8257 #: build/C/man2/open_by_handle_at.2:35
8258 #, no-wrap
8259 msgid ""
8260 "B<#define _GNU_SOURCE>\n"
8261 "B<#include E<lt>sys/types.hE<gt>>\n"
8262 "B<#include E<lt>sys/stat.hE<gt>>\n"
8263 "B<#include E<lt>fcntl.hE<gt>>\n"
8264 msgstr ""
8265 "B<#define _GNU_SOURCE>\n"
8266 "B<#include E<lt>sys/types.hE<gt>>\n"
8267 "B<#include E<lt>sys/stat.hE<gt>>\n"
8268 "B<#include E<lt>fcntl.hE<gt>>\n"
8269
8270 #. type: Plain text
8271 #: build/C/man2/open_by_handle_at.2:39
8272 #, no-wrap
8273 msgid ""
8274 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8275 "B<                      struct file_handle *>I<handle>B<,>\n"
8276 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
8277 msgstr ""
8278 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8279 "B<                      struct file_handle *>I<handle>B<,>\n"
8280 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
8281
8282 #. type: Plain text
8283 #: build/C/man2/open_by_handle_at.2:42
8284 #, no-wrap
8285 msgid ""
8286 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
8287 "B<                      int >I<flags>B<);>\n"
8288 msgstr ""
8289 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
8290 "B<                      int >I<flags>B<);>\n"
8291
8292 #. type: Plain text
8293 #: build/C/man2/open_by_handle_at.2:59
8294 msgid ""
8295 "The B<name_to_handle_at>()  and B<open_by_handle_at>()  system calls split "
8296 "the functionality of B<openat>(2)  into two parts: B<name_to_handle_at>()  "
8297 "returns an opaque handle that corresponds to a specified file; "
8298 "B<open_by_handle_at>()  opens the file corresponding to a handle returned by "
8299 "a previous call to B<name_to_handle_at>()  and returns an open file "
8300 "descriptor."
8301 msgstr ""
8302
8303 #. type: SS
8304 #: build/C/man2/open_by_handle_at.2:59
8305 #, no-wrap
8306 msgid "name_to_handle_at()"
8307 msgstr ""
8308
8309 #. type: Plain text
8310 #: build/C/man2/open_by_handle_at.2:71
8311 msgid ""
8312 "The B<name_to_handle_at>()  system call returns a file handle and a mount ID "
8313 "corresponding to the file specified by the I<dirfd> and I<pathname> "
8314 "arguments.  The file handle is returned via the argument I<handle>, which is "
8315 "a pointer to a structure of the following form:"
8316 msgstr ""
8317
8318 #. type: Plain text
8319 #: build/C/man2/open_by_handle_at.2:80
8320 #, no-wrap
8321 msgid ""
8322 "struct file_handle {\n"
8323 "    unsigned int  handle_bytes;   /* Size of f_handle [in, out] */\n"
8324 "    int           handle_type;    /* Handle type [out] */\n"
8325 "    unsigned char f_handle[0];    /* File identifier (sized by\n"
8326 "                                     caller) [out] */\n"
8327 "};\n"
8328 msgstr ""
8329
8330 #. type: Plain text
8331 #: build/C/man2/open_by_handle_at.2:99
8332 msgid ""
8333 "It is the caller's responsibility to allocate the structure with a size "
8334 "large enough to hold the handle returned in I<f_handle>.  Before the call, "
8335 "the I<handle_bytes> field should be initialized to contain the allocated "
8336 "size for I<f_handle>.  (The constant B<MAX_HANDLE_SZ>, defined in "
8337 "I<E<lt>fcntl.hE<gt>>, specifies the maximum possible size for a file "
8338 "handle.)  Upon successful return, the I<handle_bytes> field is updated to "
8339 "contain the number of bytes actually written to I<f_handle>."
8340 msgstr ""
8341
8342 #. type: Plain text
8343 #: build/C/man2/open_by_handle_at.2:112
8344 msgid ""
8345 "The caller can discover the required size for the I<file_handle> structure "
8346 "by making a call in which I<handle-E<gt>handle_bytes> is zero; in this case, "
8347 "the call fails with the error B<EOVERFLOW> and I<handle-E<gt>handle_bytes> "
8348 "is set to indicate the required size; the caller can then use this "
8349 "information to allocate a structure of the correct size (see EXAMPLE below)."
8350 msgstr ""
8351
8352 #. type: Plain text
8353 #: build/C/man2/open_by_handle_at.2:123
8354 msgid ""
8355 "Other than the use of the I<handle_bytes> field, the caller should treat the "
8356 "I<file_handle> structure as an opaque data type: the I<handle_type> and "
8357 "I<f_handle> fields are needed only by a subsequent call to "
8358 "B<open_by_handle_at>()."
8359 msgstr ""
8360
8361 #. type: Plain text
8362 #: build/C/man2/open_by_handle_at.2:131
8363 msgid ""
8364 "The I<flags> argument is a bit mask constructed by ORing together zero or "
8365 "more of B<AT_EMPTY_PATH> and B<AT_SYMLINK_FOLLOW>, described below."
8366 msgstr ""
8367
8368 #. type: Plain text
8369 #: build/C/man2/open_by_handle_at.2:138
8370 msgid ""
8371 "Together, the I<pathname> and I<dirfd> arguments identify the file for which "
8372 "a handle is to be obtained.  There are four distinct cases:"
8373 msgstr ""
8374
8375 #. type: Plain text
8376 #: build/C/man2/open_by_handle_at.2:146
8377 msgid ""
8378 "If I<pathname> is a nonempty string containing an absolute pathname, then a "
8379 "handle is returned for the file referred to by that pathname.  In this case, "
8380 "I<dirfd> is ignored."
8381 msgstr ""
8382
8383 #. type: Plain text
8384 #: build/C/man2/open_by_handle_at.2:157
8385 msgid ""
8386 "If I<pathname> is a nonempty string containing a relative pathname and "
8387 "I<dirfd> has the special value B<AT_FDCWD>, then I<pathname> is interpreted "
8388 "relative to the current working directory of the caller, and a handle is "
8389 "returned for the file to which it refers."
8390 msgstr ""
8391 "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> が特別な値 "
8392 "B<AT_FDCWD> の場合、 I<pathname> は呼び出し元のカレントワーキングディレクトリ"
8393 "に対する相対パスと解釈され、 そのファイルを参照するハンドルが返される。"
8394
8395 #. type: Plain text
8396 #: build/C/man2/open_by_handle_at.2:170
8397 msgid ""
8398 "If I<pathname> is a nonempty string containing a relative pathname and "
8399 "I<dirfd> is a file descriptor referring to a directory, then I<pathname> is "
8400 "interpreted relative to the directory referred to by I<dirfd>, and a handle "
8401 "is returned for the file to which it refers.  (See B<openat>(3)  for an "
8402 "explanation of why \"directory file descriptors\" are useful.)"
8403 msgstr ""
8404
8405 #. type: Plain text
8406 #: build/C/man2/open_by_handle_at.2:184
8407 msgid ""
8408 "If I<pathname> is an empty string and I<flags> specifies the value "
8409 "B<AT_EMPTY_PATH>, then I<dirfd> can be an open file descriptor referring to "
8410 "any type of file, or B<AT_FDCWD>, meaning the current working directory, and "
8411 "a handle is returned for the file to which it refers."
8412 msgstr ""
8413
8414 #. type: Plain text
8415 #: build/C/man2/open_by_handle_at.2:196
8416 msgid ""
8417 "The I<mount_id> argument returns an identifier for the filesystem mount that "
8418 "corresponds to I<pathname>.  This corresponds to the first field in one of "
8419 "the records in I</proc/self/mountinfo>.  Opening the pathname in the fifth "
8420 "field of that record yields a file descriptor for the mount point; that file "
8421 "descriptor can be used in a subsequent call to B<open_by_handle_at>()."
8422 msgstr ""
8423
8424 #. type: Plain text
8425 #: build/C/man2/open_by_handle_at.2:209
8426 msgid ""
8427 "By default, B<name_to_handle_at>()  does not dereference I<pathname> if it "
8428 "is a symbolic link, and thus returns a handle for the link itself.  If "
8429 "B<AT_SYMLINK_FOLLOW> is specified in I<flags>, I<pathname> is dereferenced "
8430 "if it is a symbolic link (so that the call returns a handle for the file "
8431 "referred to by the link)."
8432 msgstr ""
8433
8434 #. type: SS
8435 #: build/C/man2/open_by_handle_at.2:209
8436 #, no-wrap
8437 msgid "open_by_handle_at()"
8438 msgstr ""
8439
8440 #. type: Plain text
8441 #: build/C/man2/open_by_handle_at.2:216
8442 msgid ""
8443 "The B<open_by_handle_at>()  system call opens the file referred to by "
8444 "I<handle>, a file handle returned by a previous call to B<name_to_handle_at>"
8445 "()."
8446 msgstr ""
8447
8448 #. type: Plain text
8449 #: build/C/man2/open_by_handle_at.2:226
8450 msgid ""
8451 "The I<mount_fd> argument is a file descriptor for any object (file, "
8452 "directory, etc.)  in the mounted filesystem with respect to which I<handle> "
8453 "should be interpreted.  The special value B<AT_FDCWD> can be specified, "
8454 "meaning the current working directory of the caller."
8455 msgstr ""
8456
8457 #. type: Plain text
8458 #: build/C/man2/open_by_handle_at.2:239
8459 msgid ""
8460 "The I<flags> argument is as for B<open>(2).  If I<handle> refers to a "
8461 "symbolic link, the caller must specify the B<O_PATH> flag, and the symbolic "
8462 "link is not dereferenced; the B<O_NOFOLLOW> flag, if specified, is ignored."
8463 msgstr ""
8464
8465 #. type: Plain text
8466 #: build/C/man2/open_by_handle_at.2:245
8467 msgid ""
8468 "The caller must have the B<CAP_DAC_READ_SEARCH> capability to invoke "
8469 "B<open_by_handle_at>()."
8470 msgstr ""
8471
8472 #. type: Plain text
8473 #: build/C/man2/open_by_handle_at.2:252
8474 msgid ""
8475 "On success, B<name_to_handle_at>()  returns 0, and B<open_by_handle_at>()  "
8476 "returns a nonnegative file descriptor."
8477 msgstr ""
8478
8479 #. type: Plain text
8480 #: build/C/man2/open_by_handle_at.2:256
8481 msgid ""
8482 "In the event of an error, both system calls return -1 and set I<errno> to "
8483 "indicate the cause of the error."
8484 msgstr ""
8485
8486 #. type: Plain text
8487 #: build/C/man2/open_by_handle_at.2:263
8488 msgid ""
8489 "B<name_to_handle_at>()  and B<open_by_handle_at>()  can fail for the same "
8490 "errors as B<openat>(2).  In addition, they can fail with the errors noted "
8491 "below."
8492 msgstr ""
8493
8494 #. type: Plain text
8495 #: build/C/man2/open_by_handle_at.2:266
8496 msgid "B<name_to_handle_at>()  can fail with the following errors:"
8497 msgstr ""
8498
8499 #. type: Plain text
8500 #: build/C/man2/open_by_handle_at.2:273
8501 msgid ""
8502 "I<pathname>, I<mount_id>, or I<handle> points outside your accessible "
8503 "address space."
8504 msgstr ""
8505 "I<pathname>, I<mount_id>, I<handle> のどれかがアクセス可能なアドレス空間の外"
8506 "を指している。"
8507
8508 #. type: Plain text
8509 #: build/C/man2/open_by_handle_at.2:277
8510 msgid "I<flags> includes an invalid bit value."
8511 msgstr ""
8512
8513 #. type: Plain text
8514 #: build/C/man2/open_by_handle_at.2:282
8515 msgid "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ>."
8516 msgstr ""
8517
8518 #. type: Plain text
8519 #: build/C/man2/open_by_handle_at.2:289
8520 msgid ""
8521 "I<pathname> is an empty string, but B<AT_EMPTY_PATH> was not specified in "
8522 "I<flags>."
8523 msgstr ""
8524 "I<pathname> が空文字列だが、 I<flags> に B<AT_EMPTY_PATH> がされていなかっ"
8525 "た。"
8526
8527 #. type: Plain text
8528 #: build/C/man2/open_by_handle_at.2:301
8529 msgid ""
8530 "The file descriptor supplied in I<dirfd> does not refer to a directory, and "
8531 "it is not the case that both I<flags> includes B<AT_EMPTY_PATH> and "
8532 "I<pathname> is an empty string."
8533 msgstr ""
8534
8535 #. type: Plain text
8536 #: build/C/man2/open_by_handle_at.2:304
8537 msgid ""
8538 "The filesystem does not support decoding of a pathname to a file handle."
8539 msgstr ""
8540
8541 #. type: Plain text
8542 #: build/C/man2/open_by_handle_at.2:314
8543 msgid ""
8544 "The I<handle-E<gt>handle_bytes> value passed into the call was too small.  "
8545 "When this error occurs, I<handle-E<gt>handle_bytes> is updated to indicate "
8546 "the required size for the handle."
8547 msgstr ""
8548
8549 #. type: Plain text
8550 #: build/C/man2/open_by_handle_at.2:317
8551 msgid "B<open_by_handle_at>()  can fail with the following errors:"
8552 msgstr ""
8553
8554 #. type: Plain text
8555 #: build/C/man2/open_by_handle_at.2:321
8556 msgid "I<mount_fd> is not an open file descriptor."
8557 msgstr "I<mount_fd> がオープンされたファイルディスクリプタでない。"
8558
8559 #. type: Plain text
8560 #: build/C/man2/open_by_handle_at.2:325
8561 msgid "I<handle> points outside your accessible address space."
8562 msgstr "I<handle> がアクセス可能なアドレス空間の外を指している。"
8563
8564 #. type: Plain text
8565 #: build/C/man2/open_by_handle_at.2:331
8566 msgid ""
8567 "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ> or is equal to "
8568 "zero."
8569 msgstr ""
8570
8571 #. type: Plain text
8572 #: build/C/man2/open_by_handle_at.2:338
8573 msgid ""
8574 "I<handle> refers to a symbolic link, but B<O_PATH> was not specified in "
8575 "I<flags>."
8576 msgstr ""
8577 "I<handle> がシンボリックリンクを参照しているが、 I<flags> に B<O_PATH> がされ"
8578 "ていなかった。"
8579
8580 #. type: Plain text
8581 #: build/C/man2/open_by_handle_at.2:343
8582 msgid "The caller does not have the B<CAP_DAC_READ_SEARCH> capability."
8583 msgstr "呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていない。"
8584
8585 #. type: TP
8586 #: build/C/man2/open_by_handle_at.2:343
8587 #, no-wrap
8588 msgid "B<ESTALE>"
8589 msgstr "B<ESTALE>"
8590
8591 #. type: Plain text
8592 #: build/C/man2/open_by_handle_at.2:349
8593 msgid ""
8594 "The specified I<handle> is not valid.  This error will occur if, for "
8595 "example, the file has been deleted."
8596 msgstr ""
8597
8598 #. type: Plain text
8599 #: build/C/man2/open_by_handle_at.2:352
8600 msgid ""
8601 "These system calls first appeared in Linux 2.6.39.  Library support is "
8602 "provided in glibc since version 2.14."
8603 msgstr ""
8604 "これらのシステムコールは Linux 2.6.39 で初めて登場した。ライブラリによるサ"
8605 "ポートはバージョン 2.14 以降の glibc で提供されている。"
8606
8607 #. type: Plain text
8608 #: build/C/man2/open_by_handle_at.2:354
8609 msgid "These system calls are nonstandard Linux extensions."
8610 msgstr ""
8611
8612 #. type: Plain text
8613 #: build/C/man2/open_by_handle_at.2:359
8614 msgid ""
8615 "A file handle can be generated in one process using B<name_to_handle_at>()  "
8616 "and later used in a different process that calls B<open_by_handle_at>()."
8617 msgstr ""
8618
8619 #. type: Plain text
8620 #: build/C/man2/open_by_handle_at.2:365
8621 msgid ""
8622 "Some filesystem don't support the translation of pathnames to file handles, "
8623 "for example, I</proc>, I</sys>, and various network filesystems."
8624 msgstr ""
8625
8626 #. type: Plain text
8627 #: build/C/man2/open_by_handle_at.2:372
8628 msgid ""
8629 "A file handle may become invalid (\"stale\") if a file is deleted, or for "
8630 "other filesystem-specific reasons.  Invalid handles are notified by an "
8631 "B<ESTALE> error from B<open_by_handle_at>()."
8632 msgstr ""
8633
8634 #.  https://lwn.net/Articles/375888/
8635 #.      "Open by handle" - Jonathan Corbet, 2010-02-23
8636 #. type: Plain text
8637 #: build/C/man2/open_by_handle_at.2:382
8638 msgid ""
8639 "These system calls are designed for use by user-space file servers.  For "
8640 "example, a user-space NFS server might generate a file handle and pass it to "
8641 "an NFS client.  Later, when the client wants to open the file, it could pass "
8642 "the handle back to the server.  This sort of functionality allows a user-"
8643 "space file server to operate in a stateless fashion with respect to the "
8644 "files it serves."
8645 msgstr ""
8646
8647 #.  commit bcda76524cd1fa32af748536f27f674a13e56700
8648 #. type: Plain text
8649 #: build/C/man2/open_by_handle_at.2:404
8650 msgid ""
8651 "If I<pathname> refers to a symbolic link and I<flags> does not specify "
8652 "B<AT_SYMLINK_FOLLOW>, then B<name_to_handle_at>()  returns a handle for the "
8653 "link (rather than the file to which it refers).  The process receiving the "
8654 "handle can later perform operations on the symbolic link by converting the "
8655 "handle to a file descriptor using B<open_by_handle_at>()  with the B<O_PATH> "
8656 "flag, and then passing the file descriptor as the I<dirfd> argument in "
8657 "system calls such as B<readlinkat>(2)  and B<fchownat>(2)."
8658 msgstr ""
8659
8660 #. type: SS
8661 #: build/C/man2/open_by_handle_at.2:404
8662 #, no-wrap
8663 msgid "Obtaining a persistent filesystem ID"
8664 msgstr ""
8665
8666 #. type: Plain text
8667 #: build/C/man2/open_by_handle_at.2:418
8668 msgid ""
8669 "The mount IDs in I</proc/self/mountinfo> can be reused as filesystems are "
8670 "unmounted and mounted.  Therefore, the mount ID returned by "
8671 "B<name_to_handle_at>()  (in I<*mount_id>)  should not be treated as a "
8672 "persistent identifier for the corresponding mounted filesystem.  However, an "
8673 "application can use the information in the I<mountinfo> record that "
8674 "corresponds to the mount ID to derive a persistent identifier."
8675 msgstr ""
8676
8677 #.  e.g., http://stackoverflow.com/questions/6748429/using-libblkid-to-find-uuid-of-a-partition
8678 #. type: Plain text
8679 #: build/C/man2/open_by_handle_at.2:434
8680 msgid ""
8681 "For example, one can use the device name in the fifth field of the "
8682 "I<mountinfo> record to search for the corresponding device UUID via the "
8683 "symbolic links in I</dev/disks/by-uuid>.  (A more comfortable way of "
8684 "obtaining the UUID is to use the B<libblkid>(3)  library.)  That process can "
8685 "then be reversed, using the UUID to look up the device name, and then "
8686 "obtaining the corresponding mount point, in order to produce the I<mount_fd> "
8687 "argument used by B<open_by_handle_at>()."
8688 msgstr ""
8689
8690 #. type: Plain text
8691 #: build/C/man2/open_by_handle_at.2:446
8692 msgid ""
8693 "The two programs below demonstrate the use of B<name_to_handle_at>()  and "
8694 "B<open_by_handle_at>().  The first program (I<t_name_to_handle_at.c>)  uses "
8695 "B<name_to_handle_at>()  to obtain the file handle and mount ID for the file "
8696 "specified in its command-line argument; the handle and mount ID are written "
8697 "to standard output."
8698 msgstr ""
8699
8700 #. type: Plain text
8701 #: build/C/man2/open_by_handle_at.2:466
8702 msgid ""
8703 "The second program (I<t_open_by_handle_at.c>)  reads a mount ID and file "
8704 "handle from standard input.  The program then employs B<open_by_handle_at>"
8705 "()  to open the file using that handle.  If an optional command-line "
8706 "argument is supplied, then the I<mount_fd> argument for B<open_by_handle_at>"
8707 "()  is obtained by opening the directory named in that argument.  Otherwise, "
8708 "I<mount_fd> is obtained by scanning I</proc/self/mountinfo> to find a record "
8709 "whose mount ID matches the mount ID read from standard input, and the mount "
8710 "directory specified in that record is opened.  (These programs do not deal "
8711 "with the fact that mount IDs are not persistent.)"
8712 msgstr ""
8713
8714 #. type: Plain text
8715 #: build/C/man2/open_by_handle_at.2:468
8716 msgid "The following shell session demonstrates the use of these two programs:"
8717 msgstr "以下のシェルセッションは、これら 2 つのプログラムの使用例である。"
8718
8719 #. type: Plain text
8720 #: build/C/man2/open_by_handle_at.2:478
8721 #, no-wrap
8722 msgid ""
8723 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8724 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
8725 "$ B<./t_open_by_handle_at E<lt> fh>\n"
8726 "open_by_handle_at: Operation not permitted\n"
8727 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
8728 "Read 31 bytes\n"
8729 "$ B<rm cecilia.txt>\n"
8730 msgstr ""
8731 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8732 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
8733 "$ B<./t_open_by_handle_at E<lt> fh>\n"
8734 "open_by_handle_at: Operation not permitted\n"
8735 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
8736 "Read 31 bytes\n"
8737 "$ B<rm cecilia.txt>\n"
8738
8739 #.  Christoph Hellwig: That's why the file handles contain a generation
8740 #.  counter that gets incremented in this case.
8741 #. type: Plain text
8742 #: build/C/man2/open_by_handle_at.2:489
8743 msgid ""
8744 "Now we delete and (quickly) re-create the file so that it has the same "
8745 "content and (by chance) the same inode.  Nevertheless, B<open_by_handle_at>"
8746 "()  recognizes that the original file referred to by the file handle no "
8747 "longer exists."
8748 msgstr ""
8749
8750 #. type: Plain text
8751 #: build/C/man2/open_by_handle_at.2:500
8752 #, no-wrap
8753 msgid ""
8754 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
8755 "4072121\n"
8756 "$ B<rm cecilia.txt>\n"
8757 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8758 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
8759 "4072121\n"
8760 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
8761 "open_by_handle_at: Stale NFS file handle\n"
8762 msgstr ""
8763 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
8764 "4072121\n"
8765 "$ B<rm cecilia.txt>\n"
8766 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
8767 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
8768 "4072121\n"
8769 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
8770 "open_by_handle_at: Stale NFS file handle\n"
8771
8772 #. type: SS
8773 #: build/C/man2/open_by_handle_at.2:502
8774 #, no-wrap
8775 msgid "Program source: t_name_to_handle_at.c"
8776 msgstr ""
8777
8778 #. type: Plain text
8779 #: build/C/man2/open_by_handle_at.2:514
8780 #, no-wrap
8781 msgid ""
8782 "#define _GNU_SOURCE\n"
8783 "#include E<lt>sys/types.hE<gt>\n"
8784 "#include E<lt>sys/stat.hE<gt>\n"
8785 "#include E<lt>fcntl.hE<gt>\n"
8786 "#include E<lt>stdio.hE<gt>\n"
8787 "#include E<lt>stdlib.hE<gt>\n"
8788 "#include E<lt>unistd.hE<gt>\n"
8789 "#include E<lt>errno.hE<gt>\n"
8790 "#include E<lt>string.hE<gt>\n"
8791 msgstr ""
8792 "#define _GNU_SOURCE\n"
8793 "#include E<lt>sys/types.hE<gt>\n"
8794 "#include E<lt>sys/stat.hE<gt>\n"
8795 "#include E<lt>fcntl.hE<gt>\n"
8796 "#include E<lt>stdio.hE<gt>\n"
8797 "#include E<lt>stdlib.hE<gt>\n"
8798 "#include E<lt>unistd.hE<gt>\n"
8799 "#include E<lt>errno.hE<gt>\n"
8800 "#include E<lt>string.hE<gt>\n"
8801
8802 #. type: Plain text
8803 #: build/C/man2/open_by_handle_at.2:517 build/C/man2/open_by_handle_at.2:590
8804 #, no-wrap
8805 msgid ""
8806 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8807 "                        } while (0)\n"
8808 msgstr ""
8809 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8810 "                        } while (0)\n"
8811
8812 #. type: Plain text
8813 #: build/C/man2/open_by_handle_at.2:524
8814 #, no-wrap
8815 msgid ""
8816 "int\n"
8817 "main(int argc, char *argv[])\n"
8818 "{\n"
8819 "    struct file_handle *fhp;\n"
8820 "    int mount_id, fhsize, flags, dirfd, j;\n"
8821 "    char *pathname;\n"
8822 msgstr ""
8823 "int\n"
8824 "main(int argc, char *argv[])\n"
8825 "{\n"
8826 "    struct file_handle *fhp;\n"
8827 "    int mount_id, fhsize, flags, dirfd, j;\n"
8828 "    char *pathname;\n"
8829
8830 #. type: Plain text
8831 #: build/C/man2/open_by_handle_at.2:529
8832 #, no-wrap
8833 msgid ""
8834 "    if (argc != 2) {\n"
8835 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
8836 "        exit(EXIT_FAILURE);\n"
8837 "    }\n"
8838 msgstr ""
8839 "    if (argc != 2) {\n"
8840 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
8841 "        exit(EXIT_FAILURE);\n"
8842 "    }\n"
8843
8844 #. type: Plain text
8845 #: build/C/man2/open_by_handle_at.2:531
8846 #, no-wrap
8847 msgid "    pathname = argv[1];\n"
8848 msgstr "    pathname = argv[1];\n"
8849
8850 #. type: Plain text
8851 #: build/C/man2/open_by_handle_at.2:533
8852 #, no-wrap
8853 msgid "    /* Allocate file_handle structure */\n"
8854 msgstr "    /* Allocate file_handle structure */\n"
8855
8856 #. type: Plain text
8857 #: build/C/man2/open_by_handle_at.2:538
8858 #, no-wrap
8859 msgid ""
8860 "    fhsize = sizeof(*fhp);\n"
8861 "    fhp = malloc(fhsize);\n"
8862 "    if (fhp == NULL)\n"
8863 "        errExit(\"malloc\");\n"
8864 msgstr ""
8865 "    fhsize = sizeof(*fhp);\n"
8866 "    fhp = malloc(fhsize);\n"
8867 "    if (fhp == NULL)\n"
8868 "        errExit(\"malloc\");\n"
8869
8870 #. type: Plain text
8871 #: build/C/man2/open_by_handle_at.2:541
8872 #, no-wrap
8873 msgid ""
8874 "    /* Make an initial call to name_to_handle_at() to discover\n"
8875 "       the size required for file handle */\n"
8876 msgstr ""
8877 "    /* Make an initial call to name_to_handle_at() to discover\n"
8878 "       the size required for file handle */\n"
8879
8880 #. type: Plain text
8881 #: build/C/man2/open_by_handle_at.2:550
8882 #, no-wrap
8883 msgid ""
8884 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
8885 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
8886 "    fhp-E<gt>handle_bytes = 0;\n"
8887 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
8888 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
8889 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
8890 "        exit(EXIT_FAILURE);\n"
8891 "    }\n"
8892 msgstr ""
8893 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
8894 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
8895 "    fhp-E<gt>handle_bytes = 0;\n"
8896 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
8897 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
8898 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
8899 "        exit(EXIT_FAILURE);\n"
8900 "    }\n"
8901
8902 #. type: Plain text
8903 #: build/C/man2/open_by_handle_at.2:552
8904 #, no-wrap
8905 msgid "    /* Reallocate file_handle structure with correct size */\n"
8906 msgstr "    /* Reallocate file_handle structure with correct size */\n"
8907
8908 #. type: Plain text
8909 #: build/C/man2/open_by_handle_at.2:557
8910 #, no-wrap
8911 msgid ""
8912 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
8913 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
8914 "    if (fhp == NULL)\n"
8915 "        errExit(\"realloc\");\n"
8916 msgstr ""
8917 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
8918 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
8919 "    if (fhp == NULL)\n"
8920 "        errExit(\"realloc\");\n"
8921
8922 #. type: Plain text
8923 #: build/C/man2/open_by_handle_at.2:559
8924 #, no-wrap
8925 msgid "    /* Get file handle from pathname supplied on command line */\n"
8926 msgstr "    /* Get file handle from pathname supplied on command line */\n"
8927
8928 #. type: Plain text
8929 #: build/C/man2/open_by_handle_at.2:562
8930 #, no-wrap
8931 msgid ""
8932 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
8933 "        errExit(\"name_to_handle_at\");\n"
8934 msgstr ""
8935 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
8936 "        errExit(\"name_to_handle_at\");\n"
8937
8938 #. type: Plain text
8939 #: build/C/man2/open_by_handle_at.2:565
8940 #, no-wrap
8941 msgid ""
8942 "    /* Write mount ID, file handle size, and file handle to stdout,\n"
8943 "       for later reuse by t_open_by_handle_at.c */\n"
8944 msgstr ""
8945 "    /* Write mount ID, file handle size, and file handle to stdout,\n"
8946 "       for later reuse by t_open_by_handle_at.c */\n"
8947
8948 #. type: Plain text
8949 #: build/C/man2/open_by_handle_at.2:571
8950 #, no-wrap
8951 msgid ""
8952 "    printf(\"%d\\en\", mount_id);\n"
8953 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
8954 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
8955 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
8956 "    printf(\"\\en\");\n"
8957 msgstr ""
8958 "    printf(\"%d\\en\", mount_id);\n"
8959 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
8960 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
8961 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
8962 "    printf(\"\\en\");\n"
8963
8964 #. type: SS
8965 #: build/C/man2/open_by_handle_at.2:575
8966 #, no-wrap
8967 msgid "Program source: t_open_by_handle_at.c"
8968 msgstr ""
8969
8970 #. type: Plain text
8971 #: build/C/man2/open_by_handle_at.2:587
8972 #, no-wrap
8973 msgid ""
8974 "#define _GNU_SOURCE\n"
8975 "#include E<lt>sys/types.hE<gt>\n"
8976 "#include E<lt>sys/stat.hE<gt>\n"
8977 "#include E<lt>fcntl.hE<gt>\n"
8978 "#include E<lt>limits.hE<gt>\n"
8979 "#include E<lt>stdio.hE<gt>\n"
8980 "#include E<lt>stdlib.hE<gt>\n"
8981 "#include E<lt>unistd.hE<gt>\n"
8982 "#include E<lt>string.hE<gt>\n"
8983 msgstr ""
8984 "#define _GNU_SOURCE\n"
8985 "#include E<lt>sys/types.hE<gt>\n"
8986 "#include E<lt>sys/stat.hE<gt>\n"
8987 "#include E<lt>fcntl.hE<gt>\n"
8988 "#include E<lt>limits.hE<gt>\n"
8989 "#include E<lt>stdio.hE<gt>\n"
8990 "#include E<lt>stdlib.hE<gt>\n"
8991 "#include E<lt>unistd.hE<gt>\n"
8992 "#include E<lt>string.hE<gt>\n"
8993
8994 #. type: Plain text
8995 #: build/C/man2/open_by_handle_at.2:596
8996 #, no-wrap
8997 msgid ""
8998 "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
8999 "   \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
9000 "   \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
9001 "   Open the corresponding mount path and return the resulting file\n"
9002 "   descriptor. */\n"
9003 msgstr ""
9004 "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
9005 "   \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
9006 "   \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
9007 "   Open the corresponding mount path and return the resulting file\n"
9008 "   descriptor. */\n"
9009
9010 #. type: Plain text
9011 #: build/C/man2/open_by_handle_at.2:606
9012 #, no-wrap
9013 msgid ""
9014 "static int\n"
9015 "open_mount_path_by_id(int mount_id)\n"
9016 "{\n"
9017 "    char *linep;\n"
9018 "    size_t lsize;\n"
9019 "    char mount_path[PATH_MAX];\n"
9020 "    int mi_mount_id, found;\n"
9021 "    ssize_t nread;\n"
9022 "    FILE *fp;\n"
9023 msgstr ""
9024 "static int\n"
9025 "open_mount_path_by_id(int mount_id)\n"
9026 "{\n"
9027 "    char *linep;\n"
9028 "    size_t lsize;\n"
9029 "    char mount_path[PATH_MAX];\n"
9030 "    int mi_mount_id, found;\n"
9031 "    ssize_t nread;\n"
9032 "    FILE *fp;\n"
9033
9034 #. type: Plain text
9035 #: build/C/man2/open_by_handle_at.2:610
9036 #, no-wrap
9037 msgid ""
9038 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
9039 "    if (fp == NULL)\n"
9040 "        errExit(\"fopen\");\n"
9041 msgstr ""
9042 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
9043 "    if (fp == NULL)\n"
9044 "        errExit(\"fopen\");\n"
9045
9046 #. type: Plain text
9047 #: build/C/man2/open_by_handle_at.2:617
9048 #, no-wrap
9049 msgid ""
9050 "    found = 0;\n"
9051 "    linep = NULL;\n"
9052 "    while (!found) {\n"
9053 "        nread = getline(&linep, &lsize, fp);\n"
9054 "        if (nread == -1)\n"
9055 "            break;\n"
9056 msgstr ""
9057 "    found = 0;\n"
9058 "    linep = NULL;\n"
9059 "    while (!found) {\n"
9060 "        nread = getline(&linep, &lsize, fp);\n"
9061 "        if (nread == -1)\n"
9062 "            break;\n"
9063
9064 #. type: Plain text
9065 #: build/C/man2/open_by_handle_at.2:624
9066 #, no-wrap
9067 msgid ""
9068 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
9069 "                       &mi_mount_id, mount_path);\n"
9070 "        if (nread != 2) {\n"
9071 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
9072 "            exit(EXIT_FAILURE);\n"
9073 "        }\n"
9074 msgstr ""
9075 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
9076 "                       &mi_mount_id, mount_path);\n"
9077 "        if (nread != 2) {\n"
9078 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
9079 "            exit(EXIT_FAILURE);\n"
9080 "        }\n"
9081
9082 #. type: Plain text
9083 #: build/C/man2/open_by_handle_at.2:629
9084 #, no-wrap
9085 msgid ""
9086 "        if (mi_mount_id == mount_id)\n"
9087 "            found = 1;\n"
9088 "    }\n"
9089 "    free(linep);\n"
9090 msgstr ""
9091 "        if (mi_mount_id == mount_id)\n"
9092 "            found = 1;\n"
9093 "    }\n"
9094 "    free(linep);\n"
9095
9096 #. type: Plain text
9097 #: build/C/man2/open_by_handle_at.2:631
9098 #, no-wrap
9099 msgid "    fclose(fp);\n"
9100 msgstr "    fclose(fp);\n"
9101
9102 #. type: Plain text
9103 #: build/C/man2/open_by_handle_at.2:636
9104 #, no-wrap
9105 msgid ""
9106 "    if (!found) {\n"
9107 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
9108 "        exit(EXIT_FAILURE);\n"
9109 "    }\n"
9110 msgstr ""
9111 "    if (!found) {\n"
9112 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
9113 "        exit(EXIT_FAILURE);\n"
9114 "    }\n"
9115
9116 #. type: Plain text
9117 #: build/C/man2/open_by_handle_at.2:639
9118 #, no-wrap
9119 msgid ""
9120 "    return open(mount_path, O_RDONLY);\n"
9121 "}\n"
9122 msgstr ""
9123 "    return open(mount_path, O_RDONLY);\n"
9124 "}\n"
9125
9126 #. type: Plain text
9127 #: build/C/man2/open_by_handle_at.2:650
9128 #, no-wrap
9129 msgid ""
9130 "int\n"
9131 "main(int argc, char *argv[])\n"
9132 "{\n"
9133 "    struct file_handle *fhp;\n"
9134 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
9135 "    ssize_t nread;\n"
9136 "    char buf[1000];\n"
9137 "#define LINE_SIZE 100\n"
9138 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
9139 "    char *nextp;\n"
9140 msgstr ""
9141 "int\n"
9142 "main(int argc, char *argv[])\n"
9143 "{\n"
9144 "    struct file_handle *fhp;\n"
9145 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
9146 "    ssize_t nread;\n"
9147 "    char buf[1000];\n"
9148 "#define LINE_SIZE 100\n"
9149 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
9150 "    char *nextp;\n"
9151
9152 #. type: Plain text
9153 #: build/C/man2/open_by_handle_at.2:655
9154 #, no-wrap
9155 msgid ""
9156 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
9157 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
9158 "        exit(EXIT_FAILURE);\n"
9159 "    }\n"
9160 msgstr ""
9161 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
9162 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
9163 "        exit(EXIT_FAILURE);\n"
9164 "    }\n"
9165
9166 #. type: Plain text
9167 #: build/C/man2/open_by_handle_at.2:657
9168 #, no-wrap
9169 msgid "    /* Standard input contains mount ID and file handle information:\n"
9170 msgstr "    /* Standard input contains mount ID and file handle information:\n"
9171
9172 #. type: Plain text
9173 #: build/C/man2/open_by_handle_at.2:661
9174 #, no-wrap
9175 msgid ""
9176 "         Line 1: E<lt>mount_idE<gt>\n"
9177 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
9178 "    */\n"
9179 msgstr ""
9180 "         Line 1: E<lt>mount_idE<gt>\n"
9181 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
9182 "    */\n"
9183
9184 #. type: Plain text
9185 #: build/C/man2/open_by_handle_at.2:667
9186 #, no-wrap
9187 msgid ""
9188 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
9189 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
9190 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
9191 "        exit(EXIT_FAILURE);\n"
9192 "    }\n"
9193 msgstr ""
9194 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
9195 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
9196 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
9197 "        exit(EXIT_FAILURE);\n"
9198 "    }\n"
9199
9200 #. type: Plain text
9201 #: build/C/man2/open_by_handle_at.2:669
9202 #, no-wrap
9203 msgid "    mount_id = atoi(line1);\n"
9204 msgstr "    mount_id = atoi(line1);\n"
9205
9206 #. type: Plain text
9207 #: build/C/man2/open_by_handle_at.2:671
9208 #, no-wrap
9209 msgid "    handle_bytes = strtoul(line2, &nextp, 0);\n"
9210 msgstr "    handle_bytes = strtoul(line2, &nextp, 0);\n"
9211
9212 #. type: Plain text
9213 #: build/C/man2/open_by_handle_at.2:673
9214 #, no-wrap
9215 msgid "    /* Given handle_bytes, we can now allocate file_handle structure */\n"
9216 msgstr "    /* Given handle_bytes, we can now allocate file_handle structure */\n"
9217
9218 #. type: Plain text
9219 #: build/C/man2/open_by_handle_at.2:677
9220 #, no-wrap
9221 msgid ""
9222 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
9223 "    if (fhp == NULL)\n"
9224 "        errExit(\"malloc\");\n"
9225 msgstr ""
9226 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
9227 "    if (fhp == NULL)\n"
9228 "        errExit(\"malloc\");\n"
9229
9230 #. type: Plain text
9231 #: build/C/man2/open_by_handle_at.2:679
9232 #, no-wrap
9233 msgid "    fhp-E<gt>handle_bytes = handle_bytes;\n"
9234 msgstr "    fhp-E<gt>handle_bytes = handle_bytes;\n"
9235
9236 #. type: Plain text
9237 #: build/C/man2/open_by_handle_at.2:681
9238 #, no-wrap
9239 msgid "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
9240 msgstr "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
9241
9242 #. type: Plain text
9243 #: build/C/man2/open_by_handle_at.2:684
9244 #, no-wrap
9245 msgid ""
9246 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9247 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
9248 msgstr ""
9249 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
9250 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
9251
9252 #. type: Plain text
9253 #: build/C/man2/open_by_handle_at.2:689
9254 #, no-wrap
9255 msgid ""
9256 "    /* Obtain file descriptor for mount point, either by opening\n"
9257 "       the pathname specified on the command line, or by scanning\n"
9258 "       /proc/self/mounts to find a mount that matches the \\(aqmount_id\\(aq\n"
9259 "       that we received from stdin. */\n"
9260 msgstr ""
9261 "    /* Obtain file descriptor for mount point, either by opening\n"
9262 "       the pathname specified on the command line, or by scanning\n"
9263 "       /proc/self/mounts to find a mount that matches the \\(aqmount_id\\(aq\n"
9264 "       that we received from stdin. */\n"
9265
9266 #. type: Plain text
9267 #: build/C/man2/open_by_handle_at.2:694
9268 #, no-wrap
9269 msgid ""
9270 "    if (argc E<gt> 1)\n"
9271 "        mount_fd = open(argv[1], O_RDONLY);\n"
9272 "    else\n"
9273 "        mount_fd = open_mount_path_by_id(mount_id);\n"
9274 msgstr ""
9275 "    if (argc E<gt> 1)\n"
9276 "        mount_fd = open(argv[1], O_RDONLY);\n"
9277 "    else\n"
9278 "        mount_fd = open_mount_path_by_id(mount_id);\n"
9279
9280 #. type: Plain text
9281 #: build/C/man2/open_by_handle_at.2:697
9282 #, no-wrap
9283 msgid ""
9284 "    if (mount_fd == -1)\n"
9285 "        errExit(\"opening mount fd\");\n"
9286 msgstr ""
9287 "    if (mount_fd == -1)\n"
9288 "        errExit(\"opening mount fd\");\n"
9289
9290 #. type: Plain text
9291 #: build/C/man2/open_by_handle_at.2:699
9292 #, no-wrap
9293 msgid "    /* Open file using handle and mount point */\n"
9294 msgstr "    /* Open file using handle and mount point */\n"
9295
9296 #. type: Plain text
9297 #: build/C/man2/open_by_handle_at.2:703
9298 #, no-wrap
9299 msgid ""
9300 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
9301 "    if (fd == -1)\n"
9302 "        errExit(\"open_by_handle_at\");\n"
9303 msgstr ""
9304 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
9305 "    if (fd == -1)\n"
9306 "        errExit(\"open_by_handle_at\");\n"
9307
9308 #. type: Plain text
9309 #: build/C/man2/open_by_handle_at.2:705
9310 #, no-wrap
9311 msgid "    /* Try reading a few bytes from the file */\n"
9312 msgstr "    /* Try reading a few bytes from the file */\n"
9313
9314 #. type: Plain text
9315 #: build/C/man2/open_by_handle_at.2:709
9316 #, no-wrap
9317 msgid ""
9318 "    nread = read(fd, buf, sizeof(buf));\n"
9319 "    if (nread == -1)\n"
9320 "        errExit(\"read\");\n"
9321 msgstr ""
9322 "    nread = read(fd, buf, sizeof(buf));\n"
9323 "    if (nread == -1)\n"
9324 "        errExit(\"read\");\n"
9325
9326 #. type: Plain text
9327 #: build/C/man2/open_by_handle_at.2:711
9328 #, no-wrap
9329 msgid "    printf(\"Read %zd bytes\\en\", nread);\n"
9330 msgstr "    printf(\"Read %zd bytes\\en\", nread);\n"
9331
9332 #. type: Plain text
9333 #: build/C/man2/open_by_handle_at.2:721
9334 msgid "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
9335 msgstr "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
9336
9337 #. type: Plain text
9338 #: build/C/man2/open_by_handle_at.2:731
9339 msgid ""
9340 "The I<libblkid> and I<libmount> documentation in the latest I<util-linux> "
9341 "release at E<.UR https://www.kernel.org/pub/linux/utils/util-linux/> E<.UE>"
9342 msgstr ""
9343
9344 #. type: TH
9345 #: build/C/man3/perror.3:31
9346 #, no-wrap
9347 msgid "PERROR"
9348 msgstr "PERROR"
9349
9350 #. type: TH
9351 #: build/C/man3/perror.3:31
9352 #, no-wrap
9353 msgid "2012-04-17"
9354 msgstr "2012-04-17"
9355
9356 #. type: Plain text
9357 #: build/C/man3/perror.3:34
9358 msgid "perror - print a system error message"
9359 msgstr "perror - システムエラーメッセージを出力する"
9360
9361 #. type: Plain text
9362 #: build/C/man3/perror.3:38
9363 msgid "B<void perror(const char *>I<s>B<);>"
9364 msgstr "B<void perror(const char *>I<s>B<);>"
9365
9366 #. type: Plain text
9367 #: build/C/man3/perror.3:40
9368 msgid "B<#include E<lt>errno.hE<gt>>"
9369 msgstr "B<#include E<lt>errno.hE<gt>>"
9370
9371 #. type: Plain text
9372 #: build/C/man3/perror.3:42
9373 msgid "B<const char *>I<sys_errlist>B<[];>"
9374 msgstr "B<const char *>I<sys_errlist>B<[];>"
9375
9376 #. type: Plain text
9377 #: build/C/man3/perror.3:44
9378 msgid "B<int >I<sys_nerr>B<;>"
9379 msgstr "B<int >I<sys_nerr>B<;>"
9380
9381 #. type: Plain text
9382 #: build/C/man3/perror.3:46
9383 msgid "B<int >I<errno>B<;>"
9384 msgstr "B<int >I<errno>B<;>"
9385
9386 #. type: Plain text
9387 #: build/C/man3/perror.3:55
9388 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
9389 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
9390
9391 #. type: Plain text
9392 #: build/C/man3/perror.3:68
9393 msgid ""
9394 "The routine B<perror>()  produces a message on the standard error output, "
9395 "describing the last error encountered during a call to a system or library "
9396 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
9397 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
9398 "blank.  Then the message and a new-line."
9399 msgstr ""
9400 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
9401 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
9402 "(I<s> が NULL でなく、 I<*s> がヌルバイト (\\(aq\\e0\\(aq) でない場合には) 引"
9403 "き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それからメッ"
9404 "セージと改行が出力される。"
9405
9406 #. type: Plain text
9407 #: build/C/man3/perror.3:76
9408 msgid ""
9409 "To be of most use, the argument string should include the name of the "
9410 "function that incurred the error.  The error number is taken from the "
9411 "external variable I<errno>, which is set when errors occur but not cleared "
9412 "when successful calls are made."
9413 msgstr ""
9414 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
9415 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
9416 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
9417
9418 #. type: Plain text
9419 #: build/C/man3/perror.3:90
9420 msgid ""
9421 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
9422 "obtain the error message without the newline.  The largest message number "
9423 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
9424 "this list because new error values may not have been added to I<sys_errlist>"
9425 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
9426 msgstr ""
9427 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
9428 "の\n"
9429 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
9430 "ジ\n"
9431 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
9432 "と。\n"
9433 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
9434 "る。\n"
9435 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
9436
9437 #. type: Plain text
9438 #: build/C/man3/perror.3:111
9439 msgid ""
9440 "When a system call fails, it usually returns -1 and sets the variable "
9441 "I<errno> to a value describing what went wrong.  (These values can be found "
9442 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
9443 "B<perror>()  serves to translate this error code into human-readable form.  "
9444 "Note that I<errno> is undefined after a successful library call: this call "
9445 "may well change this variable, even though it succeeds, for example because "
9446 "it internally used some other library function that failed.  Thus, if a "
9447 "failing call is not immediately followed by a call to B<perror>(), the value "
9448 "of I<errno> should be saved."
9449 msgstr ""
9450 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
9451 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
9452 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
9453 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
9454 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
9455 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
9456 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
9457 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
9458 "い。"
9459
9460 #. type: Plain text
9461 #: build/C/man3/perror.3:124
9462 msgid ""
9463 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
9464 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
9465 "I<sys_errlist> conform to BSD."
9466 msgstr ""
9467 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
9468 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
9469 "に準拠している。"
9470
9471 #.  and only when _BSD_SOURCE is defined.
9472 #.  When
9473 #.  .B _GNU_SOURCE
9474 #.  is defined, the symbols
9475 #.  .I _sys_nerr
9476 #.  and
9477 #.  .I _sys_errlist
9478 #.  are provided.
9479 #. type: Plain text
9480 #: build/C/man3/perror.3:139
9481 msgid ""
9482 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
9483 "I<E<lt>stdio.hE<gt>>."
9484 msgstr ""
9485 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
9486 "I<E<lt>stdio.hE<gt>> に含まれている。"
9487
9488 #. type: Plain text
9489 #: build/C/man3/perror.3:144
9490 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
9491 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
9492
9493 #. type: TH
9494 #: build/C/man2/pipe.2:36
9495 #, no-wrap
9496 msgid "PIPE"
9497 msgstr "PIPE"
9498
9499 #. type: TH
9500 #: build/C/man2/pipe.2:36
9501 #, no-wrap
9502 msgid "2014-02-11"
9503 msgstr "2014-02-11"
9504
9505 #. type: Plain text
9506 #: build/C/man2/pipe.2:39
9507 msgid "pipe, pipe2 - create pipe"
9508 msgstr "pipe, pipe2 - パイプを生成する"
9509
9510 #. type: Plain text
9511 #: build/C/man2/pipe.2:44
9512 #, no-wrap
9513 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
9514 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
9515
9516 #. type: Plain text
9517 #: build/C/man2/pipe.2:48
9518 #, no-wrap
9519 msgid ""
9520 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
9521 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
9522 "B<#include E<lt>unistd.hE<gt>>\n"
9523 msgstr ""
9524 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
9525 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
9526 "B<#include E<lt>unistd.hE<gt>>\n"
9527
9528 #. type: Plain text
9529 #: build/C/man2/pipe.2:50
9530 #, no-wrap
9531 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
9532 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
9533
9534 #. type: Plain text
9535 #: build/C/man2/pipe.2:66
9536 msgid ""
9537 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
9538 "for interprocess communication.  The array I<pipefd> is used to return two "
9539 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
9540 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
9541 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
9542 "until it is read from the read end of the pipe.  For further details, see "
9543 "B<pipe>(7)."
9544 msgstr ""
9545 "B<pipe>()  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
9546 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
9547 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
9548 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
9549 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
9550 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
9551
9552 #. type: Plain text
9553 #: build/C/man2/pipe.2:76
9554 msgid ""
9555 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
9556 "values can be bitwise ORed in I<flags> to obtain different behavior:"
9557 msgstr ""
9558 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
9559 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
9560 "きる。"
9561
9562 #. type: TP
9563 #: build/C/man2/pipe.2:76
9564 #, no-wrap
9565 msgid "B<O_CLOEXEC>"
9566 msgstr "B<O_CLOEXEC>"
9567
9568 #. type: Plain text
9569 #: build/C/man2/pipe.2:84
9570 msgid ""
9571 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
9572 "descriptors.  See the description of the same flag in B<open>(2)  for "
9573 "reasons why this may be useful."
9574 msgstr ""
9575 "新しく生成される二つのファイルディスクリプタの close-on-exec "
9576 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
9577 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
9578
9579 #. type: TP
9580 #: build/C/man2/pipe.2:84
9581 #, no-wrap
9582 msgid "B<O_DIRECT> (since Linux 3.4)"
9583 msgstr "B<O_DIRECT> (Linux 3.4 以降)"
9584
9585 #.  commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
9586 #. type: Plain text
9587 #: build/C/man2/pipe.2:94
9588 msgid ""
9589 "Create a pipe that performs I/O in \"packet\" mode.  Each B<write>(2)  to "
9590 "the pipe is dealt with as a separate packet, and B<read>(2)s from the pipe "
9591 "will read one packet at a time.  Note the following points:"
9592 msgstr ""
9593 "「パケット」モードで入出力を行うパイプを作成する。 このパイプへの B<write>"
9594 "(2) それぞれが別のパケットとして扱われ、 このパイプからの B<read>(2) では一度"
9595 "に一つパケットが読み出される。 以下の点に注意すること。"
9596
9597 #. type: Plain text
9598 #: build/C/man2/pipe.2:101
9599 msgid ""
9600 "Writes of greater than B<PIPE_BUF> bytes (see B<pipe>(7))  will be split "
9601 "into multiple packets."
9602 msgstr ""
9603 "B<PIPE_BUF> バイト (B<pipe>(7) 参照) より大きいデータを書き込んだ場合、複数の"
9604 "パケットに分割される。"
9605
9606 #. type: Plain text
9607 #: build/C/man2/pipe.2:111
9608 msgid ""
9609 "If a B<read>(2)  specifies a buffer size that is smaller than the next "
9610 "packet, then the requested number of bytes are read, and the excess bytes in "
9611 "the packet are discarded.  Specifying a buffer size of B<PIPE_BUF> will be "
9612 "sufficient to read the largest possible packets (see the previous point)."
9613 msgstr ""
9614 "B<read>(2) で次のパケットよりも小さなバッファサイズを指定した場合、要求された"
9615 "バイト数のデータが読み出され、そのパケットの超過分のバイトは破棄される。 可能"
9616 "性のある最大サイズのパケットを読み出すには、B<PIPE_BUF> のバッファサイズを指"
9617 "定すれば十分である (上の項目を参照)。"
9618
9619 #. type: Plain text
9620 #: build/C/man2/pipe.2:116
9621 msgid ""
9622 "Zero-length packets are not supported.  (A B<read>(2)  that specifies a "
9623 "buffer size of zero is a no-op, and returns 0.)"
9624 msgstr ""
9625 "長さ 0 のパケットはサポートされていない。 (バッファサイズ 0 を指定した "
9626 "B<read>(2) は何も行わず 0 を返す)。"
9627
9628 #. type: Plain text
9629 #: build/C/man2/pipe.2:121
9630 msgid ""
9631 "Older kernels that do not support this flag will indicate this via an "
9632 "B<EINVAL> error."
9633 msgstr ""
9634 "このフラグをサポートしていない古いカーネルでは、エラー B<EINVAL> が返る。これ"
9635 "によりカーネルがサポートしていないことが分かる。"
9636
9637 #. type: TP
9638 #: build/C/man2/pipe.2:121
9639 #, no-wrap
9640 msgid "B<O_NONBLOCK>"
9641 msgstr "B<O_NONBLOCK>"
9642
9643 #. type: Plain text
9644 #: build/C/man2/pipe.2:129
9645 msgid ""
9646 "Set the B<O_NONBLOCK> file status flag on the two new open file "
9647 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
9648 "the same result."
9649 msgstr ""
9650 "新しく生成される二つのオープンファイル記述 (open file description) の "
9651 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
9652 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
9653 "なる。"
9654
9655 #. type: Plain text
9656 #: build/C/man2/pipe.2:139
9657 msgid "I<pipefd> is not valid."
9658 msgstr "I<pipefd> が無効な値である。"
9659
9660 #. type: Plain text
9661 #: build/C/man2/pipe.2:144
9662 msgid "(B<pipe2>())  Invalid value in I<flags>."
9663 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
9664
9665 #. type: Plain text
9666 #: build/C/man2/pipe.2:147
9667 msgid "Too many file descriptors are in use by the process."
9668 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
9669
9670 #. type: Plain text
9671 #: build/C/man2/pipe.2:155
9672 msgid ""
9673 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
9674 "starting with version 2.9."
9675 msgstr ""
9676 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
9677 "はバージョン 2.9 以降で利用できる。"
9678
9679 #. type: Plain text
9680 #: build/C/man2/pipe.2:158
9681 msgid "B<pipe>(): POSIX.1-2001."
9682 msgstr "B<pipe>(): POSIX.1-2001."
9683
9684 #. type: Plain text
9685 #: build/C/man2/pipe.2:161
9686 msgid "B<pipe2>()  is Linux-specific."
9687 msgstr "B<pipe2>()  は Linux 固有である。"
9688
9689 #.  fork.2 refers to this example program.
9690 #. type: Plain text
9691 #: build/C/man2/pipe.2:177
9692 msgid ""
9693 "The following program creates a pipe, and then B<fork>(2)s to create a child "
9694 "process; the child inherits a duplicate set of file descriptors that refer "
9695 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
9696 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
9697 "the string contained in the program's command-line argument to the pipe, and "
9698 "the child reads this string a byte at a time from the pipe and echoes it on "
9699 "standard output."
9700 msgstr ""
9701 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
9702 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
9703 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
9704 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
9705 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
9706 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
9707
9708 #. type: Plain text
9709 #: build/C/man2/pipe.2:185
9710 #, no-wrap
9711 msgid ""
9712 "#include E<lt>sys/types.hE<gt>\n"
9713 "#include E<lt>sys/wait.hE<gt>\n"
9714 "#include E<lt>stdio.hE<gt>\n"
9715 "#include E<lt>stdlib.hE<gt>\n"
9716 "#include E<lt>unistd.hE<gt>\n"
9717 "#include E<lt>string.hE<gt>\n"
9718 msgstr ""
9719 "#include E<lt>sys/types.hE<gt>\n"
9720 "#include E<lt>sys/wait.hE<gt>\n"
9721 "#include E<lt>stdio.hE<gt>\n"
9722 "#include E<lt>stdlib.hE<gt>\n"
9723 "#include E<lt>unistd.hE<gt>\n"
9724 "#include E<lt>string.hE<gt>\n"
9725
9726 #. type: Plain text
9727 #: build/C/man2/pipe.2:192
9728 #, no-wrap
9729 msgid ""
9730 "int\n"
9731 "main(int argc, char *argv[])\n"
9732 "{\n"
9733 "    int pipefd[2];\n"
9734 "    pid_t cpid;\n"
9735 "    char buf;\n"
9736 msgstr ""
9737 "int\n"
9738 "main(int argc, char *argv[])\n"
9739 "{\n"
9740 "    int pipefd[2];\n"
9741 "    pid_t cpid;\n"
9742 "    char buf;\n"
9743
9744 #. type: Plain text
9745 #: build/C/man2/pipe.2:197
9746 #, no-wrap
9747 msgid ""
9748 "    if (argc != 2) {\n"
9749 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
9750 "        exit(EXIT_FAILURE);\n"
9751 "    }\n"
9752 msgstr ""
9753 "    if (argc != 2) {\n"
9754 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
9755 "        exit(EXIT_FAILURE);\n"
9756 "    }\n"
9757
9758 #. type: Plain text
9759 #: build/C/man2/pipe.2:202
9760 #, no-wrap
9761 msgid ""
9762 "    if (pipe(pipefd) == -1) {\n"
9763 "        perror(\"pipe\");\n"
9764 "        exit(EXIT_FAILURE);\n"
9765 "    }\n"
9766 msgstr ""
9767 "    if (pipe(pipefd) == -1) {\n"
9768 "        perror(\"pipe\");\n"
9769 "        exit(EXIT_FAILURE);\n"
9770 "    }\n"
9771
9772 #. type: Plain text
9773 #: build/C/man2/pipe.2:208
9774 #, no-wrap
9775 msgid ""
9776 "    cpid = fork();\n"
9777 "    if (cpid == -1) {\n"
9778 "        perror(\"fork\");\n"
9779 "        exit(EXIT_FAILURE);\n"
9780 "    }\n"
9781 msgstr ""
9782 "    cpid = fork();\n"
9783 "    if (cpid == -1) {\n"
9784 "        perror(\"fork\");\n"
9785 "        exit(EXIT_FAILURE);\n"
9786 "    }\n"
9787
9788 #. type: Plain text
9789 #: build/C/man2/pipe.2:211
9790 #, no-wrap
9791 msgid ""
9792 "    if (cpid == 0) {    /* Child reads from pipe */\n"
9793 "        close(pipefd[1]);          /* Close unused write end */\n"
9794 msgstr ""
9795 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
9796 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
9797
9798 #. type: Plain text
9799 #: build/C/man2/pipe.2:214
9800 #, no-wrap
9801 msgid ""
9802 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
9803 "            write(STDOUT_FILENO, &buf, 1);\n"
9804 msgstr ""
9805 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
9806 "            write(STDOUT_FILENO, &buf, 1);\n"
9807
9808 #. type: Plain text
9809 #: build/C/man2/pipe.2:218
9810 #, no-wrap
9811 msgid ""
9812 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
9813 "        close(pipefd[0]);\n"
9814 "        _exit(EXIT_SUCCESS);\n"
9815 msgstr ""
9816 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
9817 "        close(pipefd[0]);\n"
9818 "        _exit(EXIT_SUCCESS);\n"
9819
9820 #. type: Plain text
9821 #: build/C/man2/pipe.2:227
9822 #, no-wrap
9823 msgid ""
9824 "    } else {            /* Parent writes argv[1] to pipe */\n"
9825 "        close(pipefd[0]);          /* Close unused read end */\n"
9826 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
9827 "        close(pipefd[1]);          /* Reader will see EOF */\n"
9828 "        wait(NULL);                /* Wait for child */\n"
9829 "        exit(EXIT_SUCCESS);\n"
9830 "    }\n"
9831 "}\n"
9832 msgstr ""
9833 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
9834 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
9835 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
9836 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
9837 "        wait(NULL);                /* 子プロセスを待つ */\n"
9838 "        exit(EXIT_SUCCESS);\n"
9839 "    }\n"
9840 "}\n"
9841
9842 #. type: Plain text
9843 #: build/C/man2/pipe.2:235
9844 msgid ""
9845 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
9846 "(7)"
9847 msgstr ""
9848 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
9849 "(7)"
9850
9851 #. type: TH
9852 #: build/C/man3/popen.3:40
9853 #, no-wrap
9854 msgid "POPEN"
9855 msgstr "POPEN"
9856
9857 #. type: Plain text
9858 #: build/C/man3/popen.3:43
9859 msgid "popen, pclose - pipe stream to or from a process"
9860 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
9861
9862 #. type: Plain text
9863 #: build/C/man3/popen.3:48
9864 #, no-wrap
9865 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
9866 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
9867
9868 #. type: Plain text
9869 #: build/C/man3/popen.3:50
9870 #, no-wrap
9871 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
9872 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
9873
9874 #. type: Plain text
9875 #: build/C/man3/popen.3:60
9876 msgid "B<popen>(), B<pclose>():"
9877 msgstr "B<popen>(), B<pclose>():"
9878
9879 #. type: Plain text
9880 #: build/C/man3/popen.3:62
9881 msgid ""
9882 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
9883 msgstr ""
9884 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
9885
9886 #. type: Plain text
9887 #: build/C/man3/popen.3:73
9888 msgid ""
9889 "The B<popen>()  function opens a process by creating a pipe, forking, and "
9890 "invoking the shell.  Since a pipe is by definition unidirectional, the "
9891 "I<type> argument may specify only reading or writing, not both; the "
9892 "resulting stream is correspondingly read-only or write-only."
9893 msgstr ""
9894 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
9895 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
9896 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
9897 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
9898 "たは 書き込み専用のいずれかとなる。"
9899
9900 #. type: Plain text
9901 #: build/C/man3/popen.3:97
9902 msgid ""
9903 "The I<command> argument is a pointer to a null-terminated string containing "
9904 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
9905 "flag; interpretation, if any, is performed by the shell.  The I<type> "
9906 "argument is a pointer to a null-terminated string which must contain either "
9907 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
9908 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
9909 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
9910 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
9911 "B<open>(2)  for reasons why this may be useful."
9912 msgstr ""
9913 "I<command> 引き数は、シェルのコマンドラインを含むヌル終端された文字列へのポイ"
9914 "ンタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コマ"
9915 "ンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、ヌル"
9916 "終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き込み"
9917 "を示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc 2.9 以"
9918 "降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe\\(aq を"
9919 "指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec フラグ "
9920 "(B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 B<open>(2)  "
9921 "の B<O_CLOEXEC> フラグの説明を参照のこと。"
9922
9923 #. type: Plain text
9924 #: build/C/man3/popen.3:113
9925 msgid ""
9926 "The return value from B<popen>()  is a normal standard I/O stream in all "
9927 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
9928 "(3).  Writing to such a stream writes to the standard input of the command; "
9929 "the command's standard output is the same as that of the process that called "
9930 "B<popen>(), unless this is altered by the command itself.  Conversely, "
9931 "reading from a \"popened\" stream reads the command's standard output, and "
9932 "the command's standard input is the same as that of the process that called "
9933 "B<popen>()."
9934 msgstr ""
9935 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
9936 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
9937 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
9938 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
9939 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
9940 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
9941 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
9942 "セスの標準入力と同一である。"
9943
9944 #. type: Plain text
9945 #: build/C/man3/popen.3:117
9946 msgid "Note that output B<popen>()  streams are fully buffered by default."
9947 msgstr ""
9948 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
9949 "に注意しよう。"
9950
9951 #. type: Plain text
9952 #: build/C/man3/popen.3:123
9953 msgid ""
9954 "The B<pclose>()  function waits for the associated process to terminate and "
9955 "returns the exit status of the command as returned by B<wait4>(2)."
9956 msgstr ""
9957 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
9958 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
9959
9960 #. type: Plain text
9961 #: build/C/man3/popen.3:131
9962 msgid ""
9963 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
9964 "calls fail, or if it cannot allocate memory."
9965 msgstr ""
9966 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
9967 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
9968
9969 #.  These conditions actually give undefined results, so I commented
9970 #.  them out.
9971 #.  .I stream
9972 #.  is not associated with a "popen()ed" command, if
9973 #. .I stream
9974 #.  already "pclose()d", or if
9975 #. type: Plain text
9976 #: build/C/man3/popen.3:146
9977 msgid ""
9978 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
9979 "some other error is detected.  In the event of an error, these functions set "
9980 "I<errno> to indicate the cause of the error."
9981 msgstr ""
9982 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
9983 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
9984 "る。"
9985
9986 #. type: Plain text
9987 #: build/C/man3/popen.3:165
9988 msgid ""
9989 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
9990 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
9991 "appropriately.  If the I<type> argument is invalid, and this condition is "
9992 "detected, I<errno> is set to B<EINVAL>."
9993 msgstr ""
9994 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
9995 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
9996 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
9997 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
9998
9999 #. type: Plain text
10000 #: build/C/man3/popen.3:172
10001 msgid ""
10002 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
10003 msgstr ""
10004 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
10005 "B<ECHILD> にセットされる。"
10006
10007 #. type: Plain text
10008 #: build/C/man3/popen.3:178
10009 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
10010 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
10011
10012 #. type: Plain text
10013 #: build/C/man3/popen.3:191
10014 msgid ""
10015 "Since the standard input of a command opened for reading shares its seek "
10016 "offset with the process that called B<popen>(), if the original process has "
10017 "done a buffered read, the command's input position may not be as expected.  "
10018 "Similarly, the output from a command opened for writing may become "
10019 "intermingled with that of the original process.  The latter can be avoided "
10020 "by calling B<fflush>(3)  before B<popen>()."
10021 msgstr ""
10022 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
10023 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
10024 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
10025 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
10026 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
10027 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
10028
10029 #.  .SH HISTORY
10030 #.  A
10031 #.  .BR popen ()
10032 #.  and a
10033 #.  .BR pclose ()
10034 #.  function appeared in Version 7 AT&T UNIX.
10035 #. type: Plain text
10036 #: build/C/man3/popen.3:201
10037 msgid ""
10038 "Failure to execute the shell is indistinguishable from the shell's failure "
10039 "to execute command, or an immediate exit of the command.  The only hint is "
10040 "an exit status of 127."
10041 msgstr ""
10042 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
10043 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
10044 "なることである。"
10045
10046 #. type: Plain text
10047 #: build/C/man3/popen.3:211
10048 msgid ""
10049 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
10050 "B<fopen>(3), B<stdio>(3), B<system>(3)"
10051 msgstr ""
10052 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
10053 "B<fopen>(3), B<stdio>(3), B<system>(3)"
10054
10055 #. type: TH
10056 #: build/C/man3/printf.3:34
10057 #, no-wrap
10058 msgid "PRINTF"
10059 msgstr "PRINTF"
10060
10061 #. type: TH
10062 #: build/C/man3/printf.3:34
10063 #, no-wrap
10064 msgid "2013-12-30"
10065 msgstr "2013-12-30"
10066
10067 #. type: Plain text
10068 #: build/C/man3/printf.3:38
10069 msgid ""
10070 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
10071 "formatted output conversion"
10072 msgstr ""
10073 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
10074 "指定された書式に変換して出力を行う"
10075
10076 #. type: Plain text
10077 #: build/C/man3/printf.3:42
10078 msgid "B<int printf(const char *>I<format>B<, ...);>"
10079 msgstr "B<int printf(const char *>I<format>B<, ...);>"
10080
10081 #. type: Plain text
10082 #: build/C/man3/printf.3:44
10083 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
10084 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
10085
10086 #. type: Plain text
10087 #: build/C/man3/printf.3:46
10088 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
10089 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
10090
10091 #. type: Plain text
10092 #: build/C/man3/printf.3:48
10093 msgid ""
10094 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10095 "*>I<format>B<, ...);>"
10096 msgstr ""
10097 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10098 "*>I<format>B<, ...);>"
10099
10100 #. type: Plain text
10101 #: build/C/man3/printf.3:50
10102 msgid "B<#include E<lt>stdarg.hE<gt>>"
10103 msgstr "B<#include E<lt>stdarg.hE<gt>>"
10104
10105 #. type: Plain text
10106 #: build/C/man3/printf.3:52
10107 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
10108 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
10109
10110 #. type: Plain text
10111 #: build/C/man3/printf.3:54
10112 msgid ""
10113 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
10114 ">I<ap>B<);>"
10115 msgstr ""
10116 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
10117 ">I<ap>B<);>"
10118
10119 #. type: Plain text
10120 #: build/C/man3/printf.3:56
10121 msgid ""
10122 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
10123 msgstr ""
10124 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
10125
10126 #. type: Plain text
10127 #: build/C/man3/printf.3:59
10128 msgid ""
10129 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10130 "*>I<format>B<, va_list >I<ap>B<);>"
10131 msgstr ""
10132 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
10133 "*>I<format>B<, va_list >I<ap>B<);>"
10134
10135 #. type: Plain text
10136 #: build/C/man3/printf.3:68
10137 msgid "B<snprintf>(), B<vsnprintf>():"
10138 msgstr "B<snprintf>(), B<vsnprintf>():"
10139
10140 #. type: Plain text
10141 #: build/C/man3/printf.3:71
10142 msgid ""
10143 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
10144 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
10145 msgstr ""
10146 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
10147 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
10148
10149 #. type: Plain text
10150 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
10151 msgid "or I<cc -std=c99>"
10152 msgstr "または I<cc -std=c99>"
10153
10154 #. type: Plain text
10155 #: build/C/man3/printf.3:101
10156 msgid ""
10157 "The functions in the B<printf>()  family produce output according to a "
10158 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
10159 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
10160 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
10161 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
10162 "string I<str>."
10163 msgstr ""
10164 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
10165 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
10166 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
10167 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
10168 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
10169
10170 #. type: Plain text
10171 #: build/C/man3/printf.3:110
10172 msgid ""
10173 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
10174 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
10175 msgstr ""
10176 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
10177 "む (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) もを含まれる)。"
10178
10179 #. type: Plain text
10180 #: build/C/man3/printf.3:134
10181 msgid ""
10182 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
10183 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
10184 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
10185 "instead of a variable number of arguments.  These functions do not call the "
10186 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
10187 "I<ap> is undefined after the call.  See B<stdarg>(3)."
10188 msgstr ""
10189 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
10190 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
10191 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
10192 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
10193 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
10194 "(3)  を参照のこと。"
10195
10196 #. type: Plain text
10197 #: build/C/man3/printf.3:141
10198 msgid ""
10199 "These eight functions write the output under the control of a I<format> "
10200 "string that specifies how subsequent arguments (or arguments accessed via "
10201 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
10202 "output."
10203 msgstr ""
10204 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
10205 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
10206 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
10207
10208 #. type: Plain text
10209 #: build/C/man3/printf.3:152
10210 msgid ""
10211 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
10212 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
10213 "copying to take place between objects that overlap (e.g., if the target "
10214 "string array and one of the supplied input arguments refer to the same "
10215 "buffer).  See NOTES."
10216 msgstr ""
10217 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
10218 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
10219 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
10220 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
10221 "照。"
10222
10223 #. type: SS
10224 #: build/C/man3/printf.3:152
10225 #, no-wrap
10226 msgid "Return value"
10227 msgstr "Return Values"
10228
10229 #. type: Plain text
10230 #: build/C/man3/printf.3:155
10231 msgid ""
10232 "Upon successful return, these functions return the number of characters "
10233 "printed (excluding the null byte used to end output to strings)."
10234 msgstr ""
10235 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
10236 "用するヌルバイトは数に含まれない)。"
10237
10238 #. type: Plain text
10239 #: build/C/man3/printf.3:171
10240 msgid ""
10241 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
10242 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
10243 "the output was truncated due to this limit, then the return value is the "
10244 "number of characters (excluding the terminating null byte)  which would have "
10245 "been written to the final string if enough space had been available.  Thus, "
10246 "a return value of I<size> or more means that the output was truncated.  (See "
10247 "also below under NOTES.)"
10248 msgstr ""
10249 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
10250 "ない (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) も含まれる)。 "
10251 "この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれば書き"
10252 "込まれたであろう文字の個数 (文字列を終端するヌルバイトを除く) を返す。 従っ"
10253 "て、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味する (後述"
10254 "の注意も参照のこと)。"
10255
10256 #. type: Plain text
10257 #: build/C/man3/printf.3:173
10258 msgid "If an output error is encountered, a negative value is returned."
10259 msgstr "エラーが発生した場合は、負の数を返す。"
10260
10261 #. type: SS
10262 #: build/C/man3/printf.3:173
10263 #, no-wrap
10264 msgid "Format of the format string"
10265 msgstr "フォーマット文字列のフォーマット"
10266
10267 #. type: Plain text
10268 #: build/C/man3/printf.3:195
10269 msgid ""
10270 "The format string is a character string, beginning and ending in its initial "
10271 "shift state, if any.  The format string is composed of zero or more "
10272 "directives: ordinary characters (not B<%>), which are copied unchanged to "
10273 "the output stream; and conversion specifications, each of which results in "
10274 "fetching zero or more subsequent arguments.  Each conversion specification "
10275 "is introduced by the character B<%>, and ends with a I<conversion "
10276 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
10277 "an optional minimum I<field width>, an optional I<precision> and an optional "
10278 "I<length modifier>."
10279 msgstr ""
10280 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
10281 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
10282 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
10283 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
10284 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
10285 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
10286 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
10287 "子> を (この順序で) 置くことができる。"
10288
10289 #. type: Plain text
10290 #: build/C/man3/printf.3:208
10291 msgid ""
10292 "The arguments must correspond properly (after type promotion) with the "
10293 "conversion specifier.  By default, the arguments are used in the order "
10294 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
10295 "next argument (and it is an error if insufficiently many arguments are "
10296 "given).  One can also specify explicitly which argument is taken, at each "
10297 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
10298 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
10299 "denotes the position in the argument list of the desired argument, indexed "
10300 "starting from 1.  Thus,"
10301 msgstr ""
10302 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
10303 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
10304 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
10305 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
10306 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
10307 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
10308 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
10309
10310 #. type: Plain text
10311 #: build/C/man3/printf.3:212
10312 #, no-wrap
10313 msgid "printf(\"%*d\", width, num);\n"
10314 msgstr "printf(\"%*d\", width, num);\n"
10315
10316 #. type: Plain text
10317 #: build/C/man3/printf.3:216
10318 msgid "and"
10319 msgstr "と"
10320
10321 #. type: Plain text
10322 #: build/C/man3/printf.3:220
10323 #, no-wrap
10324 msgid "printf(\"%2$*1$d\", width, num);\n"
10325 msgstr "printf(\"%2$*1$d\", width, num);\n"
10326
10327 #. type: Plain text
10328 #: build/C/man3/printf.3:236
10329 msgid ""
10330 "are equivalent.  The second style allows repeated references to the same "
10331 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
10332 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
10333 "\\(aq is used, it must be used throughout for all conversions taking an "
10334 "argument and all width and precision arguments, but it may be mixed with \"%%"
10335 "\" formats which do not consume an argument.  There may be no gaps in the "
10336 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
10337 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
10338 "format string."
10339 msgstr ""
10340 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
10341 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
10342 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
10343 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
10344 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
10345 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
10346 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
10347
10348 #. type: Plain text
10349 #: build/C/man3/printf.3:246
10350 msgid ""
10351 "For some numeric conversions a radix character (\"decimal point\") or "
10352 "thousands' grouping character is used.  The actual character used depends on "
10353 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
10354 "radix character, and does not have a grouping character.  Thus,"
10355 msgstr ""
10356 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
10357 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
10358 "\\(aq を用い、 区切り文字は使わない。 従って、"
10359
10360 #. type: Plain text
10361 #: build/C/man3/printf.3:250
10362 #, no-wrap
10363 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
10364 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
10365
10366 #. type: Plain text
10367 #: build/C/man3/printf.3:255
10368 msgid ""
10369 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
10370 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
10371 msgstr ""
10372 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
10373 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
10374
10375 #. type: SS
10376 #: build/C/man3/printf.3:255
10377 #, no-wrap
10378 msgid "The flag characters"
10379 msgstr "フラグ文字"
10380
10381 #. type: Plain text
10382 #: build/C/man3/printf.3:257
10383 msgid "The character % is followed by zero or more of the following flags:"
10384 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
10385
10386 #. type: TP
10387 #: build/C/man3/printf.3:257
10388 #, no-wrap
10389 msgid "B<#>"
10390 msgstr "B<#>"
10391
10392 #. type: Plain text
10393 #: build/C/man3/printf.3:291
10394 msgid ""
10395 "The value should be converted to an \"alternate form\".  For B<o> "
10396 "conversions, the first character of the output string is made zero (by "
10397 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
10398 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
10399 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
10400 "conversions, the result will always contain a decimal point, even if no "
10401 "digits follow it (normally, a decimal point appears in the results of those "
10402 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
10403 "trailing zeros are not removed from the result as they would otherwise be.  "
10404 "For other conversions, the result is undefined."
10405 msgstr ""
10406 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
10407 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
10408 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
10409 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
10410 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
10411 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
10412 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
10413 "変換では、結果は未定義である。"
10414
10415 #. type: TP
10416 #: build/C/man3/printf.3:291
10417 #, no-wrap
10418 msgid "B<\\&0>"
10419 msgstr "B<\\&0>"
10420
10421 #. type: Plain text
10422 #: build/C/man3/printf.3:331
10423 msgid ""
10424 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
10425 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
10426 "converted value is padded on the left with zeros rather than blanks.  If the "
10427 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
10428 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
10429 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
10430 "is undefined."
10431 msgstr ""
10432 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
10433 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
10434 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
10435 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
10436 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
10437 "である。"
10438
10439 #. type: TP
10440 #: build/C/man3/printf.3:331
10441 #, no-wrap
10442 msgid "B<->"
10443 msgstr "B<->"
10444
10445 #. type: Plain text
10446 #: build/C/man3/printf.3:344
10447 msgid ""
10448 "The converted value is to be left adjusted on the field boundary.  (The "
10449 "default is right justification.)  Except for B<n> conversions, the converted "
10450 "value is padded on the right with blanks, rather than on the left with "
10451 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
10452 msgstr ""
10453 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
10454 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
10455 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
10456
10457 #. type: TP
10458 #: build/C/man3/printf.3:344
10459 #, no-wrap
10460 msgid "B<\\(aq \\(aq>"
10461 msgstr "B<' '>"
10462
10463 #. type: Plain text
10464 #: build/C/man3/printf.3:348
10465 msgid ""
10466 "(a space) A blank should be left before a positive number (or empty string) "
10467 "produced by a signed conversion."
10468 msgstr ""
10469 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
10470 "列) が置かれる。"
10471
10472 #. type: TP
10473 #: build/C/man3/printf.3:348
10474 #, no-wrap
10475 msgid "B<+>"
10476 msgstr "B<+>"
10477
10478 #. type: Plain text
10479 #: build/C/man3/printf.3:356
10480 msgid ""
10481 "A sign (+ or -) should always be placed before a number produced by a signed "
10482 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
10483 "overrides a space if both are used."
10484 msgstr ""
10485 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
10486 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
10487 "が使われている場合には、 B<+> が優先される。"
10488
10489 #. type: Plain text
10490 #: build/C/man3/printf.3:359
10491 msgid ""
10492 "The five flag characters above are defined in the C standard.  The SUSv2 "
10493 "specifies one further flag character."
10494 msgstr ""
10495 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
10496 "グ文字が規定されている。"
10497
10498 #. type: TP
10499 #: build/C/man3/printf.3:359
10500 #, no-wrap
10501 msgid "B<\\(aq>"
10502 msgstr "B<\\(aq>"
10503
10504 #. type: Plain text
10505 #: build/C/man3/printf.3:376
10506 msgid ""
10507 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
10508 "output is to be grouped with thousands' grouping characters if the locale "
10509 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
10510 "parse this option and will issue a warning.  SUSv2 does not include I<%"
10511 "\\(aqF>."
10512 msgstr ""
10513 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
10514 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
10515 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
10516 "\\(aqF は SUSv2 には含まれていない。"
10517
10518 #. type: Plain text
10519 #: build/C/man3/printf.3:378
10520 msgid "glibc 2.2 adds one further flag character."
10521 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
10522
10523 #. type: TP
10524 #: build/C/man3/printf.3:378
10525 #, no-wrap
10526 msgid "B<I>"
10527 msgstr "B<I>"
10528
10529 #.  outdigits keyword in locale file
10530 #. type: Plain text
10531 #: build/C/man3/printf.3:388
10532 msgid ""
10533 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
10534 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
10535 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
10536 msgstr ""
10537 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
10538 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
10539 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
10540
10541 #. type: SS
10542 #: build/C/man3/printf.3:388
10543 #, no-wrap
10544 msgid "The field width"
10545 msgstr "フィールド幅"
10546
10547 #. type: Plain text
10548 #: build/C/man3/printf.3:404
10549 msgid ""
10550 "An optional decimal digit string (with nonzero first digit) specifying a "
10551 "minimum field width.  If the converted value has fewer characters than the "
10552 "field width, it will be padded with spaces on the left (or right, if the "
10553 "left-adjustment flag has been given).  Instead of a decimal digit string one "
10554 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
10555 "the field width is given in the next argument, or in the I<m>-th argument, "
10556 "respectively, which must be of type I<int>.  A negative field width is taken "
10557 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
10558 "nonexistent or small field width cause truncation of a field; if the result "
10559 "of a conversion is wider than the field width, the field is expanded to "
10560 "contain the conversion result."
10561 msgstr ""
10562 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
10563 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
10564 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
10565 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
10566 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
10567 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
10568 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
10569 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
10570 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
10571 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
10572
10573 #. type: SS
10574 #: build/C/man3/printf.3:404
10575 #, no-wrap
10576 msgid "The precision"
10577 msgstr "精度"
10578
10579 #. type: Plain text
10580 #: build/C/man3/printf.3:441
10581 msgid ""
10582 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
10583 "optional decimal digit string.  Instead of a decimal digit string one may "
10584 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
10585 "precision is given in the next argument, or in the m-th argument, "
10586 "respectively, which must be of type I<int>.  If the precision is given as "
10587 "just \\(aq.\\(aq, the precision is taken to be zero.  A negative precision "
10588 "is taken as if the precision were omitted.  This gives the minimum number of "
10589 "digits to appear for B<d>, B<i>, B<o>, B<u>, B<x>, and B<X> conversions, the "
10590 "number of digits to appear after the radix character for B<a>, B<A>, B<e>, "
10591 "B<E>, B<f>, and B<F> conversions, the maximum number of significant digits "
10592 "for B<g> and B<G> conversions, or the maximum number of characters to be "
10593 "printed from a string for B<s> and B<S> conversions."
10594 msgstr ""
10595 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
10596 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
10597 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
10598 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
10599 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定された場合、 精度は"
10600 "ゼロとみなされる。 精度が負の数だった場合、 精度は指定されなかったものとみな"
10601 "される。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換では、表示される最小の桁数を"
10602 "指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> 変換では、小数点以下に表示され"
10603 "る数字の桁数を指定する。 B<g> と B<G> 変換では、有効数字の最大桁数を指定す"
10604 "る。 B<s> と B<S> 変換では、文字列から出力される最大文字数を指定する。"
10605
10606 #. type: SS
10607 #: build/C/man3/printf.3:441
10608 #, no-wrap
10609 msgid "The length modifier"
10610 msgstr "長さ修飾子"
10611
10612 #. type: Plain text
10613 #: build/C/man3/printf.3:451
10614 msgid ""
10615 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
10616 "B<X> conversion."
10617 msgstr ""
10618 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
10619
10620 #. type: TP
10621 #: build/C/man3/printf.3:451 build/C/man3/scanf.3:294
10622 #, no-wrap
10623 msgid "B<hh>"
10624 msgstr "B<hh>"
10625
10626 #. type: Plain text
10627 #: build/C/man3/printf.3:462
10628 msgid ""
10629 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
10630 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
10631 "I<signed char> argument."
10632 msgstr ""
10633 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
10634 "に対応する引き数が I<signed char> へのポインタであることを示す。"
10635
10636 #. type: TP
10637 #: build/C/man3/printf.3:462 build/C/man3/scanf.3:284
10638 #, no-wrap
10639 msgid "B<h>"
10640 msgstr "B<h>"
10641
10642 #. type: Plain text
10643 #: build/C/man3/printf.3:473
10644 msgid ""
10645 "A following integer conversion corresponds to a I<short int> or I<unsigned "
10646 "short int> argument, or a following B<n> conversion corresponds to a pointer "
10647 "to a I<short int> argument."
10648 msgstr ""
10649 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
10650 "換に対応する引き数が I<short int> へのポインタであることを示す。"
10651
10652 #. type: TP
10653 #: build/C/man3/printf.3:473 build/C/man3/scanf.3:311
10654 #, no-wrap
10655 msgid "B<l>"
10656 msgstr "B<l>"
10657
10658 #. type: Plain text
10659 #: build/C/man3/printf.3:492
10660 msgid ""
10661 "(ell) A following integer conversion corresponds to a I<long int> or "
10662 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
10663 "a pointer to a I<long int> argument, or a following B<c> conversion "
10664 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
10665 "corresponds to a pointer to I<wchar_t> argument."
10666 msgstr ""
10667 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
10668 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
10669 "変換では I<wchar_t> へのポインタであることを示す。"
10670
10671 #. type: TP
10672 #: build/C/man3/printf.3:492
10673 #, no-wrap
10674 msgid "B<ll>"
10675 msgstr "B<ll> (エルエル)"
10676
10677 #. type: Plain text
10678 #: build/C/man3/printf.3:504
10679 msgid ""
10680 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
10681 "or I<unsigned long long int> argument, or a following B<n> conversion "
10682 "corresponds to a pointer to a I<long long int> argument."
10683 msgstr ""
10684 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
10685 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
10686
10687 #. type: TP
10688 #: build/C/man3/printf.3:504 build/C/man3/scanf.3:338
10689 #, no-wrap
10690 msgid "B<L>"
10691 msgstr "B<L>"
10692
10693 #. type: Plain text
10694 #: build/C/man3/printf.3:520
10695 msgid ""
10696 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
10697 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
10698 "not.)"
10699 msgstr ""
10700 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
10701 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
10702 "認められていない。)"
10703
10704 #. type: TP
10705 #: build/C/man3/printf.3:520 build/C/man3/scanf.3:354
10706 #, no-wrap
10707 msgid "B<q>"
10708 msgstr "B<q>"
10709
10710 #. type: Plain text
10711 #: build/C/man3/printf.3:526
10712 msgid ""
10713 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
10714 "B<ll>."
10715 msgstr ""
10716 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
10717 "意味である。"
10718
10719 #. type: TP
10720 #: build/C/man3/printf.3:526 build/C/man3/scanf.3:302
10721 #, no-wrap
10722 msgid "B<j>"
10723 msgstr "B<j>"
10724
10725 #. type: Plain text
10726 #: build/C/man3/printf.3:533
10727 msgid ""
10728 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
10729 "argument."
10730 msgstr ""
10731 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
10732
10733 #. type: TP
10734 #: build/C/man3/printf.3:533 build/C/man3/scanf.3:366
10735 #, no-wrap
10736 msgid "B<z>"
10737 msgstr "B<z>"
10738
10739 #. type: Plain text
10740 #: build/C/man3/printf.3:544
10741 msgid ""
10742 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
10743 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
10744 msgstr ""
10745 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
10746 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
10747
10748 #. type: TP
10749 #: build/C/man3/printf.3:544 build/C/man3/scanf.3:359
10750 #, no-wrap
10751 msgid "B<t>"
10752 msgstr "B<t>"
10753
10754 #. type: Plain text
10755 #: build/C/man3/printf.3:549
10756 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
10757 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
10758
10759 #. type: Plain text
10760 #: build/C/man3/printf.3:578
10761 msgid ""
10762 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
10763 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
10764 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
10765 msgstr ""
10766 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
10767 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
10768 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
10769
10770 #. type: SS
10771 #: build/C/man3/printf.3:578
10772 #, no-wrap
10773 msgid "The conversion specifier"
10774 msgstr "変換指定子"
10775
10776 #. type: Plain text
10777 #: build/C/man3/printf.3:581
10778 msgid ""
10779 "A character that specifies the type of conversion to be applied.  The "
10780 "conversion specifiers and their meanings are:"
10781 msgstr ""
10782 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
10783
10784 #. type: TP
10785 #: build/C/man3/printf.3:581
10786 #, no-wrap
10787 msgid "B<d>, B<i>"
10788 msgstr "B<d>, B<i>"
10789
10790 #. type: Plain text
10791 #: build/C/man3/printf.3:591
10792 msgid ""
10793 "The I<int> argument is converted to signed decimal notation.  The precision, "
10794 "if any, gives the minimum number of digits that must appear; if the "
10795 "converted value requires fewer digits, it is padded on the left with zeros.  "
10796 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
10797 "the output is empty."
10798 msgstr ""
10799 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
10800 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
10801 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
10802 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
10803
10804 #. type: TP
10805 #: build/C/man3/printf.3:591
10806 #, no-wrap
10807 msgid "B<o>, B<u>, B<x>, B<X>"
10808 msgstr "B<o>, B<u>, B<x>, B<X>"
10809
10810 #. type: Plain text
10811 #: build/C/man3/printf.3:618
10812 msgid ""
10813 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
10814 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
10815 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
10816 "used for B<X> conversions.  The precision, if any, gives the minimum number "
10817 "of digits that must appear; if the converted value requires fewer digits, it "
10818 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
10819 "printed with an explicit precision 0, the output is empty."
10820 msgstr ""
10821 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
10822 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
10823 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
10824 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
10825 "られる。"
10826
10827 #. type: TP
10828 #: build/C/man3/printf.3:618
10829 #, no-wrap
10830 msgid "B<e>, B<E>"
10831 msgstr "B<e>, B<E>"
10832
10833 #. type: Plain text
10834 #: build/C/man3/printf.3:637
10835 msgid ""
10836 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
10837 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
10838 "and the number of digits after it is equal to the precision; if the "
10839 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
10840 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
10841 "than B<e>)  to introduce the exponent.  The exponent always contains at "
10842 "least two digits; if the value is zero, the exponent is 00."
10843 msgstr ""
10844 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
10845 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
10846 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
10847 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
10848 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
10849 "指数の値が 0 の場合には、00 と表示される。"
10850
10851 #. type: TP
10852 #: build/C/man3/printf.3:637
10853 #, no-wrap
10854 msgid "B<f>, B<F>"
10855 msgstr "B<f>, B<F>"
10856
10857 #. type: Plain text
10858 #: build/C/man3/printf.3:648
10859 msgid ""
10860 "The I<double> argument is rounded and converted to decimal notation in the "
10861 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
10862 "character is equal to the precision specification.  If the precision is "
10863 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
10864 "point character appears.  If a decimal point appears, at least one digit "
10865 "appears before it."
10866 msgstr ""
10867 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
10868 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
10869 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
10870 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
10871
10872 #. type: Plain text
10873 #: build/C/man3/printf.3:659
10874 msgid ""
10875 "(The SUSv2 does not know about B<F> and says that character string "
10876 "representations for infinity and NaN may be made available.  The C99 "
10877 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
10878 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
10879 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
10880 msgstr ""
10881 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
10882 "行ってもよいことになっている。\n"
10883 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
10884 "し、\n"
10885 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
10886 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
10887
10888 #. type: TP
10889 #: build/C/man3/printf.3:659
10890 #, no-wrap
10891 msgid "B<g>, B<G>"
10892 msgstr "B<g>, B<G>"
10893
10894 #. type: Plain text
10895 #: build/C/man3/printf.3:684
10896 msgid ""
10897 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
10898 "for B<G> conversions).  The precision specifies the number of significant "
10899 "digits.  If the precision is missing, 6 digits are given; if the precision "
10900 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
10901 "conversion is less than -4 or greater than or equal to the precision.  "
10902 "Trailing zeros are removed from the fractional part of the result; a decimal "
10903 "point appears only if it is followed by at least one digit."
10904 msgstr ""
10905 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
10906 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
10907 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
10908 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
10909 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
10910 "一つある場合にだけである。"
10911
10912 #. type: TP
10913 #: build/C/man3/printf.3:684
10914 #, no-wrap
10915 msgid "B<a>, B<A>"
10916 msgstr "B<a>, B<A>"
10917
10918 #. type: Plain text
10919 #: build/C/man3/printf.3:708
10920 msgid ""
10921 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
10922 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
10923 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
10924 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
10925 "digit before the decimal point, and the number of digits after it is equal "
10926 "to the precision.  The default precision suffices for an exact "
10927 "representation of the value if an exact representation in base 2 exists and "
10928 "otherwise is sufficiently large to distinguish values of type I<double>.  "
10929 "The digit before the decimal point is unspecified for nonnormalized numbers, "
10930 "and nonzero but otherwise unspecified for normalized numbers."
10931 msgstr ""
10932 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
10933 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
10934 "16 進表記に変換する。\n"
10935 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
10936 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
10937 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
10938 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
10939 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
10940 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
10941 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
10942
10943 #. type: TP
10944 #: build/C/man3/printf.3:708 build/C/man3/scanf.3:459
10945 #: build/C/man3/wprintf.3:149
10946 #, no-wrap
10947 msgid "B<c>"
10948 msgstr "B<c>"
10949
10950 #. type: Plain text
10951 #: build/C/man3/printf.3:726
10952 msgid ""
10953 "If no B<l> modifier is present, the I<int> argument is converted to an "
10954 "I<unsigned char>, and the resulting character is written.  If an B<l> "
10955 "modifier is present, the I<wint_t> (wide character) argument is converted to "
10956 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
10957 "conversion state starting in the initial state, and the resulting multibyte "
10958 "string is written."
10959 msgstr ""
10960 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
10961 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
10962 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
10963 "換し、 変換されたマルチバイト文字列を出力する。"
10964
10965 #. type: TP
10966 #: build/C/man3/printf.3:726 build/C/man3/scanf.3:451
10967 #: build/C/man3/wprintf.3:163
10968 #, no-wrap
10969 msgid "B<s>"
10970 msgstr "B<s>"
10971
10972 #. type: Plain text
10973 #: build/C/man3/printf.3:741
10974 msgid ""
10975 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
10976 "to be a pointer to an array of character type (pointer to a string).  "
10977 "Characters from the array are written up to (but not including) a "
10978 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
10979 "than the number specified are written.  If a precision is given, no null "
10980 "byte need be present; if the precision is not specified, or is greater than "
10981 "the size of the array, the array must contain a terminating null byte."
10982 msgstr ""
10983 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
10984 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
10985 "ヌルバイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
10986 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
10987 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
10988 "精度の値が配列の大きさより大きい場合には、 配列は終端のヌルバイトを含んでいな"
10989 "ければならない。"
10990
10991 #. type: Plain text
10992 #: build/C/man3/printf.3:768
10993 msgid ""
10994 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
10995 "expected to be a pointer to an array of wide characters.  Wide characters "
10996 "from the array are converted to multibyte characters (each by a call to the "
10997 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
10998 "state before the first wide character), up to and including a terminating "
10999 "null wide character.  The resulting multibyte characters are written up to "
11000 "(but not including) the terminating null byte.  If a precision is specified, "
11001 "no more bytes than the number specified are written, but no partial "
11002 "multibyte characters are written.  Note that the precision determines the "
11003 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
11004 "positions>.  The array must contain a terminating null wide character, "
11005 "unless a precision is given and it is so small that the number of bytes "
11006 "written exceeds it before the end of the array is reached."
11007 msgstr ""
11008 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
11009 "字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字"
11010 "毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド"
11011 "文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
11012 "る)。 マルチバイト文字への変換は、文字列を終端するヌルワイド文字が 出てくるま"
11013 "で行われ、終端ヌルワイド文字も含めて変換される。 結果のマルチバイト文字列は、"
11014 "終端のヌルバイトが出てくるまで 出力される (終端のヌルバイトは出力されない)。 "
11015 "精度が指定された場合、指定されたバイト数以上には出力されない。 但し、マルチバ"
11016 "イト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定するもの"
11017 "であり、「ワイド文字」数や 「画面での位置」を指定するものではないことに注"
11018 "意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数が "
11019 "精度の値を超える場合だけは、配列はヌルワイド文字で終端されていなくてもよい。 "
11020 "それ以外の場合は、必ず配列はヌルワイド文字で終端されていなければならない。"
11021
11022 #. type: TP
11023 #: build/C/man3/printf.3:768
11024 #, no-wrap
11025 msgid "B<C>"
11026 msgstr "B<C>"
11027
11028 #. type: Plain text
11029 #: build/C/man3/printf.3:774
11030 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
11031 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
11032
11033 #. type: TP
11034 #: build/C/man3/printf.3:774
11035 #, no-wrap
11036 msgid "B<S>"
11037 msgstr "B<S>"
11038
11039 #. type: Plain text
11040 #: build/C/man3/printf.3:780
11041 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
11042 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
11043
11044 #. type: TP
11045 #: build/C/man3/printf.3:780 build/C/man3/scanf.3:502
11046 #, no-wrap
11047 msgid "B<p>"
11048 msgstr "B<p>"
11049
11050 #. type: Plain text
11051 #: build/C/man3/printf.3:788
11052 msgid ""
11053 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
11054 "or B<%#lx>)."
11055 msgstr ""
11056 "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
11057
11058 #. type: TP
11059 #: build/C/man3/printf.3:788 build/C/man3/scanf.3:510
11060 #, no-wrap
11061 msgid "B<n>"
11062 msgstr "B<n>"
11063
11064 #. type: Plain text
11065 #: build/C/man3/printf.3:795
11066 msgid ""
11067 "The number of characters written so far is stored into the integer indicated "
11068 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
11069 msgstr ""
11070 "これまでに出力された文字数を I<int\\ *> (または類似の型) のポインタ引き数が指"
11071 "す整数に保存する。 引き数の変換は行われない。"
11072
11073 #. type: TP
11074 #: build/C/man3/printf.3:795
11075 #, no-wrap
11076 msgid "B<m>"
11077 msgstr "B<m>"
11078
11079 #. type: Plain text
11080 #: build/C/man3/printf.3:801
11081 msgid ""
11082 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
11083 "required."
11084 msgstr ""
11085 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
11086
11087 #. type: TP
11088 #: build/C/man3/printf.3:801 build/C/man3/scanf.3:377
11089 #, no-wrap
11090 msgid "B<%>"
11091 msgstr "B<%>"
11092
11093 #. type: Plain text
11094 #: build/C/man3/printf.3:807
11095 msgid ""
11096 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
11097 "conversion specification is \\(aq%%\\(aq."
11098 msgstr ""
11099 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
11100 "%\" となる。"
11101
11102 #. type: Plain text
11103 #: build/C/man3/printf.3:822
11104 msgid ""
11105 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
11106 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
11107 "B<vsnprintf>()  functions conform to C99."
11108 msgstr ""
11109 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
11110 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
11111 "B<vsnprintf>()  は C99 に準拠している。"
11112
11113 #. type: Plain text
11114 #: build/C/man3/printf.3:835
11115 msgid ""
11116 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
11117 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
11118 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
11119 "this case, and gives the return value (as always)  as the number of "
11120 "characters that would have been written in case the output string has been "
11121 "large enough."
11122 msgstr ""
11123 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
11124 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
11125 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
11126 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
11127 "出力されるであろう文字数を返す。"
11128
11129 #. type: Plain text
11130 #: build/C/man3/printf.3:849
11131 msgid ""
11132 "Linux libc4 knows about the five C standard flags.  It knows about the "
11133 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
11134 "B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, B<s>, B<u>, B<x>, and "
11135 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
11136 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
11137 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
11138 "dependent radix character, no thousands' separator, no NaN or infinity, no "
11139 "\"%m$\" and \"*m$\"."
11140 msgstr ""
11141 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
11142 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
11143 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
11144 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
11145 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
11146 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
11147 "えない。"
11148
11149 #. type: Plain text
11150 #: build/C/man3/printf.3:860
11151 msgid ""
11152 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
11153 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
11154 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
11155 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
11156 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
11157 "outputs I<strerror(errno)>."
11158 msgstr ""
11159 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
11160 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
11161 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
11162 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
11163 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
11164 "ある。"
11165
11166 #. type: Plain text
11167 #: build/C/man3/printf.3:862
11168 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
11169 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
11170
11171 #. type: Plain text
11172 #: build/C/man3/printf.3:865
11173 msgid ""
11174 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
11175 "characters B<a> and B<A>."
11176 msgstr ""
11177 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
11178 "加された。"
11179
11180 #. type: Plain text
11181 #: build/C/man3/printf.3:868
11182 msgid ""
11183 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
11184 "flag character B<I>."
11185 msgstr ""
11186 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
11187 "追加された。"
11188
11189 #. type: Plain text
11190 #: build/C/man3/printf.3:870
11191 msgid "Some programs imprudently rely on code such as the following"
11192 msgstr ""
11193 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
11194 "ラムがある。"
11195
11196 #. type: Plain text
11197 #: build/C/man3/printf.3:872
11198 #, no-wrap
11199 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
11200 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
11201
11202 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
11203 #. type: Plain text
11204 #: build/C/man3/printf.3:888
11205 msgid ""
11206 "to append text to I<buf>.  However, the standards explicitly note that the "
11207 "results are undefined if source and destination buffers overlap when calling "
11208 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
11209 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
11210 "such as the above will B<not> produce the expected results."
11211 msgstr ""
11212 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
11213 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
11214 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
11215 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
11216 "結果が得られ「ない」ことがある。"
11217
11218 #.  .SH HISTORY
11219 #.  UNIX V7 defines the three routines
11220 #.  .BR printf (),
11221 #.  .BR fprintf (),
11222 #.  .BR sprintf (),
11223 #.  and has the flag \-, the width or precision *, the length modifier l,
11224 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
11225 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
11226 #.  #, + and <space> and no longer mentions D,O,U,X.
11227 #.  2.11BSD has
11228 #.  .BR vprintf (),
11229 #.  .BR vfprintf (),
11230 #.  .BR vsprintf (),
11231 #.  and warns not to use D,O,U,X.
11232 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
11233 #.  and the conversions n, p, E, G, X (with current meaning)
11234 #.  and deprecates D,O,U.
11235 #.  4.4BSD introduces the functions
11236 #.  .BR snprintf ()
11237 #.  and
11238 #.  .BR vsnprintf (),
11239 #.  and the length modifier q.
11240 #.  FreeBSD also has functions
11241 #.  .BR asprintf ()
11242 #.  and
11243 #.  .BR vasprintf (),
11244 #.  that allocate a buffer large enough for
11245 #.  .BR sprintf ().
11246 #.  In glibc there are functions
11247 #.  .BR dprintf ()
11248 #.  and
11249 #.  .BR vdprintf ()
11250 #.  that print to a file descriptor instead of a stream.
11251 #. type: Plain text
11252 #: build/C/man3/printf.3:930
11253 msgid ""
11254 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
11255 "conforms to the C99 standard, that is, behaves as described above, since "
11256 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
11257 "was truncated."
11258 msgstr ""
11259 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
11260 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
11261 "切り詰められた場合は -1 を返す。"
11262
11263 #. type: Plain text
11264 #: build/C/man3/printf.3:947
11265 msgid ""
11266 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
11267 "callers must be careful not to overflow the actual space; this is often "
11268 "impossible to assure.  Note that the length of the strings produced is "
11269 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
11270 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
11271 msgstr ""
11272 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
11273 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
11274 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
11275 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
11276 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
11277
11278 #. type: Plain text
11279 #: build/C/man3/printf.3:960
11280 msgid ""
11281 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
11282 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
11283 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
11284 "libc4 leads to serious security problems."
11285 msgstr ""
11286 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
11287 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
11288 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
11289 "深刻なセキュリティ問題を引き起こすことがある。"
11290
11291 #.  .PP
11292 #.  Some floating-point conversions under early libc4
11293 #.  caused memory leaks.
11294 #. type: Plain text
11295 #: build/C/man3/printf.3:974
11296 msgid ""
11297 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
11298 "contain a % character.  If I<foo> comes from untrusted user input, it may "
11299 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
11300 "a security hole."
11301 msgstr ""
11302 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
11303 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
11304 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
11305 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
11306 "ルを作ることになるかもしれない。"
11307
11308 #. type: Plain text
11309 #: build/C/man3/printf.3:978
11310 msgid "To print I<Pi> to five decimal places:"
11311 msgstr "I<Pi> を 5 桁で出力する。"
11312
11313 #. type: Plain text
11314 #: build/C/man3/printf.3:984
11315 #, no-wrap
11316 msgid ""
11317 "#include E<lt>math.hE<gt>\n"
11318 "#include E<lt>stdio.hE<gt>\n"
11319 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
11320 msgstr ""
11321 "#include E<lt>math.hE<gt>\n"
11322 "#include E<lt>stdio.hE<gt>\n"
11323 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
11324
11325 #. type: Plain text
11326 #: build/C/man3/printf.3:993
11327 msgid ""
11328 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
11329 "I<weekday> and I<month> are pointers to strings:"
11330 msgstr ""
11331 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
11332 "I<month> は文字列へのポインタである)"
11333
11334 #. type: Plain text
11335 #: build/C/man3/printf.3:999
11336 #, no-wrap
11337 msgid ""
11338 "#include E<lt>stdio.hE<gt>\n"
11339 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
11340 "        weekday, month, day, hour, min);\n"
11341 msgstr ""
11342 "#include E<lt>stdio.hE<gt>\n"
11343 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
11344 "\tweekday, month, day, hour, min);\n"
11345
11346 #. type: Plain text
11347 #: build/C/man3/printf.3:1005
11348 msgid ""
11349 "Many countries use the day-month-year order.  Hence, an internationalized "
11350 "version must be able to print the arguments in an order specified by the "
11351 "format:"
11352 msgstr ""
11353 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
11354 "順番で 引き数を表示できなければならない。"
11355
11356 #. type: Plain text
11357 #: build/C/man3/printf.3:1011
11358 #, no-wrap
11359 msgid ""
11360 "#include E<lt>stdio.hE<gt>\n"
11361 "fprintf(stdout, format,\n"
11362 "        weekday, month, day, hour, min);\n"
11363 msgstr ""
11364 "#include E<lt>stdio.hE<gt>\n"
11365 "fprintf(stdout, format,\n"
11366 "\tweekday, month, day, hour, min);\n"
11367
11368 #. type: Plain text
11369 #: build/C/man3/printf.3:1018
11370 msgid ""
11371 "where I<format> depends on locale, and may permute the arguments.  With the "
11372 "value:"
11373 msgstr ""
11374 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
11375 "I<format> が"
11376
11377 #. type: Plain text
11378 #: build/C/man3/printf.3:1022
11379 #, no-wrap
11380 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
11381 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
11382
11383 #. type: Plain text
11384 #: build/C/man3/printf.3:1026
11385 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
11386 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
11387
11388 #. type: Plain text
11389 #: build/C/man3/printf.3:1029
11390 msgid ""
11391 "To allocate a sufficiently large string and print into it (code correct for "
11392 "both glibc 2.0 and glibc 2.1):"
11393 msgstr ""
11394 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
11395 "と glibc 2.1 の両方で正しく動作するコード):"
11396
11397 #. type: Plain text
11398 #: build/C/man3/printf.3:1034
11399 #, no-wrap
11400 msgid ""
11401 "#include E<lt>stdio.hE<gt>\n"
11402 "#include E<lt>stdlib.hE<gt>\n"
11403 "#include E<lt>stdarg.hE<gt>\n"
11404 msgstr ""
11405 "#include E<lt>stdio.hE<gt>\n"
11406 "#include E<lt>stdlib.hE<gt>\n"
11407 "#include E<lt>stdarg.hE<gt>\n"
11408
11409 #. type: Plain text
11410 #: build/C/man3/printf.3:1042
11411 #, no-wrap
11412 msgid ""
11413 "char *\n"
11414 "make_message(const char *fmt, ...)\n"
11415 "{\n"
11416 "    int n;\n"
11417 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
11418 "    char *p, *np;\n"
11419 "    va_list ap;\n"
11420 msgstr ""
11421 "char *\n"
11422 "make_message(const char *fmt, ...)\n"
11423 "{\n"
11424 "    int n;\n"
11425 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
11426 "    char *p, *np;\n"
11427 "    va_list ap;\n"
11428
11429 #. type: Plain text
11430 #: build/C/man3/printf.3:1046
11431 #, no-wrap
11432 msgid ""
11433 "    p = malloc(size);\n"
11434 "    if (p == NULL)\n"
11435 "        return NULL;\n"
11436 msgstr ""
11437 "    p = malloc(size);\n"
11438 "    if (p == NULL)\n"
11439 "        return NULL;\n"
11440
11441 #. type: Plain text
11442 #: build/C/man3/printf.3:1048
11443 #, no-wrap
11444 msgid "    while (1) {\n"
11445 msgstr "    while (1) {\n"
11446
11447 #. type: Plain text
11448 #: build/C/man3/printf.3:1050
11449 #, no-wrap
11450 msgid "        /* Try to print in the allocated space */\n"
11451 msgstr "        /* Try to print in the allocated space */\n"
11452
11453 #. type: Plain text
11454 #: build/C/man3/printf.3:1054
11455 #, no-wrap
11456 msgid ""
11457 "        va_start(ap, fmt);\n"
11458 "        n = vsnprintf(p, size, fmt, ap);\n"
11459 "        va_end(ap);\n"
11460 msgstr ""
11461 "        va_start(ap, fmt);\n"
11462 "        n = vsnprintf(p, size, fmt, ap);\n"
11463 "        va_end(ap);\n"
11464
11465 #. type: Plain text
11466 #: build/C/man3/printf.3:1056
11467 #, no-wrap
11468 msgid "        /* Check error code */\n"
11469 msgstr "        /* Check error code */\n"
11470
11471 #. type: Plain text
11472 #: build/C/man3/printf.3:1061
11473 #, no-wrap
11474 msgid ""
11475 "        if (n E<lt> 0) {\n"
11476 "            free(p);\n"
11477 "            return NULL;\n"
11478 "        }\n"
11479 msgstr ""
11480 "        if (n E<lt> 0) {\n"
11481 "            free(p);\n"
11482 "            return NULL;\n"
11483 "        }\n"
11484
11485 #. type: Plain text
11486 #: build/C/man3/printf.3:1063
11487 #, no-wrap
11488 msgid "        /* If that worked, return the string */\n"
11489 msgstr "        /* If that worked, return the string */\n"
11490
11491 #. type: Plain text
11492 #: build/C/man3/printf.3:1066
11493 #, no-wrap
11494 msgid ""
11495 "        if (n E<lt> size)\n"
11496 "            return p;\n"
11497 msgstr ""
11498 "        if (n E<lt> size)\n"
11499 "            return p;\n"
11500
11501 #. type: Plain text
11502 #: build/C/man3/printf.3:1068
11503 #, no-wrap
11504 msgid "        /* Else try again with more space */\n"
11505 msgstr "        /* Else try again with more space */\n"
11506
11507 #. type: Plain text
11508 #: build/C/man3/printf.3:1070
11509 #, no-wrap
11510 msgid "        size = n + 1;       /* Precisely what is needed */\n"
11511 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
11512
11513 #. type: Plain text
11514 #: build/C/man3/printf.3:1081
11515 #, no-wrap
11516 msgid ""
11517 "        np = realloc(p, size);\n"
11518 "        if (np == NULL) {\n"
11519 "            free(p);\n"
11520 "            return NULL;\n"
11521 "        } else {\n"
11522 "            p = np;\n"
11523 "        }\n"
11524 "    }\n"
11525 "}\n"
11526 msgstr ""
11527 "        np = realloc(p, size);\n"
11528 "        if (np == NULL) {\n"
11529 "            free(p);\n"
11530 "            return NULL;\n"
11531 "        } else {\n"
11532 "            p = np;\n"
11533 "        }\n"
11534 "    }\n"
11535 "}\n"
11536
11537 #. type: Plain text
11538 #: build/C/man3/printf.3:1085
11539 msgid ""
11540 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
11541 "error instead of being handled gracefully."
11542 msgstr ""
11543 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
11544 "理されず、エラーとして扱われる。"
11545
11546 #. type: Plain text
11547 #: build/C/man3/printf.3:1094
11548 msgid ""
11549 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
11550 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
11551 msgstr ""
11552 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
11553 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
11554
11555 #. type: TH
11556 #: build/C/man3/puts.3:26
11557 #, no-wrap
11558 msgid "PUTS"
11559 msgstr "PUTS"
11560
11561 #. type: TH
11562 #: build/C/man3/puts.3:26 build/C/man3/scanf.3:52
11563 #, no-wrap
11564 msgid "2014-01-11"
11565 msgstr "2014-01-11"
11566
11567 #. type: Plain text
11568 #: build/C/man3/puts.3:29
11569 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
11570 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
11571
11572 #. type: Plain text
11573 #: build/C/man3/puts.3:34
11574 #, no-wrap
11575 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11576 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11577
11578 #. type: Plain text
11579 #: build/C/man3/puts.3:36
11580 #, no-wrap
11581 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11582 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11583
11584 #. type: Plain text
11585 #: build/C/man3/puts.3:38
11586 #, no-wrap
11587 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11588 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
11589
11590 #. type: Plain text
11591 #: build/C/man3/puts.3:40
11592 #, no-wrap
11593 msgid "B<int putchar(int >I<c>B<);>\n"
11594 msgstr "B<int putchar(int >I<c>B<);>\n"
11595
11596 #. type: Plain text
11597 #: build/C/man3/puts.3:42
11598 #, no-wrap
11599 msgid "B<int puts(const char *>I<s>B<);>\n"
11600 msgstr "B<int puts(const char *>I<s>B<);>\n"
11601
11602 #. type: Plain text
11603 #: build/C/man3/puts.3:51
11604 msgid ""
11605 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
11606 "I<stream>."
11607 msgstr ""
11608 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
11609 "に書き込む。"
11610
11611 #. type: Plain text
11612 #: build/C/man3/puts.3:58
11613 msgid ""
11614 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
11615 "null byte (\\(aq\\e0\\(aq)."
11616 msgstr ""
11617 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端のヌルバイト "
11618 "(\\(aq\\e0\\(aq) は出力しない。"
11619
11620 #. type: Plain text
11621 #: build/C/man3/puts.3:65
11622 msgid ""
11623 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
11624 "a macro which evaluates I<stream> more than once."
11625 msgstr ""
11626 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
11627 "れないという点を除き、 B<fputc>()  と同じである。"
11628
11629 #. type: Plain text
11630 #: build/C/man3/puts.3:69
11631 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
11632 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
11633
11634 #. type: Plain text
11635 #: build/C/man3/puts.3:76
11636 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
11637 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
11638
11639 #. type: Plain text
11640 #: build/C/man3/puts.3:81
11641 msgid ""
11642 "Calls to the functions described here can be mixed with each other and with "
11643 "calls to other output functions from the I<stdio> library for the same "
11644 "output stream."
11645 msgstr ""
11646 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
11647 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
11648 "る。"
11649
11650 #. type: Plain text
11651 #: build/C/man3/puts.3:96
11652 msgid ""
11653 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
11654 "I<unsigned char> cast to an I<int> or B<EOF> on error."
11655 msgstr ""
11656 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
11657 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
11658
11659 #. type: Plain text
11660 #: build/C/man3/puts.3:103
11661 msgid ""
11662 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
11663 "on error."
11664 msgstr ""
11665 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
11666 "は B<EOF> を返す。"
11667
11668 #. type: Plain text
11669 #: build/C/man3/puts.3:112
11670 msgid ""
11671 "It is not advisable to mix calls to output functions from the I<stdio> "
11672 "library with low-level calls to B<write>(2)  for the file descriptor "
11673 "associated with the same output stream; the results will be undefined and "
11674 "very probably not what you want."
11675 msgstr ""
11676 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
11677 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
11678 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
11679 "性が高い。"
11680
11681 #. type: Plain text
11682 #: build/C/man3/puts.3:124
11683 msgid ""
11684 "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), B<fputws>"
11685 "(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), "
11686 "B<unlocked_stdio>(3)"
11687 msgstr ""
11688 "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), B<fputws>"
11689 "(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), "
11690 "B<unlocked_stdio>(3)"
11691
11692 #. type: TH
11693 #: build/C/man2/read.2:35
11694 #, no-wrap
11695 msgid "READ"
11696 msgstr "READ"
11697
11698 #. type: TH
11699 #: build/C/man2/read.2:35
11700 #, no-wrap
11701 msgid "2013-02-12"
11702 msgstr "2013-02-12"
11703
11704 #. type: Plain text
11705 #: build/C/man2/read.2:38
11706 msgid "read - read from a file descriptor"
11707 msgstr "read - ファイルディスクリプタから読み込む"
11708
11709 #. type: Plain text
11710 #: build/C/man2/read.2:43
11711 #, no-wrap
11712 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
11713 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
11714
11715 #. type: Plain text
11716 #: build/C/man2/read.2:52
11717 msgid ""
11718 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
11719 "into the buffer starting at I<buf>."
11720 msgstr ""
11721 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
11722 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
11723
11724 #. type: Plain text
11725 #: build/C/man2/read.2:60
11726 msgid ""
11727 "On files that support seeking, the read operation commences at the current "
11728 "file offset, and the file offset is incremented by the number of bytes "
11729 "read.  If the current file offset is at or past the end of file, no bytes "
11730 "are read, and B<read>()  returns zero."
11731 msgstr ""
11732 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
11733 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
11734 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
11735 "0 を返す。"
11736
11737 #. type: Plain text
11738 #: build/C/man2/read.2:75
11739 msgid ""
11740 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
11741 "In the absence of any errors, or if B<read>()  does not check for errors, a "
11742 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
11743 msgstr ""
11744 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
11745 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
11746 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
11747
11748 #. type: Plain text
11749 #: build/C/man2/read.2:81
11750 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
11751 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
11752
11753 #. type: Plain text
11754 #: build/C/man2/read.2:95
11755 msgid ""
11756 "On success, the number of bytes read is returned (zero indicates end of "
11757 "file), and the file position is advanced by this number.  It is not an error "
11758 "if this number is smaller than the number of bytes requested; this may "
11759 "happen for example because fewer bytes are actually available right now "
11760 "(maybe because we were close to end-of-file, or because we are reading from "
11761 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
11762 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
11763 "this case, it is left unspecified whether the file position (if any) changes."
11764 msgstr ""
11765 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
11766 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
11767 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
11768 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
11769 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
11770 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
11771 "の場合はファイル位置が変更されるかどうかは 不定である。"
11772
11773 #. type: TP
11774 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
11775 #, no-wrap
11776 msgid "B<EAGAIN>"
11777 msgstr "B<EAGAIN>"
11778
11779 #. type: Plain text
11780 #: build/C/man2/read.2:103
11781 msgid ""
11782 "The file descriptor I<fd> refers to a file other than a socket and has been "
11783 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
11784 msgstr ""
11785 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
11786 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
11787 "する状況にある。"
11788
11789 #. type: TP
11790 #: build/C/man2/read.2:103 build/C/man2/write.2:115
11791 #, no-wrap
11792 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
11793 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
11794
11795 #.  Actually EAGAIN on Linux
11796 #. type: Plain text
11797 #: build/C/man2/read.2:114
11798 msgid ""
11799 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
11800 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
11801 "to be returned for this case, and does not require these constants to have "
11802 "the same value, so a portable application should check for both "
11803 "possibilities."
11804 msgstr ""
11805 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
11806 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
11807 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
11808 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
11809 "プリケーションでは、両方の可能性を 確認すべきである。"
11810
11811 #. type: Plain text
11812 #: build/C/man2/read.2:118
11813 msgid "I<fd> is not a valid file descriptor or is not open for reading."
11814 msgstr ""
11815 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
11816 "(open) されていない。"
11817
11818 #. type: Plain text
11819 #: build/C/man2/read.2:122 build/C/man2/write.2:145
11820 msgid "I<buf> is outside your accessible address space."
11821 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
11822
11823 #. type: Plain text
11824 #: build/C/man2/read.2:126
11825 msgid ""
11826 "The call was interrupted by a signal before any data was read; see B<signal>"
11827 "(7)."
11828 msgstr ""
11829 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
11830
11831 #. type: Plain text
11832 #: build/C/man2/read.2:137
11833 msgid ""
11834 "I<fd> is attached to an object which is unsuitable for reading; or the file "
11835 "was opened with the B<O_DIRECT> flag, and either the address specified in "
11836 "I<buf>, the value specified in I<count>, or the current file offset is not "
11837 "suitably aligned."
11838 msgstr ""
11839 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
11840 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
11841 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
11842 "ンメントが不適切である。"
11843
11844 #. type: Plain text
11845 #: build/C/man2/read.2:147
11846 msgid ""
11847 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
11848 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
11849 "information."
11850 msgstr ""
11851 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
11852 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
11853 "こと。"
11854
11855 #. type: Plain text
11856 #: build/C/man2/read.2:158
11857 msgid ""
11858 "I/O error.  This will happen for example when the process is in a background "
11859 "process group, tries to read from its controlling terminal, and either it is "
11860 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
11861 "also occur when there is a low-level I/O error while reading from a disk or "
11862 "tape."
11863 msgstr ""
11864 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
11865 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
11866 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
11867 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
11868 "た場合にも起こる。"
11869
11870 #. type: Plain text
11871 #: build/C/man2/read.2:162
11872 msgid "I<fd> refers to a directory."
11873 msgstr "I<fd> がディレクトリを参照している。"
11874
11875 #. type: Plain text
11876 #: build/C/man2/read.2:173
11877 msgid ""
11878 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
11879 "allows a B<read>()  that is interrupted after reading some data to return -1 "
11880 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
11881 "read."
11882 msgstr ""
11883 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
11884 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
11885 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
11886 "数を返してもよい。"
11887
11888 #. type: Plain text
11889 #: build/C/man2/read.2:187
11890 msgid ""
11891 "On NFS filesystems, reading small amounts of data will update the timestamp "
11892 "only the first time, subsequent calls may not do so.  This is caused by "
11893 "client side attribute caching, because most if not all NFS clients leave "
11894 "st_atime (last file access time)  updates to the server and client side "
11895 "reads satisfied from the client's cache will not cause st_atime updates on "
11896 "the server as there are no server side reads.  UNIX semantics can be "
11897 "obtained by disabling client side attribute caching, but in most situations "
11898 "this will substantially increase server load and decrease performance."
11899 msgstr ""
11900 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
11901 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
11902 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
11903 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
11904 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
11905 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
11906 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
11907 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
11908
11909 #. type: Plain text
11910 #: build/C/man2/read.2:200
11911 msgid ""
11912 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
11913 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
11914 "B<fread>(3)"
11915 msgstr ""
11916 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
11917 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
11918 "B<fread>(3)"
11919
11920 #. type: TH
11921 #: build/C/man2/readlink.2:44
11922 #, no-wrap
11923 msgid "READLINK"
11924 msgstr "READLINK"
11925
11926 #. type: TH
11927 #: build/C/man2/readlink.2:44 build/C/man2/rename.2:33
11928 #: build/C/man2/symlink.2:33 build/C/man2/unlink.2:33
11929 #, no-wrap
11930 msgid "2014-02-21"
11931 msgstr "2014-02-21"
11932
11933 #. type: Plain text
11934 #: build/C/man2/readlink.2:47
11935 msgid "readlink, readlinkat - read value of a symbolic link"
11936 msgstr "readlink, readlinkat - シンボリックリンクの値を読む"
11937
11938 #. type: Plain text
11939 #: build/C/man2/readlink.2:53
11940 #, no-wrap
11941 msgid "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
11942 msgstr "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
11943
11944 #. type: Plain text
11945 #: build/C/man2/readlink.2:59
11946 #, no-wrap
11947 msgid ""
11948 "B<int readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
11949 "B<               char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
11950 msgstr ""
11951 "B<int readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
11952 "B<               char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
11953
11954 #. type: Plain text
11955 #: build/C/man2/readlink.2:68
11956 msgid "B<readlink>():"
11957 msgstr "B<readlink>():"
11958
11959 #. type: Plain text
11960 #: build/C/man2/readlink.2:71 build/C/man2/symlink.2:59
11961 msgid ""
11962 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
11963 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
11964 msgstr ""
11965 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
11966 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
11967
11968 #. type: Plain text
11969 #: build/C/man2/readlink.2:74
11970 msgid "B<readlinkat>():"
11971 msgstr "B<readlinkat>():"
11972
11973 #. type: Plain text
11974 #: build/C/man2/readlink.2:100
11975 msgid ""
11976 "B<readlink>()  places the contents of the symbolic link I<pathname> in the "
11977 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
11978 "null byte to I<buf>.  It will truncate the contents (to a length of "
11979 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
11980 "contents."
11981 msgstr ""
11982 "B<readlink>()  は I<pathname> で与えられたシンボリックリンクの内容を I<buf> "
11983 "バッファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は"
11984 "ヌルバイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小さ"
11985 "過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
11986
11987 #. type: SS
11988 #: build/C/man2/readlink.2:100
11989 #, no-wrap
11990 msgid "readlinkat()"
11991 msgstr "readlinkat()"
11992
11993 #. type: Plain text
11994 #: build/C/man2/readlink.2:106
11995 msgid ""
11996 "The B<readlinkat>()  system call operates in exactly the same way as "
11997 "B<readlink>(), except for the differences described here."
11998 msgstr ""
11999 "B<readlinkat>() システムコールは B<readlink>() と全く同様に動作するが、以下で"
12000 "説明する点が異なる。"
12001
12002 #. type: Plain text
12003 #: build/C/man2/readlink.2:116
12004 msgid ""
12005 "If the pathname given in I<pathname> is relative, then it is interpreted "
12006 "relative to the directory referred to by the file descriptor I<dirfd> "
12007 "(rather than relative to the current working directory of the calling "
12008 "process, as is done by B<readlink>()  for a relative pathname)."
12009 msgstr ""
12010 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
12011 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
12012 "(B<readlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
12013 "ワーキングディレクトリに対する相対パスではない)。"
12014
12015 #. type: Plain text
12016 #: build/C/man2/readlink.2:128
12017 msgid ""
12018 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
12019 "then I<pathname> is interpreted relative to the current working directory of "
12020 "the calling process (like B<readlink>())."
12021 msgstr ""
12022 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
12023 "の場合、 (B<readlink>() と同様に) I<pathname> は呼び出したプロセスのカレント"
12024 "ワーキングディレクトリに対する相対パスと解釈される。"
12025
12026 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
12027 #. type: Plain text
12028 #: build/C/man2/readlink.2:148
12029 msgid ""
12030 "Since Linux 2.6.39, I<pathname> can be an empty string, in which case the "
12031 "call operates on the file referred to by I<dirfd> (which may have been "
12032 "obtained using the B<open>(2)  B<O_PATH> flag).  In this case, I<dirfd> can "
12033 "refer to any type of file, not just a directory."
12034 msgstr ""
12035 "Linux 2.6.39 以降では、 I<pathname> に空文字列を指定できる。 その場合、呼び出"
12036 "しは I<dirfd> が参照するファイルに対して行われる (I<dirfd> は B<open>(2) の "
12037 "B<O_PATH> フラグを使って取得できる)。 この場合、 I<dirfd> はディレクトリだけ"
12038 "でなく、ファイルを参照していてもよい。"
12039
12040 #. type: Plain text
12041 #: build/C/man2/readlink.2:153
12042 msgid "See B<openat>(2)  for an explanation of the need for B<readlinkat>()."
12043 msgstr "B<readlinkat>() の必要性についての説明については B<openat>(2) を参照。"
12044
12045 #. type: Plain text
12046 #: build/C/man2/readlink.2:159
12047 msgid ""
12048 "On success, these calls return the number of bytes placed in I<buf>.  On "
12049 "error, -1 is returned and I<errno> is set to indicate the error."
12050 msgstr ""
12051 "成功すると、これらのシステムコールは I<buf> に格納されたバイト数を返す。 エ"
12052 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
12053
12054 #. type: Plain text
12055 #: build/C/man2/readlink.2:165
12056 msgid ""
12057 "Search permission is denied for a component of the path prefix.  (See also "
12058 "B<path_resolution>(7).)"
12059 msgstr ""
12060 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
12061 "参照すること)。"
12062
12063 #. type: Plain text
12064 #: build/C/man2/readlink.2:169
12065 msgid "I<buf> extends outside the process's allocated address space."
12066 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
12067
12068 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
12069 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
12070 #.  and this error can also occur if bufsiz < 0.
12071 #.  See: http://thread.gmane.org/gmane.linux.man/380
12072 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
12073 #. type: Plain text
12074 #: build/C/man2/readlink.2:178
12075 msgid "I<bufsiz> is not positive."
12076 msgstr "I<bufsiz> が正でない。"
12077
12078 #. type: Plain text
12079 #: build/C/man2/readlink.2:181
12080 msgid "The named file is not a symbolic link."
12081 msgstr "指定したファイルがシンボリックリンクでない。"
12082
12083 #. type: Plain text
12084 #: build/C/man2/readlink.2:184
12085 msgid "An I/O error occurred while reading from the filesystem."
12086 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
12087
12088 #. type: Plain text
12089 #: build/C/man2/readlink.2:187
12090 msgid "Too many symbolic links were encountered in translating the pathname."
12091 msgstr "パス名にシンボリックリンクが多すぎる。"
12092
12093 #. type: Plain text
12094 #: build/C/man2/readlink.2:190
12095 msgid "A pathname, or a component of a pathname, was too long."
12096 msgstr "パス名かパス名の一部分が長過ぎる。"
12097
12098 #. type: Plain text
12099 #: build/C/man2/readlink.2:193
12100 msgid "The named file does not exist."
12101 msgstr "その名前のファイルが存在しない。"
12102
12103 #. type: Plain text
12104 #: build/C/man2/readlink.2:199
12105 msgid "A component of the path prefix is not a directory."
12106 msgstr "パスのディレクトリ部分がディレクトリでない。"
12107
12108 #. type: Plain text
12109 #: build/C/man2/readlink.2:202
12110 msgid "The following additional errors can occur for B<readlinkat>():"
12111 msgstr "B<readlinkat>() では以下のエラーも発生する。"
12112
12113 #. type: Plain text
12114 #: build/C/man2/readlink.2:216
12115 msgid ""
12116 "B<readlinkat>()  was added to Linux in kernel 2.6.16; library support was "
12117 "added to glibc in version 2.4."
12118 msgstr ""
12119 "B<readlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
12120 "ポートはバージョン 2.4 で glibc に追加された。"
12121
12122 #. type: Plain text
12123 #: build/C/man2/readlink.2:222
12124 msgid ""
12125 "B<readlink>(): 4.4BSD (B<readlink>()  first appeared in 4.2BSD), "
12126 "POSIX.1-2001, POSIX.1-2008."
12127 msgstr ""
12128 "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001, "
12129 "POSIX.1-2008."
12130
12131 #. type: Plain text
12132 #: build/C/man2/readlink.2:225
12133 msgid "B<readlinkat>(): POSIX.1-2008."
12134 msgstr "B<readlinkat>(): POSIX.1-2008."
12135
12136 #. type: Plain text
12137 #: build/C/man2/readlink.2:233
12138 msgid ""
12139 "In versions of glibc up to and including glibc 2.4, the return type of "
12140 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
12141 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
12142 msgstr ""
12143 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
12144 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
12145 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
12146
12147 #. type: Plain text
12148 #: build/C/man2/readlink.2:256
12149 msgid ""
12150 "Using a statically sized buffer might not provide enough room for the "
12151 "symbolic link contents.  The required size for the buffer can be obtained "
12152 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
12153 "link.  However, the number of bytes written by B<readlink>()  and "
12154 "B<readlinkat>()  should be checked to make sure that the size of the "
12155 "symbolic link did not increase between the calls.  Dynamically allocating "
12156 "the buffer for B<readlink>()  and B<readlinkat>()  also addresses a common "
12157 "portability problem when using I<PATH_MAX> for the buffer size, as this "
12158 "constant is not guaranteed to be defined per POSIX if the system does not "
12159 "have such limit."
12160 msgstr ""
12161 "静的な大きさのバッファを使うと、 シンボリックリンクの内容を格納するのに十分な"
12162 "領域がない場合がある。 バッファに必要なサイズは、 そのシンボリックリンクに対"
12163 "して B<lstat>(2) の呼び出しで返される I<stat.st_size> の値から取得できる。 た"
12164 "だし、 B<readlink>() や B<readlinkat>() が書き込んだバイト数をチェックして、 "
12165 "シンボリックリンクのサイズが二つの呼び出しの間で増えていないことを確認すべき"
12166 "である。 B<readlink>() や B<readlinkat>() 用のバッファを動的に割り当てる方法"
12167 "でも、 バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の問題"
12168 "を解決することができる。 なぜなら、POSIX では、 システムがそのような上限値を"
12169 "定義していない場合には、 I<PATH_MAX> が定義されることが保証されていないからで"
12170 "ある。"
12171
12172 #. type: Plain text
12173 #: build/C/man2/readlink.2:262
12174 msgid ""
12175 "The following program allocates the buffer needed by B<readlink>()  "
12176 "dynamically from the information provided by B<lstat>(), making sure there's "
12177 "no race condition between the calls."
12178 msgstr ""
12179 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
12180 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
12181 "また、両方の呼び出し間で競合条件がないことを保証している。"
12182
12183 #. type: Plain text
12184 #: build/C/man2/readlink.2:269
12185 #, no-wrap
12186 msgid ""
12187 "#include E<lt>sys/types.hE<gt>\n"
12188 "#include E<lt>sys/stat.hE<gt>\n"
12189 "#include E<lt>stdio.hE<gt>\n"
12190 "#include E<lt>stdlib.hE<gt>\n"
12191 "#include E<lt>unistd.hE<gt>\n"
12192 msgstr ""
12193 "#include E<lt>sys/types.hE<gt>\n"
12194 "#include E<lt>sys/stat.hE<gt>\n"
12195 "#include E<lt>stdio.hE<gt>\n"
12196 "#include E<lt>stdlib.hE<gt>\n"
12197 "#include E<lt>unistd.hE<gt>\n"
12198
12199 #. type: Plain text
12200 #: build/C/man2/readlink.2:276
12201 #, no-wrap
12202 msgid ""
12203 "int\n"
12204 "main(int argc, char *argv[])\n"
12205 "{\n"
12206 "    struct stat sb;\n"
12207 "    char *linkname;\n"
12208 "    ssize_t r;\n"
12209 msgstr ""
12210 "int\n"
12211 "main(int argc, char *argv[])\n"
12212 "{\n"
12213 "    struct stat sb;\n"
12214 "    char *linkname;\n"
12215 "    ssize_t r;\n"
12216
12217 #. type: Plain text
12218 #: build/C/man2/readlink.2:281
12219 #, no-wrap
12220 msgid ""
12221 "    if (argc != 2) {\n"
12222 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
12223 "        exit(EXIT_FAILURE);\n"
12224 "    }\n"
12225 msgstr ""
12226 "    if (argc != 2) {\n"
12227 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
12228 "        exit(EXIT_FAILURE);\n"
12229 "    }\n"
12230
12231 #. type: Plain text
12232 #: build/C/man2/readlink.2:286
12233 #, no-wrap
12234 msgid ""
12235 "    if (lstat(argv[1], &sb) == -1) {\n"
12236 "        perror(\"lstat\");\n"
12237 "        exit(EXIT_FAILURE);\n"
12238 "    }\n"
12239 msgstr ""
12240 "    if (lstat(argv[1], &sb) == -1) {\n"
12241 "        perror(\"lstat\");\n"
12242 "        exit(EXIT_FAILURE);\n"
12243 "    }\n"
12244
12245 #. type: Plain text
12246 #: build/C/man2/readlink.2:292
12247 #, no-wrap
12248 msgid ""
12249 "    linkname = malloc(sb.st_size + 1);\n"
12250 "    if (linkname == NULL) {\n"
12251 "        fprintf(stderr, \"insufficient memory\\en\");\n"
12252 "        exit(EXIT_FAILURE);\n"
12253 "    }\n"
12254 msgstr ""
12255 "    linkname = malloc(sb.st_size + 1);\n"
12256 "    if (linkname == NULL) {\n"
12257 "        fprintf(stderr, \"insufficient memory\\en\");\n"
12258 "        exit(EXIT_FAILURE);\n"
12259 "    }\n"
12260
12261 #. type: Plain text
12262 #: build/C/man2/readlink.2:294
12263 #, no-wrap
12264 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
12265 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
12266
12267 #. type: Plain text
12268 #: build/C/man2/readlink.2:299
12269 #, no-wrap
12270 msgid ""
12271 "    if (r == -1) {\n"
12272 "        perror(\"readlink\");\n"
12273 "        exit(EXIT_FAILURE);\n"
12274 "    }\n"
12275 msgstr ""
12276 "    if (r == -1) {\n"
12277 "        perror(\"readlink\");\n"
12278 "        exit(EXIT_FAILURE);\n"
12279 "    }\n"
12280
12281 #. type: Plain text
12282 #: build/C/man2/readlink.2:305
12283 #, no-wrap
12284 msgid ""
12285 "    if (r E<gt> sb.st_size) {\n"
12286 "        fprintf(stderr, \"symlink increased in size \"\n"
12287 "                        \"between lstat() and readlink()\\en\");\n"
12288 "        exit(EXIT_FAILURE);\n"
12289 "    }\n"
12290 msgstr ""
12291 "    if (r E<gt> sb.st_size) {\n"
12292 "        fprintf(stderr, \"symlink increased in size \"\n"
12293 "                        \"between lstat() and readlink()\\en\");\n"
12294 "        exit(EXIT_FAILURE);\n"
12295 "    }\n"
12296
12297 #. type: Plain text
12298 #: build/C/man2/readlink.2:307
12299 #, no-wrap
12300 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
12301 msgstr "    linkname[r] = \\(aq\\e0\\(aq;\n"
12302
12303 #. type: Plain text
12304 #: build/C/man2/readlink.2:309
12305 #, no-wrap
12306 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
12307 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
12308
12309 #. type: Plain text
12310 #: build/C/man2/readlink.2:320
12311 msgid ""
12312 "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<path_resolution>"
12313 "(7), B<symlink>(7)"
12314 msgstr ""
12315 "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<path_resolution>"
12316 "(7), B<symlink>(7)"
12317
12318 #. type: TH
12319 #: build/C/man2/readv.2:32
12320 #, no-wrap
12321 msgid "READV"
12322 msgstr "READV"
12323
12324 #. type: TH
12325 #: build/C/man2/readv.2:32
12326 #, no-wrap
12327 msgid "2010-11-17"
12328 msgstr "2010-11-17"
12329
12330 #. type: Plain text
12331 #: build/C/man2/readv.2:35
12332 msgid ""
12333 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
12334 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
12335
12336 #. type: Plain text
12337 #: build/C/man2/readv.2:38
12338 #, no-wrap
12339 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
12340 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
12341
12342 #. type: Plain text
12343 #: build/C/man2/readv.2:40
12344 #, no-wrap
12345 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12346 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12347
12348 #. type: Plain text
12349 #: build/C/man2/readv.2:42
12350 #, no-wrap
12351 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12352 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
12353
12354 #. type: Plain text
12355 #: build/C/man2/readv.2:45
12356 #, no-wrap
12357 msgid ""
12358 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12359 "B<               off_t >I<offset>B<);>\n"
12360 msgstr ""
12361 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12362 "B<               off_t >I<offset>B<);>\n"
12363
12364 #. type: Plain text
12365 #: build/C/man2/readv.2:48
12366 #, no-wrap
12367 msgid ""
12368 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12369 "B<                off_t >I<offset>B<);>\n"
12370 msgstr ""
12371 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
12372 "B<                off_t >I<offset>B<);>\n"
12373
12374 #. type: Plain text
12375 #: build/C/man2/readv.2:58
12376 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
12377 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
12378
12379 #. type: Plain text
12380 #: build/C/man2/readv.2:68
12381 msgid ""
12382 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
12383 "with the file descriptor I<fd> into the buffers described by I<iov> "
12384 "(\"scatter input\")."
12385 msgstr ""
12386 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
12387 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
12388 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
12389
12390 #. type: Plain text
12391 #: build/C/man2/readv.2:78
12392 msgid ""
12393 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
12394 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
12395 "\")."
12396 msgstr ""
12397 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
12398 "I<iovcnt>\n"
12399 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
12400 "ら\n"
12401 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
12402
12403 #. type: Plain text
12404 #: build/C/man2/readv.2:87
12405 msgid ""
12406 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
12407 "I<E<lt>sys/uio.hE<gt>> as:"
12408 msgstr ""
12409 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
12410 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
12411
12412 #. type: Plain text
12413 #: build/C/man2/readv.2:95
12414 #, no-wrap
12415 msgid ""
12416 "struct iovec {\n"
12417 "    void  *iov_base;    /* Starting address */\n"
12418 "    size_t iov_len;     /* Number of bytes to transfer */\n"
12419 "};\n"
12420 msgstr ""
12421 "struct iovec {\n"
12422 "    void  *iov_base;    /* Starting address */\n"
12423 "    size_t iov_len;     /* Number of bytes to transfer */\n"
12424 "};\n"
12425
12426 #. type: Plain text
12427 #: build/C/man2/readv.2:103
12428 msgid ""
12429 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
12430 "buffers are filled."
12431 msgstr ""
12432 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
12433 "B<read>(2) と全く同様の動作を行う。"
12434
12435 #. type: Plain text
12436 #: build/C/man2/readv.2:109
12437 msgid ""
12438 "The B<writev>()  system call works just like B<write>(2)  except that "
12439 "multiple buffers are written out."
12440 msgstr ""
12441 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
12442 "B<write>(2) と全く同様の動作を行う。"
12443
12444 #. type: Plain text
12445 #: build/C/man2/readv.2:128
12446 msgid ""
12447 "Buffers are processed in array order.  This means that B<readv>()  "
12448 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
12449 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
12450 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
12451 "[0] before proceeding to I<iov>[1], and so on."
12452 msgstr ""
12453 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
12454 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
12455 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
12456 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
12457
12458 #. type: Plain text
12459 #: build/C/man2/readv.2:146
12460 msgid ""
12461 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
12462 "data written by B<writev>()  is written as a single block that is not "
12463 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
12464 "for an exception); analogously, B<readv>()  is guaranteed to read a "
12465 "contiguous block of data from the file, regardless of read operations "
12466 "performed in other threads or processes that have file descriptors referring "
12467 "to the same open file description (see B<open>(2))."
12468 msgstr ""
12469 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
12470 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
12471 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
12472 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
12473 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
12474 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
12475 "作の影響を受けることはない。"
12476
12477 #. type: SS
12478 #: build/C/man2/readv.2:146
12479 #, no-wrap
12480 msgid "preadv() and pwritev()"
12481 msgstr "preadv() と pwritev()"
12482
12483 #. type: Plain text
12484 #: build/C/man2/readv.2:159
12485 msgid ""
12486 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
12487 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
12488 "argument, I<offset>, which specifies the file offset at which the input "
12489 "operation is to be performed."
12490 msgstr ""
12491 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
12492 "組み合わせたものである。\n"
12493 "B<readv>() と同じ処理を実行するが、\n"
12494 "4 番目の引き数 I<offset> が追加されており、\n"
12495 "この引き数は入力操作を行うファイルオフセットを指定する。"
12496
12497 #. type: Plain text
12498 #: build/C/man2/readv.2:172
12499 msgid ""
12500 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
12501 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
12502 "argument, I<offset>, which specifies the file offset at which the output "
12503 "operation is to be performed."
12504 msgstr ""
12505 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
12506 "組み合わせたものである。\n"
12507 "B<writev>() と同じ処理を実行するが、\n"
12508 "4 番目の引き数 I<offset> が追加されており、\n"
12509 "この引き数は出力操作を行うファイルオフセットを指定する。"
12510
12511 #. type: Plain text
12512 #: build/C/man2/readv.2:177
12513 msgid ""
12514 "The file offset is not changed by these system calls.  The file referred to "
12515 "by I<fd> must be capable of seeking."
12516 msgstr ""
12517 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
12518 "I<fd> が参照するファイルは seek 可能でなければならない。"
12519
12520 #. type: Plain text
12521 #: build/C/man2/readv.2:188
12522 msgid ""
12523 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
12524 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
12525 "error, -1 is returned, and I<errno> is set appropriately."
12526 msgstr ""
12527 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
12528 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
12529 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
12530
12531 #. type: Plain text
12532 #: build/C/man2/readv.2:200
12533 msgid ""
12534 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
12535 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
12536 "(2).  Additionally, the following error is defined:"
12537 msgstr ""
12538 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
12539 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
12540 "る。\n"
12541 "また、追加で以下のエラーが定義されている:"
12542
12543 #. type: Plain text
12544 #: build/C/man2/readv.2:209
12545 msgid ""
12546 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
12547 "vector count I<iovcnt> is less than zero or greater than the permitted "
12548 "maximum."
12549 msgstr ""
12550 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
12551 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
12552
12553 #. type: Plain text
12554 #: build/C/man2/readv.2:214
12555 msgid ""
12556 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
12557 "support was added in glibc 2.10."
12558 msgstr ""
12559 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
12560 "ライブラリによるサポートは glibc 2.10 で追加された。"
12561
12562 #.  The readv/writev system calls were buggy before Linux 1.3.40.
12563 #.  (Says release.libc.)
12564 #. type: Plain text
12565 #: build/C/man2/readv.2:222
12566 msgid ""
12567 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
12568 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
12569 "I<iovcnt> argument, and I<int> as the return type."
12570 msgstr ""
12571 "B<readv>(), B<writev>(): \n"
12572 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
12573 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
12574 "返り値の型として I<int> を使用していた。"
12575
12576 #. type: Plain text
12577 #: build/C/man2/readv.2:226
12578 msgid ""
12579 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
12580 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
12581
12582 #. type: SS
12583 #: build/C/man2/readv.2:227
12584 #, no-wrap
12585 msgid "Linux notes"
12586 msgstr "Linux での注意"
12587
12588 #. type: Plain text
12589 #: build/C/man2/readv.2:258
12590 msgid ""
12591 "POSIX.1-2001 allows an implementation to place a limit on the number of "
12592 "items that can be passed in I<iov>.  An implementation can advertise its "
12593 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
12594 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
12595 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
12596 "glibc wrapper functions do some extra work if they detect that the "
12597 "underlying kernel system call failed because this limit was exceeded.  In "
12598 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
12599 "large enough for all of the items specified by I<iov>, passes that buffer in "
12600 "a call to B<read>(2), copies data from the buffer to the locations specified "
12601 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
12602 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
12603 "using a temporary buffer and a call to B<write>(2)."
12604 msgstr ""
12605 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
12606 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
12607 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
12608 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
12609 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
12610 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
12611 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
12612 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
12613 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
12614 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
12615 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
12616 "(2)  を呼び出す。"
12617
12618 #. type: Plain text
12619 #: build/C/man2/readv.2:265
12620 msgid ""
12621 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
12622 "operate on file descriptors, with the functions from the stdio library; the "
12623 "results will be undefined and probably not what you want."
12624 msgstr ""
12625 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
12626 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
12627 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
12628 "得られないだろう。"
12629
12630 #. type: Plain text
12631 #: build/C/man2/readv.2:268
12632 msgid "The following code sample demonstrates the use of B<writev>():"
12633 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
12634
12635 #. type: Plain text
12636 #: build/C/man2/readv.2:275
12637 #, no-wrap
12638 msgid ""
12639 "char *str0 = \"hello \";\n"
12640 "char *str1 = \"world\\en\";\n"
12641 "struct iovec iov[2];\n"
12642 "ssize_t nwritten;\n"
12643 msgstr ""
12644 "char *str0 = \"hello \";\n"
12645 "char *str1 = \"world\\en\";\n"
12646 "struct iovec iov[2];\n"
12647 "ssize_t nwritten;\n"
12648
12649 #. type: Plain text
12650 #: build/C/man2/readv.2:280
12651 #, no-wrap
12652 msgid ""
12653 "iov[0].iov_base = str0;\n"
12654 "iov[0].iov_len = strlen(str0);\n"
12655 "iov[1].iov_base = str1;\n"
12656 "iov[1].iov_len = strlen(str1);\n"
12657 msgstr ""
12658 "iov[0].iov_base = str0;\n"
12659 "iov[0].iov_len = strlen(str0);\n"
12660 "iov[1].iov_base = str1;\n"
12661 "iov[1].iov_len = strlen(str1);\n"
12662
12663 #. type: Plain text
12664 #: build/C/man2/readv.2:282
12665 #, no-wrap
12666 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
12667 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
12668
12669 #. type: Plain text
12670 #: build/C/man2/readv.2:288
12671 msgid "B<pread>(2), B<read>(2), B<write>(2)"
12672 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
12673
12674 #. type: TH
12675 #: build/C/man3/remove.3:31
12676 #, no-wrap
12677 msgid "REMOVE"
12678 msgstr "REMOVE"
12679
12680 #. type: TH
12681 #: build/C/man3/remove.3:31
12682 #, no-wrap
12683 msgid "2014-03-10"
12684 msgstr "2014-03-10"
12685
12686 #. type: Plain text
12687 #: build/C/man3/remove.3:34
12688 msgid "remove - remove a file or directory"
12689 msgstr "remove - ファイルやディレクトリを削除する"
12690
12691 #. type: Plain text
12692 #: build/C/man3/remove.3:38
12693 msgid "B<int remove(const char *>I<pathname>B<);>"
12694 msgstr "B<int remove(const char *>I<pathname>B<);>"
12695
12696 #. type: Plain text
12697 #: build/C/man3/remove.3:46
12698 msgid ""
12699 "B<remove>()  deletes a name from the filesystem.  It calls B<unlink>(2)  for "
12700 "files, and B<rmdir>(2)  for directories."
12701 msgstr ""
12702 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
12703 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
12704
12705 #. type: Plain text
12706 #: build/C/man3/remove.3:50
12707 msgid ""
12708 "If the removed name was the last link to a file and no processes have the "
12709 "file open, the file is deleted and the space it was using is made available "
12710 "for reuse."
12711 msgstr ""
12712 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
12713 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
12714 "ことができるようになる。"
12715
12716 #. type: Plain text
12717 #: build/C/man3/remove.3:55
12718 msgid ""
12719 "If the name was the last link to a file, but any processes still have the "
12720 "file open, the file will remain in existence until the last file descriptor "
12721 "referring to it is closed."
12722 msgstr ""
12723 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
12724 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
12725 "でファイルは存在し続ける。"
12726
12727 #. type: Plain text
12728 #: build/C/man3/remove.3:57 build/C/man2/unlink.2:78
12729 msgid "If the name referred to a symbolic link, the link is removed."
12730 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
12731
12732 #. type: Plain text
12733 #: build/C/man3/remove.3:60
12734 msgid ""
12735 "If the name referred to a socket, FIFO, or device, the name is removed, but "
12736 "processes which have the object open may continue to use it."
12737 msgstr ""
12738 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
12739 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
12740
12741 #. type: Plain text
12742 #: build/C/man3/remove.3:70
12743 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
12744 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
12745
12746 #. type: Plain text
12747 #: build/C/man3/remove.3:75
12748 msgid "The B<remove>()  function is thread-safe."
12749 msgstr "関数 B<remove>() はスレッドセーフである。"
12750
12751 #. type: Plain text
12752 #: build/C/man3/remove.3:77
12753 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
12754 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
12755
12756 #. type: Plain text
12757 #: build/C/man3/remove.3:83
12758 msgid ""
12759 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
12760 "hence would not remove directories)."
12761 msgstr ""
12762 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
12763 "(従ってディレクトリを削除できなかった)。"
12764
12765 #. type: Plain text
12766 #: build/C/man3/remove.3:86 build/C/man2/unlink.2:284
12767 msgid ""
12768 "Infelicities in the protocol underlying NFS can cause the unexpected "
12769 "disappearance of files which are still being used."
12770 msgstr ""
12771 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
12772 "うことがありえる。"
12773
12774 #. type: Plain text
12775 #: build/C/man3/remove.3:97
12776 msgid ""
12777 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
12778 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
12779 msgstr ""
12780 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
12781 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
12782
12783 #. type: TH
12784 #: build/C/man2/rename.2:33
12785 #, no-wrap
12786 msgid "RENAME"
12787 msgstr "RENAME"
12788
12789 #. type: Plain text
12790 #: build/C/man2/rename.2:36
12791 msgid "rename, renameat - change the name or location of a file"
12792 msgstr "rename, renameat - ファイルの名前や位置を変更する"
12793
12794 #. type: Plain text
12795 #: build/C/man2/rename.2:41
12796 #, no-wrap
12797 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
12798 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
12799
12800 #. type: Plain text
12801 #: build/C/man2/rename.2:44
12802 #, no-wrap
12803 msgid ""
12804 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
12805 "B<#include E<lt>stdio.hE<gt>>\n"
12806 msgstr ""
12807 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
12808 "B<#include E<lt>stdio.hE<gt>>\n"
12809
12810 #. type: Plain text
12811 #: build/C/man2/rename.2:47
12812 #, no-wrap
12813 msgid ""
12814 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
12815 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
12816 msgstr ""
12817 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
12818 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
12819
12820 #. type: Plain text
12821 #: build/C/man2/rename.2:55
12822 msgid "B<renameat>():"
12823 msgstr "B<renameat>():"
12824
12825 #. type: Plain text
12826 #: build/C/man2/rename.2:76
12827 msgid ""
12828 "B<rename>()  renames a file, moving it between directories if required.  Any "
12829 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
12830 "Open file descriptors for I<oldpath> are also unaffected."
12831 msgstr ""
12832 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
12833 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
12834 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
12835 "リプタにも影響はない。"
12836
12837 #. type: Plain text
12838 #: build/C/man2/rename.2:84
12839 msgid ""
12840 "If I<newpath> already exists, it will be atomically replaced (subject to a "
12841 "few conditions; see ERRORS below), so that there is no point at which "
12842 "another process attempting to access I<newpath> will find it missing."
12843 msgstr ""
12844 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
12845 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
12846 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
12847 "とはない (訳註: 常にアクセス可能である)。"
12848
12849 #. type: Plain text
12850 #: build/C/man2/rename.2:92
12851 msgid ""
12852 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
12853 "file, then B<rename>()  does nothing, and returns a success status."
12854 msgstr ""
12855 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
12856 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
12857
12858 #. type: Plain text
12859 #: build/C/man2/rename.2:100
12860 msgid ""
12861 "If I<newpath> exists but the operation fails for some reason, B<rename>()  "
12862 "guarantees to leave an instance of I<newpath> in place."
12863 msgstr ""
12864 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
12865 "I<newpath> の実体を元のまま残すことを保証する。"
12866
12867 #. type: Plain text
12868 #: build/C/man2/rename.2:106
12869 msgid ""
12870 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
12871 "not exist, or it must specify an empty directory."
12872 msgstr ""
12873 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
12874 "存在しないか、空のディレクトリでなければならない。"
12875
12876 #. type: Plain text
12877 #: build/C/man2/rename.2:113
12878 msgid ""
12879 "However, when overwriting there will probably be a window in which both "
12880 "I<oldpath> and I<newpath> refer to the file being renamed."
12881 msgstr ""
12882 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
12883 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
12884
12885 #. type: Plain text
12886 #: build/C/man2/rename.2:119
12887 msgid ""
12888 "If I<oldpath> refers to a symbolic link, the link is renamed; if I<newpath> "
12889 "refers to a symbolic link, the link will be overwritten."
12890 msgstr ""
12891 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
12892 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
12893 "は、リンクが上書きされる。"
12894
12895 #. type: SS
12896 #: build/C/man2/rename.2:119
12897 #, no-wrap
12898 msgid "renameat ()"
12899 msgstr "renameat ()"
12900
12901 #. type: Plain text
12902 #: build/C/man2/rename.2:125
12903 msgid ""
12904 "The B<renameat>()  system call operates in exactly the same way as B<rename>"
12905 "(), except for the differences described here."
12906 msgstr ""
12907 "B<renameat>() システムコールは B<rename>() と全く同様に動作するが、以下で説明"
12908 "する点が異なる。"
12909
12910 #. type: Plain text
12911 #: build/C/man2/rename.2:135
12912 msgid ""
12913 "If the pathname given in I<oldpath> is relative, then it is interpreted "
12914 "relative to the directory referred to by the file descriptor I<olddirfd> "
12915 "(rather than relative to the current working directory of the calling "
12916 "process, as is done by B<rename>()  for a relative pathname)."
12917 msgstr ""
12918 "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリ"
12919 "プター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される "
12920 "(B<rename>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
12921 "ワーキングディレクトリに対する相対パスではない)。"
12922
12923 #. type: Plain text
12924 #: build/C/man2/rename.2:147
12925 msgid ""
12926 "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, "
12927 "then I<oldpath> is interpreted relative to the current working directory of "
12928 "the calling process (like B<rename>())."
12929 msgstr ""
12930 "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 "
12931 "B<AT_FDCWD> の場合、 (B<rename>(2) と同様に) I<oldpath> は呼び出したプロセス"
12932 "のカレントワーキングディレクトリに対する相対パスと解釈される。"
12933
12934 #. type: Plain text
12935 #: build/C/man2/rename.2:166
12936 msgid "See B<openat>(2)  for an explanation of the need for B<renameat>()."
12937 msgstr "B<renameat>() の必要性についての説明については B<openat>(2) を参照。"
12938
12939 #. type: Plain text
12940 #: build/C/man2/rename.2:191
12941 msgid ""
12942 "Write permission is denied for the directory containing I<oldpath> or "
12943 "I<newpath>, or, search permission is denied for one of the directories in "
12944 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
12945 "and does not allow write permission (needed to update the I<..> entry).  "
12946 "(See also B<path_resolution>(7).)"
12947 msgstr ""
12948 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
12949 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
12950 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
12951 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
12952
12953 #. type: TP
12954 #: build/C/man2/rename.2:191 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:169
12955 #, no-wrap
12956 msgid "B<EBUSY>"
12957 msgstr "B<EBUSY>"
12958
12959 #. type: Plain text
12960 #: build/C/man2/rename.2:208
12961 msgid ""
12962 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
12963 "use by some process (perhaps as current working directory, or as root "
12964 "directory, or because it was open for reading) or is in use by the system "
12965 "(for example as mount point), while the system considers this an error.  "
12966 "(Note that there is no requirement to return B<EBUSY> in such cases"
12967 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
12968 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
12969 "situations.)"
12970 msgstr ""
12971 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
12972 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
12973 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
12974 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
12975 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
12976 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
12977 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
12978 "B<EBUSY> を返すことが許されている。)"
12979
12980 #. type: Plain text
12981 #: build/C/man2/rename.2:218
12982 msgid ""
12983 "The new pathname contained a path prefix of the old, or, more generally, an "
12984 "attempt was made to make a directory a subdirectory of itself."
12985 msgstr ""
12986 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
12987 "ディレクトリに 変更しようとした場合がほとんどである。"
12988
12989 #. type: Plain text
12990 #: build/C/man2/rename.2:224
12991 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
12992 msgstr ""
12993 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
12994 "い。"
12995
12996 #. type: Plain text
12997 #: build/C/man2/rename.2:235
12998 msgid ""
12999 "I<oldpath> already has the maximum number of links to it, or it was a "
13000 "directory and the directory containing I<newpath> has the maximum number of "
13001 "links."
13002 msgstr ""
13003 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
13004 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
13005
13006 #. type: Plain text
13007 #: build/C/man2/rename.2:251
13008 msgid ""
13009 "The link named by I<oldpath> does not exist; or, a directory component in "
13010 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
13011 msgstr ""
13012 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
13013 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
13014
13015 #. type: Plain text
13016 #: build/C/man2/rename.2:268
13017 msgid ""
13018 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
13019 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
13020 "not a directory."
13021 msgstr ""
13022 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
13023 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
13024 "トリでない。"
13025
13026 #. type: TP
13027 #: build/C/man2/rename.2:268
13028 #, no-wrap
13029 msgid "B<ENOTEMPTY> or B<EEXIST>"
13030 msgstr "B<ENOTEMPTY  または  EEXIST>"
13031
13032 #. type: Plain text
13033 #: build/C/man2/rename.2:272
13034 msgid ""
13035 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
13036 "\" and \"..\"."
13037 msgstr ""
13038 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
13039 "でいる。"
13040
13041 #. type: TP
13042 #: build/C/man2/rename.2:272 build/C/man2/unlink.2:224
13043 #, no-wrap
13044 msgid "B<EPERM> or B<EACCES>"
13045 msgstr "B<EPERM> または B<EACCES>"
13046
13047 #. type: Plain text
13048 #: build/C/man2/rename.2:296
13049 msgid ""
13050 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
13051 "the process's effective user ID is neither the user ID of the file to be "
13052 "deleted nor that of the directory containing it, and the process is not "
13053 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
13054 "I<newpath> is an existing file and the directory containing it has the "
13055 "sticky bit set and the process's effective user ID is neither the user ID of "
13056 "the file to be replaced nor that of the directory containing it, and the "
13057 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
13058 "capability); or the filesystem containing I<pathname> does not support "
13059 "renaming of the type requested."
13060 msgstr ""
13061 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
13062 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
13063 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
13064 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
13065 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
13066 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
13067 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
13068 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
13069 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
13070 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
13071
13072 #. type: Plain text
13073 #: build/C/man2/rename.2:307
13074 msgid ""
13075 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
13076 "permits a filesystem to be mounted at multiple points, but B<rename>()  does "
13077 "not work across different mount points, even if the same filesystem is "
13078 "mounted on both.)"
13079 msgstr ""
13080 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
13081 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
13082 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
13083 "別々のマウント位置を跨いでは動作しない。)"
13084
13085 #. type: Plain text
13086 #: build/C/man2/rename.2:310
13087 msgid "The following additional errors can occur for B<renameat>():"
13088 msgstr "B<renameat>() では以下のエラーも発生する。"
13089
13090 #. type: Plain text
13091 #: build/C/man2/rename.2:330
13092 msgid ""
13093 "B<renameat>()  was added to Linux in kernel 2.6.16; library support was "
13094 "added to glibc in version 2.4."
13095 msgstr ""
13096 "B<renameat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
13097 "ポートはバージョン 2.4 で glibc に追加された。"
13098
13099 #. type: Plain text
13100 #: build/C/man2/rename.2:333
13101 msgid "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
13102 msgstr "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
13103
13104 #. type: Plain text
13105 #: build/C/man2/rename.2:336
13106 msgid "B<renameat>(): POSIX.1-2008."
13107 msgstr "B<renameat>(): POSIX.1-2008."
13108
13109 #. type: Plain text
13110 #: build/C/man2/rename.2:347
13111 msgid ""
13112 "On NFS filesystems, you can not assume that if the operation failed, the "
13113 "file was not renamed.  If the server does the rename operation and then "
13114 "crashes, the retransmitted RPC which will be processed when the server is up "
13115 "again causes a failure.  The application is expected to deal with this.  See "
13116 "B<link>(2)  for a similar problem."
13117 msgstr ""
13118 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
13119 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
13120 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
13121 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
13122 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
13123
13124 #. type: Plain text
13125 #: build/C/man2/rename.2:355
13126 msgid ""
13127 "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), "
13128 "B<path_resolution>(7), B<symlink>(7)"
13129 msgstr ""
13130 "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), "
13131 "B<path_resolution>(7), B<symlink>(7)"
13132
13133 #. type: TH
13134 #: build/C/man2/rmdir.2:30
13135 #, no-wrap
13136 msgid "RMDIR"
13137 msgstr "RMDIR"
13138
13139 #. type: TH
13140 #: build/C/man2/rmdir.2:30
13141 #, no-wrap
13142 msgid "2008-05-08"
13143 msgstr "2008-05-08"
13144
13145 #. type: Plain text
13146 #: build/C/man2/rmdir.2:33
13147 msgid "rmdir - delete a directory"
13148 msgstr "rmdir - ディレクトリを削除する"
13149
13150 #. type: Plain text
13151 #: build/C/man2/rmdir.2:37
13152 msgid "B<int rmdir(const char *>I<pathname>B<);>"
13153 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
13154
13155 #. type: Plain text
13156 #: build/C/man2/rmdir.2:40
13157 msgid "B<rmdir>()  deletes a directory, which must be empty."
13158 msgstr ""
13159 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
13160 "ない。"
13161
13162 #. type: Plain text
13163 #: build/C/man2/rmdir.2:55
13164 msgid ""
13165 "Write access to the directory containing I<pathname> was not allowed, or one "
13166 "of the directories in the path prefix of I<pathname> did not allow search "
13167 "permission.  (See also B<path_resolution>(7)."
13168 msgstr ""
13169 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
13170 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
13171 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
13172 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
13173 "と)"
13174
13175 #. type: Plain text
13176 #: build/C/man2/rmdir.2:64
13177 msgid ""
13178 "I<pathname> is currently in use by the system or some process that prevents "
13179 "its removal.  On Linux this means I<pathname> is currently used as a mount "
13180 "point or is the root directory of the calling process."
13181 msgstr ""
13182 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
13183 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
13184 "たプロセスのルートディレクトリであることを意味する。"
13185
13186 #. type: Plain text
13187 #: build/C/man2/rmdir.2:73
13188 msgid "I<pathname> has I<.> as last component."
13189 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
13190
13191 #. type: Plain text
13192 #: build/C/man2/rmdir.2:85
13193 msgid ""
13194 "A directory component in I<pathname> does not exist or is a dangling "
13195 "symbolic link."
13196 msgstr ""
13197 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
13198 "リックリンク (symbolic link) である。"
13199
13200 #. type: Plain text
13201 #: build/C/man2/rmdir.2:94
13202 msgid ""
13203 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
13204 "fact, a directory."
13205 msgstr ""
13206 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
13207 "クトリでない。"
13208
13209 #. type: TP
13210 #: build/C/man2/rmdir.2:94
13211 #, no-wrap
13212 msgid "B<ENOTEMPTY>"
13213 msgstr "B<ENOTEMPTY>"
13214
13215 #. type: Plain text
13216 #: build/C/man2/rmdir.2:107
13217 msgid ""
13218 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
13219 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
13220 "condition."
13221 msgstr ""
13222 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
13223 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
13224 "で B<EEXIST> を返すことを認めている。"
13225
13226 #. type: Plain text
13227 #: build/C/man2/rmdir.2:118
13228 msgid ""
13229 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
13230 "and the process's effective user ID is neither the user ID of the file to be "
13231 "deleted nor that of the directory containing it, and the process is not "
13232 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
13233 msgstr ""
13234 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
13235 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
13236 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
13237 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
13238
13239 #. type: Plain text
13240 #: build/C/man2/rmdir.2:123
13241 msgid ""
13242 "The filesystem containing I<pathname> does not support the removal of "
13243 "directories."
13244 msgstr ""
13245 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
13246 "ない。"
13247
13248 #. type: Plain text
13249 #: build/C/man2/rmdir.2:127
13250 msgid "I<pathname> refers to a directory on a read-only filesystem."
13251 msgstr ""
13252 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
13253
13254 #. type: Plain text
13255 #: build/C/man2/rmdir.2:132
13256 msgid ""
13257 "Infelicities in the protocol underlying NFS can cause the unexpected "
13258 "disappearance of directories which are still being used."
13259 msgstr ""
13260 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
13261 "する現象が引き起こされることがある。"
13262
13263 #. type: Plain text
13264 #: build/C/man2/rmdir.2:141
13265 msgid ""
13266 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
13267 "B<unlink>(2), B<unlinkat>(2)"
13268 msgstr ""
13269 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
13270 "B<unlink>(2), B<unlinkat>(2)"
13271
13272 #. type: TH
13273 #: build/C/man3/scanf.3:52
13274 #, no-wrap
13275 msgid "SCANF"
13276 msgstr "SCANF"
13277
13278 #. type: Plain text
13279 #: build/C/man3/scanf.3:55
13280 msgid ""
13281 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
13282 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
13283
13284 #. type: Plain text
13285 #: build/C/man3/scanf.3:62
13286 #, no-wrap
13287 msgid ""
13288 "B<int scanf(const char *>I<format>B<, ...);>\n"
13289 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
13290 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
13291 msgstr ""
13292 "B<int scanf(const char *>I<format>B<, ...);>\n"
13293 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
13294 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
13295
13296 #. type: Plain text
13297 #: build/C/man3/scanf.3:64
13298 #, no-wrap
13299 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
13300 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
13301
13302 #. type: Plain text
13303 #: build/C/man3/scanf.3:68
13304 #, no-wrap
13305 msgid ""
13306 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
13307 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13308 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13309 msgstr ""
13310 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
13311 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13312 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
13313
13314 #. type: Plain text
13315 #: build/C/man3/scanf.3:79
13316 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
13317 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
13318
13319 #. type: Plain text
13320 #: build/C/man3/scanf.3:82
13321 msgid ""
13322 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
13323 "200112L;"
13324 msgstr ""
13325 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
13326 "200112L;"
13327
13328 #. type: Plain text
13329 #: build/C/man3/scanf.3:104
13330 msgid ""
13331 "The B<scanf>()  family of functions scans input according to I<format> as "
13332 "described below.  This format may contain I<conversion specifications>; the "
13333 "results from such conversions, if any, are stored in the locations pointed "
13334 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
13335 "argument must be of a type that is appropriate for the value returned by the "
13336 "corresponding conversion specification."
13337 msgstr ""
13338 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
13339 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
13340 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
13341 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
13342 "は、対応する変換指定が返す値に 適合していなければならない。"
13343
13344 #. type: Plain text
13345 #: build/C/man3/scanf.3:115
13346 msgid ""
13347 "If the number of conversion specifications in I<format> exceeds the number "
13348 "of I<pointer> arguments, the results are undefined.  If the number of "
13349 "I<pointer> arguments exceeds the number of conversion specifications, then "
13350 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
13351 msgstr ""
13352 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
13353 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
13354 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
13355
13356 #. type: Plain text
13357 #: build/C/man3/scanf.3:127
13358 msgid ""
13359 "The B<scanf>()  function reads input from the standard input stream "
13360 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
13361 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
13362 msgstr ""
13363 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
13364 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
13365 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
13366
13367 #. type: Plain text
13368 #: build/C/man3/scanf.3:145
13369 msgid ""
13370 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
13371 "from the stream pointer I<stream> using a variable argument list of pointers "
13372 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
13373 "from the standard input and the B<vsscanf>()  function scans it from a "
13374 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
13375 "functions respectively."
13376 msgstr ""
13377 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
13378 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
13379 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
13380 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
13381 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
13382
13383 #. type: Plain text
13384 #: build/C/man3/scanf.3:159
13385 msgid ""
13386 "The I<format> string consists of a sequence of I<directives> which describe "
13387 "how to process the sequence of input characters.  If processing of a "
13388 "directive fails, no further input is read, and B<scanf>()  returns.  A "
13389 "\"failure\" can be either of the following: I<input failure>, meaning that "
13390 "input characters were unavailable, or I<matching failure>, meaning that the "
13391 "input was inappropriate (see below)."
13392 msgstr ""
13393 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
13394 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
13395 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
13396 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
13397 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
13398 "であったこと (下記参照) を意味する。"
13399
13400 #. type: Plain text
13401 #: build/C/man3/scanf.3:161
13402 msgid "A directive is one of the following:"
13403 msgstr "命令は以下のいずれかである:"
13404
13405 #. type: TP
13406 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
13407 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
13408 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
13409 #, no-wrap
13410 msgid "\\(bu"
13411 msgstr "\\(bu"
13412
13413 #. type: Plain text
13414 #: build/C/man3/scanf.3:167
13415 msgid ""
13416 "A sequence of white-space characters (space, tab, newline, etc.; see "
13417 "B<isspace>(3)).  This directive matches any amount of white space, including "
13418 "none, in the input."
13419 msgstr ""
13420 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
13421 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
13422 "致する)。"
13423
13424 #. type: Plain text
13425 #: build/C/man3/scanf.3:171
13426 msgid ""
13427 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
13428 "This character must exactly match the next character of input."
13429 msgstr ""
13430 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
13431 "の次の文字に正確に一致しなければならない。"
13432
13433 #. type: Plain text
13434 #: build/C/man3/scanf.3:182
13435 msgid ""
13436 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
13437 "character.  A sequence of characters from the input is converted according "
13438 "to this specification, and the result is placed in the corresponding "
13439 "I<pointer> argument.  If the next item of input does not match the "
13440 "conversion specification, the conversion fails\\(emthis is a I<matching "
13441 "failure>."
13442 msgstr ""
13443 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
13444 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
13445 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
13446 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
13447
13448 #. type: Plain text
13449 #: build/C/man3/scanf.3:190
13450 msgid ""
13451 "Each I<conversion specification> in I<format> begins with either the "
13452 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
13453 "for the distinction) followed by:"
13454 msgstr ""
13455 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
13456 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
13457
13458 #. type: Plain text
13459 #: build/C/man3/scanf.3:201
13460 msgid ""
13461 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
13462 "input as directed by the conversion specification, but discards the input.  "
13463 "No corresponding I<pointer> argument is required, and this specification is "
13464 "not included in the count of successful assignments returned by B<scanf>()."
13465 msgstr ""
13466 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
13467 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
13468 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
13469
13470 #. type: Plain text
13471 #: build/C/man3/scanf.3:220
13472 msgid ""
13473 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
13474 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
13475 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
13476 "buffer of sufficient size, and assigns the address of this buffer to the "
13477 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
13478 "*> variable (this variable does not need to be initialized before the "
13479 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
13480 "longer required."
13481 msgstr ""
13482 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
13483 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
13484 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
13485 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
13486 "は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に"
13487 "初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファ"
13488 "を B<free>(3) すべきである。"
13489
13490 #. type: Plain text
13491 #: build/C/man3/scanf.3:232
13492 msgid ""
13493 "An optional decimal integer which specifies the I<maximum field width>.  "
13494 "Reading of characters stops either when this maximum is reached or when a "
13495 "nonmatching character is found, whichever happens first.  Most conversions "
13496 "discard initial white space characters (the exceptions are noted below), and "
13497 "these discarded characters don't count toward the maximum field width.  "
13498 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
13499 "mark the end of the input; the maximum field width does not include this "
13500 "terminator."
13501 msgstr ""
13502 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
13503 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
13504 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
13505 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
13506 "の入力変換では、入力の末尾を示す終端のヌルバイト (\\(aq\\e0\\(aq)  も格納され"
13507 "るが、最大フィールド幅にはこの終端バイトは含まれない。"
13508
13509 #. type: Plain text
13510 #: build/C/man3/scanf.3:246
13511 msgid ""
13512 "An optional I<type modifier character>.  For example, the B<l> type modifier "
13513 "is used with integer conversions such as B<%d> to specify that the "
13514 "corresponding I<pointer> argument refers to a I<long int> rather than a "
13515 "pointer to an I<int>."
13516 msgstr ""
13517 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
13518 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
13519 "I<int> ではなく I<long int> を参照していることを指定できる。"
13520
13521 #. type: Plain text
13522 #: build/C/man3/scanf.3:251
13523 msgid ""
13524 "A I<conversion specifier> that specifies the type of input conversion to be "
13525 "performed."
13526 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
13527
13528 #. type: Plain text
13529 #: build/C/man3/scanf.3:280
13530 msgid ""
13531 "The conversion specifications in I<format> are of two forms, either "
13532 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
13533 "forms should not be mixed in the same I<format> string, except that a string "
13534 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
13535 "I<format> contains \\(aq%\\(aq specifications, then these correspond in "
13536 "order with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form "
13537 "(which is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer "
13538 "that specifies that the converted input should be placed in the location "
13539 "referred to by the I<n>-th I<pointer> argument following I<format>."
13540 msgstr ""
13541 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
13542 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
13543 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
13544 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
13545 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
13546 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
13547 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
13548 "I<pointer> 引き数が参照する場所に格納することを指定する。"
13549
13550 #. type: SS
13551 #: build/C/man3/scanf.3:280
13552 #, no-wrap
13553 msgid "Conversions"
13554 msgstr "変換"
13555
13556 #. type: Plain text
13557 #: build/C/man3/scanf.3:284
13558 msgid ""
13559 "The following I<type modifier characters> can appear in a conversion "
13560 "specification:"
13561 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
13562
13563 #. type: Plain text
13564 #: build/C/man3/scanf.3:294
13565 msgid ""
13566 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
13567 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
13568 "I<unsigned short int> (rather than I<int>)."
13569 msgstr ""
13570 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
13571 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
13572 "あることを示す。"
13573
13574 #. type: Plain text
13575 #: build/C/man3/scanf.3:302
13576 msgid ""
13577 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
13578 "I<unsigned char>."
13579 msgstr ""
13580 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
13581 "タであることを示す。"
13582
13583 #. type: Plain text
13584 #: build/C/man3/scanf.3:311
13585 msgid ""
13586 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
13587 "I<uintmax_t>.  This modifier was introduced in C99."
13588 msgstr ""
13589 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
13590 "ることを示す。 この修飾子は C99 で導入された。"
13591
13592 #.  This use of l was introduced in Amendment 1 to ISO C90.
13593 #. type: Plain text
13594 #: build/C/man3/scanf.3:338
13595 msgid ""
13596 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
13597 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
13598 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
13599 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
13600 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
13601 "B<L>.  If used with B<%c> or B<%s>, the corresponding parameter is "
13602 "considered as a pointer to a wide character or wide-character string "
13603 "respectively."
13604 msgstr ""
13605 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
13606 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
13607 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
13608 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
13609 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
13610 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
13611 "ンタであると みなされる。"
13612
13613 #.  MTK, Jul 05: The following is no longer true for modern
13614 #.  ANSI C (i.e., C99):
13615 #.  (Note that long long is not an
13616 #.  ANSI C
13617 #.  type. Any program using this will not be portable to all
13618 #.  architectures).
13619 #. type: Plain text
13620 #: build/C/man3/scanf.3:354
13621 msgid ""
13622 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
13623 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
13624 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
13625 msgstr ""
13626 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
13627 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
13628 "I<long long> へのポインタであることのいずれかであることを示す。"
13629
13630 #. type: Plain text
13631 #: build/C/man3/scanf.3:359
13632 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
13633 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
13634
13635 #. type: Plain text
13636 #: build/C/man3/scanf.3:366
13637 msgid ""
13638 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
13639 "modifier was introduced in C99."
13640 msgstr ""
13641 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
13642 "この修飾子は C99 で導入された。"
13643
13644 #. type: Plain text
13645 #: build/C/man3/scanf.3:373
13646 msgid ""
13647 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
13648 "modifier was introduced in C99."
13649 msgstr ""
13650 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
13651 "修飾子は C99 で導入された。"
13652
13653 #. type: Plain text
13654 #: build/C/man3/scanf.3:377
13655 msgid "The following I<conversion specifiers> are available:"
13656 msgstr "以下の I<「変換指定子」> が利用可能である。"
13657
13658 #. type: Plain text
13659 #: build/C/man3/scanf.3:386
13660 msgid ""
13661 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
13662 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
13663 "initial white space characters are discarded), and assignment does not occur."
13664 msgstr ""
13665 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
13666 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
13667 "る)、 変数への代入は生じない。"
13668
13669 #. type: TP
13670 #: build/C/man3/scanf.3:386
13671 #, no-wrap
13672 msgid "B<d>"
13673 msgstr "B<d>"
13674
13675 #. type: Plain text
13676 #: build/C/man3/scanf.3:391
13677 msgid ""
13678 "Matches an optionally signed decimal integer; the next pointer must be a "
13679 "pointer to I<int>."
13680 msgstr ""
13681 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
13682 "ばならない。"
13683
13684 #. type: TP
13685 #: build/C/man3/scanf.3:391
13686 #, no-wrap
13687 msgid "B<D>"
13688 msgstr "B<D>"
13689
13690 #. type: Plain text
13691 #: build/C/man3/scanf.3:400
13692 msgid ""
13693 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
13694 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
13695 "causing old programs to fail mysteriously.)"
13696 msgstr ""
13697 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
13698 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
13699 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
13700
13701 #. type: TP
13702 #: build/C/man3/scanf.3:400
13703 #, no-wrap
13704 msgid "B<i>"
13705 msgstr "B<i>"
13706
13707 #. type: Plain text
13708 #: build/C/man3/scanf.3:412
13709 msgid ""
13710 "Matches an optionally signed integer; the next pointer must be a pointer to "
13711 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
13712 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
13713 "that correspond to the base are used."
13714 msgstr ""
13715 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
13716 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
13717 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
13718 "される文字は、これらの基数に対応しているものだけである。"
13719
13720 #. type: TP
13721 #: build/C/man3/scanf.3:412
13722 #, no-wrap
13723 msgid "B<o>"
13724 msgstr "B<o>"
13725
13726 #. type: Plain text
13727 #: build/C/man3/scanf.3:416
13728 msgid ""
13729 "Matches an unsigned octal integer; the next pointer must be a pointer to "
13730 "I<unsigned int>."
13731 msgstr ""
13732 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
13733 "らない。"
13734
13735 #. type: TP
13736 #: build/C/man3/scanf.3:416
13737 #, no-wrap
13738 msgid "B<u>"
13739 msgstr "B<u>"
13740
13741 #. type: Plain text
13742 #: build/C/man3/scanf.3:421
13743 msgid ""
13744 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
13745 "I<unsigned int>."
13746 msgstr ""
13747 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
13748 "でなければならない。"
13749
13750 #. type: Plain text
13751 #: build/C/man3/scanf.3:426
13752 msgid ""
13753 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
13754 "to I<unsigned int>."
13755 msgstr ""
13756 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
13757 "タでなければならない。"
13758
13759 #. type: TP
13760 #: build/C/man3/scanf.3:426
13761 #, no-wrap
13762 msgid "B<X>"
13763 msgstr "B<X>"
13764
13765 #. type: Plain text
13766 #: build/C/man3/scanf.3:430
13767 msgid "Equivalent to B<x>."
13768 msgstr "B<x> と同一である。"
13769
13770 #. type: TP
13771 #: build/C/man3/scanf.3:430
13772 #, no-wrap
13773 msgid "B<f>"
13774 msgstr "B<f>"
13775
13776 #. type: Plain text
13777 #: build/C/man3/scanf.3:435
13778 msgid ""
13779 "Matches an optionally signed floating-point number; the next pointer must be "
13780 "a pointer to I<float>."
13781 msgstr ""
13782 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
13783 "ればならない。"
13784
13785 #. type: TP
13786 #: build/C/man3/scanf.3:435
13787 #, no-wrap
13788 msgid "B<e>"
13789 msgstr "B<e>"
13790
13791 #. type: Plain text
13792 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
13793 msgid "Equivalent to B<f>."
13794 msgstr "B<f> と同一である。"
13795
13796 #. type: TP
13797 #: build/C/man3/scanf.3:439
13798 #, no-wrap
13799 msgid "B<g>"
13800 msgstr "B<g>"
13801
13802 #. type: TP
13803 #: build/C/man3/scanf.3:443
13804 #, no-wrap
13805 msgid "B<E>"
13806 msgstr "B<E>"
13807
13808 #. type: Plain text
13809 #: build/C/man3/scanf.3:451
13810 msgid "(C99) Equivalent to B<f>."
13811 msgstr "(C99)  B<f> と同一である。"
13812
13813 #. type: Plain text
13814 #: build/C/man3/scanf.3:459
13815 msgid ""
13816 "Matches a sequence of non-white-space characters; the next pointer must be a "
13817 "pointer to character array that is long enough to hold the input sequence "
13818 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
13819 "automatically.  The input string stops at white space or at the maximum "
13820 "field width, whichever occurs first."
13821 msgstr ""
13822 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
13823 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
13824 "的に追加される) 終端のヌルバイト (\\(aq\\e0\\(aq) を格納するのに十分な大きさ"
13825 "でなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
13826 "フィールド幅に 達するか、のどちらかが起こると停止される。"
13827
13828 #. type: Plain text
13829 #: build/C/man3/scanf.3:469
13830 msgid ""
13831 "Matches a sequence of characters whose length is specified by the I<maximum "
13832 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
13833 "there must be enough room for all the characters (no terminating null byte "
13834 "is added).  The usual skip of leading white space is suppressed.  To skip "
13835 "white space first, use an explicit space in the format."
13836 msgstr ""
13837 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
13838 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
13839 "領域が なければならない (終端のヌルバイトは追加されない)。 通常行われる先頭の"
13840 "ホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ばす"
13841 "ためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
13842
13843 #. type: TP
13844 #: build/C/man3/scanf.3:469
13845 #, no-wrap
13846 msgid "B<\\&[>"
13847 msgstr "B<\\&[>"
13848
13849 #. type: Plain text
13850 #: build/C/man3/scanf.3:502
13851 msgid ""
13852 "Matches a nonempty sequence of characters from the specified set of accepted "
13853 "characters; the next pointer must be a pointer to I<char>, and there must be "
13854 "enough room for all the characters in the string, plus a terminating null "
13855 "byte.  The usual skip of leading white space is suppressed.  The string is "
13856 "to be made up of characters in (or not in) a particular set; the set is "
13857 "defined by the characters between the open bracket B<[> character and a "
13858 "close bracket B<]> character.  The set I<excludes> those characters if the "
13859 "first character after the open bracket is a circumflex (B<^>).  To include a "
13860 "close bracket in the set, make it the first character after the open bracket "
13861 "or the circumflex; any other position will end the set.  The hyphen "
13862 "character B<-> is also special; when placed between two other characters, it "
13863 "adds all intervening characters to the set.  To include a hyphen, make it "
13864 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
13865 "> means the set \"everything except close bracket, zero through nine, and "
13866 "hyphen\".  The string ends with the appearance of a character not in the "
13867 "(or, with a circumflex, in) set or when the field width runs out."
13868 msgstr ""
13869 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
13870 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
13871 "ず、 そこには文字列中のすべての文字と終端のヌルバイト を格納するための十分な"
13872 "領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行わ"
13873 "れない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き括"
13874 "弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字が"
13875 "曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 閉"
13876 "じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号のあ"
13877 "との最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が終"
13878 "る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた時、"
13879 "この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませるた"
13880 "めには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<[^]"
13881 "0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意味"
13882 "する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) 文"
13883 "字の 出現または確保された領域が使い切られた時に終了する。"
13884
13885 #. type: Plain text
13886 #: build/C/man3/scanf.3:510
13887 msgid ""
13888 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
13889 "pointer must be a pointer to a pointer to I<void>."
13890 msgstr ""
13891 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
13892 "タは I<void> へのポインタへのポインタでなければならない。"
13893
13894 #. type: Plain text
13895 #: build/C/man3/scanf.3:530
13896 msgid ""
13897 "Nothing is expected; instead, the number of characters consumed thus far "
13898 "from the input is stored through the next pointer, which must be a pointer "
13899 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
13900 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
13901 "of a B<%n> directive does not increment the assignment count returned at the "
13902 "completion of execution\" but the Corrigendum seems to contradict this.  "
13903 "Probably it is wise not to make any assumptions on the effect of B<%n> "
13904 "conversions on the return value."
13905 msgstr ""
13906 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
13907 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
13908 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
13909 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
13910 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
13911 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
13912 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
13913
13914 #. type: Plain text
13915 #: build/C/man3/scanf.3:535
13916 msgid ""
13917 "These functions return the number of input items successfully matched and "
13918 "assigned, which can be fewer than provided for, or even zero in the event of "
13919 "an early matching failure."
13920 msgstr ""
13921 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
13922 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
13923 "ることもある。"
13924
13925 #. type: Plain text
13926 #: build/C/man3/scanf.3:547
13927 msgid ""
13928 "The value B<EOF> is returned if the end of input is reached before either "
13929 "the first successful conversion or a matching failure occurs.  B<EOF> is "
13930 "also returned if a read error occurs, in which case the error indicator for "
13931 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
13932 "error."
13933 msgstr ""
13934 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
13935 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
13936 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
13937 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
13938
13939 #. type: Plain text
13940 #: build/C/man3/scanf.3:553
13941 msgid ""
13942 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
13943 "operation would block."
13944 msgstr ""
13945 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
13946 "込み操作は停止 (block) することになる。"
13947
13948 #. type: Plain text
13949 #: build/C/man3/scanf.3:558
13950 msgid ""
13951 "The file descriptor underlying I<stream> is invalid, or not open for reading."
13952 msgstr ""
13953 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
13954 "ンされていない。"
13955
13956 #. type: Plain text
13957 #: build/C/man3/scanf.3:561
13958 msgid "Input byte sequence does not form a valid character."
13959 msgstr "入力されたバイト列が有効な文字を構成していない。"
13960
13961 #. type: Plain text
13962 #: build/C/man3/scanf.3:565
13963 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
13964 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
13965
13966 #. type: Plain text
13967 #: build/C/man3/scanf.3:570
13968 msgid "Not enough arguments; or I<format> is NULL."
13969 msgstr "引き数が十分でない。または I<format> が NULL である。"
13970
13971 #. type: Plain text
13972 #: build/C/man3/scanf.3:573
13973 msgid "Out of memory."
13974 msgstr "メモリ不足。"
13975
13976 #. type: TP
13977 #: build/C/man3/scanf.3:573
13978 #, no-wrap
13979 msgid "B<ERANGE>"
13980 msgstr "B<ERANGE>"
13981
13982 #. type: Plain text
13983 #: build/C/man3/scanf.3:577
13984 msgid ""
13985 "The result of an integer conversion would exceed the size that can be stored "
13986 "in the corresponding integer type."
13987 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
13988
13989 #. type: Plain text
13990 #: build/C/man3/scanf.3:587
13991 msgid ""
13992 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
13993 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
13994 msgstr ""
13995 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
13996 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
13997
13998 #. type: Plain text
13999 #: build/C/man3/scanf.3:597
14000 msgid ""
14001 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
14002 "the usage of B<L> in integer conversions is the GNU notation."
14003 msgstr ""
14004 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
14005 "B<ll> または B<L> の使用は GNU での拡張である。"
14006
14007 #. type: Plain text
14008 #: build/C/man3/scanf.3:608
14009 msgid ""
14010 "The Linux version of these functions is based on the I<GNU> I<libio> "
14011 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
14012 "(glibc-1.08)> for a more concise description."
14013 msgstr ""
14014 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
14015 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
14016
14017 #. type: SS
14018 #: build/C/man3/scanf.3:609
14019 #, no-wrap
14020 msgid "The 'a' assignment-allocation modifier"
14021 msgstr "'a' 代入割り当て (assignment-allocation) 修飾子"
14022
14023 #. type: Plain text
14024 #: build/C/man3/scanf.3:620
14025 msgid ""
14026 "Originally, the GNU C library supported dynamic allocation for string inputs "
14027 "(as a nonstandard extension) via the B<a> character.  (This feature is "
14028 "present at least as far back as glibc 2.0.)  Thus, one could write the "
14029 "following to have B<scanf>()  allocate a buffer for an input string, with a "
14030 "pointer to that buffer being returned in I<*buf>:"
14031 msgstr ""
14032 "元々、 GNU C ライブラリ (glibc) では、 B<a> 文字による文字列入力に対する動的"
14033 "割り当て変換指定子 (dynamic allocation conversion specifier) を (非標準の拡張"
14034 "として) サポートしている。この機能は少なくとも glibc 2.0 の時点ではすでに存在"
14035 "している。 したがって、以下のようにして、 B<scanf>() に入力文字列に対してバッ"
14036 "ファを割り当てさせることができる。割り当てられたバッファは I<*buf> で返され"
14037 "る。"
14038
14039 #. type: Plain text
14040 #: build/C/man3/scanf.3:623
14041 #, no-wrap
14042 msgid ""
14043 "    char *buf;\n"
14044 "    scanf(\"%as\", &buf);\n"
14045 msgstr ""
14046 "    char *buf;\n"
14047 "    scanf(\"%as\", &buf);\n"
14048
14049 #. type: Plain text
14050 #: build/C/man3/scanf.3:634
14051 msgid ""
14052 "The use of the letter B<a> for this purpose was problematic, since B<a> is "
14053 "also specified by the ISO C standard as a synonym for B<f> (floating-point "
14054 "input).  POSIX.1-2008 instead specifies the B<m> modifier for assignment "
14055 "allocation (as documented in DESCRIPTION, above)."
14056 msgstr ""
14057 "この目的で文字 B<a> を使うのは問題をはらんでいる。 なぜなら、 B<a> は ISO C "
14058 "標準では (浮動小数点入力を表す) の B<f> の同義語として定義されているからであ"
14059 "る。 その代わり、 POSIX.1-2008 では、(上記の「説明」に書かれている通り) 代入"
14060 "割り当てを行う修飾子として B<m> が規定されている。"
14061
14062 #. type: Plain text
14063 #: build/C/man3/scanf.3:646
14064 msgid ""
14065 "Note that the B<a> modifier is not available if the program is compiled with "
14066 "I<gcc -std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also "
14067 "specified), in which case the B<a> is interpreted as a specifier for "
14068 "floating-point numbers (see above)."
14069 msgstr ""
14070 "B<a> 修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
14071 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない点に注意。"
14072 "この場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
14073
14074 #. type: Plain text
14075 #: build/C/man3/scanf.3:652
14076 msgid ""
14077 "Support for the B<m> modifier was added to glibc starting with version 2.7, "
14078 "and new programs should use that modifier instead of B<a>."
14079 msgstr ""
14080 "B<m> 修飾子への対応はバージョン 2.7 以降の glibc で追加されている。新しいプロ"
14081 "グラムでぇあ B<a> の代わりに B<m> を使用すべきである。"
14082
14083 #. type: Plain text
14084 #: build/C/man3/scanf.3:658
14085 msgid ""
14086 "As well as being standardized by POSIX, the B<m> modifier has the following "
14087 "further advantages over the use of B<a:>"
14088 msgstr ""
14089 "POSIX で標準化されているだけでなく、 B<m> 修飾子には B<a> を利用する場合に比"
14090 "べて以下のような利点がある。"
14091
14092 #. type: Plain text
14093 #: build/C/man3/scanf.3:663
14094 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
14095 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
14096
14097 #. type: Plain text
14098 #: build/C/man3/scanf.3:669
14099 msgid ""
14100 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
14101 "specifier (and is unaffected by I<gcc -std=c99> etc.)."
14102 msgstr ""
14103 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
14104 "std=c99> などの影響も避けられる)。"
14105
14106 #. type: Plain text
14107 #: build/C/man3/scanf.3:682
14108 msgid ""
14109 "All functions are fully C89 conformant, but provide the additional "
14110 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
14111 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
14112 "the behavior of specifiers defined in C89."
14113 msgstr ""
14114 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
14115 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
14116 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
14117 "れない。"
14118
14119 #. type: Plain text
14120 #: build/C/man3/scanf.3:698
14121 msgid ""
14122 "Some combinations of the type modifiers and conversion specifiers defined by "
14123 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
14124 "behavior on Linux, this need not to be so on other architectures.  Therefore "
14125 "it usually is better to use modifiers that are not defined by ANSI C at all, "
14126 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
14127 "B<u>, B<x>, and B<X> conversions or B<ll>."
14128 msgstr ""
14129 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
14130 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
14131 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
14132 "他のアーキテクチャでも同様になっているとは限らない。\n"
14133 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
14134 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
14135 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
14136
14137 #. type: Plain text
14138 #: build/C/man3/scanf.3:704
14139 msgid ""
14140 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
14141 "conversions equivalently to B<L>."
14142 msgstr ""
14143 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
14144 "動小数の変換に使用される。"
14145
14146 #. type: Plain text
14147 #: build/C/man3/scanf.3:714
14148 msgid ""
14149 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
14150 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
14151 "the returned string, as in the following example:"
14152 msgstr ""
14153 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
14154 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
14155 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
14156
14157 #. type: Plain text
14158 #: build/C/man3/scanf.3:719
14159 #, no-wrap
14160 msgid ""
14161 "char *p;\n"
14162 "int n;\n"
14163 msgstr ""
14164 "char *p;\n"
14165 "int n;\n"
14166
14167 #. type: Plain text
14168 #: build/C/man3/scanf.3:730
14169 #, no-wrap
14170 msgid ""
14171 "errno = 0;\n"
14172 "n = scanf(\"%m[a-z]\", &p);\n"
14173 "if (n == 1) {\n"
14174 "    printf(\"read: %s\\en\", p);\n"
14175 "    free(p);\n"
14176 "} else if (errno != 0) {\n"
14177 "    perror(\"scanf\");\n"
14178 "} else {\n"
14179 "    fprintf(stderr, \"No matching characters\\en\");\n"
14180 "}\n"
14181 msgstr ""
14182 "errno = 0;\n"
14183 "n = scanf(\"%m[a-z]\", &p);\n"
14184 "if (n == 1) {\n"
14185 "    printf(\"read: %s\\en\", p);\n"
14186 "    free(p);\n"
14187 "} else if (errno != 0) {\n"
14188 "    perror(\"scanf\");\n"
14189 "} else {\n"
14190 "    fprintf(stderr, \"No matching characters\\en\");\n"
14191 "}\n"
14192
14193 #. type: Plain text
14194 #: build/C/man3/scanf.3:738
14195 msgid ""
14196 "As shown in the above example, it is necessary to call B<free>(3)  only if "
14197 "the B<scanf>()  call successfully read a string."
14198 msgstr ""
14199 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
14200 "B<free>(3)  を呼び出す必要がある。"
14201
14202 #. type: Plain text
14203 #: build/C/man3/scanf.3:745
14204 msgid ""
14205 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
14206 "B<strtoul>(3)"
14207 msgstr ""
14208 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
14209 "B<strtoul>(3),"
14210
14211 #. type: TH
14212 #: build/C/man3/setbuf.3:48
14213 #, no-wrap
14214 msgid "SETBUF"
14215 msgstr "SETBUF"
14216
14217 #. type: TH
14218 #: build/C/man3/setbuf.3:48
14219 #, no-wrap
14220 msgid "2014-02-18"
14221 msgstr "2014-02-18"
14222
14223 #. type: Plain text
14224 #: build/C/man3/setbuf.3:51
14225 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
14226 msgstr ""
14227 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
14228
14229 #. type: Plain text
14230 #: build/C/man3/setbuf.3:56
14231 #, no-wrap
14232 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
14233 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
14234
14235 #. type: Plain text
14236 #: build/C/man3/setbuf.3:58
14237 #, no-wrap
14238 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
14239 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
14240
14241 #. type: Plain text
14242 #: build/C/man3/setbuf.3:60
14243 #, no-wrap
14244 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
14245 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
14246
14247 #. type: Plain text
14248 #: build/C/man3/setbuf.3:63
14249 #, no-wrap
14250 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
14251 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
14252
14253 #. type: Plain text
14254 #: build/C/man3/setbuf.3:73
14255 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
14256 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
14257
14258 #. type: Plain text
14259 #: build/C/man3/setbuf.3:96
14260 msgid ""
14261 "The three types of buffering available are unbuffered, block buffered, and "
14262 "line buffered.  When an output stream is unbuffered, information appears on "
14263 "the destination file or terminal as soon as written; when it is block "
14264 "buffered many characters are saved up and written as a block; when it is "
14265 "line buffered characters are saved up until a newline is output or input is "
14266 "read from any stream attached to a terminal device (typically I<stdin>).  "
14267 "The function B<fflush>(3)  may be used to force the block out early.  (See "
14268 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
14269 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
14270 "obtained.  If a stream refers to a terminal (as I<stdout> normally does), it "
14271 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
14272 "by default."
14273 msgstr ""
14274 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
14275 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
14276 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
14277 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
14278 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
14279 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
14280 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
14281 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
14282 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
14283 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
14284 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
14285 "unbuffered である。"
14286
14287 #. type: Plain text
14288 #: build/C/man3/setbuf.3:103
14289 msgid ""
14290 "The B<setvbuf>()  function may be used on any open stream to change its "
14291 "buffer.  The I<mode> argument must be one of the following three macros:"
14292 msgstr ""
14293 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
14294 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
14295
14296 #. type: TP
14297 #: build/C/man3/setbuf.3:104
14298 #, no-wrap
14299 msgid "B<_IONBF>"
14300 msgstr "B<_IONBF>"
14301
14302 #. type: Plain text
14303 #: build/C/man3/setbuf.3:107
14304 msgid "unbuffered"
14305 msgstr "unbuffered"
14306
14307 #. type: TP
14308 #: build/C/man3/setbuf.3:107
14309 #, no-wrap
14310 msgid "B<_IOLBF>"
14311 msgstr "B<_IOLBF>"
14312
14313 #. type: Plain text
14314 #: build/C/man3/setbuf.3:110
14315 msgid "line buffered"
14316 msgstr "line buffered"
14317
14318 #. type: TP
14319 #: build/C/man3/setbuf.3:110
14320 #, no-wrap
14321 msgid "B<_IOFBF>"
14322 msgstr "B<_IOFBF>"
14323
14324 #. type: Plain text
14325 #: build/C/man3/setbuf.3:113
14326 msgid "fully buffered"
14327 msgstr "fully buffered"
14328
14329 #. type: Plain text
14330 #: build/C/man3/setbuf.3:129
14331 msgid ""
14332 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
14333 "least I<size> bytes long; this buffer will be used instead of the current "
14334 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
14335 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
14336 "()  function may be used only after opening a stream and before any other "
14337 "operations have been performed on it."
14338 msgstr ""
14339 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
14340 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
14341 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
14342 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
14343 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
14344
14345 #. type: Plain text
14346 #: build/C/man3/setbuf.3:135
14347 msgid ""
14348 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
14349 "().  The B<setbuf>()  function is exactly equivalent to the call"
14350 msgstr ""
14351 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
14352 "B<setbuf>()  関数は、"
14353
14354 #. type: Plain text
14355 #: build/C/man3/setbuf.3:138
14356 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
14357 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
14358
14359 #. type: Plain text
14360 #: build/C/man3/setbuf.3:148
14361 msgid ""
14362 "The B<setbuffer>()  function is the same, except that the size of the buffer "
14363 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
14364 "The B<setlinebuf>()  function is exactly equivalent to the call:"
14365 msgstr ""
14366 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
14367 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
14368 "は以下と同じである。"
14369
14370 #. type: Plain text
14371 #: build/C/man3/setbuf.3:151
14372 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
14373 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
14374
14375 #. type: Plain text
14376 #: build/C/man3/setbuf.3:162
14377 msgid ""
14378 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
14379 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
14380 "I<errno> on failure."
14381 msgstr ""
14382 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
14383 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
14384 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
14385
14386 #. type: Plain text
14387 #: build/C/man3/setbuf.3:164
14388 msgid "The other functions do not return a value."
14389 msgstr "その他の関数は値を返さない。"
14390
14391 #. type: Plain text
14392 #: build/C/man3/setbuf.3:173
14393 msgid ""
14394 "The B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), and B<setvbuf>()  "
14395 "functions are thread-safe."
14396 msgstr ""
14397 "関数 B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), B<setvbuf>() はスレッド"
14398 "セーフである。"
14399
14400 #. type: Plain text
14401 #: build/C/man3/setbuf.3:179
14402 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
14403 msgstr ""
14404 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
14405
14406 #. type: Plain text
14407 #: build/C/man3/setbuf.3:189
14408 msgid ""
14409 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
14410 "versions of BSD before 4.2BSD, and are available under Linux since libc "
14411 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
14412 "buffer size and should be avoided."
14413 msgstr ""
14414 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
14415 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
14416 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
14417 "ズを使用するので、これも使うべきでない。"
14418
14419 #. type: Plain text
14420 #: build/C/man3/setbuf.3:196
14421 msgid ""
14422 "You must make sure that the space that I<buf> points to still exists by the "
14423 "time I<stream> is closed, which also happens at program termination.  For "
14424 "example, the following is invalid:"
14425 msgstr ""
14426 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
14427 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
14428 "な使い方は許されない:"
14429
14430 #. type: Plain text
14431 #: build/C/man3/setbuf.3:199
14432 #, no-wrap
14433 msgid "#include E<lt>stdio.hE<gt>\n"
14434 msgstr "#include E<lt>stdio.hE<gt>\n"
14435
14436 #. type: Plain text
14437 #: build/C/man3/setbuf.3:208
14438 #, no-wrap
14439 msgid ""
14440 "int\n"
14441 "main(void)\n"
14442 "{\n"
14443 "    char buf[BUFSIZ];\n"
14444 "    setbuf(stdin, buf);\n"
14445 "    printf(\"Hello, world!\\en\");\n"
14446 "    return 0;\n"
14447 "}\n"
14448 msgstr ""
14449 "int\n"
14450 "main(void)\n"
14451 "{\n"
14452 "    char buf[BUFSIZ];\n"
14453 "    setbuf(stdin, buf);\n"
14454 "    printf(\"Hello, world!\\en\");\n"
14455 "    return 0;\n"
14456 "}\n"
14457
14458 #. type: Plain text
14459 #: build/C/man3/setbuf.3:217
14460 msgid ""
14461 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
14462 "(3), B<puts>(3)"
14463 msgstr ""
14464 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
14465 "(3), B<puts>(3)"
14466
14467 #. type: TH
14468 #: build/C/man3/stdin.3:13
14469 #, no-wrap
14470 msgid "STDIN"
14471 msgstr "STDIN"
14472
14473 #. type: TH
14474 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
14475 #, no-wrap
14476 msgid "2008-07-14"
14477 msgstr "2008-07-14"
14478
14479 #. type: Plain text
14480 #: build/C/man3/stdin.3:16
14481 msgid "stdin, stdout, stderr - standard I/O streams"
14482 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
14483
14484 #. type: Plain text
14485 #: build/C/man3/stdin.3:23
14486 #, no-wrap
14487 msgid ""
14488 "B<extern FILE *>I<stdin>B<;>\n"
14489 "B<extern FILE *>I<stdout>B<;>\n"
14490 "B<extern FILE *>I<stderr>B<;>\n"
14491 msgstr ""
14492 "B<extern FILE *>I<stdin>B<;>\n"
14493 "B<extern FILE *>I<stdout>B<;>\n"
14494 "B<extern FILE *>I<stderr>B<;>\n"
14495
14496 #. type: Plain text
14497 #: build/C/man3/stdin.3:35
14498 msgid ""
14499 "Under normal circumstances every UNIX program has three streams opened for "
14500 "it when it starts up, one for input, one for output, and one for printing "
14501 "diagnostic or error messages.  These are typically attached to the user's "
14502 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
14503 "depending on what the parent process chose to set up.  (See also the "
14504 "\"Redirection\" section of B<sh>(1).)"
14505 msgstr ""
14506 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
14507 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
14508 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
14509 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
14510 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
14511
14512 #. type: Plain text
14513 #: build/C/man3/stdin.3:45
14514 msgid ""
14515 "The input stream is referred to as \"standard input\"; the output stream is "
14516 "referred to as \"standard output\"; and the error stream is referred to as "
14517 "\"standard error\".  These terms are abbreviated to form the symbols used to "
14518 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
14519 msgstr ""
14520 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
14521 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
14522 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
14523 "I<stdout>, I<stderr> である。"
14524
14525 #. type: Plain text
14526 #: build/C/man3/stdin.3:54
14527 msgid ""
14528 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
14529 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
14530 msgstr ""
14531 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
14532 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
14533
14534 #. type: Plain text
14535 #: build/C/man3/stdin.3:63
14536 msgid ""
14537 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
14538 "same underlying files may also be accessed using the raw UNIX file "
14539 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
14540 msgstr ""
14541 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
14542 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
14543 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
14544 "る。"
14545
14546 #. type: Plain text
14547 #: build/C/man3/stdin.3:82
14548 msgid ""
14549 "On program startup, the integer file descriptors associated with the streams "
14550 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
14551 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
14552 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
14553 "(3)  to one of these streams can change the file descriptor number "
14554 "associated with the stream.)"
14555 msgstr ""
14556 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
14557 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
14558 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
14559 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
14560 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
14561 "たファイルディスクリプタ の番号を変更することができる。)"
14562
14563 #. type: Plain text
14564 #: build/C/man3/stdin.3:95
14565 msgid ""
14566 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
14567 "unexpected results and should generally be avoided.  (For the masochistic "
14568 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
14569 "is supposed to work.)  A general rule is that file descriptors are handled "
14570 "in the kernel, while stdio is just a library.  This means for example, that "
14571 "after an B<exec>(3), the child inherits all open file descriptors, but all "
14572 "old streams have become inaccessible."
14573 msgstr ""
14574 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
14575 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
14576 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
14577 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
14578 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
14579 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
14580 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
14581
14582 #. type: Plain text
14583 #: build/C/man3/stdin.3:113
14584 msgid ""
14585 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
14586 "macros, assigning to them is nonportable.  The standard streams can be made "
14587 "to refer to different files with help of the library function B<freopen>(3), "
14588 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
14589 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
14590 "by normal program termination."
14591 msgstr ""
14592 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
14593 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
14594 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
14595 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
14596 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
14597 "グラムの正常終了によってクローズされる。"
14598
14599 #. type: Plain text
14600 #: build/C/man3/stdin.3:122
14601 msgid ""
14602 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
14603 "standard also stipulates that these three streams shall be open at program "
14604 "startup."
14605 msgstr ""
14606 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
14607 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
14608 "とが規定されている。"
14609
14610 #. type: Plain text
14611 #: build/C/man3/stdin.3:154
14612 msgid ""
14613 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
14614 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
14615 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
14616 "unexpected results, especially with debugging output.  The buffering mode of "
14617 "the standard streams (or any other stream)  can be changed using the "
14618 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
14619 "associated with a terminal, there may also be input buffering in the "
14620 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
14621 "terminal input is line buffered in the kernel.)  This kernel input handling "
14622 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
14623 "B<termios>(3)."
14624 msgstr ""
14625 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
14626 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
14627 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
14628 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
14629 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
14630 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
14631 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
14632 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
14633 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
14634 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
14635 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
14636 "B<termios>(3)  も参照すること。"
14637
14638 #. type: Plain text
14639 #: build/C/man3/stdin.3:160
14640 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
14641 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
14642
14643 #. type: TH
14644 #: build/C/man3/stdio.3:39
14645 #, no-wrap
14646 msgid "STDIO"
14647 msgstr "STDIO"
14648
14649 #. type: TH
14650 #: build/C/man3/stdio.3:39
14651 #, no-wrap
14652 msgid "2001-12-26"
14653 msgstr "2001-12-26"
14654
14655 #. type: Plain text
14656 #: build/C/man3/stdio.3:42
14657 msgid "stdio - standard input/output library functions"
14658 msgstr "stdio - 標準入出力ライブラリ関数"
14659
14660 #. type: Plain text
14661 #: build/C/man3/stdio.3:46
14662 msgid "B<FILE *>I<stdin>B<;>"
14663 msgstr "B<FILE *>I<stdin>B<;>"
14664
14665 #. type: Plain text
14666 #: build/C/man3/stdio.3:48
14667 msgid "B<FILE *>I<stdout>B<;>"
14668 msgstr "B<FILE *>I<stdout>B<;>"
14669
14670 #. type: Plain text
14671 #: build/C/man3/stdio.3:50
14672 msgid "B<FILE *>I<stderr>B<;>"
14673 msgstr "B<FILE *>I<stderr>B<;>"
14674
14675 #. type: Plain text
14676 #: build/C/man3/stdio.3:57
14677 msgid ""
14678 "The standard I/O library provides a simple and efficient buffered stream I/O "
14679 "interface.  Input and output is mapped into logical data streams and the "
14680 "physical I/O characteristics are concealed.  The functions and macros are "
14681 "listed below; more information is available from the individual man pages."
14682 msgstr ""
14683 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
14684 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
14685 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
14686 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
14687
14688 #. type: Plain text
14689 #: build/C/man3/stdio.3:80
14690 msgid ""
14691 "A stream is associated with an external file (which may be a physical "
14692 "device) by I<opening> a file, which may involve creating a new file.  "
14693 "Creating an existing file causes its former contents to be discarded.  If a "
14694 "file can support positioning requests (such as a disk file, as opposed to a "
14695 "terminal), then a I<file position indicator> associated with the stream is "
14696 "positioned at the start of the file (byte zero), unless the file is opened "
14697 "with append mode.  If append mode is used, it is unspecified whether the "
14698 "position indicator will be placed at the start or the end of the file.  The "
14699 "position indicator is maintained by subsequent reads, writes and positioning "
14700 "requests.  All input occurs as if the characters were read by successive "
14701 "calls to the B<fgetc>(3)  function; all output takes place as if all "
14702 "characters were written by successive calls to the B<fputc>(3)  function."
14703 msgstr ""
14704 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
14705 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
14706 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
14707 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
14708 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
14709 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
14710 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
14711 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
14712 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
14713 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
14714 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
14715 "字を書き込んだかのように行われる。"
14716
14717 #. type: Plain text
14718 #: build/C/man3/stdio.3:90
14719 msgid ""
14720 "A file is disassociated from a stream by I<closing> the file.  Output "
14721 "streams are flushed (any unwritten buffer contents are transferred to the "
14722 "host environment) before the stream is disassociated from the file.  The "
14723 "value of a pointer to a I<FILE> object is indeterminate after a file is "
14724 "closed (garbage)."
14725 msgstr ""
14726 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
14727 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
14728 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
14729 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
14730 "確定になる (ゴミになってしまう)。"
14731
14732 #. type: Plain text
14733 #: build/C/man3/stdio.3:103
14734 msgid ""
14735 "A file may be subsequently reopened, by the same or another program "
14736 "execution, and its contents reclaimed or modified (if it can be repositioned "
14737 "at the start).  If the main function returns to its original caller, or the "
14738 "B<exit>(3)  function is called, all open files are closed (hence all output "
14739 "streams are flushed) before program termination.  Other methods of program "
14740 "termination, such as B<abort>(3)  do not bother about closing files properly."
14741 msgstr ""
14742 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
14743 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
14744 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
14745 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
14746 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
14747 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
14748 "保証はない。"
14749
14750 #. type: Plain text
14751 #: build/C/man3/stdio.3:119
14752 msgid ""
14753 "At program startup, three text streams are predefined and need not be opened "
14754 "explicitly: I<standard input> (for reading conventional input), I<standard "
14755 "output> (for writing conventional input), and I<standard error> (for writing "
14756 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
14757 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
14758 "the standard input and output streams are fully buffered if and only if the "
14759 "streams do not refer to an interactive device."
14760 msgstr ""
14761 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
14762 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
14763 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
14764 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
14765 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
14766 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
14767 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
14768 "スを参照していなければ、 完全にバッファリングされている。"
14769
14770 #. type: Plain text
14771 #: build/C/man3/stdio.3:129
14772 msgid ""
14773 "Output streams that refer to terminal devices are always line buffered by "
14774 "default; pending output to such streams is written automatically whenever an "
14775 "input stream that refers to a terminal device is read.  In cases where a "
14776 "large amount of computation is done after printing part of a line on an "
14777 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
14778 "going off and computing so that the output will appear."
14779 msgstr ""
14780 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
14781 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
14782 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
14783 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
14784 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
14785 "必要がある。"
14786
14787 #. type: Plain text
14788 #: build/C/man3/stdio.3:143
14789 msgid ""
14790 "The I<stdio> library is a part of the library B<libc> and routines are "
14791 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
14792 "SYNOPSIS sections of the following manual pages indicate which include files "
14793 "are to be used, what the compiler declaration for the function looks like "
14794 "and which external variables are of interest."
14795 msgstr ""
14796 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
14797 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
14798 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
14799 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
14800 "数が関係するのかが示されている。"
14801
14802 #.  Not on Linux: .BR fropen ,
14803 #.  Not on Linux: .BR fwopen ,
14804 #. type: Plain text
14805 #: build/C/man3/stdio.3:183
14806 msgid ""
14807 "The following are defined as macros; these names may not be reused without "
14808 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
14809 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
14810 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
14811 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
14812 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
14813 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
14814 "and B<putchar> exist and will be used if the macros definitions are "
14815 "explicitly removed."
14816 msgstr ""
14817 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
14818 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
14819 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
14820 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
14821 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
14822 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
14823 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
14824 "示的に消去されている場合には、 これらを使用することになるだろう。"
14825
14826 #. type: SS
14827 #: build/C/man3/stdio.3:183
14828 #, no-wrap
14829 msgid "List of functions"
14830 msgstr "関数のリスト"
14831
14832 #. type: tbl table
14833 #: build/C/man3/stdio.3:188
14834 #, no-wrap
14835 msgid "Function\tDescription\n"
14836 msgstr "関数\t説明\n"
14837
14838 #. type: tbl table
14839 #: build/C/man3/stdio.3:189
14840 #, no-wrap
14841 msgid "_\n"
14842 msgstr "_\n"
14843
14844 #. type: tbl table
14845 #: build/C/man3/stdio.3:190
14846 #, no-wrap
14847 msgid "clearerr\tcheck and reset stream status\n"
14848 msgstr "clearerr\tストリームの状態の確認とリセット\n"
14849
14850 #. type: tbl table
14851 #: build/C/man3/stdio.3:191
14852 #, no-wrap
14853 msgid "fclose\tclose a stream\n"
14854 msgstr "fclose\tストリームをクローズする\n"
14855
14856 #. type: tbl table
14857 #: build/C/man3/stdio.3:192
14858 #, no-wrap
14859 msgid "fdopen\tstream open functions\n"
14860 msgstr "fdopen\tストリームをオープンする\n"
14861
14862 #. type: tbl table
14863 #: build/C/man3/stdio.3:193
14864 #, no-wrap
14865 msgid "feof\tcheck and reset stream status\n"
14866 msgstr "feof\tストリームの状態の確認とリセット\n"
14867
14868 #. type: tbl table
14869 #: build/C/man3/stdio.3:194
14870 #, no-wrap
14871 msgid "ferror\tcheck and reset stream status\n"
14872 msgstr "ferror\tストリームの状態の確認とリセット\n"
14873
14874 #. type: tbl table
14875 #: build/C/man3/stdio.3:195
14876 #, no-wrap
14877 msgid "fflush\tflush a stream\n"
14878 msgstr "fflush\tストリームをフラッシュする\n"
14879
14880 #. type: tbl table
14881 #: build/C/man3/stdio.3:196
14882 #, no-wrap
14883 msgid "fgetc\tget next character or word from input stream\n"
14884 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
14885
14886 #. type: tbl table
14887 #: build/C/man3/stdio.3:197
14888 #, no-wrap
14889 msgid "fgetpos\treposition a stream\n"
14890 msgstr "fgetpos\tストリームの位置を取得する\n"
14891
14892 #. type: tbl table
14893 #: build/C/man3/stdio.3:198
14894 #, no-wrap
14895 msgid "fgets\tget a line from a stream\n"
14896 msgstr "fgets\tストリームから行を取得する\n"
14897
14898 #. type: tbl table
14899 #: build/C/man3/stdio.3:199
14900 #, no-wrap
14901 msgid "fileno\treturn the integer descriptor of the argument stream\n"
14902 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
14903
14904 #. type: tbl table
14905 #: build/C/man3/stdio.3:200
14906 #, no-wrap
14907 msgid "fopen\tstream open functions\n"
14908 msgstr "fopen\tストリームをオープンする\n"
14909
14910 #. type: tbl table
14911 #: build/C/man3/stdio.3:201
14912 #, no-wrap
14913 msgid "fprintf\tformatted output conversion\n"
14914 msgstr "fprintf\t書式付き出力変換\n"
14915
14916 #. type: tbl table
14917 #: build/C/man3/stdio.3:202
14918 #, no-wrap
14919 msgid "fpurge\tflush a stream\n"
14920 msgstr "fpurge\tストリームをフラッシュする\n"
14921
14922 #. type: tbl table
14923 #: build/C/man3/stdio.3:203
14924 #, no-wrap
14925 msgid "fputc\toutput a character or word to a stream\n"
14926 msgstr "fputc\t文字または語をストリームに出力する\n"
14927
14928 #. type: tbl table
14929 #: build/C/man3/stdio.3:204
14930 #, no-wrap
14931 msgid "fputs\toutput a line to a stream\n"
14932 msgstr "fputs\t行をストリームに出力する\n"
14933
14934 #. type: tbl table
14935 #: build/C/man3/stdio.3:205
14936 #, no-wrap
14937 msgid "fread\tbinary stream input/output\n"
14938 msgstr "fread\tバイナリーストリーム入出力\n"
14939
14940 #. type: tbl table
14941 #: build/C/man3/stdio.3:206
14942 #, no-wrap
14943 msgid "freopen\tstream open functions\n"
14944 msgstr "freopen\tストリームをオープンする\n"
14945
14946 #. type: tbl table
14947 #: build/C/man3/stdio.3:207
14948 #, no-wrap
14949 msgid "fscanf\tinput format conversion\n"
14950 msgstr "fscanf\t書式付き入力変換\n"
14951
14952 #. type: tbl table
14953 #: build/C/man3/stdio.3:208
14954 #, no-wrap
14955 msgid "fseek\treposition a stream\n"
14956 msgstr "fseek\tストリームの位置指示子を移動する\n"
14957
14958 #. type: tbl table
14959 #: build/C/man3/stdio.3:209
14960 #, no-wrap
14961 msgid "fsetpos\treposition a stream\n"
14962 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
14963
14964 #. type: tbl table
14965 #: build/C/man3/stdio.3:210
14966 #, no-wrap
14967 msgid "ftell\treposition a stream\n"
14968 msgstr "ftell\tストリームの位置を取得する\n"
14969
14970 #. type: tbl table
14971 #: build/C/man3/stdio.3:211
14972 #, no-wrap
14973 msgid "fwrite\tbinary stream input/output\n"
14974 msgstr "fwrite\tバイナリーストリーム入出力\n"
14975
14976 #. type: tbl table
14977 #: build/C/man3/stdio.3:212
14978 #, no-wrap
14979 msgid "getc\tget next character or word from input stream\n"
14980 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
14981
14982 #. type: tbl table
14983 #: build/C/man3/stdio.3:213
14984 #, no-wrap
14985 msgid "getchar\tget next character or word from input stream\n"
14986 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
14987
14988 #. type: tbl table
14989 #: build/C/man3/stdio.3:214
14990 #, no-wrap
14991 msgid "gets\tget a line from a stream\n"
14992 msgstr "gets\t行を入力ストリームから取得する\n"
14993
14994 #. type: tbl table
14995 #: build/C/man3/stdio.3:215
14996 #, no-wrap
14997 msgid "getw\tget next character or word from input stream\n"
14998 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
14999
15000 #. type: tbl table
15001 #: build/C/man3/stdio.3:216
15002 #, no-wrap
15003 msgid "mktemp\tmake temporary filename (unique)\n"
15004 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
15005
15006 #. type: tbl table
15007 #: build/C/man3/stdio.3:217
15008 #, no-wrap
15009 msgid "perror\tsystem error messages\n"
15010 msgstr "perror\tシステムエラーメッセージ\n"
15011
15012 #. type: tbl table
15013 #: build/C/man3/stdio.3:218
15014 #, no-wrap
15015 msgid "printf\tformatted output conversion\n"
15016 msgstr "printf\t書式付き出力変換\n"
15017
15018 #. type: tbl table
15019 #: build/C/man3/stdio.3:219
15020 #, no-wrap
15021 msgid "putc\toutput a character or word to a stream\n"
15022 msgstr "putc\t文字または語をストリームに出力する\n"
15023
15024 #. type: tbl table
15025 #: build/C/man3/stdio.3:220
15026 #, no-wrap
15027 msgid "putchar\toutput a character or word to a stream\n"
15028 msgstr "putchar\t文字または語をストリームに出力する\n"
15029
15030 #. type: tbl table
15031 #: build/C/man3/stdio.3:221
15032 #, no-wrap
15033 msgid "puts\toutput a line to a stream\n"
15034 msgstr "puts\t行をストリームに出力する\n"
15035
15036 #. type: tbl table
15037 #: build/C/man3/stdio.3:222
15038 #, no-wrap
15039 msgid "putw\toutput a character or word to a stream\n"
15040 msgstr "putw\t文字または語をストリームに出力する\n"
15041
15042 #. type: tbl table
15043 #: build/C/man3/stdio.3:223
15044 #, no-wrap
15045 msgid "remove\tremove directory entry\n"
15046 msgstr "remove\tディレクトリエントリを削除する\n"
15047
15048 #. type: tbl table
15049 #: build/C/man3/stdio.3:224
15050 #, no-wrap
15051 msgid "rewind\treposition a stream\n"
15052 msgstr "rewind\tストリームの位置指示子を移動する\n"
15053
15054 #. type: tbl table
15055 #: build/C/man3/stdio.3:225
15056 #, no-wrap
15057 msgid "scanf\tinput format conversion\n"
15058 msgstr "scanf\t書式付き入力変換\n"
15059
15060 #. type: tbl table
15061 #: build/C/man3/stdio.3:226
15062 #, no-wrap
15063 msgid "setbuf\tstream buffering operations\n"
15064 msgstr "setbuf\tストリームのバッファリングの操作\n"
15065
15066 #. type: tbl table
15067 #: build/C/man3/stdio.3:227
15068 #, no-wrap
15069 msgid "setbuffer\tstream buffering operations\n"
15070 msgstr "setbuffer\tストリームのバッファリングの操作\n"
15071
15072 #. type: tbl table
15073 #: build/C/man3/stdio.3:228
15074 #, no-wrap
15075 msgid "setlinebuf\tstream buffering operations\n"
15076 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
15077
15078 #. type: tbl table
15079 #: build/C/man3/stdio.3:229
15080 #, no-wrap
15081 msgid "setvbuf\tstream buffering operations\n"
15082 msgstr "setvbuf\tストリームのバッファリングの操作\n"
15083
15084 #. type: tbl table
15085 #: build/C/man3/stdio.3:230
15086 #, no-wrap
15087 msgid "sprintf\tformatted output conversion\n"
15088 msgstr "sprintf\t書式付き出力変換\n"
15089
15090 #. type: tbl table
15091 #: build/C/man3/stdio.3:231
15092 #, no-wrap
15093 msgid "sscanf\tinput format conversion\n"
15094 msgstr "sscanf\t書式付き入力変換\n"
15095
15096 #. type: tbl table
15097 #: build/C/man3/stdio.3:232
15098 #, no-wrap
15099 msgid "strerror\tsystem error messages\n"
15100 msgstr "strerror\tシステムエラーメッセージ\n"
15101
15102 #. type: tbl table
15103 #: build/C/man3/stdio.3:233
15104 #, no-wrap
15105 msgid "sys_errlist\tsystem error messages\n"
15106 msgstr "sys_errlist\tシステムエラーメッセージ\n"
15107
15108 #. type: tbl table
15109 #: build/C/man3/stdio.3:234
15110 #, no-wrap
15111 msgid "sys_nerr\tsystem error messages\n"
15112 msgstr "sys_nerr\tシステムエラーメッセージ\n"
15113
15114 #. type: tbl table
15115 #: build/C/man3/stdio.3:235
15116 #, no-wrap
15117 msgid "tempnam\ttemporary file routines\n"
15118 msgstr "tempnam\tテンポラリファイルの操作\n"
15119
15120 #. type: tbl table
15121 #: build/C/man3/stdio.3:236
15122 #, no-wrap
15123 msgid "tmpfile\ttemporary file routines\n"
15124 msgstr "tmpfile\tテンポラリファイルの操作\n"
15125
15126 #. type: tbl table
15127 #: build/C/man3/stdio.3:237
15128 #, no-wrap
15129 msgid "tmpnam\ttemporary file routines\n"
15130 msgstr "tmpnam\tテンポラリファイルの操作\n"
15131
15132 #. type: tbl table
15133 #: build/C/man3/stdio.3:238
15134 #, no-wrap
15135 msgid "ungetc\tun-get character from input stream\n"
15136 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
15137
15138 #. type: tbl table
15139 #: build/C/man3/stdio.3:239
15140 #, no-wrap
15141 msgid "vfprintf\tformatted output conversion\n"
15142 msgstr "vfprintf\t書式付き出力変換\n"
15143
15144 #. type: tbl table
15145 #: build/C/man3/stdio.3:240
15146 #, no-wrap
15147 msgid "vfscanf\tinput format conversion\n"
15148 msgstr "vfscanf\t書式付き入力変換\n"
15149
15150 #. type: tbl table
15151 #: build/C/man3/stdio.3:241
15152 #, no-wrap
15153 msgid "vprintf\tformatted output conversion\n"
15154 msgstr "vprintf\t書式付き出力変換\n"
15155
15156 #. type: tbl table
15157 #: build/C/man3/stdio.3:242
15158 #, no-wrap
15159 msgid "vscanf\tinput format conversion\n"
15160 msgstr "vscanf\t書式付き入力変換\n"
15161
15162 #. type: tbl table
15163 #: build/C/man3/stdio.3:243
15164 #, no-wrap
15165 msgid "vsprintf\tformatted output conversion\n"
15166 msgstr "vsprintf\t書式付き出力変換\n"
15167
15168 #. type: tbl table
15169 #: build/C/man3/stdio.3:244
15170 #, no-wrap
15171 msgid "vsscanf\tinput format conversion\n"
15172 msgstr "vsscanf\t書式付き入力変換\n"
15173
15174 #. type: Plain text
15175 #: build/C/man3/stdio.3:250
15176 msgid "The I<stdio> library conforms to C89."
15177 msgstr "I<stdio> ライブラリは C89 に準拠している。"
15178
15179 #. type: Plain text
15180 #: build/C/man3/stdio.3:257
15181 msgid ""
15182 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
15183 "B<unlocked_stdio>(3)"
15184 msgstr ""
15185 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
15186 "B<unlocked_stdio>(3)"
15187
15188 #. type: TH
15189 #: build/C/man3/stdio_ext.3:25
15190 #, no-wrap
15191 msgid "STDIO_EXT"
15192 msgstr "STDIO_EXT"
15193
15194 #. type: Plain text
15195 #: build/C/man3/stdio_ext.3:30
15196 msgid ""
15197 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
15198 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
15199 "structure"
15200 msgstr ""
15201 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
15202 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
15203 "へのインタフェース"
15204
15205 #. type: Plain text
15206 #: build/C/man3/stdio_ext.3:34
15207 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
15208 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
15209
15210 #. type: Plain text
15211 #: build/C/man3/stdio_ext.3:36
15212 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
15213 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
15214
15215 #. type: Plain text
15216 #: build/C/man3/stdio_ext.3:38
15217 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
15218 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
15219
15220 #. type: Plain text
15221 #: build/C/man3/stdio_ext.3:40
15222 msgid "B<int __flbf(FILE *>I<stream>B<);>"
15223 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
15224
15225 #. type: Plain text
15226 #: build/C/man3/stdio_ext.3:42
15227 msgid "B<int __freadable(FILE *>I<stream>B<);>"
15228 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
15229
15230 #. type: Plain text
15231 #: build/C/man3/stdio_ext.3:44
15232 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
15233 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
15234
15235 #. type: Plain text
15236 #: build/C/man3/stdio_ext.3:46
15237 msgid "B<int __freading(FILE *>I<stream>B<);>"
15238 msgstr "B<int __freading(FILE *>I<stream>B<);>"
15239
15240 #. type: Plain text
15241 #: build/C/man3/stdio_ext.3:48
15242 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
15243 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
15244
15245 #. type: Plain text
15246 #: build/C/man3/stdio_ext.3:50
15247 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
15248 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
15249
15250 #. type: Plain text
15251 #: build/C/man3/stdio_ext.3:52
15252 msgid "B<void _flushlbf(void);>"
15253 msgstr "B<void _flushlbf(void);>"
15254
15255 #. type: Plain text
15256 #: build/C/man3/stdio_ext.3:54
15257 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
15258 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
15259
15260 #. type: Plain text
15261 #: build/C/man3/stdio_ext.3:59
15262 msgid ""
15263 "Solaris introduced routines to allow portable access to the internals of the "
15264 "I<FILE> structure, and glibc also implemented these."
15265 msgstr ""
15266 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
15267 "が導入されており、これらは glibc でも実装されている。"
15268
15269 #. type: Plain text
15270 #: build/C/man3/stdio_ext.3:64
15271 msgid ""
15272 "The B<__fbufsize>()  function returns the size of the buffer currently used "
15273 "by the given stream."
15274 msgstr ""
15275 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
15276 "す。"
15277
15278 #. type: Plain text
15279 #: build/C/man3/stdio_ext.3:71
15280 msgid ""
15281 "The B<__fpending>()  function returns the number of bytes in the output "
15282 "buffer.  For wide-oriented streams the unit is wide characters.  This "
15283 "function is undefined on buffers in reading mode, or opened read-only."
15284 msgstr ""
15285 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
15286 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
15287 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
15288 "は未定義である。"
15289
15290 #. type: Plain text
15291 #: build/C/man3/stdio_ext.3:76
15292 msgid ""
15293 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
15294 "buffered, and zero otherwise."
15295 msgstr ""
15296 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
15297 "場合は 0 を返す。"
15298
15299 #. type: Plain text
15300 #: build/C/man3/stdio_ext.3:81
15301 msgid ""
15302 "The B<__freadable>()  function returns a nonzero value if the stream allows "
15303 "reading, and zero otherwise."
15304 msgstr ""
15305 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
15306 "外の場合は 0 を返す。"
15307
15308 #. type: Plain text
15309 #: build/C/man3/stdio_ext.3:86
15310 msgid ""
15311 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
15312 "writing, and zero otherwise."
15313 msgstr ""
15314 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
15315 "外の場合は 0 を返す。"
15316
15317 #. type: Plain text
15318 #: build/C/man3/stdio_ext.3:92
15319 msgid ""
15320 "The B<__freading>()  function returns a nonzero value if the stream is read-"
15321 "only, or if the last operation on the stream was a read operation, and zero "
15322 "otherwise."
15323 msgstr ""
15324 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
15325 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
15326 "を返す。"
15327
15328 #. type: Plain text
15329 #: build/C/man3/stdio_ext.3:98
15330 msgid ""
15331 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
15332 "only (or append-only), or if the last operation on the stream was a write "
15333 "operation, and zero otherwise."
15334 msgstr ""
15335 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
15336 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
15337 "し、 それ以外の場合は 0 を返す。"
15338
15339 #. type: Plain text
15340 #: build/C/man3/stdio_ext.3:106
15341 msgid ""
15342 "The B<__fsetlocking>()  function can be used to select the desired type of "
15343 "locking on the stream.  It returns the current type.  The I<type> argument "
15344 "can take the following three values:"
15345 msgstr ""
15346 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
15347 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
15348 "ることができる :"
15349
15350 #. type: TP
15351 #: build/C/man3/stdio_ext.3:106
15352 #, no-wrap
15353 msgid "B<FSETLOCKING_INTERNAL>"
15354 msgstr "B<FSETLOCKING_INTERNAL>"
15355
15356 #. type: Plain text
15357 #: build/C/man3/stdio_ext.3:111
15358 msgid ""
15359 "Perform implicit locking around every operation on the given stream (except "
15360 "for the *_unlocked ones).  This is the default."
15361 msgstr ""
15362 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
15363 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
15364 "である)。 これがデフォルトのロック形式である。"
15365
15366 #. type: TP
15367 #: build/C/man3/stdio_ext.3:111
15368 #, no-wrap
15369 msgid "B<FSETLOCKING_BYCALLER>"
15370 msgstr "B<FSETLOCKING_BYCALLER>"
15371
15372 #. type: Plain text
15373 #: build/C/man3/stdio_ext.3:118
15374 msgid ""
15375 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
15376 "case there is more than one thread), and the stdio routines will not do "
15377 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
15378 msgstr ""
15379 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
15380 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
15381 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
15382 "理を行わない。"
15383
15384 #. type: TP
15385 #: build/C/man3/stdio_ext.3:118
15386 #, no-wrap
15387 msgid "B<FSETLOCKING_QUERY>"
15388 msgstr "B<FSETLOCKING_QUERY>"
15389
15390 #. type: Plain text
15391 #: build/C/man3/stdio_ext.3:122
15392 msgid "Don't change the type of locking.  (Only return it.)"
15393 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
15394
15395 #. type: Plain text
15396 #: build/C/man3/stdio_ext.3:128
15397 msgid ""
15398 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
15399 "so that output to a terminal is forced out, say before reading keyboard "
15400 "input.)"
15401 msgstr ""
15402 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
15403 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
15404 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
15405 "いだろう)"
15406
15407 #. type: Plain text
15408 #: build/C/man3/stdio_ext.3:132
15409 msgid ""
15410 "The B<__fpurge>()  function discards the contents of the stream's buffer."
15411 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
15412
15413 #. type: Plain text
15414 #: build/C/man3/stdio_ext.3:141
15415 msgid ""
15416 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
15417 "functions do not lock the stream, so they are not thread-safe."
15418 msgstr ""
15419 "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() "
15420 "は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
15421
15422 #. type: Plain text
15423 #: build/C/man3/stdio_ext.3:151
15424 msgid ""
15425 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
15426 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
15427 msgstr ""
15428 "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
15429 "B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
15430
15431 #. type: Plain text
15432 #: build/C/man3/stdio_ext.3:154
15433 msgid "B<flockfile>(3), B<fpurge>(3)"
15434 msgstr "B<flockfile>(3), B<fpurge>(3)"
15435
15436 #. type: TH
15437 #: build/C/man2/symlink.2:33 build/C/man7/symlink.7:37
15438 #, no-wrap
15439 msgid "SYMLINK"
15440 msgstr "SYMLINK"
15441
15442 #. type: Plain text
15443 #: build/C/man2/symlink.2:36
15444 msgid "symlink, symlinkat - make a new name for a file"
15445 msgstr "symlink, symlinkat - ファイルに新しい名前を付ける"
15446
15447 #. type: Plain text
15448 #: build/C/man2/symlink.2:41
15449 #, no-wrap
15450 msgid "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
15451 msgstr "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
15452
15453 #. type: Plain text
15454 #: build/C/man2/symlink.2:47
15455 #, no-wrap
15456 msgid "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
15457 msgstr "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
15458
15459 #. type: Plain text
15460 #: build/C/man2/symlink.2:56
15461 msgid "B<symlink>():"
15462 msgstr "B<symlink>():"
15463
15464 #. type: Plain text
15465 #: build/C/man2/symlink.2:62
15466 msgid "B<symlinkat>():"
15467 msgstr "B<symlinkat>():"
15468
15469 #. type: Plain text
15470 #: build/C/man2/symlink.2:80
15471 msgid ""
15472 "B<symlink>()  creates a symbolic link named I<linkpath> which contains the "
15473 "string I<target>."
15474 msgstr ""
15475 "B<symlink>()  は I<target> という文字列をファイルの内容として持つ "
15476 "I<linkpath> というシンボリックリンク (symbolic link) を作成する。"
15477
15478 #. type: Plain text
15479 #: build/C/man2/symlink.2:84
15480 msgid ""
15481 "Symbolic links are interpreted at run time as if the contents of the link "
15482 "had been substituted into the path being followed to find a file or "
15483 "directory."
15484 msgstr ""
15485 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
15486 "スを辿ることで、 ファイルやディレクトリに到達する。"
15487
15488 #. type: Plain text
15489 #: build/C/man2/symlink.2:89
15490 msgid ""
15491 "Symbolic links may contain I<..> path components, which (if used at the "
15492 "start of the link) refer to the parent directories of that in which the link "
15493 "resides."
15494 msgstr ""
15495 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
15496 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
15497 "される。"
15498
15499 #. type: Plain text
15500 #: build/C/man2/symlink.2:93
15501 msgid ""
15502 "A symbolic link (also known as a soft link) may point to an existing file or "
15503 "to a nonexistent one; the latter case is known as a dangling link."
15504 msgstr ""
15505 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
15506 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
15507 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
15508
15509 #. type: Plain text
15510 #: build/C/man2/symlink.2:100
15511 msgid ""
15512 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
15513 "when following the link, but is checked when removal or renaming of the link "
15514 "is requested and the link is in a directory with the sticky bit "
15515 "(B<S_ISVTX>)  set."
15516 msgstr ""
15517 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
15518 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
15519 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
15520 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
15521
15522 #. type: Plain text
15523 #: build/C/man2/symlink.2:106
15524 msgid "If I<linkpath> exists, it will I<not> be overwritten."
15525 msgstr "I<linkpath> が存在する場合には上書きはI<されない>。"
15526
15527 #. type: SS
15528 #: build/C/man2/symlink.2:106
15529 #, no-wrap
15530 msgid "symlinkat()"
15531 msgstr "symlinkat()"
15532
15533 #. type: Plain text
15534 #: build/C/man2/symlink.2:112
15535 msgid ""
15536 "The B<symlinkat>()  system call operates in exactly the same way as "
15537 "B<symlink>(), except for the differences described here."
15538 msgstr ""
15539 "B<symlinkat>() システムコールは B<symlink>() と全く同様に動作するが、以下で説"
15540 "明する点が異なる。"
15541
15542 #. type: Plain text
15543 #: build/C/man2/symlink.2:122
15544 msgid ""
15545 "If the pathname given in I<linkpath> is relative, then it is interpreted "
15546 "relative to the directory referred to by the file descriptor I<newdirfd> "
15547 "(rather than relative to the current working directory of the calling "
15548 "process, as is done by B<symlink>()  for a relative pathname)."
15549 msgstr ""
15550 "I<linkpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
15551 "リプター I<newdirfd> が参照するディレクトリに対する相対パスと解釈される "
15552 "(B<symlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレント"
15553 "ワーキングディレクトリに対する相対パスではない)。"
15554
15555 #. type: Plain text
15556 #: build/C/man2/symlink.2:134
15557 msgid ""
15558 "If I<linkpath> is relative and I<newdirfd> is the special value B<AT_FDCWD>, "
15559 "then I<linkpath> is interpreted relative to the current working directory of "
15560 "the calling process (like B<symlink>())."
15561 msgstr ""
15562 "I<linkpath> で指定されたパス名が相対パスで、 I<newdirfd> が特別な値 "
15563 "B<AT_FDCWD> の場合、 (B<symlink>() と同様に) I<linkpath> は呼び出したプロセス"
15564 "のカレントワーキングディレクトリに対する相対パスと解釈される。"
15565
15566 #. type: Plain text
15567 #: build/C/man2/symlink.2:140
15568 msgid "If I<linkpath> is absolute, then I<newdirfd> is ignored."
15569 msgstr ""
15570 "I<linkpath> で指定されたパス名が絶対パスの場合、 I<newdirfd> は無視される。"
15571
15572 #. type: Plain text
15573 #: build/C/man2/symlink.2:155
15574 msgid ""
15575 "Write access to the directory containing I<linkpath> is denied, or one of "
15576 "the directories in the path prefix of I<linkpath> did not allow search "
15577 "permission.  (See also B<path_resolution>(7).)"
15578 msgstr ""
15579 "I<linkpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<linkpath> "
15580 "に含まれているディレクトリのどれかに検索許可が与えられていない "
15581 "(B<path_resolution>(7)  も参照すること)。"
15582
15583 #. type: Plain text
15584 #: build/C/man2/symlink.2:160
15585 msgid ""
15586 "The user's quota of resources on the filesystem has been exhausted.  The "
15587 "resources could be inodes or disk blocks, depending on the filesystem "
15588 "implementation."
15589 msgstr ""
15590 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
15591 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
15592 "依存である。"
15593
15594 #. type: Plain text
15595 #: build/C/man2/symlink.2:164
15596 msgid "I<linkpath> already exists."
15597 msgstr "I<linkpath> が既に存在する。"
15598
15599 #. type: Plain text
15600 #: build/C/man2/symlink.2:167
15601 msgid "I<target> or I<linkpath> points outside your accessible address space."
15602 msgstr ""
15603 "I<target> や I<linkpath> がアクセス可能なアドレス空間の外を指している。"
15604
15605 #. type: Plain text
15606 #: build/C/man2/symlink.2:174
15607 msgid "Too many symbolic links were encountered in resolving I<linkpath>."
15608 msgstr "I<linkpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
15609
15610 #. type: Plain text
15611 #: build/C/man2/symlink.2:177
15612 msgid "I<target> or I<linkpath> was too long."
15613 msgstr "I<target> または I<linkpath> が長過ぎる。"
15614
15615 #. type: Plain text
15616 #: build/C/man2/symlink.2:184
15617 msgid ""
15618 "A directory component in I<linkpath> does not exist or is a dangling "
15619 "symbolic link, or I<target> is the empty string."
15620 msgstr ""
15621 "I<linkpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
15622 "I<target> が空文字列である。"
15623
15624 #. type: Plain text
15625 #: build/C/man2/symlink.2:196
15626 msgid ""
15627 "A component used as a directory in I<linkpath> is not, in fact, a directory."
15628 msgstr ""
15629 "I<linkpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
15630
15631 #. type: Plain text
15632 #: build/C/man2/symlink.2:201
15633 msgid ""
15634 "The filesystem containing I<linkpath> does not support the creation of "
15635 "symbolic links."
15636 msgstr ""
15637 "I<linkpath> を含んでいるファイルシステム (file system) が シンボリックリンク"
15638 "の作成をサポートしていない。"
15639
15640 #. type: Plain text
15641 #: build/C/man2/symlink.2:205
15642 msgid "I<linkpath> is on a read-only filesystem."
15643 msgstr "I<linkpath> が読み込み専用のファイルシステムに存在している。"
15644
15645 #. type: Plain text
15646 #: build/C/man2/symlink.2:208
15647 msgid "The following additional errors can occur for B<symlinkat>():"
15648 msgstr "B<symlinkat>() では以下のエラーも発生する。"
15649
15650 #. type: Plain text
15651 #: build/C/man2/symlink.2:212
15652 msgid "I<newdirfd> is not a valid file descriptor."
15653 msgstr "I<newdirfd> が有効なファイルディスクリプタでない。"
15654
15655 #. type: Plain text
15656 #: build/C/man2/symlink.2:218
15657 msgid ""
15658 "I<linkpath> is relative and I<newdirfd> is a file descriptor referring to a "
15659 "file other than a directory."
15660 msgstr ""
15661 "I<linkpath> が相対パスで、 I<newdirfd> がディレクトリ以外のファイルを参照して"
15662 "いるファイルディスクリプタである。"
15663
15664 #. type: Plain text
15665 #: build/C/man2/symlink.2:222
15666 msgid ""
15667 "B<symlinkat>()  was added to Linux in kernel 2.6.16; library support was "
15668 "added to glibc in version 2.4."
15669 msgstr ""
15670 "B<symlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
15671 "ポートはバージョン 2.4 で glibc に追加された。"
15672
15673 #.  SVr4 documents additional error codes EDQUOT and ENOSYS.
15674 #.  See
15675 #.  .BR open (2)
15676 #.  re multiple files with the same name, and NFS.
15677 #. type: Plain text
15678 #: build/C/man2/symlink.2:229
15679 msgid "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
15680 msgstr "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
15681
15682 #. type: Plain text
15683 #: build/C/man2/symlink.2:232
15684 msgid "B<symlinkat>(): POSIX.1-2008."
15685 msgstr "B<symlinkat>(): POSIX.1-2008."
15686
15687 #. type: Plain text
15688 #: build/C/man2/symlink.2:236
15689 msgid "No checking of I<target> is done."
15690 msgstr "I<target> についてのチェックは行なわれない。"
15691
15692 #. type: Plain text
15693 #: build/C/man2/symlink.2:241
15694 msgid ""
15695 "Deleting the name referred to by a symbolic link will actually delete the "
15696 "file (unless it also has other hard links).  If this behavior is not "
15697 "desired, use B<link>(2)."
15698 msgstr ""
15699 "シンボリックリンクによって参照される名前を削除すると (それが他にハードリンク "
15700 "(hard link) を持たなければ) 実際にファイルが削除される。 この動作が望んだもの"
15701 "でない場合は、 B<link>(2)  を使用すること。"
15702
15703 #. type: Plain text
15704 #: build/C/man2/symlink.2:252
15705 msgid ""
15706 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
15707 "B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
15708 msgstr ""
15709 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
15710 "B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
15711
15712 #. type: Plain text
15713 #: build/C/man7/symlink.7:40
15714 msgid "symlink - symbolic link handling"
15715 msgstr "symlink - シンボリックリンクの取り扱い"
15716
15717 #. type: Plain text
15718 #: build/C/man7/symlink.7:44
15719 msgid ""
15720 "Symbolic links are files that act as pointers to other files.  To understand "
15721 "their behavior, you must first understand how hard links work."
15722 msgstr ""
15723 "シンボリックリンクは他のファイルへのポインタとして振る舞うファイルである。 そ"
15724 "の挙動を理解するには、まずハードリンクがどのように機能するかを理解しておかな"
15725 "ければならない。"
15726
15727 #. type: Plain text
15728 #: build/C/man7/symlink.7:60
15729 msgid ""
15730 "A hard link to a file is indistinguishable from the original file because it "
15731 "is a reference to the object underlying the original filename.  (To be "
15732 "precise: each of the hard links to a file is a reference to the same I<i-"
15733 "node number>, where an i-node number is an index into the i-node table, "
15734 "which contains metadata about all files on a filesystem.  See B<stat>(2).)  "
15735 "Changes to a file are independent of the name used to reference the file.  "
15736 "Hard links may not refer to directories (to prevent the possibility of loops "
15737 "within the filesystem tree, which would confuse many programs)  and may not "
15738 "refer to files on different filesystems (because i-node numbers are not "
15739 "unique across filesystems)."
15740 msgstr ""
15741 "あるファイルへのハードリンクは、 元々のファイルと区別することができない。 な"
15742 "ぜなら、 ハードリンクは元々のファイル名の裏にあるオブジェクトへの参照だからで"
15743 "ある。 (より正確には、 あるファイルへのハードリンクはそれぞれ同じ I<i-node 番"
15744 "号> への参照である。 i-node 番号は i-node テーブルへのインデックスで、 i-"
15745 "node テーブルはファイルシステム上のすべてのファイルについてのメタデータを保持"
15746 "している。 B<stat>(2) 参照。) ファイルへの変更は、ファイルの参照に使用された"
15747 "名前とは独立に行われる。 ハードリンクはディレクトリを参照することはできない "
15748 "(これはファイルシステムツリー内でループが発生する可能性を防止するためであ"
15749 "り、 ループが発生すると、 多くのプログラムが混乱してしまうことだろう)。 ま"
15750 "た、 ハードリンクは異なるファイルシステム上のファイルを参照することもできな"
15751 "い (i-node 番号はファイルシステムをまたがると一意ではないからである)。"
15752
15753 #. type: Plain text
15754 #: build/C/man7/symlink.7:69
15755 msgid ""
15756 "A symbolic link is a special type of file whose contents are a string that "
15757 "is the pathname of another file, the file to which the link refers.  (The "
15758 "contents of a symbolic link can be read using B<readlink>(2).)  In other "
15759 "words, a symbolic link is a pointer to another name, and not to an "
15760 "underlying object.  For this reason, symbolic links may refer to directories "
15761 "and may cross filesystem boundaries."
15762 msgstr ""
15763 "シンボリックリンクは特別な種類のファイルで、 ファイルの内容はそのリンクの参照"
15764 "先の別のファイルのパス名を示す文字列である (シンボリックリンクの内容は "
15765 "B<readlink>(2) を使って読むことができる)。 言い換えると、 シンボリックリンク"
15766 "は別の名前へのポインタであり、 ファイルの裏にあるオブジェクトへのポインタでは"
15767 "ない。 この理由から、 シンボリックリンクではディレクトリへの参照やファイルシ"
15768 "ステム境界を越える参照を行うことができる。"
15769
15770 #. type: Plain text
15771 #: build/C/man7/symlink.7:75
15772 msgid ""
15773 "There is no requirement that the pathname referred to by a symbolic link "
15774 "should exist.  A symbolic link that refers to a pathname that does not exist "
15775 "is said to be a I<dangling link>."
15776 msgstr ""
15777 "シンボリックリンクが参照する先のパス名が存在しないといけないという要件はな"
15778 "い。 存在しないパス名を参照するシンボリックリンクは「壊れた (dangling) リン"
15779 "ク」と呼ばれる。"
15780
15781 #. type: Plain text
15782 #: build/C/man7/symlink.7:87
15783 msgid ""
15784 "Because a symbolic link and its referenced object coexist in the filesystem "
15785 "name space, confusion can arise in distinguishing between the link itself "
15786 "and the referenced object.  On historical systems, commands and system calls "
15787 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
15788 "Rules for a more uniform approach, as they are implemented on Linux and "
15789 "other systems, are outlined here.  It is important that site-local "
15790 "applications also conform to these rules, so that the user interface can be "
15791 "as consistent as possible."
15792 msgstr ""
15793 "シンボリックリンクとその参照先のオブジェクトは一つのファイルシステムの名前空"
15794 "間内に共存するので、 リンクそのものと参照先のオブジェクトの間で混乱が生じる可"
15795 "能性がある。 かなり昔からあるシステムでは、 コマンドやシステムコールはいくら"
15796 "かアドホックな方法の独自のリンクの辿り方の決まり事を採用している。 ここで"
15797 "は、 Linux や他のシステムで実装されている、 もっと広く使われている方法のルー"
15798 "ルについて概要を説明する。 サイト固有のアプリケーションもこれらのルールに準拠"
15799 "し、 可能な限りユーザインターフェースが一貫したものになるようにすることが重要"
15800 "である。"
15801
15802 #. type: SS
15803 #: build/C/man7/symlink.7:87
15804 #, no-wrap
15805 msgid "Symbolic link ownership, permissions, and timestamps"
15806 msgstr "シンボリックリンクの所有権、アクセス許可、タイムスタンプ"
15807
15808 #. type: Plain text
15809 #: build/C/man7/symlink.7:95
15810 msgid ""
15811 "The owner and group of an existing symbolic link can be changed using "
15812 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
15813 "is when the link is being removed or renamed in a directory that has the "
15814 "sticky bit set (see B<stat>(2))."
15815 msgstr ""
15816 "既存のシンボリックリンクの所有者とグループは B<lchown>(2) を使って変更するこ"
15817 "とができる。 シンボリックリンクの所有権が問題となる場面は、 スティッキービッ"
15818 "ト (B<stat>(2) 参照) がセットされたディレクトリで、 そのリンクの削除や名前の"
15819 "変更を行おうとしている場合だけである。"
15820
15821 #. type: Plain text
15822 #: build/C/man7/symlink.7:101
15823 msgid ""
15824 "The last access and last modification timestamps of a symbolic link can be "
15825 "changed using B<utimensat>(2)  or B<lutimes>(3)."
15826 msgstr ""
15827 "シンボリックリンクの最終アクセス時刻と最終修正時刻は B<utimensat>(2) や "
15828 "B<lutimes>(3) で変更できる。"
15829
15830 #.  Linux does not currently implement an lchmod(2).
15831 #.  The
15832 #.  4.4BSD
15833 #.  system differs from historical
15834 #.  4BSD
15835 #.  systems in that the system call
15836 #.  .BR chown (2)
15837 #.  has been changed to follow symbolic links.
15838 #.  The
15839 #.  .BR lchown (2)
15840 #.  system call was added later when the limitations of the new
15841 #.  .BR chown (2)
15842 #.  became apparent.
15843 #. type: Plain text
15844 #: build/C/man7/symlink.7:120
15845 msgid ""
15846 "On Linux, the permissions of a symbolic link are not used in any operations; "
15847 "the permissions are always 0777 (read, write, and execute for all user "
15848 "categories), and can't be changed."
15849 msgstr ""
15850 "Linux では、シンボリックリンクのアクセス許可 (permission) はどの操作でも使用"
15851 "されない。 アクセス許可は常に 0777 (すべてのユーザカテゴリにおいて読み出し、"
15852 "書き込み、実行が可能) で、変更できない。"
15853
15854 #. type: SS
15855 #: build/C/man7/symlink.7:120
15856 #, no-wrap
15857 msgid "Obtaining a file descriptor that refers to a symbolic link"
15858 msgstr ""
15859
15860 #. type: Plain text
15861 #: build/C/man7/symlink.7:138
15862 msgid ""
15863 "Using the combination of the B<O_PATH> and B<O_NOFOLLOW> flags to B<open>"
15864 "(2)  yields a file descriptor that can be passed as the I<dirfd> argument in "
15865 "system calls such as B<fstatat>(2), B<fchownat>(2), B<fchmodat>(2), B<linkat>"
15866 "(2), and B<readlinkat>(2), in order to operate on the symbolic link itself "
15867 "(rather than the file to which it refers)."
15868 msgstr ""
15869 "B<open>(2) に B<O_PATH> と B<O_NOFOLLOW> の両方のフラグを指定すると、ファイル"
15870 "ディスクリプターが得られる。このファイルディスクリプターは B<fstatat>(2), "
15871 "B<fchownat>(2), B<fchmodat>(2), B<linkat> (2), B<readlinkat>(2) などのシステ"
15872 "ムコールの I<dirfd> 引き数として渡して、 (シンボリックリンクが参照するファイ"
15873 "ルではなく) シンボリックリンク自身に対する操作を行うことができる。"
15874
15875 #. type: Plain text
15876 #: build/C/man7/symlink.7:154
15877 msgid ""
15878 "By default (i.e., if the B<AT_SYMLINK_FOLLOW> flag is not specified), if "
15879 "B<name_to_handle_at>(2)  is applied to a symbolic link, it yields a handle "
15880 "for the symbolic link (rather than the file to which it refers).  One can "
15881 "then obtain a file descriptor for the symbolic link (rather than the file to "
15882 "which it refers)  by specifying the B<O_PATH> flag in a subsequent call to "
15883 "B<open_by_handle_at>(2).  Again, that file descriptor can be used in the "
15884 "aforementioned system calls to operate on the symbolic link itself."
15885 msgstr ""
15886
15887 #. type: SS
15888 #: build/C/man7/symlink.7:154
15889 #, no-wrap
15890 msgid "Handling of symbolic links by system calls and commands"
15891 msgstr "システムコールやコマンドによるシンボリックリンクの取り扱い"
15892
15893 #. type: Plain text
15894 #: build/C/man7/symlink.7:169
15895 msgid ""
15896 "Symbolic links are handled either by operating on the link itself, or by "
15897 "operating on the object referred to by the link.  In the latter case, an "
15898 "application or system call is said to I<follow> the link.  Symbolic links "
15899 "may refer to other symbolic links, in which case the links are dereferenced "
15900 "until an object that is not a symbolic link is found, a symbolic link that "
15901 "refers to a file which does not exist is found, or a loop is detected.  "
15902 "(Loop detection is done by placing an upper limit on the number of links "
15903 "that may be followed, and an error results if this limit is exceeded.)"
15904 msgstr ""
15905
15906 #. type: Plain text
15907 #: build/C/man7/symlink.7:172
15908 msgid ""
15909 "There are three separate areas that need to be discussed.  They are as "
15910 "follows:"
15911 msgstr "3 つの領域に分けて議論する必要がある。以下の 3 つである。"
15912
15913 #. type: IP
15914 #: build/C/man7/symlink.7:172
15915 #, no-wrap
15916 msgid "1."
15917 msgstr "1."
15918
15919 #. type: Plain text
15920 #: build/C/man7/symlink.7:174
15921 msgid "Symbolic links used as filename arguments for system calls."
15922 msgstr ""
15923 "システムコールのファイル名引き数としてシンボリックリンクが使用される場合。"
15924
15925 #. type: IP
15926 #: build/C/man7/symlink.7:174
15927 #, no-wrap
15928 msgid "2."
15929 msgstr "2."
15930
15931 #. type: Plain text
15932 #: build/C/man7/symlink.7:177
15933 msgid ""
15934 "Symbolic links specified as command-line arguments to utilities that are not "
15935 "traversing a file tree."
15936 msgstr ""
15937 "ファイルツリーを辿っていないユーティリティのコマンドライン引き数としてシンボ"
15938 "リックリンクが指定される場合。"
15939
15940 #. type: IP
15941 #: build/C/man7/symlink.7:177
15942 #, no-wrap
15943 msgid "3."
15944 msgstr "3."
15945
15946 #. type: Plain text
15947 #: build/C/man7/symlink.7:181
15948 msgid ""
15949 "Symbolic links encountered by utilities that are traversing a file tree "
15950 "(either specified on the command line or encountered as part of the file "
15951 "hierarchy walk)."
15952 msgstr ""
15953 "ファイルツリーを辿っているユーティリティがシンボリックリンクを見つけた場合 "
15954 "(コマンドラインで指定される場合もあれば、 ファイル階層を辿っている途中で遭遇"
15955 "する場合もある)。"
15956
15957 #. type: SS
15958 #: build/C/man7/symlink.7:181
15959 #, no-wrap
15960 msgid "System calls"
15961 msgstr "システムコール"
15962
15963 #. type: Plain text
15964 #: build/C/man7/symlink.7:184
15965 msgid ""
15966 "The first area is symbolic links used as filename arguments for system calls."
15967 msgstr ""
15968 "最初の領域は、システムコールのファイル名引き数としてシンボリックリンクが使用"
15969 "される場合である。"
15970
15971 #. type: Plain text
15972 #: build/C/man7/symlink.7:194
15973 msgid ""
15974 "Except as noted below, all system calls follow symbolic links.  For example, "
15975 "if there were a symbolic link I<slink> which pointed to a file named "
15976 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
15977 "descriptor referring to the file I<afile>."
15978 msgstr ""
15979 "以下に述べる場合を除くと、 すべてのシステムコールはシンボリックリンクを辿"
15980 "る。 例えば、 I<afile> という名前のファイルを指しているシンボリックリンク "
15981 "I<slink> があったとすると、 システムコール I<open(\"slink\" ...\\&)> はファイ"
15982 "ル I<afile> を参照するファイルディスクリプタを返す。"
15983
15984 #. type: Plain text
15985 #: build/C/man7/symlink.7:209
15986 msgid ""
15987 "Various system calls do not follow links, and operate on the symbolic link "
15988 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
15989 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
15990 "(2), B<rmdir>(2), and B<unlink>(2)."
15991 msgstr ""
15992
15993 #.  Maybe one day: .BR fchownat (2)
15994 #. type: Plain text
15995 #: build/C/man7/symlink.7:233
15996 msgid ""
15997 "Certain other system calls optionally follow symbolic links.  They are: "
15998 "B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), B<linkat>(2), "
15999 "B<name_to_handle_at>(2), B<open>(2), B<openat>(2), B<open_by_handle_at>(2), "
16000 "and B<utimensat>(2); see their manual pages for details.  Because B<remove>"
16001 "(3)  is an alias for B<unlink>(2), that library function also does not "
16002 "follow symbolic links.  When B<rmdir>(2)  is applied to a symbolic link, it "
16003 "fails with the error B<ENOTDIR>."
16004 msgstr ""
16005
16006 #. type: Plain text
16007 #: build/C/man7/symlink.7:248
16008 msgid ""
16009 "The B<link>(2)  warrants special discussion.  POSIX.1-2001 specifies that "
16010 "B<link>(2)  should dereference I<oldpath> if it is a symbolic link.  "
16011 "However, Linux does not do this.  (By default Solaris is the same, but the "
16012 "POSIX.1-2001 specified behavior can be obtained with suitable compiler "
16013 "options.)  The upcoming POSIX.1 revision changes the specification to allow "
16014 "either behavior in an implementation."
16015 msgstr ""
16016
16017 #. type: SS
16018 #: build/C/man7/symlink.7:248
16019 #, no-wrap
16020 msgid "Commands not traversing a file tree"
16021 msgstr "ファイルツリーを辿らないコマンド"
16022
16023 #. type: Plain text
16024 #: build/C/man7/symlink.7:251
16025 msgid ""
16026 "The second area is symbolic links, specified as command-line filename "
16027 "arguments, to commands which are not traversing a file tree."
16028 msgstr ""
16029 "二つ目の領域は、ファイルツリーを辿らないコマンドの、コマンドライン引き数の"
16030 "ファイル名としてシンボリックリンクが指定される場合である。"
16031
16032 #. type: Plain text
16033 #: build/C/man7/symlink.7:262
16034 msgid ""
16035 "Except as noted below, commands follow symbolic links named as command-line "
16036 "arguments.  For example, if there were a symbolic link I<slink> which "
16037 "pointed to a file named I<afile>, the command I<cat slink> would display the "
16038 "contents of the file I<afile>."
16039 msgstr ""
16040 "以下に述べる場合を除くと、 コマンドはコマンドライン引き数で指定された名前のシ"
16041 "ンボリックリンクを辿る。 例えば、 I<afile> という名前のファイルを指しているシ"
16042 "ンボリックリンク I<slink> があったとすると、 コマンド I<cat slink> は "
16043 "I<afile> の内容を表示することになる。"
16044
16045 #. type: Plain text
16046 #: build/C/man7/symlink.7:270
16047 msgid ""
16048 "It is important to realize that this rule includes commands which may "
16049 "optionally traverse file trees; for example, the command I<chown file> is "
16050 "included in this rule, while the command I<chown\\ -R file>, which performs "
16051 "a tree traversal, is not.  (The latter is described in the third area, "
16052 "below.)"
16053 msgstr ""
16054
16055 #. type: Plain text
16056 #: build/C/man7/symlink.7:288
16057 msgid ""
16058 "If it is explicitly intended that the command operate on the symbolic link "
16059 "instead of following the symbolic link\\(emfor example, it is desired that "
16060 "I<chown slink> change the ownership of the file that I<slink> is, whether it "
16061 "is a symbolic link or not\\(emthe I<-h> option should be used.  In the above "
16062 "example, I<chown root slink> would change the ownership of the file referred "
16063 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
16064 "I<slink> itself."
16065 msgstr ""
16066
16067 #. type: Plain text
16068 #: build/C/man7/symlink.7:290
16069 msgid "There are some exceptions to this rule:"
16070 msgstr "このルールにはいくつかの例外がある。"
16071
16072 #. type: Plain text
16073 #: build/C/man7/symlink.7:300
16074 msgid ""
16075 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
16076 "arguments, but respectively attempt to rename and delete them.  (Note, if "
16077 "the symbolic link references a file via a relative path, moving it to "
16078 "another directory may very well cause it to stop working, since the path may "
16079 "no longer be correct.)"
16080 msgstr ""
16081 "コマンド B<mv>(1) と B<rm>(1) は引き数で指定された名前のシンボリックリンクを"
16082 "辿らないが、 それぞれシンボリックリンク自身の名前変更と削除を行おうとする。 "
16083 "(シンボリックリンクが相対パスでファイルを参照している場合、 そのシンボリック"
16084 "リンクを別のディレクトリに移動すると、動かなくなることが非常によくある。 移動"
16085 "の結果、 パスが正しくないものになってしまうからである。)"
16086
16087 #. type: Plain text
16088 #: build/C/man7/symlink.7:330
16089 msgid ""
16090 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
16091 "with historic systems (when B<ls>(1)  is not doing a tree walk\\(emthat is, "
16092 "I<-R> option is not specified), the B<ls>(1)  command follows symbolic links "
16093 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
16094 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
16095 "the only command where the I<-H> and I<-L> options affect its behavior even "
16096 "though it is not doing a walk of a file tree.)"
16097 msgstr ""
16098
16099 #. The 4.4BSD system differs from historical 4BSD systems in that the
16100 #. .BR chown (1)
16101 #. and
16102 #. .BR chgrp (1)
16103 #. commands follow symbolic links specified on the command line.
16104 #. type: Plain text
16105 #: build/C/man7/symlink.7:348
16106 msgid ""
16107 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
16108 "command does not follow symbolic links named as argument by default.  The "
16109 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
16110 "L> option is specified."
16111 msgstr ""
16112
16113 #. type: SS
16114 #: build/C/man7/symlink.7:348
16115 #, no-wrap
16116 msgid "Commands traversing a file tree"
16117 msgstr "ファイルツリーを辿るコマンド"
16118
16119 #. type: Plain text
16120 #: build/C/man7/symlink.7:361
16121 msgid ""
16122 "The following commands either optionally or always traverse file trees: "
16123 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
16124 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
16125 msgstr ""
16126
16127 #. type: Plain text
16128 #: build/C/man7/symlink.7:365
16129 msgid ""
16130 "It is important to realize that the following rules apply equally to "
16131 "symbolic links encountered during the file tree traversal and symbolic links "
16132 "listed as command-line arguments."
16133 msgstr ""
16134
16135 #. type: Plain text
16136 #: build/C/man7/symlink.7:370
16137 msgid ""
16138 "The I<first rule> applies to symbolic links that reference files other than "
16139 "directories.  Operations that apply to symbolic links are performed on the "
16140 "links themselves, but otherwise the links are ignored."
16141 msgstr ""
16142
16143 #. type: Plain text
16144 #: build/C/man7/symlink.7:382
16145 msgid ""
16146 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
16147 "symbolic links encountered in the tree traversal of I<directory>, because "
16148 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
16149 "referred to by I<slink>."
16150 msgstr ""
16151
16152 #. type: Plain text
16153 #: build/C/man7/symlink.7:387
16154 msgid ""
16155 "The I<second rule> applies to symbolic links that refer to directories.  "
16156 "Symbolic links that refer to directories are never followed by default.  "
16157 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
16158 "\" walk (where symbolic links the refer to directories are followed)."
16159 msgstr ""
16160
16161 #. type: Plain text
16162 #: build/C/man7/symlink.7:390
16163 msgid ""
16164 "Certain conventions are (should be) followed as consistently as possible by "
16165 "commands that perform file tree walks:"
16166 msgstr ""
16167
16168 #. type: Plain text
16169 #: build/C/man7/symlink.7:403
16170 msgid ""
16171 "A command can be made to follow any symbolic links named on the command "
16172 "line, regardless of the type of file they reference, by specifying the I<-H> "
16173 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
16174 "name space look like the logical name space.  (Note, for commands that do "
16175 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
16176 "R> flag is not also specified.)"
16177 msgstr ""
16178
16179 #. type: Plain text
16180 #: build/C/man7/symlink.7:419
16181 msgid ""
16182 "For example, the command I<chown\\ -HR user slink> will traverse the file "
16183 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
16184 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
16185 "symbolic links specified on the command line to be dereferenced for the "
16186 "purposes of both the action to be performed and the tree walk, and it is as "
16187 "if the user had specified the name of the file to which the symbolic link "
16188 "pointed."
16189 msgstr ""
16190
16191 #. type: Plain text
16192 #: build/C/man7/symlink.7:433
16193 msgid ""
16194 "A command can be made to follow any symbolic links named on the command "
16195 "line, as well as any symbolic links encountered during the traversal, "
16196 "regardless of the type of file they reference, by specifying the I<-L> (for "
16197 "\"logical\") flag.  This flag is intended to make the entire name space look "
16198 "like the logical name space.  (Note, for commands that do not always do file "
16199 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
16200 "also specified.)"
16201 msgstr ""
16202
16203 #. type: Plain text
16204 #: build/C/man7/symlink.7:448
16205 msgid ""
16206 "For example, the command I<chown\\ -LR user slink> will change the owner of "
16207 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
16208 "B<chown> will traverse the file hierarchy rooted in the directory that it "
16209 "references.  In addition, if any symbolic links are encountered in any file "
16210 "tree that B<chown> traverses, they will be treated in the same fashion as "
16211 "I<slink>."
16212 msgstr ""
16213
16214 #. type: Plain text
16215 #: build/C/man7/symlink.7:455
16216 msgid ""
16217 "A command can be made to provide the default behavior by specifying the I<-"
16218 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
16219 "space look like the physical name space."
16220 msgstr ""
16221
16222 #. type: Plain text
16223 #: build/C/man7/symlink.7:473
16224 msgid ""
16225 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
16226 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
16227 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
16228 "once; the last one specified determines the command's behavior.  This is "
16229 "intended to permit you to alias commands to behave one way or the other, and "
16230 "then override that behavior on the command line."
16231 msgstr ""
16232
16233 #. type: Plain text
16234 #: build/C/man7/symlink.7:479
16235 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
16236 msgstr ""
16237 "コマンド B<ls>(1) と B<rm>(1) には、 これらのルールに対する例外がある。"
16238
16239 #. type: Plain text
16240 #: build/C/man7/symlink.7:492
16241 msgid ""
16242 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
16243 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
16244 "command does not support the I<-H>, I<-L>, or I<-P> options."
16245 msgstr ""
16246 "B<rm>(1) コマンドは、 参照先のファイルではなく、シンボリックリンクに対して操"
16247 "作を行う。 したがって、 シンボリックリンクを辿ることはない。 B<rm>(1) コマン"
16248 "ドはオプション I<-H>, I<-L>, I<-P> をサポートしていない。"
16249
16250 #. type: Plain text
16251 #: build/C/man7/symlink.7:512
16252 msgid ""
16253 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
16254 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
16255 "options, B<ls>(1)  will follow symbolic links specified on the command "
16256 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
16257 "regardless of their type, whether specified on the command line or "
16258 "encountered in the tree walk."
16259 msgstr ""
16260
16261 #. type: Plain text
16262 #: build/C/man7/symlink.7:530
16263 msgid ""
16264 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
16265 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
16266 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
16267 "B<path_resolution>(7)"
16268 msgstr ""
16269 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
16270 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
16271 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
16272 "B<lutimes>(3), B<path_resolution>(7)"
16273
16274 #. type: TH
16275 #: build/C/man3/tempnam.3:25
16276 #, no-wrap
16277 msgid "TEMPNAM"
16278 msgstr "TEMPNAM"
16279
16280 #. type: TH
16281 #: build/C/man3/tempnam.3:25 build/C/man3/tmpnam.3:27
16282 #, no-wrap
16283 msgid "2014-02-27"
16284 msgstr "2014-02-27"
16285
16286 #. type: Plain text
16287 #: build/C/man3/tempnam.3:28
16288 msgid "tempnam - create a name for a temporary file"
16289 msgstr "tempnam - テンポラリファイルの名前を作成する"
16290
16291 #. type: Plain text
16292 #: build/C/man3/tempnam.3:33
16293 #, no-wrap
16294 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
16295 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
16296
16297 #. type: Plain text
16298 #: build/C/man3/tempnam.3:42
16299 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
16300 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
16301
16302 #. type: Plain text
16303 #: build/C/man3/tempnam.3:49
16304 msgid ""
16305 "I<Never use this function.> Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
16306 msgstr ""
16307 "I<決してこの関数を使用しないこと。> 代わりに B<mkstemp>(3)  か B<tmpfile>(3) "
16308 "を使うこと。"
16309
16310 #. type: Plain text
16311 #: build/C/man3/tempnam.3:63
16312 msgid ""
16313 "The B<tempnam>()  function returns a pointer to a string that is a valid "
16314 "filename, and such that a file with this name did not exist when B<tempnam>"
16315 "()  checked.  The filename suffix of the pathname generated will start with "
16316 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
16317 "directory prefix part of the pathname generated is required to be "
16318 "\"appropriate\" (often that at least implies writable)."
16319 msgstr ""
16320 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
16321 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
16322 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
16323 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
16324 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
16325 "ためにはまず少なくとも 書き込み可能でなければならない)。"
16326
16327 #. type: Plain text
16328 #: build/C/man3/tempnam.3:66
16329 msgid ""
16330 "Attempts to find an appropriate directory go through the following steps:"
16331 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
16332
16333 #. type: TP
16334 #: build/C/man3/tempnam.3:66
16335 #, no-wrap
16336 msgid "a)"
16337 msgstr "a)"
16338
16339 #. type: Plain text
16340 #: build/C/man3/tempnam.3:72
16341 msgid ""
16342 "In case the environment variable B<TMPDIR> exists and contains the name of "
16343 "an appropriate directory, that is used."
16344 msgstr ""
16345 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
16346 "ら、それを用いる。"
16347
16348 #. type: TP
16349 #: build/C/man3/tempnam.3:72
16350 #, no-wrap
16351 msgid "b)"
16352 msgstr "b)"
16353
16354 #. type: Plain text
16355 #: build/C/man3/tempnam.3:77
16356 msgid ""
16357 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
16358 msgstr ""
16359 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
16360 "る。"
16361
16362 #. type: TP
16363 #: build/C/man3/tempnam.3:77
16364 #, no-wrap
16365 msgid "c)"
16366 msgstr "c)"
16367
16368 #. type: Plain text
16369 #: build/C/man3/tempnam.3:84
16370 msgid ""
16371 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
16372 "appropriate."
16373 msgstr ""
16374 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
16375 "なら、それを用いる。"
16376
16377 #. type: TP
16378 #: build/C/man3/tempnam.3:84
16379 #, no-wrap
16380 msgid "d)"
16381 msgstr "d)"
16382
16383 #. type: Plain text
16384 #: build/C/man3/tempnam.3:87
16385 msgid "Finally an implementation-defined directory may be used."
16386 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
16387
16388 #. type: Plain text
16389 #: build/C/man3/tempnam.3:94
16390 msgid ""
16391 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
16392 "hence should be freed by B<free>(3)."
16393 msgstr ""
16394 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
16395 "B<free>(3)  で解放すべきである。"
16396
16397 #. type: Plain text
16398 #: build/C/man3/tempnam.3:101
16399 msgid ""
16400 "On success, the B<tempnam>()  function returns a pointer to a unique "
16401 "temporary filename.  It returns NULL if a unique name cannot be generated, "
16402 "with I<errno> set to indicate the cause of the error."
16403 msgstr ""
16404 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返"
16405 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
16406 "値を設定する。"
16407
16408 #. type: Plain text
16409 #: build/C/man3/tempnam.3:105
16410 msgid "Allocation of storage failed."
16411 msgstr "保存領域の割り当てに失敗した。"
16412
16413 #. type: Plain text
16414 #: build/C/man3/tempnam.3:110
16415 msgid ""
16416 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
16417 msgstr ""
16418 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
16419 "る。"
16420
16421 #. type: Plain text
16422 #: build/C/man3/tempnam.3:129
16423 msgid ""
16424 "Although B<tempnam>()  generates names that are difficult to guess, it is "
16425 "nevertheless possible that between the time that B<tempnam>()  returns a "
16426 "pathname, and the time that the program opens it, another program might "
16427 "create that pathname using B<open>(2), or create it as a symbolic link.  "
16428 "This can lead to security holes.  To avoid such possibilities, use the "
16429 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
16430 "B<mkstemp>(3)  or B<tmpfile>(3)."
16431 msgstr ""
16432 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
16433 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
16434 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
16435 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
16436 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
16437 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
16438 "B<tmpfile>(3)  を使うことである。"
16439
16440 #. type: Plain text
16441 #: build/C/man3/tempnam.3:137
16442 msgid ""
16443 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
16444 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
16445 "tmp> (and this is what glibc does)."
16446 msgstr ""
16447 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
16448 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
16449 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
16450
16451 #. type: Plain text
16452 #: build/C/man3/tempnam.3:142
16453 msgid ""
16454 "Because it dynamically allocates memory used to return the pathname, "
16455 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
16456 msgstr ""
16457 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
16458 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
16459
16460 #. type: Plain text
16461 #: build/C/man3/tempnam.3:155
16462 msgid ""
16463 "The B<tempnam>()  function generates a different string each time it is "
16464 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
16465 "called more than B<TMP_MAX> times, the behavior is implementation defined."
16466 msgstr ""
16467 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
16468 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
16469 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
16470
16471 #. type: Plain text
16472 #: build/C/man3/tempnam.3:159
16473 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
16474 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
16475
16476 #. type: Plain text
16477 #: build/C/man3/tempnam.3:165
16478 msgid ""
16479 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
16480 "upon failure to find a unique name."
16481 msgstr ""
16482 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
16483 "ラー B<EEXIST> で失敗する。"
16484
16485 #. type: Plain text
16486 #: build/C/man3/tempnam.3:168
16487 msgid ""
16488 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
16489 "accessibility of a directory is determined."
16490 msgstr ""
16491 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
16492 "度のアクセス権限が必要なのかは指定されていない。"
16493
16494 #. type: Plain text
16495 #: build/C/man3/tempnam.3:173
16496 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
16497 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
16498
16499 #. type: TH
16500 #: build/C/man3/tmpfile.3:31
16501 #, no-wrap
16502 msgid "TMPFILE"
16503 msgstr "TMPFILE"
16504
16505 #. type: Plain text
16506 #: build/C/man3/tmpfile.3:34
16507 msgid "tmpfile - create a temporary file"
16508 msgstr "tmpfile - テンポラリファイルを作成する"
16509
16510 #. type: Plain text
16511 #: build/C/man3/tmpfile.3:39
16512 #, no-wrap
16513 msgid "B<FILE *tmpfile(void);>\n"
16514 msgstr "B<FILE *tmpfile(void);>\n"
16515
16516 #. type: Plain text
16517 #: build/C/man3/tmpfile.3:47
16518 msgid ""
16519 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
16520 "write (w+b) mode.  The file will be automatically deleted when it is closed "
16521 "or the program terminates."
16522 msgstr ""
16523 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
16524 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
16525 "自動的に削除される。"
16526
16527 #. type: Plain text
16528 #: build/C/man3/tmpfile.3:56
16529 msgid ""
16530 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
16531 "filename cannot be generated or the unique file cannot be opened.  In the "
16532 "latter case, I<errno> is set to indicate the error."
16533 msgstr ""
16534 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
16535 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
16536 "I<errno> を設定する。"
16537
16538 #. type: Plain text
16539 #: build/C/man3/tmpfile.3:60
16540 msgid "Search permission denied for directory in file's path prefix."
16541 msgstr ""
16542 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
16543
16544 #. type: Plain text
16545 #: build/C/man3/tmpfile.3:63
16546 msgid "Unable to generate a unique filename."
16547 msgstr "ユニークなファイル名が作成できなかった。"
16548
16549 #. type: Plain text
16550 #: build/C/man3/tmpfile.3:66
16551 msgid "The call was interrupted by a signal."
16552 msgstr "呼び出しがシグナルによって中断された。"
16553
16554 #. type: Plain text
16555 #: build/C/man3/tmpfile.3:69
16556 msgid "Too many file descriptors in use by the process."
16557 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
16558
16559 #. type: Plain text
16560 #: build/C/man3/tmpfile.3:72
16561 msgid "Too many files open in the system."
16562 msgstr "システム全体でオープン可能なファイル数を超過した。"
16563
16564 #. type: Plain text
16565 #: build/C/man3/tmpfile.3:75
16566 msgid "There was no room in the directory to add the new filename."
16567 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
16568
16569 #. type: Plain text
16570 #: build/C/man3/tmpfile.3:78
16571 msgid "Read-only filesystem."
16572 msgstr "読みだし専用ファイルシステムである。"
16573
16574 #. type: Plain text
16575 #: build/C/man3/tmpfile.3:80
16576 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
16577 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
16578
16579 #. type: Plain text
16580 #: build/C/man3/tmpfile.3:86
16581 msgid ""
16582 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
16583 "stream cannot be opened."
16584 msgstr ""
16585 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
16586 "メッセージが書き出される、と規定されている。"
16587
16588 #. type: Plain text
16589 #: build/C/man3/tmpfile.3:97
16590 msgid ""
16591 "The standard does not specify the directory that B<tmpfile>()  will use.  "
16592 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
16593 "and if that fails the directory I</tmp>."
16594 msgstr ""
16595 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
16596 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
16597 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
16598
16599 #. type: Plain text
16600 #: build/C/man3/tmpfile.3:103
16601 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
16602 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
16603
16604 #. type: TH
16605 #: build/C/man3/tmpnam.3:27
16606 #, no-wrap
16607 msgid "TMPNAM"
16608 msgstr "TMPNAM"
16609
16610 #. type: Plain text
16611 #: build/C/man3/tmpnam.3:30
16612 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
16613 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
16614
16615 #. type: Plain text
16616 #: build/C/man3/tmpnam.3:35
16617 #, no-wrap
16618 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
16619 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
16620
16621 #. type: Plain text
16622 #: build/C/man3/tmpnam.3:45
16623 msgid ""
16624 "B<Note:> Avoid use of B<tmpnam>(); use B<mkstemp>(3)  or B<tmpfile>(3)  "
16625 "instead."
16626 msgstr ""
16627 "B<注意:> B<tmpnam>() の使用は避けること。代わりに B<mkstemp>(3) か B<tmpfile>"
16628 "(3) を使うこと。"
16629
16630 #. type: Plain text
16631 #: build/C/man3/tmpnam.3:67
16632 msgid ""
16633 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
16634 "filename, and such that a file with this name did not exist at some point in "
16635 "time, so that naive programmers may think it a suitable name for a temporary "
16636 "file.  If the argument I<s> is NULL, this name is generated in an internal "
16637 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
16638 "I<s> is not NULL, the name is copied to the character array (of length at "
16639 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
16640 "case of success."
16641 msgstr ""
16642 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
16643 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
16644 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
16645 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
16646 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
16647 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
16648 "ピーされ、 成功した場合は I<s> が返される。"
16649
16650 #. type: Plain text
16651 #: build/C/man3/tmpnam.3:79
16652 msgid ""
16653 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
16654 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
16655 "the B<TMP_MAX> mentioned below.)"
16656 msgstr ""
16657 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
16658 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
16659 "hE<gt>> で定義されている。)"
16660
16661 #. type: Plain text
16662 #: build/C/man3/tmpnam.3:84
16663 msgid ""
16664 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
16665 "or NULL if a unique name cannot be generated."
16666 msgstr ""
16667 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
16668 "が作成できなかった場合は NULL を返す。"
16669
16670 #. type: Plain text
16671 #: build/C/man3/tmpnam.3:86
16672 msgid "No errors are defined."
16673 msgstr "エラーは定義されていない。"
16674
16675 #. type: Plain text
16676 #: build/C/man3/tmpnam.3:92
16677 msgid ""
16678 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
16679 "safe if called with a NULL parameter."
16680 msgstr ""
16681 "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
16682 "れた場合はスレッドセーフではない。"
16683
16684 #. type: Plain text
16685 #: build/C/man3/tmpnam.3:96
16686 msgid "The B<tmpnam_r>()  function is thread-safe."
16687 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
16688
16689 #. type: Plain text
16690 #: build/C/man3/tmpnam.3:101
16691 msgid ""
16692 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
16693 "obsolete."
16694 msgstr ""
16695 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
16696 "定としている。"
16697
16698 #. type: Plain text
16699 #: build/C/man3/tmpnam.3:112
16700 msgid ""
16701 "The B<tmpnam>()  function generates a different string each time it is "
16702 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
16703 "the behavior is implementation defined."
16704 msgstr ""
16705 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
16706 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
16707
16708 #. type: Plain text
16709 #: build/C/man3/tmpnam.3:131
16710 msgid ""
16711 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
16712 "nevertheless possible that between the time that B<tmpnam>()  returns a "
16713 "pathname, and the time that the program opens it, another program might "
16714 "create that pathname using B<open>(2), or create it as a symbolic link.  "
16715 "This can lead to security holes.  To avoid such possibilities, use the "
16716 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
16717 "B<mkstemp>(3)  or B<tmpfile>(3)."
16718 msgstr ""
16719 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
16720 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
16721 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
16722 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
16723 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
16724 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
16725 "B<tmpfile>(3)  を使うことである。"
16726
16727 #. type: Plain text
16728 #: build/C/man3/tmpnam.3:139
16729 msgid ""
16730 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
16731 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
16732 "defined."
16733 msgstr ""
16734 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
16735 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
16736 "NULL 引き数で呼び出してはならない。"
16737
16738 #. type: Plain text
16739 #: build/C/man3/tmpnam.3:143
16740 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
16741 msgstr ""
16742 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
16743 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
16744 "扱いしている。"
16745
16746 #. type: Plain text
16747 #: build/C/man3/tmpnam.3:151
16748 #, no-wrap
16749 msgid ""
16750 "char *\n"
16751 "tmpnam_r(char *s)\n"
16752 "{\n"
16753 "    return s ? tmpnam(s) : NULL;\n"
16754 "}\n"
16755 msgstr ""
16756 "char *\n"
16757 "tmpnam_r(char *s)\n"
16758 "{\n"
16759 "    return s ? tmpnam(s) : NULL;\n"
16760 "}\n"
16761
16762 #. type: Plain text
16763 #: build/C/man3/tmpnam.3:165
16764 msgid ""
16765 "apparently as a warning not to use NULL.  A few systems implement it.  To "
16766 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
16767 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
16768 msgstr ""
16769 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
16770 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
16771 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
16772 "がある。"
16773
16774 #. type: Plain text
16775 #: build/C/man3/tmpnam.3:172
16776 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
16777 msgstr ""
16778 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
16779 "を使うこと。"
16780
16781 #. type: Plain text
16782 #: build/C/man3/tmpnam.3:177
16783 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
16784 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
16785
16786 #. type: TH
16787 #: build/C/man2/unlink.2:33
16788 #, no-wrap
16789 msgid "UNLINK"
16790 msgstr "UNLINK"
16791
16792 #. type: Plain text
16793 #: build/C/man2/unlink.2:36
16794 msgid "unlink, unlinkat - delete a name and possibly the file it refers to"
16795 msgstr ""
16796 "unlink, unlinkat - 名前を削除し、場合によってはそれが参照しているファイルも削"
16797 "除する"
16798
16799 #. type: Plain text
16800 #: build/C/man2/unlink.2:41
16801 #, no-wrap
16802 msgid "B<int unlink(const char *>I<pathname>B<);>\n"
16803 msgstr "B<int unlink(const char *>I<pathname>B<);>\n"
16804
16805 #. type: Plain text
16806 #: build/C/man2/unlink.2:46
16807 #, no-wrap
16808 msgid "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
16809 msgstr "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
16810
16811 #. type: Plain text
16812 #: build/C/man2/unlink.2:54
16813 msgid "B<unlinkat>():"
16814 msgstr "B<unlinkat>():"
16815
16816 #. type: Plain text
16817 #: build/C/man2/unlink.2:72
16818 msgid ""
16819 "B<unlink>()  deletes a name from the filesystem.  If that name was the last "
16820 "link to a file and no processes have the file open, the file is deleted and "
16821 "the space it was using is made available for reuse."
16822 msgstr ""
16823 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
16824 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
16825 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
16826 "は再利用が可能になる。"
16827
16828 #. type: Plain text
16829 #: build/C/man2/unlink.2:76
16830 msgid ""
16831 "If the name was the last link to a file but any processes still have the "
16832 "file open, the file will remain in existence until the last file descriptor "
16833 "referring to it is closed."
16834 msgstr ""
16835 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
16836 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
16837 "でファイルは存在し続ける。"
16838
16839 #. type: Plain text
16840 #: build/C/man2/unlink.2:82
16841 msgid ""
16842 "If the name referred to a socket, FIFO, or device, the name for it is "
16843 "removed but processes which have the object open may continue to use it."
16844 msgstr ""
16845 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
16846 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
16847
16848 #. type: SS
16849 #: build/C/man2/unlink.2:82
16850 #, no-wrap
16851 msgid "unlinkat()"
16852 msgstr "unlinkat()"
16853
16854 #. type: Plain text
16855 #: build/C/man2/unlink.2:95
16856 msgid ""
16857 "The B<unlinkat>()  system call operates in exactly the same way as either "
16858 "B<unlink>()  or B<rmdir>(2)  (depending on whether or not I<flags> includes "
16859 "the B<AT_REMOVEDIR> flag)  except for the differences described here."
16860 msgstr ""
16861 "B<unlinkat>() システムコールは、B<unlink>() と B<rmdir>(2) のいずれかと全く同"
16862 "じ動作をする (どちらと同じになるかは I<flags> に B<AT_REMOVEDIR> フラグが指定"
16863 "されたかにより決まる) が、以下で説明する点が異なる。"
16864
16865 #. type: Plain text
16866 #: build/C/man2/unlink.2:107
16867 msgid ""
16868 "If the pathname given in I<pathname> is relative, then it is interpreted "
16869 "relative to the directory referred to by the file descriptor I<dirfd> "
16870 "(rather than relative to the current working directory of the calling "
16871 "process, as is done by B<unlink>()  and B<rmdir>(2)  for a relative "
16872 "pathname)."
16873 msgstr ""
16874 "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスク"
16875 "リプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される "
16876 "(B<unlink>() や B<rmdir>(2) に相対パス名を渡した場合のように、呼び出したプロ"
16877 "セスのカレントワーキングディレクトリに対する相対パスではない)。"
16878
16879 #. type: Plain text
16880 #: build/C/man2/unlink.2:121
16881 msgid ""
16882 "If the pathname given in I<pathname> is relative and I<dirfd> is the special "
16883 "value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current "
16884 "working directory of the calling process (like B<unlink>()  and B<rmdir>(2))."
16885 msgstr ""
16886 "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> "
16887 "の場合、 (B<unlink>() や B<rmdir>(2) と同様に) I<pathname> は呼び出したプロセ"
16888 "スのカレントワーキングディレクトリに対する相対パスと解釈される。"
16889
16890 #. type: Plain text
16891 #: build/C/man2/unlink.2:127
16892 msgid ""
16893 "If the pathname given in I<pathname> is absolute, then I<dirfd> is ignored."
16894 msgstr ""
16895 "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
16896
16897 #. type: Plain text
16898 #: build/C/man2/unlink.2:133
16899 msgid ""
16900 "I<flags> is a bit mask that can either be specified as 0, or by ORing "
16901 "together flag values that control the operation of B<unlinkat>().  Currently "
16902 "only one such flag is defined:"
16903 msgstr ""
16904 "I<flags> はビットマスクで、0 もしくは B<unlinkat>() の動作を制御するフラグ値"
16905 "を論理和の形で指定することができる。現在のところ、定義されているフラグはひと"
16906 "つだけである。"
16907
16908 #. type: TP
16909 #: build/C/man2/unlink.2:133
16910 #, no-wrap
16911 msgid "B<AT_REMOVEDIR>"
16912 msgstr "B<AT_REMOVEDIR>"
16913
16914 #. type: Plain text
16915 #: build/C/man2/unlink.2:148
16916 msgid ""
16917 "By default, B<unlinkat>()  performs the equivalent of B<unlink>()  on "
16918 "I<pathname>.  If the B<AT_REMOVEDIR> flag is specified, then performs the "
16919 "equivalent of B<rmdir>(2)  on I<pathname>."
16920 msgstr ""
16921 "デフォルトでは、 B<unlinkat>() は I<pathname> に対して B<unlink>() と等価な動"
16922 "作をする。 B<AT_REMOVEDIR> フラグが指定された場合、 I<pathname> に対して "
16923 "B<rmdir>(2) と等価な動作をする。"
16924
16925 #. type: Plain text
16926 #: build/C/man2/unlink.2:153
16927 msgid "See B<openat>(2)  for an explanation of the need for B<unlinkat>()."
16928 msgstr "B<unlinkat>() の必要性についての説明については B<openat>(2) を参照。"
16929
16930 #. type: Plain text
16931 #: build/C/man2/unlink.2:169
16932 msgid ""
16933 "Write access to the directory containing I<pathname> is not allowed for the "
16934 "process's effective UID, or one of the directories in I<pathname> did not "
16935 "allow search permission.  (See also B<path_resolution>(7).)"
16936 msgstr ""
16937 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
16938 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
16939 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
16940 "と)。"
16941
16942 #. type: Plain text
16943 #: build/C/man2/unlink.2:178
16944 msgid ""
16945 "The file I<pathname> cannot be unlinked because it is being used by the "
16946 "system or another process; for example, it is a mount point or the NFS "
16947 "client software created it to represent an active but otherwise nameless "
16948 "inode (\"NFS silly renamed\")."
16949 msgstr ""
16950 "システムか別のプロセスがそのファイルを使用中のため、\n"
16951 "ファイル I<pathname> を unlink できない。\n"
16952 "例えば、そのファイルがマウントポイントの場合や、\n"
16953 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
16954 "名前なし inode (nameless inode) であることを示すために作成した\n"
16955 "場合 (\"NFS silly renamed\") などがある。"
16956
16957 #. type: Plain text
16958 #: build/C/man2/unlink.2:190
16959 msgid ""
16960 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
16961 "Linux since 2.1.132.)"
16962 msgstr ""
16963 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
16964 "で、Linux 2.1.132 以降で返される。)"
16965
16966 #. type: Plain text
16967 #: build/C/man2/unlink.2:194
16968 msgid "Too many symbolic links were encountered in translating I<pathname>."
16969 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
16970
16971 #. type: Plain text
16972 #: build/C/man2/unlink.2:204
16973 msgid ""
16974 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
16975 "I<pathname> is empty."
16976 msgstr ""
16977 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
16978 "I<pathname> が空である。"
16979
16980 #. type: Plain text
16981 #: build/C/man2/unlink.2:212
16982 msgid ""
16983 "A component used as a directory in I<pathname> is not, in fact, a directory."
16984 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
16985
16986 #. type: Plain text
16987 #: build/C/man2/unlink.2:221
16988 msgid ""
16989 "The system does not allow unlinking of directories, or unlinking of "
16990 "directories requires privileges that the calling process doesn't have.  "
16991 "(This is the POSIX prescribed error return; as noted above, Linux returns "
16992 "B<EISDIR> for this case.)"
16993 msgstr ""
16994 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
16995 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
16996 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
16997 "合には Linux は B<EISDIR> を返す。)"
16998
16999 #. type: TP
17000 #: build/C/man2/unlink.2:221
17001 #, no-wrap
17002 msgid "B<EPERM> (Linux only)"
17003 msgstr "B<EPERM> (Linux のみ)"
17004
17005 #. type: Plain text
17006 #: build/C/man2/unlink.2:224
17007 msgid "The filesystem does not allow unlinking of files."
17008 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
17009
17010 #. type: Plain text
17011 #: build/C/man2/unlink.2:235
17012 msgid ""
17013 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
17014 "and the process's effective UID is neither the UID of the file to be deleted "
17015 "nor that of the directory containing it, and the process is not privileged "
17016 "(Linux: does not have the B<CAP_FOWNER> capability)."
17017 msgstr ""
17018 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
17019 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
17020 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
17021 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
17022
17023 #. type: Plain text
17024 #: build/C/man2/unlink.2:239
17025 msgid "I<pathname> refers to a file on a read-only filesystem."
17026 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
17027
17028 #. type: Plain text
17029 #: build/C/man2/unlink.2:248
17030 msgid ""
17031 "The same errors that occur for B<unlink>()  and B<rmdir>(2)  can also occur "
17032 "for B<unlinkat>().  The following additional errors can occur for B<unlinkat>"
17033 "():"
17034 msgstr ""
17035 "B<unlink>() と B<rmdir>(2) で発生するのと同じエラーが B<unlinkat>() でも起こ"
17036 "る。 B<unlinkat>() では以下のエラーも発生する。"
17037
17038 #. type: Plain text
17039 #: build/C/man2/unlink.2:263
17040 msgid ""
17041 "I<pathname> refers to a directory, and B<AT_REMOVEDIR> was not specified in "
17042 "I<flags>."
17043 msgstr ""
17044 "I<pathname> がディレクトリを参照していて、 I<flags> に B<AT_REMOVEDIR> がされ"
17045 "ていなかった。"
17046
17047 #. type: Plain text
17048 #: build/C/man2/unlink.2:273
17049 msgid ""
17050 "B<unlinkat>()  was added to Linux in kernel 2.6.16; library support was "
17051 "added to glibc in version 2.4."
17052 msgstr ""
17053 "B<unlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサ"
17054 "ポートはバージョン 2.4 で glibc に追加された。"
17055
17056 #.  SVr4 documents additional error
17057 #.  conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
17058 #. type: Plain text
17059 #: build/C/man2/unlink.2:278
17060 msgid "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
17061 msgstr "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
17062
17063 #. type: Plain text
17064 #: build/C/man2/unlink.2:281
17065 msgid "B<unlinkat>(): POSIX.1-2008."
17066 msgstr "B<unlinkat>(): POSIX.1-2008."
17067
17068 #. type: Plain text
17069 #: build/C/man2/unlink.2:296
17070 msgid ""
17071 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
17072 "B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
17073 msgstr ""
17074 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
17075 "B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
17076
17077 #. type: TH
17078 #: build/C/man3/unlocked_stdio.3:25
17079 #, no-wrap
17080 msgid "UNLOCKED_STDIO"
17081 msgstr "UNLOCKED_STDIO"
17082
17083 #. type: TH
17084 #: build/C/man3/unlocked_stdio.3:25
17085 #, no-wrap
17086 msgid "2008-08-29"
17087 msgstr "2008-08-29"
17088
17089 #. type: Plain text
17090 #: build/C/man3/unlocked_stdio.3:29
17091 msgid ""
17092 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
17093 "nonlocking stdio functions"
17094 msgstr ""
17095 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
17096 "わずに標準入出力を行う関数群"
17097
17098 #. type: Plain text
17099 #: build/C/man3/unlocked_stdio.3:37
17100 #, no-wrap
17101 msgid ""
17102 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
17103 "B<int getchar_unlocked(void);>\n"
17104 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17105 "B<int putchar_unlocked(int >I<c>B<);>\n"
17106 msgstr ""
17107 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
17108 "B<int getchar_unlocked(void);>\n"
17109 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17110 "B<int putchar_unlocked(int >I<c>B<);>\n"
17111
17112 #. type: Plain text
17113 #: build/C/man3/unlocked_stdio.3:49
17114 #, no-wrap
17115 msgid ""
17116 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
17117 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
17118 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
17119 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
17120 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
17121 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
17122 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17123 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17124 "B<                      FILE *>I<stream>B<);>\n"
17125 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17126 "B<                      FILE *>I<stream>B<);>\n"
17127 msgstr ""
17128 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
17129 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
17130 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
17131 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
17132 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
17133 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
17134 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
17135 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17136 "B<                      FILE *>I<stream>B<);>\n"
17137 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
17138 "B<                      FILE *>I<stream>B<);>\n"
17139
17140 #. type: Plain text
17141 #: build/C/man3/unlocked_stdio.3:52
17142 #, no-wrap
17143 msgid ""
17144 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17145 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
17146 msgstr ""
17147 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17148 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
17149
17150 #. type: Plain text
17151 #: build/C/man3/unlocked_stdio.3:63
17152 #, no-wrap
17153 msgid ""
17154 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
17155 "B<wint_t getwchar_unlocked(void);>\n"
17156 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
17157 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17158 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17159 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
17160 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17161 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
17162 msgstr ""
17163 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
17164 "B<wint_t getwchar_unlocked(void);>\n"
17165 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
17166 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17167 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
17168 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
17169 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
17170 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
17171
17172 #. type: Plain text
17173 #: build/C/man3/unlocked_stdio.3:75
17174 msgid ""
17175 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17176 "B<putchar_unlocked>():"
17177 msgstr ""
17178 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17179 "B<putchar_unlocked>():"
17180
17181 #. type: Plain text
17182 #: build/C/man3/unlocked_stdio.3:78
17183 msgid ""
17184 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
17185 "_BSD_SOURCE || _SVID_SOURCE"
17186 msgstr ""
17187 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
17188 "_BSD_SOURCE || _SVID_SOURCE"
17189
17190 #. type: Plain text
17191 #: build/C/man3/unlocked_stdio.3:89
17192 msgid ""
17193 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
17194 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
17195 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
17196 msgstr ""
17197 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
17198 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
17199 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
17200
17201 #. type: Plain text
17202 #: build/C/man3/unlocked_stdio.3:91
17203 msgid "_BSD_SOURCE || _SVID_SOURCE"
17204 msgstr "_BSD_SOURCE || _SVID_SOURCE"
17205
17206 #. type: Plain text
17207 #: build/C/man3/unlocked_stdio.3:102
17208 msgid ""
17209 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
17210 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
17211 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
17212 msgstr ""
17213 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
17214 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
17215 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
17216
17217 #. type: Plain text
17218 #: build/C/man3/unlocked_stdio.3:113
17219 msgid ""
17220 "Each of these functions has the same behavior as its counterpart without the "
17221 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
17222 "locks themselves, and do not test for the presence of locks set by others) "
17223 "and hence are thread-unsafe.  See B<flockfile>(3)."
17224 msgstr ""
17225 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
17226 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
17227 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
17228 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
17229 "B<flockfile>(3)  を参照のこと。"
17230
17231 #. type: Plain text
17232 #: build/C/man3/unlocked_stdio.3:120
17233 msgid ""
17234 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
17235 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
17236 msgstr ""
17237 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
17238 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
17239
17240 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
17241 #.  moved to a compatibility library.
17242 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
17243 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
17244 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
17245 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
17246 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17247 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
17248 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
17249 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
17250 #.  ungetc_unlocked, ungetwc_unlocked.
17251 #. type: Plain text
17252 #: build/C/man3/unlocked_stdio.3:136
17253 msgid ""
17254 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
17255 "are available in recent glibc.  They should probably not be used."
17256 msgstr ""
17257 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
17258 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
17259
17260 #. type: Plain text
17261 #: build/C/man3/unlocked_stdio.3:139
17262 msgid "B<flockfile>(3), B<stdio>(3)"
17263 msgstr "B<flockfile>(3), B<stdio>(3)"
17264
17265 #. type: TH
17266 #: build/C/man3/wprintf.3:16
17267 #, no-wrap
17268 msgid "WPRINTF"
17269 msgstr "WPRINTF"
17270
17271 #. type: Plain text
17272 #: build/C/man3/wprintf.3:20
17273 msgid ""
17274 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
17275 "character output conversion"
17276 msgstr ""
17277 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
17278 "フォーマットして出力する"
17279
17280 #. type: Plain text
17281 #: build/C/man3/wprintf.3:24
17282 #, no-wrap
17283 msgid ""
17284 "B<#include E<lt>stdio.hE<gt>>\n"
17285 "B<#include E<lt>wchar.hE<gt>>\n"
17286 msgstr ""
17287 "B<#include E<lt>stdio.hE<gt>>\n"
17288 "B<#include E<lt>wchar.hE<gt>>\n"
17289
17290 #. type: Plain text
17291 #: build/C/man3/wprintf.3:29
17292 #, no-wrap
17293 msgid ""
17294 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
17295 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
17296 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17297 "B<             const wchar_t *>I<format>B<, ...);>\n"
17298 msgstr ""
17299 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
17300 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
17301 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17302 "B<             const wchar_t *>I<format>B<, ...);>\n"
17303
17304 #. type: Plain text
17305 #: build/C/man3/wprintf.3:34
17306 #, no-wrap
17307 msgid ""
17308 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17309 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17310 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17311 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17312 msgstr ""
17313 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17314 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17315 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
17316 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
17317
17318 #.  .BR wprintf (),
17319 #.  .BR fwprintf (),
17320 #.  .BR swprintf (),
17321 #.  .BR vwprintf (),
17322 #.  .BR vfwprintf (),
17323 #.  .BR vswprintf ():
17324 #. type: Plain text
17325 #: build/C/man3/wprintf.3:51
17326 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
17327 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
17328
17329 #. type: Plain text
17330 #: build/C/man3/wprintf.3:53
17331 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
17332 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
17333
17334 #. type: Plain text
17335 #: build/C/man3/wprintf.3:56
17336 msgid "or I<cc\\ -std=c99>"
17337 msgstr "or I<cc\\ -std=c99>"
17338
17339 #. type: Plain text
17340 #: build/C/man3/wprintf.3:67
17341 msgid ""
17342 "The B<wprintf>()  family of functions is the wide-character equivalent of "
17343 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
17344 "characters."
17345 msgstr ""
17346 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
17347 "版である。これらはワイド文字をフォーマットして出力する。"
17348
17349 #. type: Plain text
17350 #: build/C/man3/wprintf.3:79
17351 msgid ""
17352 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
17353 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
17354 "more information."
17355 msgstr ""
17356 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
17357 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
17358 "ること。"
17359
17360 #. type: Plain text
17361 #: build/C/man3/wprintf.3:91
17362 msgid ""
17363 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
17364 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
17365 "for more information."
17366 msgstr ""
17367 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
17368 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
17369 "B<fwide>(3)  を参照すること。"
17370
17371 #. type: Plain text
17372 #: build/C/man3/wprintf.3:105
17373 msgid ""
17374 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
17375 "output to an array of wide characters.  The programmer must ensure that "
17376 "there is room for at least I<maxlen> wide characters at I<wcs>."
17377 msgstr ""
17378 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
17379 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
17380 "空きがあることを保証しなければ ならない。"
17381
17382 #. type: Plain text
17383 #: build/C/man3/wprintf.3:116
17384 msgid ""
17385 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
17386 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
17387 "following differences:"
17388 msgstr ""
17389 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
17390 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
17391
17392 #. type: TP
17393 #: build/C/man3/wprintf.3:116 build/C/man3/wprintf.3:121
17394 #: build/C/man3/wprintf.3:124
17395 #, no-wrap
17396 msgid "B<\\(bu>"
17397 msgstr "B<\\(bu>"
17398
17399 #. type: Plain text
17400 #: build/C/man3/wprintf.3:121
17401 msgid "The I<format> string is a wide-character string."
17402 msgstr "I<format> がワイド文字列で与えられる。"
17403
17404 #. type: Plain text
17405 #: build/C/man3/wprintf.3:124
17406 msgid "The output consists of wide characters, not bytes."
17407 msgstr "出力がバイトではなくワイド文字で構成される。"
17408
17409 #. type: Plain text
17410 #: build/C/man3/wprintf.3:143
17411 msgid ""
17412 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
17413 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
17414 "I<maxlen> argument, but these functions do not return -1 upon buffer "
17415 "overflow on Linux.)"
17416 msgstr ""
17417 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
17418 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
17419 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
17420 "も -1 を返さない)。"
17421
17422 #. type: Plain text
17423 #: build/C/man3/wprintf.3:149
17424 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
17425 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
17426
17427 #. type: Plain text
17428 #: build/C/man3/wprintf.3:163
17429 msgid ""
17430 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
17431 "character by a call to the B<btowc>(3)  function, and the resulting wide "
17432 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
17433 "character) argument is written."
17434 msgstr ""
17435 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
17436 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
17437 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
17438
17439 #. type: Plain text
17440 #: build/C/man3/wprintf.3:203
17441 msgid ""
17442 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
17443 "to be a pointer to an array of character type (pointer to a string) "
17444 "containing a multibyte character sequence beginning in the initial shift "
17445 "state.  Characters from the array are converted to wide characters (each by "
17446 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
17447 "the initial state before the first byte).  The resulting wide characters are "
17448 "written up to (but not including) the terminating null wide character (L\\(aq"
17449 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
17450 "number specified are written.  Note that the precision determines the number "
17451 "of I<wide characters> written, not the number of I<bytes> or I<screen "
17452 "positions>.  The array must contain a terminating null byte (\\(aq"
17453 "\\e0\\(aq), unless a precision is given and it is so small that the number "
17454 "of converted wide characters reaches it before the end of the array is "
17455 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
17456 "argument is expected to be a pointer to an array of wide characters.  Wide "
17457 "characters from the array are written up to (but not including) a "
17458 "terminating null wide character.  If a precision is specified, no more than "
17459 "the number specified are written.  The array must contain a terminating null "
17460 "wide character, unless a precision is given and it is smaller than or equal "
17461 "to the number of wide characters in the array."
17462 msgstr ""
17463 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
17464 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
17465 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
17466 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
17467 "字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度"
17468 "(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれな"
17469 "い。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字"
17470 "> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
17471 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
17472 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
17473 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
17474 "引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端の"
17475 "ナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精"
17476 "度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含"
17477 "む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さ"
17478 "くな ければならない。"
17479
17480 #. type: Plain text
17481 #: build/C/man3/wprintf.3:211
17482 msgid ""
17483 "The functions return the number of wide characters written, excluding the "
17484 "terminating null wide character in case of the functions B<swprintf>()  and "
17485 "B<vswprintf>().  They return -1 when an error occurs."
17486 msgstr ""
17487 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
17488 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
17489 "場合は -1 を返す。"
17490
17491 #. type: Plain text
17492 #: build/C/man3/wprintf.3:213
17493 msgid "C99."
17494 msgstr "C99."
17495
17496 #. type: Plain text
17497 #: build/C/man3/wprintf.3:221
17498 msgid ""
17499 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
17500 "the current locale."
17501 msgstr ""
17502 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
17503
17504 #. type: Plain text
17505 #: build/C/man3/wprintf.3:251
17506 msgid ""
17507 "If the I<format> string contains non-ASCII wide characters, the program will "
17508 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
17509 "time is the same as the B<LC_CTYPE> category of the current locale at "
17510 "compile time.  This is because the I<wchar_t> representation is platform- "
17511 "and locale-dependent.  (The glibc represents wide characters using their "
17512 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
17513 "the use of C99 universal character names of the form \\eunnnn does not solve "
17514 "this problem.)  Therefore, in internationalized programs, the I<format> "
17515 "string should consist of ASCII wide characters only, or should be "
17516 "constructed at run time in an internationalized way (e.g., using B<gettext>"
17517 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
17518 msgstr ""
17519 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
17520 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
17521 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
17522 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
17523 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
17524 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
17525 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
17526 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
17527 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
17528
17529 #.  .BR wscanf (3)
17530 #. type: Plain text
17531 #: build/C/man3/wprintf.3:258
17532 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
17533 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
17534
17535 #. type: TH
17536 #: build/C/man2/write.2:39
17537 #, no-wrap
17538 msgid "WRITE"
17539 msgstr "WRITE"
17540
17541 #. type: TH
17542 #: build/C/man2/write.2:39
17543 #, no-wrap
17544 msgid "2013-01-27"
17545 msgstr "2013-01-27"
17546
17547 #. type: Plain text
17548 #: build/C/man2/write.2:42
17549 msgid "write - write to a file descriptor"
17550 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
17551
17552 #. type: Plain text
17553 #: build/C/man2/write.2:46
17554 msgid ""
17555 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
17556 msgstr ""
17557 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
17558
17559 #. type: Plain text
17560 #: build/C/man2/write.2:54
17561 msgid ""
17562 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
17563 "the file referred to by the file descriptor I<fd>."
17564 msgstr ""
17565 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
17566 "照するファイルへ、最大 I<count> バイトを書き込む。"
17567
17568 #. type: Plain text
17569 #: build/C/man2/write.2:68
17570 msgid ""
17571 "The number of bytes written may be less than I<count> if, for example, there "
17572 "is insufficient space on the underlying physical medium, or the "
17573 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
17574 "call was interrupted by a signal handler after having written less than "
17575 "I<count> bytes.  (See also B<pipe>(7).)"
17576 msgstr ""
17577 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
17578 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
17579 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
17580 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
17581 "(7)  も参照のこと。)"
17582
17583 #. type: Plain text
17584 #: build/C/man2/write.2:82
17585 msgid ""
17586 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
17587 "example, a regular file)  writing takes place at the current file offset, "
17588 "and the file offset is incremented by the number of bytes actually written.  "
17589 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
17590 "to the end of the file before writing.  The adjustment of the file offset "
17591 "and the write operation are performed as an atomic step."
17592 msgstr ""
17593 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
17594 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
17595 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
17596 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
17597 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
17598 "処理として 実行される。"
17599
17600 #. type: Plain text
17601 #: build/C/man2/write.2:89
17602 msgid ""
17603 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
17604 "B<write>()  has returned returns the new data.  Note that not all "
17605 "filesystems are POSIX conforming."
17606 msgstr ""
17607 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
17608 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
17609 "ること。"
17610
17611 #. type: Plain text
17612 #: build/C/man2/write.2:94
17613 msgid ""
17614 "On success, the number of bytes written is returned (zero indicates nothing "
17615 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
17616 msgstr ""
17617 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
17618 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
17619
17620 #. type: Plain text
17621 #: build/C/man2/write.2:107
17622 msgid ""
17623 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
17624 "return a failure status if one of the errors below is detected.  If no "
17625 "errors are detected, 0 will be returned without causing any other effect.  "
17626 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
17627 "the results are not specified."
17628 msgstr ""
17629 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
17630 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
17631 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
17632 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
17633 "その結果は規定されていない。"
17634
17635 #. type: Plain text
17636 #: build/C/man2/write.2:115
17637 msgid ""
17638 "The file descriptor I<fd> refers to a file other than a socket and has been "
17639 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
17640 msgstr ""
17641 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
17642 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
17643 "する状況にある。"
17644
17645 #.  Actually EAGAIN on Linux
17646 #. type: Plain text
17647 #: build/C/man2/write.2:126
17648 msgid ""
17649 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
17650 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
17651 "error to be returned for this case, and does not require these constants to "
17652 "have the same value, so a portable application should check for both "
17653 "possibilities."
17654 msgstr ""
17655 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
17656 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
17657 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
17658 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
17659 "プリケーションでは、両方の可能性を 確認すべきである。"
17660
17661 #. type: Plain text
17662 #: build/C/man2/write.2:130
17663 msgid "I<fd> is not a valid file descriptor or is not open for writing."
17664 msgstr ""
17665 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
17666 "されていない。"
17667
17668 #. type: TP
17669 #: build/C/man2/write.2:130
17670 #, no-wrap
17671 msgid "B<EDESTADDRREQ>"
17672 msgstr "B<EDESTADDRREQ>"
17673
17674 #. type: Plain text
17675 #: build/C/man2/write.2:135
17676 msgid ""
17677 "I<fd> refers to a datagram socket for which a peer address has not been set "
17678 "using B<connect>(2)."
17679 msgstr ""
17680 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
17681 "グラムソケットを 参照している。"
17682
17683 #. type: Plain text
17684 #: build/C/man2/write.2:141
17685 msgid ""
17686 "The user's quota of disk blocks on the filesystem containing the file "
17687 "referred to by I<fd> has been exhausted."
17688 msgstr ""
17689 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
17690 "クォータの上限に達している。"
17691
17692 #. type: Plain text
17693 #: build/C/man2/write.2:150
17694 msgid ""
17695 "An attempt was made to write a file that exceeds the implementation-defined "
17696 "maximum file size or the process's file size limit, or to write at a "
17697 "position past the maximum allowed offset."
17698 msgstr ""
17699 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
17700 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
17701 "書き込もうとした。"
17702
17703 #. type: Plain text
17704 #: build/C/man2/write.2:154
17705 msgid ""
17706 "The call was interrupted by a signal before any data was written; see "
17707 "B<signal>(7)."
17708 msgstr ""
17709 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
17710 "(7)  参照。"
17711
17712 #. type: Plain text
17713 #: build/C/man2/write.2:165
17714 msgid ""
17715 "I<fd> is attached to an object which is unsuitable for writing; or the file "
17716 "was opened with the B<O_DIRECT> flag, and either the address specified in "
17717 "I<buf>, the value specified in I<count>, or the current file offset is not "
17718 "suitably aligned."
17719 msgstr ""
17720 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
17721 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
17722 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
17723 "メントが不適切である。"
17724
17725 #. type: Plain text
17726 #: build/C/man2/write.2:168
17727 msgid "A low-level I/O error occurred while modifying the inode."
17728 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
17729
17730 #. type: Plain text
17731 #: build/C/man2/write.2:173
17732 msgid ""
17733 "The device containing the file referred to by I<fd> has no room for the data."
17734 msgstr ""
17735 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
17736
17737 #. type: TP
17738 #: build/C/man2/write.2:173
17739 #, no-wrap
17740 msgid "B<EPIPE>"
17741 msgstr "B<EPIPE>"
17742
17743 #. type: Plain text
17744 #: build/C/man2/write.2:182
17745 msgid ""
17746 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
17747 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
17748 "(Thus, the write return value is seen only if the program catches, blocks or "
17749 "ignores this signal.)"
17750 msgstr ""
17751 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
17752 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
17753 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
17754 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
17755 "write の返り値を参照できる。)"
17756
17757 #. type: Plain text
17758 #: build/C/man2/write.2:185
17759 msgid "Other errors may occur, depending on the object connected to I<fd>."
17760 msgstr ""
17761 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
17762
17763 #. type: Plain text
17764 #: build/C/man2/write.2:194
17765 msgid ""
17766 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
17767 "just before any data is written."
17768 msgstr ""
17769 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
17770 "で B<EINTR> が返る。"
17771
17772 #. type: Plain text
17773 #: build/C/man2/write.2:203
17774 msgid ""
17775 "A successful return from B<write>()  does not make any guarantee that data "
17776 "has been committed to disk.  In fact, on some buggy implementations, it does "
17777 "not even guarantee that space has successfully been reserved for the data.  "
17778 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
17779 "all your data."
17780 msgstr ""
17781 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
17782 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
17783 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
17784 "write した後に B<fsync>(2)  を呼び出すことである。"
17785
17786 #. type: Plain text
17787 #: build/C/man2/write.2:211
17788 msgid ""
17789 "If a B<write>()  is interrupted by a signal handler before any bytes are "
17790 "written, then the call fails with the error B<EINTR>; if it is interrupted "
17791 "after at least one byte has been written, the call succeeds, and returns the "
17792 "number of bytes written."
17793 msgstr ""
17794 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
17795 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
17796 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
17797
17798 #. type: Plain text
17799 #: build/C/man2/write.2:223
17800 msgid ""
17801 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
17802 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
17803 msgstr ""
17804 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
17805 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
17806
17807 #~ msgid ""
17808 #~ "Enable the close-on-exec flag for the new file descriptor.  Specifying "
17809 #~ "this flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
17810 #~ "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag "
17811 #~ "is essential in some multithreaded programs since using a separate "
17812 #~ "B<fcntl>(2)  B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not "
17813 #~ "suffice to avoid race conditions where one thread opens a file descriptor "
17814 #~ "at the same time as another thread does a B<fork>(2)  plus B<execve>(2)."
17815 #~ msgstr ""
17816 #~ "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 こ"
17817 #~ "のフラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするた"
17818 #~ "めの B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある"
17819 #~ "種のマルチスレッドのプログラムはこのフラグの使用は 不可欠である。なぜな"
17820 #~ "ら、個別に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼"
17821 #~ "び出したとしても、あるスレッドがファイルディスクリプタを オープンするのと"
17822 #~ "同時に別のスレッドが B<fork>(2)  と B<execve>(2)  を実行するという競合条件"
17823 #~ "を避けるのには十分ではないからである。"
17824
17825 #~ msgid "SYMBOLIC LINK HANDLING"
17826 #~ msgstr "シンボリックリンクの取り扱い"
17827
17828 #~ msgid ""
17829 #~ "Various system calls do not follow links, and operate on the symbolic "
17830 #~ "link itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
17831 #~ "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), "
17832 #~ "B<rename>(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls "
17833 #~ "optionally follow symbolic links.  They are: B<faccessat>(2), B<fchownat>"
17834 #~ "(2), B<fstatat>(2), B<linkat>(2), B<open>(2), B<openat>(2), and "
17835 #~ "B<utimensat>(2); see their manual pages for details.  Because B<remove>"
17836 #~ "(3)  is an alias for B<unlink>(2), that library function also does not "
17837 #~ "follow symbolic links.  When B<rmdir>(2)  is applied to a symbolic link, "
17838 #~ "it fails with the error B<ENOTDIR>.  The B<link>(2)  warrants special "
17839 #~ "discussion.  POSIX.1-2001 specifies that B<link>(2)  should dereference "
17840 #~ "I<oldpath> if it is a symbolic link.  However, Linux does not do this.  "
17841 #~ "(By default Solaris is the same, but the POSIX.1-2001 specified behavior "
17842 #~ "can be obtained with suitable compiler options.)  The upcoming POSIX.1 "
17843 #~ "revision changes the specification to allow either behavior in an "
17844 #~ "implementation."
17845 #~ msgstr ""
17846 #~ "いくつかのシステムコールは、 シンボリックリンクを辿らず、 シンボリックリン"
17847 #~ "ク自身に対して操作を行う。 B<lchown>(2), B<lgetxattr>(2), B<llistxattr>"
17848 #~ "(2), B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), "
17849 #~ "B<rename>(2), B<rmdir>(2), B<unlink>(2) が該当する。 他のいくつかのシステ"
17850 #~ "ムコールは、 シンボリックリンクを辿る場合と辿らない場合がある。 該当するの"
17851 #~ "は B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), B<linkat>(2), B<open>"
17852 #~ "(2), B<openat>(2), B<utimensat>(2) である。 詳細はそれぞれのマニュアルペー"
17853 #~ "ジを参照。 ライブラリ関数 B<remove>(3) は B<unlink>(2) の別名なので、 この"
17854 #~ "関数もシンボリックリンクを辿らない。 B<rmdir>(2) をシンボリックリンクに対"
17855 #~ "して行った場合、 エラー B<ENOTDIR> で失敗する。 B<link>(2) は特別に議論が"
17856 #~ "必要である。 POSIX.1-2001 は、 B<link>(2) は I<oldpath> がシンボリックリン"
17857 #~ "クの場合にはこのリンクを展開すべきだと規定している。 しかし、 Linux はこれ"
17858 #~ "を行っていない。 (デフォルトでは Solaris も同じだが、 適切なコンパイルオプ"
17859 #~ "ションを指定することで POSIX.1-2001 で規定された動作にすることもできる。) "
17860 #~ "POSIX.1-2001 の次の版では、仕様が変更され、 どちらの動作の実装も認められる"
17861 #~ "ようになる。"
17862
17863 #~ msgid ""
17864 #~ "If the name was the last link to a file but any processes still have the "
17865 #~ "file open the file will remain in existence until the last file "
17866 #~ "descriptor referring to it is closed."
17867 #~ msgstr ""
17868 #~ "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが その"
17869 #~ "ファイルをまだオープンしている場合は、 そのファイルを参照している最後の"
17870 #~ "ファイルディスクリプタ (file descriptor)  がクローズ (close) されるまで"
17871 #~ "ファイルは存在し続ける。"
17872
17873 #~ msgid "If the name referred to a symbolic link the link is removed."
17874 #~ msgstr ""
17875 #~ "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンク"
17876 #~ "は削除される。"
17877
17878 #~ msgid ""
17879 #~ "If the name referred to a socket, fifo or device the name for it is "
17880 #~ "removed but processes which have the object open may continue to use it."
17881 #~ msgstr ""
17882 #~ "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば "
17883 #~ "名前は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い"
17884 #~ "続けることができる。"
17885
17886 #~ msgid ""
17887 #~ "The file is opened for synchronous I/O.  Any B<write>(2)s on the "
17888 #~ "resulting file descriptor will block the calling process until the data "
17889 #~ "has been physically written to the underlying hardware.  I<But see NOTES "
17890 #~ "below>."
17891 #~ msgstr ""
17892 #~ "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返"
17893 #~ "したファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプ"
17894 #~ "ロセスをブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 "
17895 #~ "I<以下の「注意」の章も参照。>"
17896
17897 #~ msgid ""
17898 #~ "Some of these optional flags can be altered using B<fcntl>(2)  after the "
17899 #~ "file has been opened."
17900 #~ msgstr ""
17901 #~ "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を"
17902 #~ "使用して変更することができる。"
17903
17904 #~ msgid ""
17905 #~ "Too many symbolic links were encountered in resolving I<pathname>, or "
17906 #~ "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
17907 #~ msgstr ""
17908 #~ "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
17909 #~ "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
17910
17911 #~ msgid ""
17912 #~ "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified "
17913 #~ "in POSIX.1-2008."
17914 #~ msgstr ""
17915 #~ "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 "
17916 #~ "で規定されている。"
17917
17918 #~ msgid ""
17919 #~ "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
17920 #~ "(before including I<any> header files)  to get its definition."
17921 #~ msgstr ""
17922 #~ "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
17923 #~ "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定"
17924 #~ "義しなければならない。"
17925
17926 #~ msgid ""
17927 #~ "POSIX provides for three different variants of synchronized I/O, "
17928 #~ "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  "
17929 #~ "Currently (2.6.31), Linux implements only B<O_SYNC>, but glibc maps "
17930 #~ "B<O_DSYNC> and B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most "
17931 #~ "Linux filesystems don't actually implement the POSIX B<O_SYNC> semantics, "
17932 #~ "which require all metadata updates of a write to be on disk on returning "
17933 #~ "to user space, but only the B<O_DSYNC> semantics, which require only "
17934 #~ "actual file data and metadata necessary to retrieve it to be on disk by "
17935 #~ "the time the system call returns."
17936 #~ msgstr ""
17937 #~ "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
17938 #~ "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル "
17939 #~ "2.6.31)、 Linux では B<O_SYNC> だけが実装されているが、 glibc は "
17940 #~ "B<O_DSYNC> と B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとん"
17941 #~ "どの Linux のファイルシステムは、実際には POSIX の B<O_SYNC> の動作ではな"
17942 #~ "く B<O_DSYNC> の動作だけを実装している。 POSIX の B<O_SYNC> では、 B<open>"
17943 #~ "()  がユーザ空間に返る際に、書き込みに関する全てのメタデータの 更新がディ"
17944 #~ "スクに書き込まれている必要がある。 一方、 B<O_DSYNC> では、 B<open>()  が"
17945 #~ "返るまでに、実際のファイルのデータとそのデータを取得するために 必要なメタ"
17946 #~ "データだけがディスクに書き込まれていればよい。"