OSDN Git Service

b2bc195de7cf278ed805c07ad9001390e59b6552
[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: 2013-08-15 19:32+0900\n"
10 "PO-Revision-Date: 2013-07-27 11:41+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/ferror.3:44 build/C/man3/fmtmsg.3:13
27 #: build/C/man3/stdio_ext.3:25 build/C/man3/tmpnam.3:27
28 #, no-wrap
29 msgid "2013-06-21"
30 msgstr "2013-06-21"
31
32 #. type: TH
33 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
34 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
35 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
36 #: build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44
37 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
38 #: build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25
39 #: build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26
40 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:52 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/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:27
55 #: build/C/man3/getw.3:25 build/C/man2/link.2:31 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/man3/perror.3:31 build/C/man2/pipe.2:36 build/C/man3/popen.3:40
58 #: build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man2/read.2:35
59 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man3/remove.3:31
60 #: build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52
61 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man3/stdio.3:39
62 #: build/C/man3/stdio_ext.3:25 build/C/man2/symlink.2:32
63 #: build/C/man7/symlink.7:36 build/C/man3/tempnam.3:25
64 #: build/C/man3/tmpfile.3:31 build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:32
65 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
66 #: build/C/man2/write.2:39
67 #, no-wrap
68 msgid "Linux Programmer's Manual"
69 msgstr "Linux Programmer's Manual"
70
71 #. type: SH
72 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
73 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
74 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
75 #: build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19
76 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
77 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
78 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
79 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
80 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28
81 #: build/C/man3/getw.3:26 build/C/man2/link.2:32 build/C/man2/llseek.2:29
82 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:52
83 #: build/C/man3/perror.3:32 build/C/man2/pipe.2:37 build/C/man3/popen.3:41
84 #: build/C/man3/printf.3:35 build/C/man3/puts.3:27 build/C/man2/read.2:36
85 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:32
86 #: build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53
87 #: build/C/man3/setbuf.3:49 build/C/man3/stdin.3:14 build/C/man3/stdio.3:40
88 #: build/C/man3/stdio_ext.3:26 build/C/man2/symlink.2:33
89 #: build/C/man7/symlink.7:37 build/C/man3/tempnam.3:26
90 #: build/C/man3/tmpfile.3:32 build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:33
91 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
92 #: build/C/man2/write.2:40
93 #, no-wrap
94 msgid "NAME"
95 msgstr "名前"
96
97 #. type: Plain text
98 #: build/C/man3/asprintf.3:30
99 msgid "asprintf, vasprintf - print to allocated string"
100 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
101
102 #. type: SH
103 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
104 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
105 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
106 #: build/C/man3/fflush.3:48 build/C/man3/fgetwc.3:21
107 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
108 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
109 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
110 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
111 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:30
112 #: build/C/man3/getw.3:28 build/C/man2/link.2:34 build/C/man2/llseek.2:31
113 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:54
114 #: build/C/man3/perror.3:34 build/C/man2/pipe.2:39 build/C/man3/popen.3:43
115 #: build/C/man3/printf.3:38 build/C/man3/puts.3:29 build/C/man2/read.2:38
116 #: build/C/man2/readlink.2:46 build/C/man2/readv.2:35 build/C/man3/remove.3:34
117 #: build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55
118 #: build/C/man3/setbuf.3:51 build/C/man3/stdin.3:16 build/C/man3/stdio.3:42
119 #: build/C/man3/stdio_ext.3:30 build/C/man2/symlink.2:35
120 #: build/C/man3/tempnam.3:28 build/C/man3/tmpfile.3:34
121 #: build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:35
122 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
123 #: build/C/man2/write.2:42
124 #, no-wrap
125 msgid "SYNOPSIS"
126 msgstr "書式"
127
128 #. type: Plain text
129 #: build/C/man3/asprintf.3:32
130 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
131 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
132
133 #. type: Plain text
134 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
135 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
136 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
137 #: build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:44
138 #: build/C/man3/stdio_ext.3:32
139 msgid "B<#include E<lt>stdio.hE<gt>>"
140 msgstr "B<#include E<lt>stdio.hE<gt>>"
141
142 #. type: Plain text
143 #: build/C/man3/asprintf.3:36
144 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
145 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
146
147 #. type: Plain text
148 #: build/C/man3/asprintf.3:38
149 msgid ""
150 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
151 msgstr ""
152 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
153
154 #. type: SH
155 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
156 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
157 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
158 #: build/C/man3/fflush.3:52 build/C/man3/fgetwc.3:30
159 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
160 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
161 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
162 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
163 #: build/C/man3/fseeko.3:37 build/C/man3/getline.3:58 build/C/man3/gets.3:46
164 #: build/C/man3/getw.3:59 build/C/man2/link.2:38 build/C/man2/llseek.2:43
165 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:65
166 #: build/C/man3/perror.3:55 build/C/man2/pipe.2:51 build/C/man3/popen.3:64
167 #: build/C/man3/printf.3:76 build/C/man3/puts.3:43 build/C/man2/read.2:44
168 #: build/C/man2/readlink.2:63 build/C/man2/readv.2:58 build/C/man3/remove.3:38
169 #: build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87
170 #: build/C/man3/setbuf.3:73 build/C/man3/stdin.3:24 build/C/man3/stdio.3:50
171 #: build/C/man3/stdio_ext.3:54 build/C/man2/symlink.2:52
172 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
173 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:39
174 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:60
175 #: build/C/man2/write.2:46
176 #, no-wrap
177 msgid "DESCRIPTION"
178 msgstr "説明"
179
180 #. type: Plain text
181 #: build/C/man3/asprintf.3:53
182 msgid ""
183 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
184 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
185 "hold the output including the terminating null byte (\\(aq\\e0\\(aq), and "
186 "return a pointer to it via the first argument.  This pointer should be "
187 "passed to B<free>(3)  to release the allocated storage when it is no longer "
188 "needed."
189 msgstr ""
190 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
191 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端の NULL バイト "
192 "(\\(aq\\e0\\(aq) も含めて)  保持するのに十分な大きさのメモリを確保し、 最初の"
193 "引数にその文字列へのポインタを返す。 このポインタは、不要になったら B<free>"
194 "(3)  に渡し、割り当てられた記憶領域を解放すべきである。"
195
196 #. type: SH
197 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
198 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
199 #: build/C/man3/fflush.3:74 build/C/man3/fgetwc.3:55
200 #: build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:176
201 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
202 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
203 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
204 #: build/C/man3/fseeko.3:75 build/C/man3/getline.3:110 build/C/man3/gets.3:111
205 #: build/C/man3/getw.3:73 build/C/man2/link.2:52 build/C/man2/llseek.2:62
206 #: build/C/man2/lseek.2:162 build/C/man2/open.2:567 build/C/man2/pipe.2:92
207 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
208 #: build/C/man2/readlink.2:77 build/C/man2/readv.2:177
209 #: build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40
210 #: build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152
211 #: build/C/man2/symlink.2:84 build/C/man3/tempnam.3:87
212 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:70 build/C/man2/unlink.2:55
213 #: build/C/man3/wprintf.3:205 build/C/man2/write.2:89
214 #, no-wrap
215 msgid "RETURN VALUE"
216 msgstr "返り値"
217
218 #. type: Plain text
219 #: build/C/man3/asprintf.3:61
220 msgid ""
221 "When successful, these functions return the number of bytes printed, just "
222 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
223 "error occurs, these functions will return -1, and the contents of I<strp> is "
224 "undefined."
225 msgstr ""
226 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
227 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
228 "は -1 を返し、 I<strp> の内容は未定義となる。"
229
230 #. type: SH
231 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67
232 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
233 #: build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115
234 #: build/C/man3/fflush.3:98 build/C/man3/fgetwc.3:70
235 #: build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:195
236 #: build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246
237 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
238 #: build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:168
239 #: build/C/man3/fseeko.3:87 build/C/man3/getline.3:137 build/C/man3/gets.3:138
240 #: build/C/man3/getw.3:80 build/C/man2/link.2:138 build/C/man2/llseek.2:81
241 #: build/C/man2/lseek.2:200 build/C/man2/open.2:719 build/C/man3/perror.3:111
242 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:172 build/C/man3/printf.3:806
243 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:125
244 #: build/C/man2/readv.2:214 build/C/man3/remove.3:70 build/C/man2/rename.2:232
245 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:164
246 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
247 #: build/C/man2/symlink.2:149 build/C/man3/tempnam.3:98
248 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:87
249 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:113
250 #: build/C/man3/wprintf.3:213 build/C/man2/write.2:185
251 #, no-wrap
252 msgid "CONFORMING TO"
253 msgstr "準拠"
254
255 #. type: Plain text
256 #: build/C/man3/asprintf.3:67
257 msgid ""
258 "These functions are GNU extensions, not in C or POSIX.  They are also "
259 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
260 "error."
261 msgstr ""
262 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
263 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
264 "る。"
265
266 #. type: SH
267 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77
268 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
269 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:122
270 #: build/C/man3/fflush.3:113 build/C/man3/fgetwc.3:87
271 #: build/C/man3/flockfile.3:143 build/C/man3/fmemopen.3:341
272 #: build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348
273 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
274 #: build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:170
275 #: build/C/man3/fseeko.3:93 build/C/man3/getline.3:171 build/C/man3/gets.3:173
276 #: build/C/man3/getw.3:86 build/C/man2/link.2:187 build/C/man2/llseek.2:87
277 #: build/C/man2/lseek.2:245 build/C/man3/lseek64.3:159 build/C/man2/open.2:992
278 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:201
279 #: build/C/man3/printf.3:1080 build/C/man3/puts.3:112 build/C/man2/read.2:187
280 #: build/C/man2/readlink.2:214 build/C/man2/readv.2:284
281 #: build/C/man3/remove.3:81 build/C/man2/rename.2:245 build/C/man2/rmdir.2:132
282 #: build/C/man3/scanf.3:715 build/C/man3/setbuf.3:200 build/C/man3/stdin.3:154
283 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151
284 #: build/C/man2/symlink.2:164 build/C/man7/symlink.7:471
285 #: build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97
286 #: build/C/man3/tmpnam.3:163 build/C/man2/unlink.2:148
287 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:253
288 #: build/C/man2/write.2:211
289 #, no-wrap
290 msgid "SEE ALSO"
291 msgstr "関連項目"
292
293 #. type: Plain text
294 #: build/C/man3/asprintf.3:71
295 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
296 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
297
298 #. type: SH
299 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79
300 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
301 #: build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:127
302 #: build/C/man3/fflush.3:121 build/C/man3/fgetwc.3:92
303 #: build/C/man3/flockfile.3:145 build/C/man3/fmemopen.3:344
304 #: build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354
305 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
306 #: build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:173
307 #: build/C/man3/fseeko.3:95 build/C/man3/getline.3:178 build/C/man3/gets.3:189
308 #: build/C/man3/getw.3:92 build/C/man2/link.2:197 build/C/man2/llseek.2:90
309 #: build/C/man2/lseek.2:252 build/C/man3/lseek64.3:162
310 #: build/C/man2/open.2:1014 build/C/man3/perror.3:144 build/C/man2/pipe.2:197
311 #: build/C/man3/popen.3:211 build/C/man3/printf.3:1089 build/C/man3/puts.3:124
312 #: build/C/man2/read.2:200 build/C/man2/readlink.2:222
313 #: build/C/man2/readv.2:288 build/C/man3/remove.3:92 build/C/man2/rename.2:254
314 #: build/C/man2/rmdir.2:141 build/C/man3/scanf.3:722 build/C/man3/setbuf.3:208
315 #: build/C/man3/stdin.3:160 build/C/man3/stdio.3:257
316 #: build/C/man3/stdio_ext.3:154 build/C/man2/symlink.2:176
317 #: build/C/man7/symlink.7:489 build/C/man3/tempnam.3:173
318 #: build/C/man3/tmpfile.3:103 build/C/man3/tmpnam.3:168
319 #: build/C/man2/unlink.2:161 build/C/man3/unlocked_stdio.3:139
320 #: build/C/man3/wprintf.3:260 build/C/man2/write.2:223
321 #, no-wrap
322 msgid "COLOPHON"
323 msgstr "この文書について"
324
325 #. type: Plain text
326 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:86
327 #: build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115
328 #: build/C/man3/fcloseall.3:75 build/C/man3/ferror.3:134
329 #: build/C/man3/fflush.3:128 build/C/man3/fgetwc.3:99
330 #: build/C/man3/flockfile.3:152 build/C/man3/fmemopen.3:351
331 #: build/C/man3/fmtmsg.3:319 build/C/man3/fopen.3:361
332 #: build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92
333 #: build/C/man3/fputwc.3:96 build/C/man3/fread.3:118 build/C/man3/fseek.3:180
334 #: build/C/man3/fseeko.3:102 build/C/man3/getline.3:185
335 #: build/C/man3/gets.3:196 build/C/man3/getw.3:99 build/C/man2/link.2:204
336 #: build/C/man2/llseek.2:97 build/C/man2/lseek.2:259
337 #: build/C/man3/lseek64.3:169 build/C/man2/open.2:1021
338 #: build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:218
339 #: build/C/man3/printf.3:1096 build/C/man3/puts.3:131 build/C/man2/read.2:207
340 #: build/C/man2/readlink.2:229 build/C/man2/readv.2:295
341 #: build/C/man3/remove.3:99 build/C/man2/rename.2:261 build/C/man2/rmdir.2:148
342 #: build/C/man3/scanf.3:729 build/C/man3/setbuf.3:215 build/C/man3/stdin.3:167
343 #: build/C/man3/stdio.3:264 build/C/man3/stdio_ext.3:161
344 #: build/C/man2/symlink.2:183 build/C/man7/symlink.7:496
345 #: build/C/man3/tempnam.3:180 build/C/man3/tmpfile.3:110
346 #: build/C/man3/tmpnam.3:175 build/C/man2/unlink.2:168
347 #: build/C/man3/unlocked_stdio.3:146 build/C/man3/wprintf.3:267
348 #: build/C/man2/write.2:230
349 #, fuzzy
350 #| msgid ""
351 #| "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
352 #| "description of the project, and information about reporting bugs, can be "
353 #| "found at \\%http://www.kernel.org/doc/man-pages/."
354 msgid ""
355 "This page is part of release 3.53 of the Linux I<man-pages> project.  A "
356 "description of the project, and information about reporting bugs, can be "
357 "found at \\%http://www.kernel.org/doc/man-pages/."
358 msgstr ""
359 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.52 の一部\n"
360 "である。プロジェクトの説明とバグ報告に関する情報は\n"
361 "http://www.kernel.org/doc/man-pages/ に書かれている。"
362
363 #. type: TH
364 #: build/C/man3/ctermid.3:26
365 #, no-wrap
366 msgid "CTERMID"
367 msgstr "CTERMID"
368
369 #. type: TH
370 #: build/C/man3/ctermid.3:26
371 #, no-wrap
372 msgid "2013-07-04"
373 msgstr "2013-07-04"
374
375 #. type: Plain text
376 #: build/C/man3/ctermid.3:29
377 msgid "ctermid - get controlling terminal name"
378 msgstr "ctermid - 制御端末名の取得"
379
380 #. type: Plain text
381 #: build/C/man3/ctermid.3:34 build/C/man3/fgetwc.3:24
382 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
383 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
384 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:33
385 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
386 #: build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54 build/C/man3/stdin.3:19
387 #: build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
388 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
389 #, no-wrap
390 msgid "B<#include E<lt>stdio.hE<gt>>\n"
391 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
392
393 #. type: Plain text
394 #: build/C/man3/ctermid.3:36
395 #, no-wrap
396 msgid "B<char *ctermid(char *>I<s>B<);>\n"
397 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
398
399 #. type: Plain text
400 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
401 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
402 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61
403 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man3/perror.3:50
404 #: build/C/man3/popen.3:55 build/C/man3/printf.3:63 build/C/man2/readlink.2:54
405 #: build/C/man2/readv.2:53 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
406 #: build/C/man2/symlink.2:43 build/C/man3/tempnam.3:38
407 #: build/C/man3/unlocked_stdio.3:68 build/C/man3/wprintf.3:39
408 msgid ""
409 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
410 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
411
412 #.  From <unistd.h>: _XOPEN_SOURCE
413 #. type: Plain text
414 #: build/C/man3/ctermid.3:46
415 msgid ""
416 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
417 msgstr ""
418 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
419
420 #. type: Plain text
421 #: build/C/man3/ctermid.3:59
422 msgid ""
423 "B<ctermid>()  returns a string which is the pathname for the current "
424 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
425 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
426 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
427 "the returned pathname."
428 msgstr ""
429 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
430 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
431 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
432 "ス名の最大文字数である。"
433
434 #. type: Plain text
435 #: build/C/man3/ctermid.3:61
436 msgid "The pointer to the pathname."
437 msgstr "パス名へのポインタ。"
438
439 #. type: SH
440 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55
441 #: build/C/man3/ferror.3:106 build/C/man3/fflush.3:93
442 #: build/C/man3/flockfile.3:127 build/C/man3/fmtmsg.3:225
443 #: build/C/man3/stdio_ext.3:132 build/C/man3/tmpnam.3:77
444 #, no-wrap
445 msgid "ATTRIBUTES"
446 msgstr "属性"
447
448 #. type: SS
449 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
450 #: build/C/man3/ferror.3:107 build/C/man3/fflush.3:94
451 #: build/C/man3/flockfile.3:128 build/C/man3/fmtmsg.3:226
452 #: build/C/man3/stdio_ext.3:133 build/C/man3/tmpnam.3:78
453 #, no-wrap
454 msgid "Multithreading (see pthreads(7))"
455 msgstr "マルチスレッディング (pthreads(7) 参照)"
456
457 #. type: Plain text
458 #: build/C/man3/ctermid.3:67
459 msgid ""
460 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
461 "safe if called with a NULL parameter."
462 msgstr ""
463 "B<ctermid>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
464 "れた場合はスレッドセーフではない。"
465
466 #. type: Plain text
467 #: build/C/man3/ctermid.3:69
468 msgid "Svr4, POSIX.1-2001."
469 msgstr "SVr4, POSIX.1-2001."
470
471 #. type: SH
472 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213
473 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82
474 #: build/C/man2/link.2:181 build/C/man2/open.2:981 build/C/man3/popen.3:178
475 #: build/C/man3/printf.3:929 build/C/man3/puts.3:105 build/C/man2/readv.2:258
476 #: build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129
477 #: build/C/man3/scanf.3:646 build/C/man3/setbuf.3:170
478 #: build/C/man3/tempnam.3:158 build/C/man3/tmpnam.3:156
479 #: build/C/man2/unlink.2:145
480 #, no-wrap
481 msgid "BUGS"
482 msgstr "バグ"
483
484 #. type: Plain text
485 #: build/C/man3/ctermid.3:73
486 msgid ""
487 "The path returned may not uniquely identify the controlling terminal; it "
488 "may, for example, be I</dev/tty>."
489 msgstr ""
490 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
491 "ように。"
492
493 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
494 #.  if ctermid() was given an argument; fixed in 2.4.
495 #. type: Plain text
496 #: build/C/man3/ctermid.3:77
497 msgid "It is not assured that the program can open the terminal."
498 msgstr "プログラムが端末をオープンできることは保証されていない。"
499
500 #. type: Plain text
501 #: build/C/man3/ctermid.3:79
502 msgid "B<ttyname>(3)"
503 msgstr "B<ttyname>(3)"
504
505 #. type: TH
506 #: build/C/man3/dprintf.3:26
507 #, no-wrap
508 msgid "DPRINTF"
509 msgstr "DPRINTF"
510
511 #. type: TH
512 #: build/C/man3/dprintf.3:26
513 #, no-wrap
514 msgid "2010-09-15"
515 msgstr "2010-09-15"
516
517 #. type: Plain text
518 #: build/C/man3/dprintf.3:29
519 msgid "dprintf, vdprintf - print to a file descriptor"
520 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
521
522 #. type: Plain text
523 #: build/C/man3/dprintf.3:33
524 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
525 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
526
527 #. type: Plain text
528 #: build/C/man3/dprintf.3:35
529 msgid ""
530 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
531 msgstr ""
532 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
533
534 #. type: Plain text
535 #: build/C/man3/dprintf.3:43
536 msgid "B<dprintf>(), B<vdprintf>():"
537 msgstr "B<dprintf>(), B<vdprintf>():"
538
539 #. type: TP
540 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
541 #: build/C/man3/getline.3:49
542 #, no-wrap
543 msgid "Since glibc 2.10:"
544 msgstr "glibc 2.10 以降:"
545
546 #. type: Plain text
547 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
548 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
549 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
550
551 #. type: TP
552 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
553 #: build/C/man3/getline.3:52
554 #, no-wrap
555 msgid "Before glibc 2.10:"
556 msgstr "glibc 2.10 より前:"
557
558 #. type: Plain text
559 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
560 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
561 msgid "_GNU_SOURCE"
562 msgstr "_GNU_SOURCE"
563
564 #. type: Plain text
565 #: build/C/man3/dprintf.3:69
566 msgid ""
567 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
568 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
569 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
570 msgstr ""
571 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
572 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
573 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
574 "行う。"
575
576 #.  .SH NOTES
577 #.  These functions are GNU extensions, not in C or POSIX.
578 #.  Clearly, the names were badly chosen.
579 #.  Many systems (like MacOS) have incompatible functions called
580 #.  .BR dprintf (),
581 #.  usually some debugging version of
582 #.  .BR printf (3),
583 #.  perhaps with a prototype like
584 #.  .BI "void dprintf(int level, const char *" format ", ...);"
585 #.  where the first argument is a debugging level (and output is to
586 #.  .IR stderr ).
587 #.  Moreover,
588 #.  .BR dprintf ()
589 #.  (or
590 #.  .BR DPRINTF )
591 #.  is also a popular macro name for a debugging printf.
592 #.  So, probably, it is better to avoid this function in programs
593 #.  intended to be portable.
594 #.  A better name would have been
595 #.  .BR fdprintf ().
596 #. type: Plain text
597 #: build/C/man3/dprintf.3:95
598 msgid ""
599 "These functions are GNU extensions that are nowadays specified in "
600 "POSIX.1-2008."
601 msgstr ""
602 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
603 "る。"
604
605 #. type: Plain text
606 #: build/C/man3/dprintf.3:97
607 msgid "B<printf>(3)"
608 msgstr "B<printf>(3)"
609
610 #. type: TH
611 #: build/C/man3/fclose.3:44
612 #, no-wrap
613 msgid "FCLOSE"
614 msgstr "FCLOSE"
615
616 #. type: TH
617 #: build/C/man3/fclose.3:44
618 #, no-wrap
619 msgid "2009-02-23"
620 msgstr "2009-02-23"
621
622 #. type: Plain text
623 #: build/C/man3/fclose.3:47
624 msgid "fclose - close a stream"
625 msgstr "fclose - ストリームを閉じる"
626
627 #. type: Plain text
628 #: build/C/man3/fclose.3:51
629 msgid "B<int fclose(FILE *>I<fp>B<);>"
630 msgstr "B<int fclose(FILE *>I<fp>B<);>"
631
632 #. type: Plain text
633 #: build/C/man3/fclose.3:59
634 msgid ""
635 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
636 "any buffered output data using B<fflush>(3))  and closes the underlying file "
637 "descriptor."
638 msgstr ""
639 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
640 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
641 "対応するファイルディスクリプタをクローズする。"
642
643 #. type: Plain text
644 #: build/C/man3/fclose.3:70
645 msgid ""
646 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
647 "I<errno> is set to indicate the error.  In either case any further access "
648 "(including another call to B<fclose>())  to the stream results in undefined "
649 "behavior."
650 msgstr ""
651 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
652 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
653 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
654 "は 未定義の動作を生じさせる。"
655
656 #. type: SH
657 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
658 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
659 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
660 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:84
661 #: build/C/man3/getline.3:125 build/C/man2/link.2:57 build/C/man2/llseek.2:69
662 #: build/C/man2/lseek.2:170 build/C/man2/open.2:575 build/C/man2/pipe.2:97
663 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:85
664 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96
665 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:89
666 #: build/C/man3/tempnam.3:94 build/C/man3/tmpfile.3:56
667 #: build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
668 #, no-wrap
669 msgid "ERRORS"
670 msgstr "エラー"
671
672 #. type: TP
673 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
674 #: build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:171
675 #: build/C/man2/read.2:114 build/C/man3/scanf.3:553 build/C/man2/write.2:126
676 #, no-wrap
677 msgid "B<EBADF>"
678 msgstr "B<EBADF>"
679
680 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
681 #.   low-level file operations on the same stream. If you do get this error,
682 #.   you must have closed the stream's low-level file descriptor using
683 #.   something like close(fileno(fp)).
684 #. type: Plain text
685 #: build/C/man3/fclose.3:80
686 msgid "The file descriptor underlying I<fp> is not valid."
687 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
688
689 #. type: Plain text
690 #: build/C/man3/fclose.3:90
691 msgid ""
692 "The B<fclose>()  function may also fail and set I<errno> for any of the "
693 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
694 msgstr ""
695 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
696 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
697 "された値に設定される。"
698
699 #. type: Plain text
700 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
701 msgid "C89, C99."
702 msgstr "C89, C99."
703
704 #. type: SH
705 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
706 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
707 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
708 #: build/C/man3/fseeko.3:89 build/C/man2/link.2:143 build/C/man2/llseek.2:84
709 #: build/C/man2/lseek.2:210 build/C/man2/open.2:746 build/C/man3/perror.3:124
710 #: build/C/man3/printf.3:867 build/C/man2/read.2:175
711 #: build/C/man2/readlink.2:130 build/C/man2/readv.2:226
712 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
713 #: build/C/man2/symlink.2:155 build/C/man3/tempnam.3:103
714 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:92
715 #: build/C/man3/wprintf.3:215 build/C/man2/write.2:194
716 #, no-wrap
717 msgid "NOTES"
718 msgstr "注意"
719
720 #. type: Plain text
721 #: build/C/man3/fclose.3:102
722 msgid ""
723 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
724 "library.  To ensure that the data is physically stored on disk the kernel "
725 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
726 msgstr ""
727 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
728 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
729 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
730 "ればならない。"
731
732 #. type: Plain text
733 #: build/C/man3/fclose.3:108
734 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
735 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
736
737 #. type: TH
738 #: build/C/man3/fcloseall.3:25
739 #, no-wrap
740 msgid "FCLOSEALL"
741 msgstr "FCLOSEALL"
742
743 #. type: Plain text
744 #: build/C/man3/fcloseall.3:28
745 msgid "fcloseall - close all open streams"
746 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
747
748 #. type: Plain text
749 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
750 #, no-wrap
751 msgid ""
752 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
753 "B<#include E<lt>stdio.hE<gt>>\n"
754 msgstr ""
755 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
756 "B<#include E<lt>stdio.hE<gt>>\n"
757
758 #. type: Plain text
759 #: build/C/man3/fcloseall.3:34
760 #, no-wrap
761 msgid "B<int fcloseall(void);>\n"
762 msgstr "B<int fcloseall(void);>\n"
763
764 #. type: Plain text
765 #: build/C/man3/fcloseall.3:43
766 msgid ""
767 "The B<fcloseall>()  function closes all of the calling process's open "
768 "streams.  Buffered output for each stream is written before it is closed (as "
769 "for B<fflush>(3)); buffered input is discarded."
770 msgstr ""
771 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
772 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
773 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
774 "れる。"
775
776 #. type: Plain text
777 #: build/C/man3/fcloseall.3:50
778 msgid ""
779 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
780 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
781
782 #. type: Plain text
783 #: build/C/man3/fcloseall.3:55
784 msgid ""
785 "This function returns 0 if all files were successfully closed; on error, "
786 "B<EOF> is returned."
787 msgstr ""
788 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
789 "B<EOF> を返す。"
790
791 #. type: Plain text
792 #: build/C/man3/fcloseall.3:60
793 msgid ""
794 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
795 "safe."
796 msgstr ""
797 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
798 "はない。"
799
800 #. type: Plain text
801 #: build/C/man3/fcloseall.3:62
802 msgid "This function is a GNU extension."
803 msgstr "この関数は GNU 拡張である。"
804
805 #. type: Plain text
806 #: build/C/man3/fcloseall.3:68
807 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
808 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
809
810 #. type: TH
811 #: build/C/man3/ferror.3:44
812 #, no-wrap
813 msgid "FERROR"
814 msgstr "FERROR"
815
816 #. type: Plain text
817 #: build/C/man3/ferror.3:47
818 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
819 msgstr ""
820 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
821
822 #. type: Plain text
823 #: build/C/man3/ferror.3:51
824 msgid "B<void clearerr(FILE *>I<stream>B<);>"
825 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
826
827 #. type: Plain text
828 #: build/C/man3/ferror.3:53
829 msgid "B<int feof(FILE *>I<stream>B<);>"
830 msgstr "B<int feof(FILE *>I<stream>B<);>"
831
832 #. type: Plain text
833 #: build/C/man3/ferror.3:55
834 msgid "B<int ferror(FILE *>I<stream>B<);>"
835 msgstr "B<int ferror(FILE *>I<stream>B<);>"
836
837 #. type: Plain text
838 #: build/C/man3/ferror.3:57
839 msgid "B<int fileno(FILE *>I<stream>B<);>"
840 msgstr "B<int fileno(FILE *>I<stream>B<);>"
841
842 #. type: Plain text
843 #: build/C/man3/ferror.3:65
844 msgid ""
845 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
846 msgstr ""
847 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
848
849 #. type: Plain text
850 #: build/C/man3/ferror.3:70
851 msgid ""
852 "The function B<clearerr>()  clears the end-of-file and error indicators for "
853 "the stream pointed to by I<stream>."
854 msgstr ""
855 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
856 "子とエラー指示子をクリアする。"
857
858 #. type: Plain text
859 #: build/C/man3/ferror.3:78
860 msgid ""
861 "The function B<feof>()  tests the end-of-file indicator for the stream "
862 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
863 "indicator can be cleared only by the function B<clearerr>()."
864 msgstr ""
865 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
866 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
867 "よってのみクリアすることができる。"
868
869 #. type: Plain text
870 #: build/C/man3/ferror.3:87
871 msgid ""
872 "The function B<ferror>()  tests the error indicator for the stream pointed "
873 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
874 "reset only by the B<clearerr>()  function."
875 msgstr ""
876 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
877 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
878 "()  によってのみリセットすることができる。"
879
880 #. type: Plain text
881 #: build/C/man3/ferror.3:93
882 msgid ""
883 "The function B<fileno>()  examines the argument I<stream> and returns its "
884 "integer descriptor."
885 msgstr ""
886 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
887
888 #. type: Plain text
889 #: build/C/man3/ferror.3:96 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54
890 #: build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
891 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
892 msgstr ""
893 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
894
895 #. type: Plain text
896 #: build/C/man3/ferror.3:106
897 msgid ""
898 "These functions should not fail and do not set the external variable "
899 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
900 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
901 msgstr ""
902 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
903 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
904 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
905
906 #. type: Plain text
907 #: build/C/man3/ferror.3:115
908 msgid ""
909 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
910 "thread-safe."
911 msgstr ""
912 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
913 "る。"
914
915 #. type: Plain text
916 #: build/C/man3/ferror.3:122
917 msgid ""
918 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
919 "C99."
920 msgstr ""
921 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
922
923 #. type: Plain text
924 #: build/C/man3/ferror.3:127
925 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
926 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
927
928 #. type: TH
929 #: build/C/man3/fflush.3:45
930 #, no-wrap
931 msgid "FFLUSH"
932 msgstr "FFLUSH"
933
934 #. type: TH
935 #: build/C/man3/fflush.3:45
936 #, fuzzy, no-wrap
937 #| msgid "2013-07-04"
938 msgid "2013-07-15"
939 msgstr "2013-07-04"
940
941 #. type: Plain text
942 #: build/C/man3/fflush.3:48
943 msgid "fflush - flush a stream"
944 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
945
946 #. type: Plain text
947 #: build/C/man3/fflush.3:52
948 msgid "B<int fflush(FILE *>I<stream>B<);>"
949 msgstr "B<int fflush(FILE *>I<stream>B<);>"
950
951 #. type: Plain text
952 #: build/C/man3/fflush.3:63
953 msgid ""
954 "For output streams, B<fflush>()  forces a write of all user-space buffered "
955 "data for the given output or update I<stream> via the stream's underlying "
956 "write function.  For input streams, B<fflush>()  discards any buffered data "
957 "that has been fetched from the underlying file, but has not been consumed by "
958 "the application.  The open status of the stream is unaffected."
959 msgstr ""
960 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
961 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
962 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
963 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
964 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
965 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
966 "い。"
967
968 #. type: Plain text
969 #: build/C/man3/fflush.3:71
970 msgid ""
971 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
972 "streams."
973 msgstr ""
974 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
975 "トリームをフラッシュする。"
976
977 #. type: Plain text
978 #: build/C/man3/fflush.3:74
979 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
980 msgstr ""
981 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
982 "と。"
983
984 #. type: Plain text
985 #: build/C/man3/fflush.3:81
986 msgid ""
987 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
988 "I<errno> is set to indicate the error."
989 msgstr ""
990 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
991 "ラーに対応した値に設定される。"
992
993 #. type: Plain text
994 #: build/C/man3/fflush.3:86
995 msgid "I<Stream> is not an open stream, or is not open for writing."
996 msgstr ""
997 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
998 "ない。"
999
1000 #. type: Plain text
1001 #: build/C/man3/fflush.3:93
1002 msgid ""
1003 "The function B<fflush>()  may also fail and set I<errno> for any of the "
1004 "errors specified for B<write>(2)."
1005 msgstr ""
1006 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1007 "ある。 この場合 I<errno> もその値に設定される。"
1008
1009 #. type: Plain text
1010 #: build/C/man3/fflush.3:98
1011 #, fuzzy
1012 #| msgid "The B<tmpnam_r>()  function is thread-safe."
1013 msgid "The B<fflush>()  function is thread-safe."
1014 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
1015
1016 #. type: Plain text
1017 #: build/C/man3/fflush.3:100
1018 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1019 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1020
1021 #.  Verified on: Solaris 8.
1022 #. type: Plain text
1023 #: build/C/man3/fflush.3:104
1024 msgid ""
1025 "The standards do not specify the behavior for input streams.  Most other "
1026 "implementations behave the same as Linux."
1027 msgstr ""
1028 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1029 "は Linux と同じ動作をする。"
1030
1031 #. type: Plain text
1032 #: build/C/man3/fflush.3:113
1033 msgid ""
1034 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1035 "library.  To ensure that the data is physically stored on disk the kernel "
1036 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1037 msgstr ""
1038 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1039 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1040 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1041 "B<fsync>(2)  を用いる。"
1042
1043 #. type: Plain text
1044 #: build/C/man3/fflush.3:121
1045 msgid ""
1046 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1047 "(3), B<unlocked_stdio>(3)"
1048 msgstr ""
1049 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1050 "(3), B<unlocked_stdio>(3)"
1051
1052 #. type: TH
1053 #: build/C/man3/fgetwc.3:18
1054 #, no-wrap
1055 msgid "FGETWC"
1056 msgstr "FGETWC"
1057
1058 #. type: TH
1059 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/getline.3:26
1060 #: build/C/man3/popen.3:40 build/C/man3/tempnam.3:25
1061 #, no-wrap
1062 msgid "2013-04-19"
1063 msgstr "2013-04-19"
1064
1065 #. type: Plain text
1066 #: build/C/man3/fgetwc.3:21
1067 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1068 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1069
1070 #. type: Plain text
1071 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1072 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1073 #, no-wrap
1074 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1075 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1076
1077 #. type: Plain text
1078 #: build/C/man3/fgetwc.3:29
1079 #, no-wrap
1080 msgid ""
1081 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1082 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1083 msgstr ""
1084 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1085 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1086
1087 #. type: Plain text
1088 #: build/C/man3/fgetwc.3:44
1089 msgid ""
1090 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1091 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1092 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1093 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1094 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1095 msgstr ""
1096 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1097 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1098 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1099 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1100 "し、 B<WEOF> を返す。"
1101
1102 #. type: Plain text
1103 #: build/C/man3/fgetwc.3:52
1104 msgid ""
1105 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1106 "may be implemented as a macro, and may evaluate its argument more than "
1107 "once.  There is no reason ever to use it."
1108 msgstr ""
1109 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1110 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1111 "ない。この関数を使う理由はもはや存在しない。"
1112
1113 #. type: Plain text
1114 #: build/C/man3/fgetwc.3:64
1115 msgid ""
1116 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1117 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1118 msgstr ""
1119 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1120 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1121
1122 #. type: Plain text
1123 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1124 msgid "Apart from the usual ones, there is"
1125 msgstr "通常のエラーに加えて、以下のエラーがある:"
1126
1127 #. type: TP
1128 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1129 #, no-wrap
1130 msgid "B<EILSEQ>"
1131 msgstr "B<EILSEQ>"
1132
1133 #. type: Plain text
1134 #: build/C/man3/fgetwc.3:70
1135 msgid ""
1136 "The data obtained from the input stream does not form a valid character."
1137 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1138
1139 #. type: Plain text
1140 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1141 msgid "C99, POSIX.1-2001."
1142 msgstr "C99, POSIX.1-2001."
1143
1144 #. type: Plain text
1145 #: build/C/man3/fgetwc.3:79
1146 msgid ""
1147 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1148 "current locale."
1149 msgstr ""
1150 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1151
1152 #. type: Plain text
1153 #: build/C/man3/fgetwc.3:87
1154 msgid ""
1155 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1156 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1157 "sequence from the stream and then convert it to a wide character."
1158 msgstr ""
1159 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1160 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1161 "換すると期待することは適切である。"
1162
1163 #. type: Plain text
1164 #: build/C/man3/fgetwc.3:92
1165 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1166 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1167
1168 #. type: TH
1169 #: build/C/man3/flockfile.3:25
1170 #, no-wrap
1171 msgid "FLOCKFILE"
1172 msgstr "FLOCKFILE"
1173
1174 #. type: TH
1175 #: build/C/man3/flockfile.3:25
1176 #, fuzzy, no-wrap
1177 #| msgid "2013-07-04"
1178 msgid "2013-07-23"
1179 msgstr "2013-07-04"
1180
1181 #. type: Plain text
1182 #: build/C/man3/flockfile.3:28
1183 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1184 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1185
1186 #. type: Plain text
1187 #: build/C/man3/flockfile.3:33
1188 #, no-wrap
1189 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1190 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1191
1192 #. type: Plain text
1193 #: build/C/man3/flockfile.3:35
1194 #, no-wrap
1195 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1196 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1197
1198 #. type: Plain text
1199 #: build/C/man3/flockfile.3:37
1200 #, no-wrap
1201 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1202 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1203
1204 #. type: Plain text
1205 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1206 msgid "All functions shown above:"
1207 msgstr "上記の全ての関数:"
1208
1209 #. type: Plain text
1210 #: build/C/man3/flockfile.3:49
1211 msgid ""
1212 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1213 "|| _POSIX_SOURCE"
1214 msgstr ""
1215 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1216 "|| _POSIX_SOURCE"
1217
1218 #. type: Plain text
1219 #: build/C/man3/flockfile.3:63
1220 msgid ""
1221 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1222 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1223 "thread.  For each library call, these functions wait until the I<FILE> "
1224 "object is no longer locked by a different thread, then lock it, do the "
1225 "requested I/O, and unlock the object again."
1226 msgstr ""
1227 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1228 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1229 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1230 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1231 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1232 "オブジェクトのロックを解除する。"
1233
1234 #. type: Plain text
1235 #: build/C/man3/flockfile.3:69
1236 msgid ""
1237 "(Note: this locking has nothing to do with the file locking done by "
1238 "functions like B<flock>(2)  and B<lockf>(3).)"
1239 msgstr ""
1240 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1241 "全く無関係である。)"
1242
1243 #. type: Plain text
1244 #: build/C/man3/flockfile.3:77
1245 msgid ""
1246 "All this is invisible to the C-programmer, but there may be two reasons to "
1247 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1248 "actions by one thread belongs together, and should not be interrupted by the "
1249 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1250 "should be avoided for greater efficiency."
1251 msgstr ""
1252 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1253 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1254 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1255 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1256 "避ける必要があるということであろう。"
1257
1258 #. type: Plain text
1259 #: build/C/man3/flockfile.3:94
1260 msgid ""
1261 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1262 "series of I/O actions, then unlock.  This prevents other threads from coming "
1263 "in between.  If the reason for doing this was to achieve greater efficiency, "
1264 "one does the I/O with the nonlocking versions of the stdio functions: with "
1265 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1266 "B<putc>(3)."
1267 msgstr ""
1268 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1269 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1270 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1271 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1272 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1273 "B<putc_unlocked>(3)  を使用する。"
1274
1275 #. type: Plain text
1276 #: build/C/man3/flockfile.3:105
1277 msgid ""
1278 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1279 "by a different thread, then makes the current thread owner of "
1280 "I<*filehandle>, and increments the lockcount."
1281 msgstr ""
1282 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1283 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1284 "ロック数を加算する。"
1285
1286 #. type: Plain text
1287 #: build/C/man3/flockfile.3:109
1288 msgid "The B<funlockfile>()  function decrements the lock count."
1289 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1290
1291 #. type: Plain text
1292 #: build/C/man3/flockfile.3:120
1293 msgid ""
1294 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1295 "It does nothing in case some other thread owns I<*filehandle>, and it "
1296 "obtains ownership and increments the lockcount otherwise."
1297 msgstr ""
1298 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1299 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1300 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1301
1302 #. type: Plain text
1303 #: build/C/man3/flockfile.3:125
1304 msgid ""
1305 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1306 "obtained), and nonzero for failure."
1307 msgstr ""
1308 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1309 "の値を返す。"
1310
1311 #. type: Plain text
1312 #: build/C/man3/flockfile.3:127
1313 msgid "None."
1314 msgstr "なし。"
1315
1316 #. type: Plain text
1317 #: build/C/man3/flockfile.3:135
1318 #, fuzzy
1319 #| msgid ""
1320 #| "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
1321 #| "thread-safe."
1322 msgid ""
1323 "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are "
1324 "thread-safe."
1325 msgstr ""
1326 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
1327 "る。"
1328
1329 #. type: Plain text
1330 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1331 msgid "POSIX.1-2001."
1332 msgstr "POSIX.1-2001."
1333
1334 #. type: SH
1335 #: build/C/man3/flockfile.3:137
1336 #, no-wrap
1337 msgid "AVAILABILITY"
1338 msgstr "可用性"
1339
1340 #. type: Plain text
1341 #: build/C/man3/flockfile.3:143
1342 msgid ""
1343 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1344 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1345 msgstr ""
1346 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1347 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1348
1349 #. type: Plain text
1350 #: build/C/man3/flockfile.3:145
1351 msgid "B<unlocked_stdio>(3)"
1352 msgstr "B<unlocked_stdio>(3)"
1353
1354 #. type: TH
1355 #: build/C/man3/fmemopen.3:10
1356 #, no-wrap
1357 msgid "FMEMOPEN"
1358 msgstr "FMEMOPEN"
1359
1360 #. type: TH
1361 #: build/C/man3/fmemopen.3:10
1362 #, no-wrap
1363 msgid "2012-04-28"
1364 msgstr "2012-04-28"
1365
1366 #. type: Plain text
1367 #: build/C/man3/fmemopen.3:13
1368 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1369 msgstr ""
1370 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1371 "する"
1372
1373 #. type: Plain text
1374 #: build/C/man3/fmemopen.3:18
1375 #, no-wrap
1376 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1377 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1378
1379 #. type: Plain text
1380 #: build/C/man3/fmemopen.3:20
1381 #, no-wrap
1382 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1383 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1384
1385 #. type: Plain text
1386 #: build/C/man3/fmemopen.3:24
1387 #, no-wrap
1388 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1389 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1390
1391 #. type: Plain text
1392 #: build/C/man3/fmemopen.3:34
1393 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1394 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1395
1396 #. type: Plain text
1397 #: build/C/man3/fmemopen.3:57
1398 msgid ""
1399 "The B<fmemopen>()  function opens a stream that permits the access specified "
1400 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1401 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1402 "long."
1403 msgstr ""
1404 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1405 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1406 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1407 "I<size> バイトの長さでなければならない。"
1408
1409 #. type: Plain text
1410 #: build/C/man3/fmemopen.3:77
1411 msgid ""
1412 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1413 "an append mode, then the initial file position is set to the location of the "
1414 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1415 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1416 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1417 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1418 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1419 "e., the value specified by the I<size> argument), rather than the current "
1420 "string length."
1421 msgstr ""
1422 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1423 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1424 "最初の NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1425 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1426 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1427 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1428 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1429 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1430 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1431
1432 #. type: Plain text
1433 #: build/C/man3/fmemopen.3:89
1434 msgid ""
1435 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1436 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1437 "there is space.  The caller should ensure that an extra byte is available in "
1438 "the buffer (and that I<size> counts that byte)  to allow for this."
1439 msgstr ""
1440 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1441 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1442 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1443 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1444
1445 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1446 #.  and
1447 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1448 #. type: Plain text
1449 #: build/C/man3/fmemopen.3:107
1450 msgid ""
1451 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1452 "(By default, such errors will be visible only when the I<stdio> buffer is "
1453 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1454 "detect errors at the time of an output operation.  Alternatively, the caller "
1455 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1456 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1457 msgstr ""
1458 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1459 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1460 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1461 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1462 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1463 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1464 "stdio に教える方法がある。)"
1465
1466 #. type: Plain text
1467 #: build/C/man3/fmemopen.3:115
1468 msgid ""
1469 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1470 "not cause read operations to return an end-of-file indication.  A read from "
1471 "the buffer will only indicate end-of-file when the file pointer advances "
1472 "I<size> bytes past the start of the buffer."
1473 msgstr ""
1474 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1475 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1476 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1477 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1478
1479 #. type: Plain text
1480 #: build/C/man3/fmemopen.3:130
1481 msgid ""
1482 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1483 "buffer I<size> bytes long.  This is useful for an application that wants to "
1484 "write data to a temporary buffer and then read it back again.  The buffer is "
1485 "automatically freed when the stream is closed.  Note that the caller has no "
1486 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1487 "see B<open_memstream>()  below)."
1488 msgstr ""
1489 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1490 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1491 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1492 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1493 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1494 "の B<open_memstream>()  も参照)。"
1495
1496 #. type: Plain text
1497 #: build/C/man3/fmemopen.3:141
1498 msgid ""
1499 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1500 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1501 "automatically grows as required.  After closing the stream, the caller "
1502 "should B<free>(3)  this buffer."
1503 msgstr ""
1504 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1505 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1506 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1507 "B<free>(3)  すべきである。"
1508
1509 #. type: Plain text
1510 #: build/C/man3/fmemopen.3:156
1511 msgid ""
1512 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1513 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1514 "respectively, a pointer to the buffer and the current size of the buffer.  "
1515 "These values remain valid only as long as the caller performs no further "
1516 "output on the stream.  If further output is performed, then the stream must "
1517 "again be flushed before trying to access these variables."
1518 msgstr ""
1519 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1520 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1521 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1522 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1523 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1524
1525 #. type: Plain text
1526 #: build/C/man3/fmemopen.3:162
1527 msgid ""
1528 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1529 "included in the size value stored at I<sizeloc>."
1530 msgstr ""
1531 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1532 "されるサイズには「含まれない」。"
1533
1534 #. type: Plain text
1535 #: build/C/man3/fmemopen.3:170
1536 msgid ""
1537 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1538 "(3).  Moving the file position past the end of the data already written "
1539 "fills the intervening space with zeros."
1540 msgstr ""
1541 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1542 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1543 "は 0 で埋められる。"
1544
1545 #. type: Plain text
1546 #: build/C/man3/fmemopen.3:176
1547 msgid ""
1548 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1549 "wide characters instead of bytes."
1550 msgstr ""
1551 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1552 "ド文字に対して操作を行う点が異なる。"
1553
1554 #. type: Plain text
1555 #: build/C/man3/fmemopen.3:188
1556 msgid ""
1557 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1558 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1559 "and I<errno> is set to indicate the error."
1560 msgstr ""
1561 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1562 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1563 "し、 I<errno> にエラーを示す値をセットする。"
1564
1565 #. type: SH
1566 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1567 #: build/C/man3/getline.3:135 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1568 #, no-wrap
1569 msgid "VERSIONS"
1570 msgstr "バージョン"
1571
1572 #. type: Plain text
1573 #: build/C/man3/fmemopen.3:195
1574 msgid ""
1575 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1576 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1577 msgstr ""
1578 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1579 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1580
1581 #. type: Plain text
1582 #: build/C/man3/fmemopen.3:199
1583 msgid ""
1584 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1585 "not widely available on other systems."
1586 msgstr ""
1587 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1588 "のシステムで広く利用可能である。"
1589
1590 #.  http://austingroupbugs.net/view.php?id=396
1591 #. type: Plain text
1592 #: build/C/man3/fmemopen.3:207
1593 msgid ""
1594 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1595 "However, Technical Corrigendum 1 adjusts the standard to allow "
1596 "implementation-specific treatment for this case, thus permitting the glibc "
1597 "treatment of \\(aqb\\(aq."
1598 msgstr ""
1599 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1600 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1601 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1602 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1603
1604 #. type: Plain text
1605 #: build/C/man3/fmemopen.3:213
1606 msgid ""
1607 "There is no file descriptor associated with the file stream returned by "
1608 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1609 "returned stream)."
1610 msgstr ""
1611 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1612 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1613 "とになる)。"
1614
1615 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1616 #. type: Plain text
1617 #: build/C/man3/fmemopen.3:220
1618 msgid ""
1619 "In glibc before version 2.7, seeking past the end of a stream created by "
1620 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1621 "call fails, returning -1."
1622 msgstr ""
1623 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1624 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1625 "B<fseek>(3)  が失敗し -1 が返る。"
1626
1627 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1628 #. type: Plain text
1629 #: build/C/man3/fmemopen.3:231
1630 msgid ""
1631 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1632 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1633 "stream that then returned end of file on the first attempt at reading.  "
1634 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1635 msgstr ""
1636 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1637 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1638 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1639 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1640
1641 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1642 #. type: Plain text
1643 #: build/C/man3/fmemopen.3:239
1644 msgid ""
1645 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1646 "file position to the first null byte, but (if the file offset is reset to a "
1647 "location other than the end of the stream)  does not force subsequent writes "
1648 "to append at the end of the stream."
1649 msgstr ""
1650 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1651 "ファイル位置の初期値は最初の NULL バイトに設定されるが、(ファイル\n"
1652 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1653 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1654
1655 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1656 #. type: Plain text
1657 #: build/C/man3/fmemopen.3:255
1658 msgid ""
1659 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1660 "\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1661 "according to POSIX.1-2008, the initial file position should be set to the "
1662 "next byte after the end of the buffer.  However, in this case the glibc "
1663 "B<fmemopen>()  sets the file position to -1."
1664 msgstr ""
1665 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1666 "I<size> 引き数で指定した範囲の I<buf> 内に NULL バイトがない場合、\n"
1667 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1668 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1669 "この場合ファイル位置は -1 に設定される。"
1670
1671 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1672 #. type: Plain text
1673 #: build/C/man3/fmemopen.3:268
1674 msgid ""
1675 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1676 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1677 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1678 "I<mode> by B<fopen>(3)."
1679 msgstr ""
1680 "B<fmemopen>() でバイナリモードを指定するには、\n"
1681 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1682 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1683 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1684
1685 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1686 #. type: Plain text
1687 #: build/C/man3/fmemopen.3:276
1688 msgid ""
1689 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1690 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1691 msgstr ""
1692 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1693 "ABI (Application Binary Interface) が黙って変更された。\n"
1694 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1695
1696 #. type: SH
1697 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1698 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1699 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:973
1700 #: build/C/man2/readlink.2:157 build/C/man2/readv.2:265
1701 #: build/C/man3/scanf.3:681
1702 #, no-wrap
1703 msgid "EXAMPLE"
1704 msgstr "例"
1705
1706 #. type: Plain text
1707 #: build/C/man3/fmemopen.3:286
1708 msgid ""
1709 "The program below uses B<fmemopen>()  to open an input buffer, and "
1710 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1711 "scans its input string (taken from the program's first command-line "
1712 "argument) reading integers, and writes the squares of these integers to the "
1713 "output buffer.  An example of the output produced by this program is the "
1714 "following:"
1715 msgstr ""
1716 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1717 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1718 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1719 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1720 "ムの実行例は以下のようになる。"
1721
1722 #. type: Plain text
1723 #: build/C/man3/fmemopen.3:291
1724 #, no-wrap
1725 msgid ""
1726 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1727 "size=11; ptr=1 529 1849\n"
1728 msgstr ""
1729 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1730 "size=11; ptr=1 529 1849\n"
1731
1732 #. type: SS
1733 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1734 #, no-wrap
1735 msgid "Program source"
1736 msgstr "プログラムのソース"
1737
1738 #. type: Plain text
1739 #: build/C/man3/fmemopen.3:300
1740 #, no-wrap
1741 msgid ""
1742 "#define _GNU_SOURCE\n"
1743 "#include E<lt>string.hE<gt>\n"
1744 "#include E<lt>stdio.hE<gt>\n"
1745 "#include E<lt>stdlib.hE<gt>\n"
1746 msgstr ""
1747 "#define _GNU_SOURCE\n"
1748 "#include E<lt>string.hE<gt>\n"
1749 "#include E<lt>stdio.hE<gt>\n"
1750 "#include E<lt>stdlib.hE<gt>\n"
1751
1752 #. type: Plain text
1753 #: build/C/man3/fmemopen.3:303
1754 #, no-wrap
1755 msgid ""
1756 "#define handle_error(msg) \\e\n"
1757 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1758 msgstr ""
1759 "#define handle_error(msg) \\e\n"
1760 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1761
1762 #. type: Plain text
1763 #: build/C/man3/fmemopen.3:311
1764 #, no-wrap
1765 msgid ""
1766 "int\n"
1767 "main(int argc, char *argv[])\n"
1768 "{\n"
1769 "    FILE *out, *in;\n"
1770 "    int v, s;\n"
1771 "    size_t size;\n"
1772 "    char *ptr;\n"
1773 msgstr ""
1774 "int\n"
1775 "main(int argc, char *argv[])\n"
1776 "{\n"
1777 "    FILE *out, *in;\n"
1778 "    int v, s;\n"
1779 "    size_t size;\n"
1780 "    char *ptr;\n"
1781
1782 #. type: Plain text
1783 #: build/C/man3/fmemopen.3:316
1784 #, no-wrap
1785 msgid ""
1786 "    if (argc != 2) {\n"
1787 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1788 "\texit(EXIT_FAILURE);\n"
1789 "    }\n"
1790 msgstr ""
1791 "    if (argc != 2) {\n"
1792 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1793 "\texit(EXIT_FAILURE);\n"
1794 "    }\n"
1795
1796 #. type: Plain text
1797 #: build/C/man3/fmemopen.3:320
1798 #, no-wrap
1799 msgid ""
1800 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1801 "    if (in == NULL)\n"
1802 "        handle_error(\"fmemopen\");\n"
1803 msgstr ""
1804 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1805 "    if (in == NULL)\n"
1806 "        handle_error(\"fmemopen\");\n"
1807
1808 #. type: Plain text
1809 #: build/C/man3/fmemopen.3:324
1810 #, no-wrap
1811 msgid ""
1812 "    out = open_memstream(&ptr, &size);\n"
1813 "    if (out == NULL)\n"
1814 "        handle_error(\"open_memstream\");\n"
1815 msgstr ""
1816 "    out = open_memstream(&ptr, &size);\n"
1817 "    if (out == NULL)\n"
1818 "        handle_error(\"open_memstream\");\n"
1819
1820 #. type: Plain text
1821 #: build/C/man3/fmemopen.3:329
1822 #, no-wrap
1823 msgid ""
1824 "    for (;;) {\n"
1825 "        s = fscanf(in, \"%d\", &v);\n"
1826 "        if (s E<lt>= 0)\n"
1827 "            break;\n"
1828 msgstr ""
1829 "    for (;;) {\n"
1830 "        s = fscanf(in, \"%d\", &v);\n"
1831 "        if (s E<lt>= 0)\n"
1832 "            break;\n"
1833
1834 #. type: Plain text
1835 #: build/C/man3/fmemopen.3:340
1836 #, no-wrap
1837 msgid ""
1838 "        s = fprintf(out, \"%d \", v * v);\n"
1839 "        if (s == -1)\n"
1840 "            handle_error(\"fprintf\");\n"
1841 "    }\n"
1842 "    fclose(in);\n"
1843 "    fclose(out);\n"
1844 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1845 "    free(ptr);\n"
1846 "    exit(EXIT_SUCCESS);\n"
1847 "}\n"
1848 msgstr ""
1849 "        s = fprintf(out, \"%d \", v * v);\n"
1850 "        if (s == -1)\n"
1851 "            handle_error(\"fprintf\");\n"
1852 "    }\n"
1853 "    fclose(in);\n"
1854 "    fclose(out);\n"
1855 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1856 "    free(ptr);\n"
1857 "    exit(EXIT_SUCCESS);\n"
1858 "}\n"
1859
1860 #. type: Plain text
1861 #: build/C/man3/fmemopen.3:344
1862 msgid "B<fopen>(3), B<fopencookie>(3)"
1863 msgstr "B<fopen>(3), B<fopencookie>(3)"
1864
1865 #. type: TH
1866 #: build/C/man3/fmtmsg.3:13
1867 #, no-wrap
1868 msgid "FMTMSG"
1869 msgstr "FMTMSG"
1870
1871 #. type: Plain text
1872 #: build/C/man3/fmtmsg.3:16
1873 msgid "fmtmsg - print formatted error messages"
1874 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1875
1876 #. type: Plain text
1877 #: build/C/man3/fmtmsg.3:19
1878 #, no-wrap
1879 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1880 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1881
1882 #. type: Plain text
1883 #: build/C/man3/fmtmsg.3:21
1884 #, no-wrap
1885 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1886 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1887
1888 #. type: Plain text
1889 #: build/C/man3/fmtmsg.3:23
1890 #, no-wrap
1891 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1892 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1893
1894 #. type: Plain text
1895 #: build/C/man3/fmtmsg.3:25
1896 #, no-wrap
1897 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1898 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1899
1900 #. type: Plain text
1901 #: build/C/man3/fmtmsg.3:36
1902 msgid ""
1903 "This function displays a message described by its arguments on the device"
1904 "(s)  specified in the I<classification> argument.  For messages written to "
1905 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1906 msgstr ""
1907 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1908 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1909 "は、 B<MSGVERB> 環境変数に依存する。"
1910
1911 #. type: Plain text
1912 #: build/C/man3/fmtmsg.3:43
1913 msgid ""
1914 "The I<label> argument identifies the source of the message.  The string must "
1915 "consist of two colon separated parts where the first part has not more than "
1916 "10 and the second part not more than 14 characters."
1917 msgstr ""
1918 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1919 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1920 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1921
1922 #. type: Plain text
1923 #: build/C/man3/fmtmsg.3:47
1924 msgid "The I<text> argument describes the condition of the error."
1925 msgstr "I<text> 引き数にはエラー条件を記述する。"
1926
1927 #. type: Plain text
1928 #: build/C/man3/fmtmsg.3:52
1929 msgid ""
1930 "The I<action> argument describes possible steps to recover from the error.  "
1931 "If it is printed, it is prefixed by \"TO FIX: \"."
1932 msgstr ""
1933 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1934 "れが表示される場合、\"TO FIX: \" が前に付く。"
1935
1936 #. type: Plain text
1937 #: build/C/man3/fmtmsg.3:60
1938 msgid ""
1939 "The I<tag> argument is a reference to the online documentation where more "
1940 "information can be found.  It should contain the I<label> value and a unique "
1941 "identification number."
1942 msgstr ""
1943 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1944 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1945
1946 #. type: SS
1947 #: build/C/man3/fmtmsg.3:60
1948 #, no-wrap
1949 msgid "Dummy arguments"
1950 msgstr "ダミー引き数"
1951
1952 #. type: Plain text
1953 #: build/C/man3/fmtmsg.3:79
1954 msgid ""
1955 "Each of the arguments can have a dummy value.  The dummy classification "
1956 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1957 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1958 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1959 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
1960 "synonym for B<NO_SEV>."
1961 msgstr ""
1962 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1963 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1964 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1965 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1966 "((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名"
1967 "である。"
1968
1969 #. type: SS
1970 #: build/C/man3/fmtmsg.3:79
1971 #, no-wrap
1972 msgid "The classification argument"
1973 msgstr "classification 引き数"
1974
1975 #. type: Plain text
1976 #: build/C/man3/fmtmsg.3:83
1977 msgid ""
1978 "The I<classification> argument is the sum of values describing 4 types of "
1979 "information."
1980 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1981
1982 #. type: Plain text
1983 #: build/C/man3/fmtmsg.3:86
1984 msgid "The first value defines the output channel."
1985 msgstr "最初の値は出力チャンネルを定義する。"
1986
1987 #. type: TP
1988 #: build/C/man3/fmtmsg.3:86
1989 #, no-wrap
1990 msgid "B<MM_PRINT>"
1991 msgstr "B<MM_PRINT>"
1992
1993 #. type: Plain text
1994 #: build/C/man3/fmtmsg.3:90
1995 msgid "Output to I<stderr>."
1996 msgstr "I<stderr> に出力する。"
1997
1998 #. type: TP
1999 #: build/C/man3/fmtmsg.3:90
2000 #, no-wrap
2001 msgid "B<MM_CONSOLE>"
2002 msgstr "B<MM_CONSOLE>"
2003
2004 #. type: Plain text
2005 #: build/C/man3/fmtmsg.3:93
2006 msgid "Output to the system console."
2007 msgstr "システムコンソールに出力する。"
2008
2009 #. type: TP
2010 #: build/C/man3/fmtmsg.3:93
2011 #, no-wrap
2012 msgid "B<MM_PRINT | MM_CONSOLE>"
2013 msgstr "B<MM_PRINT | MM_CONSOLE>"
2014
2015 #. type: Plain text
2016 #: build/C/man3/fmtmsg.3:96
2017 msgid "Output to both."
2018 msgstr "両方に出力する。"
2019
2020 #. type: Plain text
2021 #: build/C/man3/fmtmsg.3:98
2022 msgid "The second value is the source of the error:"
2023 msgstr "2 番目の値はエラーの発生源である:"
2024
2025 #. type: TP
2026 #: build/C/man3/fmtmsg.3:98
2027 #, no-wrap
2028 msgid "B<MM_HARD>"
2029 msgstr "B<MM_HARD>"
2030
2031 #. type: Plain text
2032 #: build/C/man3/fmtmsg.3:101
2033 msgid "A hardware error occurred."
2034 msgstr "ハードウェアエラーが起こった。"
2035
2036 #. type: TP
2037 #: build/C/man3/fmtmsg.3:101
2038 #, no-wrap
2039 msgid "B<MM_FIRM>"
2040 msgstr "B<MM_FIRM>"
2041
2042 #. type: Plain text
2043 #: build/C/man3/fmtmsg.3:104
2044 msgid "A firmware error occurred."
2045 msgstr "ファームウェアエラーが起こった。"
2046
2047 #. type: TP
2048 #: build/C/man3/fmtmsg.3:104
2049 #, no-wrap
2050 msgid "B<MM_SOFT>"
2051 msgstr "B<MM_SOFT>"
2052
2053 #. type: Plain text
2054 #: build/C/man3/fmtmsg.3:107
2055 msgid "A software error occurred."
2056 msgstr "ソフトウェアエラーが起こった。"
2057
2058 #. type: Plain text
2059 #: build/C/man3/fmtmsg.3:109
2060 msgid "The third value encodes the detector of the problem:"
2061 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2062
2063 #. type: TP
2064 #: build/C/man3/fmtmsg.3:109
2065 #, no-wrap
2066 msgid "B<MM_APPL>"
2067 msgstr "B<MM_APPL>"
2068
2069 #. type: Plain text
2070 #: build/C/man3/fmtmsg.3:112
2071 msgid "It is detected by an application."
2072 msgstr "アプリケーションによって検知された。"
2073
2074 #. type: TP
2075 #: build/C/man3/fmtmsg.3:112
2076 #, no-wrap
2077 msgid "B<MM_UTIL>"
2078 msgstr "B<MM_UTIL>"
2079
2080 #. type: Plain text
2081 #: build/C/man3/fmtmsg.3:115
2082 msgid "It is detected by a utility."
2083 msgstr "ユーティリティによって検知された。"
2084
2085 #. type: TP
2086 #: build/C/man3/fmtmsg.3:115
2087 #, no-wrap
2088 msgid "B<MM_OPSYS>"
2089 msgstr "B<MM_OPSYS>"
2090
2091 #. type: Plain text
2092 #: build/C/man3/fmtmsg.3:118
2093 msgid "It is detected by the operating system."
2094 msgstr "オペレーティングシステムによって検知された。"
2095
2096 #. type: Plain text
2097 #: build/C/man3/fmtmsg.3:120
2098 msgid "The fourth value shows the severity of the incident:"
2099 msgstr "4 番目の値は問題の重大度を表す:"
2100
2101 #. type: TP
2102 #: build/C/man3/fmtmsg.3:120
2103 #, no-wrap
2104 msgid "B<MM_RECOVER>"
2105 msgstr "B<MM_RECOVER>"
2106
2107 #. type: Plain text
2108 #: build/C/man3/fmtmsg.3:123
2109 msgid "It is a recoverable error."
2110 msgstr "回復可能なエラーである。"
2111
2112 #. type: TP
2113 #: build/C/man3/fmtmsg.3:123
2114 #, no-wrap
2115 msgid "B<MM_NRECOV>"
2116 msgstr "B<MM_NRECOV>"
2117
2118 #. type: Plain text
2119 #: build/C/man3/fmtmsg.3:126
2120 msgid "It is a nonrecoverable error."
2121 msgstr "回復不可能なエラーである。"
2122
2123 #. type: SS
2124 #: build/C/man3/fmtmsg.3:126
2125 #, no-wrap
2126 msgid "The severity argument"
2127 msgstr "severity 引き数"
2128
2129 #. type: Plain text
2130 #: build/C/man3/fmtmsg.3:130
2131 msgid "The I<severity> argument can take one of the following values:"
2132 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2133
2134 #. type: TP
2135 #: build/C/man3/fmtmsg.3:130
2136 #, no-wrap
2137 msgid "B<MM_NOSEV>"
2138 msgstr "B<MM_NOSEV>"
2139
2140 #. type: Plain text
2141 #: build/C/man3/fmtmsg.3:133
2142 msgid "No severity is printed."
2143 msgstr "重大度は表示されない。"
2144
2145 #. type: TP
2146 #: build/C/man3/fmtmsg.3:133
2147 #, no-wrap
2148 msgid "B<MM_HALT>"
2149 msgstr "B<MM_HALT>"
2150
2151 #. type: Plain text
2152 #: build/C/man3/fmtmsg.3:136
2153 msgid "This value is printed as HALT."
2154 msgstr "この値は HALT として表示される。"
2155
2156 #. type: TP
2157 #: build/C/man3/fmtmsg.3:136
2158 #, no-wrap
2159 msgid "B<MM_ERROR>"
2160 msgstr "B<MM_ERROR>"
2161
2162 #. type: Plain text
2163 #: build/C/man3/fmtmsg.3:139
2164 msgid "This value is printed as ERROR."
2165 msgstr "この値は ERROR として表示される。"
2166
2167 #. type: TP
2168 #: build/C/man3/fmtmsg.3:139
2169 #, no-wrap
2170 msgid "B<MM_WARNING>"
2171 msgstr "B<MM_WARNING>"
2172
2173 #. type: Plain text
2174 #: build/C/man3/fmtmsg.3:142
2175 msgid "This value is printed as WARNING."
2176 msgstr "この値は WARNING として表示される。"
2177
2178 #. type: TP
2179 #: build/C/man3/fmtmsg.3:142
2180 #, no-wrap
2181 msgid "B<MM_INFO>"
2182 msgstr "B<MM_INFO>"
2183
2184 #. type: Plain text
2185 #: build/C/man3/fmtmsg.3:145
2186 msgid "This value is printed as INFO."
2187 msgstr "この値は INFO として表示される。"
2188
2189 #. type: Plain text
2190 #: build/C/man3/fmtmsg.3:152
2191 msgid ""
2192 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2193 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2194 "print."
2195 msgstr ""
2196 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2197 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2198
2199 #. type: Plain text
2200 #: build/C/man3/fmtmsg.3:154
2201 msgid "The function can return 4 values:"
2202 msgstr "関数は 4 つの値を返す:"
2203
2204 #. type: TP
2205 #: build/C/man3/fmtmsg.3:154
2206 #, no-wrap
2207 msgid "B<MM_OK>"
2208 msgstr "B<MM_OK>"
2209
2210 #. type: Plain text
2211 #: build/C/man3/fmtmsg.3:157
2212 msgid "Everything went smooth."
2213 msgstr "全てがうまくいった。"
2214
2215 #. type: TP
2216 #: build/C/man3/fmtmsg.3:157
2217 #, no-wrap
2218 msgid "B<MM_NOTOK>"
2219 msgstr "B<MM_NOTOK>"
2220
2221 #. type: Plain text
2222 #: build/C/man3/fmtmsg.3:160
2223 msgid "Complete failure."
2224 msgstr "完全に失敗した。"
2225
2226 #. type: TP
2227 #: build/C/man3/fmtmsg.3:160
2228 #, no-wrap
2229 msgid "B<MM_NOMSG>"
2230 msgstr "B<MM_NOMSG>"
2231
2232 #. type: Plain text
2233 #: build/C/man3/fmtmsg.3:164
2234 msgid "Error writing to I<stderr>."
2235 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2236
2237 #. type: TP
2238 #: build/C/man3/fmtmsg.3:164
2239 #, no-wrap
2240 msgid "B<MM_NOCON>"
2241 msgstr "B<MM_NOCON>"
2242
2243 #. type: Plain text
2244 #: build/C/man3/fmtmsg.3:167
2245 msgid "Error writing to the console."
2246 msgstr "コンソールに書き込むときにエラーが起こった。"
2247
2248 #. type: SH
2249 #: build/C/man3/fmtmsg.3:167
2250 #, no-wrap
2251 msgid "ENVIRONMENT"
2252 msgstr "環境変数"
2253
2254 #. type: Plain text
2255 #: build/C/man3/fmtmsg.3:178
2256 msgid ""
2257 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2258 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2259 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2260 "separated list of valid keywords, then only the parts of the message "
2261 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2262 "\"severity\", \"text\", \"action\" and \"tag\"."
2263 msgstr ""
2264 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2265 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2266 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2267 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2268 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2269
2270 #. type: Plain text
2271 #: build/C/man3/fmtmsg.3:190
2272 msgid ""
2273 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2274 "levels.  By default, only the five severity levels described above are "
2275 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2276 "If the user puts B<SEV_LEVEL> with a format like"
2277 msgstr ""
2278 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2279 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2280 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2281 "B<SEV_LEVEL> を"
2282
2283 #. type: Plain text
2284 #: build/C/man3/fmtmsg.3:193
2285 msgid "SEV_LEVEL=[description[:description[:...]]]"
2286 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2287
2288 #. type: Plain text
2289 #: build/C/man3/fmtmsg.3:198
2290 msgid ""
2291 "in the environment of the process before the first call to B<fmtmsg>(), "
2292 "where each description is of the form"
2293 msgstr ""
2294 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2295 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2296 "指定された printstring を表示する。 各 description は"
2297
2298 #. type: Plain text
2299 #: build/C/man3/fmtmsg.3:201
2300 msgid "severity-keyword,level,printstring"
2301 msgstr "severity-keyword,level,printstring"
2302
2303 #. type: Plain text
2304 #: build/C/man3/fmtmsg.3:208
2305 msgid ""
2306 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2307 "addition to the standard levels 0-4), and use the indicated printstring when "
2308 "such a level occurs."
2309 msgstr "という形式である。"
2310
2311 #. type: Plain text
2312 #: build/C/man3/fmtmsg.3:222
2313 msgid ""
2314 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2315 "present.  The level part is a string representation of a number.  The "
2316 "numeric value must be a number greater than 4.  This value must be used in "
2317 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2318 "possible to overwrite any of the predefined classes.  The printstring is the "
2319 "string printed when a message of this class is processed by B<fmtmsg>()."
2320 msgstr ""
2321 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2322 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2323 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2324 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2325 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2326 "た場合に表示される文字列である。"
2327
2328 #. type: Plain text
2329 #: build/C/man3/fmtmsg.3:225
2330 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2331 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2332
2333 #. type: Plain text
2334 #: build/C/man3/fmtmsg.3:231
2335 msgid ""
2336 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2337 "not protected, so it is not thread-safe."
2338 msgstr ""
2339 "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的"
2340 "な変数を使うため、 スレッドセーフではない。"
2341
2342 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2343 #. type: Plain text
2344 #: build/C/man3/fmtmsg.3:237
2345 msgid ""
2346 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2347 "static variable, so it is thread-safe."
2348 msgstr ""
2349 "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護してお"
2350 "り、 スレッドセーフである。"
2351
2352 #. type: Plain text
2353 #: build/C/man3/fmtmsg.3:252
2354 msgid ""
2355 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2356 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2357 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2358 msgstr ""
2359 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2360 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2361 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2362
2363 #. type: Plain text
2364 #: build/C/man3/fmtmsg.3:256
2365 msgid ""
2366 "System V and UnixWare man pages tell us that these functions have been "
2367 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2368 "vlfmt()\", and will be removed later."
2369 msgstr ""
2370 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2371 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2372 "は削除される予定である」と書かれている。"
2373
2374 #. type: Plain text
2375 #: build/C/man3/fmtmsg.3:261
2376 #, no-wrap
2377 msgid ""
2378 "#include E<lt>stdio.hE<gt>\n"
2379 "#include E<lt>stdlib.hE<gt>\n"
2380 "#include E<lt>fmtmsg.hE<gt>\n"
2381 msgstr ""
2382 "#include E<lt>stdio.hE<gt>\n"
2383 "#include E<lt>stdlib.hE<gt>\n"
2384 "#include E<lt>fmtmsg.hE<gt>\n"
2385
2386 #. type: Plain text
2387 #: build/C/man3/fmtmsg.3:267
2388 #, no-wrap
2389 msgid ""
2390 "int\n"
2391 "main(void)\n"
2392 "{\n"
2393 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2394 "    int err;\n"
2395 msgstr ""
2396 "int\n"
2397 "main(void)\n"
2398 "{\n"
2399 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2400 "    int err;\n"
2401
2402 #. type: Plain text
2403 #: build/C/man3/fmtmsg.3:288
2404 #, no-wrap
2405 msgid ""
2406 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2407 "                \"unknown mount option\", \"See mount(8).\",\n"
2408 "                \"util-linux:mount:017\");\n"
2409 "    switch (err) {\n"
2410 "    case MM_OK:\n"
2411 "        break;\n"
2412 "    case MM_NOTOK:\n"
2413 "        printf(\"Nothing printed\\en\");\n"
2414 "        break;\n"
2415 "    case MM_NOMSG:\n"
2416 "        printf(\"Nothing printed to stderr\\en\");\n"
2417 "        break;\n"
2418 "    case MM_NOCON:\n"
2419 "        printf(\"No console output\\en\");\n"
2420 "        break;\n"
2421 "    default:\n"
2422 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2423 "    }\n"
2424 "    exit(EXIT_SUCCESS);\n"
2425 "}\n"
2426 msgstr ""
2427 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2428 "                \"unknown mount option\", \"See mount(8).\",\n"
2429 "                \"util-linux:mount:017\");\n"
2430 "    switch (err) {\n"
2431 "    case MM_OK:\n"
2432 "      break;\n"
2433 "    case MM_NOTOK:\n"
2434 "        printf(\"Nothing printed\\en\");\n"
2435 "        break;\n"
2436 "    case MM_NOMSG:\n"
2437 "        printf(\"Nothing printed to stderr\\en\");\n"
2438 "        break;\n"
2439 "    case MM_NOCON:\n"
2440 "        printf(\"No console output\\en\");\n"
2441 "        break;\n"
2442 "    default:\n"
2443 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2444 "    }\n"
2445 "    exit(EXIT_SUCCESS);\n"
2446 "}\n"
2447
2448 #. type: Plain text
2449 #: build/C/man3/fmtmsg.3:291
2450 msgid "The output should be:"
2451 msgstr "出力は"
2452
2453 #. type: Plain text
2454 #: build/C/man3/fmtmsg.3:295
2455 #, no-wrap
2456 msgid ""
2457 "    util-linux:mount: ERROR: unknown mount option\n"
2458 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2459 msgstr ""
2460 "    util-linux:mount: ERROR: unknown mount option\n"
2461 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2462
2463 #. type: Plain text
2464 #: build/C/man3/fmtmsg.3:298
2465 msgid "and after"
2466 msgstr "のようになり、"
2467
2468 #. type: Plain text
2469 #: build/C/man3/fmtmsg.3:301
2470 #, no-wrap
2471 msgid "    MSGVERB=text:action; export MSGVERB\n"
2472 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2473
2474 #. type: Plain text
2475 #: build/C/man3/fmtmsg.3:304
2476 msgid "the output becomes:"
2477 msgstr "を実行すると、次のようになる。"
2478
2479 #. type: Plain text
2480 #: build/C/man3/fmtmsg.3:308
2481 #, no-wrap
2482 msgid ""
2483 "    unknown mount option\n"
2484 "    TO FIX: See mount(8).\n"
2485 msgstr ""
2486 "    unknown mount option\n"
2487 "    TO FIX: See mount(8).\n"
2488
2489 #. type: Plain text
2490 #: build/C/man3/fmtmsg.3:312
2491 msgid "B<addseverity>(3), B<perror>(3)"
2492 msgstr "B<addseverity>(3), B<perror>(3)"
2493
2494 #. type: TH
2495 #: build/C/man3/fopen.3:44
2496 #, no-wrap
2497 msgid "FOPEN"
2498 msgstr "FOPEN"
2499
2500 #. type: TH
2501 #: build/C/man3/fopen.3:44
2502 #, no-wrap
2503 msgid "2012-04-22"
2504 msgstr "2012-04-22"
2505
2506 #. type: Plain text
2507 #: build/C/man3/fopen.3:47
2508 msgid "fopen, fdopen, freopen - stream open functions"
2509 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2510
2511 #. type: Plain text
2512 #: build/C/man3/fopen.3:52
2513 #, no-wrap
2514 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2515 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2516
2517 #. type: Plain text
2518 #: build/C/man3/fopen.3:54
2519 #, no-wrap
2520 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2521 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2522
2523 #. type: Plain text
2524 #: build/C/man3/fopen.3:56
2525 #, no-wrap
2526 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2527 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2528
2529 #. type: Plain text
2530 #: build/C/man3/fopen.3:65
2531 msgid ""
2532 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2533 msgstr ""
2534 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2535
2536 #. type: Plain text
2537 #: build/C/man3/fopen.3:71
2538 msgid ""
2539 "The B<fopen>()  function opens the file whose name is the string pointed to "
2540 "by I<path> and associates a stream with it."
2541 msgstr ""
2542 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2543 "びつける。"
2544
2545 #. type: Plain text
2546 #: build/C/man3/fopen.3:76
2547 msgid ""
2548 "The argument I<mode> points to a string beginning with one of the following "
2549 "sequences (possibly followed by additional characters, as described below):"
2550 msgstr ""
2551 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2552 "る (以下の述べる、追加の文字が後に続くこともある):"
2553
2554 #. type: TP
2555 #: build/C/man3/fopen.3:76
2556 #, no-wrap
2557 msgid "B<r>"
2558 msgstr "B<r>"
2559
2560 #. type: Plain text
2561 #: build/C/man3/fopen.3:80
2562 msgid ""
2563 "Open text file for reading.  The stream is positioned at the beginning of "
2564 "the file."
2565 msgstr ""
2566 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2567 "る。"
2568
2569 #. type: TP
2570 #: build/C/man3/fopen.3:80
2571 #, no-wrap
2572 msgid "B<r+>"
2573 msgstr "B<r+>"
2574
2575 #. type: Plain text
2576 #: build/C/man3/fopen.3:84
2577 msgid ""
2578 "Open for reading and writing.  The stream is positioned at the beginning of "
2579 "the file."
2580 msgstr ""
2581 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2582 "る。"
2583
2584 #. type: TP
2585 #: build/C/man3/fopen.3:84
2586 #, no-wrap
2587 msgid "B<w>"
2588 msgstr "B<w>"
2589
2590 #. type: Plain text
2591 #: build/C/man3/fopen.3:88
2592 msgid ""
2593 "Truncate file to zero length or create text file for writing.  The stream is "
2594 "positioned at the beginning of the file."
2595 msgstr ""
2596 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2597 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2598 "頭に位置される。"
2599
2600 #. type: TP
2601 #: build/C/man3/fopen.3:88
2602 #, no-wrap
2603 msgid "B<w+>"
2604 msgstr "B<w+>"
2605
2606 #. type: Plain text
2607 #: build/C/man3/fopen.3:94
2608 msgid ""
2609 "Open for reading and writing.  The file is created if it does not exist, "
2610 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2611 "file."
2612 msgstr ""
2613 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2614 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2615 "の先頭に位置される。"
2616
2617 #. type: TP
2618 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2619 #, no-wrap
2620 msgid "B<a>"
2621 msgstr "B<a>"
2622
2623 #. type: Plain text
2624 #: build/C/man3/fopen.3:99
2625 msgid ""
2626 "Open for appending (writing at end of file).  The file is created if it does "
2627 "not exist.  The stream is positioned at the end of the file."
2628 msgstr ""
2629 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2630 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2631
2632 #. type: TP
2633 #: build/C/man3/fopen.3:99
2634 #, no-wrap
2635 msgid "B<a+>"
2636 msgstr "B<a+>"
2637
2638 #. type: Plain text
2639 #: build/C/man3/fopen.3:105
2640 msgid ""
2641 "Open for reading and appending (writing at end of file).  The file is "
2642 "created if it does not exist.  The initial file position for reading is at "
2643 "the beginning of the file, but output is always appended to the end of the "
2644 "file."
2645 msgstr ""
2646 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2647 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2648 "あるが、 書き込みは常にファイルの最後に追加される。"
2649
2650 #. type: Plain text
2651 #: build/C/man3/fopen.3:118
2652 msgid ""
2653 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2654 "character or as a character between the characters in any of the two-"
2655 "character strings described above.  This is strictly for compatibility with "
2656 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2657 "systems, including Linux.  (Other systems may treat text files and binary "
2658 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2659 "O to a binary file and expect that your program may be ported to non-UNIX "
2660 "environments.)"
2661 msgstr ""
2662 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2663 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2664 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2665 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2666 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2667 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2668 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2669 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2670
2671 #. type: Plain text
2672 #: build/C/man3/fopen.3:121
2673 msgid "See NOTES below for details of glibc extensions for I<mode>."
2674 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2675
2676 #. type: Plain text
2677 #: build/C/man3/fopen.3:126
2678 msgid ""
2679 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2680 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2681 "umask value (see B<umask>(2))."
2682 msgstr ""
2683 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2684 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2685 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2686
2687 #. type: Plain text
2688 #: build/C/man3/fopen.3:141
2689 msgid ""
2690 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2691 "that ANSI C requires that a file positioning function intervene between "
2692 "output and input, unless an input operation encounters end-of-file.  (If "
2693 "this condition is not met, then a read is allowed to return the result of "
2694 "writes other than the most recent.)  Therefore it is good practice (and "
2695 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2696 "(3)  operation between write and read operations on such a stream.  This "
2697 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2698 "for its synchronizing side effect."
2699 msgstr ""
2700 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2701 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2702 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2703 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2704 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2705 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2706 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2707 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2708 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2709 "い)。"
2710
2711 #. type: Plain text
2712 #: build/C/man3/fopen.3:146
2713 msgid ""
2714 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2715 "causes all subsequent write operations to this stream to occur at end-of-"
2716 "file, as if preceded the call:"
2717 msgstr ""
2718 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2719 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2720 "かのように) ファイルの末尾で行われる。"
2721
2722 #. type: Plain text
2723 #: build/C/man3/fopen.3:149
2724 #, no-wrap
2725 msgid "    fseek(stream, 0, SEEK_END);\n"
2726 msgstr "    fseek(stream, 0, SEEK_END);\n"
2727
2728 #. type: Plain text
2729 #: build/C/man3/fopen.3:171
2730 msgid ""
2731 "The B<fdopen>()  function associates a stream with the existing file "
2732 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2733 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2734 "file descriptor.  The file position indicator of the new stream is set to "
2735 "that belonging to I<fd>, and the error and end-of-file indicators are "
2736 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2737 "file descriptor is not dup'ed, and will be closed when the stream created by "
2738 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2739 "memory object is undefined."
2740 msgstr ""
2741 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2742 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2743 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2744 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2745 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2746 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2747 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2748 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2749
2750 #. type: Plain text
2751 #: build/C/man3/fopen.3:189
2752 msgid ""
2753 "The B<freopen>()  function opens the file whose name is the string pointed "
2754 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2755 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2756 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2757 "function is to change the file associated with a standard text stream "
2758 "(I<stderr>, I<stdin>, or I<stdout>)."
2759 msgstr ""
2760 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2761 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2762 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2763 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2764 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2765
2766 #. type: Plain text
2767 #: build/C/man3/fopen.3:201
2768 msgid ""
2769 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2770 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2771 "indicate the error."
2772 msgstr ""
2773 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2774 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2775
2776 #. type: TP
2777 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2778 #: build/C/man3/getline.3:126 build/C/man2/llseek.2:77
2779 #: build/C/man2/lseek.2:175 build/C/man2/pipe.2:102 build/C/man2/read.2:126
2780 #: build/C/man2/read.2:137 build/C/man2/readlink.2:95
2781 #: build/C/man2/readlink.2:104 build/C/man2/readv.2:200
2782 #: build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:565
2783 #: build/C/man2/write.2:154
2784 #, no-wrap
2785 msgid "B<EINVAL>"
2786 msgstr "B<EINVAL>"
2787
2788 #. type: Plain text
2789 #: build/C/man3/fopen.3:212
2790 msgid ""
2791 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2792 "invalid."
2793 msgstr ""
2794 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2795
2796 #. type: Plain text
2797 #: build/C/man3/fopen.3:222
2798 msgid ""
2799 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2800 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2801 msgstr ""
2802 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2803 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2804 "する。"
2805
2806 #. type: Plain text
2807 #: build/C/man3/fopen.3:229
2808 msgid ""
2809 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2810 "errors specified for the routine B<open>(2)."
2811 msgstr ""
2812 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2813 "があり、 その時は対応する値に I<errno> をセットする。"
2814
2815 #. type: Plain text
2816 #: build/C/man3/fopen.3:236
2817 msgid ""
2818 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2819 "errors specified for the routine B<fcntl>(2)."
2820 msgstr ""
2821 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2822 "とがあり、 その時は対応する値に I<errno> をセットする。"
2823
2824 #. type: Plain text
2825 #: build/C/man3/fopen.3:246
2826 msgid ""
2827 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2828 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2829 msgstr ""
2830 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2831 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2832 "トする。"
2833
2834 #. type: Plain text
2835 #: build/C/man3/fopen.3:255
2836 msgid ""
2837 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2838 "()  function conforms to POSIX.1-1990."
2839 msgstr ""
2840 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2841 "は POSIX.1-1990 に準拠している。"
2842
2843 #. type: SS
2844 #: build/C/man3/fopen.3:256
2845 #, no-wrap
2846 msgid "Glibc notes"
2847 msgstr "glibc での注意"
2848
2849 #. type: Plain text
2850 #: build/C/man3/fopen.3:259
2851 msgid ""
2852 "The GNU C library allows the following extensions for the string specified "
2853 "in I<mode>:"
2854 msgstr ""
2855 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2856 "いる:"
2857
2858 #. type: TP
2859 #: build/C/man3/fopen.3:259
2860 #, no-wrap
2861 msgid "B<c> (since glibc 2.3.3)"
2862 msgstr "B<c> (glibc 2.3.3 以降)"
2863
2864 #. type: Plain text
2865 #: build/C/man3/fopen.3:266
2866 msgid ""
2867 "Do not make the open operation, or subsequent read and write operations, "
2868 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2869 msgstr ""
2870 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2871 "(cancellation points) を作成しない。\n"
2872 "このフラグは B<fdopen>() では無視される。"
2873
2874 #. type: TP
2875 #: build/C/man3/fopen.3:266
2876 #, no-wrap
2877 msgid "B<e> (since glibc 2.7)"
2878 msgstr "B<e> (glibc 2.7 以降)"
2879
2880 #. type: Plain text
2881 #: build/C/man3/fopen.3:276
2882 msgid ""
2883 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2884 "information.  This flag is ignored for B<fdopen>()."
2885 msgstr ""
2886 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2887 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2888
2889 #. type: TP
2890 #: build/C/man3/fopen.3:276
2891 #, no-wrap
2892 msgid "B<m> (since glibc 2.3)"
2893 msgstr "B<m> (glibc 2.3 以降)"
2894
2895 #.  As at glibc 2.4:
2896 #. type: Plain text
2897 #: build/C/man3/fopen.3:288
2898 msgid ""
2899 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2900 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
2901 "for a file opened for reading."
2902 msgstr ""
2903 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2904 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2905 "オープンするファイルについてだけである。"
2906
2907 #. type: TP
2908 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2909 #, no-wrap
2910 msgid "B<x>"
2911 msgstr "B<x>"
2912
2913 #.  Since glibc 2.0?
2914 #.  FIXME C11 specifies this flag
2915 #. type: Plain text
2916 #: build/C/man3/fopen.3:305
2917 msgid ""
2918 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2919 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2920 "This flag is ignored for B<fdopen>()."
2921 msgstr ""
2922 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2923 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2924 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2925
2926 #. type: Plain text
2927 #: build/C/man3/fopen.3:313
2928 msgid ""
2929 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2930 "the following syntax in I<mode>:"
2931 msgstr ""
2932 "上記の文字に加えて、\n"
2933 "B<fopen>() と B<freopen>() では I<mode> に\n"
2934 "以下の書式を 指定することができる。"
2935
2936 #. type: Plain text
2937 #: build/C/man3/fopen.3:315
2938 msgid "B< ,ccs=>I<string>"
2939 msgstr "B< ,ccs=>I<string>"
2940
2941 #. type: Plain text
2942 #: build/C/man3/fopen.3:331
2943 msgid ""
2944 "The given I<string> is taken as the name of a coded character set and the "
2945 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2946 "functions convert I/O to and from the character set I<string>.  If the B<,"
2947 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2948 "stream is determined by the first file operation.  If that operation is a "
2949 "wide-character operation, the stream is marked wide-oriented, and functions "
2950 "to convert to the coded character set are loaded."
2951 msgstr ""
2952 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2953 "ストリームではワイド文字のストリームとして扱われる。\n"
2954 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2955 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2956 "ストリームをワイド文字のストリームとして扱うかは\n"
2957 "最初のファイル操作時に決定される。\n"
2958 "最初のファイル操作がワイド文字操作であった場合は、\n"
2959 "そのストリームはワイド文字のストリームとして扱われ、\n"
2960 "符号化文字集合との変換を行う関数が読み込まれる。"
2961
2962 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2963 #. type: Plain text
2964 #: build/C/man3/fopen.3:348
2965 msgid ""
2966 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2967 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
2968 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2969 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2970 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2971 "B<fdopen>()  parses at most 5 characters in I<mode>."
2972 msgstr ""
2973 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2974 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2975 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2976 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2977 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2978 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2979
2980 #. type: Plain text
2981 #: build/C/man3/fopen.3:354
2982 msgid ""
2983 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2984 msgstr ""
2985 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2986
2987 #. type: TH
2988 #: build/C/man3/fopencookie.3:26
2989 #, no-wrap
2990 msgid "FOPENCOOKIE"
2991 msgstr "FOPENCOOKIE"
2992
2993 #. type: TH
2994 #: build/C/man3/fopencookie.3:26
2995 #, no-wrap
2996 msgid "2013-03-17"
2997 msgstr "2013-03-17"
2998
2999 #. type: TH
3000 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31
3001 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
3002 #: build/C/man2/open.2:51 build/C/man2/pipe.2:36 build/C/man2/read.2:35
3003 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32
3004 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13
3005 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
3006 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
3007 #, no-wrap
3008 msgid "Linux"
3009 msgstr "Linux"
3010
3011 #. type: Plain text
3012 #: build/C/man3/fopencookie.3:29
3013 msgid "fopencookie - opening a custom stream"
3014 msgstr ""
3015
3016 #. type: Plain text
3017 #: build/C/man3/fopencookie.3:36
3018 #, no-wrap
3019 msgid ""
3020 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3021 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3022 msgstr ""
3023 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3024 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3025
3026 #. type: Plain text
3027 #: build/C/man3/fopencookie.3:49
3028 msgid ""
3029 "The B<fopencookie>()  function allows the programmer to create a custom "
3030 "implementation for a standard I/O stream.  This implementation can store the "
3031 "stream's data at a location of its own choosing; for example, B<fopencookie>"
3032 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
3033 "to data that is stored in a buffer in memory."
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man3/fopencookie.3:51
3038 msgid "In order to create a custom stream the programmer must:"
3039 msgstr ""
3040
3041 #. type: IP
3042 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3043 #: build/C/man3/fopencookie.3:65 build/C/man2/open.2:469
3044 #: build/C/man2/open.2:477 build/C/man2/open.2:483 build/C/man2/open.2:489
3045 #: build/C/man2/open.2:496 build/C/man2/open.2:502 build/C/man3/scanf.3:633
3046 #: build/C/man3/scanf.3:638 build/C/man3/scanf.3:644
3047 #: build/C/man7/symlink.7:249 build/C/man7/symlink.7:259
3048 #: build/C/man7/symlink.7:289 build/C/man7/symlink.7:349
3049 #: build/C/man7/symlink.7:378 build/C/man7/symlink.7:407
3050 #: build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
3051 #, no-wrap
3052 msgid "*"
3053 msgstr "*"
3054
3055 #. type: Plain text
3056 #: build/C/man3/fopencookie.3:54
3057 msgid ""
3058 "Implement four \"hook\" functions that are used internally by the standard I/"
3059 "O library when performing I/O on the stream."
3060 msgstr ""
3061
3062 #. type: Plain text
3063 #: build/C/man3/fopencookie.3:65
3064 msgid ""
3065 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3066 "information (e.g., where to store data) used by the aforementioned hook "
3067 "functions.  The standard I/O package knows nothing about the contents of "
3068 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3069 "()), but automatically supplies the cookie as the first argument when "
3070 "calling the hook functions."
3071 msgstr ""
3072
3073 #. type: Plain text
3074 #: build/C/man3/fopencookie.3:70
3075 msgid ""
3076 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3077 "hook functions with that stream."
3078 msgstr ""
3079
3080 #. type: Plain text
3081 #: build/C/man3/fopencookie.3:78
3082 msgid ""
3083 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3084 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3085 "operate on that stream."
3086 msgstr ""
3087
3088 #. type: Plain text
3089 #: build/C/man3/fopencookie.3:85
3090 msgid ""
3091 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3092 "to be associated with the new stream.  This pointer is supplied as the first "
3093 "argument when the standard I/O library invokes any of the hook functions "
3094 "described below."
3095 msgstr ""
3096
3097 #. type: Plain text
3098 #: build/C/man3/fopencookie.3:101
3099 msgid ""
3100 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3101 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3102 "See B<fopen>(3)  for details."
3103 msgstr ""
3104
3105 #. type: Plain text
3106 #: build/C/man3/fopencookie.3:107
3107 msgid ""
3108 "The I<io_funcs> argument is a structure that contains four fields pointing "
3109 "to the programmer-defined hook functions that are used to implement this "
3110 "stream.  The structure is defined as follows"
3111 msgstr ""
3112
3113 #. type: Plain text
3114 #: build/C/man3/fopencookie.3:116
3115 #, no-wrap
3116 msgid ""
3117 "typedef struct {\n"
3118 "    cookie_read_function_t  *read;\n"
3119 "    cookie_write_function_t *write;\n"
3120 "    cookie_seek_function_t  *seek;\n"
3121 "    cookie_close_function_t *close;\n"
3122 "} cookie_io_functions_t;\n"
3123 msgstr ""
3124 "typedef struct {\n"
3125 "    cookie_read_function_t  *read;\n"
3126 "    cookie_write_function_t *write;\n"
3127 "    cookie_seek_function_t  *seek;\n"
3128 "    cookie_close_function_t *close;\n"
3129 "} cookie_io_functions_t;\n"
3130
3131 #. type: Plain text
3132 #: build/C/man3/fopencookie.3:120
3133 msgid "The four fields are as follows:"
3134 msgstr ""
3135
3136 #. type: TP
3137 #: build/C/man3/fopencookie.3:120
3138 #, no-wrap
3139 msgid "I<cookie_read_function_t *read>"
3140 msgstr "I<cookie_read_function_t *read>"
3141
3142 #. type: Plain text
3143 #: build/C/man3/fopencookie.3:124
3144 msgid ""
3145 "This function implements read operations for the stream.  When called, it "
3146 "receives three arguments:"
3147 msgstr ""
3148
3149 #. type: Plain text
3150 #: build/C/man3/fopencookie.3:126
3151 #, no-wrap
3152 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3153 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3154
3155 #. type: Plain text
3156 #: build/C/man3/fopencookie.3:141
3157 msgid ""
3158 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3159 "input data can be placed and the size of that buffer.  As its function "
3160 "result, the I<read> function should return the number of bytes copied into "
3161 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3162 "update the stream offset appropriately."
3163 msgstr ""
3164
3165 #. type: Plain text
3166 #: build/C/man3/fopencookie.3:146
3167 msgid ""
3168 "If I<*read> is a NULL pointer, then reads from the custom stream always "
3169 "return end of file."
3170 msgstr ""
3171
3172 #. type: TP
3173 #: build/C/man3/fopencookie.3:146
3174 #, no-wrap
3175 msgid "I<cookie_write_function_t *write>"
3176 msgstr "I<cookie_write_function_t *write>"
3177
3178 #. type: Plain text
3179 #: build/C/man3/fopencookie.3:150
3180 msgid ""
3181 "This function implements write operations for the stream.  When called, it "
3182 "receives three arguments:"
3183 msgstr ""
3184
3185 #. type: Plain text
3186 #: build/C/man3/fopencookie.3:152
3187 #, no-wrap
3188 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3189 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3190
3191 #. type: Plain text
3192 #: build/C/man3/fopencookie.3:168
3193 msgid ""
3194 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3195 "output to the stream and the size of that buffer.  As its function result, "
3196 "the I<write> function should return the number of bytes copied from I<buf>, "
3197 "or 0 on error.  (The function must not return a negative value.)  The "
3198 "I<write> function should update the stream offset appropriately."
3199 msgstr ""
3200
3201 #. type: Plain text
3202 #: build/C/man3/fopencookie.3:173
3203 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3204 msgstr ""
3205
3206 #. type: TP
3207 #: build/C/man3/fopencookie.3:173
3208 #, no-wrap
3209 msgid "I<cookie_seek_function_t *seek>"
3210 msgstr "I<cookie_seek_function_t *seek>"
3211
3212 #. type: Plain text
3213 #: build/C/man3/fopencookie.3:177
3214 msgid ""
3215 "This function implements seek operations on the stream.  When called, it "
3216 "receives three arguments:"
3217 msgstr ""
3218
3219 #. type: Plain text
3220 #: build/C/man3/fopencookie.3:179
3221 #, no-wrap
3222 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3223 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3224
3225 #. type: Plain text
3226 #: build/C/man3/fopencookie.3:185
3227 msgid ""
3228 "The I<*offset> argument specifies the new file offset depending on which of "
3229 "the following three values is supplied in I<whence>:"
3230 msgstr ""
3231
3232 #. type: TP
3233 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3234 #, no-wrap
3235 msgid "B<SEEK_SET>"
3236 msgstr "B<SEEK_SET>"
3237
3238 #. type: Plain text
3239 #: build/C/man3/fopencookie.3:191
3240 msgid ""
3241 "The stream offset should be set I<*offset> bytes from the start of the "
3242 "stream."
3243 msgstr ""
3244
3245 #. type: TP
3246 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3247 #, no-wrap
3248 msgid "B<SEEK_CUR>"
3249 msgstr "B<SEEK_CUR>"
3250
3251 #. type: Plain text
3252 #: build/C/man3/fopencookie.3:195
3253 msgid "I<*offset> should be added to the current stream offset."
3254 msgstr ""
3255
3256 #. type: TP
3257 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3258 #, no-wrap
3259 msgid "B<SEEK_END>"
3260 msgstr "B<SEEK_END>"
3261
3262 #. type: Plain text
3263 #: build/C/man3/fopencookie.3:199
3264 msgid ""
3265 "The stream offset should be set to the size of the stream plus I<*offset>."
3266 msgstr ""
3267
3268 #. type: Plain text
3269 #: build/C/man3/fopencookie.3:206
3270 msgid ""
3271 "Before returning, the I<seek> function should update I<*offset> to indicate "
3272 "the new stream offset."
3273 msgstr ""
3274
3275 #. type: Plain text
3276 #: build/C/man3/fopencookie.3:210
3277 msgid ""
3278 "As its function result, the I<seek> function should return 0 on success, and "
3279 "-1 on error."
3280 msgstr ""
3281
3282 #. type: Plain text
3283 #: build/C/man3/fopencookie.3:215
3284 msgid ""
3285 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3286 "operations on the stream."
3287 msgstr ""
3288
3289 #. type: TP
3290 #: build/C/man3/fopencookie.3:215
3291 #, no-wrap
3292 msgid "I<cookie_close_function_t *close>"
3293 msgstr "I<cookie_close_function_t *close>"
3294
3295 #. type: Plain text
3296 #: build/C/man3/fopencookie.3:221
3297 msgid ""
3298 "This function closes the stream.  The hook function can do things such as "
3299 "freeing buffers allocated for the stream.  When called, it receives one "
3300 "argument:"
3301 msgstr ""
3302
3303 #. type: Plain text
3304 #: build/C/man3/fopencookie.3:223
3305 #, no-wrap
3306 msgid "    int close(void *cookie);\n"
3307 msgstr "    int close(void *cookie);\n"
3308
3309 #. type: Plain text
3310 #: build/C/man3/fopencookie.3:228
3311 msgid ""
3312 "The I<cookie> argument is the cookie that the programmer supplied when "
3313 "calling B<fopencookie>()."
3314 msgstr ""
3315
3316 #. type: Plain text
3317 #: build/C/man3/fopencookie.3:234
3318 msgid ""
3319 "As its function result, the I<close> function should return 0 on success, "
3320 "and B<EOF> on error."
3321 msgstr ""
3322
3323 #. type: Plain text
3324 #: build/C/man3/fopencookie.3:238
3325 msgid ""
3326 "If I<*close> is NULL, then no special action is performed when the stream is "
3327 "closed."
3328 msgstr ""
3329
3330 #.  .SH ERRORS
3331 #.  It's not clear if errno ever gets set...
3332 #. type: Plain text
3333 #: build/C/man3/fopencookie.3:245
3334 msgid ""
3335 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3336 "NULL is returned."
3337 msgstr ""
3338
3339 #. type: Plain text
3340 #: build/C/man3/fopencookie.3:247
3341 msgid "This function is a nonstandard GNU extension."
3342 msgstr ""
3343
3344 #. type: Plain text
3345 #: build/C/man3/fopencookie.3:256
3346 msgid ""
3347 "The program below implements a custom stream whose functionality is similar "
3348 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3349 "stream whose data is stored in a memory buffer.  The program writes its "
3350 "command-line arguments to the stream, and then seeks through the stream "
3351 "reading two out of every five characters and writing them to standard "
3352 "output.  The following shell session demonstrates the use of the program:"
3353 msgstr ""
3354
3355 #. type: Plain text
3356 #: build/C/man3/fopencookie.3:264
3357 #, no-wrap
3358 msgid ""
3359 "$B< ./a.out \\(aqhello world\\(aq>\n"
3360 "/he/\n"
3361 "/ w/\n"
3362 "/d/\n"
3363 "Reached end of file\n"
3364 msgstr ""
3365 "$B< ./a.out \\(aqhello world\\(aq>\n"
3366 "/he/\n"
3367 "/ w/\n"
3368 "/d/\n"
3369 "Reached end of file\n"
3370
3371 #. type: Plain text
3372 #: build/C/man3/fopencookie.3:271
3373 msgid ""
3374 "Note that a more general version of the program below could be improved to "
3375 "more robustly handle various error situations (e.g., opening a stream with a "
3376 "cookie that already has an open stream; closing a stream that has already "
3377 "been closed)."
3378 msgstr ""
3379
3380 #. type: Plain text
3381 #: build/C/man3/fopencookie.3:280
3382 #, no-wrap
3383 msgid ""
3384 "#define _GNU_SOURCE\n"
3385 "#include E<lt>sys/types.hE<gt>\n"
3386 "#include E<lt>stdio.hE<gt>\n"
3387 "#include E<lt>stdlib.hE<gt>\n"
3388 "#include E<lt>unistd.hE<gt>\n"
3389 "#include E<lt>string.hE<gt>\n"
3390 msgstr ""
3391 "#define _GNU_SOURCE\n"
3392 "#include E<lt>sys/types.hE<gt>\n"
3393 "#include E<lt>stdio.hE<gt>\n"
3394 "#include E<lt>stdlib.hE<gt>\n"
3395 "#include E<lt>unistd.hE<gt>\n"
3396 "#include E<lt>string.hE<gt>\n"
3397
3398 #. type: Plain text
3399 #: build/C/man3/fopencookie.3:282
3400 #, no-wrap
3401 msgid "#define INIT_BUF_SIZE 4\n"
3402 msgstr "#define INIT_BUF_SIZE 4\n"
3403
3404 #. type: Plain text
3405 #: build/C/man3/fopencookie.3:289
3406 #, no-wrap
3407 msgid ""
3408 "struct memfile_cookie {\n"
3409 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3410 "    size_t  allocated;  /* Size of buf */\n"
3411 "    size_t  endpos;     /* Number of characters in buf */\n"
3412 "    off_t   offset;     /* Current file offset in buf */\n"
3413 "};\n"
3414 msgstr ""
3415 "struct memfile_cookie {\n"
3416 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3417 "    size_t  allocated;  /* Size of buf */\n"
3418 "    size_t  endpos;     /* Number of characters in buf */\n"
3419 "    off_t   offset;     /* Current file offset in buf */\n"
3420 "};\n"
3421
3422 #. type: Plain text
3423 #: build/C/man3/fopencookie.3:295
3424 #, no-wrap
3425 msgid ""
3426 "ssize_t\n"
3427 "memfile_write(void *c, const char *buf, size_t size)\n"
3428 "{\n"
3429 "    char *new_buff;\n"
3430 "    struct memfile_cookie *cookie = c;\n"
3431 msgstr ""
3432 "ssize_t\n"
3433 "memfile_write(void *c, const char *buf, size_t size)\n"
3434 "{\n"
3435 "    char *new_buff;\n"
3436 "    struct memfile_cookie *cookie = c;\n"
3437
3438 #. type: Plain text
3439 #: build/C/man3/fopencookie.3:297
3440 #, no-wrap
3441 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3442 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3443
3444 #. type: Plain text
3445 #: build/C/man3/fopencookie.3:307
3446 #, no-wrap
3447 msgid ""
3448 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3449 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3450 "        if (new_buff == NULL) {\n"
3451 "            return -1;\n"
3452 "        } else {\n"
3453 "            cookie-E<gt>allocated *= 2;\n"
3454 "            cookie-E<gt>buf = new_buff;\n"
3455 "        }\n"
3456 "    }\n"
3457 msgstr ""
3458 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3459 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3460 "        if (new_buff == NULL) {\n"
3461 "            return -1;\n"
3462 "        } else {\n"
3463 "            cookie-E<gt>allocated *= 2;\n"
3464 "            cookie-E<gt>buf = new_buff;\n"
3465 "        }\n"
3466 "    }\n"
3467
3468 #. type: Plain text
3469 #: build/C/man3/fopencookie.3:309
3470 #, no-wrap
3471 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3472 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3473
3474 #. type: Plain text
3475 #: build/C/man3/fopencookie.3:313
3476 #, no-wrap
3477 msgid ""
3478 "    cookie-E<gt>offset += size;\n"
3479 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3480 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3481 msgstr ""
3482 "    cookie-E<gt>offset += size;\n"
3483 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3484 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3485
3486 #. type: Plain text
3487 #: build/C/man3/fopencookie.3:316
3488 #, no-wrap
3489 msgid ""
3490 "    return size;\n"
3491 "}\n"
3492 msgstr ""
3493 "    return size;\n"
3494 "}\n"
3495
3496 #. type: Plain text
3497 #: build/C/man3/fopencookie.3:322
3498 #, no-wrap
3499 msgid ""
3500 "ssize_t\n"
3501 "memfile_read(void *c, char *buf, size_t size)\n"
3502 "{\n"
3503 "    ssize_t xbytes;\n"
3504 "    struct memfile_cookie *cookie = c;\n"
3505 msgstr ""
3506 "ssize_t\n"
3507 "memfile_read(void *c, char *buf, size_t size)\n"
3508 "{\n"
3509 "    ssize_t xbytes;\n"
3510 "    struct memfile_cookie *cookie = c;\n"
3511
3512 #. type: Plain text
3513 #: build/C/man3/fopencookie.3:324
3514 #, no-wrap
3515 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3516 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3517
3518 #. type: Plain text
3519 #: build/C/man3/fopencookie.3:330
3520 #, no-wrap
3521 msgid ""
3522 "    xbytes = size;\n"
3523 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3524 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3525 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3526 "       xbytes = 0;\n"
3527 msgstr ""
3528 "    xbytes = size;\n"
3529 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3530 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3531 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3532 "       xbytes = 0;\n"
3533
3534 #. type: Plain text
3535 #: build/C/man3/fopencookie.3:332
3536 #, no-wrap
3537 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3538 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3539
3540 #. type: Plain text
3541 #: build/C/man3/fopencookie.3:336
3542 #, no-wrap
3543 msgid ""
3544 "    cookie-E<gt>offset += xbytes;\n"
3545 "    return xbytes;\n"
3546 "}\n"
3547 msgstr ""
3548 "    cookie-E<gt>offset += xbytes;\n"
3549 "    return xbytes;\n"
3550 "}\n"
3551
3552 #. type: Plain text
3553 #: build/C/man3/fopencookie.3:342
3554 #, no-wrap
3555 msgid ""
3556 "int\n"
3557 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3558 "{\n"
3559 "    off64_t new_offset;\n"
3560 "    struct memfile_cookie *cookie = c;\n"
3561 msgstr ""
3562 "int\n"
3563 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3564 "{\n"
3565 "    off64_t new_offset;\n"
3566 "    struct memfile_cookie *cookie = c;\n"
3567
3568 #. type: Plain text
3569 #: build/C/man3/fopencookie.3:351
3570 #, no-wrap
3571 msgid ""
3572 "    if (whence == SEEK_SET)\n"
3573 "        new_offset = *offset;\n"
3574 "    else if (whence == SEEK_END)\n"
3575 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3576 "    else if (whence == SEEK_CUR)\n"
3577 "        new_offset = cookie-E<gt>offset + *offset;\n"
3578 "    else\n"
3579 "        return -1;\n"
3580 msgstr ""
3581 "    if (whence == SEEK_SET)\n"
3582 "        new_offset = *offset;\n"
3583 "    else if (whence == SEEK_END)\n"
3584 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3585 "    else if (whence == SEEK_CUR)\n"
3586 "        new_offset = cookie-E<gt>offset + *offset;\n"
3587 "    else\n"
3588 "        return -1;\n"
3589
3590 #. type: Plain text
3591 #: build/C/man3/fopencookie.3:354
3592 #, no-wrap
3593 msgid ""
3594 "    if (new_offset E<lt> 0)\n"
3595 "        return -1;\n"
3596 msgstr ""
3597 "    if (new_offset E<lt> 0)\n"
3598 "        return -1;\n"
3599
3600 #. type: Plain text
3601 #: build/C/man3/fopencookie.3:359
3602 #, no-wrap
3603 msgid ""
3604 "    cookie-E<gt>offset = new_offset;\n"
3605 "    *offset = new_offset;\n"
3606 "    return 0;\n"
3607 "}\n"
3608 msgstr ""
3609 "    cookie-E<gt>offset = new_offset;\n"
3610 "    *offset = new_offset;\n"
3611 "    return 0;\n"
3612 "}\n"
3613
3614 #. type: Plain text
3615 #: build/C/man3/fopencookie.3:364
3616 #, no-wrap
3617 msgid ""
3618 "int\n"
3619 "memfile_close(void *c)\n"
3620 "{\n"
3621 "    struct memfile_cookie *cookie = c;\n"
3622 msgstr ""
3623 "int\n"
3624 "memfile_close(void *c)\n"
3625 "{\n"
3626 "    struct memfile_cookie *cookie = c;\n"
3627
3628 #. type: Plain text
3629 #: build/C/man3/fopencookie.3:368
3630 #, no-wrap
3631 msgid ""
3632 "    free(cookie-E<gt>buf);\n"
3633 "    cookie-E<gt>allocated = 0;\n"
3634 "    cookie-E<gt>buf = NULL;\n"
3635 msgstr ""
3636 "    free(cookie-E<gt>buf);\n"
3637 "    cookie-E<gt>allocated = 0;\n"
3638 "    cookie-E<gt>buf = NULL;\n"
3639
3640 #. type: Plain text
3641 #: build/C/man3/fopencookie.3:371
3642 #, no-wrap
3643 msgid ""
3644 "    return 0;\n"
3645 "}\n"
3646 msgstr ""
3647 "    return 0;\n"
3648 "}\n"
3649
3650 #. type: Plain text
3651 #: build/C/man3/fopencookie.3:387
3652 #, no-wrap
3653 msgid ""
3654 "int\n"
3655 "main(int argc, char *argv[])\n"
3656 "{\n"
3657 "    cookie_io_functions_t  memfile_func = {\n"
3658 "        .read  = memfile_read,\n"
3659 "        .write = memfile_write,\n"
3660 "        .seek  = memfile_seek,\n"
3661 "        .close = memfile_close\n"
3662 "    };\n"
3663 "    FILE *fp;\n"
3664 "    struct memfile_cookie mycookie;\n"
3665 "    ssize_t nread;\n"
3666 "    long p;\n"
3667 "    int j;\n"
3668 "    char buf[1000];\n"
3669 msgstr ""
3670 "int\n"
3671 "main(int argc, char *argv[])\n"
3672 "{\n"
3673 "    cookie_io_functions_t  memfile_func = {\n"
3674 "        .read  = memfile_read,\n"
3675 "        .write = memfile_write,\n"
3676 "        .seek  = memfile_seek,\n"
3677 "        .close = memfile_close\n"
3678 "    };\n"
3679 "    FILE *fp;\n"
3680 "    struct memfile_cookie mycookie;\n"
3681 "    ssize_t nread;\n"
3682 "    long p;\n"
3683 "    int j;\n"
3684 "    char buf[1000];\n"
3685
3686 #. type: Plain text
3687 #: build/C/man3/fopencookie.3:389
3688 #, no-wrap
3689 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3690 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3691
3692 #. type: Plain text
3693 #: build/C/man3/fopencookie.3:395
3694 #, no-wrap
3695 msgid ""
3696 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3697 "    if (mycookie.buf == NULL) {\n"
3698 "        perror(\"malloc\");\n"
3699 "        exit(EXIT_FAILURE);\n"
3700 "    }\n"
3701 msgstr ""
3702 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3703 "    if (mycookie.buf == NULL) {\n"
3704 "        perror(\"malloc\");\n"
3705 "        exit(EXIT_FAILURE);\n"
3706 "    }\n"
3707
3708 #. type: Plain text
3709 #: build/C/man3/fopencookie.3:399
3710 #, no-wrap
3711 msgid ""
3712 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3713 "    mycookie.offset = 0;\n"
3714 "    mycookie.endpos = 0;\n"
3715 msgstr ""
3716 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3717 "    mycookie.offset = 0;\n"
3718 "    mycookie.endpos = 0;\n"
3719
3720 #. type: Plain text
3721 #: build/C/man3/fopencookie.3:405
3722 #, no-wrap
3723 msgid ""
3724 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3725 "    if (fp == NULL) {\n"
3726 "        perror(\"fopencookie\");\n"
3727 "        exit(EXIT_FAILURE);\n"
3728 "    }\n"
3729 msgstr ""
3730 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3731 "    if (fp == NULL) {\n"
3732 "        perror(\"fopencookie\");\n"
3733 "        exit(EXIT_FAILURE);\n"
3734 "    }\n"
3735
3736 #. type: Plain text
3737 #: build/C/man3/fopencookie.3:407
3738 #, no-wrap
3739 msgid "    /* Write command-line arguments to our file */\n"
3740 msgstr "    /* Write command-line arguments to our file */\n"
3741
3742 #. type: Plain text
3743 #: build/C/man3/fopencookie.3:413
3744 #, no-wrap
3745 msgid ""
3746 "    for (j = 1; j E<lt> argc; j++)\n"
3747 "        if (fputs(argv[j], fp) == EOF) {\n"
3748 "            perror(\"fputs\");\n"
3749 "            exit(EXIT_FAILURE);\n"
3750 "        }\n"
3751 msgstr ""
3752 "    for (j = 1; j E<lt> argc; j++)\n"
3753 "        if (fputs(argv[j], fp) == EOF) {\n"
3754 "            perror(\"fputs\");\n"
3755 "            exit(EXIT_FAILURE);\n"
3756 "        }\n"
3757
3758 #. type: Plain text
3759 #: build/C/man3/fopencookie.3:415
3760 #, no-wrap
3761 msgid "    /* Read two bytes out of every five, until EOF */\n"
3762 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3763
3764 #. type: Plain text
3765 #: build/C/man3/fopencookie.3:430
3766 #, no-wrap
3767 msgid ""
3768 "    for (p = 0; ; p += 5) {\n"
3769 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3770 "            perror(\"fseek\");\n"
3771 "            exit(EXIT_FAILURE);\n"
3772 "        }\n"
3773 "        nread = fread(buf, 1, 2, fp);\n"
3774 "        if (nread == -1) {\n"
3775 "            perror(\"fread\");\n"
3776 "            exit(EXIT_FAILURE);\n"
3777 "        }\n"
3778 "        if (nread == 0) {\n"
3779 "            printf(\"Reached end of file\\en\");\n"
3780 "            break;\n"
3781 "        }\n"
3782 msgstr ""
3783 "    for (p = 0; ; p += 5) {\n"
3784 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3785 "            perror(\"fseek\");\n"
3786 "            exit(EXIT_FAILURE);\n"
3787 "        }\n"
3788 "        nread = fread(buf, 1, 2, fp);\n"
3789 "        if (nread == -1) {\n"
3790 "            perror(\"fread\");\n"
3791 "            exit(EXIT_FAILURE);\n"
3792 "        }\n"
3793 "        if (nread == 0) {\n"
3794 "            printf(\"Reached end of file\\en\");\n"
3795 "            break;\n"
3796 "        }\n"
3797
3798 #. type: Plain text
3799 #: build/C/man3/fopencookie.3:433
3800 #, no-wrap
3801 msgid ""
3802 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3803 "    }\n"
3804 msgstr ""
3805 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3806 "    }\n"
3807
3808 #. type: Plain text
3809 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
3810 #, no-wrap
3811 msgid ""
3812 "    exit(EXIT_SUCCESS);\n"
3813 "}\n"
3814 msgstr ""
3815 "    exit(EXIT_SUCCESS);\n"
3816 "}\n"
3817
3818 #. type: Plain text
3819 #: build/C/man3/fopencookie.3:442
3820 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3821 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3822
3823 #. type: TH
3824 #: build/C/man3/fpurge.3:25
3825 #, no-wrap
3826 msgid "FPURGE"
3827 msgstr "FPURGE"
3828
3829 #. type: TH
3830 #: build/C/man3/fpurge.3:25
3831 #, no-wrap
3832 msgid "2001-12-15"
3833 msgstr "2001-12-15"
3834
3835 #. type: Plain text
3836 #: build/C/man3/fpurge.3:28
3837 msgid "fpurge, __fpurge - purge a stream"
3838 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3839
3840 #. type: Plain text
3841 #: build/C/man3/fpurge.3:32
3842 #, no-wrap
3843 msgid ""
3844 "/* unsupported */\n"
3845 "B<#include E<lt>stdio.hE<gt>>\n"
3846 msgstr ""
3847 "/* unsupported */\n"
3848 "B<#include E<lt>stdio.hE<gt>>\n"
3849
3850 #. type: Plain text
3851 #: build/C/man3/fpurge.3:34
3852 #, no-wrap
3853 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3854 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3855
3856 #. type: Plain text
3857 #: build/C/man3/fpurge.3:37
3858 #, no-wrap
3859 msgid ""
3860 "/* supported */\n"
3861 "B<#include E<lt>stdio.hE<gt>>\n"
3862 msgstr ""
3863 "/* supported */\n"
3864 "B<#include E<lt>stdio.hE<gt>>\n"
3865
3866 #. type: Plain text
3867 #: build/C/man3/fpurge.3:39
3868 #, no-wrap
3869 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3870 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3871
3872 #. type: Plain text
3873 #: build/C/man3/fpurge.3:41
3874 #, no-wrap
3875 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3876 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3877
3878 #. type: Plain text
3879 #: build/C/man3/fpurge.3:54
3880 msgid ""
3881 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3882 "output streams this discards any unwritten output.  For input streams this "
3883 "discards any input read from the underlying object but not yet obtained via "
3884 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3885 "B<fflush>(3)."
3886 msgstr ""
3887 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3888 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3889 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3890 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3891 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3892
3893 #. type: Plain text
3894 #: build/C/man3/fpurge.3:58
3895 msgid ""
3896 "The function B<__fpurge>()  does precisely the same, but without returning a "
3897 "value."
3898 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3899
3900 #. type: Plain text
3901 #: build/C/man3/fpurge.3:65
3902 msgid ""
3903 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3904 "and sets I<errno> appropriately."
3905 msgstr ""
3906 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3907 "を適切な値に設定する。"
3908
3909 #. type: Plain text
3910 #: build/C/man3/fpurge.3:70
3911 msgid "I<stream> is not an open stream."
3912 msgstr "I<stream> がオープンされていない。"
3913
3914 #. type: Plain text
3915 #: build/C/man3/fpurge.3:78
3916 msgid ""
3917 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3918 "was introduced in 4.4BSD and is not available under Linux.  The function "
3919 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3920 "later."
3921 msgstr ""
3922 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3923 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3924 "され、glibc 2.1.95 以降には存在している。"
3925
3926 #. type: Plain text
3927 #: build/C/man3/fpurge.3:80
3928 msgid "Usually it is a mistake to want to discard input buffers."
3929 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3930
3931 #.  .BR fclean (3),
3932 #. type: Plain text
3933 #: build/C/man3/fpurge.3:85
3934 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3935 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3936
3937 #. type: TH
3938 #: build/C/man3/fputwc.3:16
3939 #, no-wrap
3940 msgid "FPUTWC"
3941 msgstr "FPUTWC"
3942
3943 #. type: Plain text
3944 #: build/C/man3/fputwc.3:19
3945 msgid "fputwc, putwc - write a wide character to a FILE stream"
3946 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3947
3948 #. type: Plain text
3949 #: build/C/man3/fputwc.3:27
3950 #, no-wrap
3951 msgid ""
3952 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3953 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3954 msgstr ""
3955 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3956 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3957
3958 #. type: Plain text
3959 #: build/C/man3/fputwc.3:43
3960 msgid ""
3961 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3962 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3963 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3964 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3965 "it returns I<wc>."
3966 msgstr ""
3967 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3968 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3969 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3970 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3971 "関数は I<wc> を返す。"
3972
3973 #. type: Plain text
3974 #: build/C/man3/fputwc.3:51
3975 msgid ""
3976 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3977 "may be implemented as a macro, and may evaluate its argument more than "
3978 "once.  There is no reason ever to use it."
3979 msgstr ""
3980 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3981 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3982 "ない。この関数を使う理由はもはや存在しない。"
3983
3984 #. type: Plain text
3985 #: build/C/man3/fputwc.3:63
3986 msgid ""
3987 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3988 "indicate an error.  In the event of an error, I<errno> is set to indicate "
3989 "the cause."
3990 msgstr ""
3991 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3992 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
3993
3994 #. type: Plain text
3995 #: build/C/man3/fputwc.3:68
3996 msgid "Conversion of I<wc> to the stream's encoding fails."
3997 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3998
3999 #. type: Plain text
4000 #: build/C/man3/fputwc.3:77
4001 msgid ""
4002 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
4003 "current locale."
4004 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
4005
4006 #. type: Plain text
4007 #: build/C/man3/fputwc.3:85
4008 msgid ""
4009 "In the absence of additional information passed to the B<fopen>(3)  call, it "
4010 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4011 "sequence corresponding to the wide character I<wc>."
4012 msgstr ""
4013 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4014 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4015 "よい。"
4016
4017 #. type: Plain text
4018 #: build/C/man3/fputwc.3:89
4019 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4020 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4021
4022 #. type: TH
4023 #: build/C/man3/fread.3:45
4024 #, no-wrap
4025 msgid "FREAD"
4026 msgstr "FREAD"
4027
4028 #. type: TH
4029 #: build/C/man3/fread.3:45
4030 #, no-wrap
4031 msgid "2012-03-30"
4032 msgstr "2012-03-30"
4033
4034 #. type: Plain text
4035 #: build/C/man3/fread.3:48
4036 msgid "fread, fwrite - binary stream input/output"
4037 msgstr "fread, fwrite - バイナリストリームの入出力"
4038
4039 #. type: Plain text
4040 #: build/C/man3/fread.3:54
4041 #, no-wrap
4042 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4043 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4044
4045 #. type: Plain text
4046 #: build/C/man3/fread.3:57
4047 #, no-wrap
4048 msgid ""
4049 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4050 "B<              FILE *>I<stream>B<);>\n"
4051 msgstr ""
4052 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4053 "B<              FILE *>I<stream>B<);>\n"
4054
4055 #. type: Plain text
4056 #: build/C/man3/fread.3:69
4057 msgid ""
4058 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4059 "long, from the stream pointed to by I<stream>, storing them at the location "
4060 "given by I<ptr>."
4061 msgstr ""
4062 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4063 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4064 "I<size> バイトの長さを持つ。"
4065
4066 #. type: Plain text
4067 #: build/C/man3/fread.3:80
4068 msgid ""
4069 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4070 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4071 "location given by I<ptr>."
4072 msgstr ""
4073 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4074 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4075 "バイトの長さを持つ。"
4076
4077 #. type: Plain text
4078 #: build/C/man3/fread.3:96
4079 msgid ""
4080 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4081 "or written.  This number equals the number of bytes transferred only when "
4082 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4083 "return value is a short item count (or zero)."
4084 msgstr ""
4085 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4086 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4087 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4088 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4089
4090 #. type: Plain text
4091 #: build/C/man3/fread.3:103
4092 msgid ""
4093 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4094 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4095 msgstr ""
4096 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4097 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4098 "らない。"
4099
4100 #. type: Plain text
4101 #: build/C/man3/fread.3:105
4102 msgid "C89, POSIX.1-2001."
4103 msgstr "C89, POSIX.1-2001."
4104
4105 #. type: Plain text
4106 #: build/C/man3/fread.3:111
4107 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4108 msgstr ""
4109 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4110
4111 #. type: TH
4112 #: build/C/man3/fseek.3:42
4113 #, no-wrap
4114 msgid "FSEEK"
4115 msgstr "FSEEK"
4116
4117 #. type: TH
4118 #: build/C/man3/fseek.3:42
4119 #, no-wrap
4120 msgid "1993-11-29"
4121 msgstr "1993-11-29"
4122
4123 #. type: Plain text
4124 #: build/C/man3/fseek.3:45
4125 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4126 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4127
4128 #. type: Plain text
4129 #: build/C/man3/fseek.3:49
4130 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4131 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4132
4133 #. type: Plain text
4134 #: build/C/man3/fseek.3:51
4135 msgid "B<long ftell(FILE *>I<stream>B<);>"
4136 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4137
4138 #. type: Plain text
4139 #: build/C/man3/fseek.3:53
4140 msgid "B<void rewind(FILE *>I<stream>B<);>"
4141 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4142
4143 #. type: Plain text
4144 #: build/C/man3/fseek.3:55
4145 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4146 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4147
4148 #. type: Plain text
4149 #: build/C/man3/fseek.3:57
4150 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4151 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4152
4153 #. type: Plain text
4154 #: build/C/man3/fseek.3:81
4155 msgid ""
4156 "The B<fseek>()  function sets the file position indicator for the stream "
4157 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4158 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4159 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4160 "relative to the start of the file, the current position indicator, or end-of-"
4161 "file, respectively.  A successful call to the B<fseek>()  function clears "
4162 "the end-of-file indicator for the stream and undoes any effects of the "
4163 "B<ungetc>(3)  function on the same stream."
4164 msgstr ""
4165 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4166 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4167 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4168 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4169 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4170 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4171 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4172 "かったことになる。"
4173
4174 #. type: Plain text
4175 #: build/C/man3/fseek.3:87
4176 msgid ""
4177 "The B<ftell>()  function obtains the current value of the file position "
4178 "indicator for the stream pointed to by I<stream>."
4179 msgstr ""
4180 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4181 "置表示子 の現時点での値を与える。"
4182
4183 #. type: Plain text
4184 #: build/C/man3/fseek.3:94
4185 msgid ""
4186 "The B<rewind>()  function sets the file position indicator for the stream "
4187 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4188 msgstr ""
4189 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4190 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4191
4192 #. type: Plain text
4193 #: build/C/man3/fseek.3:97
4194 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4195 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4196
4197 #. type: Plain text
4198 #: build/C/man3/fseek.3:101
4199 msgid ""
4200 "except that the error indicator for the stream is also cleared (see "
4201 "B<clearerr>(3))."
4202 msgstr ""
4203 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4204 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4205
4206 #. type: Plain text
4207 #: build/C/man3/fseek.3:121
4208 msgid ""
4209 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4210 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4211 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4212 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4213 "I<fpos_t> object may be a complex object and these routines may be the only "
4214 "way to portably reposition a text stream."
4215 msgstr ""
4216 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4217 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4218 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4219 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4220 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4221 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4222 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4223
4224 #. type: Plain text
4225 #: build/C/man3/fseek.3:136
4226 msgid ""
4227 "The B<rewind>()  function returns no value.  Upon successful completion, "
4228 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4229 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4230 "indicate the error."
4231 msgstr ""
4232 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4233 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4234 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4235
4236 #. type: Plain text
4237 #: build/C/man3/fseek.3:142
4238 msgid "The I<stream> specified is not a seekable stream."
4239 msgstr "指定した I<stream> がシークできない。"
4240
4241 #. type: Plain text
4242 #: build/C/man3/fseek.3:153
4243 msgid ""
4244 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4245 "B<SEEK_CUR>."
4246 msgstr ""
4247 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4248 "B<SEEK_CUR> 以外の値であった。"
4249
4250 #. type: Plain text
4251 #: build/C/man3/fseek.3:168
4252 msgid ""
4253 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4254 "also fail and set I<errno> for any of the errors specified for the routines "
4255 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4256 msgstr ""
4257 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4258 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4259 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4260
4261 #. type: Plain text
4262 #: build/C/man3/fseek.3:173
4263 msgid "B<lseek>(2), B<fseeko>(3)"
4264 msgstr "B<lseek>(2), B<fseeko>(3)"
4265
4266 #. type: TH
4267 #: build/C/man3/fseeko.3:25
4268 #, no-wrap
4269 msgid "FSEEKO"
4270 msgstr "FSEEKO"
4271
4272 #. type: TH
4273 #: build/C/man3/fseeko.3:25
4274 #, no-wrap
4275 msgid "2001-11-05"
4276 msgstr "2001-11-05"
4277
4278 #. type: Plain text
4279 #: build/C/man3/fseeko.3:28
4280 msgid "fseeko, ftello - seek to or report file position"
4281 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4282
4283 #. type: Plain text
4284 #: build/C/man3/fseeko.3:33
4285 #, no-wrap
4286 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4287 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4288
4289 #. type: Plain text
4290 #: build/C/man3/fseeko.3:36
4291 #, no-wrap
4292 msgid ""
4293 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4294 "\n"
4295 msgstr ""
4296 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4297 "\n"
4298
4299 #. type: Plain text
4300 #: build/C/man3/fseeko.3:58
4301 msgid ""
4302 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4303 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4304 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4305 "I<off_t> instead of I<long>."
4306 msgstr ""
4307 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4308 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4309 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4310 "I<off_t> になっている。"
4311
4312 #. type: Plain text
4313 #: build/C/man3/fseeko.3:65
4314 msgid ""
4315 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4316 "compilation with"
4317 msgstr ""
4318 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4319
4320 #. type: Plain text
4321 #: build/C/man3/fseeko.3:69 build/C/man3/lseek64.3:81
4322 #, no-wrap
4323 msgid "#define _FILE_OFFSET_BITS 64\n"
4324 msgstr "#define _FILE_OFFSET_BITS 64\n"
4325
4326 #. type: Plain text
4327 #: build/C/man3/fseeko.3:75
4328 msgid "will turn I<off_t> into a 64-bit type."
4329 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4330
4331 #. type: Plain text
4332 #: build/C/man3/fseeko.3:84
4333 msgid ""
4334 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4335 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4336 "indicate the error."
4337 msgstr ""
4338 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4339 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4340
4341 #. type: Plain text
4342 #: build/C/man3/fseeko.3:87
4343 msgid "See the ERRORS in B<fseek>(3)."
4344 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4345
4346 #. type: Plain text
4347 #: build/C/man3/fseeko.3:89
4348 msgid "SUSv2, POSIX.1-2001."
4349 msgstr "SUSv2, POSIX.1-2001."
4350
4351 #. type: Plain text
4352 #: build/C/man3/fseeko.3:93
4353 msgid ""
4354 "These functions are found on System V-like systems.  They are not present in "
4355 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4356 msgstr ""
4357 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4358 "かったが、 glibc 2.1 から使えるようになった。"
4359
4360 #. type: Plain text
4361 #: build/C/man3/fseeko.3:95
4362 msgid "B<fseek>(3)"
4363 msgstr "B<fseek>(3)"
4364
4365 #. type: TH
4366 #: build/C/man3/getline.3:26
4367 #, no-wrap
4368 msgid "GETLINE"
4369 msgstr "GETLINE"
4370
4371 #. type: Plain text
4372 #: build/C/man3/getline.3:29
4373 msgid "getline, getdelim - delimited string input"
4374 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4375
4376 #. type: Plain text
4377 #: build/C/man3/getline.3:34
4378 #, no-wrap
4379 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4380 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4381
4382 #. type: Plain text
4383 #: build/C/man3/getline.3:37
4384 #, no-wrap
4385 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4386 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4387
4388 #. type: Plain text
4389 #: build/C/man3/getline.3:47
4390 msgid "B<getline>(), B<getdelim>():"
4391 msgstr "B<getline>(), B<getdelim>():"
4392
4393 #. type: Plain text
4394 #: build/C/man3/getline.3:52
4395 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4396 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4397
4398 #. type: Plain text
4399 #: build/C/man3/getline.3:65
4400 msgid ""
4401 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4402 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4403 "terminated and includes the newline character, if one was found."
4404 msgstr ""
4405 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4406 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4407 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4408
4409 #. type: Plain text
4410 #: build/C/man3/getline.3:75
4411 msgid ""
4412 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4413 "storing the line, which should be freed by the user program.  (In this case, "
4414 "the value in I<*n> is ignored.)"
4415 msgstr ""
4416 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4417 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4418 "合、 I<*n> の値は無視される)。"
4419
4420 #. type: Plain text
4421 #: build/C/man3/getline.3:93
4422 msgid ""
4423 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4424 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4425 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4426 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4427 msgstr ""
4428 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4429 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4430 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4431 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4432 "I<*n> を更新する。"
4433
4434 #. type: Plain text
4435 #: build/C/man3/getline.3:99
4436 msgid ""
4437 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4438 "to reflect the buffer address and allocated size respectively."
4439 msgstr ""
4440 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4441 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4442
4443 #. type: Plain text
4444 #: build/C/man3/getline.3:110
4445 msgid ""
4446 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4447 "than newline can be specified as the I<delimiter> argument.  As with "
4448 "B<getline>(), a delimiter character is not added if one was not present in "
4449 "the input before end of file was reached."
4450 msgstr ""
4451 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4452 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4453 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4454 "ファに追加しない。"
4455
4456 #. type: Plain text
4457 #: build/C/man3/getline.3:119
4458 msgid ""
4459 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4460 "read, including the delimiter character, but not including the terminating "
4461 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4462 "bytes in the line read."
4463 msgstr ""
4464 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4465 "字数には区切り文字は含まれるが、終端に使う NULL バイト (\\(aq\\e0\\(aq) は含"
4466 "まれない。 この値によって、読み込んだ行に含まれる NULL バイトを操作することが"
4467 "できる。"
4468
4469 #. type: Plain text
4470 #: build/C/man3/getline.3:125
4471 msgid ""
4472 "Both functions return -1 on failure to read a line (including end-of-file "
4473 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4474 msgstr ""
4475 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4476 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4477 "を示す値が設定される。"
4478
4479 #. type: Plain text
4480 #: build/C/man3/getline.3:135
4481 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4482 msgstr ""
4483 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4484 "I<stream> が有効でない)。"
4485
4486 #. type: Plain text
4487 #: build/C/man3/getline.3:137
4488 msgid "These functions are available since libc 4.6.27."
4489 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4490
4491 #. type: Plain text
4492 #: build/C/man3/getline.3:144
4493 msgid ""
4494 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4495 "were standardized in POSIX.1-2008."
4496 msgstr ""
4497 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4498 "POSIX.1-2008 で標準化された。"
4499
4500 #. type: Plain text
4501 #: build/C/man3/getline.3:149
4502 #, no-wrap
4503 msgid ""
4504 "#define _GNU_SOURCE\n"
4505 "#include E<lt>stdio.hE<gt>\n"
4506 "#include E<lt>stdlib.hE<gt>\n"
4507 msgstr ""
4508 "#define _GNU_SOURCE\n"
4509 "#include E<lt>stdio.hE<gt>\n"
4510 "#include E<lt>stdlib.hE<gt>\n"
4511
4512 #. type: Plain text
4513 #: build/C/man3/getline.3:157
4514 #, no-wrap
4515 msgid ""
4516 "int\n"
4517 "main(void)\n"
4518 "{\n"
4519 "    FILE *fp;\n"
4520 "    char *line = NULL;\n"
4521 "    size_t len = 0;\n"
4522 "    ssize_t read;\n"
4523 msgstr ""
4524 "int\n"
4525 "main(void)\n"
4526 "{\n"
4527 "    FILE *fp;\n"
4528 "    char *line = NULL;\n"
4529 "    size_t len = 0;\n"
4530 "    ssize_t read;\n"
4531
4532 #. type: Plain text
4533 #: build/C/man3/getline.3:161
4534 #, no-wrap
4535 msgid ""
4536 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4537 "    if (fp == NULL)\n"
4538 "        exit(EXIT_FAILURE);\n"
4539 msgstr ""
4540 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4541 "    if (fp == NULL)\n"
4542 "        exit(EXIT_FAILURE);\n"
4543
4544 #. type: Plain text
4545 #: build/C/man3/getline.3:166
4546 #, no-wrap
4547 msgid ""
4548 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4549 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4550 "        printf(\"%s\", line);\n"
4551 "    }\n"
4552 msgstr ""
4553 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4554 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4555 "        printf(\"%s\", line);\n"
4556 "    }\n"
4557
4558 #. type: Plain text
4559 #: build/C/man3/getline.3:170
4560 #, no-wrap
4561 msgid ""
4562 "    free(line);\n"
4563 "    exit(EXIT_SUCCESS);\n"
4564 "}\n"
4565 msgstr ""
4566 "    free(line);\n"
4567 "    exit(EXIT_SUCCESS);\n"
4568 "}\n"
4569
4570 #. type: Plain text
4571 #: build/C/man3/getline.3:178
4572 msgid ""
4573 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4574 msgstr ""
4575 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4576
4577 #. type: TH
4578 #: build/C/man3/gets.3:27
4579 #, no-wrap
4580 msgid "GETS"
4581 msgstr "GETS"
4582
4583 #. type: TH
4584 #: build/C/man3/gets.3:27
4585 #, no-wrap
4586 msgid "2012-01-18"
4587 msgstr "2012-01-18"
4588
4589 #. type: Plain text
4590 #: build/C/man3/gets.3:30
4591 msgid ""
4592 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4593 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4594
4595 #. type: Plain text
4596 #: build/C/man3/gets.3:35
4597 #, no-wrap
4598 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4599 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4600
4601 #. type: Plain text
4602 #: build/C/man3/gets.3:37
4603 #, no-wrap
4604 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4605 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4606
4607 #. type: Plain text
4608 #: build/C/man3/gets.3:39
4609 #, no-wrap
4610 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4611 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4612
4613 #. type: Plain text
4614 #: build/C/man3/gets.3:41
4615 #, no-wrap
4616 msgid "B<int getchar(void);>\n"
4617 msgstr "B<int getchar(void);>\n"
4618
4619 #. type: Plain text
4620 #: build/C/man3/gets.3:43
4621 #, no-wrap
4622 msgid "B<char *gets(char *>I<s>B<);>\n"
4623 msgstr "B<char *gets(char *>I<s>B<);>\n"
4624
4625 #. type: Plain text
4626 #: build/C/man3/gets.3:45
4627 #, no-wrap
4628 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4629 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4630
4631 #. type: Plain text
4632 #: build/C/man3/gets.3:57
4633 msgid ""
4634 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4635 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4636 msgstr ""
4637 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4638 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4639 "す。"
4640
4641 #. type: Plain text
4642 #: build/C/man3/gets.3:64
4643 msgid ""
4644 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4645 "a macro which evaluates I<stream> more than once."
4646 msgstr ""
4647 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4648 "実装されているかもしれない。"
4649
4650 #. type: Plain text
4651 #: build/C/man3/gets.3:68
4652 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4653 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4654
4655 #. type: Plain text
4656 #: build/C/man3/gets.3:78
4657 msgid ""
4658 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4659 "until either a terminating newline or B<EOF>, which it replaces with a null "
4660 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4661 "below)."
4662 msgstr ""
4663 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4664 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4665 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4666 "記の「バグ」を参照)。"
4667
4668 #. type: Plain text
4669 #: build/C/man3/gets.3:92
4670 msgid ""
4671 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4672 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4673 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4674 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4675 "in the buffer."
4676 msgstr ""
4677 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4678 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4679 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4680 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4681
4682 #. type: Plain text
4683 #: build/C/man3/gets.3:103
4684 msgid ""
4685 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4686 "it is available for subsequent read operations.  Pushed-back characters will "
4687 "be returned in reverse order; only one pushback is guaranteed."
4688 msgstr ""
4689 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4690 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4691 "しとして保証されているのは、一文字だけである。"
4692
4693 #. type: Plain text
4694 #: build/C/man3/gets.3:108
4695 msgid ""
4696 "Calls to the functions described here can be mixed with each other and with "
4697 "calls to other input functions from the I<stdio> library for the same input "
4698 "stream."
4699 msgstr ""
4700 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4701 "互いに混ぜて使うことができる。"
4702
4703 #. type: Plain text
4704 #: build/C/man3/gets.3:123
4705 msgid ""
4706 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4707 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4708 msgstr ""
4709 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4710 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4711 "す。"
4712
4713 #. type: Plain text
4714 #: build/C/man3/gets.3:131
4715 msgid ""
4716 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4717 "end of file occurs while no characters have been read."
4718 msgstr ""
4719 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4720 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4721
4722 #. type: Plain text
4723 #: build/C/man3/gets.3:138
4724 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4725 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4726
4727 #. type: Plain text
4728 #: build/C/man3/gets.3:140
4729 msgid "C89, C99, POSIX.1-2001."
4730 msgstr "C89, C99, POSIX.1-2001."
4731
4732 #. type: Plain text
4733 #: build/C/man3/gets.3:152
4734 msgid ""
4735 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4736 "C11 removes the specification of B<gets>()  from the C language, and since "
4737 "version 2.16, glibc header files don't expose the function declaration if "
4738 "the B<_ISOC11_SOURCE> feature test macro is defined."
4739 msgstr ""
4740 "LSB は B<gets>() を非推奨としている。\n"
4741 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4742 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4743 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4744 "た\n"
4745 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4746
4747 #. type: Plain text
4748 #: build/C/man3/gets.3:166
4749 msgid ""
4750 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4751 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4752 "()  will continue to store characters past the end of the buffer, it is "
4753 "extremely dangerous to use.  It has been used to break computer security.  "
4754 "Use B<fgets>()  instead."
4755 msgstr ""
4756 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4757 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4758 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4759 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4760 "と。"
4761
4762 #. type: Plain text
4763 #: build/C/man3/gets.3:173
4764 msgid ""
4765 "It is not advisable to mix calls to input functions from the I<stdio> "
4766 "library with low-level calls to B<read>(2)  for the file descriptor "
4767 "associated with the input stream; the results will be undefined and very "
4768 "probably not what you want."
4769 msgstr ""
4770 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4771 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4772 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4773
4774 #. type: Plain text
4775 #: build/C/man3/gets.3:189
4776 msgid ""
4777 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4778 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4779 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4780 msgstr ""
4781 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4782 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4783 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4784 "B<feature_test_macros>(7)"
4785
4786 #. type: TH
4787 #: build/C/man3/getw.3:25
4788 #, no-wrap
4789 msgid "GETW"
4790 msgstr "GETW"
4791
4792 #. type: TH
4793 #: build/C/man3/getw.3:25
4794 #, no-wrap
4795 msgid "2010-09-26"
4796 msgstr "2010-09-26"
4797
4798 #. type: Plain text
4799 #: build/C/man3/getw.3:28
4800 msgid "getw, putw - input and output of words (ints)"
4801 msgstr "getw, putw - ワード(int)の入出力"
4802
4803 #. type: Plain text
4804 #: build/C/man3/getw.3:33
4805 #, no-wrap
4806 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4807 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4808
4809 #. type: Plain text
4810 #: build/C/man3/getw.3:35
4811 #, no-wrap
4812 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4813 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4814
4815 #. type: Plain text
4816 #: build/C/man3/getw.3:44
4817 msgid "B<getw>(), B<putw>():"
4818 msgstr "B<getw>(), B<putw>():"
4819
4820 #. type: TP
4821 #: build/C/man3/getw.3:47
4822 #, no-wrap
4823 msgid "Since glibc 2.3.3:"
4824 msgstr "glibc 2.3.3 以降:"
4825
4826 #. type: Plain text
4827 #: build/C/man3/getw.3:50
4828 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4829 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4830
4831 #. type: Plain text
4832 #: build/C/man3/getw.3:53
4833 #, no-wrap
4834 msgid ""
4835 "(_XOPEN_SOURCE &&\n"
4836 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4837 msgstr ""
4838 "(_XOPEN_SOURCE &&\n"
4839 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4840
4841 #. type: TP
4842 #: build/C/man3/getw.3:53
4843 #, no-wrap
4844 msgid "Before glibc 2.3.3:"
4845 msgstr "glibc 2.3.3 より前:"
4846
4847 #. type: Plain text
4848 #: build/C/man3/getw.3:56
4849 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4850 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4851
4852 #. type: Plain text
4853 #: build/C/man3/getw.3:66
4854 msgid ""
4855 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4856 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4857 msgstr ""
4858 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4859 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4860 "ことを勧める。"
4861
4862 #. type: Plain text
4863 #: build/C/man3/getw.3:73
4864 msgid ""
4865 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4866 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4867 "instead."
4868 msgstr ""
4869 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4870 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4871 "使用することを勧める。"
4872
4873 #. type: Plain text
4874 #: build/C/man3/getw.3:80
4875 msgid ""
4876 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4877 "error, they return B<EOF>."
4878 msgstr ""
4879 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4880 "が発生した場合、これらの関数は B<EOF> を返す。"
4881
4882 #. type: Plain text
4883 #: build/C/man3/getw.3:82
4884 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4885 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4886
4887 #. type: Plain text
4888 #: build/C/man3/getw.3:86
4889 msgid ""
4890 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4891 "can be used to distinguish between the two cases."
4892 msgstr ""
4893 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4894 "(3)  を用いると、この二つの場合を区別することが出来る。"
4895
4896 #. type: Plain text
4897 #: build/C/man3/getw.3:92
4898 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4899 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4900
4901 #. type: TH
4902 #: build/C/man2/link.2:31
4903 #, no-wrap
4904 msgid "LINK"
4905 msgstr "LINK"
4906
4907 #. type: TH
4908 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32
4909 #: build/C/man2/write.2:39
4910 #, no-wrap
4911 msgid "2013-01-27"
4912 msgstr "2013-01-27"
4913
4914 #. type: Plain text
4915 #: build/C/man2/link.2:34
4916 msgid "link - make a new name for a file"
4917 msgstr "link - ファイルの新しい名前を作成する"
4918
4919 #. type: Plain text
4920 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34
4921 #: build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35
4922 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4923 msgid "B<#include E<lt>unistd.hE<gt>>"
4924 msgstr "B<#include E<lt>unistd.hE<gt>>"
4925
4926 #. type: Plain text
4927 #: build/C/man2/link.2:38
4928 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4929 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4930
4931 #. type: Plain text
4932 #: build/C/man2/link.2:41
4933 msgid ""
4934 "B<link>()  creates a new link (also known as a hard link) to an existing "
4935 "file."
4936 msgstr ""
4937 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4938 "link) ともいう) を作成する。"
4939
4940 #. type: Plain text
4941 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4942 msgid "If I<newpath> exists it will I<not> be overwritten."
4943 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4944
4945 #. type: Plain text
4946 #: build/C/man2/link.2:52
4947 msgid ""
4948 "This new name may be used exactly as the old one for any operation; both "
4949 "names refer to the same file (and so have the same permissions and "
4950 "ownership) and it is impossible to tell which name was the \"original\"."
4951 msgstr ""
4952 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4953 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4954 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4955
4956 #. type: Plain text
4957 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4958 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4959 #: build/C/man2/unlink.2:60
4960 msgid ""
4961 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4962 "appropriately."
4963 msgstr ""
4964 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4965 "定される。"
4966
4967 #. type: TP
4968 #: build/C/man2/link.2:58 build/C/man2/open.2:576 build/C/man2/readlink.2:86
4969 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4970 #: build/C/man3/tmpfile.3:57 build/C/man2/unlink.2:61
4971 #, no-wrap
4972 msgid "B<EACCES>"
4973 msgstr "B<EACCES>"
4974
4975 #. type: Plain text
4976 #: build/C/man2/link.2:69
4977 msgid ""
4978 "Write access to the directory containing I<newpath> is denied, or search "
4979 "permission is denied for one of the directories in the path prefix of "
4980 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4981 msgstr ""
4982 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4983 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4984 "(B<path_resolution>(7)  を参照)。"
4985
4986 #. type: TP
4987 #: build/C/man2/link.2:69 build/C/man2/open.2:585 build/C/man2/rename.2:133
4988 #: build/C/man2/symlink.2:99 build/C/man2/write.2:135
4989 #, no-wrap
4990 msgid "B<EDQUOT>"
4991 msgstr "B<EDQUOT>"
4992
4993 #. type: Plain text
4994 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
4995 msgid "The user's quota of disk blocks on the file system has been exhausted."
4996 msgstr ""
4997 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
4998
4999 #. type: TP
5000 #: build/C/man2/link.2:72 build/C/man2/open.2:591 build/C/man2/symlink.2:104
5001 #: build/C/man3/tmpfile.3:60
5002 #, no-wrap
5003 msgid "B<EEXIST>"
5004 msgstr "B<EEXIST>"
5005
5006 #. type: Plain text
5007 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
5008 msgid "I<newpath> already exists."
5009 msgstr "I<newpath> が既に存在する。"
5010
5011 #. type: TP
5012 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:597
5013 #: build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91
5014 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:64
5015 #: build/C/man2/symlink.2:108 build/C/man2/unlink.2:80
5016 #: build/C/man2/write.2:141
5017 #, no-wrap
5018 msgid "B<EFAULT>"
5019 msgstr "B<EFAULT>"
5020
5021 #. type: Plain text
5022 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
5023 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5024 msgstr ""
5025 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5026
5027 #. type: TP
5028 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107
5029 #: build/C/man2/symlink.2:111 build/C/man2/unlink.2:84
5030 #: build/C/man2/write.2:165
5031 #, no-wrap
5032 msgid "B<EIO>"
5033 msgstr "B<EIO>"
5034
5035 #. type: Plain text
5036 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
5037 msgid "An I/O error occurred."
5038 msgstr "I/O エラーが発生した。"
5039
5040 #. type: TP
5041 #: build/C/man2/link.2:82 build/C/man2/open.2:621 build/C/man2/readlink.2:110
5042 #: build/C/man2/rename.2:149 build/C/man2/rmdir.2:73
5043 #: build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
5044 #, no-wrap
5045 msgid "B<ELOOP>"
5046 msgstr "B<ELOOP>"
5047
5048 #. type: Plain text
5049 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5050 msgid ""
5051 "Too many symbolic links were encountered in resolving I<oldpath> or "
5052 "I<newpath>."
5053 msgstr ""
5054 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5055 "る。"
5056
5057 #. type: TP
5058 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5059 #, no-wrap
5060 msgid "B<EMLINK>"
5061 msgstr "B<EMLINK>"
5062
5063 #. type: Plain text
5064 #: build/C/man2/link.2:91
5065 msgid ""
5066 "The file referred to by I<oldpath> already has the maximum number of links "
5067 "to it."
5068 msgstr ""
5069 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5070
5071 #. type: TP
5072 #: build/C/man2/link.2:91 build/C/man2/open.2:631 build/C/man2/readlink.2:113
5073 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:77
5074 #: build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
5075 #, no-wrap
5076 msgid "B<ENAMETOOLONG>"
5077 msgstr "B<ENAMETOOLONG>"
5078
5079 #. type: Plain text
5080 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
5081 msgid "I<oldpath> or I<newpath> was too long."
5082 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5083
5084 #. type: TP
5085 #: build/C/man2/link.2:94 build/C/man2/open.2:645 build/C/man2/readlink.2:116
5086 #: build/C/man2/rename.2:163 build/C/man2/rmdir.2:80
5087 #: build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
5088 #, no-wrap
5089 msgid "B<ENOENT>"
5090 msgstr "B<ENOENT>"
5091
5092 #. type: Plain text
5093 #: build/C/man2/link.2:99
5094 msgid ""
5095 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5096 "dangling symbolic link."
5097 msgstr ""
5098 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5099 "(dangling)シンボリックリンクである。"
5100
5101 #. type: TP
5102 #: build/C/man2/link.2:99 build/C/man2/open.2:652 build/C/man2/readlink.2:119
5103 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5104 #: build/C/man2/symlink.2:128 build/C/man3/tempnam.3:95
5105 #: build/C/man2/unlink.2:106
5106 #, no-wrap
5107 msgid "B<ENOMEM>"
5108 msgstr "B<ENOMEM>"
5109
5110 #. type: Plain text
5111 #: build/C/man2/link.2:102 build/C/man2/open.2:655 build/C/man2/readlink.2:122
5112 #: build/C/man2/rename.2:179 build/C/man2/rmdir.2:88
5113 #: build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
5114 msgid "Insufficient kernel memory was available."
5115 msgstr "十分なカーネルメモリーがない。"
5116
5117 #. type: TP
5118 #: build/C/man2/link.2:102 build/C/man2/open.2:655 build/C/man2/rename.2:179
5119 #: build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:72
5120 #: build/C/man2/write.2:168
5121 #, no-wrap
5122 msgid "B<ENOSPC>"
5123 msgstr "B<ENOSPC>"
5124
5125 #. type: Plain text
5126 #: build/C/man2/link.2:106 build/C/man2/rename.2:183
5127 #: build/C/man2/symlink.2:135
5128 msgid "The device containing the file has no room for the new directory entry."
5129 msgstr ""
5130 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5131 "空きがない。"
5132
5133 #. type: TP
5134 #: build/C/man2/link.2:106 build/C/man2/open.2:661 build/C/man2/readlink.2:122
5135 #: build/C/man2/rename.2:183 build/C/man2/rmdir.2:88
5136 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
5137 #, no-wrap
5138 msgid "B<ENOTDIR>"
5139 msgstr "B<ENOTDIR>"
5140
5141 #. type: Plain text
5142 #: build/C/man2/link.2:111
5143 msgid ""
5144 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5145 "a directory."
5146 msgstr ""
5147 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5148 "い。"
5149
5150 #. type: TP
5151 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:694
5152 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5153 #: build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
5154 #, no-wrap
5155 msgid "B<EPERM>"
5156 msgstr "B<EPERM>"
5157
5158 #. type: Plain text
5159 #: build/C/man2/link.2:115
5160 msgid "I<oldpath> is a directory."
5161 msgstr "I<oldpath> がディレクトリである。"
5162
5163 #. type: Plain text
5164 #: build/C/man2/link.2:120
5165 msgid ""
5166 "The file system containing I<oldpath> and I<newpath> does not support the "
5167 "creation of hard links."
5168 msgstr ""
5169 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5170 "していない。"
5171
5172 #. type: TP
5173 #: build/C/man2/link.2:120
5174 #, no-wrap
5175 msgid "B<EPERM> (since Linux 3.6)"
5176 msgstr "B<EPERM> (Linux 3.6 以降)"
5177
5178 #. type: Plain text
5179 #: build/C/man2/link.2:127
5180 msgid ""
5181 "The caller does not have permission to create a hard link to this file (see "
5182 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
5183 msgstr ""
5184 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5185 "の I</proc/sys/fs/protected_hardlink> の説明を参照)。"
5186
5187 #. type: TP
5188 #: build/C/man2/link.2:127 build/C/man2/open.2:702 build/C/man2/rename.2:221
5189 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145
5190 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:137
5191 #, no-wrap
5192 msgid "B<EROFS>"
5193 msgstr "B<EROFS>"
5194
5195 #. type: Plain text
5196 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5197 msgid "The file is on a read-only file system."
5198 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5199
5200 #. type: TP
5201 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5202 #, no-wrap
5203 msgid "B<EXDEV>"
5204 msgstr "B<EXDEV>"
5205
5206 #. type: Plain text
5207 #: build/C/man2/link.2:138
5208 msgid ""
5209 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
5210 "permits a file system to be mounted at multiple points, but B<link>()  does "
5211 "not work across different mount points, even if the same file system is "
5212 "mounted on both.)"
5213 msgstr ""
5214 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5215 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5216 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5217 "のマウント位置を跨いでは動作しない。)"
5218
5219 #.  SVr4 documents additional ENOLINK and
5220 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5221 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5222 #. type: Plain text
5223 #: build/C/man2/link.2:143
5224 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5225 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5226
5227 #. type: Plain text
5228 #: build/C/man2/link.2:150
5229 msgid ""
5230 "Hard links, as created by B<link>(), cannot span file systems.  Use "
5231 "B<symlink>(2)  if this is required."
5232 msgstr ""
5233 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5234 "このような場合は B<symlink>(2)  を使用すること。"
5235
5236 #.  more precisely: since kernel 1.3.56
5237 #.  For example, the default Solaris compilation environment
5238 #.  behaves like Linux, and contributors to a March 2005
5239 #.  thread in the Austin mailing list reported that some
5240 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5241 #. type: Plain text
5242 #: build/C/man2/link.2:181
5243 msgid ""
5244 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5245 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5246 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5247 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5248 "the same file that I<oldpath> refers to).  Some other implementations behave "
5249 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5250 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5251 "dereferenced if it is a symbolic link.  For precise control over the "
5252 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5253 msgstr ""
5254 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5255 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5256 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5257 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5258 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5259 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5260 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5261 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5262 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5263 "は B<linkat>(2)  を参照のこと。"
5264
5265 #. type: Plain text
5266 #: build/C/man2/link.2:187
5267 msgid ""
5268 "On NFS file systems, the return code may be wrong in case the NFS server "
5269 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5270 "to find out if the link got created."
5271 msgstr ""
5272 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5273 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5274 "ためには B<stat>(2)  を使用すること。"
5275
5276 #. type: Plain text
5277 #: build/C/man2/link.2:197
5278 msgid ""
5279 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5280 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5281 msgstr ""
5282 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5283 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5284
5285 #. type: TH
5286 #: build/C/man2/llseek.2:28
5287 #, no-wrap
5288 msgid "LLSEEK"
5289 msgstr "LLSEEK"
5290
5291 #. type: TH
5292 #: build/C/man2/llseek.2:28
5293 #, no-wrap
5294 msgid "2012-07-13"
5295 msgstr "2012-07-13"
5296
5297 #. type: Plain text
5298 #: build/C/man2/llseek.2:31
5299 msgid "_llseek - reposition read/write file offset"
5300 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5301
5302 #. type: Plain text
5303 #: build/C/man2/llseek.2:35
5304 #, no-wrap
5305 msgid ""
5306 "B<#include E<lt>sys/types.hE<gt>>\n"
5307 "B<#include E<lt>unistd.hE<gt>>\n"
5308 msgstr ""
5309 "B<#include E<lt>sys/types.hE<gt>>\n"
5310 "B<#include E<lt>unistd.hE<gt>>\n"
5311
5312 #. type: Plain text
5313 #: build/C/man2/llseek.2:39
5314 #, no-wrap
5315 msgid ""
5316 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5317 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5318 "B<            unsigned int >I<whence>B<);>\n"
5319 msgstr ""
5320 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5321 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5322 "B<            unsigned int >I<whence>B<);>\n"
5323
5324 #. type: Plain text
5325 #: build/C/man2/llseek.2:43
5326 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5327 msgstr ""
5328 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5329 "を参照。"
5330
5331 #. type: Plain text
5332 #: build/C/man2/llseek.2:62
5333 msgid ""
5334 "The B<_llseek>()  function repositions the offset of the open file "
5335 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5336 "offset_low> bytes relative to the beginning of the file, the current "
5337 "position in the file, or the end of the file, depending on whether I<whence> "
5338 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5339 "resulting file position in the argument I<result>."
5340 msgstr ""
5341 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5342 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5343 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5344 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5345 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5346 "のファイル位置を I<result> 引き数に返す。"
5347
5348 #. type: Plain text
5349 #: build/C/man2/llseek.2:69
5350 msgid ""
5351 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5352 "-1 is returned and I<errno> is set to indicate the error."
5353 msgstr ""
5354 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5355 "エラーを示す I<errno> が設定される。"
5356
5357 #. type: Plain text
5358 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:175
5359 msgid "I<fd> is not an open file descriptor."
5360 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5361
5362 #. type: Plain text
5363 #: build/C/man2/llseek.2:77
5364 msgid "Problem with copying results to user space."
5365 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5366
5367 #. type: Plain text
5368 #: build/C/man2/llseek.2:81
5369 msgid "I<whence> is invalid."
5370 msgstr "I<whence> が不正である。"
5371
5372 #. type: Plain text
5373 #: build/C/man2/llseek.2:84
5374 msgid ""
5375 "This function is Linux-specific, and should not be used in programs intended "
5376 "to be portable."
5377 msgstr ""
5378 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5379
5380 #. type: Plain text
5381 #: build/C/man2/llseek.2:87
5382 msgid ""
5383 "Glibc does not provide a wrapper for this system call; call it using "
5384 "B<syscall>(2)."
5385 msgstr ""
5386 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5387 "(2)  を使って呼び出すこと。"
5388
5389 #. type: Plain text
5390 #: build/C/man2/llseek.2:90
5391 msgid "B<lseek>(2), B<lseek64>(3)"
5392 msgstr "B<lseek>(2), B<lseek64>(3)"
5393
5394 #. type: TH
5395 #: build/C/man2/lseek.2:47
5396 #, no-wrap
5397 msgid "LSEEK"
5398 msgstr "LSEEK"
5399
5400 #. type: TH
5401 #: build/C/man2/lseek.2:47
5402 #, no-wrap
5403 msgid "2013-03-27"
5404 msgstr "2013-03-27"
5405
5406 #. type: Plain text
5407 #: build/C/man2/lseek.2:50
5408 msgid "lseek - reposition read/write file offset"
5409 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5410
5411 #. type: Plain text
5412 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5413 msgid "B<#include E<lt>sys/types.hE<gt>>"
5414 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5415
5416 #. type: Plain text
5417 #: build/C/man2/lseek.2:56
5418 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5419 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5420
5421 #. type: Plain text
5422 #: build/C/man2/lseek.2:67
5423 msgid ""
5424 "The B<lseek>()  function repositions the offset of the open file associated "
5425 "with the file descriptor I<fd> to the argument I<offset> according to the "
5426 "directive I<whence> as follows:"
5427 msgstr ""
5428 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5429 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5430 "へ以下のように変更する:"
5431
5432 #. type: Plain text
5433 #: build/C/man2/lseek.2:72
5434 msgid "The offset is set to I<offset> bytes."
5435 msgstr "オフセットは I<offset> バイトに設定される。"
5436
5437 #. type: Plain text
5438 #: build/C/man2/lseek.2:77
5439 msgid "The offset is set to its current location plus I<offset> bytes."
5440 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5441
5442 #. type: Plain text
5443 #: build/C/man2/lseek.2:82
5444 msgid "The offset is set to the size of the file plus I<offset> bytes."
5445 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5446
5447 #. type: Plain text
5448 #: build/C/man2/lseek.2:90
5449 msgid ""
5450 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5451 "the file (but this does not change the size of the file).  If data is later "
5452 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5453 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5454 "gap."
5455 msgstr ""
5456 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5457 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5458 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5459 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5460 "される。"
5461
5462 #. type: SS
5463 #: build/C/man2/lseek.2:90
5464 #, no-wrap
5465 msgid "Seeking file data and holes"
5466 msgstr "ファイルのデータとホールの探索"
5467
5468 #. type: Plain text
5469 #: build/C/man2/lseek.2:93
5470 msgid ""
5471 "Since version 3.1, Linux supports the following additional values for "
5472 "I<whence>:"
5473 msgstr ""
5474 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5475
5476 #. type: TP
5477 #: build/C/man2/lseek.2:93
5478 #, no-wrap
5479 msgid "B<SEEK_DATA>"
5480 msgstr "B<SEEK_DATA>"
5481
5482 #. type: Plain text
5483 #: build/C/man2/lseek.2:104
5484 msgid ""
5485 "Adjust the file offset to the next location in the file greater than or "
5486 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5487 "file offset is set to I<offset>."
5488 msgstr ""
5489 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5490 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5491 "定される。"
5492
5493 #. type: TP
5494 #: build/C/man2/lseek.2:104
5495 #, no-wrap
5496 msgid "B<SEEK_HOLE>"
5497 msgstr "B<SEEK_HOLE>"
5498
5499 #. type: Plain text
5500 #: build/C/man2/lseek.2:118
5501 msgid ""
5502 "Adjust the file offset to the next hole in the file greater than or equal to "
5503 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5504 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5505 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5506 "hole at the end of any file)."
5507 msgstr ""
5508 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5509 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5510 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5511 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5512 "だ)。"
5513
5514 #. type: Plain text
5515 #: build/C/man2/lseek.2:124
5516 msgid ""
5517 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5518 "end of the file."
5519 msgstr ""
5520 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5521 "B<lseek>() は失敗する。"
5522
5523 #. type: Plain text
5524 #: build/C/man2/lseek.2:130
5525 msgid ""
5526 "These operations allow applications to map holes in a sparsely allocated "
5527 "file.  This can be useful for applications such as file backup tools, which "
5528 "can save space when creating backups and preserve holes, if they have a "
5529 "mechanism for discovering holes."
5530 msgstr ""
5531 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5532 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5533 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5534 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5535 "約し、ホールを保持することができる。"
5536
5537 #.  https://lkml.org/lkml/2011/4/22/79
5538 #.  http://lwn.net/Articles/440255/
5539 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5540 #. type: Plain text
5541 #: build/C/man2/lseek.2:153
5542 msgid ""
5543 "For the purposes of these operations, a hole is a sequence of zeros that "
5544 "(normally) has not been allocated in the underlying file storage.  However, "
5545 "a file system is not obliged to report holes, so these operations are not a "
5546 "guaranteed mechanism for mapping the storage space actually allocated to a "
5547 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5548 "the underlying storage may not be reported as a hole.)  In the simplest "
5549 "implementation, a file system can support the operations by making "
5550 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5551 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5552 "by I<offset> is a hole, it can be considered to consist of data that is a "
5553 "sequence of zeros)."
5554 msgstr ""
5555 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5556 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5557 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5558 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5559 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5560 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5561 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5562 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5563 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5564 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5565 "ということである)。"
5566
5567 #. type: Plain text
5568 #: build/C/man2/lseek.2:162
5569 msgid ""
5570 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5571 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5572 msgstr ""
5573 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5574 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5575
5576 #. type: Plain text
5577 #: build/C/man2/lseek.2:170
5578 msgid ""
5579 "Upon successful completion, B<lseek>()  returns the resulting offset "
5580 "location as measured in bytes from the beginning of the file.  On error, the "
5581 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5582 msgstr ""
5583 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5584 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5585 "される。"
5586
5587 #.  Some systems may allow negative offsets for character devices
5588 #.  and/or for remote file systems.
5589 #. type: Plain text
5590 #: build/C/man2/lseek.2:183
5591 msgid ""
5592 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5593 "beyond the end of a seekable device."
5594 msgstr ""
5595 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5596 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5597
5598 #. type: TP
5599 #: build/C/man2/lseek.2:183 build/C/man2/open.2:674
5600 #, no-wrap
5601 msgid "B<EOVERFLOW>"
5602 msgstr "B<EOVERFLOW>"
5603
5604 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5605 #. type: Plain text
5606 #: build/C/man2/lseek.2:188
5607 msgid "The resulting file offset cannot be represented in an I<off_t>."
5608 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5609
5610 #. type: TP
5611 #: build/C/man2/lseek.2:188
5612 #, no-wrap
5613 msgid "B<ESPIPE>"
5614 msgstr "B<ESPIPE>"
5615
5616 #. type: Plain text
5617 #: build/C/man2/lseek.2:192
5618 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5619 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5620
5621 #. type: TP
5622 #: build/C/man2/lseek.2:192 build/C/man2/open.2:668
5623 #, no-wrap
5624 msgid "B<ENXIO>"
5625 msgstr "B<ENXIO>"
5626
5627 #. type: Plain text
5628 #: build/C/man2/lseek.2:200
5629 msgid ""
5630 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5631 "beyond the end of the file."
5632 msgstr ""
5633 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5634 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5635
5636 #.  SVr4 documents additional error
5637 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5638 #. type: Plain text
5639 #: build/C/man2/lseek.2:202 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
5640 #: build/C/man2/symlink.2:155 build/C/man2/unlink.2:145
5641 #: build/C/man2/write.2:189
5642 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5643 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5644
5645 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5646 #. type: Plain text
5647 #: build/C/man2/lseek.2:210
5648 msgid ""
5649 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5650 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5651 "next POSIX revision (Issue 8)."
5652 msgstr ""
5653 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
5654 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
5655 "る。"
5656
5657 #. type: Plain text
5658 #: build/C/man2/lseek.2:214
5659 msgid ""
5660 "Some devices are incapable of seeking and POSIX does not specify which "
5661 "devices must support B<lseek>()."
5662 msgstr ""
5663 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5664 "に対応すべきかは規定していない。"
5665
5666 #.  Other systems return the number of written characters,
5667 #.  using SEEK_SET to set the counter. (Of written characters.)
5668 #. type: Plain text
5669 #: build/C/man2/lseek.2:221
5670 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
5671 msgstr ""
5672 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
5673 "る。"
5674
5675 #. type: Plain text
5676 #: build/C/man2/lseek.2:224
5677 msgid ""
5678 "When converting old code, substitute values for I<whence> with the following "
5679 "macros:"
5680 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5681
5682 #. type: tbl table
5683 #: build/C/man2/lseek.2:227
5684 #, no-wrap
5685 msgid "old\tnew\n"
5686 msgstr "old \tnew\n"
5687
5688 #. type: tbl table
5689 #: build/C/man2/lseek.2:228
5690 #, no-wrap
5691 msgid "0\tSEEK_SET\n"
5692 msgstr "0\tSEEK_SET\n"
5693
5694 #. type: tbl table
5695 #: build/C/man2/lseek.2:229
5696 #, no-wrap
5697 msgid "1\tSEEK_CUR\n"
5698 msgstr "1\tSEEK_CUR\n"
5699
5700 #. type: tbl table
5701 #: build/C/man2/lseek.2:230
5702 #, no-wrap
5703 msgid "2\tSEEK_END\n"
5704 msgstr "2\tSEEK_END\n"
5705
5706 #. type: tbl table
5707 #: build/C/man2/lseek.2:231
5708 #, no-wrap
5709 msgid "L_SET\tSEEK_SET\n"
5710 msgstr "L_SET\tSEEK_SET\n"
5711
5712 #. type: tbl table
5713 #: build/C/man2/lseek.2:232
5714 #, no-wrap
5715 msgid "L_INCR\tSEEK_CUR\n"
5716 msgstr "L_INCR\tSEEK_CUR\n"
5717
5718 #. type: tbl table
5719 #: build/C/man2/lseek.2:233
5720 #, no-wrap
5721 msgid "L_XTND\tSEEK_END\n"
5722 msgstr "L_XTND\tSEEK_END\n"
5723
5724 #. type: Plain text
5725 #: build/C/man2/lseek.2:245
5726 msgid ""
5727 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5728 "current file position pointer, so seeking on such files may be subject to "
5729 "race conditions."
5730 msgstr ""
5731 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5732 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5733 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5734
5735 #. type: Plain text
5736 #: build/C/man2/lseek.2:252
5737 msgid ""
5738 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5739 "B<posix_fallocate>(3)"
5740 msgstr ""
5741 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5742 "B<posix_fallocate>(3)"
5743
5744 #. type: TH
5745 #: build/C/man3/lseek64.3:25
5746 #, no-wrap
5747 msgid "LSEEK64"
5748 msgstr "LSEEK64"
5749
5750 #. type: TH
5751 #: build/C/man3/lseek64.3:25
5752 #, no-wrap
5753 msgid "2004-12-11"
5754 msgstr "2004-12-11"
5755
5756 #. type: Plain text
5757 #: build/C/man3/lseek64.3:28
5758 msgid "lseek64 - reposition 64-bit read/write file offset"
5759 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5760
5761 #. type: Plain text
5762 #: build/C/man3/lseek64.3:30
5763 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5764 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5765
5766 #. type: Plain text
5767 #: build/C/man3/lseek64.3:36
5768 msgid ""
5769 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5770 msgstr ""
5771 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5772
5773 #. type: Plain text
5774 #: build/C/man3/lseek64.3:53
5775 msgid ""
5776 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5777 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5778 "start, current position, or end of the file, when I<whence> has the value "
5779 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5780 msgstr ""
5781 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5782 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5783 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5784 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5785
5786 #. type: Plain text
5787 #: build/C/man3/lseek64.3:56
5788 msgid "For more details, return value, and errors, see B<lseek>(2)."
5789 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5790
5791 #. type: Plain text
5792 #: build/C/man3/lseek64.3:63
5793 msgid ""
5794 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5795 "the raw system call B<_llseek>(2)."
5796 msgstr ""
5797 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5798 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5799
5800 #. type: SS
5801 #: build/C/man3/lseek64.3:63
5802 #, no-wrap
5803 msgid "lseek"
5804 msgstr "lseek"
5805
5806 #. type: Plain text
5807 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
5808 #: build/C/man3/lseek64.3:116
5809 msgid "Prototype:"
5810 msgstr "プロトタイプ:"
5811
5812 #. type: Plain text
5813 #: build/C/man3/lseek64.3:69
5814 #, no-wrap
5815 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5816 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5817
5818 #. type: Plain text
5819 #: build/C/man3/lseek64.3:77
5820 msgid ""
5821 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5822 "architectures, unless one compiles with"
5823 msgstr ""
5824 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5825 "ビット符号付き型である。 ただし、"
5826
5827 #. type: Plain text
5828 #: build/C/man3/lseek64.3:85
5829 msgid "in which case it is a 64-bit signed type."
5830 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5831
5832 #. type: SS
5833 #: build/C/man3/lseek64.3:85
5834 #, no-wrap
5835 msgid "lseek64"
5836 msgstr "lseek64"
5837
5838 #. type: Plain text
5839 #: build/C/man3/lseek64.3:91
5840 #, no-wrap
5841 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5842 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5843
5844 #. type: Plain text
5845 #: build/C/man3/lseek64.3:102
5846 msgid ""
5847 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5848 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5849 "when one compiles with"
5850 msgstr ""
5851 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5852 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5853 "ルした場合にのみ使用可能である。"
5854
5855 #. type: Plain text
5856 #: build/C/man3/lseek64.3:106
5857 #, no-wrap
5858 msgid "#define _LARGEFILE64_SOURCE\n"
5859 msgstr "#define _LARGEFILE64_SOURCE\n"
5860
5861 #.  in glibc 2.0.94, not in 2.0.6
5862 #. type: Plain text
5863 #: build/C/man3/lseek64.3:114
5864 msgid ""
5865 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5866 "be an alias for B<llseek>()."
5867 msgstr ""
5868 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5869 "アスとして定義されている。"
5870
5871 #. type: SS
5872 #: build/C/man3/lseek64.3:114
5873 #, no-wrap
5874 msgid "llseek"
5875 msgstr "llseek"
5876
5877 #. type: Plain text
5878 #: build/C/man3/lseek64.3:120
5879 #, no-wrap
5880 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5881 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5882
5883 #.  in libc 5.0.9, not in 4.7.6
5884 #. type: Plain text
5885 #: build/C/man3/lseek64.3:139
5886 msgid ""
5887 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5888 "()  is available in libc5 and glibc and works without special defines.  Its "
5889 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5890 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5891 "should add the above prototype, or something equivalent, to their own "
5892 "source.  When users complained about data loss caused by a miscompilation of "
5893 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5894 msgstr ""
5895 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5896 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5897 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5898 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5899 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5900 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5901 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5902
5903 #. type: Plain text
5904 #: build/C/man3/lseek64.3:142
5905 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5906 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5907
5908 #. type: Plain text
5909 #: build/C/man3/lseek64.3:146
5910 msgid ""
5911 "This makes this function unusable if one desires a warning-free compilation."
5912 msgstr ""
5913 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5914
5915 #. type: SS
5916 #: build/C/man3/lseek64.3:146
5917 #, no-wrap
5918 msgid "_llseek"
5919 msgstr "_llseek"
5920
5921 #. type: Plain text
5922 #: build/C/man3/lseek64.3:149
5923 msgid ""
5924 "All the above functions are implemented in terms of this system call.  The "
5925 "prototype is:"
5926 msgstr ""
5927 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5928 "下の通り:"
5929
5930 #. type: Plain text
5931 #: build/C/man3/lseek64.3:154
5932 #, no-wrap
5933 msgid ""
5934 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5935 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5936 msgstr ""
5937 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5938 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5939
5940 #. type: Plain text
5941 #: build/C/man3/lseek64.3:159
5942 msgid "For more details, see B<llseek>(2)."
5943 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5944
5945 #. type: Plain text
5946 #: build/C/man3/lseek64.3:162
5947 msgid "B<llseek>(2), B<lseek>(2)"
5948 msgstr "B<llseek>(2), B<lseek>(2)"
5949
5950 #. type: TH
5951 #: build/C/man2/open.2:51
5952 #, no-wrap
5953 msgid "OPEN"
5954 msgstr "OPEN"
5955
5956 #. type: TH
5957 #: build/C/man2/open.2:51
5958 #, fuzzy, no-wrap
5959 #| msgid "2013-06-21"
5960 msgid "2013-07-21"
5961 msgstr "2013-06-21"
5962
5963 #. type: Plain text
5964 #: build/C/man2/open.2:54
5965 msgid "open, creat - open and possibly create a file or device"
5966 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5967
5968 #. type: Plain text
5969 #: build/C/man2/open.2:59
5970 #, no-wrap
5971 msgid ""
5972 "B<#include E<lt>sys/types.hE<gt>>\n"
5973 "B<#include E<lt>sys/stat.hE<gt>>\n"
5974 "B<#include E<lt>fcntl.hE<gt>>\n"
5975 msgstr ""
5976 "B<#include E<lt>sys/types.hE<gt>>\n"
5977 "B<#include E<lt>sys/stat.hE<gt>>\n"
5978 "B<#include E<lt>fcntl.hE<gt>>\n"
5979
5980 #. type: Plain text
5981 #: build/C/man2/open.2:62
5982 #, no-wrap
5983 msgid ""
5984 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5985 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5986 msgstr ""
5987 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5988 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5989
5990 #. type: Plain text
5991 #: build/C/man2/open.2:64
5992 #, no-wrap
5993 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5994 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5995
5996 #. type: Plain text
5997 #: build/C/man2/open.2:75
5998 msgid ""
5999 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
6000 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
6001 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
6002 "by a successful call will be the lowest-numbered file descriptor not "
6003 "currently open for the process."
6004 msgstr ""
6005 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
6006 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
6007 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6008 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
6009 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
6010 "のものとなる。"
6011
6012 #. type: Plain text
6013 #: build/C/man2/open.2:87
6014 msgid ""
6015 "By default, the new file descriptor is set to remain open across an B<execve>"
6016 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
6017 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
6018 "to change this default).  The file offset is set to the beginning of the "
6019 "file (see B<lseek>(2))."
6020 msgstr ""
6021 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
6022 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6023 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
6024 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
6025 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6026
6027 #. type: Plain text
6028 #: build/C/man2/open.2:106
6029 msgid ""
6030 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6031 "system-wide table of open files.  This entry records the file offset and the "
6032 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
6033 "file descriptor is a reference to one of these entries; this reference is "
6034 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
6035 "different file.  The new open file description is initially not shared with "
6036 "any other process, but sharing may arise via B<fork>(2)."
6037 msgstr ""
6038 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6039 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6040 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6041 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6042 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6043 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6044 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6045 "が、 B<fork>(2)  で共有が起こる場合がある。"
6046
6047 #. type: Plain text
6048 #: build/C/man2/open.2:114
6049 msgid ""
6050 "The argument I<flags> must include one of the following I<access modes>: "
6051 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6052 "only, write-only, or read/write, respectively."
6053 msgstr ""
6054 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6055 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6056 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6057
6058 #.  SUSv4 divides the flags into:
6059 #.  * Access mode
6060 #.  * File creation
6061 #.  * File status
6062 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6063 #.  though it's not clear what the difference between "other" and
6064 #.  "File creation" flags is.  I raised an Aardvark to see if this
6065 #.  can be clarified in SUSv4; 10 Oct 2008.
6066 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6067 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6068 #.  are also categorized" as file status flags.
6069 #. type: Plain text
6070 #: build/C/man2/open.2:152
6071 msgid ""
6072 "In addition, zero or more file creation flags and file status flags can be "
6073 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6074 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6075 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
6076 "remaining flags listed below.  The distinction between these two groups of "
6077 "flags is that the file status flags can be retrieved and (in some cases)  "
6078 "modified using B<fcntl>(2).  The full list of file creation flags and file "
6079 "status flags is as follows:"
6080 msgstr ""
6081 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6082 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6083 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6084 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TRUNC>, "
6085 "B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち上記以外の残"
6086 "りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は B<fcntl>"
6087 "(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点にあ"
6088 "る。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
6089
6090 #. type: TP
6091 #: build/C/man2/open.2:152
6092 #, no-wrap
6093 msgid "B<O_APPEND>"
6094 msgstr "B<O_APPEND>"
6095
6096 #.  For more background, see
6097 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6098 #.  http://nfs.sourceforge.net/
6099 #. type: Plain text
6100 #: build/C/man2/open.2:169
6101 msgid ""
6102 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6103 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6104 "may lead to corrupted files on NFS file systems if more than one process "
6105 "appends data to a file at once.  This is because NFS does not support "
6106 "appending to a file, so the client kernel has to simulate it, which can't be "
6107 "done without a race condition."
6108 msgstr ""
6109 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6110 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6111 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6112 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6113 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6114 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6115 "とはできないからである。"
6116
6117 #. type: TP
6118 #: build/C/man2/open.2:169
6119 #, no-wrap
6120 msgid "B<O_ASYNC>"
6121 msgstr "B<O_ASYNC>"
6122
6123 #. type: Plain text
6124 #: build/C/man2/open.2:182
6125 msgid ""
6126 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6127 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6128 "this file descriptor.  This feature is available only for terminals, "
6129 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6130 "B<fcntl>(2)  for further details."
6131 msgstr ""
6132 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6133 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6134 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6135 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6136 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
6137
6138 #. type: TP
6139 #: build/C/man2/open.2:182
6140 #, no-wrap
6141 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
6142 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6143
6144 #.  This flag fixes only one form of the race condition;
6145 #.  The race can also occur with, for example, descriptors
6146 #.  returned by accept(), pipe(), etc.
6147 #. type: Plain text
6148 #: build/C/man2/open.2:207
6149 msgid ""
6150 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6151 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6152 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
6153 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
6154 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
6155 "race conditions where one thread opens a file descriptor at the same time as "
6156 "another thread does a B<fork>(2)  plus B<execve>(2)."
6157 msgstr ""
6158 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6159 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
6160 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
6161 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
6162 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
6163 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
6164 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
6165 "はないからである。"
6166
6167 #. type: TP
6168 #: build/C/man2/open.2:207
6169 #, no-wrap
6170 msgid "B<O_CREAT>"
6171 msgstr "B<O_CREAT>"
6172
6173 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6174 #.  XFS (since 2.6.14).
6175 #. type: Plain text
6176 #: build/C/man2/open.2:223
6177 msgid ""
6178 "If the file does not exist it will be created.  The owner (user ID) of the "
6179 "file is set to the effective user ID of the process.  The group ownership "
6180 "(group ID) is set either to the effective group ID of the process or to the "
6181 "group ID of the parent directory (depending on file system type and mount "
6182 "options, and the mode of the parent directory, see the mount options "
6183 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6184 msgstr ""
6185 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6186 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6187 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6188 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6189 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6190 "I<bsdgroups> と I<sysvgroups> を参照)。"
6191
6192 #. type: Plain text
6193 #: build/C/man2/open.2:246
6194 msgid ""
6195 "I<mode> specifies the permissions to use in case a new file is created.  "
6196 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
6197 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
6198 "permissions are modified by the process's I<umask> in the usual way: The "
6199 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
6200 "mode applies only to future accesses of the newly created file; the B<open>"
6201 "()  call that creates a read-only file may well return a read/write file "
6202 "descriptor."
6203 msgstr ""
6204 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6205 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
6206 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
6207 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
6208 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
6209 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
6210 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
6211 "可能なファイルディスクリプタを返すことがありうる。"
6212
6213 #. type: Plain text
6214 #: build/C/man2/open.2:249
6215 msgid "The following symbolic constants are provided for I<mode>:"
6216 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6217
6218 #. type: TP
6219 #: build/C/man2/open.2:249
6220 #, no-wrap
6221 msgid "B<S_IRWXU>"
6222 msgstr "B<S_IRWXU>"
6223
6224 #. type: Plain text
6225 #: build/C/man2/open.2:252
6226 msgid "00700 user (file owner) has read, write and execute permission"
6227 msgstr ""
6228 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6229
6230 #. type: TP
6231 #: build/C/man2/open.2:252
6232 #, no-wrap
6233 msgid "B<S_IRUSR>"
6234 msgstr "B<S_IRUSR>"
6235
6236 #. type: Plain text
6237 #: build/C/man2/open.2:255
6238 msgid "00400 user has read permission"
6239 msgstr "00400 ユーザーに読み込みの許可がある。"
6240
6241 #. type: TP
6242 #: build/C/man2/open.2:255
6243 #, no-wrap
6244 msgid "B<S_IWUSR>"
6245 msgstr "B<S_IWUSR>"
6246
6247 #. type: Plain text
6248 #: build/C/man2/open.2:258
6249 msgid "00200 user has write permission"
6250 msgstr "00200 ユーザーに書き込みの許可がある。"
6251
6252 #. type: TP
6253 #: build/C/man2/open.2:258
6254 #, no-wrap
6255 msgid "B<S_IXUSR>"
6256 msgstr "B<S_IXUSR>"
6257
6258 #. type: Plain text
6259 #: build/C/man2/open.2:261
6260 msgid "00100 user has execute permission"
6261 msgstr "00100 ユーザーに実行の許可がある。"
6262
6263 #. type: TP
6264 #: build/C/man2/open.2:261
6265 #, no-wrap
6266 msgid "B<S_IRWXG>"
6267 msgstr "B<S_IRWXG>"
6268
6269 #. type: Plain text
6270 #: build/C/man2/open.2:264
6271 msgid "00070 group has read, write and execute permission"
6272 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6273
6274 #. type: TP
6275 #: build/C/man2/open.2:264
6276 #, no-wrap
6277 msgid "B<S_IRGRP>"
6278 msgstr "B<S_IRGRP>"
6279
6280 #. type: Plain text
6281 #: build/C/man2/open.2:267
6282 msgid "00040 group has read permission"
6283 msgstr "00040 グループに読み込みの許可がある。"
6284
6285 #. type: TP
6286 #: build/C/man2/open.2:267
6287 #, no-wrap
6288 msgid "B<S_IWGRP>"
6289 msgstr "B<S_IWGRP>"
6290
6291 #. type: Plain text
6292 #: build/C/man2/open.2:270
6293 msgid "00020 group has write permission"
6294 msgstr "00020 グループに書き込みの許可がある。"
6295
6296 #. type: TP
6297 #: build/C/man2/open.2:270
6298 #, no-wrap
6299 msgid "B<S_IXGRP>"
6300 msgstr "B<S_IXGRP>"
6301
6302 #. type: Plain text
6303 #: build/C/man2/open.2:273
6304 msgid "00010 group has execute permission"
6305 msgstr "00010 グループに実行の許可がある。"
6306
6307 #. type: TP
6308 #: build/C/man2/open.2:273
6309 #, no-wrap
6310 msgid "B<S_IRWXO>"
6311 msgstr "B<S_IRWXO>"
6312
6313 #. type: Plain text
6314 #: build/C/man2/open.2:276
6315 msgid "00007 others have read, write and execute permission"
6316 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6317
6318 #. type: TP
6319 #: build/C/man2/open.2:276
6320 #, no-wrap
6321 msgid "B<S_IROTH>"
6322 msgstr "B<S_IROTH>"
6323
6324 #. type: Plain text
6325 #: build/C/man2/open.2:279
6326 msgid "00004 others have read permission"
6327 msgstr "00004 他人に読み込みの許可がある。"
6328
6329 #. type: TP
6330 #: build/C/man2/open.2:279
6331 #, no-wrap
6332 msgid "B<S_IWOTH>"
6333 msgstr "B<S_IWOTH>"
6334
6335 #. type: Plain text
6336 #: build/C/man2/open.2:282
6337 msgid "00002 others have write permission"
6338 msgstr "00002 他人に書き込みの許可がある。"
6339
6340 #. type: TP
6341 #: build/C/man2/open.2:282
6342 #, no-wrap
6343 msgid "B<S_IXOTH>"
6344 msgstr "B<S_IXOTH>"
6345
6346 #. type: Plain text
6347 #: build/C/man2/open.2:285
6348 msgid "00001 others have execute permission"
6349 msgstr "00001 他人に実行の許可がある。"
6350
6351 #. type: TP
6352 #: build/C/man2/open.2:286
6353 #, no-wrap
6354 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6355 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6356
6357 #. type: Plain text
6358 #: build/C/man2/open.2:303
6359 msgid ""
6360 "Try to minimize cache effects of the I/O to and from this file.  In general "
6361 "this will degrade performance, but it is useful in special situations, such "
6362 "as when applications do their own caching.  File I/O is done directly to/"
6363 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6364 "transfer data synchronously, but does not give the guarantees of the "
6365 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6366 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6367 "B<O_DIRECT>.  See NOTES below for further discussion."
6368 msgstr ""
6369 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6370 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6371 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6372 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6373 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6374 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6375 "使用しなければならない。下記の「注意」の節の議論も参照。"
6376
6377 #. type: Plain text
6378 #: build/C/man2/open.2:307
6379 msgid ""
6380 "A semantically similar (but deprecated) interface for block devices is "
6381 "described in B<raw>(8)."
6382 msgstr ""
6383 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6384 "れている (但し、このインタフェースは非推奨である)。"
6385
6386 #. type: TP
6387 #: build/C/man2/open.2:307
6388 #, no-wrap
6389 msgid "B<O_DIRECTORY>"
6390 msgstr "B<O_DIRECTORY>"
6391
6392 #.  But see the following and its replies:
6393 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6394 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6395 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6396 #. type: Plain text
6397 #: build/C/man2/open.2:319
6398 #, fuzzy
6399 #| msgid ""
6400 #| "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6401 #| "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-"
6402 #| "of-service problems if B<opendir>(3)  is called on a FIFO or tape device, "
6403 #| "but should not be used outside of the implementation of B<opendir>(3)."
6404 msgid ""
6405 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6406 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6407 "service problems if B<opendir>(3)  is called on a FIFO or tape device."
6408 msgstr ""
6409 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6410 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6411 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6412 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6413
6414 #. type: TP
6415 #: build/C/man2/open.2:319
6416 #, no-wrap
6417 msgid "B<O_EXCL>"
6418 msgstr "B<O_EXCL>"
6419
6420 #. type: Plain text
6421 #: build/C/man2/open.2:329
6422 msgid ""
6423 "Ensure that this call creates the file: if this flag is specified in "
6424 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6425 "will fail."
6426 msgstr ""
6427 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6428 "と\n"
6429 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6430 "敗\n"
6431 "する。"
6432
6433 #.  POSIX.1-2001 explicitly requires this behavior.
6434 #. type: Plain text
6435 #: build/C/man2/open.2:337
6436 msgid ""
6437 "When these two flags are specified, symbolic links are not followed: if "
6438 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6439 "the symbolic link points to."
6440 msgstr ""
6441 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6442 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6443 "かに関わらず B<open>()  は失敗する。"
6444
6445 #. type: Plain text
6446 #: build/C/man2/open.2:353
6447 msgid ""
6448 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6449 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6450 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6451 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6452 "the error B<EBUSY>."
6453 msgstr ""
6454 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6455 "B<O_EXCL> の動作は規定されていない。\n"
6456 "これには一つ例外があり、Linux 2.6 以降では、\n"
6457 "I<pathname> がブロックデバイスを参照している場合、\n"
6458 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6459 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6460 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6461
6462 #. type: Plain text
6463 #: build/C/man2/open.2:375
6464 msgid ""
6465 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6466 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6467 "programs that rely on it for performing locking tasks will contain a race "
6468 "condition.  Portable programs that want to perform atomic file locking using "
6469 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6470 "create a unique file on the same file system (e.g., incorporating hostname "
6471 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6472 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6473 "unique file to check if its link count has increased to 2, in which case the "
6474 "lock is also successful."
6475 msgstr ""
6476 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6477 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6478 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6479 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6480 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6481 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6482 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6483 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6484 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6485 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6486 "じくロックに成功しているということである。"
6487
6488 #. type: TP
6489 #: build/C/man2/open.2:375
6490 #, no-wrap
6491 msgid "B<O_LARGEFILE>"
6492 msgstr "B<O_LARGEFILE>"
6493
6494 #. type: Plain text
6495 #: build/C/man2/open.2:397
6496 msgid ""
6497 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6498 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6499 "macro must be defined (before including I<any> header files)  in order to "
6500 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6501 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6502 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6503 msgstr ""
6504 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6505 "ファ\n"
6506 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6507 "イ\n"
6508 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6509 "ば\n"
6510 "ならない。\n"
6511 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6512 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6513 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6514
6515 #. type: TP
6516 #: build/C/man2/open.2:397
6517 #, no-wrap
6518 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6519 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6520
6521 #.  The O_NOATIME flag also affects the treatment of st_atime
6522 #.  by mmap() and readdir(2), MTK, Dec 04.
6523 #. type: Plain text
6524 #: build/C/man2/open.2:410
6525 msgid ""
6526 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6527 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6528 "programs, where its use can significantly reduce the amount of disk "
6529 "activity.  This flag may not be effective on all file systems.  One example "
6530 "is NFS, where the server maintains the access time."
6531 msgstr ""
6532 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6533 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
6534 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
6535 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6536 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6537
6538 #. type: TP
6539 #: build/C/man2/open.2:410
6540 #, no-wrap
6541 msgid "B<O_NOCTTY>"
6542 msgstr "B<O_NOCTTY>"
6543
6544 #. type: Plain text
6545 #: build/C/man2/open.2:418
6546 msgid ""
6547 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
6548 "become the process's controlling terminal even if the process does not have "
6549 "one."
6550 msgstr ""
6551 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6552 "る\n"
6553 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6554 "ル\n"
6555 "は制御端末にはならない。"
6556
6557 #. type: TP
6558 #: build/C/man2/open.2:418
6559 #, no-wrap
6560 msgid "B<O_NOFOLLOW>"
6561 msgstr "B<O_NOFOLLOW>"
6562
6563 #.  The headers from glibc 2.0.100 and later include a
6564 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6565 #.  used\fP.
6566 #. type: Plain text
6567 #: build/C/man2/open.2:430
6568 #, fuzzy
6569 #| msgid ""
6570 #| "If I<pathname> is a symbolic link, then the open fails.  This is a "
6571 #| "FreeBSD extension, which was added to Linux in version 2.1.126.  Symbolic "
6572 #| "links in earlier components of the pathname will still be followed."
6573 msgid ""
6574 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6575 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6576 "earlier components of the pathname will still be followed.  See also "
6577 "B<O_NOPATH> below."
6578 msgstr ""
6579 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6580 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6581 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6582 "が シンボリックリンクである場合には、それが指す先が参照される。"
6583
6584 #. type: TP
6585 #: build/C/man2/open.2:430
6586 #, no-wrap
6587 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6588 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6589
6590 #. type: Plain text
6591 #: build/C/man2/open.2:443
6592 msgid ""
6593 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6594 "()  nor any subsequent operations on the file descriptor which is returned "
6595 "will cause the calling process to wait.  For the handling of FIFOs (named "
6596 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6597 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6598 "see B<fcntl>(2)."
6599 msgstr ""
6600 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6601 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6602 "出\n"
6603 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6604 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6605 "イ\n"
6606 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6607 "議論は、 B<fcntl>(2) を参照すること。"
6608
6609 #. type: TP
6610 #: build/C/man2/open.2:443
6611 #, fuzzy, no-wrap
6612 #| msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6613 msgid "B<O_PATH> (since Linux 2.6.39)"
6614 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6615
6616 #
6617 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
6618 #.  commit 326be7b484843988afe57566b627fb7a70beac56
6619 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
6620 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
6621 #.      Subject: Re: [PATCH] open(2): document O_PATH
6622 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
6623 #. type: Plain text
6624 #: build/C/man2/open.2:464
6625 msgid ""
6626 "Obtain a file descriptor that can be used for two purposes: to indicate a "
6627 "location in the file-system tree and to perform operations that act purely "
6628 "at the file descriptor level.  The file itself is not opened, and other file "
6629 "operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), "
6630 "B<fgetxattr>(2))  fail with the error B<EBADF>."
6631 msgstr ""
6632
6633 #. type: Plain text
6634 #: build/C/man2/open.2:468
6635 msgid ""
6636 "The following operations I<can> be performed on the resulting file "
6637 "descriptor:"
6638 msgstr ""
6639
6640 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
6641 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
6642 #. type: Plain text
6643 #: build/C/man2/open.2:477
6644 msgid ""
6645 "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
6646 msgstr ""
6647
6648 #. type: Plain text
6649 #: build/C/man2/open.2:483
6650 msgid ""
6651 "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
6652 msgstr ""
6653
6654 #. type: Plain text
6655 #: build/C/man2/open.2:489
6656 msgid ""
6657 "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and "
6658 "B<F_SETFD>)."
6659 msgstr ""
6660
6661 #. type: Plain text
6662 #: build/C/man2/open.2:495
6663 msgid ""
6664 "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> "
6665 "operation: the returned flags will include the bit B<O_PATH>."
6666 msgstr ""
6667
6668 #. type: Plain text
6669 #: build/C/man2/open.2:502
6670 msgid ""
6671 "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
6672 "the other \"*at()\" system calls."
6673 msgstr ""
6674
6675 #. type: Plain text
6676 #: build/C/man2/open.2:508
6677 msgid ""
6678 "Passing the file descriptor to another process via a UNIX domain socket (see "
6679 "B<SCM_RIGHTS> in B<unix>(7))."
6680 msgstr ""
6681
6682 #. type: Plain text
6683 #: build/C/man2/open.2:519
6684 msgid ""
6685 "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_DIRECTORY> "
6686 "and B<O_NOFOLLOW> are ignored."
6687 msgstr ""
6688
6689 #. type: Plain text
6690 #: build/C/man2/open.2:533
6691 msgid ""
6692 "If the B<O_NOFOLLOW> flag is also specified, then the call returns a file "
6693 "descriptor referring to the symbolic link.  This file descriptor can be used "
6694 "as the I<dirfd> argument in calls to B<fchownat>(2), B<fstatat>(2), B<linkat>"
6695 "(2), and B<readlinkat>(2)  with an empty pathname to have the calls operate "
6696 "on the symbolic link."
6697 msgstr ""
6698
6699 #. type: TP
6700 #: build/C/man2/open.2:533
6701 #, no-wrap
6702 msgid "B<O_SYNC>"
6703 msgstr "B<O_SYNC>"
6704
6705 #. type: Plain text
6706 #: build/C/man2/open.2:541
6707 msgid ""
6708 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6709 "file descriptor will block the calling process until the data has been "
6710 "physically written to the underlying hardware.  I<But see NOTES below>."
6711 msgstr ""
6712 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6713 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6714 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6715 "「注意」の章も参照。>"
6716
6717 #. type: TP
6718 #: build/C/man2/open.2:541
6719 #, no-wrap
6720 msgid "B<O_TRUNC>"
6721 msgstr "B<O_TRUNC>"
6722
6723 #. type: Plain text
6724 #: build/C/man2/open.2:555
6725 msgid ""
6726 "If the file already exists and is a regular file and the open mode allows "
6727 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6728 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6729 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6730 msgstr ""
6731 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6732 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6733 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6734 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6735 "ある。"
6736
6737 #. type: Plain text
6738 #: build/C/man2/open.2:559
6739 msgid ""
6740 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6741 "file has been opened."
6742 msgstr ""
6743 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6744 "用して変更することができる。"
6745
6746 #. type: Plain text
6747 #: build/C/man2/open.2:567
6748 msgid ""
6749 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6750 "O_WRONLY|O_TRUNC>."
6751 msgstr ""
6752 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6753 "を行うのと等価である。"
6754
6755 #. type: Plain text
6756 #: build/C/man2/open.2:575
6757 msgid ""
6758 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6759 "occurred (in which case, I<errno> is set appropriately)."
6760 msgstr ""
6761 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6762 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6763
6764 #. type: Plain text
6765 #: build/C/man2/open.2:585
6766 msgid ""
6767 "The requested access to the file is not allowed, or search permission is "
6768 "denied for one of the directories in the path prefix of I<pathname>, or the "
6769 "file did not exist yet and write access to the parent directory is not "
6770 "allowed.  (See also B<path_resolution>(7).)"
6771 msgstr ""
6772 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6773 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6774 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6775 "すること。)"
6776
6777 #. type: Plain text
6778 #: build/C/man2/open.2:591
6779 msgid ""
6780 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
6781 "of disk blocks or inodes on the file system has been exhausted."
6782 msgstr ""
6783 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
6784 "inode がそのファイルシステムのユーザクォータに達していた。"
6785
6786 #. type: Plain text
6787 #: build/C/man2/open.2:597
6788 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6789 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6790
6791 #. type: Plain text
6792 #: build/C/man2/open.2:601 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6793 msgid "I<pathname> points outside your accessible address space."
6794 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6795
6796 #. type: TP
6797 #: build/C/man2/open.2:601 build/C/man2/write.2:145
6798 #, no-wrap
6799 msgid "B<EFBIG>"
6800 msgstr "B<EFBIG>"
6801
6802 #. type: Plain text
6803 #: build/C/man2/open.2:605
6804 msgid "See B<EOVERFLOW>."
6805 msgstr "B<EOVERFLOW> 参照。"
6806
6807 #. type: TP
6808 #: build/C/man2/open.2:605 build/C/man2/read.2:122 build/C/man3/scanf.3:561
6809 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
6810 #, no-wrap
6811 msgid "B<EINTR>"
6812 msgstr "B<EINTR>"
6813
6814 #. type: Plain text
6815 #: build/C/man2/open.2:612
6816 msgid ""
6817 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6818 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6819 "(7)."
6820 msgstr ""
6821 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6822 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6823 "B<signal>(7)  参照。"
6824
6825 #. type: TP
6826 #: build/C/man2/open.2:612 build/C/man2/read.2:158 build/C/man2/rename.2:143
6827 #: build/C/man2/unlink.2:87
6828 #, no-wrap
6829 msgid "B<EISDIR>"
6830 msgstr "B<EISDIR>"
6831
6832 #. type: Plain text
6833 #: build/C/man2/open.2:621
6834 msgid ""
6835 "I<pathname> refers to a directory and the access requested involved writing "
6836 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6837 msgstr ""
6838 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6839 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6840
6841 #. type: Plain text
6842 #: build/C/man2/open.2:628
6843 msgid ""
6844 "Too many symbolic links were encountered in resolving I<pathname>, or "
6845 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6846 msgstr ""
6847 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6848 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6849
6850 #. type: TP
6851 #: build/C/man2/open.2:628 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:66
6852 #, no-wrap
6853 msgid "B<EMFILE>"
6854 msgstr "B<EMFILE>"
6855
6856 #. type: Plain text
6857 #: build/C/man2/open.2:631
6858 msgid "The process already has the maximum number of files open."
6859 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6860
6861 #. type: Plain text
6862 #: build/C/man2/open.2:635 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6863 msgid "I<pathname> was too long."
6864 msgstr "I<pathname> が長過ぎる。"
6865
6866 #. type: TP
6867 #: build/C/man2/open.2:635 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:69
6868 #, no-wrap
6869 msgid "B<ENFILE>"
6870 msgstr "B<ENFILE>"
6871
6872 #. type: Plain text
6873 #: build/C/man2/open.2:638 build/C/man2/pipe.2:113
6874 msgid "The system limit on the total number of open files has been reached."
6875 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6876
6877 #. type: TP
6878 #: build/C/man2/open.2:638
6879 #, no-wrap
6880 msgid "B<ENODEV>"
6881 msgstr "B<ENODEV>"
6882
6883 #. type: Plain text
6884 #: build/C/man2/open.2:645
6885 msgid ""
6886 "I<pathname> refers to a device special file and no corresponding device "
6887 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6888 "returned.)"
6889 msgstr ""
6890 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6891 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6892 "るべきである)"
6893
6894 #. type: Plain text
6895 #: build/C/man2/open.2:652
6896 msgid ""
6897 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6898 "component in I<pathname> does not exist or is a dangling symbolic link."
6899 msgstr ""
6900 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6901 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6902 "ンクである。"
6903
6904 #. type: Plain text
6905 #: build/C/man2/open.2:661
6906 msgid ""
6907 "I<pathname> was to be created but the device containing I<pathname> has no "
6908 "room for the new file."
6909 msgstr ""
6910 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6911 "ファイルのための空き容量がない。"
6912
6913 #. type: Plain text
6914 #: build/C/man2/open.2:668
6915 msgid ""
6916 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6917 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6918 msgstr ""
6919 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6920 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6921
6922 #. type: Plain text
6923 #: build/C/man2/open.2:674
6924 msgid ""
6925 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6926 "has the file open for reading.  Or, the file is a device special file and no "
6927 "corresponding device exists."
6928 msgstr ""
6929 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6930 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6931 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6932
6933 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6934 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6935 #.  Reported 2006-10-03
6936 #. type: Plain text
6937 #: build/C/man2/open.2:694
6938 msgid ""
6939 "I<pathname> refers to a regular file that is too large to be opened.  The "
6940 "usual scenario here is that an application compiled on a 32-bit platform "
6941 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6942 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6943 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6944 "B<EFBIG> for this case."
6945 msgstr ""
6946 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6947 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6948 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6949 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6950 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6951 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6952 "いた。"
6953
6954 #.  Strictly speaking, it's the file system UID... (MTK)
6955 #. type: Plain text
6956 #: build/C/man2/open.2:702
6957 msgid ""
6958 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6959 "did not match the owner of the file and the caller was not privileged "
6960 "(B<CAP_FOWNER>)."
6961 msgstr ""
6962 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6963 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6964
6965 #. type: Plain text
6966 #: build/C/man2/open.2:707
6967 msgid ""
6968 "I<pathname> refers to a file on a read-only file system and write access was "
6969 "requested."
6970 msgstr ""
6971 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6972 "込みアクセスが要求された。"
6973
6974 #. type: TP
6975 #: build/C/man2/open.2:707
6976 #, no-wrap
6977 msgid "B<ETXTBSY>"
6978 msgstr "B<ETXTBSY>"
6979
6980 #. type: Plain text
6981 #: build/C/man2/open.2:712
6982 msgid ""
6983 "I<pathname> refers to an executable image which is currently being executed "
6984 "and write access was requested."
6985 msgstr ""
6986 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6987
6988 #. type: TP
6989 #: build/C/man2/open.2:712
6990 #, no-wrap
6991 msgid "B<EWOULDBLOCK>"
6992 msgstr "B<EWOULDBLOCK>"
6993
6994 #. type: Plain text
6995 #: build/C/man2/open.2:719
6996 msgid ""
6997 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6998 "the file (see B<fcntl>(2))."
6999 msgstr ""
7000 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
7001 "ていた (B<fcntl>(2)  参照)。"
7002
7003 #. type: Plain text
7004 #: build/C/man2/open.2:733
7005 #, fuzzy
7006 #| msgid ""
7007 #| "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
7008 #| "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
7009 #| "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
7010 #| "definitions."
7011 msgid ""
7012 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, "
7013 "B<O_NOFOLLOW>, and B<O_PATH> flags are Linux-specific, and one may need to "
7014 "define B<_GNU_SOURCE> (before including I<any> header files)  to obtain "
7015 "their definitions."
7016 msgstr ""
7017 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
7018 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
7019 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
7020 "定義する必要があるかもしれない。"
7021
7022 #. type: Plain text
7023 #: build/C/man2/open.2:738
7024 msgid ""
7025 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
7026 "POSIX.1-2008."
7027 msgstr ""
7028 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
7029 "定されている。"
7030
7031 #. type: Plain text
7032 #: build/C/man2/open.2:746
7033 msgid ""
7034 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
7035 "(before including I<any> header files)  to get its definition."
7036 msgstr ""
7037 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
7038 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
7039 "なければならない。"
7040
7041 #. type: Plain text
7042 #: build/C/man2/open.2:754
7043 msgid ""
7044 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
7045 "does not necessarily have the intention to read or write.  This is typically "
7046 "used to open devices in order to get a file descriptor for use with B<ioctl>"
7047 "(2)."
7048 msgstr ""
7049 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
7050 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
7051 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
7052 "られる。"
7053
7054 #.  See for example util-linux's disk-utils/setfdprm.c
7055 #.  For some background on access mode 3, see
7056 #.  http://thread.gmane.org/gmane.linux.kernel/653123
7057 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
7058 #.  LKML, 12 Mar 2008
7059 #. type: Plain text
7060 #: build/C/man2/open.2:783
7061 msgid ""
7062 "Unlike the other values that can be specified in I<flags>, the I<access "
7063 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
7064 "individual bits.  Rather, they define the low order two bits of I<flags>, "
7065 "and are defined respectively as 0, 1, and 2.  In other words, the "
7066 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
7067 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
7068 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
7069 "and write permission on the file and return a descriptor that can't be used "
7070 "for reading or writing.  This nonstandard access mode is used by some Linux "
7071 "drivers to return a descriptor that is to be used only for device-specific "
7072 "B<ioctl>(2)  operations."
7073 msgstr ""
7074 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
7075 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
7076 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
7077 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
7078 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
7079 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
7080 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
7081 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
7082 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、デバイ"
7083 "ス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使われてい"
7084 "る。"
7085
7086 #.  Linux 2.0, 2.5: truncate
7087 #.  Solaris 5.7, 5.8: truncate
7088 #.  Irix 6.5: truncate
7089 #.  Tru64 5.1B: truncate
7090 #.  HP-UX 11.22: truncate
7091 #.  FreeBSD 4.7: truncate
7092 #. type: Plain text
7093 #: build/C/man2/open.2:794
7094 msgid ""
7095 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
7096 "implementations.  On many systems the file is actually truncated."
7097 msgstr ""
7098 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
7099 "くのシステムではファイルは実際に切り詰められる。"
7100
7101 #. type: Plain text
7102 #: build/C/man2/open.2:798
7103 msgid ""
7104 "There are many infelicities in the protocol underlying NFS, affecting "
7105 "amongst others B<O_SYNC> and B<O_NDELAY>."
7106 msgstr ""
7107 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
7108 "B<O_NDELAY> に影響する。"
7109
7110 #. type: Plain text
7111 #: build/C/man2/open.2:820
7112 msgid ""
7113 "POSIX provides for three different variants of synchronized I/O, "
7114 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
7115 "(2.6.31), Linux implements only B<O_SYNC>, but glibc maps B<O_DSYNC> and "
7116 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
7117 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
7118 "require all metadata updates of a write to be on disk on returning to user "
7119 "space, but only the B<O_DSYNC> semantics, which require only actual file "
7120 "data and metadata necessary to retrieve it to be on disk by the time the "
7121 "system call returns."
7122 msgstr ""
7123 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
7124 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
7125 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
7126 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
7127 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
7128 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
7129 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
7130 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
7131 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
7132 "ていればよい。"
7133
7134 #. type: Plain text
7135 #: build/C/man2/open.2:828
7136 msgid ""
7137 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7138 "create them; use B<mknod>(2)  instead."
7139 msgstr ""
7140 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7141 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7142 "用する。"
7143
7144 #. type: Plain text
7145 #: build/C/man2/open.2:841
7146 msgid ""
7147 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
7148 "descriptor but, for example, B<read>(2)  requests are denied with "
7149 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
7150 "permissions, but UID mapping is performed by the server upon read and write "
7151 "requests."
7152 msgstr ""
7153 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
7154 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
7155 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7156 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7157 "る。"
7158
7159 #. type: Plain text
7160 #: build/C/man2/open.2:860
7161 msgid ""
7162 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7163 "fields (respectively, time of last access, time of last status change, and "
7164 "time of last modification; see B<stat>(2))  are set to the current time, and "
7165 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7166 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7167 "st_ctime and st_mtime fields are set to the current time."
7168 msgstr ""
7169 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7170 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7171 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7172 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7173 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7174 "I<st_mtime> フィールドが現在時刻に設定される。"
7175
7176 #. type: SS
7177 #: build/C/man2/open.2:860
7178 #, no-wrap
7179 msgid "O_DIRECT"
7180 msgstr "O_DIRECT"
7181
7182 #. type: Plain text
7183 #: build/C/man2/open.2:877
7184 msgid ""
7185 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7186 "address of user-space buffers and the file offset of I/Os.  In Linux "
7187 "alignment restrictions vary by file system and kernel version and might be "
7188 "absent entirely.  However there is currently no file system-independent "
7189 "interface for an application to discover these restrictions for a given file "
7190 "or file system.  Some file systems provide their own interfaces for doing "
7191 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
7192 msgstr ""
7193 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
7194 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
7195 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
7196 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
7197 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
7198 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
7199 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
7200 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
7201
7202 #. type: Plain text
7203 #: build/C/man2/open.2:882
7204 msgid ""
7205 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
7206 "the file offset must all be multiples of the logical block size of the file "
7207 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
7208 msgstr ""
7209 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
7210 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
7211 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
7212
7213 #. type: Plain text
7214 #: build/C/man2/open.2:916
7215 msgid ""
7216 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7217 "system call, if the memory buffer is a private mapping (i.e., any mapping "
7218 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
7219 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7220 "whether submitted via an asynchronous I/O interface or from another thread "
7221 "in the process, should be completed before B<fork>(2)  is called.  Failure "
7222 "to do so can result in data corruption and undefined behavior in parent and "
7223 "child processes.  This restriction does not apply when the memory buffer for "
7224 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
7225 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
7226 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
7227 "will not be available to the child after B<fork>(2)."
7228 msgstr ""
7229 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
7230 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
7231 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
7232 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
7233 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
7234 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
7235 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
7236 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
7237 "動作が起こる可能性がある。\n"
7238 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
7239 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
7240 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
7241 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
7242 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
7243 "のである)。"
7244
7245 #. type: Plain text
7246 #: build/C/man2/open.2:926
7247 msgid ""
7248 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
7249 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
7250 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
7251 "flag of the same name, but without alignment restrictions."
7252 msgstr ""
7253 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
7254 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
7255 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
7256 "ラグを導入したが、アラインメントの制限はない。"
7257
7258 #. type: Plain text
7259 #: build/C/man2/open.2:935
7260 msgid ""
7261 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
7262 "Linux kernels simply ignore this flag.  Some file systems may not implement "
7263 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
7264 msgstr ""
7265 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
7266 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
7267 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
7268 "と B<open>()  は B<EINVAL> で失敗する。"
7269
7270 #. type: Plain text
7271 #: build/C/man2/open.2:946
7272 msgid ""
7273 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
7274 "file, and especially to overlapping byte regions in the same file.  Even "
7275 "when the file system correctly handles the coherency issues in this "
7276 "situation, overall I/O throughput is likely to be slower than using either "
7277 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
7278 "with direct I/O to the same files."
7279 msgstr ""
7280 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
7281 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
7282 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
7283 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
7284 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
7285 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
7286
7287 #. type: Plain text
7288 #: build/C/man2/open.2:968
7289 msgid ""
7290 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
7291 "Older kernels, or kernels configured in certain ways, may not support this "
7292 "combination.  The NFS protocol does not support passing the flag to the "
7293 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
7294 "the server may still cache the I/O.  The client asks the server to make the "
7295 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
7296 "servers will perform poorly under these circumstances, especially if the I/O "
7297 "size is small.  Some servers may also be configured to lie to clients about "
7298 "the I/O having reached stable storage; this will avoid the performance "
7299 "penalty at some risk to data integrity in the event of server power "
7300 "failure.  The Linux NFS client places no alignment restrictions on "
7301 "B<O_DIRECT> I/O."
7302 msgstr ""
7303 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
7304 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
7305 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
7306 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
7307 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
7308 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
7309 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
7310 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
7311 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
7312 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
7313 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
7314 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
7315
7316 #. type: Plain text
7317 #: build/C/man2/open.2:975
7318 msgid ""
7319 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
7320 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
7321 "as a performance option which is disabled by default."
7322 msgstr ""
7323 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
7324 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
7325 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
7326
7327 #. type: Plain text
7328 #: build/C/man2/open.2:980
7329 msgid ""
7330 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
7331 "interface is just stupid, and was probably designed by a deranged monkey on "
7332 "some serious mind-controlling substances.\"\\(emLinus"
7333 msgstr ""
7334 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
7335 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
7336 "な」 \\(em Linus"
7337
7338 #.  FIXME . Check bugzilla report on open(O_ASYNC)
7339 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
7340 #. type: Plain text
7341 #: build/C/man2/open.2:992
7342 msgid ""
7343 "Currently, it is not possible to enable signal-driven I/O by specifying "
7344 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
7345 msgstr ""
7346 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
7347 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
7348 "すること。"
7349
7350 #. type: Plain text
7351 #: build/C/man2/open.2:1014
7352 msgid ""
7353 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7354 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7355 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7356 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7357 msgstr ""
7358 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7359 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7360 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7361 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7362
7363 #. type: TH
7364 #: build/C/man3/perror.3:31
7365 #, no-wrap
7366 msgid "PERROR"
7367 msgstr "PERROR"
7368
7369 #. type: TH
7370 #: build/C/man3/perror.3:31
7371 #, no-wrap
7372 msgid "2012-04-17"
7373 msgstr "2012-04-17"
7374
7375 #. type: Plain text
7376 #: build/C/man3/perror.3:34
7377 msgid "perror - print a system error message"
7378 msgstr "perror - システムエラーメッセージを出力する"
7379
7380 #. type: Plain text
7381 #: build/C/man3/perror.3:38
7382 msgid "B<void perror(const char *>I<s>B<);>"
7383 msgstr "B<void perror(const char *>I<s>B<);>"
7384
7385 #. type: Plain text
7386 #: build/C/man3/perror.3:40
7387 msgid "B<#include E<lt>errno.hE<gt>>"
7388 msgstr "B<#include E<lt>errno.hE<gt>>"
7389
7390 #. type: Plain text
7391 #: build/C/man3/perror.3:42
7392 msgid "B<const char *>I<sys_errlist>B<[];>"
7393 msgstr "B<const char *>I<sys_errlist>B<[];>"
7394
7395 #. type: Plain text
7396 #: build/C/man3/perror.3:44
7397 msgid "B<int >I<sys_nerr>B<;>"
7398 msgstr "B<int >I<sys_nerr>B<;>"
7399
7400 #. type: Plain text
7401 #: build/C/man3/perror.3:46
7402 msgid "B<int >I<errno>B<;>"
7403 msgstr "B<int >I<errno>B<;>"
7404
7405 #. type: Plain text
7406 #: build/C/man3/perror.3:55
7407 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7408 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7409
7410 #. type: Plain text
7411 #: build/C/man3/perror.3:68
7412 msgid ""
7413 "The routine B<perror>()  produces a message on the standard error output, "
7414 "describing the last error encountered during a call to a system or library "
7415 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7416 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7417 "blank.  Then the message and a new-line."
7418 msgstr ""
7419 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7420 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7421 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7422 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7423 "メッセージと改行が出力される。"
7424
7425 #. type: Plain text
7426 #: build/C/man3/perror.3:76
7427 msgid ""
7428 "To be of most use, the argument string should include the name of the "
7429 "function that incurred the error.  The error number is taken from the "
7430 "external variable I<errno>, which is set when errors occur but not cleared "
7431 "when successful calls are made."
7432 msgstr ""
7433 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7434 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7435 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7436
7437 #. type: Plain text
7438 #: build/C/man3/perror.3:90
7439 msgid ""
7440 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7441 "obtain the error message without the newline.  The largest message number "
7442 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7443 "this list because new error values may not have been added to I<sys_errlist>"
7444 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7445 msgstr ""
7446 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7447 "の\n"
7448 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7449 "ジ\n"
7450 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7451 "と。\n"
7452 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7453 "る。\n"
7454 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7455
7456 #. type: Plain text
7457 #: build/C/man3/perror.3:111
7458 msgid ""
7459 "When a system call fails, it usually returns -1 and sets the variable "
7460 "I<errno> to a value describing what went wrong.  (These values can be found "
7461 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7462 "B<perror>()  serves to translate this error code into human-readable form.  "
7463 "Note that I<errno> is undefined after a successful library call: this call "
7464 "may well change this variable, even though it succeeds, for example because "
7465 "it internally used some other library function that failed.  Thus, if a "
7466 "failing call is not immediately followed by a call to B<perror>(), the value "
7467 "of I<errno> should be saved."
7468 msgstr ""
7469 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7470 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7471 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7472 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7473 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7474 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7475 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7476 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7477 "い。"
7478
7479 #. type: Plain text
7480 #: build/C/man3/perror.3:124
7481 msgid ""
7482 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7483 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7484 "I<sys_errlist> conform to BSD."
7485 msgstr ""
7486 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7487 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7488 "に準拠している。"
7489
7490 #.  and only when _BSD_SOURCE is defined.
7491 #.  When
7492 #.  .B _GNU_SOURCE
7493 #.  is defined, the symbols
7494 #.  .I _sys_nerr
7495 #.  and
7496 #.  .I _sys_errlist
7497 #.  are provided.
7498 #. type: Plain text
7499 #: build/C/man3/perror.3:139
7500 msgid ""
7501 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7502 "I<E<lt>stdio.hE<gt>>."
7503 msgstr ""
7504 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7505 "I<E<lt>stdio.hE<gt>> に含まれている。"
7506
7507 #. type: Plain text
7508 #: build/C/man3/perror.3:144
7509 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7510 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7511
7512 #. type: TH
7513 #: build/C/man2/pipe.2:36
7514 #, no-wrap
7515 msgid "PIPE"
7516 msgstr "PIPE"
7517
7518 #. type: TH
7519 #: build/C/man2/pipe.2:36
7520 #, no-wrap
7521 msgid "2012-02-14"
7522 msgstr "2012-02-14"
7523
7524 #. type: Plain text
7525 #: build/C/man2/pipe.2:39
7526 msgid "pipe, pipe2 - create pipe"
7527 msgstr "pipe, pipe2 - パイプを生成する"
7528
7529 #. type: Plain text
7530 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7531 #, no-wrap
7532 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7533 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7534
7535 #. type: Plain text
7536 #: build/C/man2/pipe.2:44
7537 #, no-wrap
7538 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7539 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7540
7541 #. type: Plain text
7542 #: build/C/man2/pipe.2:48
7543 #, no-wrap
7544 msgid ""
7545 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7546 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7547 "B<#include E<lt>unistd.hE<gt>>\n"
7548 msgstr ""
7549 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7550 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7551 "B<#include E<lt>unistd.hE<gt>>\n"
7552
7553 #. type: Plain text
7554 #: build/C/man2/pipe.2:50
7555 #, no-wrap
7556 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7557 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7558
7559 #. type: Plain text
7560 #: build/C/man2/pipe.2:66
7561 msgid ""
7562 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7563 "for interprocess communication.  The array I<pipefd> is used to return two "
7564 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7565 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7566 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7567 "until it is read from the read end of the pipe.  For further details, see "
7568 "B<pipe>(7)."
7569 msgstr ""
7570 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7571 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7572 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7573 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7574 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7575 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7576
7577 #. type: Plain text
7578 #: build/C/man2/pipe.2:76
7579 msgid ""
7580 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7581 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7582 msgstr ""
7583 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7584 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7585 "きる。"
7586
7587 #. type: TP
7588 #: build/C/man2/pipe.2:76
7589 #, no-wrap
7590 msgid "B<O_NONBLOCK>"
7591 msgstr "B<O_NONBLOCK>"
7592
7593 #. type: Plain text
7594 #: build/C/man2/pipe.2:84
7595 msgid ""
7596 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7597 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7598 "the same result."
7599 msgstr ""
7600 "新しく生成される二つのオープンファイル記述 (open file description) の "
7601 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7602 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7603 "なる。"
7604
7605 #. type: TP
7606 #: build/C/man2/pipe.2:84
7607 #, no-wrap
7608 msgid "B<O_CLOEXEC>"
7609 msgstr "B<O_CLOEXEC>"
7610
7611 #. type: Plain text
7612 #: build/C/man2/pipe.2:92
7613 msgid ""
7614 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7615 "descriptors.  See the description of the same flag in B<open>(2)  for "
7616 "reasons why this may be useful."
7617 msgstr ""
7618 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7619 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7620 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7621
7622 #. type: Plain text
7623 #: build/C/man2/pipe.2:102
7624 msgid "I<pipefd> is not valid."
7625 msgstr "I<pipefd> が無効な値である。"
7626
7627 #. type: Plain text
7628 #: build/C/man2/pipe.2:107
7629 msgid "(B<pipe2>())  Invalid value in I<flags>."
7630 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7631
7632 #. type: Plain text
7633 #: build/C/man2/pipe.2:110
7634 msgid "Too many file descriptors are in use by the process."
7635 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7636
7637 #. type: Plain text
7638 #: build/C/man2/pipe.2:118
7639 msgid ""
7640 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7641 "starting with version 2.9."
7642 msgstr ""
7643 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7644 "はバージョン 2.9 以降で利用できる。"
7645
7646 #. type: Plain text
7647 #: build/C/man2/pipe.2:121
7648 msgid "B<pipe>(): POSIX.1-2001."
7649 msgstr "B<pipe>(): POSIX.1-2001."
7650
7651 #. type: Plain text
7652 #: build/C/man2/pipe.2:124
7653 msgid "B<pipe2>()  is Linux-specific."
7654 msgstr "B<pipe2>()  は Linux 固有である。"
7655
7656 #.  fork.2 refers to this example program.
7657 #. type: Plain text
7658 #: build/C/man2/pipe.2:140
7659 msgid ""
7660 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7661 "process; the child inherits a duplicate set of file descriptors that refer "
7662 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7663 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7664 "the string contained in the program's command-line argument to the pipe, and "
7665 "the child reads this string a byte at a time from the pipe and echoes it on "
7666 "standard output."
7667 msgstr ""
7668 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7669 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7670 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7671 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7672 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7673 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7674
7675 #. type: Plain text
7676 #: build/C/man2/pipe.2:147
7677 #, no-wrap
7678 msgid ""
7679 "#include E<lt>sys/wait.hE<gt>\n"
7680 "#include E<lt>stdio.hE<gt>\n"
7681 "#include E<lt>stdlib.hE<gt>\n"
7682 "#include E<lt>unistd.hE<gt>\n"
7683 "#include E<lt>string.hE<gt>\n"
7684 msgstr ""
7685 "#include E<lt>sys/wait.hE<gt>\n"
7686 "#include E<lt>stdio.hE<gt>\n"
7687 "#include E<lt>stdlib.hE<gt>\n"
7688 "#include E<lt>unistd.hE<gt>\n"
7689 "#include E<lt>string.hE<gt>\n"
7690
7691 #. type: Plain text
7692 #: build/C/man2/pipe.2:154
7693 #, no-wrap
7694 msgid ""
7695 "int\n"
7696 "main(int argc, char *argv[])\n"
7697 "{\n"
7698 "    int pipefd[2];\n"
7699 "    pid_t cpid;\n"
7700 "    char buf;\n"
7701 msgstr ""
7702 "int\n"
7703 "main(int argc, char *argv[])\n"
7704 "{\n"
7705 "    int pipefd[2];\n"
7706 "    pid_t cpid;\n"
7707 "    char buf;\n"
7708
7709 #. type: Plain text
7710 #: build/C/man2/pipe.2:159
7711 #, no-wrap
7712 msgid ""
7713 "    if (argc != 2) {\n"
7714 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7715 "\texit(EXIT_FAILURE);\n"
7716 "    }\n"
7717 msgstr ""
7718 "    if (argc != 2) {\n"
7719 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7720 "\texit(EXIT_FAILURE);\n"
7721 "    }\n"
7722
7723 #. type: Plain text
7724 #: build/C/man2/pipe.2:164
7725 #, no-wrap
7726 msgid ""
7727 "    if (pipe(pipefd) == -1) {\n"
7728 "        perror(\"pipe\");\n"
7729 "        exit(EXIT_FAILURE);\n"
7730 "    }\n"
7731 msgstr ""
7732 "    if (pipe(pipefd) == -1) {\n"
7733 "        perror(\"pipe\");\n"
7734 "        exit(EXIT_FAILURE);\n"
7735 "    }\n"
7736
7737 #. type: Plain text
7738 #: build/C/man2/pipe.2:170
7739 #, no-wrap
7740 msgid ""
7741 "    cpid = fork();\n"
7742 "    if (cpid == -1) {\n"
7743 "        perror(\"fork\");\n"
7744 "        exit(EXIT_FAILURE);\n"
7745 "    }\n"
7746 msgstr ""
7747 "    cpid = fork();\n"
7748 "    if (cpid == -1) {\n"
7749 "        perror(\"fork\");\n"
7750 "        exit(EXIT_FAILURE);\n"
7751 "    }\n"
7752
7753 #. type: Plain text
7754 #: build/C/man2/pipe.2:173
7755 #, no-wrap
7756 msgid ""
7757 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7758 "        close(pipefd[1]);          /* Close unused write end */\n"
7759 msgstr ""
7760 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7761 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7762
7763 #. type: Plain text
7764 #: build/C/man2/pipe.2:176
7765 #, no-wrap
7766 msgid ""
7767 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7768 "            write(STDOUT_FILENO, &buf, 1);\n"
7769 msgstr ""
7770 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7771 "            write(STDOUT_FILENO, &buf, 1);\n"
7772
7773 #. type: Plain text
7774 #: build/C/man2/pipe.2:180
7775 #, no-wrap
7776 msgid ""
7777 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7778 "        close(pipefd[0]);\n"
7779 "        _exit(EXIT_SUCCESS);\n"
7780 msgstr ""
7781 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7782 "        close(pipefd[0]);\n"
7783 "        _exit(EXIT_SUCCESS);\n"
7784
7785 #. type: Plain text
7786 #: build/C/man2/pipe.2:189
7787 #, no-wrap
7788 msgid ""
7789 "    } else {            /* Parent writes argv[1] to pipe */\n"
7790 "        close(pipefd[0]);          /* Close unused read end */\n"
7791 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7792 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7793 "        wait(NULL);                /* Wait for child */\n"
7794 "        exit(EXIT_SUCCESS);\n"
7795 "    }\n"
7796 "}\n"
7797 msgstr ""
7798 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7799 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7800 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7801 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7802 "        wait(NULL);                /* 子プロセスを待つ */\n"
7803 "        exit(EXIT_SUCCESS);\n"
7804 "    }\n"
7805 "}\n"
7806
7807 #. type: Plain text
7808 #: build/C/man2/pipe.2:197
7809 msgid ""
7810 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7811 "(7)"
7812 msgstr ""
7813 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7814 "(7)"
7815
7816 #. type: TH
7817 #: build/C/man3/popen.3:40
7818 #, no-wrap
7819 msgid "POPEN"
7820 msgstr "POPEN"
7821
7822 #. type: Plain text
7823 #: build/C/man3/popen.3:43
7824 msgid "popen, pclose - pipe stream to or from a process"
7825 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7826
7827 #. type: Plain text
7828 #: build/C/man3/popen.3:48
7829 #, no-wrap
7830 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7831 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7832
7833 #. type: Plain text
7834 #: build/C/man3/popen.3:50
7835 #, no-wrap
7836 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7837 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7838
7839 #. type: Plain text
7840 #: build/C/man3/popen.3:60
7841 msgid "B<popen>(), B<pclose>():"
7842 msgstr "B<popen>(), B<pclose>():"
7843
7844 #. type: Plain text
7845 #: build/C/man3/popen.3:62
7846 msgid ""
7847 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7848 msgstr ""
7849 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7850
7851 #. type: Plain text
7852 #: build/C/man3/popen.3:73
7853 msgid ""
7854 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7855 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7856 "I<type> argument may specify only reading or writing, not both; the "
7857 "resulting stream is correspondingly read-only or write-only."
7858 msgstr ""
7859 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7860 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7861 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7862 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7863 "たは 書き込み専用のいずれかとなる。"
7864
7865 #. type: Plain text
7866 #: build/C/man3/popen.3:97
7867 msgid ""
7868 "The I<command> argument is a pointer to a null-terminated string containing "
7869 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7870 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7871 "argument is a pointer to a null-terminated string which must contain either "
7872 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7873 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7874 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7875 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7876 "B<open>(2)  for reasons why this may be useful."
7877 msgstr ""
7878 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7879 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7880 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7881 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7882 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7883 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7884 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7885 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7886 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7887
7888 #. type: Plain text
7889 #: build/C/man3/popen.3:113
7890 msgid ""
7891 "The return value from B<popen>()  is a normal standard I/O stream in all "
7892 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7893 "(3).  Writing to such a stream writes to the standard input of the command; "
7894 "the command's standard output is the same as that of the process that called "
7895 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7896 "reading from a \"popened\" stream reads the command's standard output, and "
7897 "the command's standard input is the same as that of the process that called "
7898 "B<popen>()."
7899 msgstr ""
7900 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7901 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7902 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7903 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7904 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7905 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7906 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7907 "セスの標準入力と同一である。"
7908
7909 #. type: Plain text
7910 #: build/C/man3/popen.3:117
7911 msgid "Note that output B<popen>()  streams are fully buffered by default."
7912 msgstr ""
7913 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7914 "に注意しよう。"
7915
7916 #. type: Plain text
7917 #: build/C/man3/popen.3:123
7918 msgid ""
7919 "The B<pclose>()  function waits for the associated process to terminate and "
7920 "returns the exit status of the command as returned by B<wait4>(2)."
7921 msgstr ""
7922 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7923 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7924
7925 #. type: Plain text
7926 #: build/C/man3/popen.3:131
7927 msgid ""
7928 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7929 "calls fail, or if it cannot allocate memory."
7930 msgstr ""
7931 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7932 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7933
7934 #.  These conditions actually give undefined results, so I commented
7935 #.  them out.
7936 #.  .I stream
7937 #.  is not associated with a "popen()ed" command, if
7938 #. .I stream
7939 #.  already "pclose()d", or if
7940 #. type: Plain text
7941 #: build/C/man3/popen.3:146
7942 msgid ""
7943 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7944 "some other error is detected.  In the event of an error, these functions set "
7945 "I<errnro> to indicate the cause of the error."
7946 msgstr ""
7947 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7948 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
7949 "る。"
7950
7951 #. type: Plain text
7952 #: build/C/man3/popen.3:165
7953 msgid ""
7954 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7955 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7956 "appropriately.  If the I<type> argument is invalid, and this condition is "
7957 "detected, I<errno> is set to B<EINVAL>."
7958 msgstr ""
7959 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7960 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7961 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7962 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7963
7964 #. type: Plain text
7965 #: build/C/man3/popen.3:172
7966 msgid ""
7967 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7968 msgstr ""
7969 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7970 "B<ECHILD> にセットされる。"
7971
7972 #. type: Plain text
7973 #: build/C/man3/popen.3:178
7974 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7975 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7976
7977 #. type: Plain text
7978 #: build/C/man3/popen.3:191
7979 msgid ""
7980 "Since the standard input of a command opened for reading shares its seek "
7981 "offset with the process that called B<popen>(), if the original process has "
7982 "done a buffered read, the command's input position may not be as expected.  "
7983 "Similarly, the output from a command opened for writing may become "
7984 "intermingled with that of the original process.  The latter can be avoided "
7985 "by calling B<fflush>(3)  before B<popen>()."
7986 msgstr ""
7987 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7988 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7989 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7990 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7991 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7992 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7993
7994 #.  .SH HISTORY
7995 #.  A
7996 #.  .BR popen ()
7997 #.  and a
7998 #.  .BR pclose ()
7999 #.  function appeared in Version 7 AT&T UNIX.
8000 #. type: Plain text
8001 #: build/C/man3/popen.3:201
8002 msgid ""
8003 "Failure to execute the shell is indistinguishable from the shell's failure "
8004 "to execute command, or an immediate exit of the command.  The only hint is "
8005 "an exit status of 127."
8006 msgstr ""
8007 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
8008 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
8009 "なることである。"
8010
8011 #. type: Plain text
8012 #: build/C/man3/popen.3:211
8013 msgid ""
8014 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
8015 "B<fopen>(3), B<stdio>(3), B<system>(3)"
8016 msgstr ""
8017 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
8018 "B<fopen>(3), B<stdio>(3), B<system>(3)"
8019
8020 #. type: TH
8021 #: build/C/man3/printf.3:34
8022 #, no-wrap
8023 msgid "PRINTF"
8024 msgstr "PRINTF"
8025
8026 #. type: TH
8027 #: build/C/man3/printf.3:34
8028 #, no-wrap
8029 msgid "2013-03-05"
8030 msgstr "2013-03-05"
8031
8032 #. type: Plain text
8033 #: build/C/man3/printf.3:38
8034 msgid ""
8035 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
8036 "formatted output conversion"
8037 msgstr ""
8038 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
8039 "指定された書式に変換して出力を行う"
8040
8041 #. type: Plain text
8042 #: build/C/man3/printf.3:42
8043 msgid "B<int printf(const char *>I<format>B<, ...);>"
8044 msgstr "B<int printf(const char *>I<format>B<, ...);>"
8045
8046 #. type: Plain text
8047 #: build/C/man3/printf.3:44
8048 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
8049 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
8050
8051 #. type: Plain text
8052 #: build/C/man3/printf.3:46
8053 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
8054 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
8055
8056 #. type: Plain text
8057 #: build/C/man3/printf.3:48
8058 msgid ""
8059 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8060 "*>I<format>B<, ...);>"
8061 msgstr ""
8062 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8063 "*>I<format>B<, ...);>"
8064
8065 #. type: Plain text
8066 #: build/C/man3/printf.3:50
8067 msgid "B<#include E<lt>stdarg.hE<gt>>"
8068 msgstr "B<#include E<lt>stdarg.hE<gt>>"
8069
8070 #. type: Plain text
8071 #: build/C/man3/printf.3:52
8072 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
8073 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
8074
8075 #. type: Plain text
8076 #: build/C/man3/printf.3:54
8077 msgid ""
8078 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8079 ">I<ap>B<);>"
8080 msgstr ""
8081 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8082 ">I<ap>B<);>"
8083
8084 #. type: Plain text
8085 #: build/C/man3/printf.3:56
8086 msgid ""
8087 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
8088 msgstr ""
8089 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
8090
8091 #. type: Plain text
8092 #: build/C/man3/printf.3:59
8093 msgid ""
8094 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8095 "*>I<format>B<, va_list >I<ap>B<);>"
8096 msgstr ""
8097 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8098 "*>I<format>B<, va_list >I<ap>B<);>"
8099
8100 #. type: Plain text
8101 #: build/C/man3/printf.3:68
8102 msgid "B<snprintf>(), B<vsnprintf>():"
8103 msgstr "B<snprintf>(), B<vsnprintf>():"
8104
8105 #. type: Plain text
8106 #: build/C/man3/printf.3:71
8107 msgid ""
8108 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8109 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8110 msgstr ""
8111 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8112 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8113
8114 #. type: Plain text
8115 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
8116 msgid "or I<cc -std=c99>"
8117 msgstr "or I<cc -std=c99>"
8118
8119 #. type: Plain text
8120 #: build/C/man3/printf.3:101
8121 msgid ""
8122 "The functions in the B<printf>()  family produce output according to a "
8123 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
8124 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
8125 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
8126 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
8127 "string I<str>."
8128 msgstr ""
8129 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
8130 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
8131 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
8132 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8133 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
8134
8135 #. type: Plain text
8136 #: build/C/man3/printf.3:110
8137 msgid ""
8138 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
8139 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
8140 msgstr ""
8141 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
8142 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
8143
8144 #. type: Plain text
8145 #: build/C/man3/printf.3:134
8146 msgid ""
8147 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
8148 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
8149 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
8150 "instead of a variable number of arguments.  These functions do not call the "
8151 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
8152 "I<ap> is undefined after the call.  See B<stdarg>(3)."
8153 msgstr ""
8154 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
8155 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
8156 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
8157 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
8158 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
8159 "(3)  を参照のこと。"
8160
8161 #. type: Plain text
8162 #: build/C/man3/printf.3:141
8163 msgid ""
8164 "These eight functions write the output under the control of a I<format> "
8165 "string that specifies how subsequent arguments (or arguments accessed via "
8166 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
8167 "output."
8168 msgstr ""
8169 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
8170 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
8171 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
8172
8173 #. type: Plain text
8174 #: build/C/man3/printf.3:152
8175 msgid ""
8176 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
8177 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
8178 "copying to take place between objects that overlap (e.g., if the target "
8179 "string array and one of the supplied input arguments refer to the same "
8180 "buffer).  See NOTES."
8181 msgstr ""
8182 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8183 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
8184 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
8185 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
8186 "照。"
8187
8188 #. type: SS
8189 #: build/C/man3/printf.3:152
8190 #, no-wrap
8191 msgid "Return value"
8192 msgstr "Return Values"
8193
8194 #. type: Plain text
8195 #: build/C/man3/printf.3:155
8196 msgid ""
8197 "Upon successful return, these functions return the number of characters "
8198 "printed (excluding the null byte used to end output to strings)."
8199 msgstr ""
8200 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
8201 "用する NULL バイトは数に含まれない)。"
8202
8203 #. type: Plain text
8204 #: build/C/man3/printf.3:171
8205 msgid ""
8206 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
8207 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
8208 "the output was truncated due to this limit then the return value is the "
8209 "number of characters (excluding the terminating null byte)  which would have "
8210 "been written to the final string if enough space had been available.  Thus, "
8211 "a return value of I<size> or more means that the output was truncated.  (See "
8212 "also below under NOTES.)"
8213 msgstr ""
8214 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
8215 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
8216 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
8217 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
8218 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
8219 "する (後述の注意も参照のこと)。"
8220
8221 #. type: Plain text
8222 #: build/C/man3/printf.3:173
8223 msgid "If an output error is encountered, a negative value is returned."
8224 msgstr "エラーが発生した場合は、負の数を返す。"
8225
8226 #. type: SS
8227 #: build/C/man3/printf.3:173
8228 #, no-wrap
8229 msgid "Format of the format string"
8230 msgstr "フォーマット文字列のフォーマット"
8231
8232 #. type: Plain text
8233 #: build/C/man3/printf.3:195
8234 msgid ""
8235 "The format string is a character string, beginning and ending in its initial "
8236 "shift state, if any.  The format string is composed of zero or more "
8237 "directives: ordinary characters (not B<%>), which are copied unchanged to "
8238 "the output stream; and conversion specifications, each of which results in "
8239 "fetching zero or more subsequent arguments.  Each conversion specification "
8240 "is introduced by the character B<%>, and ends with a I<conversion "
8241 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
8242 "an optional minimum I<field width>, an optional I<precision> and an optional "
8243 "I<length modifier>."
8244 msgstr ""
8245 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
8246 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
8247 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
8248 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
8249 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
8250 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
8251 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
8252 "子> を (この順序で) 置くことができる。"
8253
8254 #. type: Plain text
8255 #: build/C/man3/printf.3:208
8256 msgid ""
8257 "The arguments must correspond properly (after type promotion) with the "
8258 "conversion specifier.  By default, the arguments are used in the order "
8259 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
8260 "next argument (and it is an error if insufficiently many arguments are "
8261 "given).  One can also specify explicitly which argument is taken, at each "
8262 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
8263 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
8264 "denotes the position in the argument list of the desired argument, indexed "
8265 "starting from 1.  Thus,"
8266 msgstr ""
8267 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
8268 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
8269 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
8270 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
8271 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
8272 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
8273 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
8274
8275 #. type: Plain text
8276 #: build/C/man3/printf.3:212
8277 #, no-wrap
8278 msgid "printf(\"%*d\", width, num);\n"
8279 msgstr "printf(\"%*d\", width, num);\n"
8280
8281 #. type: Plain text
8282 #: build/C/man3/printf.3:216
8283 msgid "and"
8284 msgstr "と"
8285
8286 #. type: Plain text
8287 #: build/C/man3/printf.3:220
8288 #, no-wrap
8289 msgid "printf(\"%2$*1$d\", width, num);\n"
8290 msgstr "printf(\"%2$*1$d\", width, num);\n"
8291
8292 #. type: Plain text
8293 #: build/C/man3/printf.3:236
8294 msgid ""
8295 "are equivalent.  The second style allows repeated references to the same "
8296 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
8297 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
8298 "\\(aq is used, it must be used throughout for all conversions taking an "
8299 "argument and all width and precision arguments, but it may be mixed with \"%%"
8300 "\" formats which do not consume an argument.  There may be no gaps in the "
8301 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
8302 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
8303 "format string."
8304 msgstr ""
8305 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
8306 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
8307 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
8308 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
8309 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
8310 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
8311 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
8312
8313 #. type: Plain text
8314 #: build/C/man3/printf.3:246
8315 msgid ""
8316 "For some numeric conversions a radix character (\"decimal point\") or "
8317 "thousands' grouping character is used.  The actual character used depends on "
8318 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
8319 "radix character, and does not have a grouping character.  Thus,"
8320 msgstr ""
8321 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
8322 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
8323 "\\(aq を用い、 区切り文字は使わない。 従って、"
8324
8325 #. type: Plain text
8326 #: build/C/man3/printf.3:250
8327 #, no-wrap
8328 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
8329 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
8330
8331 #. type: Plain text
8332 #: build/C/man3/printf.3:255
8333 msgid ""
8334 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
8335 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
8336 msgstr ""
8337 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
8338 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
8339
8340 #. type: SS
8341 #: build/C/man3/printf.3:255
8342 #, no-wrap
8343 msgid "The flag characters"
8344 msgstr "フラグ文字"
8345
8346 #. type: Plain text
8347 #: build/C/man3/printf.3:257
8348 msgid "The character % is followed by zero or more of the following flags:"
8349 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
8350
8351 #. type: TP
8352 #: build/C/man3/printf.3:257
8353 #, no-wrap
8354 msgid "B<#>"
8355 msgstr "B<#>"
8356
8357 #. type: Plain text
8358 #: build/C/man3/printf.3:291
8359 msgid ""
8360 "The value should be converted to an \"alternate form\".  For B<o> "
8361 "conversions, the first character of the output string is made zero (by "
8362 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
8363 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
8364 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
8365 "conversions, the result will always contain a decimal point, even if no "
8366 "digits follow it (normally, a decimal point appears in the results of those "
8367 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
8368 "trailing zeros are not removed from the result as they would otherwise be.  "
8369 "For other conversions, the result is undefined."
8370 msgstr ""
8371 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
8372 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
8373 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
8374 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
8375 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
8376 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
8377 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
8378 "変換では、結果は未定義である。"
8379
8380 #. type: TP
8381 #: build/C/man3/printf.3:291
8382 #, no-wrap
8383 msgid "B<\\&0>"
8384 msgstr "B<\\&0>"
8385
8386 #. type: Plain text
8387 #: build/C/man3/printf.3:331
8388 msgid ""
8389 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8390 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8391 "converted value is padded on the left with zeros rather than blanks.  If the "
8392 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8393 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8394 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8395 "is undefined."
8396 msgstr ""
8397 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8398 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8399 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8400 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8401 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8402 "である。"
8403
8404 #. type: TP
8405 #: build/C/man3/printf.3:331
8406 #, no-wrap
8407 msgid "B<->"
8408 msgstr "B<->"
8409
8410 #. type: Plain text
8411 #: build/C/man3/printf.3:344
8412 msgid ""
8413 "The converted value is to be left adjusted on the field boundary.  (The "
8414 "default is right justification.)  Except for B<n> conversions, the converted "
8415 "value is padded on the right with blanks, rather than on the left with "
8416 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8417 msgstr ""
8418 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8419 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8420 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8421
8422 #. type: TP
8423 #: build/C/man3/printf.3:344
8424 #, no-wrap
8425 msgid "B<\\(aq \\(aq>"
8426 msgstr "B<' '>"
8427
8428 #. type: Plain text
8429 #: build/C/man3/printf.3:348
8430 msgid ""
8431 "(a space) A blank should be left before a positive number (or empty string) "
8432 "produced by a signed conversion."
8433 msgstr ""
8434 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8435 "列) が置かれる。"
8436
8437 #. type: TP
8438 #: build/C/man3/printf.3:348
8439 #, no-wrap
8440 msgid "B<+>"
8441 msgstr "B<+>"
8442
8443 #. type: Plain text
8444 #: build/C/man3/printf.3:356
8445 msgid ""
8446 "A sign (+ or -) should always be placed before a number produced by a signed "
8447 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8448 "overrides a space if both are used."
8449 msgstr ""
8450 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8451 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8452 "が使われている場合には、 B<+> が優先される。"
8453
8454 #. type: Plain text
8455 #: build/C/man3/printf.3:359
8456 msgid ""
8457 "The five flag characters above are defined in the C standard.  The SUSv2 "
8458 "specifies one further flag character."
8459 msgstr ""
8460 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8461 "グ文字が規定されている。"
8462
8463 #. type: TP
8464 #: build/C/man3/printf.3:359
8465 #, no-wrap
8466 msgid "B<\\(aq>"
8467 msgstr "B<\\(aq>"
8468
8469 #. type: Plain text
8470 #: build/C/man3/printf.3:376
8471 msgid ""
8472 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8473 "output is to be grouped with thousands' grouping characters if the locale "
8474 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8475 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8476 "\\(aqF>."
8477 msgstr ""
8478 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8479 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8480 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8481 "\\(aqF は SUSv2 には含まれていない。"
8482
8483 #. type: Plain text
8484 #: build/C/man3/printf.3:378
8485 msgid "glibc 2.2 adds one further flag character."
8486 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8487
8488 #. type: TP
8489 #: build/C/man3/printf.3:378
8490 #, no-wrap
8491 msgid "B<I>"
8492 msgstr "B<I>"
8493
8494 #.  outdigits keyword in locale file
8495 #. type: Plain text
8496 #: build/C/man3/printf.3:388
8497 msgid ""
8498 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8499 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8500 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8501 msgstr ""
8502 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8503 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8504 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8505
8506 #. type: SS
8507 #: build/C/man3/printf.3:388
8508 #, no-wrap
8509 msgid "The field width"
8510 msgstr "フィールド幅"
8511
8512 #. type: Plain text
8513 #: build/C/man3/printf.3:404
8514 msgid ""
8515 "An optional decimal digit string (with nonzero first digit) specifying a "
8516 "minimum field width.  If the converted value has fewer characters than the "
8517 "field width, it will be padded with spaces on the left (or right, if the "
8518 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8519 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8520 "the field width is given in the next argument, or in the I<m>-th argument, "
8521 "respectively, which must be of type I<int>.  A negative field width is taken "
8522 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8523 "nonexistent or small field width cause truncation of a field; if the result "
8524 "of a conversion is wider than the field width, the field is expanded to "
8525 "contain the conversion result."
8526 msgstr ""
8527 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8528 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8529 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8530 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8531 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8532 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8533 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8534 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8535 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8536 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8537
8538 #. type: SS
8539 #: build/C/man3/printf.3:404
8540 #, no-wrap
8541 msgid "The precision"
8542 msgstr "精度"
8543
8544 #. type: Plain text
8545 #: build/C/man3/printf.3:440
8546 msgid ""
8547 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8548 "optional decimal digit string.  Instead of a decimal digit string one may "
8549 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8550 "precision is given in the next argument, or in the m-th argument, "
8551 "respectively, which must be of type I<int>.  If the precision is given as "
8552 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8553 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8554 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8555 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8556 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8557 "the maximum number of characters to be printed from a string for B<s> and "
8558 "B<S> conversions."
8559 msgstr ""
8560 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8561 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8562 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8563 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8564 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8565 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8566 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8567 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8568 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8569 "る最大文字数を指定する。"
8570
8571 #. type: SS
8572 #: build/C/man3/printf.3:440
8573 #, no-wrap
8574 msgid "The length modifier"
8575 msgstr "長さ修飾子"
8576
8577 #. type: Plain text
8578 #: build/C/man3/printf.3:450
8579 msgid ""
8580 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8581 "B<X> conversion."
8582 msgstr ""
8583 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8584
8585 #. type: TP
8586 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:294
8587 #, no-wrap
8588 msgid "B<hh>"
8589 msgstr "B<hh>"
8590
8591 #. type: Plain text
8592 #: build/C/man3/printf.3:461
8593 msgid ""
8594 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8595 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8596 "I<signed char> argument."
8597 msgstr ""
8598 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8599 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8600
8601 #. type: TP
8602 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:284
8603 #, no-wrap
8604 msgid "B<h>"
8605 msgstr "B<h>"
8606
8607 #. type: Plain text
8608 #: build/C/man3/printf.3:472
8609 msgid ""
8610 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8611 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8612 "to a I<short int> argument."
8613 msgstr ""
8614 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8615 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8616
8617 #. type: TP
8618 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:311
8619 #, no-wrap
8620 msgid "B<l>"
8621 msgstr "B<l>"
8622
8623 #. type: Plain text
8624 #: build/C/man3/printf.3:491
8625 msgid ""
8626 "(ell) A following integer conversion corresponds to a I<long int> or "
8627 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8628 "a pointer to a I<long int> argument, or a following B<c> conversion "
8629 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8630 "corresponds to a pointer to I<wchar_t> argument."
8631 msgstr ""
8632 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8633 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8634 "変換では I<wchar_t> へのポインタであることを示す。"
8635
8636 #. type: TP
8637 #: build/C/man3/printf.3:491
8638 #, no-wrap
8639 msgid "B<ll>"
8640 msgstr "B<ll> (エルエル)"
8641
8642 #. type: Plain text
8643 #: build/C/man3/printf.3:503
8644 msgid ""
8645 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8646 "or I<unsigned long long int> argument, or a following B<n> conversion "
8647 "corresponds to a pointer to a I<long long int> argument."
8648 msgstr ""
8649 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8650 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8651
8652 #. type: TP
8653 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:338
8654 #, no-wrap
8655 msgid "B<L>"
8656 msgstr "B<L>"
8657
8658 #. type: Plain text
8659 #: build/C/man3/printf.3:519
8660 msgid ""
8661 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8662 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8663 "not.)"
8664 msgstr ""
8665 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8666 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8667 "認められていない。)"
8668
8669 #. type: TP
8670 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:354
8671 #, no-wrap
8672 msgid "B<q>"
8673 msgstr "B<q>"
8674
8675 #. type: Plain text
8676 #: build/C/man3/printf.3:525
8677 msgid ""
8678 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8679 "B<ll>."
8680 msgstr ""
8681 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8682 "意味である。"
8683
8684 #. type: TP
8685 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:302
8686 #, no-wrap
8687 msgid "B<j>"
8688 msgstr "B<j>"
8689
8690 #. type: Plain text
8691 #: build/C/man3/printf.3:532
8692 msgid ""
8693 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8694 "argument."
8695 msgstr ""
8696 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8697
8698 #. type: TP
8699 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:366
8700 #, no-wrap
8701 msgid "B<z>"
8702 msgstr "B<z>"
8703
8704 #. type: Plain text
8705 #: build/C/man3/printf.3:543
8706 msgid ""
8707 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8708 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8709 msgstr ""
8710 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8711 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8712
8713 #. type: TP
8714 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:359
8715 #, no-wrap
8716 msgid "B<t>"
8717 msgstr "B<t>"
8718
8719 #. type: Plain text
8720 #: build/C/man3/printf.3:548
8721 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8722 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8723
8724 #. type: Plain text
8725 #: build/C/man3/printf.3:577
8726 msgid ""
8727 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
8728 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8729 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8730 msgstr ""
8731 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8732 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8733 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8734
8735 #. type: SS
8736 #: build/C/man3/printf.3:577
8737 #, no-wrap
8738 msgid "The conversion specifier"
8739 msgstr "変換指定子"
8740
8741 #. type: Plain text
8742 #: build/C/man3/printf.3:580
8743 msgid ""
8744 "A character that specifies the type of conversion to be applied.  The "
8745 "conversion specifiers and their meanings are:"
8746 msgstr ""
8747 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8748
8749 #. type: TP
8750 #: build/C/man3/printf.3:580
8751 #, no-wrap
8752 msgid "B<d>, B<i>"
8753 msgstr "B<d>, B<i>"
8754
8755 #. type: Plain text
8756 #: build/C/man3/printf.3:590
8757 msgid ""
8758 "The I<int> argument is converted to signed decimal notation.  The precision, "
8759 "if any, gives the minimum number of digits that must appear; if the "
8760 "converted value requires fewer digits, it is padded on the left with zeros.  "
8761 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8762 "the output is empty."
8763 msgstr ""
8764 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8765 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8766 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8767 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8768
8769 #. type: TP
8770 #: build/C/man3/printf.3:590
8771 #, no-wrap
8772 msgid "B<o>, B<u>, B<x>, B<X>"
8773 msgstr "B<o>, B<u>, B<x>, B<X>"
8774
8775 #. type: Plain text
8776 #: build/C/man3/printf.3:617
8777 msgid ""
8778 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8779 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8780 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8781 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8782 "of digits that must appear; if the converted value requires fewer digits, it "
8783 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8784 "printed with an explicit precision 0, the output is empty."
8785 msgstr ""
8786 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8787 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8788 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8789 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8790 "られる。"
8791
8792 #. type: TP
8793 #: build/C/man3/printf.3:617
8794 #, no-wrap
8795 msgid "B<e>, B<E>"
8796 msgstr "B<e>, B<E>"
8797
8798 #. type: Plain text
8799 #: build/C/man3/printf.3:636
8800 msgid ""
8801 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
8802 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
8803 "and the number of digits after it is equal to the precision; if the "
8804 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
8805 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
8806 "than B<e>)  to introduce the exponent.  The exponent always contains at "
8807 "least two digits; if the value is zero, the exponent is 00."
8808 msgstr ""
8809 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
8810 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
8811 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
8812 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
8813 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
8814 "指数の値が 0 の場合には、00 と表示される。"
8815
8816 #. type: TP
8817 #: build/C/man3/printf.3:636
8818 #, no-wrap
8819 msgid "B<f>, B<F>"
8820 msgstr "B<f>, B<F>"
8821
8822 #. type: Plain text
8823 #: build/C/man3/printf.3:647
8824 msgid ""
8825 "The I<double> argument is rounded and converted to decimal notation in the "
8826 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8827 "character is equal to the precision specification.  If the precision is "
8828 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8829 "point character appears.  If a decimal point appears, at least one digit "
8830 "appears before it."
8831 msgstr ""
8832 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8833 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8834 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8835 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8836
8837 #. type: Plain text
8838 #: build/C/man3/printf.3:658
8839 msgid ""
8840 "(The SUSv2 does not know about B<F> and says that character string "
8841 "representations for infinity and NaN may be made available.  The C99 "
8842 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8843 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8844 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8845 msgstr ""
8846 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8847 "行ってもよいことになっている。\n"
8848 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8849 "し、\n"
8850 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8851 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8852
8853 #. type: TP
8854 #: build/C/man3/printf.3:658
8855 #, no-wrap
8856 msgid "B<g>, B<G>"
8857 msgstr "B<g>, B<G>"
8858
8859 #. type: Plain text
8860 #: build/C/man3/printf.3:683
8861 msgid ""
8862 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8863 "for B<G> conversions).  The precision specifies the number of significant "
8864 "digits.  If the precision is missing, 6 digits are given; if the precision "
8865 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8866 "conversion is less than -4 or greater than or equal to the precision.  "
8867 "Trailing zeros are removed from the fractional part of the result; a decimal "
8868 "point appears only if it is followed by at least one digit."
8869 msgstr ""
8870 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8871 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8872 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8873 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8874 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8875 "一つある場合にだけである。"
8876
8877 #. type: TP
8878 #: build/C/man3/printf.3:683
8879 #, no-wrap
8880 msgid "B<a>, B<A>"
8881 msgstr "B<a>, B<A>"
8882
8883 #. type: Plain text
8884 #: build/C/man3/printf.3:707
8885 msgid ""
8886 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8887 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8888 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
8889 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8890 "digit before the decimal point, and the number of digits after it is equal "
8891 "to the precision.  The default precision suffices for an exact "
8892 "representation of the value if an exact representation in base 2 exists and "
8893 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8894 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8895 "and nonzero but otherwise unspecified for normalized numbers."
8896 msgstr ""
8897 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
8898 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8899 "16 進表記に変換する。\n"
8900 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8901 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8902 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8903 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8904 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8905 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8906 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8907
8908 #. type: TP
8909 #: build/C/man3/printf.3:707 build/C/man3/scanf.3:459
8910 #: build/C/man3/wprintf.3:151
8911 #, no-wrap
8912 msgid "B<c>"
8913 msgstr "B<c>"
8914
8915 #. type: Plain text
8916 #: build/C/man3/printf.3:725
8917 msgid ""
8918 "If no B<l> modifier is present, the I<int> argument is converted to an "
8919 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8920 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8921 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8922 "conversion state starting in the initial state, and the resulting multibyte "
8923 "string is written."
8924 msgstr ""
8925 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8926 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8927 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8928 "換し、 変換されたマルチバイト文字列を出力する。"
8929
8930 #. type: TP
8931 #: build/C/man3/printf.3:725 build/C/man3/scanf.3:451
8932 #: build/C/man3/wprintf.3:165
8933 #, no-wrap
8934 msgid "B<s>"
8935 msgstr "B<s>"
8936
8937 #. type: Plain text
8938 #: build/C/man3/printf.3:740
8939 msgid ""
8940 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
8941 "to be a pointer to an array of character type (pointer to a string).  "
8942 "Characters from the array are written up to (but not including) a "
8943 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8944 "than the number specified are written.  If a precision is given, no null "
8945 "byte need be present; if the precision is not specified, or is greater than "
8946 "the size of the array, the array must contain a terminating null byte."
8947 msgstr ""
8948 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
8949 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8950 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8951 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8952 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8953 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8954 "なければならない。"
8955
8956 #. type: Plain text
8957 #: build/C/man3/printf.3:767
8958 msgid ""
8959 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
8960 "expected to be a pointer to an array of wide characters.  Wide characters "
8961 "from the array are converted to multibyte characters (each by a call to the "
8962 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
8963 "state before the first wide character), up to and including a terminating "
8964 "null wide character.  The resulting multibyte characters are written up to "
8965 "(but not including) the terminating null byte.  If a precision is specified, "
8966 "no more bytes than the number specified are written, but no partial "
8967 "multibyte characters are written.  Note that the precision determines the "
8968 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
8969 "positions>.  The array must contain a terminating null wide character, "
8970 "unless a precision is given and it is so small that the number of bytes "
8971 "written exceeds it before the end of the array is reached."
8972 msgstr ""
8973 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
8974 "字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字"
8975 "毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド"
8976 "文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8977 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8978 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8979 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8980 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8981 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8982 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8983 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8984 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8985 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8986 "い。"
8987
8988 #. type: TP
8989 #: build/C/man3/printf.3:767
8990 #, no-wrap
8991 msgid "B<C>"
8992 msgstr "B<C>"
8993
8994 #. type: Plain text
8995 #: build/C/man3/printf.3:773
8996 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8997 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8998
8999 #. type: TP
9000 #: build/C/man3/printf.3:773
9001 #, no-wrap
9002 msgid "B<S>"
9003 msgstr "B<S>"
9004
9005 #. type: Plain text
9006 #: build/C/man3/printf.3:779
9007 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
9008 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
9009
9010 #. type: TP
9011 #: build/C/man3/printf.3:779 build/C/man3/scanf.3:502
9012 #, no-wrap
9013 msgid "B<p>"
9014 msgstr "B<p>"
9015
9016 #. type: Plain text
9017 #: build/C/man3/printf.3:787
9018 msgid ""
9019 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
9020 "or B<%#lx>)."
9021 msgstr ""
9022 "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
9023
9024 #. type: TP
9025 #: build/C/man3/printf.3:787 build/C/man3/scanf.3:510
9026 #, no-wrap
9027 msgid "B<n>"
9028 msgstr "B<n>"
9029
9030 #. type: Plain text
9031 #: build/C/man3/printf.3:794
9032 msgid ""
9033 "The number of characters written so far is stored into the integer indicated "
9034 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
9035 msgstr ""
9036 "これまでに出力された文字数を I<int\\ *> (または類似の型) のポインタ引き数が指"
9037 "す整数に保存する。 引き数の変換は行われない。"
9038
9039 #. type: TP
9040 #: build/C/man3/printf.3:794
9041 #, no-wrap
9042 msgid "B<m>"
9043 msgstr "B<m>"
9044
9045 #. type: Plain text
9046 #: build/C/man3/printf.3:800
9047 msgid ""
9048 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
9049 "required."
9050 msgstr ""
9051 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
9052
9053 #. type: TP
9054 #: build/C/man3/printf.3:800 build/C/man3/scanf.3:377
9055 #, no-wrap
9056 msgid "B<%>"
9057 msgstr "B<%>"
9058
9059 #. type: Plain text
9060 #: build/C/man3/printf.3:806
9061 msgid ""
9062 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
9063 "conversion specification is \\(aq%%\\(aq."
9064 msgstr ""
9065 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
9066 "%\" となる。"
9067
9068 #. type: Plain text
9069 #: build/C/man3/printf.3:821
9070 msgid ""
9071 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9072 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
9073 "B<vsnprintf>()  functions conform to C99."
9074 msgstr ""
9075 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9076 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
9077 "B<vsnprintf>()  は C99 に準拠している。"
9078
9079 #. type: Plain text
9080 #: build/C/man3/printf.3:834
9081 msgid ""
9082 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
9083 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
9084 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
9085 "this case, and gives the return value (as always)  as the number of "
9086 "characters that would have been written in case the output string has been "
9087 "large enough."
9088 msgstr ""
9089 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
9090 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
9091 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
9092 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
9093 "出力されるであろう文字数を返す。"
9094
9095 #. type: Plain text
9096 #: build/C/man3/printf.3:848
9097 msgid ""
9098 "Linux libc4 knows about the five C standard flags.  It knows about the "
9099 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
9100 "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 "
9101 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
9102 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
9103 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
9104 "dependent radix character, no thousands' separator, no NaN or infinity, no "
9105 "\"%m$\" and \"*m$\"."
9106 msgstr ""
9107 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
9108 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
9109 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
9110 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
9111 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
9112 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
9113 "えない。"
9114
9115 #. type: Plain text
9116 #: build/C/man3/printf.3:859
9117 msgid ""
9118 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
9119 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
9120 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
9121 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
9122 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
9123 "outputs I<strerror(errno)>."
9124 msgstr ""
9125 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
9126 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
9127 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
9128 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
9129 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
9130 "ある。"
9131
9132 #. type: Plain text
9133 #: build/C/man3/printf.3:861
9134 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
9135 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
9136
9137 #. type: Plain text
9138 #: build/C/man3/printf.3:864
9139 msgid ""
9140 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
9141 "characters B<a> and B<A>."
9142 msgstr ""
9143 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
9144 "加された。"
9145
9146 #. type: Plain text
9147 #: build/C/man3/printf.3:867
9148 msgid ""
9149 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
9150 "flag character B<I>."
9151 msgstr ""
9152 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
9153 "追加された。"
9154
9155 #. type: Plain text
9156 #: build/C/man3/printf.3:869
9157 msgid "Some programs imprudently rely on code such as the following"
9158 msgstr ""
9159 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
9160 "ラムがある。"
9161
9162 #. type: Plain text
9163 #: build/C/man3/printf.3:871
9164 #, no-wrap
9165 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
9166 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
9167
9168 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
9169 #. type: Plain text
9170 #: build/C/man3/printf.3:887
9171 msgid ""
9172 "to append text to I<buf>.  However, the standards explicitly note that the "
9173 "results are undefined if source and destination buffers overlap when calling "
9174 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
9175 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
9176 "such as the above will B<not> produce the expected results."
9177 msgstr ""
9178 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
9179 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
9180 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
9181 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
9182 "結果が得られ「ない」ことがある。"
9183
9184 #.  .SH HISTORY
9185 #.  UNIX V7 defines the three routines
9186 #.  .BR printf (),
9187 #.  .BR fprintf (),
9188 #.  .BR sprintf (),
9189 #.  and has the flag \-, the width or precision *, the length modifier l,
9190 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
9191 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
9192 #.  #, + and <space> and no longer mentions D,O,U,X.
9193 #.  2.11BSD has
9194 #.  .BR vprintf (),
9195 #.  .BR vfprintf (),
9196 #.  .BR vsprintf (),
9197 #.  and warns not to use D,O,U,X.
9198 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
9199 #.  and the conversions n, p, E, G, X (with current meaning)
9200 #.  and deprecates D,O,U.
9201 #.  4.4BSD introduces the functions
9202 #.  .BR snprintf ()
9203 #.  and
9204 #.  .BR vsnprintf (),
9205 #.  and the length modifier q.
9206 #.  FreeBSD also has functions
9207 #.  .BR asprintf ()
9208 #.  and
9209 #.  .BR vasprintf (),
9210 #.  that allocate a buffer large enough for
9211 #.  .BR sprintf ().
9212 #.  In glibc there are functions
9213 #.  .BR dprintf ()
9214 #.  and
9215 #.  .BR vdprintf ()
9216 #.  that print to a file descriptor instead of a stream.
9217 #. type: Plain text
9218 #: build/C/man3/printf.3:929
9219 msgid ""
9220 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
9221 "conforms to the C99 standard, that is, behaves as described above, since "
9222 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
9223 "was truncated."
9224 msgstr ""
9225 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
9226 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
9227 "切り詰められた場合は -1 を返す。"
9228
9229 #. type: Plain text
9230 #: build/C/man3/printf.3:946
9231 msgid ""
9232 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
9233 "callers must be careful not to overflow the actual space; this is often "
9234 "impossible to assure.  Note that the length of the strings produced is "
9235 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
9236 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
9237 msgstr ""
9238 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
9239 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
9240 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
9241 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
9242 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
9243
9244 #. type: Plain text
9245 #: build/C/man3/printf.3:959
9246 msgid ""
9247 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
9248 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
9249 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
9250 "libc4 leads to serious security problems."
9251 msgstr ""
9252 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
9253 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
9254 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
9255 "深刻なセキュリティ問題を引き起こすことがある。"
9256
9257 #.  .PP
9258 #.  Some floating-point conversions under early libc4
9259 #.  caused memory leaks.
9260 #. type: Plain text
9261 #: build/C/man3/printf.3:973
9262 msgid ""
9263 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
9264 "contain a % character.  If I<foo> comes from untrusted user input, it may "
9265 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
9266 "a security hole."
9267 msgstr ""
9268 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
9269 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
9270 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
9271 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
9272 "ルを作ることになるかもしれない。"
9273
9274 #. type: Plain text
9275 #: build/C/man3/printf.3:977
9276 msgid "To print I<Pi> to five decimal places:"
9277 msgstr "I<Pi> を 5 桁で出力する。"
9278
9279 #. type: Plain text
9280 #: build/C/man3/printf.3:983
9281 #, no-wrap
9282 msgid ""
9283 "#include E<lt>math.hE<gt>\n"
9284 "#include E<lt>stdio.hE<gt>\n"
9285 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9286 msgstr ""
9287 "#include E<lt>math.hE<gt>\n"
9288 "#include E<lt>stdio.hE<gt>\n"
9289 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9290
9291 #. type: Plain text
9292 #: build/C/man3/printf.3:992
9293 msgid ""
9294 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
9295 "I<weekday> and I<month> are pointers to strings:"
9296 msgstr ""
9297 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
9298 "I<month> は文字列へのポインタである)"
9299
9300 #. type: Plain text
9301 #: build/C/man3/printf.3:998
9302 #, no-wrap
9303 msgid ""
9304 "#include E<lt>stdio.hE<gt>\n"
9305 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9306 "        weekday, month, day, hour, min);\n"
9307 msgstr ""
9308 "#include E<lt>stdio.hE<gt>\n"
9309 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9310 "\tweekday, month, day, hour, min);\n"
9311
9312 #. type: Plain text
9313 #: build/C/man3/printf.3:1004
9314 msgid ""
9315 "Many countries use the day-month-year order.  Hence, an internationalized "
9316 "version must be able to print the arguments in an order specified by the "
9317 "format:"
9318 msgstr ""
9319 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
9320 "順番で 引き数を表示できなければならない。"
9321
9322 #. type: Plain text
9323 #: build/C/man3/printf.3:1010
9324 #, no-wrap
9325 msgid ""
9326 "#include E<lt>stdio.hE<gt>\n"
9327 "fprintf(stdout, format,\n"
9328 "        weekday, month, day, hour, min);\n"
9329 msgstr ""
9330 "#include E<lt>stdio.hE<gt>\n"
9331 "fprintf(stdout, format,\n"
9332 "\tweekday, month, day, hour, min);\n"
9333
9334 #. type: Plain text
9335 #: build/C/man3/printf.3:1017
9336 msgid ""
9337 "where I<format> depends on locale, and may permute the arguments.  With the "
9338 "value:"
9339 msgstr ""
9340 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
9341 "I<format> が"
9342
9343 #. type: Plain text
9344 #: build/C/man3/printf.3:1021
9345 #, no-wrap
9346 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9347 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9348
9349 #. type: Plain text
9350 #: build/C/man3/printf.3:1025
9351 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
9352 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
9353
9354 #. type: Plain text
9355 #: build/C/man3/printf.3:1028
9356 msgid ""
9357 "To allocate a sufficiently large string and print into it (code correct for "
9358 "both glibc 2.0 and glibc 2.1):"
9359 msgstr ""
9360 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
9361 "と glibc 2.1 の両方で正しく動作するコード):"
9362
9363 #. type: Plain text
9364 #: build/C/man3/printf.3:1031
9365 msgid ""
9366 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
9367 "error instead of being handled gracefully."
9368 msgstr ""
9369 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
9370 "理されず、エラーとして扱われる。"
9371
9372 #. type: Plain text
9373 #: build/C/man3/printf.3:1036
9374 #, no-wrap
9375 msgid ""
9376 "#include E<lt>stdio.hE<gt>\n"
9377 "#include E<lt>stdlib.hE<gt>\n"
9378 "#include E<lt>stdarg.hE<gt>\n"
9379 msgstr ""
9380 "#include E<lt>stdio.hE<gt>\n"
9381 "#include E<lt>stdlib.hE<gt>\n"
9382 "#include E<lt>stdarg.hE<gt>\n"
9383
9384 #. type: Plain text
9385 #: build/C/man3/printf.3:1044
9386 #, no-wrap
9387 msgid ""
9388 "char *\n"
9389 "make_message(const char *fmt, ...)\n"
9390 "{\n"
9391 "    int n;\n"
9392 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9393 "    char *p, *np;\n"
9394 "    va_list ap;\n"
9395 msgstr ""
9396 "char *\n"
9397 "make_message(const char *fmt, ...)\n"
9398 "{\n"
9399 "    int n;\n"
9400 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9401 "    char *p, *np;\n"
9402 "    va_list ap;\n"
9403
9404 #. type: Plain text
9405 #: build/C/man3/printf.3:1047
9406 #, no-wrap
9407 msgid ""
9408 "    if ((p = malloc(size)) == NULL)\n"
9409 "        return NULL;\n"
9410 msgstr ""
9411 "    if ((p = malloc(size)) == NULL)\n"
9412 "        return NULL;\n"
9413
9414 #. type: Plain text
9415 #: build/C/man3/printf.3:1049
9416 #, no-wrap
9417 msgid "    while (1) {\n"
9418 msgstr "    while (1) {\n"
9419
9420 #. type: Plain text
9421 #: build/C/man3/printf.3:1051
9422 #, no-wrap
9423 msgid "        /* Try to print in the allocated space */\n"
9424 msgstr "        /* Try to print in the allocated space */\n"
9425
9426 #. type: Plain text
9427 #: build/C/man3/printf.3:1055
9428 #, no-wrap
9429 msgid ""
9430 "        va_start(ap, fmt);\n"
9431 "        n = vsnprintf(p, size, fmt, ap);\n"
9432 "        va_end(ap);\n"
9433 msgstr ""
9434 "        va_start(ap, fmt);\n"
9435 "        n = vsnprintf(p, size, fmt, ap);\n"
9436 "        va_end(ap);\n"
9437
9438 #. type: Plain text
9439 #: build/C/man3/printf.3:1057
9440 #, no-wrap
9441 msgid "        /* Check error code */\n"
9442 msgstr "        /* Check error code */\n"
9443
9444 #. type: Plain text
9445 #: build/C/man3/printf.3:1060
9446 #, no-wrap
9447 msgid ""
9448 "        if (n E<lt> 0)\n"
9449 "            return NULL;\n"
9450 msgstr ""
9451 "        if (n E<lt> 0)\n"
9452 "            return NULL;\n"
9453
9454 #. type: Plain text
9455 #: build/C/man3/printf.3:1062
9456 #, no-wrap
9457 msgid "        /* If that worked, return the string */\n"
9458 msgstr "        /* If that worked, return the string */\n"
9459
9460 #. type: Plain text
9461 #: build/C/man3/printf.3:1065
9462 #, no-wrap
9463 msgid ""
9464 "        if (n E<lt> size)\n"
9465 "            return p;\n"
9466 msgstr ""
9467 "        if (n E<lt> size)\n"
9468 "            return p;\n"
9469
9470 #. type: Plain text
9471 #: build/C/man3/printf.3:1067
9472 #, no-wrap
9473 msgid "        /* Else try again with more space */\n"
9474 msgstr "        /* Else try again with more space */\n"
9475
9476 #. type: Plain text
9477 #: build/C/man3/printf.3:1069
9478 #, no-wrap
9479 msgid "        size = n + 1;       /* Precisely what is needed */\n"
9480 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
9481
9482 #. type: Plain text
9483 #: build/C/man3/printf.3:1079
9484 #, no-wrap
9485 msgid ""
9486 "        if ((np = realloc (p, size)) == NULL) {\n"
9487 "            free(p);\n"
9488 "            return NULL;\n"
9489 "        } else {\n"
9490 "            p = np;\n"
9491 "        }\n"
9492 "    }\n"
9493 "}\n"
9494 msgstr ""
9495 "        if ((np = realloc (p, size)) == NULL) {\n"
9496 "            free(p);\n"
9497 "            return NULL;\n"
9498 "        } else {\n"
9499 "            p = np;\n"
9500 "        }\n"
9501 "    }\n"
9502 "}\n"
9503
9504 #. type: Plain text
9505 #: build/C/man3/printf.3:1089
9506 msgid ""
9507 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9508 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9509 msgstr ""
9510 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9511 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9512
9513 #. type: TH
9514 #: build/C/man3/puts.3:26
9515 #, no-wrap
9516 msgid "PUTS"
9517 msgstr "PUTS"
9518
9519 #. type: TH
9520 #: build/C/man3/puts.3:26
9521 #, no-wrap
9522 msgid "2011-09-28"
9523 msgstr "2011-09-28"
9524
9525 #. type: Plain text
9526 #: build/C/man3/puts.3:29
9527 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9528 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9529
9530 #. type: Plain text
9531 #: build/C/man3/puts.3:34
9532 #, no-wrap
9533 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9534 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9535
9536 #. type: Plain text
9537 #: build/C/man3/puts.3:36
9538 #, no-wrap
9539 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9540 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9541
9542 #. type: Plain text
9543 #: build/C/man3/puts.3:38
9544 #, no-wrap
9545 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9546 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9547
9548 #. type: Plain text
9549 #: build/C/man3/puts.3:40
9550 #, no-wrap
9551 msgid "B<int putchar(int >I<c>B<);>\n"
9552 msgstr "B<int putchar(int >I<c>B<);>\n"
9553
9554 #. type: Plain text
9555 #: build/C/man3/puts.3:42
9556 #, no-wrap
9557 msgid "B<int puts(const char *>I<s>B<);>\n"
9558 msgstr "B<int puts(const char *>I<s>B<);>\n"
9559
9560 #. type: Plain text
9561 #: build/C/man3/puts.3:51
9562 msgid ""
9563 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9564 "I<stream>."
9565 msgstr ""
9566 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9567 "に書き込む。"
9568
9569 #. type: Plain text
9570 #: build/C/man3/puts.3:58
9571 msgid ""
9572 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9573 "null byte (\\(aq\\e0\\(aq)."
9574 msgstr ""
9575 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9576 "ト (\\(aq\\e0\\(aq) は出力しない。"
9577
9578 #. type: Plain text
9579 #: build/C/man3/puts.3:65
9580 msgid ""
9581 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9582 "a macro which evaluates I<stream> more than once."
9583 msgstr ""
9584 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9585 "れないという点を除き、 B<fputc>()  と同じである。"
9586
9587 #. type: Plain text
9588 #: build/C/man3/puts.3:69
9589 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9590 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9591
9592 #. type: Plain text
9593 #: build/C/man3/puts.3:76
9594 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9595 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9596
9597 #. type: Plain text
9598 #: build/C/man3/puts.3:81
9599 msgid ""
9600 "Calls to the functions described here can be mixed with each other and with "
9601 "calls to other output functions from the I<stdio> library for the same "
9602 "output stream."
9603 msgstr ""
9604 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9605 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9606 "る。"
9607
9608 #. type: Plain text
9609 #: build/C/man3/puts.3:96
9610 msgid ""
9611 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9612 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9613 msgstr ""
9614 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9615 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9616
9617 #. type: Plain text
9618 #: build/C/man3/puts.3:103
9619 msgid ""
9620 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9621 "on error."
9622 msgstr ""
9623 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9624 "は B<EOF> を返す。"
9625
9626 #. type: Plain text
9627 #: build/C/man3/puts.3:112
9628 msgid ""
9629 "It is not advisable to mix calls to output functions from the I<stdio> "
9630 "library with low-level calls to B<write>(2)  for the file descriptor "
9631 "associated with the same output stream; the results will be undefined and "
9632 "very probably not what you want."
9633 msgstr ""
9634 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9635 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9636 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9637 "性が高い。"
9638
9639 #. type: Plain text
9640 #: build/C/man3/puts.3:124
9641 msgid ""
9642 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9643 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9644 "(3)"
9645 msgstr ""
9646 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9647 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9648 "(3)"
9649
9650 #. type: TH
9651 #: build/C/man2/read.2:35
9652 #, no-wrap
9653 msgid "READ"
9654 msgstr "READ"
9655
9656 #. type: TH
9657 #: build/C/man2/read.2:35
9658 #, no-wrap
9659 msgid "2013-02-12"
9660 msgstr "2013-02-12"
9661
9662 #. type: Plain text
9663 #: build/C/man2/read.2:38
9664 msgid "read - read from a file descriptor"
9665 msgstr "read - ファイルディスクリプタから読み込む"
9666
9667 #. type: Plain text
9668 #: build/C/man2/read.2:43
9669 #, no-wrap
9670 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9671 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9672
9673 #. type: Plain text
9674 #: build/C/man2/read.2:52
9675 msgid ""
9676 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9677 "into the buffer starting at I<buf>."
9678 msgstr ""
9679 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9680 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9681
9682 #. type: Plain text
9683 #: build/C/man2/read.2:60
9684 msgid ""
9685 "On files that support seeking, the read operation commences at the current "
9686 "file offset, and the file offset is incremented by the number of bytes "
9687 "read.  If the current file offset is at or past the end of file, no bytes "
9688 "are read, and B<read>()  returns zero."
9689 msgstr ""
9690 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
9691 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
9692 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
9693 "0 を返す。"
9694
9695 #. type: Plain text
9696 #: build/C/man2/read.2:75
9697 msgid ""
9698 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
9699 "In the absence of any errors, or if B<read>()  does not check for errors, a "
9700 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
9701 msgstr ""
9702 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
9703 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
9704 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
9705
9706 #. type: Plain text
9707 #: build/C/man2/read.2:81
9708 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9709 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
9710
9711 #. type: Plain text
9712 #: build/C/man2/read.2:95
9713 msgid ""
9714 "On success, the number of bytes read is returned (zero indicates end of "
9715 "file), and the file position is advanced by this number.  It is not an error "
9716 "if this number is smaller than the number of bytes requested; this may "
9717 "happen for example because fewer bytes are actually available right now "
9718 "(maybe because we were close to end-of-file, or because we are reading from "
9719 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9720 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9721 "this case it is left unspecified whether the file position (if any) changes."
9722 msgstr ""
9723 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9724 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9725 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9726 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9727 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9728 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9729 "の場合はファイル位置が変更されるかどうかは 不定である。"
9730
9731 #. type: TP
9732 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
9733 #, no-wrap
9734 msgid "B<EAGAIN>"
9735 msgstr "B<EAGAIN>"
9736
9737 #. type: Plain text
9738 #: build/C/man2/read.2:103
9739 msgid ""
9740 "The file descriptor I<fd> refers to a file other than a socket and has been "
9741 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9742 msgstr ""
9743 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9744 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9745 "する状況にある。"
9746
9747 #. type: TP
9748 #: build/C/man2/read.2:103 build/C/man2/write.2:115
9749 #, no-wrap
9750 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9751 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9752
9753 #.  Actually EAGAIN on Linux
9754 #. type: Plain text
9755 #: build/C/man2/read.2:114
9756 msgid ""
9757 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9758 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9759 "to be returned for this case, and does not require these constants to have "
9760 "the same value, so a portable application should check for both "
9761 "possibilities."
9762 msgstr ""
9763 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9764 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9765 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9766 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9767 "プリケーションでは、両方の可能性を 確認すべきである。"
9768
9769 #. type: Plain text
9770 #: build/C/man2/read.2:118
9771 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9772 msgstr ""
9773 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9774 "(open) されていない。"
9775
9776 #. type: Plain text
9777 #: build/C/man2/read.2:122 build/C/man2/write.2:145
9778 msgid "I<buf> is outside your accessible address space."
9779 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9780
9781 #. type: Plain text
9782 #: build/C/man2/read.2:126
9783 msgid ""
9784 "The call was interrupted by a signal before any data was read; see B<signal>"
9785 "(7)."
9786 msgstr ""
9787 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9788
9789 #. type: Plain text
9790 #: build/C/man2/read.2:137
9791 msgid ""
9792 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9793 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9794 "I<buf>, the value specified in I<count>, or the current file offset is not "
9795 "suitably aligned."
9796 msgstr ""
9797 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9798 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9799 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9800 "ンメントが不適切である。"
9801
9802 #. type: Plain text
9803 #: build/C/man2/read.2:147
9804 msgid ""
9805 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9806 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9807 "information."
9808 msgstr ""
9809 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9810 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9811 "こと。"
9812
9813 #. type: Plain text
9814 #: build/C/man2/read.2:158
9815 msgid ""
9816 "I/O error.  This will happen for example when the process is in a background "
9817 "process group, tries to read from its controlling terminal, and either it is "
9818 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9819 "also occur when there is a low-level I/O error while reading from a disk or "
9820 "tape."
9821 msgstr ""
9822 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
9823 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9824 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9825 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9826 "た場合にも起こる。"
9827
9828 #. type: Plain text
9829 #: build/C/man2/read.2:162
9830 msgid "I<fd> refers to a directory."
9831 msgstr "I<fd> がディレクトリを参照している。"
9832
9833 #. type: Plain text
9834 #: build/C/man2/read.2:173
9835 msgid ""
9836 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9837 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9838 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9839 "read."
9840 msgstr ""
9841 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9842 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9843 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9844 "数を返してもよい。"
9845
9846 #. type: Plain text
9847 #: build/C/man2/read.2:187
9848 msgid ""
9849 "On NFS file systems, reading small amounts of data will update the timestamp "
9850 "only the first time, subsequent calls may not do so.  This is caused by "
9851 "client side attribute caching, because most if not all NFS clients leave "
9852 "st_atime (last file access time)  updates to the server and client side "
9853 "reads satisfied from the client's cache will not cause st_atime updates on "
9854 "the server as there are no server side reads.  UNIX semantics can be "
9855 "obtained by disabling client side attribute caching, but in most situations "
9856 "this will substantially increase server load and decrease performance."
9857 msgstr ""
9858 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9859 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9860 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9861 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9862 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9863 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9864 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9865 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9866
9867 #. type: Plain text
9868 #: build/C/man2/read.2:200
9869 msgid ""
9870 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9871 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9872 "B<fread>(3)"
9873 msgstr ""
9874 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9875 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9876 "B<fread>(3)"
9877
9878 #. type: TH
9879 #: build/C/man2/readlink.2:43
9880 #, no-wrap
9881 msgid "READLINK"
9882 msgstr "READLINK"
9883
9884 #. type: TH
9885 #: build/C/man2/readlink.2:43
9886 #, fuzzy, no-wrap
9887 #| msgid "2013-02-18"
9888 msgid "2013-07-18"
9889 msgstr "2013-02-18"
9890
9891 #. type: Plain text
9892 #: build/C/man2/readlink.2:46
9893 msgid "readlink - read value of a symbolic link"
9894 msgstr "readlink - シンボリックリンクの値を読む"
9895
9896 #. type: Plain text
9897 #: build/C/man2/readlink.2:50
9898 msgid ""
9899 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9900 ">I<bufsiz>B<);>"
9901 msgstr ""
9902 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9903 ">I<bufsiz>B<);>"
9904
9905 #. type: Plain text
9906 #: build/C/man2/readlink.2:58
9907 msgid "B<readlink>():"
9908 msgstr "B<readlink>():"
9909
9910 #. type: Plain text
9911 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
9912 msgid ""
9913 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9914 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9915 msgstr ""
9916 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9917 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9918
9919 #. type: Plain text
9920 #: build/C/man2/readlink.2:77
9921 msgid ""
9922 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9923 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9924 "null byte to I<buf>.  It will truncate the contents (to a length of "
9925 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9926 "contents."
9927 msgstr ""
9928 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9929 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9930 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9931 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9932
9933 #. type: Plain text
9934 #: build/C/man2/readlink.2:85
9935 msgid ""
9936 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9937 "error, -1 is returned and I<errno> is set to indicate the error."
9938 msgstr ""
9939 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9940 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9941
9942 #. type: Plain text
9943 #: build/C/man2/readlink.2:91
9944 msgid ""
9945 "Search permission is denied for a component of the path prefix.  (See also "
9946 "B<path_resolution>(7).)"
9947 msgstr ""
9948 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9949 "参照すること)。"
9950
9951 #. type: Plain text
9952 #: build/C/man2/readlink.2:95
9953 msgid "I<buf> extends outside the process's allocated address space."
9954 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9955
9956 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9957 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9958 #.  and this error can also occur if bufsiz < 0.
9959 #.  See: http://thread.gmane.org/gmane.linux.man/380
9960 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9961 #. type: Plain text
9962 #: build/C/man2/readlink.2:104
9963 msgid "I<bufsiz> is not positive."
9964 msgstr "I<bufsiz> が正でない。"
9965
9966 #. type: Plain text
9967 #: build/C/man2/readlink.2:107
9968 msgid "The named file is not a symbolic link."
9969 msgstr "指定したファイルがシンボリックリンクでない。"
9970
9971 #. type: Plain text
9972 #: build/C/man2/readlink.2:110
9973 msgid "An I/O error occurred while reading from the file system."
9974 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9975
9976 #. type: Plain text
9977 #: build/C/man2/readlink.2:113
9978 msgid "Too many symbolic links were encountered in translating the pathname."
9979 msgstr "パス名にシンボリックリンクが多すぎる。"
9980
9981 #. type: Plain text
9982 #: build/C/man2/readlink.2:116
9983 msgid "A pathname, or a component of a pathname, was too long."
9984 msgstr "パス名かパス名の一部分が長過ぎる。"
9985
9986 #. type: Plain text
9987 #: build/C/man2/readlink.2:119
9988 msgid "The named file does not exist."
9989 msgstr "その名前のファイルが存在しない。"
9990
9991 #. type: Plain text
9992 #: build/C/man2/readlink.2:125
9993 msgid "A component of the path prefix is not a directory."
9994 msgstr "パスのディレクトリ部分がディレクトリでない。"
9995
9996 #. type: Plain text
9997 #: build/C/man2/readlink.2:130
9998 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9999 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
10000
10001 #. type: Plain text
10002 #: build/C/man2/readlink.2:138
10003 msgid ""
10004 "In versions of glibc up to and including glibc 2.4, the return type of "
10005 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
10006 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
10007 msgstr ""
10008 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
10009 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
10010 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
10011
10012 #. type: Plain text
10013 #: build/C/man2/readlink.2:157
10014 msgid ""
10015 "Using a statically sized buffer might not provide enough room for the "
10016 "symbolic link contents.  The required size for the buffer can be obtained "
10017 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
10018 "link.  However, the number of bytes written by B<readlink>()  should be "
10019 "checked to make sure that the size of the symbolic link did not increase "
10020 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
10021 "also addresses a common portability problem when using I<PATH_MAX> for the "
10022 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
10023 "the system does not have such limit."
10024 msgstr ""
10025 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
10026 "格納するのに十分な領域がない場合がある。\n"
10027 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
10028 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
10029 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
10030 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
10031 "の間で増えていないことを確認すべきである。\n"
10032 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
10033 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
10034 "問題を解決することができる。なぜなら、POSIX では、\n"
10035 "システムがそのような上限値を定義していない場合には、\n"
10036 "I<PATH_MAX> が定義されることが保証されていないからである。"
10037
10038 #. type: Plain text
10039 #: build/C/man2/readlink.2:163
10040 msgid ""
10041 "The following program allocates the buffer needed by B<readlink>()  "
10042 "dynamically from the information provided by B<lstat>(), making sure there's "
10043 "no race condition between the calls."
10044 msgstr ""
10045 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
10046 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
10047 "また、両方の呼び出し間で競合条件がないことを保証している。"
10048
10049 #. type: Plain text
10050 #: build/C/man2/readlink.2:170
10051 #, no-wrap
10052 msgid ""
10053 "#include E<lt>sys/types.hE<gt>\n"
10054 "#include E<lt>sys/stat.hE<gt>\n"
10055 "#include E<lt>stdio.hE<gt>\n"
10056 "#include E<lt>stdlib.hE<gt>\n"
10057 "#include E<lt>unistd.hE<gt>\n"
10058 msgstr ""
10059 "#include E<lt>sys/types.hE<gt>\n"
10060 "#include E<lt>sys/stat.hE<gt>\n"
10061 "#include E<lt>stdio.hE<gt>\n"
10062 "#include E<lt>stdlib.hE<gt>\n"
10063 "#include E<lt>unistd.hE<gt>\n"
10064
10065 #. type: Plain text
10066 #: build/C/man2/readlink.2:177
10067 #, no-wrap
10068 msgid ""
10069 "int\n"
10070 "main(int argc, char *argv[])\n"
10071 "{\n"
10072 "    struct stat sb;\n"
10073 "    char *linkname;\n"
10074 "    ssize_t r;\n"
10075 msgstr ""
10076 "int\n"
10077 "main(int argc, char *argv[])\n"
10078 "{\n"
10079 "    struct stat sb;\n"
10080 "    char *linkname;\n"
10081 "    ssize_t r;\n"
10082
10083 #. type: Plain text
10084 #: build/C/man2/readlink.2:182
10085 #, no-wrap
10086 msgid ""
10087 "    if (argc != 2) {\n"
10088 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10089 "        exit(EXIT_FAILURE);\n"
10090 "    }\n"
10091 msgstr ""
10092 "    if (argc != 2) {\n"
10093 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10094 "        exit(EXIT_FAILURE);\n"
10095 "    }\n"
10096
10097 #. type: Plain text
10098 #: build/C/man2/readlink.2:187
10099 #, no-wrap
10100 msgid ""
10101 "    if (lstat(argv[1], &sb) == -1) {\n"
10102 "        perror(\"lstat\");\n"
10103 "        exit(EXIT_FAILURE);\n"
10104 "    }\n"
10105 msgstr ""
10106 "    if (lstat(argv[1], &sb) == -1) {\n"
10107 "        perror(\"lstat\");\n"
10108 "        exit(EXIT_FAILURE);\n"
10109 "    }\n"
10110
10111 #. type: Plain text
10112 #: build/C/man2/readlink.2:193
10113 #, no-wrap
10114 msgid ""
10115 "    linkname = malloc(sb.st_size + 1);\n"
10116 "    if (linkname == NULL) {\n"
10117 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10118 "        exit(EXIT_FAILURE);\n"
10119 "    }\n"
10120 msgstr ""
10121 "    linkname = malloc(sb.st_size + 1);\n"
10122 "    if (linkname == NULL) {\n"
10123 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10124 "        exit(EXIT_FAILURE);\n"
10125 "    }\n"
10126
10127 #. type: Plain text
10128 #: build/C/man2/readlink.2:195
10129 #, no-wrap
10130 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10131 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10132
10133 #. type: Plain text
10134 #: build/C/man2/readlink.2:200
10135 #, fuzzy, no-wrap
10136 #| msgid ""
10137 #| "    if (r E<lt> 0) {\n"
10138 #| "        perror(\"lstat\");\n"
10139 #| "        exit(EXIT_FAILURE);\n"
10140 #| "    }\n"
10141 msgid ""
10142 "    if (r == -1) {\n"
10143 "        perror(\"lstat\");\n"
10144 "        exit(EXIT_FAILURE);\n"
10145 "    }\n"
10146 msgstr ""
10147 "    if (r E<lt> 0) {\n"
10148 "        perror(\"lstat\");\n"
10149 "        exit(EXIT_FAILURE);\n"
10150 "    }\n"
10151
10152 #. type: Plain text
10153 #: build/C/man2/readlink.2:206
10154 #, no-wrap
10155 msgid ""
10156 "    if (r E<gt> sb.st_size) {\n"
10157 "        fprintf(stderr, \"symlink increased in size \"\n"
10158 "                        \"between lstat() and readlink()\\en\");\n"
10159 "        exit(EXIT_FAILURE);\n"
10160 "    }\n"
10161 msgstr ""
10162 "    if (r E<gt> sb.st_size) {\n"
10163 "        fprintf(stderr, \"symlink increased in size \"\n"
10164 "                        \"between lstat() and readlink()\\en\");\n"
10165 "        exit(EXIT_FAILURE);\n"
10166 "    }\n"
10167
10168 #. type: Plain text
10169 #: build/C/man2/readlink.2:208
10170 #, fuzzy, no-wrap
10171 #| msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10172 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
10173 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10174
10175 #. type: Plain text
10176 #: build/C/man2/readlink.2:210
10177 #, no-wrap
10178 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10179 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10180
10181 #. type: Plain text
10182 #: build/C/man2/readlink.2:222
10183 msgid ""
10184 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
10185 "B<path_resolution>(7), B<symlink>(7)"
10186 msgstr ""
10187 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
10188 "B<path_resolution>(7), B<symlink>(7)"
10189
10190 #. type: TH
10191 #: build/C/man2/readv.2:32
10192 #, no-wrap
10193 msgid "READV"
10194 msgstr "READV"
10195
10196 #. type: TH
10197 #: build/C/man2/readv.2:32
10198 #, no-wrap
10199 msgid "2010-11-17"
10200 msgstr "2010-11-17"
10201
10202 #. type: Plain text
10203 #: build/C/man2/readv.2:35
10204 msgid ""
10205 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
10206 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
10207
10208 #. type: Plain text
10209 #: build/C/man2/readv.2:38
10210 #, no-wrap
10211 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
10212 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
10213
10214 #. type: Plain text
10215 #: build/C/man2/readv.2:40
10216 #, no-wrap
10217 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10218 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10219
10220 #. type: Plain text
10221 #: build/C/man2/readv.2:42
10222 #, no-wrap
10223 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10224 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10225
10226 #. type: Plain text
10227 #: build/C/man2/readv.2:45
10228 #, no-wrap
10229 msgid ""
10230 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10231 "B<               off_t >I<offset>B<);>\n"
10232 msgstr ""
10233 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10234 "B<               off_t >I<offset>B<);>\n"
10235
10236 #. type: Plain text
10237 #: build/C/man2/readv.2:48
10238 #, no-wrap
10239 msgid ""
10240 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10241 "B<                off_t >I<offset>B<);>\n"
10242 msgstr ""
10243 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10244 "B<                off_t >I<offset>B<);>\n"
10245
10246 #. type: Plain text
10247 #: build/C/man2/readv.2:58
10248 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10249 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10250
10251 #. type: Plain text
10252 #: build/C/man2/readv.2:68
10253 msgid ""
10254 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
10255 "with the file descriptor I<fd> into the buffers described by I<iov> "
10256 "(\"scatter input\")."
10257 msgstr ""
10258 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
10259 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
10260 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
10261
10262 #. type: Plain text
10263 #: build/C/man2/readv.2:78
10264 msgid ""
10265 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
10266 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
10267 "\")."
10268 msgstr ""
10269 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
10270 "I<iovcnt>\n"
10271 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
10272 "ら\n"
10273 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
10274
10275 #. type: Plain text
10276 #: build/C/man2/readv.2:87
10277 msgid ""
10278 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
10279 "I<E<lt>sys/uio.hE<gt>> as:"
10280 msgstr ""
10281 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
10282 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10283
10284 #. type: Plain text
10285 #: build/C/man2/readv.2:95
10286 #, no-wrap
10287 msgid ""
10288 "struct iovec {\n"
10289 "    void  *iov_base;    /* Starting address */\n"
10290 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10291 "};\n"
10292 msgstr ""
10293 "struct iovec {\n"
10294 "    void  *iov_base;    /* Starting address */\n"
10295 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10296 "};\n"
10297
10298 #. type: Plain text
10299 #: build/C/man2/readv.2:103
10300 msgid ""
10301 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
10302 "buffers are filled."
10303 msgstr ""
10304 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
10305 "B<read>(2) と全く同様の動作を行う。"
10306
10307 #. type: Plain text
10308 #: build/C/man2/readv.2:109
10309 msgid ""
10310 "The B<writev>()  system call works just like B<write>(2)  except that "
10311 "multiple buffers are written out."
10312 msgstr ""
10313 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
10314 "B<write>(2) と全く同様の動作を行う。"
10315
10316 #. type: Plain text
10317 #: build/C/man2/readv.2:128
10318 msgid ""
10319 "Buffers are processed in array order.  This means that B<readv>()  "
10320 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
10321 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
10322 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
10323 "[0] before proceeding to I<iov>[1], and so on."
10324 msgstr ""
10325 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
10326 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
10327 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
10328 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
10329
10330 #. type: Plain text
10331 #: build/C/man2/readv.2:146
10332 msgid ""
10333 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
10334 "data written by B<writev>()  is written as a single block that is not "
10335 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
10336 "for an exception); analogously, B<readv>()  is guaranteed to read a "
10337 "contiguous block of data from the file, regardless of read operations "
10338 "performed in other threads or processes that have file descriptors referring "
10339 "to the same open file description (see B<open>(2))."
10340 msgstr ""
10341 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
10342 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
10343 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
10344 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
10345 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
10346 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
10347 "作の影響を受けることはない。"
10348
10349 #. type: SS
10350 #: build/C/man2/readv.2:146
10351 #, no-wrap
10352 msgid "preadv() and pwritev()"
10353 msgstr "preadv() と pwritev()"
10354
10355 #. type: Plain text
10356 #: build/C/man2/readv.2:159
10357 msgid ""
10358 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
10359 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
10360 "argument, I<offset>, which specifies the file offset at which the input "
10361 "operation is to be performed."
10362 msgstr ""
10363 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
10364 "組み合わせたものである。\n"
10365 "B<readv>() と同じ処理を実行するが、\n"
10366 "4 番目の引き数 I<offset> が追加されており、\n"
10367 "この引き数は入力操作を行うファイルオフセットを指定する。"
10368
10369 #. type: Plain text
10370 #: build/C/man2/readv.2:172
10371 msgid ""
10372 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
10373 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
10374 "argument, I<offset>, which specifies the file offset at which the output "
10375 "operation is to be performed."
10376 msgstr ""
10377 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
10378 "組み合わせたものである。\n"
10379 "B<writev>() と同じ処理を実行するが、\n"
10380 "4 番目の引き数 I<offset> が追加されており、\n"
10381 "この引き数は出力操作を行うファイルオフセットを指定する。"
10382
10383 #. type: Plain text
10384 #: build/C/man2/readv.2:177
10385 msgid ""
10386 "The file offset is not changed by these system calls.  The file referred to "
10387 "by I<fd> must be capable of seeking."
10388 msgstr ""
10389 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
10390 "I<fd> が参照するファイルは seek 可能でなければならない。"
10391
10392 #. type: Plain text
10393 #: build/C/man2/readv.2:188
10394 msgid ""
10395 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
10396 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
10397 "error, -1 is returned, and I<errno> is set appropriately."
10398 msgstr ""
10399 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
10400 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
10401 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
10402
10403 #. type: Plain text
10404 #: build/C/man2/readv.2:200
10405 msgid ""
10406 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
10407 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
10408 "(2).  Additionally, the following error is defined:"
10409 msgstr ""
10410 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
10411 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
10412 "る。\n"
10413 "また、追加で以下のエラーが定義されている:"
10414
10415 #. type: Plain text
10416 #: build/C/man2/readv.2:209
10417 msgid ""
10418 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
10419 "vector count I<iovcnt> is less than zero or greater than the permitted "
10420 "maximum."
10421 msgstr ""
10422 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
10423 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
10424
10425 #. type: Plain text
10426 #: build/C/man2/readv.2:214
10427 msgid ""
10428 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10429 "support was added in glibc 2.10."
10430 msgstr ""
10431 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10432 "ライブラリによるサポートは glibc 2.10 で追加された。"
10433
10434 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10435 #.  (Says release.libc.)
10436 #. type: Plain text
10437 #: build/C/man2/readv.2:222
10438 msgid ""
10439 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10440 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10441 "I<iovcnt> argument, and I<int> as the return type."
10442 msgstr ""
10443 "B<readv>(), B<writev>(): \n"
10444 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10445 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10446 "返り値の型として I<int> を使用していた。"
10447
10448 #. type: Plain text
10449 #: build/C/man2/readv.2:226
10450 msgid ""
10451 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10452 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10453
10454 #. type: SS
10455 #: build/C/man2/readv.2:227
10456 #, no-wrap
10457 msgid "Linux notes"
10458 msgstr "Linux での注意"
10459
10460 #. type: Plain text
10461 #: build/C/man2/readv.2:258
10462 msgid ""
10463 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10464 "items that can be passed in I<iov>.  An implementation can advertise its "
10465 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10466 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10467 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10468 "glibc wrapper functions do some extra work if they detect that the "
10469 "underlying kernel system call failed because this limit was exceeded.  In "
10470 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10471 "large enough for all of the items specified by I<iov>, passes that buffer in "
10472 "a call to B<read>(2), copies data from the buffer to the locations specified "
10473 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10474 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10475 "using a temporary buffer and a call to B<write>(2)."
10476 msgstr ""
10477 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10478 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10479 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10480 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10481 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10482 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10483 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10484 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10485 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10486 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10487 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10488 "(2)  を呼び出す。"
10489
10490 #. type: Plain text
10491 #: build/C/man2/readv.2:265
10492 msgid ""
10493 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10494 "operate on file descriptors, with the functions from the stdio library; the "
10495 "results will be undefined and probably not what you want."
10496 msgstr ""
10497 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10498 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10499 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10500 "得られないだろう。"
10501
10502 #. type: Plain text
10503 #: build/C/man2/readv.2:268
10504 msgid "The following code sample demonstrates the use of B<writev>():"
10505 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10506
10507 #. type: Plain text
10508 #: build/C/man2/readv.2:275
10509 #, no-wrap
10510 msgid ""
10511 "char *str0 = \"hello \";\n"
10512 "char *str1 = \"world\\en\";\n"
10513 "struct iovec iov[2];\n"
10514 "ssize_t nwritten;\n"
10515 msgstr ""
10516 "char *str0 = \"hello \";\n"
10517 "char *str1 = \"world\\en\";\n"
10518 "struct iovec iov[2];\n"
10519 "ssize_t nwritten;\n"
10520
10521 #. type: Plain text
10522 #: build/C/man2/readv.2:280
10523 #, no-wrap
10524 msgid ""
10525 "iov[0].iov_base = str0;\n"
10526 "iov[0].iov_len = strlen(str0);\n"
10527 "iov[1].iov_base = str1;\n"
10528 "iov[1].iov_len = strlen(str1);\n"
10529 msgstr ""
10530 "iov[0].iov_base = str0;\n"
10531 "iov[0].iov_len = strlen(str0);\n"
10532 "iov[1].iov_base = str1;\n"
10533 "iov[1].iov_len = strlen(str1);\n"
10534
10535 #. type: Plain text
10536 #: build/C/man2/readv.2:282
10537 #, no-wrap
10538 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10539 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10540
10541 #. type: Plain text
10542 #: build/C/man2/readv.2:288
10543 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10544 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10545
10546 #. type: TH
10547 #: build/C/man3/remove.3:31
10548 #, no-wrap
10549 msgid "REMOVE"
10550 msgstr "REMOVE"
10551
10552 #. type: TH
10553 #: build/C/man3/remove.3:31
10554 #, no-wrap
10555 msgid "2008-12-03"
10556 msgstr "2008-12-03"
10557
10558 #. type: Plain text
10559 #: build/C/man3/remove.3:34
10560 msgid "remove - remove a file or directory"
10561 msgstr "remove - ファイルやディレクトリを削除する"
10562
10563 #. type: Plain text
10564 #: build/C/man3/remove.3:38
10565 msgid "B<int remove(const char *>I<pathname>B<);>"
10566 msgstr "B<int remove(const char *>I<pathname>B<);>"
10567
10568 #. type: Plain text
10569 #: build/C/man3/remove.3:46
10570 msgid ""
10571 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10572 "for files, and B<rmdir>(2)  for directories."
10573 msgstr ""
10574 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10575 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10576
10577 #. type: Plain text
10578 #: build/C/man3/remove.3:50
10579 msgid ""
10580 "If the removed name was the last link to a file and no processes have the "
10581 "file open, the file is deleted and the space it was using is made available "
10582 "for reuse."
10583 msgstr ""
10584 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10585 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10586 "ことができるようになる。"
10587
10588 #. type: Plain text
10589 #: build/C/man3/remove.3:55
10590 msgid ""
10591 "If the name was the last link to a file, but any processes still have the "
10592 "file open, the file will remain in existence until the last file descriptor "
10593 "referring to it is closed."
10594 msgstr ""
10595 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10596 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10597 "でファイルは存在し続ける。"
10598
10599 #. type: Plain text
10600 #: build/C/man3/remove.3:57
10601 msgid "If the name referred to a symbolic link, the link is removed."
10602 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10603
10604 #. type: Plain text
10605 #: build/C/man3/remove.3:60
10606 msgid ""
10607 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10608 "processes which have the object open may continue to use it."
10609 msgstr ""
10610 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10611 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10612
10613 #. type: Plain text
10614 #: build/C/man3/remove.3:70
10615 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10616 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10617
10618 #. type: Plain text
10619 #: build/C/man3/remove.3:72
10620 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10621 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10622
10623 #. type: Plain text
10624 #: build/C/man3/remove.3:78
10625 msgid ""
10626 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10627 "hence would not remove directories)."
10628 msgstr ""
10629 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10630 "(従ってディレクトリを削除できなかった)。"
10631
10632 #. type: Plain text
10633 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10634 msgid ""
10635 "Infelicities in the protocol underlying NFS can cause the unexpected "
10636 "disappearance of files which are still being used."
10637 msgstr ""
10638 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10639 "うことがありえる。"
10640
10641 #. type: Plain text
10642 #: build/C/man3/remove.3:92
10643 msgid ""
10644 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10645 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10646 msgstr ""
10647 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10648 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10649
10650 #. type: TH
10651 #: build/C/man2/rename.2:32
10652 #, no-wrap
10653 msgid "RENAME"
10654 msgstr "RENAME"
10655
10656 #. type: Plain text
10657 #: build/C/man2/rename.2:35
10658 msgid "rename - change the name or location of a file"
10659 msgstr "rename - ファイルの名前や位置を変更する"
10660
10661 #. type: Plain text
10662 #: build/C/man2/rename.2:39
10663 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10664 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10665
10666 #. type: Plain text
10667 #: build/C/man2/rename.2:48
10668 msgid ""
10669 "B<rename>()  renames a file, moving it between directories if required.  Any "
10670 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10671 "Open file descriptors for I<oldpath> are also unaffected."
10672 msgstr ""
10673 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10674 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10675 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10676 "リプタにも影響はない。"
10677
10678 #. type: Plain text
10679 #: build/C/man2/rename.2:56
10680 msgid ""
10681 "If I<newpath> already exists it will be atomically replaced (subject to a "
10682 "few conditions; see ERRORS below), so that there is no point at which "
10683 "another process attempting to access I<newpath> will find it missing."
10684 msgstr ""
10685 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10686 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10687 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10688 "とはない (訳註: 常にアクセス可能である)。"
10689
10690 #. type: Plain text
10691 #: build/C/man2/rename.2:64
10692 msgid ""
10693 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10694 "file, then B<rename>()  does nothing, and returns a success status."
10695 msgstr ""
10696 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10697 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10698
10699 #. type: Plain text
10700 #: build/C/man2/rename.2:72
10701 msgid ""
10702 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10703 "guarantees to leave an instance of I<newpath> in place."
10704 msgstr ""
10705 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10706 "I<newpath> の実体を元のまま残すことを保証する。"
10707
10708 #. type: Plain text
10709 #: build/C/man2/rename.2:78
10710 msgid ""
10711 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10712 "not exist, or it must specify an empty directory."
10713 msgstr ""
10714 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10715 "存在しないか、空のディレクトリでなければならない。"
10716
10717 #. type: Plain text
10718 #: build/C/man2/rename.2:85
10719 msgid ""
10720 "However, when overwriting there will probably be a window in which both "
10721 "I<oldpath> and I<newpath> refer to the file being renamed."
10722 msgstr ""
10723 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10724 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10725
10726 #. type: Plain text
10727 #: build/C/man2/rename.2:91
10728 msgid ""
10729 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10730 "refers to a symbolic link the link will be overwritten."
10731 msgstr ""
10732 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10733 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10734 "は、リンクが上書きされる。"
10735
10736 #. type: Plain text
10737 #: build/C/man2/rename.2:116
10738 msgid ""
10739 "Write permission is denied for the directory containing I<oldpath> or "
10740 "I<newpath>, or, search permission is denied for one of the directories in "
10741 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10742 "and does not allow write permission (needed to update the I<..> entry).  "
10743 "(See also B<path_resolution>(7).)"
10744 msgstr ""
10745 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10746 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10747 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10748 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10749
10750 #. type: TP
10751 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10752 #, no-wrap
10753 msgid "B<EBUSY>"
10754 msgstr "B<EBUSY>"
10755
10756 #. type: Plain text
10757 #: build/C/man2/rename.2:133
10758 msgid ""
10759 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10760 "use by some process (perhaps as current working directory, or as root "
10761 "directory, or because it was open for reading) or is in use by the system "
10762 "(for example as mount point), while the system considers this an error.  "
10763 "(Note that there is no requirement to return B<EBUSY> in such cases"
10764 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10765 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10766 "situations.)"
10767 msgstr ""
10768 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10769 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10770 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10771 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10772 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10773 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10774 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10775 "B<EBUSY> を返すことが許されている。)"
10776
10777 #. type: Plain text
10778 #: build/C/man2/rename.2:143
10779 msgid ""
10780 "The new pathname contained a path prefix of the old, or, more generally, an "
10781 "attempt was made to make a directory a subdirectory of itself."
10782 msgstr ""
10783 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10784 "ディレクトリに 変更しようとした場合がほとんどである。"
10785
10786 #. type: Plain text
10787 #: build/C/man2/rename.2:149
10788 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10789 msgstr ""
10790 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10791 "い。"
10792
10793 #. type: Plain text
10794 #: build/C/man2/rename.2:160
10795 msgid ""
10796 "I<oldpath> already has the maximum number of links to it, or it was a "
10797 "directory and the directory containing I<newpath> has the maximum number of "
10798 "links."
10799 msgstr ""
10800 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10801 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10802
10803 #. type: Plain text
10804 #: build/C/man2/rename.2:176
10805 msgid ""
10806 "The link named by I<oldpath> does not exist; or, a directory component in "
10807 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10808 msgstr ""
10809 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10810 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10811
10812 #. type: Plain text
10813 #: build/C/man2/rename.2:193
10814 msgid ""
10815 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10816 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10817 "not a directory."
10818 msgstr ""
10819 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10820 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10821 "トリでない。"
10822
10823 #. type: TP
10824 #: build/C/man2/rename.2:193
10825 #, no-wrap
10826 msgid "B<ENOTEMPTY> or B<EEXIST>"
10827 msgstr "B<ENOTEMPTY  または  EEXIST>"
10828
10829 #. type: Plain text
10830 #: build/C/man2/rename.2:197
10831 msgid ""
10832 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10833 "\" and \"..\"."
10834 msgstr ""
10835 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10836 "でいる。"
10837
10838 #. type: TP
10839 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
10840 #, no-wrap
10841 msgid "B<EPERM> or B<EACCES>"
10842 msgstr "B<EPERM> または B<EACCES>"
10843
10844 #. type: Plain text
10845 #: build/C/man2/rename.2:221
10846 msgid ""
10847 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10848 "the process's effective user ID is neither the user ID of the file to be "
10849 "deleted nor that of the directory containing it, and the process is not "
10850 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10851 "I<newpath> is an existing file and the directory containing it has the "
10852 "sticky bit set and the process's effective user ID is neither the user ID of "
10853 "the file to be replaced nor that of the directory containing it, and the "
10854 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10855 "capability); or the file system containing I<pathname> does not support "
10856 "renaming of the type requested."
10857 msgstr ""
10858 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10859 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10860 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10861 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10862 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10863 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10864 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10865 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10866 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10867 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10868
10869 #. type: Plain text
10870 #: build/C/man2/rename.2:232
10871 msgid ""
10872 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10873 "permits a file system to be mounted at multiple points, but B<rename>()  "
10874 "does not work across different mount points, even if the same file system is "
10875 "mounted on both.)"
10876 msgstr ""
10877 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10878 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10879 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10880 "別々のマウント位置を跨いでは動作しない。)"
10881
10882 #. type: Plain text
10883 #: build/C/man2/rename.2:234
10884 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10885 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10886
10887 #. type: Plain text
10888 #: build/C/man2/rename.2:245
10889 msgid ""
10890 "On NFS file systems, you can not assume that if the operation failed the "
10891 "file was not renamed.  If the server does the rename operation and then "
10892 "crashes, the retransmitted RPC which will be processed when the server is up "
10893 "again causes a failure.  The application is expected to deal with this.  See "
10894 "B<link>(2)  for a similar problem."
10895 msgstr ""
10896 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10897 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10898 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10899 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10900 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10901
10902 #. type: Plain text
10903 #: build/C/man2/rename.2:254
10904 msgid ""
10905 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10906 "(2), B<path_resolution>(7), B<symlink>(7)"
10907 msgstr ""
10908 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10909 "(2), B<path_resolution>(7), B<symlink>(7)"
10910
10911 #. type: TH
10912 #: build/C/man2/rmdir.2:30
10913 #, no-wrap
10914 msgid "RMDIR"
10915 msgstr "RMDIR"
10916
10917 #. type: TH
10918 #: build/C/man2/rmdir.2:30
10919 #, no-wrap
10920 msgid "2008-05-08"
10921 msgstr "2008-05-08"
10922
10923 #. type: Plain text
10924 #: build/C/man2/rmdir.2:33
10925 msgid "rmdir - delete a directory"
10926 msgstr "rmdir - ディレクトリを削除する"
10927
10928 #. type: Plain text
10929 #: build/C/man2/rmdir.2:37
10930 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10931 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10932
10933 #. type: Plain text
10934 #: build/C/man2/rmdir.2:40
10935 msgid "B<rmdir>()  deletes a directory, which must be empty."
10936 msgstr ""
10937 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10938 "ない。"
10939
10940 #. type: Plain text
10941 #: build/C/man2/rmdir.2:55
10942 msgid ""
10943 "Write access to the directory containing I<pathname> was not allowed, or one "
10944 "of the directories in the path prefix of I<pathname> did not allow search "
10945 "permission.  (See also B<path_resolution>(7)."
10946 msgstr ""
10947 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10948 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10949 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10950 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10951 "と)"
10952
10953 #. type: Plain text
10954 #: build/C/man2/rmdir.2:64
10955 msgid ""
10956 "I<pathname> is currently in use by the system or some process that prevents "
10957 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10958 "point or is the root directory of the calling process."
10959 msgstr ""
10960 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10961 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10962 "たプロセスのルートディレクトリであることを意味する。"
10963
10964 #. type: Plain text
10965 #: build/C/man2/rmdir.2:73
10966 msgid "I<pathname> has I<.> as last component."
10967 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10968
10969 #. type: Plain text
10970 #: build/C/man2/rmdir.2:77
10971 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10972 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10973
10974 #. type: Plain text
10975 #: build/C/man2/rmdir.2:85
10976 msgid ""
10977 "A directory component in I<pathname> does not exist or is a dangling "
10978 "symbolic link."
10979 msgstr ""
10980 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10981 "リックリンク (symbolic link) である。"
10982
10983 #. type: Plain text
10984 #: build/C/man2/rmdir.2:94
10985 msgid ""
10986 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10987 "fact, a directory."
10988 msgstr ""
10989 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10990 "クトリでない。"
10991
10992 #. type: TP
10993 #: build/C/man2/rmdir.2:94
10994 #, no-wrap
10995 msgid "B<ENOTEMPTY>"
10996 msgstr "B<ENOTEMPTY>"
10997
10998 #. type: Plain text
10999 #: build/C/man2/rmdir.2:107
11000 msgid ""
11001 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
11002 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
11003 "condition."
11004 msgstr ""
11005 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
11006 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
11007 "で B<EEXIST> を返すことを認めている。"
11008
11009 #. type: Plain text
11010 #: build/C/man2/rmdir.2:118
11011 msgid ""
11012 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
11013 "and the process's effective user ID is neither the user ID of the file to be "
11014 "deleted nor that of the directory containing it, and the process is not "
11015 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
11016 msgstr ""
11017 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
11018 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
11019 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
11020 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
11021
11022 #. type: Plain text
11023 #: build/C/man2/rmdir.2:123
11024 msgid ""
11025 "The file system containing I<pathname> does not support the removal of "
11026 "directories."
11027 msgstr ""
11028 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
11029 "ない。"
11030
11031 #. type: Plain text
11032 #: build/C/man2/rmdir.2:127
11033 msgid "I<pathname> refers to a directory on a read-only file system."
11034 msgstr ""
11035 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
11036
11037 #. type: Plain text
11038 #: build/C/man2/rmdir.2:132
11039 msgid ""
11040 "Infelicities in the protocol underlying NFS can cause the unexpected "
11041 "disappearance of directories which are still being used."
11042 msgstr ""
11043 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
11044 "する現象が引き起こされることがある。"
11045
11046 #. type: Plain text
11047 #: build/C/man2/rmdir.2:141
11048 msgid ""
11049 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
11050 "B<unlink>(2), B<unlinkat>(2)"
11051 msgstr ""
11052 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
11053 "B<unlink>(2), B<unlinkat>(2)"
11054
11055 #. type: TH
11056 #: build/C/man3/scanf.3:52
11057 #, no-wrap
11058 msgid "SCANF"
11059 msgstr "SCANF"
11060
11061 #. type: TH
11062 #: build/C/man3/scanf.3:52
11063 #, no-wrap
11064 msgid "2013-01-30"
11065 msgstr "2013-01-30"
11066
11067 #. type: Plain text
11068 #: build/C/man3/scanf.3:55
11069 msgid ""
11070 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
11071 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
11072
11073 #. type: Plain text
11074 #: build/C/man3/scanf.3:62
11075 #, no-wrap
11076 msgid ""
11077 "B<int scanf(const char *>I<format>B<, ...);>\n"
11078 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11079 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11080 msgstr ""
11081 "B<int scanf(const char *>I<format>B<, ...);>\n"
11082 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11083 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11084
11085 #. type: Plain text
11086 #: build/C/man3/scanf.3:64
11087 #, no-wrap
11088 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
11089 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
11090
11091 #. type: Plain text
11092 #: build/C/man3/scanf.3:68
11093 #, no-wrap
11094 msgid ""
11095 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11096 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11097 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11098 msgstr ""
11099 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11100 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11101 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11102
11103 #. type: Plain text
11104 #: build/C/man3/scanf.3:79
11105 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11106 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11107
11108 #. type: Plain text
11109 #: build/C/man3/scanf.3:82
11110 msgid ""
11111 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11112 "200112L;"
11113 msgstr ""
11114 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11115 "200112L;"
11116
11117 #. type: Plain text
11118 #: build/C/man3/scanf.3:104
11119 msgid ""
11120 "The B<scanf>()  family of functions scans input according to I<format> as "
11121 "described below.  This format may contain I<conversion specifications>; the "
11122 "results from such conversions, if any, are stored in the locations pointed "
11123 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
11124 "argument must be of a type that is appropriate for the value returned by the "
11125 "corresponding conversion specification."
11126 msgstr ""
11127 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
11128 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
11129 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
11130 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
11131 "は、対応する変換指定が返す値に 適合していなければならない。"
11132
11133 #. type: Plain text
11134 #: build/C/man3/scanf.3:115
11135 msgid ""
11136 "If the number of conversion specifications in I<format> exceeds the number "
11137 "of I<pointer> arguments, the results are undefined.  If the number of "
11138 "I<pointer> arguments exceeds the number of conversion specifications, then "
11139 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
11140 msgstr ""
11141 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
11142 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
11143 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
11144
11145 #. type: Plain text
11146 #: build/C/man3/scanf.3:127
11147 msgid ""
11148 "The B<scanf>()  function reads input from the standard input stream "
11149 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
11150 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
11151 msgstr ""
11152 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
11153 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
11154 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
11155
11156 #. type: Plain text
11157 #: build/C/man3/scanf.3:145
11158 msgid ""
11159 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
11160 "from the stream pointer I<stream> using a variable argument list of pointers "
11161 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
11162 "from the standard input and the B<vsscanf>()  function scans it from a "
11163 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
11164 "functions respectively."
11165 msgstr ""
11166 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
11167 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
11168 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
11169 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
11170 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
11171
11172 #. type: Plain text
11173 #: build/C/man3/scanf.3:159
11174 msgid ""
11175 "The I<format> string consists of a sequence of I<directives> which describe "
11176 "how to process the sequence of input characters.  If processing of a "
11177 "directive fails, no further input is read, and B<scanf>()  returns.  A "
11178 "\"failure\" can be either of the following: I<input failure>, meaning that "
11179 "input characters were unavailable, or I<matching failure>, meaning that the "
11180 "input was inappropriate (see below)."
11181 msgstr ""
11182 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
11183 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
11184 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
11185 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
11186 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
11187 "であったこと (下記参照) を意味する。"
11188
11189 #. type: Plain text
11190 #: build/C/man3/scanf.3:161
11191 msgid "A directive is one of the following:"
11192 msgstr "命令は以下のいずれかである:"
11193
11194 #. type: TP
11195 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
11196 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
11197 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
11198 #, no-wrap
11199 msgid "\\(bu"
11200 msgstr "\\(bu"
11201
11202 #. type: Plain text
11203 #: build/C/man3/scanf.3:167
11204 msgid ""
11205 "A sequence of white-space characters (space, tab, newline, etc.; see "
11206 "B<isspace>(3)).  This directive matches any amount of white space, including "
11207 "none, in the input."
11208 msgstr ""
11209 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
11210 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
11211 "致する)。"
11212
11213 #. type: Plain text
11214 #: build/C/man3/scanf.3:171
11215 msgid ""
11216 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
11217 "This character must exactly match the next character of input."
11218 msgstr ""
11219 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
11220 "の次の文字に正確に一致しなければならない。"
11221
11222 #. type: Plain text
11223 #: build/C/man3/scanf.3:182
11224 msgid ""
11225 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
11226 "character.  A sequence of characters from the input is converted according "
11227 "to this specification, and the result is placed in the corresponding "
11228 "I<pointer> argument.  If the next item of input does not match the "
11229 "conversion specification, the conversion fails\\(emthis is a I<matching "
11230 "failure>."
11231 msgstr ""
11232 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
11233 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
11234 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
11235 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
11236
11237 #. type: Plain text
11238 #: build/C/man3/scanf.3:190
11239 msgid ""
11240 "Each I<conversion specification> in I<format> begins with either the "
11241 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
11242 "for the distinction) followed by:"
11243 msgstr ""
11244 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
11245 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
11246
11247 #. type: Plain text
11248 #: build/C/man3/scanf.3:201
11249 msgid ""
11250 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
11251 "input as directed by the conversion specification, but discards the input.  "
11252 "No corresponding I<pointer> argument is required, and this specification is "
11253 "not included in the count of successful assignments returned by B<scanf>()."
11254 msgstr ""
11255 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
11256 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
11257 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
11258
11259 #. type: Plain text
11260 #: build/C/man3/scanf.3:220
11261 msgid ""
11262 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
11263 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11264 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11265 "buffer of sufficient size, and assigns the address of this buffer to the "
11266 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
11267 "*> variable (this variable does not need to be initialized before the "
11268 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
11269 "longer required."
11270 msgstr ""
11271 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
11272 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
11273 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
11274 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
11275 "は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に"
11276 "初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファ"
11277 "を B<free>(3) すべきである。"
11278
11279 #. type: Plain text
11280 #: build/C/man3/scanf.3:232
11281 msgid ""
11282 "An optional decimal integer which specifies the I<maximum field width>.  "
11283 "Reading of characters stops either when this maximum is reached or when a "
11284 "nonmatching character is found, whichever happens first.  Most conversions "
11285 "discard initial white space characters (the exceptions are noted below), and "
11286 "these discarded characters don't count toward the maximum field width.  "
11287 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
11288 "mark the end of the input; the maximum field width does not include this "
11289 "terminator."
11290 msgstr ""
11291 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
11292 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
11293 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
11294 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
11295 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
11296 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
11297
11298 #. type: Plain text
11299 #: build/C/man3/scanf.3:246
11300 msgid ""
11301 "An optional I<type modifier character>.  For example, the B<l> type modifier "
11302 "is used with integer conversions such as B<%d> to specify that the "
11303 "corresponding I<pointer> argument refers to a I<long int> rather than a "
11304 "pointer to an I<int>."
11305 msgstr ""
11306 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
11307 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
11308 "I<int> ではなく I<long int> を参照していることを指定できる。"
11309
11310 #. type: Plain text
11311 #: build/C/man3/scanf.3:251
11312 msgid ""
11313 "A I<conversion specifier> that specifies the type of input conversion to be "
11314 "performed."
11315 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
11316
11317 #. type: Plain text
11318 #: build/C/man3/scanf.3:280
11319 msgid ""
11320 "The conversion specifications in I<format> are of two forms, either "
11321 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
11322 "forms should not be mixed in the same I<format> string, except that a string "
11323 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
11324 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
11325 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
11326 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
11327 "specifies that the converted input should be placed in the location referred "
11328 "to by the I<n>-th I<pointer> argument following I<format>."
11329 msgstr ""
11330 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
11331 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
11332 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
11333 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
11334 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
11335 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
11336 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
11337 "I<pointer> 引き数が参照する場所に格納することを指定する。"
11338
11339 #. type: SS
11340 #: build/C/man3/scanf.3:280
11341 #, no-wrap
11342 msgid "Conversions"
11343 msgstr "変換"
11344
11345 #. type: Plain text
11346 #: build/C/man3/scanf.3:284
11347 msgid ""
11348 "The following I<type modifier characters> can appear in a conversion "
11349 "specification:"
11350 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
11351
11352 #. type: Plain text
11353 #: build/C/man3/scanf.3:294
11354 msgid ""
11355 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
11356 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
11357 "I<unsigned short int> (rather than I<int>)."
11358 msgstr ""
11359 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
11360 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
11361 "あることを示す。"
11362
11363 #. type: Plain text
11364 #: build/C/man3/scanf.3:302
11365 msgid ""
11366 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
11367 "I<unsigned char>."
11368 msgstr ""
11369 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
11370 "タであることを示す。"
11371
11372 #. type: Plain text
11373 #: build/C/man3/scanf.3:311
11374 msgid ""
11375 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
11376 "I<uintmax_t>.  This modifier was introduced in C99."
11377 msgstr ""
11378 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
11379 "ることを示す。 この修飾子は C99 で導入された。"
11380
11381 #.  This use of l was introduced in Amendment 1 to ISO C90.
11382 #. type: Plain text
11383 #: build/C/man3/scanf.3:338
11384 msgid ""
11385 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
11386 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
11387 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
11388 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
11389 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
11390 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
11391 "as a pointer to a wide character or wide-character string respectively."
11392 msgstr ""
11393 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
11394 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
11395 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
11396 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
11397 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
11398 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
11399 "ンタであると みなされる。"
11400
11401 #.  MTK, Jul 05: The following is no longer true for modern
11402 #.  ANSI C (i.e., C99):
11403 #.  (Note that long long is not an
11404 #.  ANSI C
11405 #.  type. Any program using this will not be portable to all
11406 #.  architectures).
11407 #. type: Plain text
11408 #: build/C/man3/scanf.3:354
11409 msgid ""
11410 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
11411 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
11412 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
11413 msgstr ""
11414 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
11415 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
11416 "I<long long> へのポインタであることのいずれかであることを示す。"
11417
11418 #. type: Plain text
11419 #: build/C/man3/scanf.3:359
11420 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
11421 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
11422
11423 #. type: Plain text
11424 #: build/C/man3/scanf.3:366
11425 msgid ""
11426 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11427 "modifier was introduced in C99."
11428 msgstr ""
11429 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11430 "この修飾子は C99 で導入された。"
11431
11432 #. type: Plain text
11433 #: build/C/man3/scanf.3:373
11434 msgid ""
11435 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11436 "modifier was introduced in C99."
11437 msgstr ""
11438 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11439 "修飾子は C99 で導入された。"
11440
11441 #. type: Plain text
11442 #: build/C/man3/scanf.3:377
11443 msgid "The following I<conversion specifiers> are available:"
11444 msgstr "以下の I<「変換指定子」> が利用可能である。"
11445
11446 #. type: Plain text
11447 #: build/C/man3/scanf.3:386
11448 msgid ""
11449 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11450 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11451 "initial white space characters are discarded), and assignment does not occur."
11452 msgstr ""
11453 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11454 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11455 "る)、 変数への代入は生じない。"
11456
11457 #. type: TP
11458 #: build/C/man3/scanf.3:386
11459 #, no-wrap
11460 msgid "B<d>"
11461 msgstr "B<d>"
11462
11463 #. type: Plain text
11464 #: build/C/man3/scanf.3:391
11465 msgid ""
11466 "Matches an optionally signed decimal integer; the next pointer must be a "
11467 "pointer to I<int>."
11468 msgstr ""
11469 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11470 "ばならない。"
11471
11472 #. type: TP
11473 #: build/C/man3/scanf.3:391
11474 #, no-wrap
11475 msgid "B<D>"
11476 msgstr "B<D>"
11477
11478 #. type: Plain text
11479 #: build/C/man3/scanf.3:400
11480 msgid ""
11481 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11482 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11483 "causing old programs to fail mysteriously.)"
11484 msgstr ""
11485 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11486 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11487 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11488
11489 #. type: TP
11490 #: build/C/man3/scanf.3:400
11491 #, no-wrap
11492 msgid "B<i>"
11493 msgstr "B<i>"
11494
11495 #. type: Plain text
11496 #: build/C/man3/scanf.3:412
11497 msgid ""
11498 "Matches an optionally signed integer; the next pointer must be a pointer to "
11499 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11500 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11501 "that correspond to the base are used."
11502 msgstr ""
11503 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11504 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11505 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11506 "される文字は、これらの基数に対応しているものだけである。"
11507
11508 #. type: TP
11509 #: build/C/man3/scanf.3:412
11510 #, no-wrap
11511 msgid "B<o>"
11512 msgstr "B<o>"
11513
11514 #. type: Plain text
11515 #: build/C/man3/scanf.3:416
11516 msgid ""
11517 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11518 "I<unsigned int>."
11519 msgstr ""
11520 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11521 "らない。"
11522
11523 #. type: TP
11524 #: build/C/man3/scanf.3:416
11525 #, no-wrap
11526 msgid "B<u>"
11527 msgstr "B<u>"
11528
11529 #. type: Plain text
11530 #: build/C/man3/scanf.3:421
11531 msgid ""
11532 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11533 "I<unsigned int>."
11534 msgstr ""
11535 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11536 "でなければならない。"
11537
11538 #. type: Plain text
11539 #: build/C/man3/scanf.3:426
11540 msgid ""
11541 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11542 "to I<unsigned int>."
11543 msgstr ""
11544 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11545 "タでなければならない。"
11546
11547 #. type: TP
11548 #: build/C/man3/scanf.3:426
11549 #, no-wrap
11550 msgid "B<X>"
11551 msgstr "B<X>"
11552
11553 #. type: Plain text
11554 #: build/C/man3/scanf.3:430
11555 msgid "Equivalent to B<x>."
11556 msgstr "B<x> と同一である。"
11557
11558 #. type: TP
11559 #: build/C/man3/scanf.3:430
11560 #, no-wrap
11561 msgid "B<f>"
11562 msgstr "B<f>"
11563
11564 #. type: Plain text
11565 #: build/C/man3/scanf.3:435
11566 msgid ""
11567 "Matches an optionally signed floating-point number; the next pointer must be "
11568 "a pointer to I<float>."
11569 msgstr ""
11570 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11571 "ればならない。"
11572
11573 #. type: TP
11574 #: build/C/man3/scanf.3:435
11575 #, no-wrap
11576 msgid "B<e>"
11577 msgstr "B<e>"
11578
11579 #. type: Plain text
11580 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
11581 msgid "Equivalent to B<f>."
11582 msgstr "B<f> と同一である。"
11583
11584 #. type: TP
11585 #: build/C/man3/scanf.3:439
11586 #, no-wrap
11587 msgid "B<g>"
11588 msgstr "B<g>"
11589
11590 #. type: TP
11591 #: build/C/man3/scanf.3:443
11592 #, no-wrap
11593 msgid "B<E>"
11594 msgstr "B<E>"
11595
11596 #. type: Plain text
11597 #: build/C/man3/scanf.3:451
11598 msgid "(C99) Equivalent to B<f>."
11599 msgstr "(C99)  B<f> と同一である。"
11600
11601 #. type: Plain text
11602 #: build/C/man3/scanf.3:459
11603 msgid ""
11604 "Matches a sequence of non-white-space characters; the next pointer must be a "
11605 "pointer to character array that is long enough to hold the input sequence "
11606 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11607 "automatically.  The input string stops at white space or at the maximum "
11608 "field width, whichever occurs first."
11609 msgstr ""
11610 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11611 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11612 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11613 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11614 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11615
11616 #. type: Plain text
11617 #: build/C/man3/scanf.3:469
11618 msgid ""
11619 "Matches a sequence of characters whose length is specified by the I<maximum "
11620 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11621 "there must be enough room for all the characters (no terminating null byte "
11622 "is added).  The usual skip of leading white space is suppressed.  To skip "
11623 "white space first, use an explicit space in the format."
11624 msgstr ""
11625 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11626 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11627 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11628 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11629 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11630
11631 #. type: TP
11632 #: build/C/man3/scanf.3:469
11633 #, no-wrap
11634 msgid "B<\\&[>"
11635 msgstr "B<\\&[>"
11636
11637 #. type: Plain text
11638 #: build/C/man3/scanf.3:502
11639 msgid ""
11640 "Matches a nonempty sequence of characters from the specified set of accepted "
11641 "characters; the next pointer must be a pointer to I<char>, and there must be "
11642 "enough room for all the characters in the string, plus a terminating null "
11643 "byte.  The usual skip of leading white space is suppressed.  The string is "
11644 "to be made up of characters in (or not in) a particular set; the set is "
11645 "defined by the characters between the open bracket B<[> character and a "
11646 "close bracket B<]> character.  The set I<excludes> those characters if the "
11647 "first character after the open bracket is a circumflex (B<^>).  To include a "
11648 "close bracket in the set, make it the first character after the open bracket "
11649 "or the circumflex; any other position will end the set.  The hyphen "
11650 "character B<-> is also special; when placed between two other characters, it "
11651 "adds all intervening characters to the set.  To include a hyphen, make it "
11652 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11653 "> means the set \"everything except close bracket, zero through nine, and "
11654 "hyphen\".  The string ends with the appearance of a character not in the "
11655 "(or, with a circumflex, in) set or when the field width runs out."
11656 msgstr ""
11657 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11658 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11659 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11660 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11661 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11662 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11663 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11664 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11665 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11666 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11667 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11668 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11669 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11670 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11671 "文字の 出現または確保された領域が使い切られた時に終了する。"
11672
11673 #. type: Plain text
11674 #: build/C/man3/scanf.3:510
11675 msgid ""
11676 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11677 "pointer must be a pointer to a pointer to I<void>."
11678 msgstr ""
11679 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11680 "タは I<void> へのポインタへのポインタでなければならない。"
11681
11682 #. type: Plain text
11683 #: build/C/man3/scanf.3:530
11684 msgid ""
11685 "Nothing is expected; instead, the number of characters consumed thus far "
11686 "from the input is stored through the next pointer, which must be a pointer "
11687 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11688 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11689 "of a B<%n> directive does not increment the assignment count returned at the "
11690 "completion of execution\" but the Corrigendum seems to contradict this.  "
11691 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11692 "conversions on the return value."
11693 msgstr ""
11694 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11695 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11696 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11697 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11698 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11699 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11700 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11701
11702 #. type: Plain text
11703 #: build/C/man3/scanf.3:535
11704 msgid ""
11705 "These functions return the number of input items successfully matched and "
11706 "assigned, which can be fewer than provided for, or even zero in the event of "
11707 "an early matching failure."
11708 msgstr ""
11709 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11710 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11711 "ることもある。"
11712
11713 #. type: Plain text
11714 #: build/C/man3/scanf.3:547
11715 msgid ""
11716 "The value B<EOF> is returned if the end of input is reached before either "
11717 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11718 "also returned if a read error occurs, in which case the error indicator for "
11719 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11720 "error."
11721 msgstr ""
11722 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11723 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11724 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11725 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11726
11727 #. type: Plain text
11728 #: build/C/man3/scanf.3:553
11729 msgid ""
11730 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11731 "operation would block."
11732 msgstr ""
11733 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11734 "込み操作は停止 (block) することになる。"
11735
11736 #. type: Plain text
11737 #: build/C/man3/scanf.3:558
11738 msgid ""
11739 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11740 msgstr ""
11741 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11742 "ンされていない。"
11743
11744 #. type: Plain text
11745 #: build/C/man3/scanf.3:561
11746 msgid "Input byte sequence does not form a valid character."
11747 msgstr "入力されたバイト列が有効な文字を構成していない。"
11748
11749 #. type: Plain text
11750 #: build/C/man3/scanf.3:565
11751 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11752 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11753
11754 #. type: Plain text
11755 #: build/C/man3/scanf.3:570
11756 msgid "Not enough arguments; or I<format> is NULL."
11757 msgstr "引き数が十分でない。または I<format> が NULL である。"
11758
11759 #. type: Plain text
11760 #: build/C/man3/scanf.3:573
11761 msgid "Out of memory."
11762 msgstr "メモリ不足。"
11763
11764 #. type: TP
11765 #: build/C/man3/scanf.3:573
11766 #, no-wrap
11767 msgid "B<ERANGE>"
11768 msgstr "B<ERANGE>"
11769
11770 #. type: Plain text
11771 #: build/C/man3/scanf.3:577
11772 msgid ""
11773 "The result of an integer conversion would exceed the size that can be stored "
11774 "in the corresponding integer type."
11775 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11776
11777 #. type: Plain text
11778 #: build/C/man3/scanf.3:587
11779 msgid ""
11780 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11781 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11782 msgstr ""
11783 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11784 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11785
11786 #. type: Plain text
11787 #: build/C/man3/scanf.3:597
11788 msgid ""
11789 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11790 "the usage of B<L> in integer conversions is the GNU notation."
11791 msgstr ""
11792 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11793 "B<ll> または B<L> の使用は GNU での拡張である。"
11794
11795 #. type: Plain text
11796 #: build/C/man3/scanf.3:608
11797 msgid ""
11798 "The Linux version of these functions is based on the I<GNU> I<libio> "
11799 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11800 "(glibc-1.08)> for a more concise description."
11801 msgstr ""
11802 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11803 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11804
11805 #. type: Plain text
11806 #: build/C/man3/scanf.3:614
11807 msgid ""
11808 "The GNU C library supported the dynamic allocation conversion specifier (as "
11809 "a nonstandard extension) via the B<a> character.  This feature seems to be "
11810 "present at least as far back as glibc 2.0."
11811 msgstr ""
11812 "GNU C ライブラリ (glibc) では、 B<a> 文字による動的割り当て変換指定子 "
11813 "(dynamic allocation conversion specifier) を (非標準の拡張として) サポートし"
11814 "ている。この機能は少なくとも glibc 2.0 以降で存在しているようである。"
11815
11816 #. type: Plain text
11817 #: build/C/man3/scanf.3:624
11818 msgid ""
11819 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
11820 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
11821 "the B<a> is interpreted as a specifier for floating-point numbers (see "
11822 "above)."
11823 msgstr ""
11824 "この修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
11825 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない。この場"
11826 "合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11827
11828 #. type: Plain text
11829 #: build/C/man3/scanf.3:633
11830 msgid ""
11831 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11832 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11833 "advantages:"
11834 msgstr ""
11835 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11836 "ている。 B<m> 修飾子は以下の利点がある。"
11837
11838 #. type: Plain text
11839 #: build/C/man3/scanf.3:638
11840 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11841 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11842
11843 #. type: Plain text
11844 #: build/C/man3/scanf.3:644
11845 msgid ""
11846 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11847 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11848 msgstr ""
11849 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11850 "std=c99> などの影響も避けられる)。"
11851
11852 #. type: Plain text
11853 #: build/C/man3/scanf.3:646
11854 msgid "It is specified in the POSIX.1-2008 standard."
11855 msgstr "POSIX.1-2008 標準で規定されている。"
11856
11857 #. type: Plain text
11858 #: build/C/man3/scanf.3:659
11859 msgid ""
11860 "All functions are fully C89 conformant, but provide the additional "
11861 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11862 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11863 "the behavior of specifiers defined in C89."
11864 msgstr ""
11865 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11866 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11867 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11868 "れない。"
11869
11870 #. type: Plain text
11871 #: build/C/man3/scanf.3:675
11872 msgid ""
11873 "Some combinations of the type modifiers and conversion specifiers defined by "
11874 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
11875 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11876 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11877 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11878 "B<u>, B<x>, and B<X> conversions or B<ll>."
11879 msgstr ""
11880 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
11881 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
11882 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
11883 "他のアーキテクチャでも同様になっているとは限らない。\n"
11884 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
11885 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
11886 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11887
11888 #. type: Plain text
11889 #: build/C/man3/scanf.3:681
11890 msgid ""
11891 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11892 "conversions equivalently to B<L>."
11893 msgstr ""
11894 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11895 "動小数の変換に使用される。"
11896
11897 #. type: Plain text
11898 #: build/C/man3/scanf.3:691
11899 msgid ""
11900 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
11901 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
11902 "the returned string, as in the following example:"
11903 msgstr ""
11904 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
11905 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
11906 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
11907
11908 #. type: Plain text
11909 #: build/C/man3/scanf.3:696
11910 #, no-wrap
11911 msgid ""
11912 "char *p;\n"
11913 "int n;\n"
11914 msgstr ""
11915 "char *p;\n"
11916 "int n;\n"
11917
11918 #. type: Plain text
11919 #: build/C/man3/scanf.3:707
11920 #, no-wrap
11921 msgid ""
11922 "errno = 0;\n"
11923 "n = scanf(\"%m[a-z]\", &p);\n"
11924 "if (n == 1) {\n"
11925 "    printf(\"read: %s\\en\", p);\n"
11926 "    free(p);\n"
11927 "} else if (errno != 0) {\n"
11928 "    perror(\"scanf\");\n"
11929 "} else {\n"
11930 "    fprintf(stderr, \"No matching characters\\en\");\n"
11931 "}\n"
11932 msgstr ""
11933 "errno = 0;\n"
11934 "n = scanf(\"%m[a-z]\", &p);\n"
11935 "if (n == 1) {\n"
11936 "    printf(\"read: %s\\en\", p);\n"
11937 "    free(p);\n"
11938 "} else if (errno != 0) {\n"
11939 "    perror(\"scanf\");\n"
11940 "} else {\n"
11941 "    fprintf(stderr, \"No matching characters\\en\");\n"
11942 "}\n"
11943
11944 #. type: Plain text
11945 #: build/C/man3/scanf.3:715
11946 msgid ""
11947 "As shown in the above example, it is necessary to call B<free>(3)  only if "
11948 "the B<scanf>()  call successfully read a string."
11949 msgstr ""
11950 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11951 "B<free>(3)  を呼び出す必要がある。"
11952
11953 #. type: Plain text
11954 #: build/C/man3/scanf.3:722
11955 msgid ""
11956 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11957 "B<strtoul>(3)"
11958 msgstr ""
11959 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11960 "B<strtoul>(3),"
11961
11962 #. type: TH
11963 #: build/C/man3/setbuf.3:48
11964 #, no-wrap
11965 msgid "SETBUF"
11966 msgstr "SETBUF"
11967
11968 #. type: TH
11969 #: build/C/man3/setbuf.3:48
11970 #, no-wrap
11971 msgid "2012-08-03"
11972 msgstr "2012-08-03"
11973
11974 #. type: Plain text
11975 #: build/C/man3/setbuf.3:51
11976 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11977 msgstr ""
11978 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11979
11980 #. type: Plain text
11981 #: build/C/man3/setbuf.3:56
11982 #, no-wrap
11983 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11984 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11985
11986 #. type: Plain text
11987 #: build/C/man3/setbuf.3:58
11988 #, no-wrap
11989 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11990 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11991
11992 #. type: Plain text
11993 #: build/C/man3/setbuf.3:60
11994 #, no-wrap
11995 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11996 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11997
11998 #. type: Plain text
11999 #: build/C/man3/setbuf.3:63
12000 #, no-wrap
12001 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
12002 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
12003
12004 #. type: Plain text
12005 #: build/C/man3/setbuf.3:73
12006 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
12007 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
12008
12009 #. type: Plain text
12010 #: build/C/man3/setbuf.3:96
12011 msgid ""
12012 "The three types of buffering available are unbuffered, block buffered, and "
12013 "line buffered.  When an output stream is unbuffered, information appears on "
12014 "the destination file or terminal as soon as written; when it is block "
12015 "buffered many characters are saved up and written as a block; when it is "
12016 "line buffered characters are saved up until a newline is output or input is "
12017 "read from any stream attached to a terminal device (typically I<stdin>).  "
12018 "The function B<fflush>(3)  may be used to force the block out early.  (See "
12019 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
12020 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
12021 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
12022 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
12023 "by default."
12024 msgstr ""
12025 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
12026 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
12027 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
12028 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
12029 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
12030 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
12031 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
12032 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
12033 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
12034 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
12035 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
12036 "unbuffered である。"
12037
12038 #. type: Plain text
12039 #: build/C/man3/setbuf.3:103
12040 msgid ""
12041 "The B<setvbuf>()  function may be used on any open stream to change its "
12042 "buffer.  The I<mode> argument must be one of the following three macros:"
12043 msgstr ""
12044 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
12045 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
12046
12047 #. type: TP
12048 #: build/C/man3/setbuf.3:104
12049 #, no-wrap
12050 msgid "B<_IONBF>"
12051 msgstr "B<_IONBF>"
12052
12053 #. type: Plain text
12054 #: build/C/man3/setbuf.3:107
12055 msgid "unbuffered"
12056 msgstr "unbuffered"
12057
12058 #. type: TP
12059 #: build/C/man3/setbuf.3:107
12060 #, no-wrap
12061 msgid "B<_IOLBF>"
12062 msgstr "B<_IOLBF>"
12063
12064 #. type: Plain text
12065 #: build/C/man3/setbuf.3:110
12066 msgid "line buffered"
12067 msgstr "line buffered"
12068
12069 #. type: TP
12070 #: build/C/man3/setbuf.3:110
12071 #, no-wrap
12072 msgid "B<_IOFBF>"
12073 msgstr "B<_IOFBF>"
12074
12075 #. type: Plain text
12076 #: build/C/man3/setbuf.3:113
12077 msgid "fully buffered"
12078 msgstr "fully buffered"
12079
12080 #. type: Plain text
12081 #: build/C/man3/setbuf.3:129
12082 msgid ""
12083 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
12084 "least I<size> bytes long; this buffer will be used instead of the current "
12085 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
12086 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
12087 "()  function may be used only after opening a stream and before any other "
12088 "operations have been performed on it."
12089 msgstr ""
12090 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
12091 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
12092 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
12093 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
12094 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
12095
12096 #. type: Plain text
12097 #: build/C/man3/setbuf.3:135
12098 msgid ""
12099 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
12100 "().  The B<setbuf>()  function is exactly equivalent to the call"
12101 msgstr ""
12102 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
12103 "B<setbuf>()  関数は、"
12104
12105 #. type: Plain text
12106 #: build/C/man3/setbuf.3:138
12107 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12108 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12109
12110 #. type: Plain text
12111 #: build/C/man3/setbuf.3:148
12112 msgid ""
12113 "The B<setbuffer>()  function is the same, except that the size of the buffer "
12114 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
12115 "The B<setlinebuf>()  function is exactly equivalent to the call:"
12116 msgstr ""
12117 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
12118 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
12119 "は以下と同じである。"
12120
12121 #. type: Plain text
12122 #: build/C/man3/setbuf.3:151
12123 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
12124 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
12125
12126 #. type: Plain text
12127 #: build/C/man3/setbuf.3:162
12128 msgid ""
12129 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
12130 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
12131 "I<errno> on failure."
12132 msgstr ""
12133 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
12134 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
12135 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
12136
12137 #. type: Plain text
12138 #: build/C/man3/setbuf.3:164
12139 msgid "The other functions do not return a value."
12140 msgstr "その他の関数は値を返さない。"
12141
12142 #. type: Plain text
12143 #: build/C/man3/setbuf.3:170
12144 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
12145 msgstr ""
12146 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
12147
12148 #. type: Plain text
12149 #: build/C/man3/setbuf.3:180
12150 msgid ""
12151 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
12152 "versions of BSD before 4.2BSD, and are available under Linux since libc "
12153 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
12154 "buffer size and should be avoided."
12155 msgstr ""
12156 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
12157 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
12158 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
12159 "ズを使用するので、これも使うべきでない。"
12160
12161 #. type: Plain text
12162 #: build/C/man3/setbuf.3:187
12163 msgid ""
12164 "You must make sure that the space that I<buf> points to still exists by the "
12165 "time I<stream> is closed, which also happens at program termination.  For "
12166 "example, the following is invalid:"
12167 msgstr ""
12168 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
12169 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
12170 "な使い方は許されない:"
12171
12172 #. type: Plain text
12173 #: build/C/man3/setbuf.3:190
12174 #, no-wrap
12175 msgid "#include E<lt>stdio.hE<gt>\n"
12176 msgstr "#include E<lt>stdio.hE<gt>\n"
12177
12178 #. type: Plain text
12179 #: build/C/man3/setbuf.3:199
12180 #, no-wrap
12181 msgid ""
12182 "int\n"
12183 "main(void)\n"
12184 "{\n"
12185 "    char buf[BUFSIZ];\n"
12186 "    setbuf(stdin, buf);\n"
12187 "    printf(\"Hello, world!\\en\");\n"
12188 "    return 0;\n"
12189 "}\n"
12190 msgstr ""
12191 "int\n"
12192 "main(void)\n"
12193 "{\n"
12194 "    char buf[BUFSIZ];\n"
12195 "    setbuf(stdin, buf);\n"
12196 "    printf(\"Hello, world!\\en\");\n"
12197 "    return 0;\n"
12198 "}\n"
12199
12200 #. type: Plain text
12201 #: build/C/man3/setbuf.3:208
12202 msgid ""
12203 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12204 "(3), B<puts>(3)"
12205 msgstr ""
12206 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12207 "(3), B<puts>(3)"
12208
12209 #. type: TH
12210 #: build/C/man3/stdin.3:13
12211 #, no-wrap
12212 msgid "STDIN"
12213 msgstr "STDIN"
12214
12215 #. type: TH
12216 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
12217 #, no-wrap
12218 msgid "2008-07-14"
12219 msgstr "2008-07-14"
12220
12221 #. type: Plain text
12222 #: build/C/man3/stdin.3:16
12223 msgid "stdin, stdout, stderr - standard I/O streams"
12224 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
12225
12226 #. type: Plain text
12227 #: build/C/man3/stdin.3:23
12228 #, no-wrap
12229 msgid ""
12230 "B<extern FILE *>I<stdin>B<;>\n"
12231 "B<extern FILE *>I<stdout>B<;>\n"
12232 "B<extern FILE *>I<stderr>B<;>\n"
12233 msgstr ""
12234 "B<extern FILE *>I<stdin>B<;>\n"
12235 "B<extern FILE *>I<stdout>B<;>\n"
12236 "B<extern FILE *>I<stderr>B<;>\n"
12237
12238 #. type: Plain text
12239 #: build/C/man3/stdin.3:35
12240 msgid ""
12241 "Under normal circumstances every UNIX program has three streams opened for "
12242 "it when it starts up, one for input, one for output, and one for printing "
12243 "diagnostic or error messages.  These are typically attached to the user's "
12244 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
12245 "depending on what the parent process chose to set up.  (See also the "
12246 "\"Redirection\" section of B<sh>(1).)"
12247 msgstr ""
12248 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
12249 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
12250 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
12251 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
12252 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
12253
12254 #. type: Plain text
12255 #: build/C/man3/stdin.3:45
12256 msgid ""
12257 "The input stream is referred to as \"standard input\"; the output stream is "
12258 "referred to as \"standard output\"; and the error stream is referred to as "
12259 "\"standard error\".  These terms are abbreviated to form the symbols used to "
12260 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
12261 msgstr ""
12262 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
12263 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
12264 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
12265 "I<stdout>, I<stderr> である。"
12266
12267 #. type: Plain text
12268 #: build/C/man3/stdin.3:54
12269 msgid ""
12270 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
12271 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
12272 msgstr ""
12273 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
12274 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
12275
12276 #. type: Plain text
12277 #: build/C/man3/stdin.3:63
12278 msgid ""
12279 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
12280 "same underlying files may also be accessed using the raw UNIX file "
12281 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
12282 msgstr ""
12283 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
12284 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
12285 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
12286 "る。"
12287
12288 #. type: Plain text
12289 #: build/C/man3/stdin.3:82
12290 msgid ""
12291 "On program startup, the integer file descriptors associated with the streams "
12292 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
12293 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
12294 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
12295 "(3)  to one of these streams can change the file descriptor number "
12296 "associated with the stream.)"
12297 msgstr ""
12298 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
12299 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
12300 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
12301 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
12302 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
12303 "たファイルディスクリプタ の番号を変更することができる。)"
12304
12305 #. type: Plain text
12306 #: build/C/man3/stdin.3:95
12307 msgid ""
12308 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
12309 "unexpected results and should generally be avoided.  (For the masochistic "
12310 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
12311 "is supposed to work.)  A general rule is that file descriptors are handled "
12312 "in the kernel, while stdio is just a library.  This means for example, that "
12313 "after an B<exec>(3), the child inherits all open file descriptors, but all "
12314 "old streams have become inaccessible."
12315 msgstr ""
12316 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
12317 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
12318 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
12319 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
12320 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
12321 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
12322 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
12323
12324 #. type: Plain text
12325 #: build/C/man3/stdin.3:113
12326 msgid ""
12327 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
12328 "macros, assigning to them is nonportable.  The standard streams can be made "
12329 "to refer to different files with help of the library function B<freopen>(3), "
12330 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
12331 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
12332 "by normal program termination."
12333 msgstr ""
12334 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
12335 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
12336 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
12337 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
12338 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
12339 "グラムの正常終了によってクローズされる。"
12340
12341 #. type: Plain text
12342 #: build/C/man3/stdin.3:122
12343 msgid ""
12344 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
12345 "standard also stipulates that these three streams shall be open at program "
12346 "startup."
12347 msgstr ""
12348 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
12349 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
12350 "とが規定されている。"
12351
12352 #. type: Plain text
12353 #: build/C/man3/stdin.3:154
12354 msgid ""
12355 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
12356 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
12357 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
12358 "unexpected results, especially with debugging output.  The buffering mode of "
12359 "the standard streams (or any other stream)  can be changed using the "
12360 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
12361 "associated with a terminal, there may also be input buffering in the "
12362 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
12363 "terminal input is line buffered in the kernel.)  This kernel input handling "
12364 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
12365 "B<termios>(3)."
12366 msgstr ""
12367 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
12368 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
12369 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
12370 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
12371 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
12372 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
12373 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
12374 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
12375 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
12376 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
12377 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
12378 "B<termios>(3)  も参照すること。"
12379
12380 #. type: Plain text
12381 #: build/C/man3/stdin.3:160
12382 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12383 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12384
12385 #. type: TH
12386 #: build/C/man3/stdio.3:39
12387 #, no-wrap
12388 msgid "STDIO"
12389 msgstr "STDIO"
12390
12391 #. type: TH
12392 #: build/C/man3/stdio.3:39
12393 #, no-wrap
12394 msgid "2001-12-26"
12395 msgstr "2001-12-26"
12396
12397 #. type: Plain text
12398 #: build/C/man3/stdio.3:42
12399 msgid "stdio - standard input/output library functions"
12400 msgstr "stdio - 標準入出力ライブラリ関数"
12401
12402 #. type: Plain text
12403 #: build/C/man3/stdio.3:46
12404 msgid "B<FILE *>I<stdin>B<;>"
12405 msgstr "B<FILE *>I<stdin>B<;>"
12406
12407 #. type: Plain text
12408 #: build/C/man3/stdio.3:48
12409 msgid "B<FILE *>I<stdout>B<;>"
12410 msgstr "B<FILE *>I<stdout>B<;>"
12411
12412 #. type: Plain text
12413 #: build/C/man3/stdio.3:50
12414 msgid "B<FILE *>I<stderr>B<;>"
12415 msgstr "B<FILE *>I<stderr>B<;>"
12416
12417 #. type: Plain text
12418 #: build/C/man3/stdio.3:57
12419 msgid ""
12420 "The standard I/O library provides a simple and efficient buffered stream I/O "
12421 "interface.  Input and output is mapped into logical data streams and the "
12422 "physical I/O characteristics are concealed.  The functions and macros are "
12423 "listed below; more information is available from the individual man pages."
12424 msgstr ""
12425 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
12426 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
12427 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12428 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12429
12430 #. type: Plain text
12431 #: build/C/man3/stdio.3:80
12432 msgid ""
12433 "A stream is associated with an external file (which may be a physical "
12434 "device) by I<opening> a file, which may involve creating a new file.  "
12435 "Creating an existing file causes its former contents to be discarded.  If a "
12436 "file can support positioning requests (such as a disk file, as opposed to a "
12437 "terminal) then a I<file position indicator> associated with the stream is "
12438 "positioned at the start of the file (byte zero), unless the file is opened "
12439 "with append mode.  If append mode is used, it is unspecified whether the "
12440 "position indicator will be placed at the start or the end of the file.  The "
12441 "position indicator is maintained by subsequent reads, writes and positioning "
12442 "requests.  All input occurs as if the characters were read by successive "
12443 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12444 "characters were written by successive calls to the B<fputc>(3)  function."
12445 msgstr ""
12446 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12447 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12448 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12449 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12450 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12451 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12452 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12453 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12454 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12455 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12456 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12457 "字を書き込んだかのように行われる。"
12458
12459 #. type: Plain text
12460 #: build/C/man3/stdio.3:90
12461 msgid ""
12462 "A file is disassociated from a stream by I<closing> the file.  Output "
12463 "streams are flushed (any unwritten buffer contents are transferred to the "
12464 "host environment) before the stream is disassociated from the file.  The "
12465 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12466 "closed (garbage)."
12467 msgstr ""
12468 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12469 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12470 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12471 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12472 "確定になる (ゴミになってしまう)。"
12473
12474 #. type: Plain text
12475 #: build/C/man3/stdio.3:103
12476 msgid ""
12477 "A file may be subsequently reopened, by the same or another program "
12478 "execution, and its contents reclaimed or modified (if it can be repositioned "
12479 "at the start).  If the main function returns to its original caller, or the "
12480 "B<exit>(3)  function is called, all open files are closed (hence all output "
12481 "streams are flushed) before program termination.  Other methods of program "
12482 "termination, such as B<abort>(3)  do not bother about closing files properly."
12483 msgstr ""
12484 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12485 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12486 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12487 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12488 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12489 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12490 "保証はない。"
12491
12492 #. type: Plain text
12493 #: build/C/man3/stdio.3:119
12494 msgid ""
12495 "At program startup, three text streams are predefined and need not be opened "
12496 "explicitly: I<standard input> (for reading conventional input), I<standard "
12497 "output> (for writing conventional input), and I<standard error> (for writing "
12498 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12499 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12500 "the standard input and output streams are fully buffered if and only if the "
12501 "streams do not refer to an interactive device."
12502 msgstr ""
12503 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12504 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12505 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12506 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12507 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12508 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12509 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12510 "スを参照していなければ、 完全にバッファリングされている。"
12511
12512 #. type: Plain text
12513 #: build/C/man3/stdio.3:129
12514 msgid ""
12515 "Output streams that refer to terminal devices are always line buffered by "
12516 "default; pending output to such streams is written automatically whenever an "
12517 "input stream that refers to a terminal device is read.  In cases where a "
12518 "large amount of computation is done after printing part of a line on an "
12519 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12520 "going off and computing so that the output will appear."
12521 msgstr ""
12522 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12523 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12524 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12525 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12526 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12527 "必要がある。"
12528
12529 #. type: Plain text
12530 #: build/C/man3/stdio.3:143
12531 msgid ""
12532 "The I<stdio> library is a part of the library B<libc> and routines are "
12533 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12534 "SYNOPSIS sections of the following manual pages indicate which include files "
12535 "are to be used, what the compiler declaration for the function looks like "
12536 "and which external variables are of interest."
12537 msgstr ""
12538 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12539 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12540 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12541 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12542 "数が関係するのかが示されている。"
12543
12544 #.  Not on Linux: .BR fropen ,
12545 #.  Not on Linux: .BR fwopen ,
12546 #. type: Plain text
12547 #: build/C/man3/stdio.3:183
12548 msgid ""
12549 "The following are defined as macros; these names may not be reused without "
12550 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12551 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12552 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12553 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12554 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12555 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12556 "and B<putchar> exist and will be used if the macros definitions are "
12557 "explicitly removed."
12558 msgstr ""
12559 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12560 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12561 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12562 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12563 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12564 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12565 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12566 "示的に消去されている場合には、 これらを使用することになるだろう。"
12567
12568 #. type: SS
12569 #: build/C/man3/stdio.3:183
12570 #, no-wrap
12571 msgid "List of functions"
12572 msgstr "関数のリスト"
12573
12574 #. type: tbl table
12575 #: build/C/man3/stdio.3:188
12576 #, no-wrap
12577 msgid "Function\tDescription\n"
12578 msgstr "関数\t説明\n"
12579
12580 #. type: tbl table
12581 #: build/C/man3/stdio.3:189
12582 #, no-wrap
12583 msgid "_\n"
12584 msgstr "_\n"
12585
12586 #. type: tbl table
12587 #: build/C/man3/stdio.3:190
12588 #, no-wrap
12589 msgid "clearerr\tcheck and reset stream status\n"
12590 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12591
12592 #. type: tbl table
12593 #: build/C/man3/stdio.3:191
12594 #, no-wrap
12595 msgid "fclose\tclose a stream\n"
12596 msgstr "fclose\tストリームをクローズする\n"
12597
12598 #. type: tbl table
12599 #: build/C/man3/stdio.3:192
12600 #, no-wrap
12601 msgid "fdopen\tstream open functions\n"
12602 msgstr "fdopen\tストリームをオープンする\n"
12603
12604 #. type: tbl table
12605 #: build/C/man3/stdio.3:193
12606 #, no-wrap
12607 msgid "feof\tcheck and reset stream status\n"
12608 msgstr "feof\tストリームの状態の確認とリセット\n"
12609
12610 #. type: tbl table
12611 #: build/C/man3/stdio.3:194
12612 #, no-wrap
12613 msgid "ferror\tcheck and reset stream status\n"
12614 msgstr "ferror\tストリームの状態の確認とリセット\n"
12615
12616 #. type: tbl table
12617 #: build/C/man3/stdio.3:195
12618 #, no-wrap
12619 msgid "fflush\tflush a stream\n"
12620 msgstr "fflush\tストリームをフラッシュする\n"
12621
12622 #. type: tbl table
12623 #: build/C/man3/stdio.3:196
12624 #, no-wrap
12625 msgid "fgetc\tget next character or word from input stream\n"
12626 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12627
12628 #. type: tbl table
12629 #: build/C/man3/stdio.3:197
12630 #, no-wrap
12631 msgid "fgetpos\treposition a stream\n"
12632 msgstr "fgetpos\tストリームの位置を取得する\n"
12633
12634 #. type: tbl table
12635 #: build/C/man3/stdio.3:198
12636 #, no-wrap
12637 msgid "fgets\tget a line from a stream\n"
12638 msgstr "fgets\tストリームから行を取得する\n"
12639
12640 #. type: tbl table
12641 #: build/C/man3/stdio.3:199
12642 #, no-wrap
12643 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12644 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12645
12646 #. type: tbl table
12647 #: build/C/man3/stdio.3:200
12648 #, no-wrap
12649 msgid "fopen\tstream open functions\n"
12650 msgstr "fopen\tストリームをオープンする\n"
12651
12652 #. type: tbl table
12653 #: build/C/man3/stdio.3:201
12654 #, no-wrap
12655 msgid "fprintf\tformatted output conversion\n"
12656 msgstr "fprintf\t書式付き出力変換\n"
12657
12658 #. type: tbl table
12659 #: build/C/man3/stdio.3:202
12660 #, no-wrap
12661 msgid "fpurge\tflush a stream\n"
12662 msgstr "fpurge\tストリームをフラッシュする\n"
12663
12664 #. type: tbl table
12665 #: build/C/man3/stdio.3:203
12666 #, no-wrap
12667 msgid "fputc\toutput a character or word to a stream\n"
12668 msgstr "fputc\t文字または語をストリームに出力する\n"
12669
12670 #. type: tbl table
12671 #: build/C/man3/stdio.3:204
12672 #, no-wrap
12673 msgid "fputs\toutput a line to a stream\n"
12674 msgstr "fputs\t行をストリームに出力する\n"
12675
12676 #. type: tbl table
12677 #: build/C/man3/stdio.3:205
12678 #, no-wrap
12679 msgid "fread\tbinary stream input/output\n"
12680 msgstr "fread\tバイナリーストリーム入出力\n"
12681
12682 #. type: tbl table
12683 #: build/C/man3/stdio.3:206
12684 #, no-wrap
12685 msgid "freopen\tstream open functions\n"
12686 msgstr "freopen\tストリームをオープンする\n"
12687
12688 #. type: tbl table
12689 #: build/C/man3/stdio.3:207
12690 #, no-wrap
12691 msgid "fscanf\tinput format conversion\n"
12692 msgstr "fscanf\t書式付き入力変換\n"
12693
12694 #. type: tbl table
12695 #: build/C/man3/stdio.3:208
12696 #, no-wrap
12697 msgid "fseek\treposition a stream\n"
12698 msgstr "fseek\tストリームの位置指示子を移動する\n"
12699
12700 #. type: tbl table
12701 #: build/C/man3/stdio.3:209
12702 #, no-wrap
12703 msgid "fsetpos\treposition a stream\n"
12704 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12705
12706 #. type: tbl table
12707 #: build/C/man3/stdio.3:210
12708 #, no-wrap
12709 msgid "ftell\treposition a stream\n"
12710 msgstr "ftell\tストリームの位置を取得する\n"
12711
12712 #. type: tbl table
12713 #: build/C/man3/stdio.3:211
12714 #, no-wrap
12715 msgid "fwrite\tbinary stream input/output\n"
12716 msgstr "fwrite\tバイナリーストリーム入出力\n"
12717
12718 #. type: tbl table
12719 #: build/C/man3/stdio.3:212
12720 #, no-wrap
12721 msgid "getc\tget next character or word from input stream\n"
12722 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12723
12724 #. type: tbl table
12725 #: build/C/man3/stdio.3:213
12726 #, no-wrap
12727 msgid "getchar\tget next character or word from input stream\n"
12728 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12729
12730 #. type: tbl table
12731 #: build/C/man3/stdio.3:214
12732 #, no-wrap
12733 msgid "gets\tget a line from a stream\n"
12734 msgstr "gets\t行を入力ストリームから取得する\n"
12735
12736 #. type: tbl table
12737 #: build/C/man3/stdio.3:215
12738 #, no-wrap
12739 msgid "getw\tget next character or word from input stream\n"
12740 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12741
12742 #. type: tbl table
12743 #: build/C/man3/stdio.3:216
12744 #, no-wrap
12745 msgid "mktemp\tmake temporary filename (unique)\n"
12746 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12747
12748 #. type: tbl table
12749 #: build/C/man3/stdio.3:217
12750 #, no-wrap
12751 msgid "perror\tsystem error messages\n"
12752 msgstr "perror\tシステムエラーメッセージ\n"
12753
12754 #. type: tbl table
12755 #: build/C/man3/stdio.3:218
12756 #, no-wrap
12757 msgid "printf\tformatted output conversion\n"
12758 msgstr "printf\t書式付き出力変換\n"
12759
12760 #. type: tbl table
12761 #: build/C/man3/stdio.3:219
12762 #, no-wrap
12763 msgid "putc\toutput a character or word to a stream\n"
12764 msgstr "putc\t文字または語をストリームに出力する\n"
12765
12766 #. type: tbl table
12767 #: build/C/man3/stdio.3:220
12768 #, no-wrap
12769 msgid "putchar\toutput a character or word to a stream\n"
12770 msgstr "putchar\t文字または語をストリームに出力する\n"
12771
12772 #. type: tbl table
12773 #: build/C/man3/stdio.3:221
12774 #, no-wrap
12775 msgid "puts\toutput a line to a stream\n"
12776 msgstr "puts\t行をストリームに出力する\n"
12777
12778 #. type: tbl table
12779 #: build/C/man3/stdio.3:222
12780 #, no-wrap
12781 msgid "putw\toutput a character or word to a stream\n"
12782 msgstr "putw\t文字または語をストリームに出力する\n"
12783
12784 #. type: tbl table
12785 #: build/C/man3/stdio.3:223
12786 #, no-wrap
12787 msgid "remove\tremove directory entry\n"
12788 msgstr "remove\tディレクトリエントリを削除する\n"
12789
12790 #. type: tbl table
12791 #: build/C/man3/stdio.3:224
12792 #, no-wrap
12793 msgid "rewind\treposition a stream\n"
12794 msgstr "rewind\tストリームの位置指示子を移動する\n"
12795
12796 #. type: tbl table
12797 #: build/C/man3/stdio.3:225
12798 #, no-wrap
12799 msgid "scanf\tinput format conversion\n"
12800 msgstr "scanf\t書式付き入力変換\n"
12801
12802 #. type: tbl table
12803 #: build/C/man3/stdio.3:226
12804 #, no-wrap
12805 msgid "setbuf\tstream buffering operations\n"
12806 msgstr "setbuf\tストリームのバッファリングの操作\n"
12807
12808 #. type: tbl table
12809 #: build/C/man3/stdio.3:227
12810 #, no-wrap
12811 msgid "setbuffer\tstream buffering operations\n"
12812 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12813
12814 #. type: tbl table
12815 #: build/C/man3/stdio.3:228
12816 #, no-wrap
12817 msgid "setlinebuf\tstream buffering operations\n"
12818 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12819
12820 #. type: tbl table
12821 #: build/C/man3/stdio.3:229
12822 #, no-wrap
12823 msgid "setvbuf\tstream buffering operations\n"
12824 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12825
12826 #. type: tbl table
12827 #: build/C/man3/stdio.3:230
12828 #, no-wrap
12829 msgid "sprintf\tformatted output conversion\n"
12830 msgstr "sprintf\t書式付き出力変換\n"
12831
12832 #. type: tbl table
12833 #: build/C/man3/stdio.3:231
12834 #, no-wrap
12835 msgid "sscanf\tinput format conversion\n"
12836 msgstr "sscanf\t書式付き入力変換\n"
12837
12838 #. type: tbl table
12839 #: build/C/man3/stdio.3:232
12840 #, no-wrap
12841 msgid "strerror\tsystem error messages\n"
12842 msgstr "strerror\tシステムエラーメッセージ\n"
12843
12844 #. type: tbl table
12845 #: build/C/man3/stdio.3:233
12846 #, no-wrap
12847 msgid "sys_errlist\tsystem error messages\n"
12848 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12849
12850 #. type: tbl table
12851 #: build/C/man3/stdio.3:234
12852 #, no-wrap
12853 msgid "sys_nerr\tsystem error messages\n"
12854 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12855
12856 #. type: tbl table
12857 #: build/C/man3/stdio.3:235
12858 #, no-wrap
12859 msgid "tempnam\ttemporary file routines\n"
12860 msgstr "tempnam\tテンポラリファイルの操作\n"
12861
12862 #. type: tbl table
12863 #: build/C/man3/stdio.3:236
12864 #, no-wrap
12865 msgid "tmpfile\ttemporary file routines\n"
12866 msgstr "tmpfile\tテンポラリファイルの操作\n"
12867
12868 #. type: tbl table
12869 #: build/C/man3/stdio.3:237
12870 #, no-wrap
12871 msgid "tmpnam\ttemporary file routines\n"
12872 msgstr "tmpnam\tテンポラリファイルの操作\n"
12873
12874 #. type: tbl table
12875 #: build/C/man3/stdio.3:238
12876 #, no-wrap
12877 msgid "ungetc\tun-get character from input stream\n"
12878 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12879
12880 #. type: tbl table
12881 #: build/C/man3/stdio.3:239
12882 #, no-wrap
12883 msgid "vfprintf\tformatted output conversion\n"
12884 msgstr "vfprintf\t書式付き出力変換\n"
12885
12886 #. type: tbl table
12887 #: build/C/man3/stdio.3:240
12888 #, no-wrap
12889 msgid "vfscanf\tinput format conversion\n"
12890 msgstr "vfscanf\t書式付き入力変換\n"
12891
12892 #. type: tbl table
12893 #: build/C/man3/stdio.3:241
12894 #, no-wrap
12895 msgid "vprintf\tformatted output conversion\n"
12896 msgstr "vprintf\t書式付き出力変換\n"
12897
12898 #. type: tbl table
12899 #: build/C/man3/stdio.3:242
12900 #, no-wrap
12901 msgid "vscanf\tinput format conversion\n"
12902 msgstr "vscanf\t書式付き入力変換\n"
12903
12904 #. type: tbl table
12905 #: build/C/man3/stdio.3:243
12906 #, no-wrap
12907 msgid "vsprintf\tformatted output conversion\n"
12908 msgstr "vsprintf\t書式付き出力変換\n"
12909
12910 #. type: tbl table
12911 #: build/C/man3/stdio.3:244
12912 #, no-wrap
12913 msgid "vsscanf\tinput format conversion\n"
12914 msgstr "vsscanf\t書式付き入力変換\n"
12915
12916 #. type: Plain text
12917 #: build/C/man3/stdio.3:250
12918 msgid "The I<stdio> library conforms to C89."
12919 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12920
12921 #. type: Plain text
12922 #: build/C/man3/stdio.3:257
12923 msgid ""
12924 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12925 "B<unlocked_stdio>(3)"
12926 msgstr ""
12927 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12928 "B<unlocked_stdio>(3)"
12929
12930 #. type: TH
12931 #: build/C/man3/stdio_ext.3:25
12932 #, no-wrap
12933 msgid "STDIO_EXT"
12934 msgstr "STDIO_EXT"
12935
12936 #. type: Plain text
12937 #: build/C/man3/stdio_ext.3:30
12938 msgid ""
12939 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12940 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12941 "structure"
12942 msgstr ""
12943 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12944 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12945 "へのインタフェース"
12946
12947 #. type: Plain text
12948 #: build/C/man3/stdio_ext.3:34
12949 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12950 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12951
12952 #. type: Plain text
12953 #: build/C/man3/stdio_ext.3:36
12954 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12955 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12956
12957 #. type: Plain text
12958 #: build/C/man3/stdio_ext.3:38
12959 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12960 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12961
12962 #. type: Plain text
12963 #: build/C/man3/stdio_ext.3:40
12964 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12965 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12966
12967 #. type: Plain text
12968 #: build/C/man3/stdio_ext.3:42
12969 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12970 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12971
12972 #. type: Plain text
12973 #: build/C/man3/stdio_ext.3:44
12974 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12975 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12976
12977 #. type: Plain text
12978 #: build/C/man3/stdio_ext.3:46
12979 msgid "B<int __freading(FILE *>I<stream>B<);>"
12980 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12981
12982 #. type: Plain text
12983 #: build/C/man3/stdio_ext.3:48
12984 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12985 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12986
12987 #. type: Plain text
12988 #: build/C/man3/stdio_ext.3:50
12989 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12990 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12991
12992 #. type: Plain text
12993 #: build/C/man3/stdio_ext.3:52
12994 msgid "B<void _flushlbf(void);>"
12995 msgstr "B<void _flushlbf(void);>"
12996
12997 #. type: Plain text
12998 #: build/C/man3/stdio_ext.3:54
12999 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
13000 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
13001
13002 #. type: Plain text
13003 #: build/C/man3/stdio_ext.3:59
13004 msgid ""
13005 "Solaris introduced routines to allow portable access to the internals of the "
13006 "I<FILE> structure, and glibc also implemented these."
13007 msgstr ""
13008 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
13009 "が導入されており、これらは glibc でも実装されている。"
13010
13011 #. type: Plain text
13012 #: build/C/man3/stdio_ext.3:64
13013 msgid ""
13014 "The B<__fbufsize>()  function returns the size of the buffer currently used "
13015 "by the given stream."
13016 msgstr ""
13017 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
13018 "す。"
13019
13020 #. type: Plain text
13021 #: build/C/man3/stdio_ext.3:71
13022 msgid ""
13023 "The B<__fpending>()  function returns the number of bytes in the output "
13024 "buffer.  For wide-oriented streams the unit is wide characters.  This "
13025 "function is undefined on buffers in reading mode, or opened read-only."
13026 msgstr ""
13027 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
13028 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
13029 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
13030 "は未定義である。"
13031
13032 #. type: Plain text
13033 #: build/C/man3/stdio_ext.3:76
13034 msgid ""
13035 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
13036 "buffered, and zero otherwise."
13037 msgstr ""
13038 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
13039 "場合は 0 を返す。"
13040
13041 #. type: Plain text
13042 #: build/C/man3/stdio_ext.3:81
13043 msgid ""
13044 "The B<__freadable>()  function returns a nonzero value if the stream allows "
13045 "reading, and zero otherwise."
13046 msgstr ""
13047 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
13048 "外の場合は 0 を返す。"
13049
13050 #. type: Plain text
13051 #: build/C/man3/stdio_ext.3:86
13052 msgid ""
13053 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
13054 "writing, and zero otherwise."
13055 msgstr ""
13056 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
13057 "外の場合は 0 を返す。"
13058
13059 #. type: Plain text
13060 #: build/C/man3/stdio_ext.3:92
13061 msgid ""
13062 "The B<__freading>()  function returns a nonzero value if the stream is read-"
13063 "only, or if the last operation on the stream was a read operation, and zero "
13064 "otherwise."
13065 msgstr ""
13066 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
13067 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
13068 "を返す。"
13069
13070 #. type: Plain text
13071 #: build/C/man3/stdio_ext.3:98
13072 msgid ""
13073 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
13074 "only (or append-only), or if the last operation on the stream was a write "
13075 "operation, and zero otherwise."
13076 msgstr ""
13077 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
13078 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
13079 "し、 それ以外の場合は 0 を返す。"
13080
13081 #. type: Plain text
13082 #: build/C/man3/stdio_ext.3:106
13083 msgid ""
13084 "The B<__fsetlocking>()  function can be used to select the desired type of "
13085 "locking on the stream.  It returns the current type.  The I<type> argument "
13086 "can take the following three values:"
13087 msgstr ""
13088 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
13089 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
13090 "ることができる :"
13091
13092 #. type: TP
13093 #: build/C/man3/stdio_ext.3:106
13094 #, no-wrap
13095 msgid "B<FSETLOCKING_INTERNAL>"
13096 msgstr "B<FSETLOCKING_INTERNAL>"
13097
13098 #. type: Plain text
13099 #: build/C/man3/stdio_ext.3:111
13100 msgid ""
13101 "Perform implicit locking around every operation on the given stream (except "
13102 "for the *_unlocked ones).  This is the default."
13103 msgstr ""
13104 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
13105 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
13106 "である)。 これがデフォルトのロック形式である。"
13107
13108 #. type: TP
13109 #: build/C/man3/stdio_ext.3:111
13110 #, no-wrap
13111 msgid "B<FSETLOCKING_BYCALLER>"
13112 msgstr "B<FSETLOCKING_BYCALLER>"
13113
13114 #. type: Plain text
13115 #: build/C/man3/stdio_ext.3:118
13116 msgid ""
13117 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
13118 "case there is more than one thread), and the stdio routines will not do "
13119 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
13120 msgstr ""
13121 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
13122 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
13123 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
13124 "理を行わない。"
13125
13126 #. type: TP
13127 #: build/C/man3/stdio_ext.3:118
13128 #, no-wrap
13129 msgid "B<FSETLOCKING_QUERY>"
13130 msgstr "B<FSETLOCKING_QUERY>"
13131
13132 #. type: Plain text
13133 #: build/C/man3/stdio_ext.3:122
13134 msgid "Don't change the type of locking.  (Only return it.)"
13135 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
13136
13137 #. type: Plain text
13138 #: build/C/man3/stdio_ext.3:128
13139 msgid ""
13140 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
13141 "so that output to a terminal is forced out, say before reading keyboard "
13142 "input.)"
13143 msgstr ""
13144 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
13145 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
13146 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
13147 "いだろう)"
13148
13149 #. type: Plain text
13150 #: build/C/man3/stdio_ext.3:132
13151 msgid ""
13152 "The B<__fpurge>()  function discards the contents of the stream's buffer."
13153 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
13154
13155 #. type: Plain text
13156 #: build/C/man3/stdio_ext.3:141
13157 msgid ""
13158 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
13159 "functions do not lock the stream, so they are not thread-safe."
13160 msgstr ""
13161 "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() "
13162 "は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
13163
13164 #. type: Plain text
13165 #: build/C/man3/stdio_ext.3:151
13166 msgid ""
13167 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13168 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
13169 msgstr ""
13170 "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13171 "B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
13172
13173 #. type: Plain text
13174 #: build/C/man3/stdio_ext.3:154
13175 msgid "B<flockfile>(3), B<fpurge>(3)"
13176 msgstr "B<flockfile>(3), B<fpurge>(3)"
13177
13178 #. type: TH
13179 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
13180 #, no-wrap
13181 msgid "SYMLINK"
13182 msgstr "SYMLINK"
13183
13184 #. type: Plain text
13185 #: build/C/man2/symlink.2:35
13186 msgid "symlink - make a new name for a file"
13187 msgstr "symlink - ファイルに新しい名前を付ける"
13188
13189 #. type: Plain text
13190 #: build/C/man2/symlink.2:39
13191 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13192 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13193
13194 #. type: Plain text
13195 #: build/C/man2/symlink.2:47
13196 msgid "B<symlink>():"
13197 msgstr "B<symlink>():"
13198
13199 #. type: Plain text
13200 #: build/C/man2/symlink.2:58
13201 msgid ""
13202 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
13203 "string I<oldpath>."
13204 msgstr ""
13205 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
13206 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
13207
13208 #. type: Plain text
13209 #: build/C/man2/symlink.2:62
13210 msgid ""
13211 "Symbolic links are interpreted at run time as if the contents of the link "
13212 "had been substituted into the path being followed to find a file or "
13213 "directory."
13214 msgstr ""
13215 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
13216 "スを辿ることで、 ファイルやディレクトリに到達する。"
13217
13218 #. type: Plain text
13219 #: build/C/man2/symlink.2:67
13220 msgid ""
13221 "Symbolic links may contain I<..> path components, which (if used at the "
13222 "start of the link) refer to the parent directories of that in which the link "
13223 "resides."
13224 msgstr ""
13225 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
13226 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
13227 "される。"
13228
13229 #. type: Plain text
13230 #: build/C/man2/symlink.2:71
13231 msgid ""
13232 "A symbolic link (also known as a soft link) may point to an existing file or "
13233 "to a nonexistent one; the latter case is known as a dangling link."
13234 msgstr ""
13235 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
13236 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
13237 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
13238
13239 #. type: Plain text
13240 #: build/C/man2/symlink.2:78
13241 msgid ""
13242 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
13243 "when following the link, but is checked when removal or renaming of the link "
13244 "is requested and the link is in a directory with the sticky bit "
13245 "(B<S_ISVTX>)  set."
13246 msgstr ""
13247 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
13248 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
13249 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
13250 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
13251
13252 #. type: Plain text
13253 #: build/C/man2/symlink.2:99
13254 msgid ""
13255 "Write access to the directory containing I<newpath> is denied, or one of the "
13256 "directories in the path prefix of I<newpath> did not allow search "
13257 "permission.  (See also B<path_resolution>(7).)"
13258 msgstr ""
13259 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
13260 "含まれているディレクトリのどれかに検索許可が与えられていない "
13261 "(B<path_resolution>(7)  も参照すること)。"
13262
13263 #. type: Plain text
13264 #: build/C/man2/symlink.2:104
13265 msgid ""
13266 "The user's quota of resources on the file system has been exhausted.  The "
13267 "resources could be inodes or disk blocks, depending on the file system "
13268 "implementation."
13269 msgstr ""
13270 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
13271 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
13272 "依存である。"
13273
13274 #. type: Plain text
13275 #: build/C/man2/symlink.2:118
13276 msgid "Too many symbolic links were encountered in resolving I<newpath>."
13277 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13278
13279 #. type: Plain text
13280 #: build/C/man2/symlink.2:128
13281 msgid ""
13282 "A directory component in I<newpath> does not exist or is a dangling symbolic "
13283 "link, or I<oldpath> is the empty string."
13284 msgstr ""
13285 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
13286 "I<oldpath> が空文字列である。"
13287
13288 #. type: Plain text
13289 #: build/C/man2/symlink.2:140
13290 msgid ""
13291 "A component used as a directory in I<newpath> is not, in fact, a directory."
13292 msgstr ""
13293 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
13294
13295 #. type: Plain text
13296 #: build/C/man2/symlink.2:145
13297 msgid ""
13298 "The file system containing I<newpath> does not support the creation of "
13299 "symbolic links."
13300 msgstr ""
13301 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
13302 "作成をサポートしていない。"
13303
13304 #. type: Plain text
13305 #: build/C/man2/symlink.2:149
13306 msgid "I<newpath> is on a read-only file system."
13307 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
13308
13309 #. type: Plain text
13310 #: build/C/man2/symlink.2:159
13311 msgid "No checking of I<oldpath> is done."
13312 msgstr "I<oldpath> についてのチェックは行なわれない。"
13313
13314 #. type: Plain text
13315 #: build/C/man2/symlink.2:164
13316 msgid ""
13317 "Deleting the name referred to by a symlink will actually delete the file "
13318 "(unless it also has other hard links).  If this behavior is not desired, use "
13319 "B<link>(2)."
13320 msgstr ""
13321 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
13322 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
13323 "場合は、 B<link>(2)  を使用すること。"
13324
13325 #. type: Plain text
13326 #: build/C/man2/symlink.2:176
13327 msgid ""
13328 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13329 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13330 "B<symlink>(7)"
13331 msgstr ""
13332 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13333 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13334 "B<symlink>(7)"
13335
13336 #. type: TH
13337 #: build/C/man7/symlink.7:36
13338 #, no-wrap
13339 msgid "2008-06-18"
13340 msgstr "2008-06-18"
13341
13342 #. type: Plain text
13343 #: build/C/man7/symlink.7:39
13344 msgid "symlink - symbolic link handling"
13345 msgstr ""
13346
13347 #. type: SH
13348 #: build/C/man7/symlink.7:39
13349 #, no-wrap
13350 msgid "SYMBOLIC LINK HANDLING"
13351 msgstr ""
13352
13353 #. type: Plain text
13354 #: build/C/man7/symlink.7:43
13355 msgid ""
13356 "Symbolic links are files that act as pointers to other files.  To understand "
13357 "their behavior, you must first understand how hard links work."
13358 msgstr ""
13359
13360 #. type: Plain text
13361 #: build/C/man7/symlink.7:59
13362 msgid ""
13363 "A hard link to a file is indistinguishable from the original file because it "
13364 "is a reference to the object underlying the original filename.  (To be "
13365 "precise: each of the hard links to a file is a reference to the same I<i-"
13366 "node number>, where an i-node number is an index into the i-node table, "
13367 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
13368 "Changes to a file are independent of the name used to reference the file.  "
13369 "Hard links may not refer to directories (to prevent the possibility of loops "
13370 "within the file system tree, which would confuse many programs)  and may not "
13371 "refer to files on different file systems (because i-node numbers are not "
13372 "unique across file systems)."
13373 msgstr ""
13374
13375 #. type: Plain text
13376 #: build/C/man7/symlink.7:66
13377 msgid ""
13378 "A symbolic link is a special type of file whose contents are a string that "
13379 "is the pathname another file, the file to which the link refers.  In other "
13380 "words, a symbolic link is a pointer to another name, and not to an "
13381 "underlying object.  For this reason, symbolic links may refer to directories "
13382 "and may cross file system boundaries."
13383 msgstr ""
13384
13385 #. type: Plain text
13386 #: build/C/man7/symlink.7:72
13387 msgid ""
13388 "There is no requirement that the pathname referred to by a symbolic link "
13389 "should exist.  A symbolic link that refers to a pathname that does not exist "
13390 "is said to be a I<dangling link>."
13391 msgstr ""
13392
13393 #. type: Plain text
13394 #: build/C/man7/symlink.7:84
13395 msgid ""
13396 "Because a symbolic link and its referenced object coexist in the file system "
13397 "name space, confusion can arise in distinguishing between the link itself "
13398 "and the referenced object.  On historical systems, commands and system calls "
13399 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
13400 "Rules for a more uniform approach, as they are implemented on Linux and "
13401 "other systems, are outlined here.  It is important that site-local "
13402 "applications also conform to these rules, so that the user interface can be "
13403 "as consistent as possible."
13404 msgstr ""
13405
13406 #. type: SS
13407 #: build/C/man7/symlink.7:84
13408 #, no-wrap
13409 msgid "Symbolic link ownership, permissions, and timestamps"
13410 msgstr ""
13411
13412 #. type: Plain text
13413 #: build/C/man7/symlink.7:92
13414 msgid ""
13415 "The owner and group of an existing symbolic link can be changed using "
13416 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
13417 "is when the link is being removed or renamed in a directory that has the "
13418 "sticky bit set (see B<stat>(2))."
13419 msgstr ""
13420
13421 #. type: Plain text
13422 #: build/C/man7/symlink.7:98
13423 msgid ""
13424 "The last access and last modification timestamps of a symbolic link can be "
13425 "changed using B<utimensat>(2)  or B<lutimes>(3)."
13426 msgstr ""
13427
13428 #.  Linux does not currently implement an lchmod(2).
13429 #.  The
13430 #.  4.4BSD
13431 #.  system differs from historical
13432 #.  4BSD
13433 #.  systems in that the system call
13434 #.  .BR chown (2)
13435 #.  has been changed to follow symbolic links.
13436 #.  The
13437 #.  .BR lchown (2)
13438 #.  system call was added later when the limitations of the new
13439 #.  .BR chown (2)
13440 #.  became apparent.
13441 #. type: Plain text
13442 #: build/C/man7/symlink.7:117
13443 msgid ""
13444 "On Linux, the permissions of a symbolic link are not used in any operations; "
13445 "the permissions are always 0777 (read, write, and execute for all user "
13446 "categories), and can't be changed."
13447 msgstr ""
13448
13449 #. type: SS
13450 #: build/C/man7/symlink.7:117
13451 #, no-wrap
13452 msgid "Handling of symbolic links by system calls and commands"
13453 msgstr ""
13454
13455 #. type: Plain text
13456 #: build/C/man7/symlink.7:132
13457 msgid ""
13458 "Symbolic links are handled either by operating on the link itself, or by "
13459 "operating on the object referred to by the link.  In the latter case, an "
13460 "application or system call is said to I<follow> the link.  Symbolic links "
13461 "may refer to other symbolic links, in which case the links are dereferenced "
13462 "until an object that is not a symbolic link is found, a symbolic link that "
13463 "refers to a file which does not exist is found, or a loop is detected.  "
13464 "(Loop detection is done by placing an upper limit on the number of links "
13465 "that may be followed, and an error results if this limit is exceeded.)"
13466 msgstr ""
13467
13468 #. type: Plain text
13469 #: build/C/man7/symlink.7:135
13470 msgid ""
13471 "There are three separate areas that need to be discussed.  They are as "
13472 "follows:"
13473 msgstr ""
13474
13475 #. type: IP
13476 #: build/C/man7/symlink.7:135
13477 #, no-wrap
13478 msgid "1."
13479 msgstr "1."
13480
13481 #. type: Plain text
13482 #: build/C/man7/symlink.7:137
13483 msgid "Symbolic links used as filename arguments for system calls."
13484 msgstr ""
13485
13486 #. type: IP
13487 #: build/C/man7/symlink.7:137
13488 #, no-wrap
13489 msgid "2."
13490 msgstr "2."
13491
13492 #. type: Plain text
13493 #: build/C/man7/symlink.7:140
13494 msgid ""
13495 "Symbolic links specified as command-line arguments to utilities that are not "
13496 "traversing a file tree."
13497 msgstr ""
13498
13499 #. type: IP
13500 #: build/C/man7/symlink.7:140
13501 #, no-wrap
13502 msgid "3."
13503 msgstr "3."
13504
13505 #. type: Plain text
13506 #: build/C/man7/symlink.7:144
13507 msgid ""
13508 "Symbolic links encountered by utilities that are traversing a file tree "
13509 "(either specified on the command line or encountered as part of the file "
13510 "hierarchy walk)."
13511 msgstr ""
13512
13513 #. type: SS
13514 #: build/C/man7/symlink.7:144
13515 #, no-wrap
13516 msgid "System calls"
13517 msgstr ""
13518
13519 #. type: Plain text
13520 #: build/C/man7/symlink.7:147
13521 msgid ""
13522 "The first area is symbolic links used as filename arguments for system calls."
13523 msgstr ""
13524
13525 #. type: Plain text
13526 #: build/C/man7/symlink.7:157
13527 msgid ""
13528 "Except as noted below, all system calls follow symbolic links.  For example, "
13529 "if there were a symbolic link I<slink> which pointed to a file named "
13530 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13531 "descriptor referring to the file I<afile>."
13532 msgstr ""
13533
13534 #.  Maybe one day: .BR fchownat (2)
13535 #. type: Plain text
13536 #: build/C/man7/symlink.7:207
13537 msgid ""
13538 "Various system calls do not follow links, and operate on the symbolic link "
13539 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13540 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13541 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13542 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13543 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13544 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13545 "(2), that library function also does not follow symbolic links.  When "
13546 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13547 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13548 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13549 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13550 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13551 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13552 "to allow either behavior in an implementation."
13553 msgstr ""
13554
13555 #. type: SS
13556 #: build/C/man7/symlink.7:207
13557 #, no-wrap
13558 msgid "Commands not traversing a file tree"
13559 msgstr ""
13560
13561 #. type: Plain text
13562 #: build/C/man7/symlink.7:210
13563 msgid ""
13564 "The second area is symbolic links, specified as command-line filename "
13565 "arguments, to commands which are not traversing a file tree."
13566 msgstr ""
13567
13568 #. type: Plain text
13569 #: build/C/man7/symlink.7:221
13570 msgid ""
13571 "Except as noted below, commands follow symbolic links named as command-line "
13572 "arguments.  For example, if there were a symbolic link I<slink> which "
13573 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13574 "contents of the file I<afile>."
13575 msgstr ""
13576
13577 #. type: Plain text
13578 #: build/C/man7/symlink.7:229
13579 msgid ""
13580 "It is important to realize that this rule includes commands which may "
13581 "optionally traverse file trees, e.g., the command I<chown file> is included "
13582 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13583 "traversal, is not.  (The latter is described in the third area, below.)"
13584 msgstr ""
13585
13586 #. type: Plain text
13587 #: build/C/man7/symlink.7:247
13588 msgid ""
13589 "If it is explicitly intended that the command operate on the symbolic link "
13590 "instead of following the symbolic link, e.g., it is desired that I<chown "
13591 "slink> change the ownership of the file that I<slink> is, whether it is a "
13592 "symbolic link or not, the I<-h> option should be used.  In the above "
13593 "example, I<chown root slink> would change the ownership of the file referred "
13594 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13595 "I<slink> itself."
13596 msgstr ""
13597
13598 #. type: Plain text
13599 #: build/C/man7/symlink.7:249
13600 msgid "There are some exceptions to this rule:"
13601 msgstr ""
13602
13603 #. type: Plain text
13604 #: build/C/man7/symlink.7:259
13605 msgid ""
13606 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13607 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13608 "the symbolic link references a file via a relative path, moving it to "
13609 "another directory may very well cause it to stop working, since the path may "
13610 "no longer be correct.)"
13611 msgstr ""
13612
13613 #. type: Plain text
13614 #: build/C/man7/symlink.7:289
13615 msgid ""
13616 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13617 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13618 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13619 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13620 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13621 "the only command where the I<-H> and I<-L> options affect its behavior even "
13622 "though it is not doing a walk of a file tree.)"
13623 msgstr ""
13624
13625 #. The 4.4BSD system differs from historical 4BSD systems in that the
13626 #. .BR chown (1)
13627 #. and
13628 #. .BR chgrp (1)
13629 #. commands follow symbolic links specified on the command line.
13630 #. type: Plain text
13631 #: build/C/man7/symlink.7:307
13632 msgid ""
13633 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13634 "command does not follow symbolic links named as argument by default.  The "
13635 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13636 "L> option is specified."
13637 msgstr ""
13638
13639 #. type: SS
13640 #: build/C/man7/symlink.7:307
13641 #, no-wrap
13642 msgid "Commands traversing a file tree"
13643 msgstr ""
13644
13645 #. type: Plain text
13646 #: build/C/man7/symlink.7:320
13647 msgid ""
13648 "The following commands either optionally or always traverse file trees: "
13649 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13650 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13651 msgstr ""
13652
13653 #. type: Plain text
13654 #: build/C/man7/symlink.7:324
13655 msgid ""
13656 "It is important to realize that the following rules apply equally to "
13657 "symbolic links encountered during the file tree traversal and symbolic links "
13658 "listed as command-line arguments."
13659 msgstr ""
13660
13661 #. type: Plain text
13662 #: build/C/man7/symlink.7:329
13663 msgid ""
13664 "The I<first rule> applies to symbolic links that reference files other than "
13665 "directories.  Operations that apply to symbolic links are performed on the "
13666 "links themselves, but otherwise the links are ignored."
13667 msgstr ""
13668
13669 #. type: Plain text
13670 #: build/C/man7/symlink.7:341
13671 msgid ""
13672 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13673 "symbolic links encountered in the tree traversal of I<directory>, because "
13674 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13675 "referred to by I<slink>."
13676 msgstr ""
13677
13678 #. type: Plain text
13679 #: build/C/man7/symlink.7:346
13680 msgid ""
13681 "The I<second rule> applies to symbolic links that refer to directories.  "
13682 "Symbolic links that refer to directories are never followed by default.  "
13683 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13684 "\" walk (where symbolic links the refer to directories are followed)."
13685 msgstr ""
13686
13687 #. type: Plain text
13688 #: build/C/man7/symlink.7:349
13689 msgid ""
13690 "Certain conventions are (should be) followed as consistently as possible by "
13691 "commands that perform file tree walks:"
13692 msgstr ""
13693
13694 #. type: Plain text
13695 #: build/C/man7/symlink.7:362
13696 msgid ""
13697 "A command can be made to follow any symbolic links named on the command "
13698 "line, regardless of the type of file they reference, by specifying the I<-H> "
13699 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13700 "name space look like the logical name space.  (Note, for commands that do "
13701 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13702 "R> flag is not also specified.)"
13703 msgstr ""
13704
13705 #. type: Plain text
13706 #: build/C/man7/symlink.7:378
13707 msgid ""
13708 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13709 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13710 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13711 "symbolic links specified on the command line to be dereferenced for the "
13712 "purposes of both the action to be performed and the tree walk, and it is as "
13713 "if the user had specified the name of the file to which the symbolic link "
13714 "pointed."
13715 msgstr ""
13716
13717 #. type: Plain text
13718 #: build/C/man7/symlink.7:392
13719 msgid ""
13720 "A command can be made to follow any symbolic links named on the command "
13721 "line, as well as any symbolic links encountered during the traversal, "
13722 "regardless of the type of file they reference, by specifying the I<-L> (for "
13723 "\"logical\") flag.  This flag is intended to make the entire name space look "
13724 "like the logical name space.  (Note, for commands that do not always do file "
13725 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13726 "also specified.)"
13727 msgstr ""
13728
13729 #. type: Plain text
13730 #: build/C/man7/symlink.7:407
13731 msgid ""
13732 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13733 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13734 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13735 "references.  In addition, if any symbolic links are encountered in any file "
13736 "tree that B<chown> traverses, they will be treated in the same fashion as "
13737 "I<slink>."
13738 msgstr ""
13739
13740 #. type: Plain text
13741 #: build/C/man7/symlink.7:414
13742 msgid ""
13743 "A command can be made to provide the default behavior by specifying the I<-"
13744 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13745 "space look like the physical name space."
13746 msgstr ""
13747
13748 #. type: Plain text
13749 #: build/C/man7/symlink.7:432
13750 msgid ""
13751 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13752 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13753 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13754 "once; the last one specified determines the command's behavior.  This is "
13755 "intended to permit you to alias commands to behave one way or the other, and "
13756 "then override that behavior on the command line."
13757 msgstr ""
13758
13759 #. type: Plain text
13760 #: build/C/man7/symlink.7:438
13761 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13762 msgstr ""
13763
13764 #. type: Plain text
13765 #: build/C/man7/symlink.7:451
13766 msgid ""
13767 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13768 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13769 "command does not support the I<-H>, I<-L>, or I<-P> options."
13770 msgstr ""
13771
13772 #. type: Plain text
13773 #: build/C/man7/symlink.7:471
13774 msgid ""
13775 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13776 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13777 "options, B<ls>(1)  will follow symbolic links specified on the command "
13778 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13779 "regardless of their type, whether specified on the command line or "
13780 "encountered in the tree walk."
13781 msgstr ""
13782
13783 #. type: Plain text
13784 #: build/C/man7/symlink.7:489
13785 msgid ""
13786 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13787 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13788 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13789 "B<path_resolution>(7)"
13790 msgstr ""
13791 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13792 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13793 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13794 "B<lutimes>(3), B<path_resolution>(7)"
13795
13796 #. type: TH
13797 #: build/C/man3/tempnam.3:25
13798 #, no-wrap
13799 msgid "TEMPNAM"
13800 msgstr "TEMPNAM"
13801
13802 #. type: Plain text
13803 #: build/C/man3/tempnam.3:28
13804 msgid "tempnam - create a name for a temporary file"
13805 msgstr "tempnam - テンポラリファイルの名前を作成する"
13806
13807 #. type: Plain text
13808 #: build/C/man3/tempnam.3:33
13809 #, no-wrap
13810 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13811 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13812
13813 #. type: Plain text
13814 #: build/C/man3/tempnam.3:42
13815 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13816 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13817
13818 #. type: Plain text
13819 #: build/C/man3/tempnam.3:56
13820 msgid ""
13821 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13822 "filename, and such that a file with this name did not exist when B<tempnam>"
13823 "()  checked.  The filename suffix of the pathname generated will start with "
13824 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13825 "directory prefix part of the pathname generated is required to be "
13826 "\"appropriate\" (often that at least implies writable)."
13827 msgstr ""
13828 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13829 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13830 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13831 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13832 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13833 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13834
13835 #. type: Plain text
13836 #: build/C/man3/tempnam.3:59
13837 msgid ""
13838 "Attempts to find an appropriate directory go through the following steps:"
13839 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13840
13841 #. type: TP
13842 #: build/C/man3/tempnam.3:59
13843 #, no-wrap
13844 msgid "a)"
13845 msgstr "a)"
13846
13847 #. type: Plain text
13848 #: build/C/man3/tempnam.3:65
13849 msgid ""
13850 "In case the environment variable B<TMPDIR> exists and contains the name of "
13851 "an appropriate directory, that is used."
13852 msgstr ""
13853 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13854 "ら、それを用いる。"
13855
13856 #. type: TP
13857 #: build/C/man3/tempnam.3:65
13858 #, no-wrap
13859 msgid "b)"
13860 msgstr "b)"
13861
13862 #. type: Plain text
13863 #: build/C/man3/tempnam.3:70
13864 msgid ""
13865 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13866 msgstr ""
13867 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13868 "る。"
13869
13870 #. type: TP
13871 #: build/C/man3/tempnam.3:70
13872 #, no-wrap
13873 msgid "c)"
13874 msgstr "c)"
13875
13876 #. type: Plain text
13877 #: build/C/man3/tempnam.3:77
13878 msgid ""
13879 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13880 "appropriate."
13881 msgstr ""
13882 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13883 "なら、それを用いる。"
13884
13885 #. type: TP
13886 #: build/C/man3/tempnam.3:77
13887 #, no-wrap
13888 msgid "d)"
13889 msgstr "d)"
13890
13891 #. type: Plain text
13892 #: build/C/man3/tempnam.3:80
13893 msgid "Finally an implementation-defined directory may be used."
13894 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13895
13896 #. type: Plain text
13897 #: build/C/man3/tempnam.3:87
13898 msgid ""
13899 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13900 "hence should be freed by B<free>(3)."
13901 msgstr ""
13902 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13903 "B<free>(3)  で解放すべきである。"
13904
13905 #. type: Plain text
13906 #: build/C/man3/tempnam.3:94
13907 msgid ""
13908 "On succes, the B<tempnam>()  function returns a pointer to a unique "
13909 "temporary filename.  It returns NULL if a unique name cannot be generated, "
13910 "with I<errno> set to indicate the cause of the error."
13911 msgstr ""
13912 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返"
13913 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
13914 "値を設定する。"
13915
13916 #. type: Plain text
13917 #: build/C/man3/tempnam.3:98
13918 msgid "Allocation of storage failed."
13919 msgstr "保存領域の割り当てに失敗した。"
13920
13921 #. type: Plain text
13922 #: build/C/man3/tempnam.3:103
13923 msgid ""
13924 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13925 msgstr ""
13926 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13927 "る。"
13928
13929 #. type: Plain text
13930 #: build/C/man3/tempnam.3:122
13931 msgid ""
13932 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13933 "nevertheless possible that between the time that B<tempnam>()  returns a "
13934 "pathname, and the time that the program opens it, another program might "
13935 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13936 "This can lead to security holes.  To avoid such possibilities, use the "
13937 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13938 "B<mkstemp>(3)  or B<tmpfile>(3)."
13939 msgstr ""
13940 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13941 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13942 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13943 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13944 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13945 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13946 "B<tmpfile>(3)  を使うことである。"
13947
13948 #. type: Plain text
13949 #: build/C/man3/tempnam.3:130
13950 msgid ""
13951 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13952 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13953 "tmp> (and this is what glibc does)."
13954 msgstr ""
13955 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13956 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13957 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13958
13959 #. type: Plain text
13960 #: build/C/man3/tempnam.3:135
13961 msgid ""
13962 "Because it dynamically allocates memory used to return the pathname, "
13963 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13964 msgstr ""
13965 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13966 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13967
13968 #. type: Plain text
13969 #: build/C/man3/tempnam.3:148
13970 msgid ""
13971 "The B<tempnam>()  function generates a different string each time it is "
13972 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13973 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13974 msgstr ""
13975 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13976 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13977 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13978
13979 #. type: Plain text
13980 #: build/C/man3/tempnam.3:152
13981 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13982 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13983
13984 #. type: Plain text
13985 #: build/C/man3/tempnam.3:158
13986 msgid ""
13987 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13988 "upon failure to find a unique name."
13989 msgstr ""
13990 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13991 "ラー B<EEXIST> で失敗する。"
13992
13993 #. type: Plain text
13994 #: build/C/man3/tempnam.3:161
13995 msgid ""
13996 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13997 "accessibility of a directory is determined."
13998 msgstr ""
13999 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
14000 "度のアクセス権限が必要なのかは指定されていない。"
14001
14002 #. type: Plain text
14003 #: build/C/man3/tempnam.3:168 build/C/man3/tmpnam.3:163
14004 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
14005 msgstr ""
14006 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
14007 "を使うこと。"
14008
14009 #. type: Plain text
14010 #: build/C/man3/tempnam.3:173
14011 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
14012 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
14013
14014 #. type: TH
14015 #: build/C/man3/tmpfile.3:31
14016 #, no-wrap
14017 msgid "TMPFILE"
14018 msgstr "TMPFILE"
14019
14020 #. type: Plain text
14021 #: build/C/man3/tmpfile.3:34
14022 msgid "tmpfile - create a temporary file"
14023 msgstr "tmpfile - テンポラリファイルを作成する"
14024
14025 #. type: Plain text
14026 #: build/C/man3/tmpfile.3:39
14027 #, no-wrap
14028 msgid "B<FILE *tmpfile(void);>\n"
14029 msgstr "B<FILE *tmpfile(void);>\n"
14030
14031 #. type: Plain text
14032 #: build/C/man3/tmpfile.3:47
14033 msgid ""
14034 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
14035 "write (w+b) mode.  The file will be automatically deleted when it is closed "
14036 "or the program terminates."
14037 msgstr ""
14038 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
14039 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
14040 "自動的に削除される。"
14041
14042 #. type: Plain text
14043 #: build/C/man3/tmpfile.3:56
14044 msgid ""
14045 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
14046 "filename cannot be generated or the unique file cannot be opened.  In the "
14047 "latter case, I<errno> is set to indicate the error."
14048 msgstr ""
14049 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
14050 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
14051 "I<errno> を設定する。"
14052
14053 #. type: Plain text
14054 #: build/C/man3/tmpfile.3:60
14055 msgid "Search permission denied for directory in file's path prefix."
14056 msgstr ""
14057 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
14058
14059 #. type: Plain text
14060 #: build/C/man3/tmpfile.3:63
14061 msgid "Unable to generate a unique filename."
14062 msgstr "ユニークなファイル名が作成できなかった。"
14063
14064 #. type: Plain text
14065 #: build/C/man3/tmpfile.3:66
14066 msgid "The call was interrupted by a signal."
14067 msgstr "呼び出しがシグナルによって中断された。"
14068
14069 #. type: Plain text
14070 #: build/C/man3/tmpfile.3:69
14071 msgid "Too many file descriptors in use by the process."
14072 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
14073
14074 #. type: Plain text
14075 #: build/C/man3/tmpfile.3:72
14076 msgid "Too many files open in the system."
14077 msgstr "システム全体でオープン可能なファイル数を超過した。"
14078
14079 #. type: Plain text
14080 #: build/C/man3/tmpfile.3:75
14081 msgid "There was no room in the directory to add the new filename."
14082 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
14083
14084 #. type: Plain text
14085 #: build/C/man3/tmpfile.3:78
14086 msgid "Read-only file system."
14087 msgstr "読みだし専用ファイルシステムである。"
14088
14089 #. type: Plain text
14090 #: build/C/man3/tmpfile.3:80
14091 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14092 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14093
14094 #. type: Plain text
14095 #: build/C/man3/tmpfile.3:86
14096 msgid ""
14097 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
14098 "stream cannot be opened."
14099 msgstr ""
14100 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
14101 "メッセージが書き出される、と規定されている。"
14102
14103 #. type: Plain text
14104 #: build/C/man3/tmpfile.3:97
14105 msgid ""
14106 "The standard does not specify the directory that B<tmpfile>()  will use.  "
14107 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
14108 "and if that fails the directory I</tmp>."
14109 msgstr ""
14110 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
14111 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
14112 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
14113
14114 #. type: Plain text
14115 #: build/C/man3/tmpfile.3:103
14116 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14117 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14118
14119 #. type: TH
14120 #: build/C/man3/tmpnam.3:27
14121 #, no-wrap
14122 msgid "TMPNAM"
14123 msgstr "TMPNAM"
14124
14125 #. type: Plain text
14126 #: build/C/man3/tmpnam.3:30
14127 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
14128 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
14129
14130 #. type: Plain text
14131 #: build/C/man3/tmpnam.3:35
14132 #, no-wrap
14133 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
14134 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
14135
14136 #. type: Plain text
14137 #: build/C/man3/tmpnam.3:58
14138 msgid ""
14139 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
14140 "filename, and such that a file with this name did not exist at some point in "
14141 "time, so that naive programmers may think it a suitable name for a temporary "
14142 "file.  If the argument I<s> is NULL this name is generated in an internal "
14143 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
14144 "I<s> is not NULL, the name is copied to the character array (of length at "
14145 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
14146 "case of success."
14147 msgstr ""
14148 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
14149 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
14150 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
14151 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
14152 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
14153 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
14154 "ピーされ、 成功した場合は I<s> が返される。"
14155
14156 #. type: Plain text
14157 #: build/C/man3/tmpnam.3:70
14158 msgid ""
14159 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
14160 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
14161 "the B<TMP_MAX> mentioned below.)"
14162 msgstr ""
14163 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
14164 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
14165 "hE<gt>> で定義されている。)"
14166
14167 #. type: Plain text
14168 #: build/C/man3/tmpnam.3:75
14169 msgid ""
14170 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
14171 "or NULL if a unique name cannot be generated."
14172 msgstr ""
14173 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
14174 "が作成できなかった場合は NULL を返す。"
14175
14176 #. type: Plain text
14177 #: build/C/man3/tmpnam.3:77
14178 msgid "No errors are defined."
14179 msgstr "エラーは定義されていない。"
14180
14181 #. type: Plain text
14182 #: build/C/man3/tmpnam.3:83
14183 msgid ""
14184 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
14185 "safe if called with a NULL parameter."
14186 msgstr ""
14187 "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
14188 "れた場合はスレッドセーフではない。"
14189
14190 #. type: Plain text
14191 #: build/C/man3/tmpnam.3:87
14192 msgid "The B<tmpnam_r>()  function is thread-safe."
14193 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
14194
14195 #. type: Plain text
14196 #: build/C/man3/tmpnam.3:92
14197 msgid ""
14198 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
14199 "obsolete."
14200 msgstr ""
14201 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
14202 "定としている。"
14203
14204 #. type: Plain text
14205 #: build/C/man3/tmpnam.3:103
14206 msgid ""
14207 "The B<tmpnam>()  function generates a different string each time it is "
14208 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
14209 "the behavior is implementation defined."
14210 msgstr ""
14211 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
14212 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
14213
14214 #. type: Plain text
14215 #: build/C/man3/tmpnam.3:122
14216 msgid ""
14217 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
14218 "nevertheless possible that between the time that B<tmpnam>()  returns a "
14219 "pathname, and the time that the program opens it, another program might "
14220 "create that pathname using B<open>(2), or create it as a symbolic link.  "
14221 "This can lead to security holes.  To avoid such possibilities, use the "
14222 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
14223 "B<mkstemp>(3)  or B<tmpfile>(3)."
14224 msgstr ""
14225 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
14226 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
14227 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
14228 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
14229 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
14230 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
14231 "B<tmpfile>(3)  を使うことである。"
14232
14233 #. type: Plain text
14234 #: build/C/man3/tmpnam.3:130
14235 msgid ""
14236 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
14237 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
14238 "defined."
14239 msgstr ""
14240 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
14241 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
14242 "NULL 引き数で呼び出してはならない。"
14243
14244 #. type: Plain text
14245 #: build/C/man3/tmpnam.3:134
14246 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
14247 msgstr ""
14248 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
14249 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
14250 "扱いしている。"
14251
14252 #. type: Plain text
14253 #: build/C/man3/tmpnam.3:142
14254 #, no-wrap
14255 msgid ""
14256 "char *\n"
14257 "tmpnam_r(char *s)\n"
14258 "{\n"
14259 "    return s ? tmpnam(s) : NULL;\n"
14260 "}\n"
14261 msgstr ""
14262 "char *\n"
14263 "tmpnam_r(char *s)\n"
14264 "{\n"
14265 "    return s ? tmpnam(s) : NULL;\n"
14266 "}\n"
14267
14268 #. type: Plain text
14269 #: build/C/man3/tmpnam.3:156
14270 msgid ""
14271 "apparently as a warning not to use NULL.  A few systems implement it.  To "
14272 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
14273 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
14274 msgstr ""
14275 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
14276 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
14277 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
14278 "がある。"
14279
14280 #. type: Plain text
14281 #: build/C/man3/tmpnam.3:168
14282 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14283 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14284
14285 #. type: TH
14286 #: build/C/man2/unlink.2:32
14287 #, no-wrap
14288 msgid "UNLINK"
14289 msgstr "UNLINK"
14290
14291 #. type: TH
14292 #: build/C/man2/unlink.2:32
14293 #, no-wrap
14294 msgid "2011-09-15"
14295 msgstr "2011-09-15"
14296
14297 #. type: Plain text
14298 #: build/C/man2/unlink.2:35
14299 msgid "unlink - delete a name and possibly the file it refers to"
14300 msgstr ""
14301 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
14302
14303 #. type: Plain text
14304 #: build/C/man2/unlink.2:39
14305 msgid "B<int unlink(const char *>I<pathname>B<);>"
14306 msgstr "B<int unlink(const char *>I<pathname>B<);>"
14307
14308 #. type: Plain text
14309 #: build/C/man2/unlink.2:45
14310 msgid ""
14311 "B<unlink>()  deletes a name from the file system.  If that name was the last "
14312 "link to a file and no processes have the file open the file is deleted and "
14313 "the space it was using is made available for reuse."
14314 msgstr ""
14315 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
14316 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
14317 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
14318 "は再利用が可能になる。"
14319
14320 #. type: Plain text
14321 #: build/C/man2/unlink.2:49
14322 msgid ""
14323 "If the name was the last link to a file but any processes still have the "
14324 "file open the file will remain in existence until the last file descriptor "
14325 "referring to it is closed."
14326 msgstr ""
14327 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
14328 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
14329 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
14330 "ける。"
14331
14332 #. type: Plain text
14333 #: build/C/man2/unlink.2:51
14334 msgid "If the name referred to a symbolic link the link is removed."
14335 msgstr ""
14336 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
14337 "削除される。"
14338
14339 #. type: Plain text
14340 #: build/C/man2/unlink.2:55
14341 msgid ""
14342 "If the name referred to a socket, fifo or device the name for it is removed "
14343 "but processes which have the object open may continue to use it."
14344 msgstr ""
14345 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
14346 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
14347 "とができる。"
14348
14349 #. type: Plain text
14350 #: build/C/man2/unlink.2:71
14351 msgid ""
14352 "Write access to the directory containing I<pathname> is not allowed for the "
14353 "process's effective UID, or one of the directories in I<pathname> did not "
14354 "allow search permission.  (See also B<path_resolution>(7).)"
14355 msgstr ""
14356 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
14357 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
14358 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
14359 "と)。"
14360
14361 #. type: Plain text
14362 #: build/C/man2/unlink.2:80
14363 msgid ""
14364 "The file I<pathname> cannot be unlinked because it is being used by the "
14365 "system or another process; for example, it is a mount point or the NFS "
14366 "client software created it to represent an active but otherwise nameless "
14367 "inode (\"NFS silly renamed\")."
14368 msgstr ""
14369 "システムか別のプロセスがそのファイルを使用中のため、\n"
14370 "ファイル I<pathname> を unlink できない。\n"
14371 "例えば、そのファイルがマウントポイントの場合や、\n"
14372 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
14373 "名前なし inode (nameless inode) であることを示すために作成した\n"
14374 "場合 (\"NFS silly renamed\") などがある。"
14375
14376 #. type: Plain text
14377 #: build/C/man2/unlink.2:92
14378 msgid ""
14379 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
14380 "Linux since 2.1.132.)"
14381 msgstr ""
14382 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
14383 "で、Linux 2.1.132 以降で返される。)"
14384
14385 #. type: Plain text
14386 #: build/C/man2/unlink.2:96
14387 msgid "Too many symbolic links were encountered in translating I<pathname>."
14388 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
14389
14390 #. type: Plain text
14391 #: build/C/man2/unlink.2:106
14392 msgid ""
14393 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14394 "I<pathname> is empty."
14395 msgstr ""
14396 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
14397 "I<pathname> が空である。"
14398
14399 #. type: Plain text
14400 #: build/C/man2/unlink.2:114
14401 msgid ""
14402 "A component used as a directory in I<pathname> is not, in fact, a directory."
14403 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14404
14405 #. type: Plain text
14406 #: build/C/man2/unlink.2:123
14407 msgid ""
14408 "The system does not allow unlinking of directories, or unlinking of "
14409 "directories requires privileges that the calling process doesn't have.  "
14410 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14411 "B<EISDIR> for this case.)"
14412 msgstr ""
14413 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14414 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14415 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14416 "合には Linux は B<EISDIR> を返す。)"
14417
14418 #. type: TP
14419 #: build/C/man2/unlink.2:123
14420 #, no-wrap
14421 msgid "B<EPERM> (Linux only)"
14422 msgstr "B<EPERM> (Linux のみ)"
14423
14424 #. type: Plain text
14425 #: build/C/man2/unlink.2:126
14426 msgid "The file system does not allow unlinking of files."
14427 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14428
14429 #. type: Plain text
14430 #: build/C/man2/unlink.2:137
14431 msgid ""
14432 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14433 "and the process's effective UID is neither the UID of the file to be deleted "
14434 "nor that of the directory containing it, and the process is not privileged "
14435 "(Linux: does not have the B<CAP_FOWNER> capability)."
14436 msgstr ""
14437 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14438 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14439 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14440 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14441
14442 #. type: Plain text
14443 #: build/C/man2/unlink.2:141
14444 msgid "I<pathname> refers to a file on a read-only file system."
14445 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14446
14447 #. type: Plain text
14448 #: build/C/man2/unlink.2:161
14449 msgid ""
14450 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14451 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14452 "(7), B<symlink>(7)"
14453 msgstr ""
14454 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14455 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14456 "(7), B<symlink>(7)"
14457
14458 #. type: TH
14459 #: build/C/man3/unlocked_stdio.3:25
14460 #, no-wrap
14461 msgid "UNLOCKED_STDIO"
14462 msgstr "UNLOCKED_STDIO"
14463
14464 #. type: TH
14465 #: build/C/man3/unlocked_stdio.3:25
14466 #, no-wrap
14467 msgid "2008-08-29"
14468 msgstr "2008-08-29"
14469
14470 #. type: Plain text
14471 #: build/C/man3/unlocked_stdio.3:29
14472 msgid ""
14473 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14474 "nonlocking stdio functions"
14475 msgstr ""
14476 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14477 "わずに標準入出力を行う関数群"
14478
14479 #. type: Plain text
14480 #: build/C/man3/unlocked_stdio.3:37
14481 #, no-wrap
14482 msgid ""
14483 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14484 "B<int getchar_unlocked(void);>\n"
14485 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14486 "B<int putchar_unlocked(int >I<c>B<);>\n"
14487 msgstr ""
14488 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14489 "B<int getchar_unlocked(void);>\n"
14490 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14491 "B<int putchar_unlocked(int >I<c>B<);>\n"
14492
14493 #. type: Plain text
14494 #: build/C/man3/unlocked_stdio.3:49
14495 #, no-wrap
14496 msgid ""
14497 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14498 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14499 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14500 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14501 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14502 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14503 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14504 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14505 "B<                      FILE *>I<stream>B<);>\n"
14506 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14507 "B<                      FILE *>I<stream>B<);>\n"
14508 msgstr ""
14509 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14510 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14511 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14512 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14513 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14514 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14515 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14516 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14517 "B<                      FILE *>I<stream>B<);>\n"
14518 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14519 "B<                      FILE *>I<stream>B<);>\n"
14520
14521 #. type: Plain text
14522 #: build/C/man3/unlocked_stdio.3:52
14523 #, no-wrap
14524 msgid ""
14525 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14526 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14527 msgstr ""
14528 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14529 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14530
14531 #. type: Plain text
14532 #: build/C/man3/unlocked_stdio.3:63
14533 #, no-wrap
14534 msgid ""
14535 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14536 "B<wint_t getwchar_unlocked(void);>\n"
14537 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14538 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14539 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14540 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14541 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14542 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14543 msgstr ""
14544 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14545 "B<wint_t getwchar_unlocked(void);>\n"
14546 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14547 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14548 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14549 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14550 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14551 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14552
14553 #. type: Plain text
14554 #: build/C/man3/unlocked_stdio.3:75
14555 msgid ""
14556 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14557 "B<putchar_unlocked>():"
14558 msgstr ""
14559 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14560 "B<putchar_unlocked>():"
14561
14562 #. type: Plain text
14563 #: build/C/man3/unlocked_stdio.3:78
14564 msgid ""
14565 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14566 "_BSD_SOURCE || _SVID_SOURCE"
14567 msgstr ""
14568 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14569 "_BSD_SOURCE || _SVID_SOURCE"
14570
14571 #. type: Plain text
14572 #: build/C/man3/unlocked_stdio.3:89
14573 msgid ""
14574 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14575 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14576 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14577 msgstr ""
14578 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14579 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14580 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14581
14582 #. type: Plain text
14583 #: build/C/man3/unlocked_stdio.3:91
14584 msgid "_BSD_SOURCE || _SVID_SOURCE"
14585 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14586
14587 #. type: Plain text
14588 #: build/C/man3/unlocked_stdio.3:102
14589 msgid ""
14590 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14591 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14592 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14593 msgstr ""
14594 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14595 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14596 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14597
14598 #. type: Plain text
14599 #: build/C/man3/unlocked_stdio.3:113
14600 msgid ""
14601 "Each of these functions has the same behavior as its counterpart without the "
14602 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14603 "locks themselves, and do not test for the presence of locks set by others) "
14604 "and hence are thread-unsafe.  See B<flockfile>(3)."
14605 msgstr ""
14606 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14607 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14608 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14609 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14610 "B<flockfile>(3)  を参照のこと。"
14611
14612 #. type: Plain text
14613 #: build/C/man3/unlocked_stdio.3:120
14614 msgid ""
14615 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14616 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14617 msgstr ""
14618 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14619 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14620
14621 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14622 #.  moved to a compatibility library.
14623 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14624 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14625 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14626 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14627 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14628 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14629 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14630 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14631 #.  ungetc_unlocked, ungetwc_unlocked.
14632 #. type: Plain text
14633 #: build/C/man3/unlocked_stdio.3:136
14634 msgid ""
14635 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14636 "are available in recent glibc.  They should probably not be used."
14637 msgstr ""
14638 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14639 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14640
14641 #. type: Plain text
14642 #: build/C/man3/unlocked_stdio.3:139
14643 msgid "B<flockfile>(3), B<stdio>(3)"
14644 msgstr "B<flockfile>(3), B<stdio>(3)"
14645
14646 #. type: TH
14647 #: build/C/man3/wprintf.3:16
14648 #, no-wrap
14649 msgid "WPRINTF"
14650 msgstr "WPRINTF"
14651
14652 #. type: TH
14653 #: build/C/man3/wprintf.3:16
14654 #, no-wrap
14655 msgid "2011-09-17"
14656 msgstr "2011-09-17"
14657
14658 #. type: Plain text
14659 #: build/C/man3/wprintf.3:20
14660 msgid ""
14661 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14662 "character output conversion"
14663 msgstr ""
14664 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14665 "フォーマットして出力する"
14666
14667 #. type: Plain text
14668 #: build/C/man3/wprintf.3:24
14669 #, no-wrap
14670 msgid ""
14671 "B<#include E<lt>stdio.hE<gt>>\n"
14672 "B<#include E<lt>wchar.hE<gt>>\n"
14673 msgstr ""
14674 "B<#include E<lt>stdio.hE<gt>>\n"
14675 "B<#include E<lt>wchar.hE<gt>>\n"
14676
14677 #. type: Plain text
14678 #: build/C/man3/wprintf.3:29
14679 #, no-wrap
14680 msgid ""
14681 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14682 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14683 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14684 "B<             const wchar_t *>I<format>B<, ...);>\n"
14685 msgstr ""
14686 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14687 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14688 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14689 "B<             const wchar_t *>I<format>B<, ...);>\n"
14690
14691 #. type: Plain text
14692 #: build/C/man3/wprintf.3:34
14693 #, no-wrap
14694 msgid ""
14695 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14696 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14697 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14698 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14699 msgstr ""
14700 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14701 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14702 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14703 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14704
14705 #.  .BR wprintf (),
14706 #.  .BR fwprintf (),
14707 #.  .BR swprintf (),
14708 #.  .BR vwprintf (),
14709 #.  .BR vfwprintf (),
14710 #.  .BR vswprintf ():
14711 #. type: Plain text
14712 #: build/C/man3/wprintf.3:51
14713 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14714 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14715
14716 #. type: Plain text
14717 #: build/C/man3/wprintf.3:53
14718 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14719 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14720
14721 #. type: Plain text
14722 #: build/C/man3/wprintf.3:55
14723 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14724 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14725
14726 #. type: Plain text
14727 #: build/C/man3/wprintf.3:58
14728 msgid "or I<cc\\ -std=c99>"
14729 msgstr "or I<cc\\ -std=c99>"
14730
14731 #. type: Plain text
14732 #: build/C/man3/wprintf.3:69
14733 msgid ""
14734 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14735 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14736 "characters."
14737 msgstr ""
14738 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14739 "版である。これらはワイド文字をフォーマットして出力する。"
14740
14741 #. type: Plain text
14742 #: build/C/man3/wprintf.3:81
14743 msgid ""
14744 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14745 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14746 "more information."
14747 msgstr ""
14748 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14749 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14750 "ること。"
14751
14752 #. type: Plain text
14753 #: build/C/man3/wprintf.3:93
14754 msgid ""
14755 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14756 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14757 "for more information."
14758 msgstr ""
14759 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14760 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14761 "B<fwide>(3)  を参照すること。"
14762
14763 #. type: Plain text
14764 #: build/C/man3/wprintf.3:107
14765 msgid ""
14766 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14767 "output to an array of wide characters.  The programmer must ensure that "
14768 "there is room for at least I<maxlen> wide characters at I<wcs>."
14769 msgstr ""
14770 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14771 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14772 "空きがあることを保証しなければ ならない。"
14773
14774 #. type: Plain text
14775 #: build/C/man3/wprintf.3:118
14776 msgid ""
14777 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14778 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14779 "following differences:"
14780 msgstr ""
14781 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14782 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14783
14784 #. type: TP
14785 #: build/C/man3/wprintf.3:118 build/C/man3/wprintf.3:123
14786 #: build/C/man3/wprintf.3:126
14787 #, no-wrap
14788 msgid "B<\\(bu>"
14789 msgstr "B<\\(bu>"
14790
14791 #. type: Plain text
14792 #: build/C/man3/wprintf.3:123
14793 msgid "The I<format> string is a wide-character string."
14794 msgstr "I<format> がワイド文字列で与えられる。"
14795
14796 #. type: Plain text
14797 #: build/C/man3/wprintf.3:126
14798 msgid "The output consists of wide characters, not bytes."
14799 msgstr "出力がバイトではなくワイド文字で構成される。"
14800
14801 #. type: Plain text
14802 #: build/C/man3/wprintf.3:145
14803 msgid ""
14804 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14805 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14806 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14807 "overflow on Linux.)"
14808 msgstr ""
14809 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14810 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14811 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14812 "も -1 を返さない)。"
14813
14814 #. type: Plain text
14815 #: build/C/man3/wprintf.3:151
14816 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14817 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14818
14819 #. type: Plain text
14820 #: build/C/man3/wprintf.3:165
14821 msgid ""
14822 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14823 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14824 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14825 "character) argument is written."
14826 msgstr ""
14827 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14828 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14829 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14830
14831 #. type: Plain text
14832 #: build/C/man3/wprintf.3:205
14833 msgid ""
14834 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14835 "to be a pointer to an array of character type (pointer to a string) "
14836 "containing a multibyte character sequence beginning in the initial shift "
14837 "state.  Characters from the array are converted to wide characters (each by "
14838 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14839 "the initial state before the first byte).  The resulting wide characters are "
14840 "written up to (but not including) the terminating null wide character (L\\(aq"
14841 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
14842 "number specified are written.  Note that the precision determines the number "
14843 "of I<wide characters> written, not the number of I<bytes> or I<screen "
14844 "positions>.  The array must contain a terminating null byte (\\(aq"
14845 "\\e0\\(aq), unless a precision is given and it is so small that the number "
14846 "of converted wide characters reaches it before the end of the array is "
14847 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
14848 "argument is expected to be a pointer to an array of wide characters.  Wide "
14849 "characters from the array are written up to (but not including) a "
14850 "terminating null wide character.  If a precision is specified, no more than "
14851 "the number specified are written.  The array must contain a terminating null "
14852 "wide character, unless a precision is given and it is smaller than or equal "
14853 "to the number of wide characters in the array."
14854 msgstr ""
14855 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14856 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14857 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14858 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14859 "字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度"
14860 "(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれな"
14861 "い。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字"
14862 "> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
14863 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
14864 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
14865 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
14866 "引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端の"
14867 "ナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精"
14868 "度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含"
14869 "む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さ"
14870 "くな ければならない。"
14871
14872 #. type: Plain text
14873 #: build/C/man3/wprintf.3:213
14874 msgid ""
14875 "The functions return the number of wide characters written, excluding the "
14876 "terminating null wide character in case of the functions B<swprintf>()  and "
14877 "B<vswprintf>().  They return -1 when an error occurs."
14878 msgstr ""
14879 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14880 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14881 "場合は -1 を返す。"
14882
14883 #. type: Plain text
14884 #: build/C/man3/wprintf.3:215
14885 msgid "C99."
14886 msgstr "C99."
14887
14888 #. type: Plain text
14889 #: build/C/man3/wprintf.3:223
14890 msgid ""
14891 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14892 "the current locale."
14893 msgstr ""
14894 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14895
14896 #. type: Plain text
14897 #: build/C/man3/wprintf.3:253
14898 msgid ""
14899 "If the I<format> string contains non-ASCII wide characters, the program will "
14900 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
14901 "time is the same as the B<LC_CTYPE> category of the current locale at "
14902 "compile time.  This is because the I<wchar_t> representation is platform- "
14903 "and locale-dependent.  (The glibc represents wide characters using their "
14904 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14905 "the use of C99 universal character names of the form \\eunnnn does not solve "
14906 "this problem.)  Therefore, in internationalized programs, the I<format> "
14907 "string should consist of ASCII wide characters only, or should be "
14908 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14909 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14910 msgstr ""
14911 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14912 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14913 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14914 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14915 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14916 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14917 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14918 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14919 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14920
14921 #.  .BR wscanf (3)
14922 #. type: Plain text
14923 #: build/C/man3/wprintf.3:260
14924 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14925 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14926
14927 #. type: TH
14928 #: build/C/man2/write.2:39
14929 #, no-wrap
14930 msgid "WRITE"
14931 msgstr "WRITE"
14932
14933 #. type: Plain text
14934 #: build/C/man2/write.2:42
14935 msgid "write - write to a file descriptor"
14936 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14937
14938 #. type: Plain text
14939 #: build/C/man2/write.2:46
14940 msgid ""
14941 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14942 msgstr ""
14943 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14944
14945 #. type: Plain text
14946 #: build/C/man2/write.2:54
14947 msgid ""
14948 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14949 "the file referred to by the file descriptor I<fd>."
14950 msgstr ""
14951 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14952 "照するファイルへ、最大 I<count> バイトを書き込む。"
14953
14954 #. type: Plain text
14955 #: build/C/man2/write.2:68
14956 msgid ""
14957 "The number of bytes written may be less than I<count> if, for example, there "
14958 "is insufficient space on the underlying physical medium, or the "
14959 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14960 "call was interrupted by a signal handler after having written less than "
14961 "I<count> bytes.  (See also B<pipe>(7).)"
14962 msgstr ""
14963 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14964 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14965 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14966 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14967 "(7)  も参照のこと。)"
14968
14969 #. type: Plain text
14970 #: build/C/man2/write.2:82
14971 msgid ""
14972 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14973 "example, a regular file)  writing takes place at the current file offset, "
14974 "and the file offset is incremented by the number of bytes actually written.  "
14975 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14976 "to the end of the file before writing.  The adjustment of the file offset "
14977 "and the write operation are performed as an atomic step."
14978 msgstr ""
14979 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14980 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14981 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14982 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14983 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14984 "処理として 実行される。"
14985
14986 #. type: Plain text
14987 #: build/C/man2/write.2:89
14988 msgid ""
14989 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14990 "B<write>()  has returned returns the new data.  Note that not all file "
14991 "systems are POSIX conforming."
14992 msgstr ""
14993 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14994 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14995 "ること。"
14996
14997 #. type: Plain text
14998 #: build/C/man2/write.2:94
14999 msgid ""
15000 "On success, the number of bytes written is returned (zero indicates nothing "
15001 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
15002 msgstr ""
15003 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
15004 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
15005
15006 #. type: Plain text
15007 #: build/C/man2/write.2:107
15008 msgid ""
15009 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
15010 "return a failure status if one of the errors below is detected.  If no "
15011 "errors are detected, 0 will be returned without causing any other effect.  "
15012 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
15013 "the results are not specified."
15014 msgstr ""
15015 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
15016 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
15017 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
15018 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
15019 "その結果は規定されていない。"
15020
15021 #. type: Plain text
15022 #: build/C/man2/write.2:115
15023 msgid ""
15024 "The file descriptor I<fd> refers to a file other than a socket and has been "
15025 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
15026 msgstr ""
15027 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
15028 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
15029 "する状況にある。"
15030
15031 #.  Actually EAGAIN on Linux
15032 #. type: Plain text
15033 #: build/C/man2/write.2:126
15034 msgid ""
15035 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
15036 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
15037 "error to be returned for this case, and does not require these constants to "
15038 "have the same value, so a portable application should check for both "
15039 "possibilities."
15040 msgstr ""
15041 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
15042 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
15043 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
15044 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
15045 "プリケーションでは、両方の可能性を 確認すべきである。"
15046
15047 #. type: Plain text
15048 #: build/C/man2/write.2:130
15049 msgid "I<fd> is not a valid file descriptor or is not open for writing."
15050 msgstr ""
15051 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
15052 "されていない。"
15053
15054 #. type: TP
15055 #: build/C/man2/write.2:130
15056 #, no-wrap
15057 msgid "B<EDESTADDRREQ>"
15058 msgstr "B<EDESTADDRREQ>"
15059
15060 #. type: Plain text
15061 #: build/C/man2/write.2:135
15062 msgid ""
15063 "I<fd> refers to a datagram socket for which a peer address has not been set "
15064 "using B<connect>(2)."
15065 msgstr ""
15066 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
15067 "グラムソケットを 参照している。"
15068
15069 #. type: Plain text
15070 #: build/C/man2/write.2:141
15071 msgid ""
15072 "The user's quota of disk blocks on the file system containing the file "
15073 "referred to by I<fd> has been exhausted."
15074 msgstr ""
15075 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
15076 "クォータの上限に達している。"
15077
15078 #. type: Plain text
15079 #: build/C/man2/write.2:150
15080 msgid ""
15081 "An attempt was made to write a file that exceeds the implementation-defined "
15082 "maximum file size or the process's file size limit, or to write at a "
15083 "position past the maximum allowed offset."
15084 msgstr ""
15085 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
15086 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
15087 "書き込もうとした。"
15088
15089 #. type: Plain text
15090 #: build/C/man2/write.2:154
15091 msgid ""
15092 "The call was interrupted by a signal before any data was written; see "
15093 "B<signal>(7)."
15094 msgstr ""
15095 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
15096 "(7)  参照。"
15097
15098 #. type: Plain text
15099 #: build/C/man2/write.2:165
15100 msgid ""
15101 "I<fd> is attached to an object which is unsuitable for writing; or the file "
15102 "was opened with the B<O_DIRECT> flag, and either the address specified in "
15103 "I<buf>, the value specified in I<count>, or the current file offset is not "
15104 "suitably aligned."
15105 msgstr ""
15106 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
15107 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
15108 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
15109 "メントが不適切である。"
15110
15111 #. type: Plain text
15112 #: build/C/man2/write.2:168
15113 msgid "A low-level I/O error occurred while modifying the inode."
15114 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
15115
15116 #. type: Plain text
15117 #: build/C/man2/write.2:173
15118 msgid ""
15119 "The device containing the file referred to by I<fd> has no room for the data."
15120 msgstr ""
15121 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
15122
15123 #. type: TP
15124 #: build/C/man2/write.2:173
15125 #, no-wrap
15126 msgid "B<EPIPE>"
15127 msgstr "B<EPIPE>"
15128
15129 #. type: Plain text
15130 #: build/C/man2/write.2:182
15131 msgid ""
15132 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
15133 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
15134 "(Thus, the write return value is seen only if the program catches, blocks or "
15135 "ignores this signal.)"
15136 msgstr ""
15137 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
15138 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
15139 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
15140 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
15141 "write の返り値を参照できる。)"
15142
15143 #. type: Plain text
15144 #: build/C/man2/write.2:185
15145 msgid "Other errors may occur, depending on the object connected to I<fd>."
15146 msgstr ""
15147 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
15148
15149 #. type: Plain text
15150 #: build/C/man2/write.2:194
15151 msgid ""
15152 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
15153 "just before any data is written."
15154 msgstr ""
15155 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
15156 "で B<EINTR> が返る。"
15157
15158 #. type: Plain text
15159 #: build/C/man2/write.2:203
15160 msgid ""
15161 "A successful return from B<write>()  does not make any guarantee that data "
15162 "has been committed to disk.  In fact, on some buggy implementations, it does "
15163 "not even guarantee that space has successfully been reserved for the data.  "
15164 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
15165 "all your data."
15166 msgstr ""
15167 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
15168 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
15169 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
15170 "write した後に B<fsync>(2)  を呼び出すことである。"
15171
15172 #. type: Plain text
15173 #: build/C/man2/write.2:211
15174 msgid ""
15175 "If a B<write>()  is interrupted by a signal handler before any bytes are "
15176 "written, then the call fails with the error B<EINTR>; if it is interrupted "
15177 "after at least one byte has been written, the call succeeds, and returns the "
15178 "number of bytes written."
15179 msgstr ""
15180 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
15181 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
15182 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
15183
15184 #. type: Plain text
15185 #: build/C/man2/write.2:223
15186 msgid ""
15187 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15188 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15189 msgstr ""
15190 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15191 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15192
15193 #~ msgid "2009-09-06"
15194 #~ msgstr "2009-09-06"
15195
15196 #~ msgid "2011-09-20"
15197 #~ msgstr "2011-09-20"
15198
15199 #~ msgid ""
15200 #~ "Many file systems and disks were considered to be fast enough that the "
15201 #~ "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, "
15202 #~ "B<O_NONBLOCK> may not be available on files and/or disks."
15203 #~ msgstr ""
15204 #~ "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むく"
15205 #~ "らいに十分に高速であると考えられている。 それでそのようなファイルやディス"
15206 #~ "クには B<O_NONBLOCK> は利用できないかもしれない。"
15207
15208 #~ msgid ""
15209 #~ "The I<local_iov> and I<remote_iov> arguments point to an array of "
15210 #~ "I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
15211 #~ msgstr ""
15212 #~ "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
15213 #~ "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
15214 #~ "されている:"
15215
15216 #~ msgid ""
15217 #~ "Buffers are processed in array order.  This means that B<process_vm_readv>"
15218 #~ "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]"
15219 #~ ">, and so on.  Likewise, I<remote_iov[0]> is completely read before "
15220 #~ "proceeding to I<remote_iov[1]>, and so on."
15221 #~ msgstr ""
15222 #~ "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
15223 #~ "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
15224 #~ "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
15225 #~ "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
15226 #~ "以降も同様である。"