OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.50.
[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-03-22 01:07+0900\n"
10 "PO-Revision-Date: 2012-05-30 01:23+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
26 #, no-wrap
27 msgid "2001-12-18"
28 msgstr "2001-12-18"
29
30 #. type: TH
31 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
32 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
33 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
34 #: build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44
35 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
36 #: build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25
37 #: build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26
38 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:52 build/C/man3/wprintf.3:16
39 #, no-wrap
40 msgid "GNU"
41 msgstr "GNU"
42
43 #. type: TH
44 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
45 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
46 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
47 #: build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18
48 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
49 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
50 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
51 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
52 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:27
53 #: build/C/man3/getw.3:25 build/C/man2/link.2:31 build/C/man2/llseek.2:28
54 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:52
55 #: build/C/man3/perror.3:31 build/C/man2/pipe.2:36 build/C/man3/popen.3:40
56 #: build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man2/read.2:35
57 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man3/remove.3:31
58 #: build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52
59 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man3/stdio.3:39
60 #: build/C/man3/stdio_ext.3:25 build/C/man2/symlink.2:32
61 #: build/C/man7/symlink.7:36 build/C/man3/tempnam.3:25
62 #: build/C/man3/tmpfile.3:31 build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:32
63 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
64 #: build/C/man2/write.2:39
65 #, no-wrap
66 msgid "Linux Programmer's Manual"
67 msgstr "Linux Programmer's Manual"
68
69 #. type: SH
70 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
71 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
72 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
73 #: build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19
74 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
75 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
76 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
77 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
78 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28
79 #: build/C/man3/getw.3:26 build/C/man2/link.2:32 build/C/man2/llseek.2:29
80 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:53
81 #: build/C/man3/perror.3:32 build/C/man2/pipe.2:37 build/C/man3/popen.3:41
82 #: build/C/man3/printf.3:35 build/C/man3/puts.3:27 build/C/man2/read.2:36
83 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:32
84 #: build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53
85 #: build/C/man3/setbuf.3:49 build/C/man3/stdin.3:14 build/C/man3/stdio.3:40
86 #: build/C/man3/stdio_ext.3:26 build/C/man2/symlink.2:33
87 #: build/C/man7/symlink.7:37 build/C/man3/tempnam.3:26
88 #: build/C/man3/tmpfile.3:32 build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:33
89 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
90 #: build/C/man2/write.2:40
91 #, no-wrap
92 msgid "NAME"
93 msgstr "名前"
94
95 #. type: Plain text
96 #: build/C/man3/asprintf.3:30
97 msgid "asprintf, vasprintf - print to allocated string"
98 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
99
100 #. type: SH
101 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
102 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
103 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
104 #: build/C/man3/fflush.3:48 build/C/man3/fgetwc.3:21
105 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
106 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
107 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
108 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
109 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:30
110 #: build/C/man3/getw.3:28 build/C/man2/link.2:34 build/C/man2/llseek.2:31
111 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:55
112 #: build/C/man3/perror.3:34 build/C/man2/pipe.2:39 build/C/man3/popen.3:43
113 #: build/C/man3/printf.3:38 build/C/man3/puts.3:29 build/C/man2/read.2:38
114 #: build/C/man2/readlink.2:46 build/C/man2/readv.2:35 build/C/man3/remove.3:34
115 #: build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55
116 #: build/C/man3/setbuf.3:51 build/C/man3/stdin.3:16 build/C/man3/stdio.3:42
117 #: build/C/man3/stdio_ext.3:30 build/C/man2/symlink.2:35
118 #: build/C/man3/tempnam.3:28 build/C/man3/tmpfile.3:34
119 #: build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:35
120 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
121 #: build/C/man2/write.2:42
122 #, no-wrap
123 msgid "SYNOPSIS"
124 msgstr "書式"
125
126 #. type: Plain text
127 #: build/C/man3/asprintf.3:32
128 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
129 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
130
131 #. type: Plain text
132 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
133 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
134 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
135 #: build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:44
136 #: build/C/man3/stdio_ext.3:32
137 msgid "B<#include E<lt>stdio.hE<gt>>"
138 msgstr "B<#include E<lt>stdio.hE<gt>>"
139
140 #. type: Plain text
141 #: build/C/man3/asprintf.3:36
142 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
143 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
144
145 #. type: Plain text
146 #: build/C/man3/asprintf.3:38
147 msgid ""
148 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
149 msgstr ""
150 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
151
152 #. type: SH
153 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
154 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
155 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
156 #: build/C/man3/fflush.3:52 build/C/man3/fgetwc.3:30
157 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
158 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
159 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
160 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
161 #: build/C/man3/fseeko.3:37 build/C/man3/getline.3:58 build/C/man3/gets.3:46
162 #: build/C/man3/getw.3:59 build/C/man2/link.2:38 build/C/man2/llseek.2:43
163 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:66
164 #: build/C/man3/perror.3:55 build/C/man2/pipe.2:51 build/C/man3/popen.3:64
165 #: build/C/man3/printf.3:76 build/C/man3/puts.3:43 build/C/man2/read.2:44
166 #: build/C/man2/readlink.2:63 build/C/man2/readv.2:58 build/C/man3/remove.3:38
167 #: build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87
168 #: build/C/man3/setbuf.3:73 build/C/man3/stdin.3:24 build/C/man3/stdio.3:50
169 #: build/C/man3/stdio_ext.3:54 build/C/man2/symlink.2:52
170 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
171 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:39
172 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:60
173 #: build/C/man2/write.2:46
174 #, no-wrap
175 msgid "DESCRIPTION"
176 msgstr "説明"
177
178 #. type: Plain text
179 #: build/C/man3/asprintf.3:53
180 msgid ""
181 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
182 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
183 "hold the output including the terminating null byte, and return a pointer to "
184 "it via the first argument.  This pointer should be passed to B<free>(3)  to "
185 "release the allocated storage when it is no longer needed."
186 msgstr ""
187 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
188 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端の NULL バイトも含"
189 "めて)  保持するのに十分な大きさのメモリを確保し、 最初の引数にその文字列への"
190 "ポインタを返す。 このポインタは、不要になったら B<free>(3)  に渡し、割り当て"
191 "られた記憶領域を解放すべきである。"
192
193 #. type: SH
194 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
195 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
196 #: build/C/man3/fflush.3:74 build/C/man3/fgetwc.3:55
197 #: build/C/man3/flockfile.3:114 build/C/man3/fmemopen.3:176
198 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
199 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
200 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
201 #: build/C/man3/fseeko.3:65 build/C/man3/getline.3:110 build/C/man3/gets.3:111
202 #: build/C/man3/getw.3:73 build/C/man2/link.2:52 build/C/man2/llseek.2:62
203 #: build/C/man2/lseek.2:153 build/C/man2/open.2:477 build/C/man2/pipe.2:92
204 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
205 #: build/C/man2/readlink.2:77 build/C/man2/readv.2:177
206 #: build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40
207 #: build/C/man3/scanf.3:531 build/C/man3/setbuf.3:152
208 #: build/C/man2/symlink.2:84 build/C/man3/tempnam.3:87
209 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:70 build/C/man2/unlink.2:55
210 #: build/C/man3/wprintf.3:187 build/C/man2/write.2:89
211 #, no-wrap
212 msgid "RETURN VALUE"
213 msgstr "返り値"
214
215 #. type: Plain text
216 #: build/C/man3/asprintf.3:61
217 msgid ""
218 "When successful, these functions return the number of bytes printed, just "
219 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
220 "error occurs, these functions will return -1, and the contents of I<strp> is "
221 "undefined."
222 msgstr ""
223 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
224 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
225 "は -1 を返し、 I<strp> の内容は未定義となる。"
226
227 #. type: SH
228 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:61
229 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
230 #: build/C/man3/fcloseall.3:55 build/C/man3/ferror.3:107
231 #: build/C/man3/fflush.3:93 build/C/man3/fgetwc.3:67
232 #: build/C/man3/flockfile.3:121 build/C/man3/fmemopen.3:195
233 #: build/C/man3/fmtmsg.3:225 build/C/man3/fopen.3:246
234 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
235 #: build/C/man3/fputwc.3:65 build/C/man3/fread.3:103 build/C/man3/fseek.3:168
236 #: build/C/man3/fseeko.3:77 build/C/man3/getline.3:134 build/C/man3/gets.3:138
237 #: build/C/man3/getw.3:80 build/C/man2/link.2:138 build/C/man2/llseek.2:81
238 #: build/C/man2/lseek.2:191 build/C/man2/open.2:629 build/C/man3/perror.3:111
239 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:169 build/C/man3/printf.3:806
240 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:125
241 #: build/C/man2/readv.2:214 build/C/man3/remove.3:70 build/C/man2/rename.2:232
242 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:578 build/C/man3/setbuf.3:164
243 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
244 #: build/C/man2/symlink.2:149 build/C/man3/tempnam.3:96
245 #: build/C/man3/tmpfile.3:76 build/C/man3/tmpnam.3:77
246 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:113
247 #: build/C/man3/wprintf.3:195 build/C/man2/write.2:185
248 #, no-wrap
249 msgid "CONFORMING TO"
250 msgstr "準拠"
251
252 #. type: Plain text
253 #: build/C/man3/asprintf.3:67
254 msgid ""
255 "These functions are GNU extensions, not in C or POSIX.  They are also "
256 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
257 "error."
258 msgstr ""
259 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
260 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
261 "る。"
262
263 #. type: SH
264 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:71
265 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
266 #: build/C/man3/fcloseall.3:57 build/C/man3/ferror.3:114
267 #: build/C/man3/fflush.3:108 build/C/man3/fgetwc.3:84
268 #: build/C/man3/flockfile.3:129 build/C/man3/fmemopen.3:341
269 #: build/C/man3/fmtmsg.3:297 build/C/man3/fopen.3:348
270 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
271 #: build/C/man3/fputwc.3:82 build/C/man3/fread.3:105 build/C/man3/fseek.3:170
272 #: build/C/man3/fseeko.3:83 build/C/man3/getline.3:168 build/C/man3/gets.3:173
273 #: build/C/man3/getw.3:86 build/C/man2/link.2:187 build/C/man2/llseek.2:87
274 #: build/C/man2/lseek.2:236 build/C/man3/lseek64.3:159 build/C/man2/open.2:901
275 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:198
276 #: build/C/man3/printf.3:1080 build/C/man3/puts.3:112 build/C/man2/read.2:187
277 #: build/C/man2/readlink.2:214 build/C/man2/readv.2:284
278 #: build/C/man3/remove.3:81 build/C/man2/rename.2:245 build/C/man2/rmdir.2:132
279 #: build/C/man3/scanf.3:716 build/C/man3/setbuf.3:200 build/C/man3/stdin.3:154
280 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:132
281 #: build/C/man2/symlink.2:164 build/C/man7/symlink.7:471
282 #: build/C/man3/tempnam.3:166 build/C/man3/tmpfile.3:88
283 #: build/C/man3/tmpnam.3:153 build/C/man2/unlink.2:148
284 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:231
285 #: build/C/man2/write.2:211
286 #, no-wrap
287 msgid "SEE ALSO"
288 msgstr "関連項目"
289
290 #. type: Plain text
291 #: build/C/man3/asprintf.3:71
292 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
293 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
294
295 #. type: SH
296 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:73
297 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
298 #: build/C/man3/fcloseall.3:63 build/C/man3/ferror.3:119
299 #: build/C/man3/fflush.3:116 build/C/man3/fgetwc.3:89
300 #: build/C/man3/flockfile.3:131 build/C/man3/fmemopen.3:344
301 #: build/C/man3/fmtmsg.3:300 build/C/man3/fopen.3:354
302 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
303 #: build/C/man3/fputwc.3:86 build/C/man3/fread.3:111 build/C/man3/fseek.3:173
304 #: build/C/man3/fseeko.3:85 build/C/man3/getline.3:175 build/C/man3/gets.3:189
305 #: build/C/man3/getw.3:92 build/C/man2/link.2:197 build/C/man2/llseek.2:90
306 #: build/C/man2/lseek.2:243 build/C/man3/lseek64.3:162 build/C/man2/open.2:923
307 #: build/C/man3/perror.3:144 build/C/man2/pipe.2:197 build/C/man3/popen.3:208
308 #: build/C/man3/printf.3:1089 build/C/man3/puts.3:124 build/C/man2/read.2:200
309 #: build/C/man2/readlink.2:222 build/C/man2/readv.2:288
310 #: build/C/man3/remove.3:92 build/C/man2/rename.2:254 build/C/man2/rmdir.2:141
311 #: build/C/man3/scanf.3:723 build/C/man3/setbuf.3:208 build/C/man3/stdin.3:160
312 #: build/C/man3/stdio.3:257 build/C/man3/stdio_ext.3:135
313 #: build/C/man2/symlink.2:176 build/C/man7/symlink.7:489
314 #: build/C/man3/tempnam.3:171 build/C/man3/tmpfile.3:94
315 #: build/C/man3/tmpnam.3:158 build/C/man2/unlink.2:161
316 #: build/C/man3/unlocked_stdio.3:139 build/C/man3/wprintf.3:238
317 #: build/C/man2/write.2:223
318 #, no-wrap
319 msgid "COLOPHON"
320 msgstr "この文書について"
321
322 #. type: Plain text
323 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:80
324 #: build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115
325 #: build/C/man3/fcloseall.3:70 build/C/man3/ferror.3:126
326 #: build/C/man3/fflush.3:123 build/C/man3/fgetwc.3:96
327 #: build/C/man3/flockfile.3:138 build/C/man3/fmemopen.3:351
328 #: build/C/man3/fmtmsg.3:307 build/C/man3/fopen.3:361
329 #: build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92
330 #: build/C/man3/fputwc.3:93 build/C/man3/fread.3:118 build/C/man3/fseek.3:180
331 #: build/C/man3/fseeko.3:92 build/C/man3/getline.3:182 build/C/man3/gets.3:196
332 #: build/C/man3/getw.3:99 build/C/man2/link.2:204 build/C/man2/llseek.2:97
333 #: build/C/man2/lseek.2:250 build/C/man3/lseek64.3:169 build/C/man2/open.2:930
334 #: build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:215
335 #: build/C/man3/printf.3:1096 build/C/man3/puts.3:131 build/C/man2/read.2:207
336 #: build/C/man2/readlink.2:229 build/C/man2/readv.2:295
337 #: build/C/man3/remove.3:99 build/C/man2/rename.2:261 build/C/man2/rmdir.2:148
338 #: build/C/man3/scanf.3:730 build/C/man3/setbuf.3:215 build/C/man3/stdin.3:167
339 #: build/C/man3/stdio.3:264 build/C/man3/stdio_ext.3:142
340 #: build/C/man2/symlink.2:183 build/C/man7/symlink.7:496
341 #: build/C/man3/tempnam.3:178 build/C/man3/tmpfile.3:101
342 #: build/C/man3/tmpnam.3:165 build/C/man2/unlink.2:168
343 #: build/C/man3/unlocked_stdio.3:146 build/C/man3/wprintf.3:245
344 #: build/C/man2/write.2:230
345 #, fuzzy
346 #| msgid ""
347 #| "This page is part of release 3.41 of the Linux I<man-pages> project.  A "
348 #| "description of the project, and information about reporting bugs, can be "
349 #| "found at http://www.kernel.org/doc/man-pages/."
350 msgid ""
351 "This page is part of release 3.50 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 msgstr ""
355 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.41 の一部\n"
356 "である。プロジェクトの説明とバグ報告に関する情報は\n"
357 "http://www.kernel.org/doc/man-pages/ に書かれている。"
358
359 #. type: TH
360 #: build/C/man3/ctermid.3:26
361 #, no-wrap
362 msgid "CTERMID"
363 msgstr "CTERMID"
364
365 #. type: TH
366 #: build/C/man3/ctermid.3:26
367 #, no-wrap
368 msgid "2007-07-26"
369 msgstr "2007-07-26"
370
371 #. type: Plain text
372 #: build/C/man3/ctermid.3:29
373 msgid "ctermid - get controlling terminal name"
374 msgstr "ctermid - 制御端末名の取得"
375
376 #. type: Plain text
377 #: build/C/man3/ctermid.3:34 build/C/man3/fgetwc.3:24
378 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
379 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
380 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:33
381 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
382 #: build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54 build/C/man3/stdin.3:19
383 #: build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
384 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
385 #, no-wrap
386 msgid "B<#include E<lt>stdio.hE<gt>>\n"
387 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
388
389 #. type: Plain text
390 #: build/C/man3/ctermid.3:36
391 #, no-wrap
392 msgid "B<char *ctermid(char *>I<s>B<);>\n"
393 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
394
395 #. type: Plain text
396 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
397 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
398 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61
399 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man3/perror.3:50
400 #: build/C/man3/popen.3:55 build/C/man3/printf.3:63 build/C/man2/readlink.2:54
401 #: build/C/man2/readv.2:53 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
402 #: build/C/man2/symlink.2:43 build/C/man3/tempnam.3:38
403 #: build/C/man3/unlocked_stdio.3:68 build/C/man3/wprintf.3:39
404 msgid ""
405 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
406 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
407
408 #.  From <unistd.h>: _XOPEN_SOURCE
409 #. type: Plain text
410 #: build/C/man3/ctermid.3:46
411 msgid ""
412 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
413 msgstr ""
414 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
415
416 #. type: Plain text
417 #: build/C/man3/ctermid.3:59
418 msgid ""
419 "B<ctermid>()  returns a string which is the pathname for the current "
420 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
421 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
422 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
423 "the returned pathname."
424 msgstr ""
425 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
426 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
427 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
428 "ス名の最大文字数である。"
429
430 #. type: Plain text
431 #: build/C/man3/ctermid.3:61
432 msgid "The pointer to the pathname."
433 msgstr "パス名へのポインタ。"
434
435 #. type: Plain text
436 #: build/C/man3/ctermid.3:63
437 msgid "Svr4, POSIX.1-2001."
438 msgstr "SVr4, POSIX.1-2001."
439
440 #. type: SH
441 #: build/C/man3/ctermid.3:63 build/C/man3/fmemopen.3:213
442 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82
443 #: build/C/man2/link.2:181 build/C/man2/open.2:890 build/C/man3/popen.3:175
444 #: build/C/man3/printf.3:929 build/C/man3/puts.3:105 build/C/man2/readv.2:258
445 #: build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129
446 #: build/C/man3/scanf.3:647 build/C/man3/setbuf.3:170
447 #: build/C/man3/tempnam.3:156 build/C/man3/tmpnam.3:146
448 #: build/C/man2/unlink.2:145
449 #, no-wrap
450 msgid "BUGS"
451 msgstr "バグ"
452
453 #. type: Plain text
454 #: build/C/man3/ctermid.3:67
455 msgid ""
456 "The path returned may not uniquely identify the controlling terminal; it "
457 "may, for example, be I</dev/tty>."
458 msgstr ""
459 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
460 "ように。"
461
462 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
463 #.  if ctermid() was given an argument; fixed in 2.4.
464 #. type: Plain text
465 #: build/C/man3/ctermid.3:71
466 msgid "It is not assured that the program can open the terminal."
467 msgstr "プログラムが端末をオープンできることは保証されていない。"
468
469 #. type: Plain text
470 #: build/C/man3/ctermid.3:73
471 msgid "B<ttyname>(3)"
472 msgstr "B<ttyname>(3)"
473
474 #. type: TH
475 #: build/C/man3/dprintf.3:26
476 #, no-wrap
477 msgid "DPRINTF"
478 msgstr "DPRINTF"
479
480 #. type: TH
481 #: build/C/man3/dprintf.3:26
482 #, no-wrap
483 msgid "2010-09-15"
484 msgstr "2010-09-15"
485
486 #. type: Plain text
487 #: build/C/man3/dprintf.3:29
488 msgid "dprintf, vdprintf - print to a file descriptor"
489 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
490
491 #. type: Plain text
492 #: build/C/man3/dprintf.3:33
493 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
494 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
495
496 #. type: Plain text
497 #: build/C/man3/dprintf.3:35
498 msgid ""
499 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
500 msgstr ""
501 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
502
503 #. type: Plain text
504 #: build/C/man3/dprintf.3:43
505 msgid "B<dprintf>(), B<vdprintf>():"
506 msgstr "B<dprintf>(), B<vdprintf>():"
507
508 #. type: TP
509 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
510 #: build/C/man3/getline.3:49
511 #, no-wrap
512 msgid "Since glibc 2.10:"
513 msgstr "glibc 2.10 以降:"
514
515 #. type: Plain text
516 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
517 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
518 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
519
520 #. type: TP
521 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
522 #: build/C/man3/getline.3:52
523 #, no-wrap
524 msgid "Before glibc 2.10:"
525 msgstr "glibc 2.10 より前:"
526
527 #. type: Plain text
528 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
529 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
530 msgid "_GNU_SOURCE"
531 msgstr "_GNU_SOURCE"
532
533 #. type: Plain text
534 #: build/C/man3/dprintf.3:69
535 msgid ""
536 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
537 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
538 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
539 msgstr ""
540 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
541 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
542 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
543 "行う。"
544
545 #.  .SH NOTES
546 #.  These functions are GNU extensions, not in C or POSIX.
547 #.  Clearly, the names were badly chosen.
548 #.  Many systems (like MacOS) have incompatible functions called
549 #.  .BR dprintf (),
550 #.  usually some debugging version of
551 #.  .BR printf (3),
552 #.  perhaps with a prototype like
553 #.  .BI "void dprintf(int level, const char *" format ", ...);"
554 #.  where the first argument is a debugging level (and output is to
555 #.  .IR stderr ).
556 #.  Moreover,
557 #.  .BR dprintf ()
558 #.  (or
559 #.  .BR DPRINTF )
560 #.  is also a popular macro name for a debugging printf.
561 #.  So, probably, it is better to avoid this function in programs
562 #.  intended to be portable.
563 #.  A better name would have been
564 #.  .BR fdprintf ().
565 #. type: Plain text
566 #: build/C/man3/dprintf.3:95
567 msgid ""
568 "These functions are GNU extensions that are nowadays specified in "
569 "POSIX.1-2008."
570 msgstr ""
571 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
572 "る。"
573
574 #. type: Plain text
575 #: build/C/man3/dprintf.3:97
576 msgid "B<printf>(3)"
577 msgstr "B<printf>(3)"
578
579 #. type: TH
580 #: build/C/man3/fclose.3:44
581 #, no-wrap
582 msgid "FCLOSE"
583 msgstr "FCLOSE"
584
585 #. type: TH
586 #: build/C/man3/fclose.3:44
587 #, no-wrap
588 msgid "2009-02-23"
589 msgstr "2009-02-23"
590
591 #. type: Plain text
592 #: build/C/man3/fclose.3:47
593 msgid "fclose - close a stream"
594 msgstr "fclose - ストリームを閉じる"
595
596 #. type: Plain text
597 #: build/C/man3/fclose.3:51
598 msgid "B<int fclose(FILE *>I<fp>B<);>"
599 msgstr "B<int fclose(FILE *>I<fp>B<);>"
600
601 #. type: Plain text
602 #: build/C/man3/fclose.3:59
603 msgid ""
604 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
605 "any buffered output data using B<fflush>(3))  and closes the underlying file "
606 "descriptor."
607 msgstr ""
608 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
609 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
610 "対応するファイルディスクリプタをクローズする。"
611
612 #. type: Plain text
613 #: build/C/man3/fclose.3:70
614 msgid ""
615 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
616 "I<errno> is set to indicate the error.  In either case any further access "
617 "(including another call to B<fclose>())  to the stream results in undefined "
618 "behavior."
619 msgstr ""
620 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
621 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
622 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
623 "は 未定義の動作を生じさせる。"
624
625 #. type: SH
626 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:97 build/C/man3/fflush.3:81
627 #: build/C/man3/fgetwc.3:61 build/C/man3/flockfile.3:119
628 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:60
629 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:74
630 #: build/C/man3/getline.3:122 build/C/man2/link.2:57 build/C/man2/llseek.2:69
631 #: build/C/man2/lseek.2:161 build/C/man2/open.2:485 build/C/man2/pipe.2:97
632 #: build/C/man3/popen.3:143 build/C/man2/read.2:95 build/C/man2/readlink.2:85
633 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96
634 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:548 build/C/man2/symlink.2:89
635 #: build/C/man3/tempnam.3:92 build/C/man3/tmpfile.3:54
636 #: build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
637 #, no-wrap
638 msgid "ERRORS"
639 msgstr "エラー"
640
641 #. type: TP
642 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
643 #: build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:162
644 #: build/C/man2/read.2:114 build/C/man3/scanf.3:554 build/C/man2/write.2:126
645 #, no-wrap
646 msgid "B<EBADF>"
647 msgstr "B<EBADF>"
648
649 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
650 #.   low-level file operations on the same stream. If you do get this error,
651 #.   you must have closed the stream's low-level file descriptor using
652 #.   something like close(fileno(fp)).
653 #. type: Plain text
654 #: build/C/man3/fclose.3:80
655 msgid "The file descriptor underlying I<fp> is not valid."
656 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
657
658 #. type: Plain text
659 #: build/C/man3/fclose.3:90
660 msgid ""
661 "The B<fclose>()  function may also fail and set I<errno> for any of the "
662 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
663 msgstr ""
664 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
665 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
666 "された値に設定される。"
667
668 #. type: Plain text
669 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
670 msgid "C89, C99."
671 msgstr "C89, C99."
672
673 #. type: SH
674 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:99 build/C/man3/fgetwc.3:69
675 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:240
676 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:67
677 #: build/C/man3/fseeko.3:79 build/C/man2/link.2:143 build/C/man2/llseek.2:84
678 #: build/C/man2/lseek.2:201 build/C/man2/open.2:655 build/C/man3/perror.3:124
679 #: build/C/man3/printf.3:867 build/C/man2/read.2:175
680 #: build/C/man2/readlink.2:130 build/C/man2/readv.2:226
681 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:609 build/C/man3/stdin.3:122
682 #: build/C/man2/symlink.2:155 build/C/man3/tempnam.3:101
683 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:82
684 #: build/C/man3/wprintf.3:197 build/C/man2/write.2:194
685 #, no-wrap
686 msgid "NOTES"
687 msgstr "注意"
688
689 #. type: Plain text
690 #: build/C/man3/fclose.3:102
691 #, fuzzy
692 #| msgid ""
693 #| "Note that B<fclose>()  only flushes the user space buffers provided by "
694 #| "the C library.  To ensure that the data is physically stored on disk the "
695 #| "kernel buffers must be flushed too, for example, with B<sync>(2)  or "
696 #| "B<fsync>(2)."
697 msgid ""
698 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
699 "library.  To ensure that the data is physically stored on disk the kernel "
700 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
701 msgstr ""
702 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
703 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
704 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
705 "ればならない。"
706
707 #. type: Plain text
708 #: build/C/man3/fclose.3:108
709 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
710 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
711
712 #. type: TH
713 #: build/C/man3/fcloseall.3:25
714 #, no-wrap
715 msgid "FCLOSEALL"
716 msgstr "FCLOSEALL"
717
718 #. type: TH
719 #: build/C/man3/fcloseall.3:25
720 #, no-wrap
721 msgid "2006-12-27"
722 msgstr "2006-12-27"
723
724 #. type: Plain text
725 #: build/C/man3/fcloseall.3:28
726 msgid "fcloseall - close all open streams"
727 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
728
729 #. type: Plain text
730 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
731 #, no-wrap
732 msgid ""
733 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
734 "B<#include E<lt>stdio.hE<gt>>\n"
735 msgstr ""
736 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
737 "B<#include E<lt>stdio.hE<gt>>\n"
738
739 #. type: Plain text
740 #: build/C/man3/fcloseall.3:34
741 #, no-wrap
742 msgid "B<int fcloseall(void);>\n"
743 msgstr "B<int fcloseall(void);>\n"
744
745 #. type: Plain text
746 #: build/C/man3/fcloseall.3:43
747 msgid ""
748 "The B<fcloseall>()  function closes all of the calling process's open "
749 "streams.  Buffered output for each stream is written before it is closed (as "
750 "for B<fflush>(3)); buffered input is discarded."
751 msgstr ""
752 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
753 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
754 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
755 "れる。"
756
757 #. type: Plain text
758 #: build/C/man3/fcloseall.3:50
759 msgid ""
760 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
761 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
762
763 #. type: Plain text
764 #: build/C/man3/fcloseall.3:55
765 msgid ""
766 "This function returns 0 if all files were successfully closed; on error, "
767 "B<EOF> is returned."
768 msgstr ""
769 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
770 "B<EOF> を返す。"
771
772 #. type: Plain text
773 #: build/C/man3/fcloseall.3:57
774 msgid "This function is a GNU extension."
775 msgstr "この関数は GNU 拡張である。"
776
777 #. type: Plain text
778 #: build/C/man3/fcloseall.3:63
779 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
780 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
781
782 #. type: TH
783 #: build/C/man3/ferror.3:44
784 #, no-wrap
785 msgid "FERROR"
786 msgstr "FERROR"
787
788 #. type: TH
789 #: build/C/man3/ferror.3:44 build/C/man3/flockfile.3:25
790 #: build/C/man3/unlocked_stdio.3:25
791 #, no-wrap
792 msgid "2008-08-29"
793 msgstr "2008-08-29"
794
795 #. type: Plain text
796 #: build/C/man3/ferror.3:47
797 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
798 msgstr ""
799 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
800
801 #. type: Plain text
802 #: build/C/man3/ferror.3:51
803 msgid "B<void clearerr(FILE *>I<stream>B<);>"
804 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
805
806 #. type: Plain text
807 #: build/C/man3/ferror.3:53
808 msgid "B<int feof(FILE *>I<stream>B<);>"
809 msgstr "B<int feof(FILE *>I<stream>B<);>"
810
811 #. type: Plain text
812 #: build/C/man3/ferror.3:55
813 msgid "B<int ferror(FILE *>I<stream>B<);>"
814 msgstr "B<int ferror(FILE *>I<stream>B<);>"
815
816 #. type: Plain text
817 #: build/C/man3/ferror.3:57
818 msgid "B<int fileno(FILE *>I<stream>B<);>"
819 msgstr "B<int fileno(FILE *>I<stream>B<);>"
820
821 #. type: Plain text
822 #: build/C/man3/ferror.3:65
823 msgid ""
824 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
825 msgstr ""
826 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
827
828 #. type: Plain text
829 #: build/C/man3/ferror.3:70
830 msgid ""
831 "The function B<clearerr>()  clears the end-of-file and error indicators for "
832 "the stream pointed to by I<stream>."
833 msgstr ""
834 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
835 "子とエラー指示子をクリアする。"
836
837 #. type: Plain text
838 #: build/C/man3/ferror.3:79
839 msgid ""
840 "The function B<feof>()  tests the end-of-file indicator for the stream "
841 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
842 "indicator can only be cleared by the function B<clearerr>()."
843 msgstr ""
844 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
845 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
846 "よってのみクリアすることができる。"
847
848 #. type: Plain text
849 #: build/C/man3/ferror.3:88
850 msgid ""
851 "The function B<ferror>()  tests the error indicator for the stream pointed "
852 "to by I<stream>, returning nonzero if it is set.  The error indicator can "
853 "only be reset by the B<clearerr>()  function."
854 msgstr ""
855 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
856 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
857 "()  によってのみリセットすることができる。"
858
859 #. type: Plain text
860 #: build/C/man3/ferror.3:94
861 msgid ""
862 "The function B<fileno>()  examines the argument I<stream> and returns its "
863 "integer descriptor."
864 msgstr ""
865 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
866
867 #. type: Plain text
868 #: build/C/man3/ferror.3:97 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54
869 #: build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
870 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
871 msgstr ""
872 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
873
874 #. type: Plain text
875 #: build/C/man3/ferror.3:107
876 msgid ""
877 "These functions should not fail and do not set the external variable "
878 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
879 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
880 msgstr ""
881 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
882 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
883 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
884
885 #. type: Plain text
886 #: build/C/man3/ferror.3:114
887 msgid ""
888 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
889 "C99."
890 msgstr ""
891 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
892
893 #. type: Plain text
894 #: build/C/man3/ferror.3:119
895 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
896 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
897
898 #. type: TH
899 #: build/C/man3/fflush.3:45
900 #, no-wrap
901 msgid "FFLUSH"
902 msgstr "FFLUSH"
903
904 #. type: TH
905 #: build/C/man3/fflush.3:45
906 #, no-wrap
907 msgid "2009-09-06"
908 msgstr "2009-09-06"
909
910 #. type: Plain text
911 #: build/C/man3/fflush.3:48
912 msgid "fflush - flush a stream"
913 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
914
915 #. type: Plain text
916 #: build/C/man3/fflush.3:52
917 msgid "B<int fflush(FILE *>I<stream>B<);>"
918 msgstr "B<int fflush(FILE *>I<stream>B<);>"
919
920 #. type: Plain text
921 #: build/C/man3/fflush.3:63
922 msgid ""
923 "For output streams, B<fflush>()  forces a write of all user-space buffered "
924 "data for the given output or update I<stream> via the stream's underlying "
925 "write function.  For input streams, B<fflush>()  discards any buffered data "
926 "that has been fetched from the underlying file, but has not been consumed by "
927 "the application.  The open status of the stream is unaffected."
928 msgstr ""
929 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
930 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
931 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
932 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
933 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
934 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
935 "い。"
936
937 #. type: Plain text
938 #: build/C/man3/fflush.3:71
939 msgid ""
940 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
941 "streams."
942 msgstr ""
943 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
944 "トリームをフラッシュする。"
945
946 #. type: Plain text
947 #: build/C/man3/fflush.3:74
948 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
949 msgstr ""
950 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
951 "と。"
952
953 #. type: Plain text
954 #: build/C/man3/fflush.3:81
955 msgid ""
956 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
957 "I<errno> is set to indicate the error."
958 msgstr ""
959 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
960 "ラーに対応した値に設定される。"
961
962 #. type: Plain text
963 #: build/C/man3/fflush.3:86
964 msgid "I<Stream> is not an open stream, or is not open for writing."
965 msgstr ""
966 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
967 "ない。"
968
969 #. type: Plain text
970 #: build/C/man3/fflush.3:93
971 msgid ""
972 "The function B<fflush>()  may also fail and set I<errno> for any of the "
973 "errors specified for B<write>(2)."
974 msgstr ""
975 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
976 "ある。 この場合 I<errno> もその値に設定される。"
977
978 #. type: Plain text
979 #: build/C/man3/fflush.3:95
980 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
981 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
982
983 #.  Verified on: Solaris 8.
984 #. type: Plain text
985 #: build/C/man3/fflush.3:99
986 msgid ""
987 "The standards do not specify the behavior for input streams.  Most other "
988 "implementations behave the same as Linux."
989 msgstr ""
990 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
991 "は Linux と同じ動作をする。"
992
993 #. type: Plain text
994 #: build/C/man3/fflush.3:108
995 #, fuzzy
996 #| msgid ""
997 #| "Note that B<fflush>()  only flushes the user space buffers provided by "
998 #| "the C library.  To ensure that the data is physically stored on disk the "
999 #| "kernel buffers must be flushed too, for example, with B<sync>(2)  or "
1000 #| "B<fsync>(2)."
1001 msgid ""
1002 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1003 "library.  To ensure that the data is physically stored on disk the kernel "
1004 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1005 msgstr ""
1006 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1007 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1008 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1009 "B<fsync>(2)  を用いる。"
1010
1011 #. type: Plain text
1012 #: build/C/man3/fflush.3:116
1013 msgid ""
1014 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1015 "(3), B<unlocked_stdio>(3)"
1016 msgstr ""
1017 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1018 "(3), B<unlocked_stdio>(3)"
1019
1020 #. type: TH
1021 #: build/C/man3/fgetwc.3:18
1022 #, no-wrap
1023 msgid "FGETWC"
1024 msgstr "FGETWC"
1025
1026 #. type: TH
1027 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16
1028 #, no-wrap
1029 msgid "1999-07-25"
1030 msgstr "1999-07-25"
1031
1032 #. type: Plain text
1033 #: build/C/man3/fgetwc.3:21
1034 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1035 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1036
1037 #. type: Plain text
1038 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1039 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1040 #, no-wrap
1041 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1042 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1043
1044 #. type: Plain text
1045 #: build/C/man3/fgetwc.3:29
1046 #, no-wrap
1047 msgid ""
1048 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1049 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1050 msgstr ""
1051 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1052 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1053
1054 #. type: Plain text
1055 #: build/C/man3/fgetwc.3:44
1056 msgid ""
1057 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1058 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1059 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1060 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1061 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1062 msgstr ""
1063 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1064 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1065 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1066 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1067 "し、 B<WEOF> を返す。"
1068
1069 #. type: Plain text
1070 #: build/C/man3/fgetwc.3:52
1071 msgid ""
1072 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1073 "may be implemented as a macro, and may evaluate its argument more than "
1074 "once.  There is no reason ever to use it."
1075 msgstr ""
1076 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1077 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1078 "ない。この関数を使う理由はもはや存在しない。"
1079
1080 #. type: Plain text
1081 #: build/C/man3/fgetwc.3:61
1082 msgid ""
1083 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1084 "or B<WEOF>."
1085 msgstr ""
1086 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。"
1087
1088 #. type: Plain text
1089 #: build/C/man3/fgetwc.3:63 build/C/man3/fputwc.3:62
1090 msgid "Apart from the usual ones, there is"
1091 msgstr "通常のエラーに加えて、以下のエラーがある:"
1092
1093 #. type: TP
1094 #: build/C/man3/fgetwc.3:63 build/C/man3/fputwc.3:62 build/C/man3/scanf.3:559
1095 #, no-wrap
1096 msgid "B<EILSEQ>"
1097 msgstr "B<EILSEQ>"
1098
1099 #. type: Plain text
1100 #: build/C/man3/fgetwc.3:67
1101 msgid ""
1102 "The data obtained from the input stream does not form a valid character."
1103 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1104
1105 #. type: Plain text
1106 #: build/C/man3/fgetwc.3:69 build/C/man3/fputwc.3:67
1107 msgid "C99, POSIX.1-2001."
1108 msgstr "C99, POSIX.1-2001."
1109
1110 #. type: Plain text
1111 #: build/C/man3/fgetwc.3:76
1112 msgid ""
1113 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1114 "current locale."
1115 msgstr ""
1116 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1117
1118 #. type: Plain text
1119 #: build/C/man3/fgetwc.3:84
1120 msgid ""
1121 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1122 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1123 "sequence from the stream and then convert it to a wide character."
1124 msgstr ""
1125 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1126 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1127 "換すると期待することは適切である。"
1128
1129 #. type: Plain text
1130 #: build/C/man3/fgetwc.3:89
1131 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1132 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1133
1134 #. type: TH
1135 #: build/C/man3/flockfile.3:25
1136 #, no-wrap
1137 msgid "FLOCKFILE"
1138 msgstr "FLOCKFILE"
1139
1140 #. type: Plain text
1141 #: build/C/man3/flockfile.3:28
1142 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1143 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1144
1145 #. type: Plain text
1146 #: build/C/man3/flockfile.3:33
1147 #, no-wrap
1148 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1149 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1150
1151 #. type: Plain text
1152 #: build/C/man3/flockfile.3:35
1153 #, no-wrap
1154 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1155 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1156
1157 #. type: Plain text
1158 #: build/C/man3/flockfile.3:37
1159 #, no-wrap
1160 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1161 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1162
1163 #. type: Plain text
1164 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1165 msgid "All functions shown above:"
1166 msgstr "上記の全ての関数:"
1167
1168 #. type: Plain text
1169 #: build/C/man3/flockfile.3:49
1170 msgid ""
1171 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1172 "|| _POSIX_SOURCE"
1173 msgstr ""
1174 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1175 "|| _POSIX_SOURCE"
1176
1177 #. type: Plain text
1178 #: build/C/man3/flockfile.3:63
1179 msgid ""
1180 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1181 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1182 "thread.  For each library call, these functions wait until the I<FILE> "
1183 "object is no longer locked by a different thread, then lock it, do the "
1184 "requested I/O, and unlock the object again."
1185 msgstr ""
1186 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1187 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1188 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1189 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1190 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1191 "オブジェクトのロックを解除する。"
1192
1193 #. type: Plain text
1194 #: build/C/man3/flockfile.3:69
1195 msgid ""
1196 "(Note: this locking has nothing to do with the file locking done by "
1197 "functions like B<flock>(2)  and B<lockf>(3).)"
1198 msgstr ""
1199 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1200 "全く無関係である。)"
1201
1202 #. type: Plain text
1203 #: build/C/man3/flockfile.3:77
1204 msgid ""
1205 "All this is invisible to the C-programmer, but there may be two reasons to "
1206 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1207 "actions by one thread belongs together, and should not be interrupted by the "
1208 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1209 "should be avoided for greater efficiency."
1210 msgstr ""
1211 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1212 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1213 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1214 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1215 "避ける必要があるということであろう。"
1216
1217 #. type: Plain text
1218 #: build/C/man3/flockfile.3:94
1219 msgid ""
1220 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1221 "series of I/O actions, then unlock.  This prevents other threads from coming "
1222 "in between.  If the reason for doing this was to achieve greater efficiency, "
1223 "one does the I/O with the nonlocking versions of the stdio functions: with "
1224 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1225 "B<putc>(3)."
1226 msgstr ""
1227 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1228 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1229 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1230 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1231 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1232 "B<putc_unlocked>(3)  を使用する。"
1233
1234 #. type: Plain text
1235 #: build/C/man3/flockfile.3:101
1236 msgid ""
1237 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1238 "by a different thread, then makes the current thread owner of "
1239 "I<*filehandle>, and increments the lockcount."
1240 msgstr ""
1241 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1242 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1243 "ロック数を加算する。"
1244
1245 #. type: Plain text
1246 #: build/C/man3/flockfile.3:105
1247 msgid "The B<funlockfile>()  function decrements the lock count."
1248 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1249
1250 #. type: Plain text
1251 #: build/C/man3/flockfile.3:114
1252 msgid ""
1253 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1254 "It does nothing in case some other thread owns I<*filehandle>, and it "
1255 "obtains ownership and increments the lockcount otherwise."
1256 msgstr ""
1257 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1258 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1259 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1260
1261 #. type: Plain text
1262 #: build/C/man3/flockfile.3:119
1263 msgid ""
1264 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1265 "obtained), and nonzero for failure."
1266 msgstr ""
1267 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1268 "の値を返す。"
1269
1270 #. type: Plain text
1271 #: build/C/man3/flockfile.3:121
1272 msgid "None."
1273 msgstr "なし。"
1274
1275 #. type: Plain text
1276 #: build/C/man3/flockfile.3:123 build/C/man3/popen.3:171
1277 msgid "POSIX.1-2001."
1278 msgstr "POSIX.1-2001."
1279
1280 #. type: SH
1281 #: build/C/man3/flockfile.3:123
1282 #, no-wrap
1283 msgid "AVAILABILITY"
1284 msgstr "可用性"
1285
1286 #. type: Plain text
1287 #: build/C/man3/flockfile.3:129
1288 msgid ""
1289 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1290 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1291 msgstr ""
1292 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1293 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1294
1295 #. type: Plain text
1296 #: build/C/man3/flockfile.3:131
1297 msgid "B<unlocked_stdio>(3)"
1298 msgstr "B<unlocked_stdio>(3)"
1299
1300 #. type: TH
1301 #: build/C/man3/fmemopen.3:10
1302 #, no-wrap
1303 msgid "FMEMOPEN"
1304 msgstr "FMEMOPEN"
1305
1306 #. type: TH
1307 #: build/C/man3/fmemopen.3:10
1308 #, no-wrap
1309 msgid "2012-04-28"
1310 msgstr "2012-04-28"
1311
1312 #. type: Plain text
1313 #: build/C/man3/fmemopen.3:13
1314 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1315 msgstr ""
1316 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1317 "する"
1318
1319 #. type: Plain text
1320 #: build/C/man3/fmemopen.3:18
1321 #, no-wrap
1322 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1323 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1324
1325 #. type: Plain text
1326 #: build/C/man3/fmemopen.3:20
1327 #, no-wrap
1328 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1329 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1330
1331 #. type: Plain text
1332 #: build/C/man3/fmemopen.3:24
1333 #, no-wrap
1334 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1335 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1336
1337 #. type: Plain text
1338 #: build/C/man3/fmemopen.3:34
1339 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1340 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1341
1342 #. type: Plain text
1343 #: build/C/man3/fmemopen.3:57
1344 msgid ""
1345 "The B<fmemopen>()  function opens a stream that permits the access specified "
1346 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1347 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1348 "long."
1349 msgstr ""
1350 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1351 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1352 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1353 "I<size> バイトの長さでなければならない。"
1354
1355 #. type: Plain text
1356 #: build/C/man3/fmemopen.3:77
1357 msgid ""
1358 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1359 "an append mode, then the initial file position is set to the location of the "
1360 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1361 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1362 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1363 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1364 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1365 "e., the value specified by the I<size> argument), rather than the current "
1366 "string length."
1367 msgstr ""
1368 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1369 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1370 "最初の NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1371 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1372 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1373 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1374 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1375 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1376 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1377
1378 #. type: Plain text
1379 #: build/C/man3/fmemopen.3:89
1380 msgid ""
1381 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1382 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1383 "there is space.  The caller should ensure that an extra byte is available in "
1384 "the buffer (and that I<size> counts that byte)  to allow for this."
1385 msgstr ""
1386 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1387 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1388 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1389 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1390
1391 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1392 #.  and
1393 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1394 #. type: Plain text
1395 #: build/C/man3/fmemopen.3:107
1396 msgid ""
1397 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1398 "(By default, such errors will only be visible when the I<stdio> buffer is "
1399 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1400 "detect errors at the time of an output operation.  Alternatively, the caller "
1401 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1402 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1403 msgstr ""
1404 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1405 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1406 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1407 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1408 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1409 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1410 "stdio に教える方法がある。)"
1411
1412 #. type: Plain text
1413 #: build/C/man3/fmemopen.3:115
1414 msgid ""
1415 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1416 "not cause read operations to return an end-of-file indication.  A read from "
1417 "the buffer will only indicate end-of-file when the file pointer advances "
1418 "I<size> bytes past the start of the buffer."
1419 msgstr ""
1420 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1421 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1422 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1423 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1424
1425 #. type: Plain text
1426 #: build/C/man3/fmemopen.3:130
1427 msgid ""
1428 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1429 "buffer I<size> bytes long.  This is useful for an application that wants to "
1430 "write data to a temporary buffer and then read it back again.  The buffer is "
1431 "automatically freed when the stream is closed.  Note that the caller has no "
1432 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1433 "see B<open_memstream>()  below)."
1434 msgstr ""
1435 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1436 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1437 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1438 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1439 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1440 "の B<open_memstream>()  も参照)。"
1441
1442 #. type: Plain text
1443 #: build/C/man3/fmemopen.3:141
1444 msgid ""
1445 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1446 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1447 "automatically grows as required.  After closing the stream, the caller "
1448 "should B<free>(3)  this buffer."
1449 msgstr ""
1450 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1451 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1452 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1453 "B<free>(3)  すべきである。"
1454
1455 #. type: Plain text
1456 #: build/C/man3/fmemopen.3:156
1457 msgid ""
1458 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1459 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1460 "respectively, a pointer to the buffer and the current size of the buffer.  "
1461 "These values remain valid only as long as the caller performs no further "
1462 "output on the stream.  If further output is performed, then the stream must "
1463 "again be flushed before trying to access these variables."
1464 msgstr ""
1465 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1466 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1467 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1468 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1469 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1470
1471 #. type: Plain text
1472 #: build/C/man3/fmemopen.3:162
1473 msgid ""
1474 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1475 "included in the size value stored at I<sizeloc>."
1476 msgstr ""
1477 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1478 "されるサイズには「含まれない」。"
1479
1480 #. type: Plain text
1481 #: build/C/man3/fmemopen.3:170
1482 msgid ""
1483 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1484 "(3).  Moving the file position past the end of the data already written "
1485 "fills the intervening space with zeros."
1486 msgstr ""
1487 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1488 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1489 "は 0 で埋められる。"
1490
1491 #. type: Plain text
1492 #: build/C/man3/fmemopen.3:176
1493 msgid ""
1494 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1495 "wide characters instead of bytes."
1496 msgstr ""
1497 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1498 "ド文字に対して操作を行う点が異なる。"
1499
1500 #. type: Plain text
1501 #: build/C/man3/fmemopen.3:188
1502 msgid ""
1503 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1504 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1505 "and I<errno> is set to indicate the error."
1506 msgstr ""
1507 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1508 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1509 "し、 I<errno> にエラーを示す値をセットする。"
1510
1511 #. type: SH
1512 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1513 #: build/C/man3/getline.3:132 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1514 #, no-wrap
1515 msgid "VERSIONS"
1516 msgstr "バージョン"
1517
1518 #. type: Plain text
1519 #: build/C/man3/fmemopen.3:195
1520 msgid ""
1521 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1522 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1523 msgstr ""
1524 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1525 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1526
1527 #. type: Plain text
1528 #: build/C/man3/fmemopen.3:199
1529 msgid ""
1530 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1531 "not widely available on other systems."
1532 msgstr ""
1533 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1534 "のシステムで広く利用可能である。"
1535
1536 #.  http://austingroupbugs.net/view.php?id=396
1537 #. type: Plain text
1538 #: build/C/man3/fmemopen.3:207
1539 msgid ""
1540 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1541 "However, Technical Corrigendum 1 adjusts the standard to allow "
1542 "implementation-specific treatment for this case, thus permitting the glibc "
1543 "treatment of \\(aqb\\(aq."
1544 msgstr ""
1545 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1546 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1547 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1548 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1549
1550 #. type: Plain text
1551 #: build/C/man3/fmemopen.3:213
1552 msgid ""
1553 "There is no file descriptor associated with the file stream returned by "
1554 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1555 "returned stream)."
1556 msgstr ""
1557 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1558 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1559 "とになる)。"
1560
1561 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1562 #. type: Plain text
1563 #: build/C/man3/fmemopen.3:220
1564 msgid ""
1565 "In glibc before version 2.7, seeking past the end of a stream created by "
1566 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1567 "call fails, returning -1."
1568 msgstr ""
1569 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1570 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1571 "B<fseek>(3)  が失敗し -1 が返る。"
1572
1573 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1574 #. type: Plain text
1575 #: build/C/man3/fmemopen.3:231
1576 msgid ""
1577 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1578 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1579 "stream that then returned end of file on the first attempt at reading.  "
1580 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1581 msgstr ""
1582 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1583 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1584 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1585 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1586
1587 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1588 #. type: Plain text
1589 #: build/C/man3/fmemopen.3:239
1590 msgid ""
1591 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1592 "file position to the first null byte, but (if the file offset is reset to a "
1593 "location other than the end of the stream)  does not force subsequent writes "
1594 "to append at the end of the stream."
1595 msgstr ""
1596 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1597 "ファイル位置の初期値は最初の NULL バイトに設定されるが、(ファイル\n"
1598 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1599 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1600
1601 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1602 #. type: Plain text
1603 #: build/C/man3/fmemopen.3:255
1604 msgid ""
1605 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1606 "\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1607 "according to POSIX.1-2008, the initial file position should be set to the "
1608 "next byte after the end of the buffer.  However, in this case the glibc "
1609 "B<fmemopen>()  sets the file position to -1."
1610 msgstr ""
1611 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1612 "I<size> 引き数で指定した範囲の I<buf> 内に NULL バイトがない場合、\n"
1613 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1614 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1615 "この場合ファイル位置は -1 に設定される。"
1616
1617 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1618 #. type: Plain text
1619 #: build/C/man3/fmemopen.3:268
1620 msgid ""
1621 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1622 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1623 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1624 "I<mode> by B<fopen>(3)."
1625 msgstr ""
1626 "B<fmemopen>() でバイナリモードを指定するには、\n"
1627 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1628 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1629 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1630
1631 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1632 #. type: Plain text
1633 #: build/C/man3/fmemopen.3:276
1634 msgid ""
1635 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1636 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1637 msgstr ""
1638 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1639 "ABI (Application Binary Interface) が黙って変更された。\n"
1640 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1641
1642 #. type: SH
1643 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:244
1644 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:141
1645 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:973
1646 #: build/C/man2/readlink.2:157 build/C/man2/readv.2:265
1647 #: build/C/man3/scanf.3:682
1648 #, no-wrap
1649 msgid "EXAMPLE"
1650 msgstr "例"
1651
1652 #. type: Plain text
1653 #: build/C/man3/fmemopen.3:286
1654 msgid ""
1655 "The program below uses B<fmemopen>()  to open an input buffer, and "
1656 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1657 "scans its input string (taken from the program's first command-line "
1658 "argument) reading integers, and writes the squares of these integers to the "
1659 "output buffer.  An example of the output produced by this program is the "
1660 "following:"
1661 msgstr ""
1662 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1663 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1664 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1665 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1666 "ムの実行例は以下のようになる。"
1667
1668 #. type: Plain text
1669 #: build/C/man3/fmemopen.3:291
1670 #, no-wrap
1671 msgid ""
1672 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1673 "size=11; ptr=1 529 1849\n"
1674 msgstr ""
1675 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1676 "size=11; ptr=1 529 1849\n"
1677
1678 #. type: SS
1679 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1680 #, no-wrap
1681 msgid "Program source"
1682 msgstr "プログラムのソース"
1683
1684 #. type: Plain text
1685 #: build/C/man3/fmemopen.3:300
1686 #, no-wrap
1687 msgid ""
1688 "#define _GNU_SOURCE\n"
1689 "#include E<lt>string.hE<gt>\n"
1690 "#include E<lt>stdio.hE<gt>\n"
1691 "#include E<lt>stdlib.hE<gt>\n"
1692 msgstr ""
1693 "#define _GNU_SOURCE\n"
1694 "#include E<lt>string.hE<gt>\n"
1695 "#include E<lt>stdio.hE<gt>\n"
1696 "#include E<lt>stdlib.hE<gt>\n"
1697
1698 #. type: Plain text
1699 #: build/C/man3/fmemopen.3:303
1700 #, no-wrap
1701 msgid ""
1702 "#define handle_error(msg) \\e\n"
1703 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1704 msgstr ""
1705 "#define handle_error(msg) \\e\n"
1706 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1707
1708 #. type: Plain text
1709 #: build/C/man3/fmemopen.3:311
1710 #, no-wrap
1711 msgid ""
1712 "int\n"
1713 "main(int argc, char *argv[])\n"
1714 "{\n"
1715 "    FILE *out, *in;\n"
1716 "    int v, s;\n"
1717 "    size_t size;\n"
1718 "    char *ptr;\n"
1719 msgstr ""
1720 "int\n"
1721 "main(int argc, char *argv[])\n"
1722 "{\n"
1723 "    FILE *out, *in;\n"
1724 "    int v, s;\n"
1725 "    size_t size;\n"
1726 "    char *ptr;\n"
1727
1728 #. type: Plain text
1729 #: build/C/man3/fmemopen.3:316
1730 #, no-wrap
1731 msgid ""
1732 "    if (argc != 2) {\n"
1733 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1734 "\texit(EXIT_FAILURE);\n"
1735 "    }\n"
1736 msgstr ""
1737 "    if (argc != 2) {\n"
1738 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1739 "\texit(EXIT_FAILURE);\n"
1740 "    }\n"
1741
1742 #. type: Plain text
1743 #: build/C/man3/fmemopen.3:320
1744 #, no-wrap
1745 msgid ""
1746 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1747 "    if (in == NULL)\n"
1748 "        handle_error(\"fmemopen\");\n"
1749 msgstr ""
1750 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1751 "    if (in == NULL)\n"
1752 "        handle_error(\"fmemopen\");\n"
1753
1754 #. type: Plain text
1755 #: build/C/man3/fmemopen.3:324
1756 #, no-wrap
1757 msgid ""
1758 "    out = open_memstream(&ptr, &size);\n"
1759 "    if (out == NULL)\n"
1760 "        handle_error(\"open_memstream\");\n"
1761 msgstr ""
1762 "    out = open_memstream(&ptr, &size);\n"
1763 "    if (out == NULL)\n"
1764 "        handle_error(\"open_memstream\");\n"
1765
1766 #. type: Plain text
1767 #: build/C/man3/fmemopen.3:329
1768 #, no-wrap
1769 msgid ""
1770 "    for (;;) {\n"
1771 "        s = fscanf(in, \"%d\", &v);\n"
1772 "        if (s E<lt>= 0)\n"
1773 "            break;\n"
1774 msgstr ""
1775 "    for (;;) {\n"
1776 "        s = fscanf(in, \"%d\", &v);\n"
1777 "        if (s E<lt>= 0)\n"
1778 "            break;\n"
1779
1780 #. type: Plain text
1781 #: build/C/man3/fmemopen.3:340
1782 #, no-wrap
1783 msgid ""
1784 "        s = fprintf(out, \"%d \", v * v);\n"
1785 "        if (s == -1)\n"
1786 "            handle_error(\"fprintf\");\n"
1787 "    }\n"
1788 "    fclose(in);\n"
1789 "    fclose(out);\n"
1790 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1791 "    free(ptr);\n"
1792 "    exit(EXIT_SUCCESS);\n"
1793 "}\n"
1794 msgstr ""
1795 "        s = fprintf(out, \"%d \", v * v);\n"
1796 "        if (s == -1)\n"
1797 "            handle_error(\"fprintf\");\n"
1798 "    }\n"
1799 "    fclose(in);\n"
1800 "    fclose(out);\n"
1801 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1802 "    free(ptr);\n"
1803 "    exit(EXIT_SUCCESS);\n"
1804 "}\n"
1805
1806 #. type: Plain text
1807 #: build/C/man3/fmemopen.3:344
1808 msgid "B<fopen>(3), B<fopencookie>(3)"
1809 msgstr "B<fopen>(3), B<fopencookie>(3)"
1810
1811 #. type: TH
1812 #: build/C/man3/fmtmsg.3:13
1813 #, no-wrap
1814 msgid "FMTMSG"
1815 msgstr "FMTMSG"
1816
1817 #. type: TH
1818 #: build/C/man3/fmtmsg.3:13
1819 #, no-wrap
1820 msgid "2008-06-14"
1821 msgstr "2008-06-14"
1822
1823 #. type: Plain text
1824 #: build/C/man3/fmtmsg.3:16
1825 msgid "fmtmsg - print formatted error messages"
1826 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1827
1828 #. type: Plain text
1829 #: build/C/man3/fmtmsg.3:19
1830 #, no-wrap
1831 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1832 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1833
1834 #. type: Plain text
1835 #: build/C/man3/fmtmsg.3:21
1836 #, no-wrap
1837 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1838 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1839
1840 #. type: Plain text
1841 #: build/C/man3/fmtmsg.3:23
1842 #, no-wrap
1843 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1844 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1845
1846 #. type: Plain text
1847 #: build/C/man3/fmtmsg.3:25
1848 #, no-wrap
1849 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1850 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1851
1852 #. type: Plain text
1853 #: build/C/man3/fmtmsg.3:36
1854 msgid ""
1855 "This function displays a message described by its arguments on the device"
1856 "(s)  specified in the I<classification> argument.  For messages written to "
1857 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1858 msgstr ""
1859 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1860 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1861 "は、 B<MSGVERB> 環境変数に依存する。"
1862
1863 #. type: Plain text
1864 #: build/C/man3/fmtmsg.3:43
1865 msgid ""
1866 "The I<label> argument identifies the source of the message.  The string must "
1867 "consist of two colon separated parts where the first part has not more than "
1868 "10 and the second part not more than 14 characters."
1869 msgstr ""
1870 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1871 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1872 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1873
1874 #. type: Plain text
1875 #: build/C/man3/fmtmsg.3:47
1876 msgid "The I<text> argument describes the condition of the error."
1877 msgstr "I<text> 引き数にはエラー条件を記述する。"
1878
1879 #. type: Plain text
1880 #: build/C/man3/fmtmsg.3:52
1881 msgid ""
1882 "The I<action> argument describes possible steps to recover from the error.  "
1883 "If it is printed, it is prefixed by \"TO FIX: \"."
1884 msgstr ""
1885 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1886 "れが表示される場合、\"TO FIX: \" が前に付く。"
1887
1888 #. type: Plain text
1889 #: build/C/man3/fmtmsg.3:60
1890 msgid ""
1891 "The I<tag> argument is a reference to the online documentation where more "
1892 "information can be found.  It should contain the I<label> value and a unique "
1893 "identification number."
1894 msgstr ""
1895 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1896 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1897
1898 #. type: SS
1899 #: build/C/man3/fmtmsg.3:60
1900 #, no-wrap
1901 msgid "Dummy arguments"
1902 msgstr "ダミー引き数"
1903
1904 #. type: Plain text
1905 #: build/C/man3/fmtmsg.3:79
1906 msgid ""
1907 "Each of the arguments can have a dummy value.  The dummy classification "
1908 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1909 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1910 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1911 "synonyms for I<((char *) 0)>, the empty string, and B<MM_NULLSEV> is a "
1912 "synonym for B<NO_SEV>."
1913 msgstr ""
1914 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1915 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1916 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1917 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1918 "((char *) 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名であ"
1919 "る。"
1920
1921 #. type: SS
1922 #: build/C/man3/fmtmsg.3:79
1923 #, no-wrap
1924 msgid "The classification argument"
1925 msgstr "classification 引き数"
1926
1927 #. type: Plain text
1928 #: build/C/man3/fmtmsg.3:83
1929 msgid ""
1930 "The I<classification> argument is the sum of values describing 4 types of "
1931 "information."
1932 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1933
1934 #. type: Plain text
1935 #: build/C/man3/fmtmsg.3:86
1936 msgid "The first value defines the output channel."
1937 msgstr "最初の値は出力チャンネルを定義する。"
1938
1939 #. type: TP
1940 #: build/C/man3/fmtmsg.3:86
1941 #, no-wrap
1942 msgid "B<MM_PRINT>"
1943 msgstr "B<MM_PRINT>"
1944
1945 #. type: Plain text
1946 #: build/C/man3/fmtmsg.3:90
1947 msgid "Output to I<stderr>."
1948 msgstr "I<stderr> に出力する。"
1949
1950 #. type: TP
1951 #: build/C/man3/fmtmsg.3:90
1952 #, no-wrap
1953 msgid "B<MM_CONSOLE>"
1954 msgstr "B<MM_CONSOLE>"
1955
1956 #. type: Plain text
1957 #: build/C/man3/fmtmsg.3:93
1958 msgid "Output to the system console."
1959 msgstr "システムコンソールに出力する。"
1960
1961 #. type: TP
1962 #: build/C/man3/fmtmsg.3:93
1963 #, no-wrap
1964 msgid "B<MM_PRINT | MM_CONSOLE>"
1965 msgstr "B<MM_PRINT | MM_CONSOLE>"
1966
1967 #. type: Plain text
1968 #: build/C/man3/fmtmsg.3:96
1969 msgid "Output to both."
1970 msgstr "両方に出力する。"
1971
1972 #. type: Plain text
1973 #: build/C/man3/fmtmsg.3:98
1974 msgid "The second value is the source of the error:"
1975 msgstr "2 番目の値はエラーの発生源である:"
1976
1977 #. type: TP
1978 #: build/C/man3/fmtmsg.3:98
1979 #, no-wrap
1980 msgid "B<MM_HARD>"
1981 msgstr "B<MM_HARD>"
1982
1983 #. type: Plain text
1984 #: build/C/man3/fmtmsg.3:101
1985 msgid "A hardware error occurred."
1986 msgstr "ハードウェアエラーが起こった。"
1987
1988 #. type: TP
1989 #: build/C/man3/fmtmsg.3:101
1990 #, no-wrap
1991 msgid "B<MM_FIRM>"
1992 msgstr "B<MM_FIRM>"
1993
1994 #. type: Plain text
1995 #: build/C/man3/fmtmsg.3:104
1996 msgid "A firmware error occurred."
1997 msgstr "ファームウェアエラーが起こった。"
1998
1999 #. type: TP
2000 #: build/C/man3/fmtmsg.3:104
2001 #, no-wrap
2002 msgid "B<MM_SOFT>"
2003 msgstr "B<MM_SOFT>"
2004
2005 #. type: Plain text
2006 #: build/C/man3/fmtmsg.3:107
2007 msgid "A software error occurred."
2008 msgstr "ソフトウェアエラーが起こった。"
2009
2010 #. type: Plain text
2011 #: build/C/man3/fmtmsg.3:109
2012 msgid "The third value encodes the detector of the problem:"
2013 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2014
2015 #. type: TP
2016 #: build/C/man3/fmtmsg.3:109
2017 #, no-wrap
2018 msgid "B<MM_APPL>"
2019 msgstr "B<MM_APPL>"
2020
2021 #. type: Plain text
2022 #: build/C/man3/fmtmsg.3:112
2023 msgid "It is detected by an application."
2024 msgstr "アプリケーションによって検知された。"
2025
2026 #. type: TP
2027 #: build/C/man3/fmtmsg.3:112
2028 #, no-wrap
2029 msgid "B<MM_UTIL>"
2030 msgstr "B<MM_UTIL>"
2031
2032 #. type: Plain text
2033 #: build/C/man3/fmtmsg.3:115
2034 msgid "It is detected by a utility."
2035 msgstr "ユーティリティによって検知された。"
2036
2037 #. type: TP
2038 #: build/C/man3/fmtmsg.3:115
2039 #, no-wrap
2040 msgid "B<MM_OPSYS>"
2041 msgstr "B<MM_OPSYS>"
2042
2043 #. type: Plain text
2044 #: build/C/man3/fmtmsg.3:118
2045 msgid "It is detected by the operating system."
2046 msgstr "オペレーティングシステムによって検知された。"
2047
2048 #. type: Plain text
2049 #: build/C/man3/fmtmsg.3:120
2050 msgid "The fourth value shows the severity of the incident:"
2051 msgstr "4 番目の値は問題の重大度を表す:"
2052
2053 #. type: TP
2054 #: build/C/man3/fmtmsg.3:120
2055 #, no-wrap
2056 msgid "B<MM_RECOVER>"
2057 msgstr "B<MM_RECOVER>"
2058
2059 #. type: Plain text
2060 #: build/C/man3/fmtmsg.3:123
2061 msgid "It is a recoverable error."
2062 msgstr "回復可能なエラーである。"
2063
2064 #. type: TP
2065 #: build/C/man3/fmtmsg.3:123
2066 #, no-wrap
2067 msgid "B<MM_NRECOV>"
2068 msgstr "B<MM_NRECOV>"
2069
2070 #. type: Plain text
2071 #: build/C/man3/fmtmsg.3:126
2072 msgid "It is a nonrecoverable error."
2073 msgstr "回復不可能なエラーである。"
2074
2075 #. type: SS
2076 #: build/C/man3/fmtmsg.3:126
2077 #, no-wrap
2078 msgid "The severity argument"
2079 msgstr "severity 引き数"
2080
2081 #. type: Plain text
2082 #: build/C/man3/fmtmsg.3:130
2083 msgid "The I<severity> argument can take one of the following values:"
2084 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2085
2086 #. type: TP
2087 #: build/C/man3/fmtmsg.3:130
2088 #, no-wrap
2089 msgid "B<MM_NOSEV>"
2090 msgstr "B<MM_NOSEV>"
2091
2092 #. type: Plain text
2093 #: build/C/man3/fmtmsg.3:133
2094 msgid "No severity is printed."
2095 msgstr "重大度は表示されない。"
2096
2097 #. type: TP
2098 #: build/C/man3/fmtmsg.3:133
2099 #, no-wrap
2100 msgid "B<MM_HALT>"
2101 msgstr "B<MM_HALT>"
2102
2103 #. type: Plain text
2104 #: build/C/man3/fmtmsg.3:136
2105 msgid "This value is printed as HALT."
2106 msgstr "この値は HALT として表示される。"
2107
2108 #. type: TP
2109 #: build/C/man3/fmtmsg.3:136
2110 #, no-wrap
2111 msgid "B<MM_ERROR>"
2112 msgstr "B<MM_ERROR>"
2113
2114 #. type: Plain text
2115 #: build/C/man3/fmtmsg.3:139
2116 msgid "This value is printed as ERROR."
2117 msgstr "この値は ERROR として表示される。"
2118
2119 #. type: TP
2120 #: build/C/man3/fmtmsg.3:139
2121 #, no-wrap
2122 msgid "B<MM_WARNING>"
2123 msgstr "B<MM_WARNING>"
2124
2125 #. type: Plain text
2126 #: build/C/man3/fmtmsg.3:142
2127 msgid "This value is printed as WARNING."
2128 msgstr "この値は WARNING として表示される。"
2129
2130 #. type: TP
2131 #: build/C/man3/fmtmsg.3:142
2132 #, no-wrap
2133 msgid "B<MM_INFO>"
2134 msgstr "B<MM_INFO>"
2135
2136 #. type: Plain text
2137 #: build/C/man3/fmtmsg.3:145
2138 msgid "This value is printed as INFO."
2139 msgstr "この値は INFO として表示される。"
2140
2141 #. type: Plain text
2142 #: build/C/man3/fmtmsg.3:152
2143 msgid ""
2144 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2145 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2146 "print."
2147 msgstr ""
2148 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2149 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2150
2151 #. type: Plain text
2152 #: build/C/man3/fmtmsg.3:154
2153 msgid "The function can return 4 values:"
2154 msgstr "関数は 4 つの値を返す:"
2155
2156 #. type: TP
2157 #: build/C/man3/fmtmsg.3:154
2158 #, no-wrap
2159 msgid "B<MM_OK>"
2160 msgstr "B<MM_OK>"
2161
2162 #. type: Plain text
2163 #: build/C/man3/fmtmsg.3:157
2164 msgid "Everything went smooth."
2165 msgstr "全てがうまくいった。"
2166
2167 #. type: TP
2168 #: build/C/man3/fmtmsg.3:157
2169 #, no-wrap
2170 msgid "B<MM_NOTOK>"
2171 msgstr "B<MM_NOTOK>"
2172
2173 #. type: Plain text
2174 #: build/C/man3/fmtmsg.3:160
2175 msgid "Complete failure."
2176 msgstr "完全に失敗した。"
2177
2178 #. type: TP
2179 #: build/C/man3/fmtmsg.3:160
2180 #, no-wrap
2181 msgid "B<MM_NOMSG>"
2182 msgstr "B<MM_NOMSG>"
2183
2184 #. type: Plain text
2185 #: build/C/man3/fmtmsg.3:164
2186 msgid "Error writing to I<stderr>."
2187 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2188
2189 #. type: TP
2190 #: build/C/man3/fmtmsg.3:164
2191 #, no-wrap
2192 msgid "B<MM_NOCON>"
2193 msgstr "B<MM_NOCON>"
2194
2195 #. type: Plain text
2196 #: build/C/man3/fmtmsg.3:167
2197 msgid "Error writing to the console."
2198 msgstr "コンソールに書き込むときにエラーが起こった。"
2199
2200 #. type: SH
2201 #: build/C/man3/fmtmsg.3:167
2202 #, no-wrap
2203 msgid "ENVIRONMENT"
2204 msgstr "環境変数"
2205
2206 #. type: Plain text
2207 #: build/C/man3/fmtmsg.3:178
2208 msgid ""
2209 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2210 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2211 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2212 "separated list of valid keywords, then only the parts of the message "
2213 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2214 "\"severity\", \"text\", \"action\" and \"tag\"."
2215 msgstr ""
2216 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2217 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2218 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2219 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2220 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2221
2222 #. type: Plain text
2223 #: build/C/man3/fmtmsg.3:190
2224 msgid ""
2225 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2226 "levels.  By default, only the five severity levels described above are "
2227 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2228 "If the user puts B<SEV_LEVEL> with a format like"
2229 msgstr ""
2230 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2231 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2232 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2233 "B<SEV_LEVEL> を"
2234
2235 #. type: Plain text
2236 #: build/C/man3/fmtmsg.3:193
2237 msgid "SEV_LEVEL=[description[:description[:...]]]"
2238 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2239
2240 #. type: Plain text
2241 #: build/C/man3/fmtmsg.3:198
2242 msgid ""
2243 "in the environment of the process before the first call to B<fmtmsg>(), "
2244 "where each description is of the form"
2245 msgstr ""
2246 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2247 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2248 "指定された printstring を表示する。 各 description は"
2249
2250 #. type: Plain text
2251 #: build/C/man3/fmtmsg.3:201
2252 msgid "severity-keyword,level,printstring"
2253 msgstr "severity-keyword,level,printstring"
2254
2255 #. type: Plain text
2256 #: build/C/man3/fmtmsg.3:208
2257 msgid ""
2258 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2259 "addition to the standard levels 0-4), and use the indicated printstring when "
2260 "such a level occurs."
2261 msgstr "という形式である。"
2262
2263 #. type: Plain text
2264 #: build/C/man3/fmtmsg.3:222
2265 msgid ""
2266 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2267 "present.  The level part is a string representation of a number.  The "
2268 "numeric value must be a number greater than 4.  This value must be used in "
2269 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2270 "possible to overwrite any of the predefined classes.  The printstring is the "
2271 "string printed when a message of this class is processed by B<fmtmsg>()."
2272 msgstr ""
2273 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2274 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2275 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2276 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2277 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2278 "た場合に表示される文字列である。"
2279
2280 #. type: Plain text
2281 #: build/C/man3/fmtmsg.3:225
2282 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2283 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2284
2285 #. type: Plain text
2286 #: build/C/man3/fmtmsg.3:240
2287 msgid ""
2288 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2289 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2290 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2291 msgstr ""
2292 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2293 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2294 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2295
2296 #. type: Plain text
2297 #: build/C/man3/fmtmsg.3:244
2298 msgid ""
2299 "System V and UnixWare man pages tell us that these functions have been "
2300 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2301 "vlfmt()\", and will be removed later."
2302 msgstr ""
2303 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2304 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2305 "は削除される予定である」と書かれている。"
2306
2307 #. type: Plain text
2308 #: build/C/man3/fmtmsg.3:249
2309 #, no-wrap
2310 msgid ""
2311 "#include E<lt>stdio.hE<gt>\n"
2312 "#include E<lt>stdlib.hE<gt>\n"
2313 "#include E<lt>fmtmsg.hE<gt>\n"
2314 msgstr ""
2315 "#include E<lt>stdio.hE<gt>\n"
2316 "#include E<lt>stdlib.hE<gt>\n"
2317 "#include E<lt>fmtmsg.hE<gt>\n"
2318
2319 #. type: Plain text
2320 #: build/C/man3/fmtmsg.3:255
2321 #, no-wrap
2322 msgid ""
2323 "int\n"
2324 "main(void)\n"
2325 "{\n"
2326 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2327 "    int err;\n"
2328 msgstr ""
2329 "int\n"
2330 "main(void)\n"
2331 "{\n"
2332 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2333 "    int err;\n"
2334
2335 #. type: Plain text
2336 #: build/C/man3/fmtmsg.3:276
2337 #, no-wrap
2338 msgid ""
2339 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2340 "                \"unknown mount option\", \"See mount(8).\",\n"
2341 "                \"util-linux:mount:017\");\n"
2342 "    switch (err) {\n"
2343 "    case MM_OK:\n"
2344 "        break;\n"
2345 "    case MM_NOTOK:\n"
2346 "        printf(\"Nothing printed\\en\");\n"
2347 "        break;\n"
2348 "    case MM_NOMSG:\n"
2349 "        printf(\"Nothing printed to stderr\\en\");\n"
2350 "        break;\n"
2351 "    case MM_NOCON:\n"
2352 "        printf(\"No console output\\en\");\n"
2353 "        break;\n"
2354 "    default:\n"
2355 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2356 "    }\n"
2357 "    exit(EXIT_SUCCESS);\n"
2358 "}\n"
2359 msgstr ""
2360 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2361 "                \"unknown mount option\", \"See mount(8).\",\n"
2362 "                \"util-linux:mount:017\");\n"
2363 "    switch (err) {\n"
2364 "    case MM_OK:\n"
2365 "      break;\n"
2366 "    case MM_NOTOK:\n"
2367 "        printf(\"Nothing printed\\en\");\n"
2368 "        break;\n"
2369 "    case MM_NOMSG:\n"
2370 "        printf(\"Nothing printed to stderr\\en\");\n"
2371 "        break;\n"
2372 "    case MM_NOCON:\n"
2373 "        printf(\"No console output\\en\");\n"
2374 "        break;\n"
2375 "    default:\n"
2376 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2377 "    }\n"
2378 "    exit(EXIT_SUCCESS);\n"
2379 "}\n"
2380
2381 #. type: Plain text
2382 #: build/C/man3/fmtmsg.3:279
2383 msgid "The output should be:"
2384 msgstr "出力は"
2385
2386 #. type: Plain text
2387 #: build/C/man3/fmtmsg.3:283
2388 #, no-wrap
2389 msgid ""
2390 "    util-linux:mount: ERROR: unknown mount option\n"
2391 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2392 msgstr ""
2393 "    util-linux:mount: ERROR: unknown mount option\n"
2394 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2395
2396 #. type: Plain text
2397 #: build/C/man3/fmtmsg.3:286
2398 msgid "and after"
2399 msgstr "のようになり、"
2400
2401 #. type: Plain text
2402 #: build/C/man3/fmtmsg.3:289
2403 #, no-wrap
2404 msgid "    MSGVERB=text:action; export MSGVERB\n"
2405 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2406
2407 #. type: Plain text
2408 #: build/C/man3/fmtmsg.3:292
2409 msgid "the output becomes:"
2410 msgstr "を実行すると、次のようになる。"
2411
2412 #. type: Plain text
2413 #: build/C/man3/fmtmsg.3:296
2414 #, no-wrap
2415 msgid ""
2416 "    unknown mount option\n"
2417 "    TO FIX: See mount(8).\n"
2418 msgstr ""
2419 "    unknown mount option\n"
2420 "    TO FIX: See mount(8).\n"
2421
2422 #. type: Plain text
2423 #: build/C/man3/fmtmsg.3:300
2424 msgid "B<addseverity>(3), B<perror>(3)"
2425 msgstr "B<addseverity>(3), B<perror>(3)"
2426
2427 #. type: TH
2428 #: build/C/man3/fopen.3:44
2429 #, no-wrap
2430 msgid "FOPEN"
2431 msgstr "FOPEN"
2432
2433 #. type: TH
2434 #: build/C/man3/fopen.3:44
2435 #, no-wrap
2436 msgid "2012-04-22"
2437 msgstr "2012-04-22"
2438
2439 #. type: Plain text
2440 #: build/C/man3/fopen.3:47
2441 msgid "fopen, fdopen, freopen - stream open functions"
2442 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2443
2444 #. type: Plain text
2445 #: build/C/man3/fopen.3:52
2446 #, no-wrap
2447 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2448 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2449
2450 #. type: Plain text
2451 #: build/C/man3/fopen.3:54
2452 #, no-wrap
2453 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2454 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2455
2456 #. type: Plain text
2457 #: build/C/man3/fopen.3:56
2458 #, no-wrap
2459 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2460 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2461
2462 #. type: Plain text
2463 #: build/C/man3/fopen.3:65
2464 msgid ""
2465 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2466 msgstr ""
2467 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2468
2469 #. type: Plain text
2470 #: build/C/man3/fopen.3:71
2471 msgid ""
2472 "The B<fopen>()  function opens the file whose name is the string pointed to "
2473 "by I<path> and associates a stream with it."
2474 msgstr ""
2475 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2476 "びつける。"
2477
2478 #. type: Plain text
2479 #: build/C/man3/fopen.3:76
2480 msgid ""
2481 "The argument I<mode> points to a string beginning with one of the following "
2482 "sequences (possibly followed by additional characters, as described below):"
2483 msgstr ""
2484 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2485 "る (以下の述べる、追加の文字が後に続くこともある):"
2486
2487 #. type: TP
2488 #: build/C/man3/fopen.3:76
2489 #, no-wrap
2490 msgid "B<r>"
2491 msgstr "B<r>"
2492
2493 #. type: Plain text
2494 #: build/C/man3/fopen.3:80
2495 msgid ""
2496 "Open text file for reading.  The stream is positioned at the beginning of "
2497 "the file."
2498 msgstr ""
2499 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2500 "る。"
2501
2502 #. type: TP
2503 #: build/C/man3/fopen.3:80
2504 #, no-wrap
2505 msgid "B<r+>"
2506 msgstr "B<r+>"
2507
2508 #. type: Plain text
2509 #: build/C/man3/fopen.3:84
2510 msgid ""
2511 "Open for reading and writing.  The stream is positioned at the beginning of "
2512 "the file."
2513 msgstr ""
2514 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2515 "る。"
2516
2517 #. type: TP
2518 #: build/C/man3/fopen.3:84
2519 #, no-wrap
2520 msgid "B<w>"
2521 msgstr "B<w>"
2522
2523 #. type: Plain text
2524 #: build/C/man3/fopen.3:88
2525 msgid ""
2526 "Truncate file to zero length or create text file for writing.  The stream is "
2527 "positioned at the beginning of the file."
2528 msgstr ""
2529 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2530 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2531 "頭に位置される。"
2532
2533 #. type: TP
2534 #: build/C/man3/fopen.3:88
2535 #, no-wrap
2536 msgid "B<w+>"
2537 msgstr "B<w+>"
2538
2539 #. type: Plain text
2540 #: build/C/man3/fopen.3:94
2541 msgid ""
2542 "Open for reading and writing.  The file is created if it does not exist, "
2543 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2544 "file."
2545 msgstr ""
2546 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2547 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2548 "の先頭に位置される。"
2549
2550 #. type: TP
2551 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2552 #, no-wrap
2553 msgid "B<a>"
2554 msgstr "B<a>"
2555
2556 #. type: Plain text
2557 #: build/C/man3/fopen.3:99
2558 msgid ""
2559 "Open for appending (writing at end of file).  The file is created if it does "
2560 "not exist.  The stream is positioned at the end of the file."
2561 msgstr ""
2562 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2563 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2564
2565 #. type: TP
2566 #: build/C/man3/fopen.3:99
2567 #, no-wrap
2568 msgid "B<a+>"
2569 msgstr "B<a+>"
2570
2571 #. type: Plain text
2572 #: build/C/man3/fopen.3:105
2573 msgid ""
2574 "Open for reading and appending (writing at end of file).  The file is "
2575 "created if it does not exist.  The initial file position for reading is at "
2576 "the beginning of the file, but output is always appended to the end of the "
2577 "file."
2578 msgstr ""
2579 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2580 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2581 "あるが、 書き込みは常にファイルの最後に追加される。"
2582
2583 #. type: Plain text
2584 #: build/C/man3/fopen.3:118
2585 msgid ""
2586 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2587 "character or as a character between the characters in any of the two-"
2588 "character strings described above.  This is strictly for compatibility with "
2589 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2590 "systems, including Linux.  (Other systems may treat text files and binary "
2591 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2592 "O to a binary file and expect that your program may be ported to non-UNIX "
2593 "environments.)"
2594 msgstr ""
2595 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2596 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2597 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2598 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2599 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2600 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2601 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2602 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2603
2604 #. type: Plain text
2605 #: build/C/man3/fopen.3:121
2606 msgid "See NOTES below for details of glibc extensions for I<mode>."
2607 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2608
2609 #. type: Plain text
2610 #: build/C/man3/fopen.3:126
2611 msgid ""
2612 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2613 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2614 "umask value (see B<umask>(2))."
2615 msgstr ""
2616 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2617 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2618 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2619
2620 #. type: Plain text
2621 #: build/C/man3/fopen.3:141
2622 msgid ""
2623 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2624 "that ANSI C requires that a file positioning function intervene between "
2625 "output and input, unless an input operation encounters end-of-file.  (If "
2626 "this condition is not met, then a read is allowed to return the result of "
2627 "writes other than the most recent.)  Therefore it is good practice (and "
2628 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2629 "(3)  operation between write and read operations on such a stream.  This "
2630 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2631 "for its synchronizing side effect."
2632 msgstr ""
2633 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2634 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2635 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2636 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2637 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2638 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2639 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2640 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2641 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2642 "い)。"
2643
2644 #. type: Plain text
2645 #: build/C/man3/fopen.3:146
2646 msgid ""
2647 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2648 "causes all subsequent write operations to this stream to occur at end-of-"
2649 "file, as if preceded the call:"
2650 msgstr ""
2651 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2652 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2653 "かのように) ファイルの末尾で行われる。"
2654
2655 #. type: Plain text
2656 #: build/C/man3/fopen.3:149
2657 #, fuzzy, no-wrap
2658 #| msgid "    fseek(stream,0,SEEK_END);\n"
2659 msgid "    fseek(stream, 0, SEEK_END);\n"
2660 msgstr "    fseek(stream,0,SEEK_END);\n"
2661
2662 #. type: Plain text
2663 #: build/C/man3/fopen.3:171
2664 msgid ""
2665 "The B<fdopen>()  function associates a stream with the existing file "
2666 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2667 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2668 "file descriptor.  The file position indicator of the new stream is set to "
2669 "that belonging to I<fd>, and the error and end-of-file indicators are "
2670 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2671 "file descriptor is not dup'ed, and will be closed when the stream created by "
2672 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2673 "memory object is undefined."
2674 msgstr ""
2675 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2676 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2677 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2678 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2679 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2680 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2681 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2682 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2683
2684 #. type: Plain text
2685 #: build/C/man3/fopen.3:189
2686 msgid ""
2687 "The B<freopen>()  function opens the file whose name is the string pointed "
2688 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2689 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2690 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2691 "function is to change the file associated with a standard text stream "
2692 "(I<stderr>, I<stdin>, or I<stdout>)."
2693 msgstr ""
2694 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2695 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2696 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2697 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2698 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2699
2700 #. type: Plain text
2701 #: build/C/man3/fopen.3:201
2702 msgid ""
2703 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2704 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2705 "indicate the error."
2706 msgstr ""
2707 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2708 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2709
2710 #. type: TP
2711 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2712 #: build/C/man3/getline.3:123 build/C/man2/llseek.2:77
2713 #: build/C/man2/lseek.2:166 build/C/man2/pipe.2:102 build/C/man2/read.2:126
2714 #: build/C/man2/read.2:137 build/C/man2/readlink.2:95
2715 #: build/C/man2/readlink.2:104 build/C/man2/readv.2:200
2716 #: build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:566
2717 #: build/C/man2/write.2:154
2718 #, no-wrap
2719 msgid "B<EINVAL>"
2720 msgstr "B<EINVAL>"
2721
2722 #. type: Plain text
2723 #: build/C/man3/fopen.3:212
2724 msgid ""
2725 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2726 "invalid."
2727 msgstr ""
2728 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2729
2730 #. type: Plain text
2731 #: build/C/man3/fopen.3:222
2732 msgid ""
2733 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2734 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2735 msgstr ""
2736 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2737 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2738 "する。"
2739
2740 #. type: Plain text
2741 #: build/C/man3/fopen.3:229
2742 msgid ""
2743 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2744 "errors specified for the routine B<open>(2)."
2745 msgstr ""
2746 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2747 "があり、 その時は対応する値に I<errno> をセットする。"
2748
2749 #. type: Plain text
2750 #: build/C/man3/fopen.3:236
2751 msgid ""
2752 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2753 "errors specified for the routine B<fcntl>(2)."
2754 msgstr ""
2755 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2756 "とがあり、 その時は対応する値に I<errno> をセットする。"
2757
2758 #. type: Plain text
2759 #: build/C/man3/fopen.3:246
2760 msgid ""
2761 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2762 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2763 msgstr ""
2764 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2765 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2766 "トする。"
2767
2768 #. type: Plain text
2769 #: build/C/man3/fopen.3:255
2770 msgid ""
2771 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2772 "()  function conforms to POSIX.1-1990."
2773 msgstr ""
2774 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2775 "は POSIX.1-1990 に準拠している。"
2776
2777 #. type: SS
2778 #: build/C/man3/fopen.3:256
2779 #, fuzzy, no-wrap
2780 #| msgid "Glibc Notes"
2781 msgid "Glibc notes"
2782 msgstr "glibc での注意"
2783
2784 #. type: Plain text
2785 #: build/C/man3/fopen.3:259
2786 msgid ""
2787 "The GNU C library allows the following extensions for the string specified "
2788 "in I<mode>:"
2789 msgstr ""
2790 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2791 "いる:"
2792
2793 #. type: TP
2794 #: build/C/man3/fopen.3:259
2795 #, no-wrap
2796 msgid "B<c> (since glibc 2.3.3)"
2797 msgstr "B<c> (glibc 2.3.3 以降)"
2798
2799 #. type: Plain text
2800 #: build/C/man3/fopen.3:266
2801 msgid ""
2802 "Do not make the open operation, or subsequent read and write operations, "
2803 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2804 msgstr ""
2805 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2806 "(cancellation points) を作成しない。\n"
2807 "このフラグは B<fdopen>() では無視される。"
2808
2809 #. type: TP
2810 #: build/C/man3/fopen.3:266
2811 #, no-wrap
2812 msgid "B<e> (since glibc 2.7)"
2813 msgstr "B<e> (glibc 2.7 以降)"
2814
2815 #. type: Plain text
2816 #: build/C/man3/fopen.3:276
2817 msgid ""
2818 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2819 "information.  This flag is ignored for B<fdopen>()."
2820 msgstr ""
2821 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2822 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2823
2824 #. type: TP
2825 #: build/C/man3/fopen.3:276
2826 #, no-wrap
2827 msgid "B<m> (since glibc 2.3)"
2828 msgstr "B<m> (glibc 2.3 以降)"
2829
2830 #.  As at glibc 2.4:
2831 #. type: Plain text
2832 #: build/C/man3/fopen.3:288
2833 msgid ""
2834 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2835 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is only attempted "
2836 "for a file opened for reading."
2837 msgstr ""
2838 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2839 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2840 "オープンするファイルについてだけである。"
2841
2842 #. type: TP
2843 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2844 #, no-wrap
2845 msgid "B<x>"
2846 msgstr "B<x>"
2847
2848 #.  Since glibc 2.0?
2849 #.  FIXME C11 specifies this flag
2850 #. type: Plain text
2851 #: build/C/man3/fopen.3:305
2852 msgid ""
2853 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2854 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2855 "This flag is ignored for B<fdopen>()."
2856 msgstr ""
2857 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2858 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2859 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2860
2861 #. type: Plain text
2862 #: build/C/man3/fopen.3:313
2863 msgid ""
2864 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2865 "the following syntax in I<mode>:"
2866 msgstr ""
2867 "上記の文字に加えて、\n"
2868 "B<fopen>() と B<freopen>() では I<mode> に\n"
2869 "以下の書式を 指定することができる。"
2870
2871 #. type: Plain text
2872 #: build/C/man3/fopen.3:315
2873 msgid "B< ,ccs=>I<string>"
2874 msgstr "B< ,ccs=>I<string>"
2875
2876 #. type: Plain text
2877 #: build/C/man3/fopen.3:331
2878 msgid ""
2879 "The given I<string> is taken as the name of a coded character set and the "
2880 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2881 "functions convert I/O to and from the character set I<string>.  If the B<,"
2882 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2883 "stream is determined by the first file operation.  If that operation is a "
2884 "wide-character operation, the stream is marked wide-oriented, and functions "
2885 "to convert to the coded character set are loaded."
2886 msgstr ""
2887 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2888 "ストリームではワイド文字のストリームとして扱われる。\n"
2889 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2890 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2891 "ストリームをワイド文字のストリームとして扱うかは\n"
2892 "最初のファイル操作時に決定される。\n"
2893 "最初のファイル操作がワイド文字操作であった場合は、\n"
2894 "そのストリームはワイド文字のストリームとして扱われ、\n"
2895 "符号化文字集合との変換を行う関数が読み込まれる。"
2896
2897 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2898 #. type: Plain text
2899 #: build/C/man3/fopen.3:348
2900 msgid ""
2901 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2902 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
2903 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2904 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2905 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2906 "B<fdopen>()  parses at most 5 characters in I<mode>."
2907 msgstr ""
2908 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2909 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2910 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2911 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2912 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2913 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2914
2915 #. type: Plain text
2916 #: build/C/man3/fopen.3:354
2917 msgid ""
2918 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2919 msgstr ""
2920 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2921
2922 #. type: TH
2923 #: build/C/man3/fopencookie.3:26
2924 #, no-wrap
2925 msgid "FOPENCOOKIE"
2926 msgstr "FOPENCOOKIE"
2927
2928 #. type: TH
2929 #: build/C/man3/fopencookie.3:26
2930 #, no-wrap
2931 msgid "2012-04-30"
2932 msgstr "2012-04-30"
2933
2934 #. type: TH
2935 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31
2936 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
2937 #: build/C/man2/open.2:52 build/C/man2/pipe.2:36 build/C/man2/read.2:35
2938 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32
2939 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13
2940 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
2941 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
2942 #, no-wrap
2943 msgid "Linux"
2944 msgstr "Linux"
2945
2946 #. type: Plain text
2947 #: build/C/man3/fopencookie.3:29
2948 msgid "fopencookie - opening a custom stream"
2949 msgstr ""
2950
2951 #. type: Plain text
2952 #: build/C/man3/fopencookie.3:36
2953 #, no-wrap
2954 msgid ""
2955 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2956 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2957 msgstr ""
2958 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2959 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2960
2961 #. type: Plain text
2962 #: build/C/man3/fopencookie.3:49
2963 msgid ""
2964 "The B<fopencookie>()  function allows the programmer to create a custom "
2965 "implementation for a standard I/O stream.  This implementation can store the "
2966 "stream's data at a location of its own choosing; for example, B<fopencookie>"
2967 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
2968 "to data that is stored in a buffer in memory."
2969 msgstr ""
2970
2971 #. type: Plain text
2972 #: build/C/man3/fopencookie.3:51
2973 msgid "In order to create a custom stream the programmer must:"
2974 msgstr ""
2975
2976 #. type: IP
2977 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
2978 #: build/C/man3/fopencookie.3:65 build/C/man3/scanf.3:634
2979 #: build/C/man3/scanf.3:639 build/C/man3/scanf.3:645
2980 #: build/C/man7/symlink.7:249 build/C/man7/symlink.7:259
2981 #: build/C/man7/symlink.7:289 build/C/man7/symlink.7:349
2982 #: build/C/man7/symlink.7:378 build/C/man7/symlink.7:407
2983 #: build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
2984 #, no-wrap
2985 msgid "*"
2986 msgstr "*"
2987
2988 #. type: Plain text
2989 #: build/C/man3/fopencookie.3:54
2990 msgid ""
2991 "Implement four \"hook\" functions that are used internally by the standard I/"
2992 "O library when performing I/O on the stream."
2993 msgstr ""
2994
2995 #. type: Plain text
2996 #: build/C/man3/fopencookie.3:65
2997 msgid ""
2998 "Define a \"cookie\" data type, a structure that provides bookkeeping "
2999 "information (e.g., where to store data) used by the aforementioned hook "
3000 "functions.  The standard I/O package knows nothing about the contents of "
3001 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3002 "()), but automatically supplies the cookie as the first argument when "
3003 "calling the hook functions."
3004 msgstr ""
3005
3006 #. type: Plain text
3007 #: build/C/man3/fopencookie.3:70
3008 msgid ""
3009 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3010 "hook functions with that stream."
3011 msgstr ""
3012
3013 #. type: Plain text
3014 #: build/C/man3/fopencookie.3:78
3015 msgid ""
3016 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3017 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3018 "operate on that stream."
3019 msgstr ""
3020
3021 #. type: Plain text
3022 #: build/C/man3/fopencookie.3:85
3023 msgid ""
3024 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3025 "to be associated with the new stream.  This pointer is supplied as the first "
3026 "argument when the standard I/O library invokes any of the hook functions "
3027 "described below."
3028 msgstr ""
3029
3030 #. type: Plain text
3031 #: build/C/man3/fopencookie.3:101
3032 msgid ""
3033 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3034 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3035 "See B<fopen>(3)  for details."
3036 msgstr ""
3037
3038 #. type: Plain text
3039 #: build/C/man3/fopencookie.3:107
3040 msgid ""
3041 "The I<io_funcs> argument is a structure that contains four fields pointing "
3042 "to the programmer-defined hook functions that are used to implement this "
3043 "stream.  The structure is defined as follows"
3044 msgstr ""
3045
3046 #. type: Plain text
3047 #: build/C/man3/fopencookie.3:116
3048 #, no-wrap
3049 msgid ""
3050 "struct cookie_io_functions_t {\n"
3051 "    cookie_read_function_t  *read;\n"
3052 "    cookie_write_function_t *write;\n"
3053 "    cookie_seek_function_t  *seek;\n"
3054 "    cookie_close_function_t *close;\n"
3055 "};\n"
3056 msgstr ""
3057 "struct cookie_io_functions_t {\n"
3058 "    cookie_read_function_t  *read;\n"
3059 "    cookie_write_function_t *write;\n"
3060 "    cookie_seek_function_t  *seek;\n"
3061 "    cookie_close_function_t *close;\n"
3062 "};\n"
3063
3064 #. type: Plain text
3065 #: build/C/man3/fopencookie.3:120
3066 msgid "The four fields are as follows:"
3067 msgstr ""
3068
3069 #. type: TP
3070 #: build/C/man3/fopencookie.3:120
3071 #, no-wrap
3072 msgid "I<cookie_read_function_t *read>"
3073 msgstr "I<cookie_read_function_t *read>"
3074
3075 #. type: Plain text
3076 #: build/C/man3/fopencookie.3:124
3077 msgid ""
3078 "This function implements read operations for the stream.  When called, it "
3079 "receives three arguments:"
3080 msgstr ""
3081
3082 #. type: Plain text
3083 #: build/C/man3/fopencookie.3:126
3084 #, no-wrap
3085 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3086 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3087
3088 #. type: Plain text
3089 #: build/C/man3/fopencookie.3:141
3090 msgid ""
3091 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3092 "input data can be placed and the size of that buffer.  As its function "
3093 "result, the I<read> function should return the number of bytes copied into "
3094 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3095 "update the stream offset appropriately."
3096 msgstr ""
3097
3098 #. type: Plain text
3099 #: build/C/man3/fopencookie.3:146
3100 msgid ""
3101 "If I<*read> is a NULL pointer, then reads from the custom stream always "
3102 "return end of file."
3103 msgstr ""
3104
3105 #. type: TP
3106 #: build/C/man3/fopencookie.3:146
3107 #, no-wrap
3108 msgid "I<cookie_write_function_t *write>"
3109 msgstr "I<cookie_write_function_t *write>"
3110
3111 #. type: Plain text
3112 #: build/C/man3/fopencookie.3:150
3113 msgid ""
3114 "This function implements write operations for the stream.  When called, it "
3115 "receives three arguments:"
3116 msgstr ""
3117
3118 #. type: Plain text
3119 #: build/C/man3/fopencookie.3:152
3120 #, no-wrap
3121 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3122 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3123
3124 #. type: Plain text
3125 #: build/C/man3/fopencookie.3:168
3126 msgid ""
3127 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3128 "output to the stream and the size of that buffer.  As its function result, "
3129 "the I<write> function should return the number of bytes copied from I<buf>, "
3130 "or 0 on error.  (The function must not return a negative value.)  The "
3131 "I<write> function should update the stream offset appropriately."
3132 msgstr ""
3133
3134 #. type: Plain text
3135 #: build/C/man3/fopencookie.3:173
3136 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3137 msgstr ""
3138
3139 #. type: TP
3140 #: build/C/man3/fopencookie.3:173
3141 #, no-wrap
3142 msgid "I<cookie_seek_function_t *seek>"
3143 msgstr "I<cookie_seek_function_t *seek>"
3144
3145 #. type: Plain text
3146 #: build/C/man3/fopencookie.3:177
3147 msgid ""
3148 "This function implements seek operations on the stream.  When called, it "
3149 "receives three arguments:"
3150 msgstr ""
3151
3152 #. type: Plain text
3153 #: build/C/man3/fopencookie.3:179
3154 #, no-wrap
3155 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3156 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3157
3158 #. type: Plain text
3159 #: build/C/man3/fopencookie.3:185
3160 msgid ""
3161 "The I<*offset> argument specifies the new file offset depending on which of "
3162 "the following three values is supplied in I<whence>:"
3163 msgstr ""
3164
3165 #. type: TP
3166 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3167 #, no-wrap
3168 msgid "B<SEEK_SET>"
3169 msgstr "B<SEEK_SET>"
3170
3171 #. type: Plain text
3172 #: build/C/man3/fopencookie.3:191
3173 msgid ""
3174 "The stream offset should be set I<*offset> bytes from the start of the "
3175 "stream."
3176 msgstr ""
3177
3178 #. type: TP
3179 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3180 #, no-wrap
3181 msgid "B<SEEK_CUR>"
3182 msgstr "B<SEEK_CUR>"
3183
3184 #. type: Plain text
3185 #: build/C/man3/fopencookie.3:195
3186 msgid "I<*offset> should be added to the current stream offset."
3187 msgstr ""
3188
3189 #. type: TP
3190 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3191 #, no-wrap
3192 msgid "B<SEEK_END>"
3193 msgstr "B<SEEK_END>"
3194
3195 #. type: Plain text
3196 #: build/C/man3/fopencookie.3:199
3197 msgid ""
3198 "The stream offset should be set to the size of the stream plus I<*offset>."
3199 msgstr ""
3200
3201 #. type: Plain text
3202 #: build/C/man3/fopencookie.3:206
3203 msgid ""
3204 "Before returning, the I<seek> function should update I<*offset> to indicate "
3205 "the new stream offset."
3206 msgstr ""
3207
3208 #. type: Plain text
3209 #: build/C/man3/fopencookie.3:210
3210 msgid ""
3211 "As its function result, the I<seek> function should return 0 on success, and "
3212 "-1 on error."
3213 msgstr ""
3214
3215 #. type: Plain text
3216 #: build/C/man3/fopencookie.3:215
3217 msgid ""
3218 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3219 "operations on the stream."
3220 msgstr ""
3221
3222 #. type: TP
3223 #: build/C/man3/fopencookie.3:215
3224 #, no-wrap
3225 msgid "I<cookie_close_function_t *close>"
3226 msgstr "I<cookie_close_function_t *close>"
3227
3228 #. type: Plain text
3229 #: build/C/man3/fopencookie.3:221
3230 msgid ""
3231 "This function closes the stream.  The hook function can do things such as "
3232 "freeing buffers allocated for the stream.  When called, it receives one "
3233 "argument:"
3234 msgstr ""
3235
3236 #. type: Plain text
3237 #: build/C/man3/fopencookie.3:223
3238 #, no-wrap
3239 msgid "    int close(void *cookie);\n"
3240 msgstr "    int close(void *cookie);\n"
3241
3242 #. type: Plain text
3243 #: build/C/man3/fopencookie.3:228
3244 msgid ""
3245 "The I<cookie> argument is the cookie that the programmer supplied when "
3246 "calling B<fopencookie>()."
3247 msgstr ""
3248
3249 #. type: Plain text
3250 #: build/C/man3/fopencookie.3:234
3251 msgid ""
3252 "As its function result, the I<close> function should return 0 on success, "
3253 "and B<EOF> on error."
3254 msgstr ""
3255
3256 #. type: Plain text
3257 #: build/C/man3/fopencookie.3:238
3258 msgid ""
3259 "If I<*close> is NULL, then no special action is performed when the stream is "
3260 "closed."
3261 msgstr ""
3262
3263 #.  .SH ERRORS
3264 #.  It's not clear if errno ever gets set...
3265 #. type: Plain text
3266 #: build/C/man3/fopencookie.3:245
3267 msgid ""
3268 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3269 "NULL is returned."
3270 msgstr ""
3271
3272 #. type: Plain text
3273 #: build/C/man3/fopencookie.3:247
3274 msgid "This function is a nonstandard GNU extension."
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man3/fopencookie.3:256
3279 msgid ""
3280 "The program below implements a custom stream whose functionality is similar "
3281 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3282 "stream whose data is stored in a memory buffer.  The program writes its "
3283 "command-line arguments to the stream, and then seeks through the stream "
3284 "reading two out of every five characters and writing them to standard "
3285 "output.  The following shell session demonstrates the use of the program:"
3286 msgstr ""
3287
3288 #. type: Plain text
3289 #: build/C/man3/fopencookie.3:264
3290 #, no-wrap
3291 msgid ""
3292 "$B< ./a.out \\(aqhello world\\(aq>\n"
3293 "/he/\n"
3294 "/ w/\n"
3295 "/d/\n"
3296 "Reached end of file\n"
3297 msgstr ""
3298 "$B< ./a.out \\(aqhello world\\(aq>\n"
3299 "/he/\n"
3300 "/ w/\n"
3301 "/d/\n"
3302 "Reached end of file\n"
3303
3304 #. type: Plain text
3305 #: build/C/man3/fopencookie.3:271
3306 msgid ""
3307 "Note that a more general version of the program below could be improved to "
3308 "more robustly handle various error situations (e.g., opening a stream with a "
3309 "cookie that already has an open stream; closing a stream that has already "
3310 "been closed)."
3311 msgstr ""
3312
3313 #. type: Plain text
3314 #: build/C/man3/fopencookie.3:280
3315 #, no-wrap
3316 msgid ""
3317 "#define _GNU_SOURCE\n"
3318 "#include E<lt>sys/types.hE<gt>\n"
3319 "#include E<lt>stdio.hE<gt>\n"
3320 "#include E<lt>stdlib.hE<gt>\n"
3321 "#include E<lt>unistd.hE<gt>\n"
3322 "#include E<lt>string.hE<gt>\n"
3323 msgstr ""
3324 "#define _GNU_SOURCE\n"
3325 "#include E<lt>sys/types.hE<gt>\n"
3326 "#include E<lt>stdio.hE<gt>\n"
3327 "#include E<lt>stdlib.hE<gt>\n"
3328 "#include E<lt>unistd.hE<gt>\n"
3329 "#include E<lt>string.hE<gt>\n"
3330
3331 #. type: Plain text
3332 #: build/C/man3/fopencookie.3:282
3333 #, no-wrap
3334 msgid "#define INIT_BUF_SIZE 4\n"
3335 msgstr "#define INIT_BUF_SIZE 4\n"
3336
3337 #. type: Plain text
3338 #: build/C/man3/fopencookie.3:289
3339 #, no-wrap
3340 msgid ""
3341 "struct memfile_cookie {\n"
3342 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3343 "    size_t  allocated;  /* Size of buf */\n"
3344 "    size_t  endpos;     /* Number of characters in buf */\n"
3345 "    off_t   offset;     /* Current file offset in buf */\n"
3346 "};\n"
3347 msgstr ""
3348 "struct memfile_cookie {\n"
3349 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3350 "    size_t  allocated;  /* Size of buf */\n"
3351 "    size_t  endpos;     /* Number of characters in buf */\n"
3352 "    off_t   offset;     /* Current file offset in buf */\n"
3353 "};\n"
3354
3355 #. type: Plain text
3356 #: build/C/man3/fopencookie.3:295
3357 #, no-wrap
3358 msgid ""
3359 "ssize_t\n"
3360 "memfile_write(void *c, const char *buf, size_t size)\n"
3361 "{\n"
3362 "    char *new_buff;\n"
3363 "    struct memfile_cookie *cookie = c;\n"
3364 msgstr ""
3365 "ssize_t\n"
3366 "memfile_write(void *c, const char *buf, size_t size)\n"
3367 "{\n"
3368 "    char *new_buff;\n"
3369 "    struct memfile_cookie *cookie = c;\n"
3370
3371 #. type: Plain text
3372 #: build/C/man3/fopencookie.3:297
3373 #, no-wrap
3374 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3375 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3376
3377 #. type: Plain text
3378 #: build/C/man3/fopencookie.3:307
3379 #, no-wrap
3380 msgid ""
3381 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3382 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3383 "        if (new_buff == NULL) {\n"
3384 "            return -1;\n"
3385 "        } else {\n"
3386 "            cookie-E<gt>allocated *= 2;\n"
3387 "            cookie-E<gt>buf = new_buff;\n"
3388 "        }\n"
3389 "    }\n"
3390 msgstr ""
3391 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3392 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3393 "        if (new_buff == NULL) {\n"
3394 "            return -1;\n"
3395 "        } else {\n"
3396 "            cookie-E<gt>allocated *= 2;\n"
3397 "            cookie-E<gt>buf = new_buff;\n"
3398 "        }\n"
3399 "    }\n"
3400
3401 #. type: Plain text
3402 #: build/C/man3/fopencookie.3:309
3403 #, no-wrap
3404 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3405 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3406
3407 #. type: Plain text
3408 #: build/C/man3/fopencookie.3:313
3409 #, no-wrap
3410 msgid ""
3411 "    cookie-E<gt>offset += size;\n"
3412 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3413 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3414 msgstr ""
3415 "    cookie-E<gt>offset += size;\n"
3416 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3417 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3418
3419 #. type: Plain text
3420 #: build/C/man3/fopencookie.3:316
3421 #, no-wrap
3422 msgid ""
3423 "    return size;\n"
3424 "}\n"
3425 msgstr ""
3426 "    return size;\n"
3427 "}\n"
3428
3429 #. type: Plain text
3430 #: build/C/man3/fopencookie.3:322
3431 #, no-wrap
3432 msgid ""
3433 "ssize_t\n"
3434 "memfile_read(void *c, char *buf, size_t size)\n"
3435 "{\n"
3436 "    ssize_t xbytes;\n"
3437 "    struct memfile_cookie *cookie = c;\n"
3438 msgstr ""
3439 "ssize_t\n"
3440 "memfile_read(void *c, char *buf, size_t size)\n"
3441 "{\n"
3442 "    ssize_t xbytes;\n"
3443 "    struct memfile_cookie *cookie = c;\n"
3444
3445 #. type: Plain text
3446 #: build/C/man3/fopencookie.3:324
3447 #, no-wrap
3448 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3449 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3450
3451 #. type: Plain text
3452 #: build/C/man3/fopencookie.3:330
3453 #, no-wrap
3454 msgid ""
3455 "    xbytes = size;\n"
3456 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3457 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3458 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3459 "       xbytes = 0;\n"
3460 msgstr ""
3461 "    xbytes = size;\n"
3462 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3463 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3464 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3465 "       xbytes = 0;\n"
3466
3467 #. type: Plain text
3468 #: build/C/man3/fopencookie.3:332
3469 #, no-wrap
3470 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3471 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3472
3473 #. type: Plain text
3474 #: build/C/man3/fopencookie.3:336
3475 #, no-wrap
3476 msgid ""
3477 "    cookie-E<gt>offset += xbytes;\n"
3478 "    return xbytes;\n"
3479 "}\n"
3480 msgstr ""
3481 "    cookie-E<gt>offset += xbytes;\n"
3482 "    return xbytes;\n"
3483 "}\n"
3484
3485 #. type: Plain text
3486 #: build/C/man3/fopencookie.3:342
3487 #, no-wrap
3488 msgid ""
3489 "int\n"
3490 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3491 "{\n"
3492 "    off64_t new_offset;\n"
3493 "    struct memfile_cookie *cookie = c;\n"
3494 msgstr ""
3495 "int\n"
3496 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3497 "{\n"
3498 "    off64_t new_offset;\n"
3499 "    struct memfile_cookie *cookie = c;\n"
3500
3501 #. type: Plain text
3502 #: build/C/man3/fopencookie.3:351
3503 #, no-wrap
3504 msgid ""
3505 "    if (whence == SEEK_SET)\n"
3506 "        new_offset = *offset;\n"
3507 "    else if (whence == SEEK_END)\n"
3508 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3509 "    else if (whence == SEEK_CUR)\n"
3510 "        new_offset = cookie-E<gt>offset + *offset;\n"
3511 "    else\n"
3512 "        return -1;\n"
3513 msgstr ""
3514 "    if (whence == SEEK_SET)\n"
3515 "        new_offset = *offset;\n"
3516 "    else if (whence == SEEK_END)\n"
3517 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3518 "    else if (whence == SEEK_CUR)\n"
3519 "        new_offset = cookie-E<gt>offset + *offset;\n"
3520 "    else\n"
3521 "        return -1;\n"
3522
3523 #. type: Plain text
3524 #: build/C/man3/fopencookie.3:354
3525 #, no-wrap
3526 msgid ""
3527 "    if (new_offset E<lt> 0)\n"
3528 "        return -1;\n"
3529 msgstr ""
3530 "    if (new_offset E<lt> 0)\n"
3531 "        return -1;\n"
3532
3533 #. type: Plain text
3534 #: build/C/man3/fopencookie.3:359
3535 #, no-wrap
3536 msgid ""
3537 "    cookie-E<gt>offset = new_offset;\n"
3538 "    *offset = new_offset;\n"
3539 "    return 0;\n"
3540 "}\n"
3541 msgstr ""
3542 "    cookie-E<gt>offset = new_offset;\n"
3543 "    *offset = new_offset;\n"
3544 "    return 0;\n"
3545 "}\n"
3546
3547 #. type: Plain text
3548 #: build/C/man3/fopencookie.3:364
3549 #, no-wrap
3550 msgid ""
3551 "int\n"
3552 "memfile_close(void *c)\n"
3553 "{\n"
3554 "    struct memfile_cookie *cookie = c;\n"
3555 msgstr ""
3556 "int\n"
3557 "memfile_close(void *c)\n"
3558 "{\n"
3559 "    struct memfile_cookie *cookie = c;\n"
3560
3561 #. type: Plain text
3562 #: build/C/man3/fopencookie.3:368
3563 #, no-wrap
3564 msgid ""
3565 "    free(cookie-E<gt>buf);\n"
3566 "    cookie-E<gt>allocated = 0;\n"
3567 "    cookie-E<gt>buf = NULL;\n"
3568 msgstr ""
3569 "    free(cookie-E<gt>buf);\n"
3570 "    cookie-E<gt>allocated = 0;\n"
3571 "    cookie-E<gt>buf = NULL;\n"
3572
3573 #. type: Plain text
3574 #: build/C/man3/fopencookie.3:371
3575 #, no-wrap
3576 msgid ""
3577 "    return 0;\n"
3578 "}\n"
3579 msgstr ""
3580 "    return 0;\n"
3581 "}\n"
3582
3583 #. type: Plain text
3584 #: build/C/man3/fopencookie.3:387
3585 #, no-wrap
3586 msgid ""
3587 "int\n"
3588 "main(int argc, char *argv[])\n"
3589 "{\n"
3590 "    cookie_io_functions_t  memfile_func = {\n"
3591 "        .read  = memfile_read,\n"
3592 "        .write = memfile_write,\n"
3593 "        .seek  = memfile_seek,\n"
3594 "        .close = memfile_close\n"
3595 "    };\n"
3596 "    FILE *fp;\n"
3597 "    struct memfile_cookie mycookie;\n"
3598 "    ssize_t nread;\n"
3599 "    long p;\n"
3600 "    int j;\n"
3601 "    char buf[1000];\n"
3602 msgstr ""
3603 "int\n"
3604 "main(int argc, char *argv[])\n"
3605 "{\n"
3606 "    cookie_io_functions_t  memfile_func = {\n"
3607 "        .read  = memfile_read,\n"
3608 "        .write = memfile_write,\n"
3609 "        .seek  = memfile_seek,\n"
3610 "        .close = memfile_close\n"
3611 "    };\n"
3612 "    FILE *fp;\n"
3613 "    struct memfile_cookie mycookie;\n"
3614 "    ssize_t nread;\n"
3615 "    long p;\n"
3616 "    int j;\n"
3617 "    char buf[1000];\n"
3618
3619 #. type: Plain text
3620 #: build/C/man3/fopencookie.3:389
3621 #, no-wrap
3622 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3623 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3624
3625 #. type: Plain text
3626 #: build/C/man3/fopencookie.3:395
3627 #, no-wrap
3628 msgid ""
3629 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3630 "    if (mycookie.buf == NULL) {\n"
3631 "        perror(\"malloc\");\n"
3632 "        exit(EXIT_FAILURE);\n"
3633 "    }\n"
3634 msgstr ""
3635 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3636 "    if (mycookie.buf == NULL) {\n"
3637 "        perror(\"malloc\");\n"
3638 "        exit(EXIT_FAILURE);\n"
3639 "    }\n"
3640
3641 #. type: Plain text
3642 #: build/C/man3/fopencookie.3:399
3643 #, no-wrap
3644 msgid ""
3645 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3646 "    mycookie.offset = 0;\n"
3647 "    mycookie.endpos = 0;\n"
3648 msgstr ""
3649 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3650 "    mycookie.offset = 0;\n"
3651 "    mycookie.endpos = 0;\n"
3652
3653 #. type: Plain text
3654 #: build/C/man3/fopencookie.3:405
3655 #, no-wrap
3656 msgid ""
3657 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3658 "    if (fp == NULL) {\n"
3659 "        perror(\"fopencookie\");\n"
3660 "        exit(EXIT_FAILURE);\n"
3661 "    }\n"
3662 msgstr ""
3663 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3664 "    if (fp == NULL) {\n"
3665 "        perror(\"fopencookie\");\n"
3666 "        exit(EXIT_FAILURE);\n"
3667 "    }\n"
3668
3669 #. type: Plain text
3670 #: build/C/man3/fopencookie.3:407
3671 #, no-wrap
3672 msgid "    /* Write command-line arguments to our file */\n"
3673 msgstr "    /* Write command-line arguments to our file */\n"
3674
3675 #. type: Plain text
3676 #: build/C/man3/fopencookie.3:413
3677 #, no-wrap
3678 msgid ""
3679 "    for (j = 1; j E<lt> argc; j++)\n"
3680 "        if (fputs(argv[j], fp) == EOF) {\n"
3681 "            perror(\"fputs\");\n"
3682 "            exit(EXIT_FAILURE);\n"
3683 "        }\n"
3684 msgstr ""
3685 "    for (j = 1; j E<lt> argc; j++)\n"
3686 "        if (fputs(argv[j], fp) == EOF) {\n"
3687 "            perror(\"fputs\");\n"
3688 "            exit(EXIT_FAILURE);\n"
3689 "        }\n"
3690
3691 #. type: Plain text
3692 #: build/C/man3/fopencookie.3:415
3693 #, no-wrap
3694 msgid "    /* Read two bytes out of every five, until EOF */\n"
3695 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3696
3697 #. type: Plain text
3698 #: build/C/man3/fopencookie.3:430
3699 #, no-wrap
3700 msgid ""
3701 "    for (p = 0; ; p += 5) {\n"
3702 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3703 "            perror(\"fseek\");\n"
3704 "            exit(EXIT_FAILURE);\n"
3705 "        }\n"
3706 "        nread = fread(buf, 1, 2, fp);\n"
3707 "        if (nread == -1) {\n"
3708 "            perror(\"fread\");\n"
3709 "            exit(EXIT_FAILURE);\n"
3710 "        }\n"
3711 "        if (nread == 0) {\n"
3712 "            printf(\"Reached end of file\\en\");\n"
3713 "            break;\n"
3714 "        }\n"
3715 msgstr ""
3716 "    for (p = 0; ; p += 5) {\n"
3717 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3718 "            perror(\"fseek\");\n"
3719 "            exit(EXIT_FAILURE);\n"
3720 "        }\n"
3721 "        nread = fread(buf, 1, 2, fp);\n"
3722 "        if (nread == -1) {\n"
3723 "            perror(\"fread\");\n"
3724 "            exit(EXIT_FAILURE);\n"
3725 "        }\n"
3726 "        if (nread == 0) {\n"
3727 "            printf(\"Reached end of file\\en\");\n"
3728 "            break;\n"
3729 "        }\n"
3730
3731 #. type: Plain text
3732 #: build/C/man3/fopencookie.3:433
3733 #, no-wrap
3734 msgid ""
3735 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3736 "    }\n"
3737 msgstr ""
3738 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3739 "    }\n"
3740
3741 #. type: Plain text
3742 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
3743 #, no-wrap
3744 msgid ""
3745 "    exit(EXIT_SUCCESS);\n"
3746 "}\n"
3747 msgstr ""
3748 "    exit(EXIT_SUCCESS);\n"
3749 "}\n"
3750
3751 #. type: Plain text
3752 #: build/C/man3/fopencookie.3:442
3753 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3754 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3755
3756 #. type: TH
3757 #: build/C/man3/fpurge.3:25
3758 #, no-wrap
3759 msgid "FPURGE"
3760 msgstr "FPURGE"
3761
3762 #. type: TH
3763 #: build/C/man3/fpurge.3:25
3764 #, no-wrap
3765 msgid "2001-12-15"
3766 msgstr "2001-12-15"
3767
3768 #. type: Plain text
3769 #: build/C/man3/fpurge.3:28
3770 msgid "fpurge, __fpurge - purge a stream"
3771 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3772
3773 #. type: Plain text
3774 #: build/C/man3/fpurge.3:32
3775 #, no-wrap
3776 msgid ""
3777 "/* unsupported */\n"
3778 "B<#include E<lt>stdio.hE<gt>>\n"
3779 msgstr ""
3780 "/* unsupported */\n"
3781 "B<#include E<lt>stdio.hE<gt>>\n"
3782
3783 #. type: Plain text
3784 #: build/C/man3/fpurge.3:34
3785 #, no-wrap
3786 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3787 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3788
3789 #. type: Plain text
3790 #: build/C/man3/fpurge.3:37
3791 #, no-wrap
3792 msgid ""
3793 "/* supported */\n"
3794 "B<#include E<lt>stdio.hE<gt>>\n"
3795 msgstr ""
3796 "/* supported */\n"
3797 "B<#include E<lt>stdio.hE<gt>>\n"
3798
3799 #. type: Plain text
3800 #: build/C/man3/fpurge.3:39
3801 #, no-wrap
3802 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3803 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3804
3805 #. type: Plain text
3806 #: build/C/man3/fpurge.3:41
3807 #, no-wrap
3808 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3809 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3810
3811 #. type: Plain text
3812 #: build/C/man3/fpurge.3:54
3813 msgid ""
3814 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3815 "output streams this discards any unwritten output.  For input streams this "
3816 "discards any input read from the underlying object but not yet obtained via "
3817 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3818 "B<fflush>(3)."
3819 msgstr ""
3820 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3821 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3822 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3823 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3824 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3825
3826 #. type: Plain text
3827 #: build/C/man3/fpurge.3:58
3828 msgid ""
3829 "The function B<__fpurge>()  does precisely the same, but without returning a "
3830 "value."
3831 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3832
3833 #. type: Plain text
3834 #: build/C/man3/fpurge.3:65
3835 msgid ""
3836 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3837 "and sets I<errno> appropriately."
3838 msgstr ""
3839 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3840 "を適切な値に設定する。"
3841
3842 #. type: Plain text
3843 #: build/C/man3/fpurge.3:70
3844 msgid "I<stream> is not an open stream."
3845 msgstr "I<stream> がオープンされていない。"
3846
3847 #. type: Plain text
3848 #: build/C/man3/fpurge.3:78
3849 msgid ""
3850 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3851 "was introduced in 4.4BSD and is not available under Linux.  The function "
3852 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3853 "later."
3854 msgstr ""
3855 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3856 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3857 "され、glibc 2.1.95 以降には存在している。"
3858
3859 #. type: Plain text
3860 #: build/C/man3/fpurge.3:80
3861 msgid "Usually it is a mistake to want to discard input buffers."
3862 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3863
3864 #.  .BR fclean (3),
3865 #. type: Plain text
3866 #: build/C/man3/fpurge.3:85
3867 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3868 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3869
3870 #. type: TH
3871 #: build/C/man3/fputwc.3:16
3872 #, no-wrap
3873 msgid "FPUTWC"
3874 msgstr "FPUTWC"
3875
3876 #. type: Plain text
3877 #: build/C/man3/fputwc.3:19
3878 msgid "fputwc, putwc - write a wide character to a FILE stream"
3879 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3880
3881 #. type: Plain text
3882 #: build/C/man3/fputwc.3:27
3883 #, no-wrap
3884 msgid ""
3885 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3886 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3887 msgstr ""
3888 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3889 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3890
3891 #. type: Plain text
3892 #: build/C/man3/fputwc.3:43
3893 msgid ""
3894 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3895 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3896 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3897 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3898 "it returns I<wc>."
3899 msgstr ""
3900 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3901 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3902 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3903 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3904 "関数は I<wc> を返す。"
3905
3906 #. type: Plain text
3907 #: build/C/man3/fputwc.3:51
3908 msgid ""
3909 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3910 "may be implemented as a macro, and may evaluate its argument more than "
3911 "once.  There is no reason ever to use it."
3912 msgstr ""
3913 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3914 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3915 "ない。この関数を使う理由はもはや存在しない。"
3916
3917 #. type: Plain text
3918 #: build/C/man3/fputwc.3:60
3919 msgid ""
3920 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3921 "indicate an error."
3922 msgstr ""
3923 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3924 "B<WEOF> を返す。"
3925
3926 #. type: Plain text
3927 #: build/C/man3/fputwc.3:65
3928 msgid "Conversion of I<wc> to the stream's encoding fails."
3929 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3930
3931 #. type: Plain text
3932 #: build/C/man3/fputwc.3:74
3933 msgid ""
3934 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3935 "current locale."
3936 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
3937
3938 #. type: Plain text
3939 #: build/C/man3/fputwc.3:82
3940 msgid ""
3941 "In the absence of additional information passed to the B<fopen>(3)  call, it "
3942 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
3943 "sequence corresponding to the wide character I<wc>."
3944 msgstr ""
3945 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
3946 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
3947 "よい。"
3948
3949 #. type: Plain text
3950 #: build/C/man3/fputwc.3:86
3951 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3952 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3953
3954 #. type: TH
3955 #: build/C/man3/fread.3:45
3956 #, no-wrap
3957 msgid "FREAD"
3958 msgstr "FREAD"
3959
3960 #. type: TH
3961 #: build/C/man3/fread.3:45
3962 #, no-wrap
3963 msgid "2012-03-30"
3964 msgstr "2012-03-30"
3965
3966 #. type: Plain text
3967 #: build/C/man3/fread.3:48
3968 msgid "fread, fwrite - binary stream input/output"
3969 msgstr "fread, fwrite - バイナリストリームの入出力"
3970
3971 #. type: Plain text
3972 #: build/C/man3/fread.3:54
3973 #, no-wrap
3974 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3975 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3976
3977 #. type: Plain text
3978 #: build/C/man3/fread.3:57
3979 #, no-wrap
3980 msgid ""
3981 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3982 "B<              FILE *>I<stream>B<);>\n"
3983 msgstr ""
3984 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3985 "B<              FILE *>I<stream>B<);>\n"
3986
3987 #. type: Plain text
3988 #: build/C/man3/fread.3:69
3989 msgid ""
3990 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
3991 "long, from the stream pointed to by I<stream>, storing them at the location "
3992 "given by I<ptr>."
3993 msgstr ""
3994 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
3995 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
3996 "I<size> バイトの長さを持つ。"
3997
3998 #. type: Plain text
3999 #: build/C/man3/fread.3:80
4000 msgid ""
4001 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4002 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4003 "location given by I<ptr>."
4004 msgstr ""
4005 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4006 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4007 "バイトの長さを持つ。"
4008
4009 #. type: Plain text
4010 #: build/C/man3/fread.3:96
4011 msgid ""
4012 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4013 "or written.  This number equals the number of bytes transferred only when "
4014 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4015 "return value is a short item count (or zero)."
4016 msgstr ""
4017 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4018 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4019 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4020 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4021
4022 #. type: Plain text
4023 #: build/C/man3/fread.3:103
4024 msgid ""
4025 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4026 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4027 msgstr ""
4028 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4029 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4030 "らない。"
4031
4032 #. type: Plain text
4033 #: build/C/man3/fread.3:105
4034 msgid "C89, POSIX.1-2001."
4035 msgstr "C89, POSIX.1-2001."
4036
4037 #. type: Plain text
4038 #: build/C/man3/fread.3:111
4039 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4040 msgstr ""
4041 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4042
4043 #. type: TH
4044 #: build/C/man3/fseek.3:42
4045 #, no-wrap
4046 msgid "FSEEK"
4047 msgstr "FSEEK"
4048
4049 #. type: TH
4050 #: build/C/man3/fseek.3:42
4051 #, no-wrap
4052 msgid "1993-11-29"
4053 msgstr "1993-11-29"
4054
4055 #. type: Plain text
4056 #: build/C/man3/fseek.3:45
4057 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4058 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4059
4060 #. type: Plain text
4061 #: build/C/man3/fseek.3:49
4062 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4063 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4064
4065 #. type: Plain text
4066 #: build/C/man3/fseek.3:51
4067 msgid "B<long ftell(FILE *>I<stream>B<);>"
4068 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4069
4070 #. type: Plain text
4071 #: build/C/man3/fseek.3:53
4072 msgid "B<void rewind(FILE *>I<stream>B<);>"
4073 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4074
4075 #. type: Plain text
4076 #: build/C/man3/fseek.3:55
4077 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4078 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4079
4080 #. type: Plain text
4081 #: build/C/man3/fseek.3:57
4082 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4083 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4084
4085 #. type: Plain text
4086 #: build/C/man3/fseek.3:81
4087 msgid ""
4088 "The B<fseek>()  function sets the file position indicator for the stream "
4089 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4090 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4091 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4092 "relative to the start of the file, the current position indicator, or end-of-"
4093 "file, respectively.  A successful call to the B<fseek>()  function clears "
4094 "the end-of-file indicator for the stream and undoes any effects of the "
4095 "B<ungetc>(3)  function on the same stream."
4096 msgstr ""
4097 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4098 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4099 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4100 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4101 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4102 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4103 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4104 "かったことになる。"
4105
4106 #. type: Plain text
4107 #: build/C/man3/fseek.3:87
4108 msgid ""
4109 "The B<ftell>()  function obtains the current value of the file position "
4110 "indicator for the stream pointed to by I<stream>."
4111 msgstr ""
4112 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4113 "置表示子 の現時点での値を与える。"
4114
4115 #. type: Plain text
4116 #: build/C/man3/fseek.3:94
4117 msgid ""
4118 "The B<rewind>()  function sets the file position indicator for the stream "
4119 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4120 msgstr ""
4121 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4122 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4123
4124 #. type: Plain text
4125 #: build/C/man3/fseek.3:97
4126 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4127 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4128
4129 #. type: Plain text
4130 #: build/C/man3/fseek.3:101
4131 msgid ""
4132 "except that the error indicator for the stream is also cleared (see "
4133 "B<clearerr>(3))."
4134 msgstr ""
4135 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4136 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4137
4138 #. type: Plain text
4139 #: build/C/man3/fseek.3:121
4140 #, fuzzy
4141 #| msgid ""
4142 #| "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4143 #| "equivalent to B<ftell>()  and B<fseek>()  (with whence set to "
4144 #| "B<SEEK_SET>), setting and storing the current value of the file offset "
4145 #| "into or from the object referenced by I<pos>.  On some non-UNIX systems "
4146 #| "an I<fpos_t> object may be a complex object and these routines may be the "
4147 #| "only way to portably reposition a text stream."
4148 msgid ""
4149 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4150 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4151 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4152 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4153 "I<fpos_t> object may be a complex object and these routines may be the only "
4154 "way to portably reposition a text stream."
4155 msgstr ""
4156 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4157 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4158 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4159 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4160 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4161 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4162 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4163
4164 #. type: Plain text
4165 #: build/C/man3/fseek.3:136
4166 msgid ""
4167 "The B<rewind>()  function returns no value.  Upon successful completion, "
4168 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4169 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4170 "indicate the error."
4171 msgstr ""
4172 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4173 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4174 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4175
4176 #. type: Plain text
4177 #: build/C/man3/fseek.3:142
4178 msgid "The I<stream> specified is not a seekable stream."
4179 msgstr "指定した I<stream> がシークできない。"
4180
4181 #. type: Plain text
4182 #: build/C/man3/fseek.3:153
4183 msgid ""
4184 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4185 "B<SEEK_CUR>."
4186 msgstr ""
4187 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4188 "B<SEEK_CUR> 以外の値であった。"
4189
4190 #. type: Plain text
4191 #: build/C/man3/fseek.3:168
4192 msgid ""
4193 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4194 "also fail and set I<errno> for any of the errors specified for the routines "
4195 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4196 msgstr ""
4197 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4198 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4199 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4200
4201 #. type: Plain text
4202 #: build/C/man3/fseek.3:173
4203 msgid "B<lseek>(2), B<fseeko>(3)"
4204 msgstr "B<lseek>(2), B<fseeko>(3)"
4205
4206 #. type: TH
4207 #: build/C/man3/fseeko.3:25
4208 #, no-wrap
4209 msgid "FSEEKO"
4210 msgstr "FSEEKO"
4211
4212 #. type: TH
4213 #: build/C/man3/fseeko.3:25
4214 #, no-wrap
4215 msgid "2001-11-05"
4216 msgstr "2001-11-05"
4217
4218 #. type: Plain text
4219 #: build/C/man3/fseeko.3:28
4220 msgid "fseeko, ftello - seek to or report file position"
4221 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4222
4223 #. type: Plain text
4224 #: build/C/man3/fseeko.3:33
4225 #, no-wrap
4226 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4227 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4228
4229 #. type: Plain text
4230 #: build/C/man3/fseeko.3:36
4231 #, no-wrap
4232 msgid ""
4233 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4234 "\n"
4235 msgstr ""
4236 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4237 "\n"
4238
4239 #. type: Plain text
4240 #: build/C/man3/fseeko.3:54
4241 msgid ""
4242 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4243 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4244 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4245 "I<off_t> instead of I<long>."
4246 msgstr ""
4247 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4248 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4249 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4250 "I<off_t> になっている。"
4251
4252 #. type: Plain text
4253 #: build/C/man3/fseeko.3:57
4254 msgid ""
4255 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4256 "compilation with"
4257 msgstr ""
4258 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4259
4260 #. type: Plain text
4261 #: build/C/man3/fseeko.3:61 build/C/man3/lseek64.3:81
4262 #, no-wrap
4263 msgid "#define _FILE_OFFSET_BITS 64\n"
4264 msgstr "#define _FILE_OFFSET_BITS 64\n"
4265
4266 #. type: Plain text
4267 #: build/C/man3/fseeko.3:65
4268 msgid "will turn I<off_t> into a 64-bit type."
4269 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4270
4271 #. type: Plain text
4272 #: build/C/man3/fseeko.3:74
4273 msgid ""
4274 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4275 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4276 "indicate the error."
4277 msgstr ""
4278 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4279 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4280
4281 #. type: Plain text
4282 #: build/C/man3/fseeko.3:77
4283 msgid "See the ERRORS in B<fseek>(3)."
4284 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4285
4286 #. type: Plain text
4287 #: build/C/man3/fseeko.3:79
4288 msgid "SUSv2, POSIX.1-2001."
4289 msgstr "SUSv2, POSIX.1-2001."
4290
4291 #. type: Plain text
4292 #: build/C/man3/fseeko.3:83
4293 msgid ""
4294 "These functions are found on System V-like systems.  They are not present in "
4295 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4296 msgstr ""
4297 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4298 "かったが、 glibc 2.1 から使えるようになった。"
4299
4300 #. type: Plain text
4301 #: build/C/man3/fseeko.3:85
4302 msgid "B<fseek>(3)"
4303 msgstr "B<fseek>(3)"
4304
4305 #. type: TH
4306 #: build/C/man3/getline.3:26
4307 #, no-wrap
4308 msgid "GETLINE"
4309 msgstr "GETLINE"
4310
4311 #. type: TH
4312 #: build/C/man3/getline.3:26
4313 #, no-wrap
4314 msgid "2010-06-12"
4315 msgstr "2010-06-12"
4316
4317 #. type: Plain text
4318 #: build/C/man3/getline.3:29
4319 msgid "getline, getdelim - delimited string input"
4320 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4321
4322 #. type: Plain text
4323 #: build/C/man3/getline.3:34
4324 #, no-wrap
4325 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4326 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4327
4328 #. type: Plain text
4329 #: build/C/man3/getline.3:37
4330 #, no-wrap
4331 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4332 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4333
4334 #. type: Plain text
4335 #: build/C/man3/getline.3:47
4336 msgid "B<getline>(), B<getdelim>():"
4337 msgstr "B<getline>(), B<getdelim>():"
4338
4339 #. type: Plain text
4340 #: build/C/man3/getline.3:52
4341 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4342 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4343
4344 #. type: Plain text
4345 #: build/C/man3/getline.3:65
4346 msgid ""
4347 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4348 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4349 "terminated and includes the newline character, if one was found."
4350 msgstr ""
4351 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4352 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4353 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4354
4355 #. type: Plain text
4356 #: build/C/man3/getline.3:75
4357 msgid ""
4358 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4359 "storing the line, which should be freed by the user program.  (In this case, "
4360 "the value in I<*n> is ignored.)"
4361 msgstr ""
4362 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4363 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4364 "合、 I<*n> の値は無視される)。"
4365
4366 #. type: Plain text
4367 #: build/C/man3/getline.3:93
4368 msgid ""
4369 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4370 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4371 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4372 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4373 msgstr ""
4374 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4375 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4376 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4377 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4378 "I<*n> を更新する。"
4379
4380 #. type: Plain text
4381 #: build/C/man3/getline.3:99
4382 msgid ""
4383 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4384 "to reflect the buffer address and allocated size respectively."
4385 msgstr ""
4386 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4387 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4388
4389 #. type: Plain text
4390 #: build/C/man3/getline.3:110
4391 msgid ""
4392 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4393 "than newline can be specified as the I<delimiter> argument.  As with "
4394 "B<getline>(), a delimiter character is not added if one was not present in "
4395 "the input before end of file was reached."
4396 msgstr ""
4397 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4398 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4399 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4400 "ファに追加しない。"
4401
4402 #. type: Plain text
4403 #: build/C/man3/getline.3:119
4404 msgid ""
4405 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4406 "read, including the delimiter character, but not including the terminating "
4407 "null byte.  This value can be used to handle embedded null bytes in the line "
4408 "read."
4409 msgstr ""
4410 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4411 "字数には区切り文字は含まれるが、終端に使う NULL バイトは含まれない。 この値に"
4412 "よって、読み込んだ行に含まれる NULL バイトを操作することができる。"
4413
4414 #. type: Plain text
4415 #: build/C/man3/getline.3:122
4416 msgid ""
4417 "Both functions return -1 on failure to read a line (including end-of-file "
4418 "condition)."
4419 msgstr ""
4420 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4421 "した場合にも -1 を返す)。"
4422
4423 #. type: Plain text
4424 #: build/C/man3/getline.3:132
4425 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4426 msgstr ""
4427 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4428 "I<stream> が有効でない)。"
4429
4430 #. type: Plain text
4431 #: build/C/man3/getline.3:134
4432 msgid "These functions are available since libc 4.6.27."
4433 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4434
4435 #. type: Plain text
4436 #: build/C/man3/getline.3:141
4437 msgid ""
4438 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4439 "were standardized in POSIX.1-2008."
4440 msgstr ""
4441 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4442 "POSIX.1-2008 で標準化された。"
4443
4444 #. type: Plain text
4445 #: build/C/man3/getline.3:146
4446 #, no-wrap
4447 msgid ""
4448 "#define _GNU_SOURCE\n"
4449 "#include E<lt>stdio.hE<gt>\n"
4450 "#include E<lt>stdlib.hE<gt>\n"
4451 msgstr ""
4452 "#define _GNU_SOURCE\n"
4453 "#include E<lt>stdio.hE<gt>\n"
4454 "#include E<lt>stdlib.hE<gt>\n"
4455
4456 #. type: Plain text
4457 #: build/C/man3/getline.3:154
4458 #, no-wrap
4459 msgid ""
4460 "int\n"
4461 "main(void)\n"
4462 "{\n"
4463 "    FILE *fp;\n"
4464 "    char *line = NULL;\n"
4465 "    size_t len = 0;\n"
4466 "    ssize_t read;\n"
4467 msgstr ""
4468 "int\n"
4469 "main(void)\n"
4470 "{\n"
4471 "    FILE *fp;\n"
4472 "    char *line = NULL;\n"
4473 "    size_t len = 0;\n"
4474 "    ssize_t read;\n"
4475
4476 #. type: Plain text
4477 #: build/C/man3/getline.3:158
4478 #, no-wrap
4479 msgid ""
4480 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4481 "    if (fp == NULL)\n"
4482 "        exit(EXIT_FAILURE);\n"
4483 msgstr ""
4484 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4485 "    if (fp == NULL)\n"
4486 "        exit(EXIT_FAILURE);\n"
4487
4488 #. type: Plain text
4489 #: build/C/man3/getline.3:163
4490 #, no-wrap
4491 msgid ""
4492 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4493 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4494 "        printf(\"%s\", line);\n"
4495 "    }\n"
4496 msgstr ""
4497 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4498 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4499 "        printf(\"%s\", line);\n"
4500 "    }\n"
4501
4502 #. type: Plain text
4503 #: build/C/man3/getline.3:167
4504 #, no-wrap
4505 msgid ""
4506 "    free(line);\n"
4507 "    exit(EXIT_SUCCESS);\n"
4508 "}\n"
4509 msgstr ""
4510 "    free(line);\n"
4511 "    exit(EXIT_SUCCESS);\n"
4512 "}\n"
4513
4514 #. type: Plain text
4515 #: build/C/man3/getline.3:175
4516 msgid ""
4517 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4518 msgstr ""
4519 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4520
4521 #. type: TH
4522 #: build/C/man3/gets.3:27
4523 #, no-wrap
4524 msgid "GETS"
4525 msgstr "GETS"
4526
4527 #. type: TH
4528 #: build/C/man3/gets.3:27
4529 #, no-wrap
4530 msgid "2012-01-18"
4531 msgstr "2012-01-18"
4532
4533 #. type: Plain text
4534 #: build/C/man3/gets.3:30
4535 msgid ""
4536 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4537 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4538
4539 #. type: Plain text
4540 #: build/C/man3/gets.3:35
4541 #, no-wrap
4542 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4543 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4544
4545 #. type: Plain text
4546 #: build/C/man3/gets.3:37
4547 #, no-wrap
4548 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4549 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4550
4551 #. type: Plain text
4552 #: build/C/man3/gets.3:39
4553 #, no-wrap
4554 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4555 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4556
4557 #. type: Plain text
4558 #: build/C/man3/gets.3:41
4559 #, no-wrap
4560 msgid "B<int getchar(void);>\n"
4561 msgstr "B<int getchar(void);>\n"
4562
4563 #. type: Plain text
4564 #: build/C/man3/gets.3:43
4565 #, no-wrap
4566 msgid "B<char *gets(char *>I<s>B<);>\n"
4567 msgstr "B<char *gets(char *>I<s>B<);>\n"
4568
4569 #. type: Plain text
4570 #: build/C/man3/gets.3:45
4571 #, no-wrap
4572 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4573 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4574
4575 #. type: Plain text
4576 #: build/C/man3/gets.3:57
4577 msgid ""
4578 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4579 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4580 msgstr ""
4581 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4582 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4583 "す。"
4584
4585 #. type: Plain text
4586 #: build/C/man3/gets.3:64
4587 msgid ""
4588 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4589 "a macro which evaluates I<stream> more than once."
4590 msgstr ""
4591 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4592 "実装されているかもしれない。"
4593
4594 #. type: Plain text
4595 #: build/C/man3/gets.3:68
4596 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4597 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4598
4599 #. type: Plain text
4600 #: build/C/man3/gets.3:78
4601 msgid ""
4602 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4603 "until either a terminating newline or B<EOF>, which it replaces with a null "
4604 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4605 "below)."
4606 msgstr ""
4607 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4608 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4609 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4610 "記の「バグ」を参照)。"
4611
4612 #. type: Plain text
4613 #: build/C/man3/gets.3:92
4614 msgid ""
4615 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4616 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4617 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4618 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4619 "in the buffer."
4620 msgstr ""
4621 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4622 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4623 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4624 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4625
4626 #. type: Plain text
4627 #: build/C/man3/gets.3:103
4628 msgid ""
4629 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4630 "it is available for subsequent read operations.  Pushed-back characters will "
4631 "be returned in reverse order; only one pushback is guaranteed."
4632 msgstr ""
4633 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4634 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4635 "しとして保証されているのは、一文字だけである。"
4636
4637 #. type: Plain text
4638 #: build/C/man3/gets.3:108
4639 msgid ""
4640 "Calls to the functions described here can be mixed with each other and with "
4641 "calls to other input functions from the I<stdio> library for the same input "
4642 "stream."
4643 msgstr ""
4644 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4645 "互いに混ぜて使うことができる。"
4646
4647 #. type: Plain text
4648 #: build/C/man3/gets.3:123
4649 msgid ""
4650 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4651 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4652 msgstr ""
4653 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4654 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4655 "す。"
4656
4657 #. type: Plain text
4658 #: build/C/man3/gets.3:131
4659 msgid ""
4660 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4661 "end of file occurs while no characters have been read."
4662 msgstr ""
4663 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4664 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4665
4666 #. type: Plain text
4667 #: build/C/man3/gets.3:138
4668 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4669 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4670
4671 #. type: Plain text
4672 #: build/C/man3/gets.3:140
4673 msgid "C89, C99, POSIX.1-2001."
4674 msgstr "C89, C99, POSIX.1-2001."
4675
4676 #. type: Plain text
4677 #: build/C/man3/gets.3:152
4678 msgid ""
4679 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4680 "C11 removes the specification of B<gets>()  from the C language, and since "
4681 "version 2.16, glibc header files don't expose the function declaration if "
4682 "the B<_ISOC11_SOURCE> feature test macro is defined."
4683 msgstr ""
4684 "LSB は B<gets>() を非推奨としている。\n"
4685 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4686 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4687 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4688 "た\n"
4689 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4690
4691 #. type: Plain text
4692 #: build/C/man3/gets.3:166
4693 msgid ""
4694 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4695 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4696 "()  will continue to store characters past the end of the buffer, it is "
4697 "extremely dangerous to use.  It has been used to break computer security.  "
4698 "Use B<fgets>()  instead."
4699 msgstr ""
4700 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4701 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4702 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4703 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4704 "と。"
4705
4706 #. type: Plain text
4707 #: build/C/man3/gets.3:173
4708 msgid ""
4709 "It is not advisable to mix calls to input functions from the I<stdio> "
4710 "library with low-level calls to B<read>(2)  for the file descriptor "
4711 "associated with the input stream; the results will be undefined and very "
4712 "probably not what you want."
4713 msgstr ""
4714 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4715 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4716 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4717
4718 #. type: Plain text
4719 #: build/C/man3/gets.3:189
4720 msgid ""
4721 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4722 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4723 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4724 msgstr ""
4725 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4726 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4727 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4728 "B<feature_test_macros>(7)"
4729
4730 #. type: TH
4731 #: build/C/man3/getw.3:25
4732 #, no-wrap
4733 msgid "GETW"
4734 msgstr "GETW"
4735
4736 #. type: TH
4737 #: build/C/man3/getw.3:25
4738 #, no-wrap
4739 msgid "2010-09-26"
4740 msgstr "2010-09-26"
4741
4742 #. type: Plain text
4743 #: build/C/man3/getw.3:28
4744 msgid "getw, putw - input and output of words (ints)"
4745 msgstr "getw, putw - ワード(int)の入出力"
4746
4747 #. type: Plain text
4748 #: build/C/man3/getw.3:33
4749 #, no-wrap
4750 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4751 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4752
4753 #. type: Plain text
4754 #: build/C/man3/getw.3:35
4755 #, no-wrap
4756 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4757 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4758
4759 #. type: Plain text
4760 #: build/C/man3/getw.3:44
4761 msgid "B<getw>(), B<putw>():"
4762 msgstr "B<getw>(), B<putw>():"
4763
4764 #. type: TP
4765 #: build/C/man3/getw.3:47
4766 #, no-wrap
4767 msgid "Since glibc 2.3.3:"
4768 msgstr "glibc 2.3.3 以降:"
4769
4770 #. type: Plain text
4771 #: build/C/man3/getw.3:50
4772 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4773 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4774
4775 #. type: Plain text
4776 #: build/C/man3/getw.3:53
4777 #, no-wrap
4778 msgid ""
4779 "(_XOPEN_SOURCE &&\n"
4780 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4781 msgstr ""
4782 "(_XOPEN_SOURCE &&\n"
4783 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4784
4785 #. type: TP
4786 #: build/C/man3/getw.3:53
4787 #, no-wrap
4788 msgid "Before glibc 2.3.3:"
4789 msgstr "glibc 2.3.3 より前:"
4790
4791 #. type: Plain text
4792 #: build/C/man3/getw.3:56
4793 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4794 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4795
4796 #. type: Plain text
4797 #: build/C/man3/getw.3:66
4798 msgid ""
4799 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4800 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4801 msgstr ""
4802 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4803 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4804 "ことを勧める。"
4805
4806 #. type: Plain text
4807 #: build/C/man3/getw.3:73
4808 msgid ""
4809 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4810 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4811 "instead."
4812 msgstr ""
4813 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4814 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4815 "使用することを勧める。"
4816
4817 #. type: Plain text
4818 #: build/C/man3/getw.3:80
4819 msgid ""
4820 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4821 "error, they return B<EOF>."
4822 msgstr ""
4823 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4824 "が発生した場合、これらの関数は B<EOF> を返す。"
4825
4826 #. type: Plain text
4827 #: build/C/man3/getw.3:82
4828 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4829 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4830
4831 #. type: Plain text
4832 #: build/C/man3/getw.3:86
4833 msgid ""
4834 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4835 "can be used to distinguish between the two cases."
4836 msgstr ""
4837 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4838 "(3)  を用いると、この二つの場合を区別することが出来る。"
4839
4840 #. type: Plain text
4841 #: build/C/man3/getw.3:92
4842 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4843 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4844
4845 #. type: TH
4846 #: build/C/man2/link.2:31
4847 #, no-wrap
4848 msgid "LINK"
4849 msgstr "LINK"
4850
4851 #. type: TH
4852 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32
4853 #: build/C/man2/write.2:39
4854 #, fuzzy, no-wrap
4855 #| msgid "2012-01-18"
4856 msgid "2013-01-27"
4857 msgstr "2012-01-18"
4858
4859 #. type: Plain text
4860 #: build/C/man2/link.2:34
4861 msgid "link - make a new name for a file"
4862 msgstr "link - ファイルの新しい名前を作成する"
4863
4864 #. type: Plain text
4865 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34
4866 #: build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35
4867 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4868 msgid "B<#include E<lt>unistd.hE<gt>>"
4869 msgstr "B<#include E<lt>unistd.hE<gt>>"
4870
4871 #. type: Plain text
4872 #: build/C/man2/link.2:38
4873 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4874 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4875
4876 #. type: Plain text
4877 #: build/C/man2/link.2:41
4878 msgid ""
4879 "B<link>()  creates a new link (also known as a hard link) to an existing "
4880 "file."
4881 msgstr ""
4882 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4883 "link) ともいう) を作成する。"
4884
4885 #. type: Plain text
4886 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4887 msgid "If I<newpath> exists it will I<not> be overwritten."
4888 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4889
4890 #. type: Plain text
4891 #: build/C/man2/link.2:52
4892 msgid ""
4893 "This new name may be used exactly as the old one for any operation; both "
4894 "names refer to the same file (and so have the same permissions and "
4895 "ownership) and it is impossible to tell which name was the \"original\"."
4896 msgstr ""
4897 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4898 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4899 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4900
4901 #. type: Plain text
4902 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4903 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4904 #: build/C/man2/unlink.2:60
4905 msgid ""
4906 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4907 "appropriately."
4908 msgstr ""
4909 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4910 "定される。"
4911
4912 #. type: TP
4913 #: build/C/man2/link.2:58 build/C/man2/open.2:486 build/C/man2/readlink.2:86
4914 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4915 #: build/C/man3/tmpfile.3:55 build/C/man2/unlink.2:61
4916 #, no-wrap
4917 msgid "B<EACCES>"
4918 msgstr "B<EACCES>"
4919
4920 #. type: Plain text
4921 #: build/C/man2/link.2:69
4922 msgid ""
4923 "Write access to the directory containing I<newpath> is denied, or search "
4924 "permission is denied for one of the directories in the path prefix of "
4925 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4926 msgstr ""
4927 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4928 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4929 "(B<path_resolution>(7)  を参照)。"
4930
4931 #. type: TP
4932 #: build/C/man2/link.2:69 build/C/man2/open.2:495 build/C/man2/rename.2:133
4933 #: build/C/man2/symlink.2:99 build/C/man2/write.2:135
4934 #, no-wrap
4935 msgid "B<EDQUOT>"
4936 msgstr ""
4937
4938 #. type: Plain text
4939 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
4940 msgid "The user's quota of disk blocks on the file system has been exhausted."
4941 msgstr ""
4942
4943 #. type: TP
4944 #: build/C/man2/link.2:72 build/C/man2/open.2:501 build/C/man2/symlink.2:104
4945 #: build/C/man3/tmpfile.3:58
4946 #, no-wrap
4947 msgid "B<EEXIST>"
4948 msgstr "B<EEXIST>"
4949
4950 #. type: Plain text
4951 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
4952 msgid "I<newpath> already exists."
4953 msgstr "I<newpath> が既に存在する。"
4954
4955 #. type: TP
4956 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:507
4957 #: build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91
4958 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:64
4959 #: build/C/man2/symlink.2:108 build/C/man2/unlink.2:80
4960 #: build/C/man2/write.2:141
4961 #, no-wrap
4962 msgid "B<EFAULT>"
4963 msgstr "B<EFAULT>"
4964
4965 #. type: Plain text
4966 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
4967 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
4968 msgstr ""
4969 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
4970
4971 #. type: TP
4972 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107
4973 #: build/C/man2/symlink.2:111 build/C/man2/unlink.2:84
4974 #: build/C/man2/write.2:165
4975 #, no-wrap
4976 msgid "B<EIO>"
4977 msgstr "B<EIO>"
4978
4979 #. type: Plain text
4980 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
4981 msgid "An I/O error occurred."
4982 msgstr "I/O エラーが発生した。"
4983
4984 #. type: TP
4985 #: build/C/man2/link.2:82 build/C/man2/open.2:531 build/C/man2/readlink.2:110
4986 #: build/C/man2/rename.2:149 build/C/man2/rmdir.2:73
4987 #: build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
4988 #, no-wrap
4989 msgid "B<ELOOP>"
4990 msgstr "B<ELOOP>"
4991
4992 #. type: Plain text
4993 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
4994 msgid ""
4995 "Too many symbolic links were encountered in resolving I<oldpath> or "
4996 "I<newpath>."
4997 msgstr ""
4998 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
4999 "る。"
5000
5001 #. type: TP
5002 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5003 #, no-wrap
5004 msgid "B<EMLINK>"
5005 msgstr "B<EMLINK>"
5006
5007 #. type: Plain text
5008 #: build/C/man2/link.2:91
5009 msgid ""
5010 "The file referred to by I<oldpath> already has the maximum number of links "
5011 "to it."
5012 msgstr ""
5013 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5014
5015 #. type: TP
5016 #: build/C/man2/link.2:91 build/C/man2/open.2:541 build/C/man2/readlink.2:113
5017 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:77
5018 #: build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
5019 #, no-wrap
5020 msgid "B<ENAMETOOLONG>"
5021 msgstr "B<ENAMETOOLONG>"
5022
5023 #. type: Plain text
5024 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
5025 msgid "I<oldpath> or I<newpath> was too long."
5026 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5027
5028 #. type: TP
5029 #: build/C/man2/link.2:94 build/C/man2/open.2:555 build/C/man2/readlink.2:116
5030 #: build/C/man2/rename.2:163 build/C/man2/rmdir.2:80
5031 #: build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
5032 #, no-wrap
5033 msgid "B<ENOENT>"
5034 msgstr "B<ENOENT>"
5035
5036 #. type: Plain text
5037 #: build/C/man2/link.2:99
5038 msgid ""
5039 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5040 "dangling symbolic link."
5041 msgstr ""
5042 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5043 "(dangling)シンボリックリンクである。"
5044
5045 #. type: TP
5046 #: build/C/man2/link.2:99 build/C/man2/open.2:562 build/C/man2/readlink.2:119
5047 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:571
5048 #: build/C/man2/symlink.2:128 build/C/man3/tempnam.3:93
5049 #: build/C/man2/unlink.2:106
5050 #, no-wrap
5051 msgid "B<ENOMEM>"
5052 msgstr "B<ENOMEM>"
5053
5054 #. type: Plain text
5055 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/readlink.2:122
5056 #: build/C/man2/rename.2:179 build/C/man2/rmdir.2:88
5057 #: build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
5058 msgid "Insufficient kernel memory was available."
5059 msgstr "十分なカーネルメモリーがない。"
5060
5061 #. type: TP
5062 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/rename.2:179
5063 #: build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:70
5064 #: build/C/man2/write.2:168
5065 #, no-wrap
5066 msgid "B<ENOSPC>"
5067 msgstr "B<ENOSPC>"
5068
5069 #. type: Plain text
5070 #: build/C/man2/link.2:106 build/C/man2/rename.2:183
5071 #: build/C/man2/symlink.2:135
5072 msgid "The device containing the file has no room for the new directory entry."
5073 msgstr ""
5074 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5075 "空きがない。"
5076
5077 #. type: TP
5078 #: build/C/man2/link.2:106 build/C/man2/open.2:571 build/C/man2/readlink.2:122
5079 #: build/C/man2/rename.2:183 build/C/man2/rmdir.2:88
5080 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
5081 #, no-wrap
5082 msgid "B<ENOTDIR>"
5083 msgstr "B<ENOTDIR>"
5084
5085 #. type: Plain text
5086 #: build/C/man2/link.2:111
5087 msgid ""
5088 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5089 "a directory."
5090 msgstr ""
5091 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5092 "い。"
5093
5094 #. type: TP
5095 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:604
5096 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5097 #: build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
5098 #, no-wrap
5099 msgid "B<EPERM>"
5100 msgstr "B<EPERM>"
5101
5102 #. type: Plain text
5103 #: build/C/man2/link.2:115
5104 msgid "I<oldpath> is a directory."
5105 msgstr "I<oldpath> がディレクトリである。"
5106
5107 #. type: Plain text
5108 #: build/C/man2/link.2:120
5109 msgid ""
5110 "The file system containing I<oldpath> and I<newpath> does not support the "
5111 "creation of hard links."
5112 msgstr ""
5113 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5114 "していない。"
5115
5116 #. type: TP
5117 #: build/C/man2/link.2:120
5118 #, fuzzy, no-wrap
5119 #| msgid "B<EPERM> (Linux only)"
5120 msgid "B<EPERM> (since Linux 3.6)"
5121 msgstr "B<EPERM> (Linux のみ)"
5122
5123 #. type: Plain text
5124 #: build/C/man2/link.2:127
5125 msgid ""
5126 "The caller does not have permission to create a hard link to this file (see "
5127 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
5128 msgstr ""
5129
5130 #. type: TP
5131 #: build/C/man2/link.2:127 build/C/man2/open.2:612 build/C/man2/rename.2:221
5132 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145
5133 #: build/C/man3/tmpfile.3:73 build/C/man2/unlink.2:137
5134 #, no-wrap
5135 msgid "B<EROFS>"
5136 msgstr "B<EROFS>"
5137
5138 #. type: Plain text
5139 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5140 msgid "The file is on a read-only file system."
5141 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5142
5143 #. type: TP
5144 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5145 #, no-wrap
5146 msgid "B<EXDEV>"
5147 msgstr "B<EXDEV>"
5148
5149 #. type: Plain text
5150 #: build/C/man2/link.2:138
5151 msgid ""
5152 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
5153 "permits a file system to be mounted at multiple points, but B<link>()  does "
5154 "not work across different mount points, even if the same file system is "
5155 "mounted on both.)"
5156 msgstr ""
5157 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5158 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5159 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5160 "のマウント位置を跨いでは動作しない。)"
5161
5162 #.  SVr4 documents additional ENOLINK and
5163 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5164 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5165 #. type: Plain text
5166 #: build/C/man2/link.2:143
5167 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5168 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5169
5170 #. type: Plain text
5171 #: build/C/man2/link.2:150
5172 msgid ""
5173 "Hard links, as created by B<link>(), cannot span file systems.  Use "
5174 "B<symlink>(2)  if this is required."
5175 msgstr ""
5176 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5177 "このような場合は B<symlink>(2)  を使用すること。"
5178
5179 #.  more precisely: since kernel 1.3.56
5180 #.  For example, the default Solaris compilation environment
5181 #.  behaves like Linux, and contributors to a March 2005
5182 #.  thread in the Austin mailing list reported that some
5183 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5184 #. type: Plain text
5185 #: build/C/man2/link.2:181
5186 msgid ""
5187 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5188 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5189 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5190 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5191 "the same file that I<oldpath> refers to).  Some other implementations behave "
5192 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5193 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5194 "dereferenced if it is a symbolic link.  For precise control over the "
5195 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5196 msgstr ""
5197 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5198 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5199 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5200 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5201 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5202 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5203 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5204 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5205 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5206 "は B<linkat>(2)  を参照のこと。"
5207
5208 #. type: Plain text
5209 #: build/C/man2/link.2:187
5210 msgid ""
5211 "On NFS file systems, the return code may be wrong in case the NFS server "
5212 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5213 "to find out if the link got created."
5214 msgstr ""
5215 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5216 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5217 "ためには B<stat>(2)  を使用すること。"
5218
5219 #. type: Plain text
5220 #: build/C/man2/link.2:197
5221 msgid ""
5222 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5223 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5224 msgstr ""
5225 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5226 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5227
5228 #. type: TH
5229 #: build/C/man2/llseek.2:28
5230 #, no-wrap
5231 msgid "LLSEEK"
5232 msgstr "LLSEEK"
5233
5234 #. type: TH
5235 #: build/C/man2/llseek.2:28
5236 #, fuzzy, no-wrap
5237 #| msgid "2012-04-30"
5238 msgid "2012-07-13"
5239 msgstr "2012-04-30"
5240
5241 #. type: Plain text
5242 #: build/C/man2/llseek.2:31
5243 msgid "_llseek - reposition read/write file offset"
5244 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5245
5246 #. type: Plain text
5247 #: build/C/man2/llseek.2:35
5248 #, no-wrap
5249 msgid ""
5250 "B<#include E<lt>sys/types.hE<gt>>\n"
5251 "B<#include E<lt>unistd.hE<gt>>\n"
5252 msgstr ""
5253 "B<#include E<lt>sys/types.hE<gt>>\n"
5254 "B<#include E<lt>unistd.hE<gt>>\n"
5255
5256 #. type: Plain text
5257 #: build/C/man2/llseek.2:39
5258 #, no-wrap
5259 msgid ""
5260 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5261 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5262 "B<            unsigned int >I<whence>B<);>\n"
5263 msgstr ""
5264 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5265 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5266 "B<            unsigned int >I<whence>B<);>\n"
5267
5268 #. type: Plain text
5269 #: build/C/man2/llseek.2:43
5270 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5271 msgstr ""
5272
5273 #. type: Plain text
5274 #: build/C/man2/llseek.2:62
5275 msgid ""
5276 "The B<_llseek>()  function repositions the offset of the open file "
5277 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5278 "offset_low> bytes relative to the beginning of the file, the current "
5279 "position in the file, or the end of the file, depending on whether I<whence> "
5280 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5281 "resulting file position in the argument I<result>."
5282 msgstr ""
5283 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5284 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5285 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5286 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5287 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5288 "のファイル位置を I<result> 引き数に返す。"
5289
5290 #. type: Plain text
5291 #: build/C/man2/llseek.2:69
5292 msgid ""
5293 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5294 "-1 is returned and I<errno> is set to indicate the error."
5295 msgstr ""
5296 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5297 "エラーを示す I<errno> が設定される。"
5298
5299 #. type: Plain text
5300 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:166
5301 msgid "I<fd> is not an open file descriptor."
5302 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5303
5304 #. type: Plain text
5305 #: build/C/man2/llseek.2:77
5306 msgid "Problem with copying results to user space."
5307 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5308
5309 #. type: Plain text
5310 #: build/C/man2/llseek.2:81
5311 msgid "I<whence> is invalid."
5312 msgstr "I<whence> が不正である。"
5313
5314 #. type: Plain text
5315 #: build/C/man2/llseek.2:84
5316 msgid ""
5317 "This function is Linux-specific, and should not be used in programs intended "
5318 "to be portable."
5319 msgstr ""
5320 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5321
5322 #. type: Plain text
5323 #: build/C/man2/llseek.2:87
5324 msgid ""
5325 "Glibc does not provide a wrapper for this system call; call it using "
5326 "B<syscall>(2)."
5327 msgstr ""
5328 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5329 "(2)  を使って呼び出すこと。"
5330
5331 #. type: Plain text
5332 #: build/C/man2/llseek.2:90
5333 msgid "B<lseek>(2), B<lseek64>(3)"
5334 msgstr "B<lseek>(2), B<lseek64>(3)"
5335
5336 #. type: TH
5337 #: build/C/man2/lseek.2:47
5338 #, no-wrap
5339 msgid "LSEEK"
5340 msgstr "LSEEK"
5341
5342 #. type: TH
5343 #: build/C/man2/lseek.2:47
5344 #, no-wrap
5345 msgid "2011-09-25"
5346 msgstr "2011-09-25"
5347
5348 #. type: Plain text
5349 #: build/C/man2/lseek.2:50
5350 msgid "lseek - reposition read/write file offset"
5351 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5352
5353 #. type: Plain text
5354 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5355 msgid "B<#include E<lt>sys/types.hE<gt>>"
5356 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5357
5358 #. type: Plain text
5359 #: build/C/man2/lseek.2:56
5360 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5361 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5362
5363 #. type: Plain text
5364 #: build/C/man2/lseek.2:67
5365 msgid ""
5366 "The B<lseek>()  function repositions the offset of the open file associated "
5367 "with the file descriptor I<fd> to the argument I<offset> according to the "
5368 "directive I<whence> as follows:"
5369 msgstr ""
5370 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5371 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5372 "へ以下のように変更する:"
5373
5374 #. type: Plain text
5375 #: build/C/man2/lseek.2:72
5376 msgid "The offset is set to I<offset> bytes."
5377 msgstr "オフセットは I<offset> バイトに設定される。"
5378
5379 #. type: Plain text
5380 #: build/C/man2/lseek.2:77
5381 msgid "The offset is set to its current location plus I<offset> bytes."
5382 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5383
5384 #. type: Plain text
5385 #: build/C/man2/lseek.2:82
5386 msgid "The offset is set to the size of the file plus I<offset> bytes."
5387 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5388
5389 #. type: Plain text
5390 #: build/C/man2/lseek.2:90
5391 msgid ""
5392 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5393 "the file (but this does not change the size of the file).  If data is later "
5394 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5395 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5396 "gap."
5397 msgstr ""
5398 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5399 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5400 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5401 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5402 "される。"
5403
5404 #. type: SS
5405 #: build/C/man2/lseek.2:90
5406 #, no-wrap
5407 msgid "Seeking file data and holes"
5408 msgstr ""
5409
5410 #. type: Plain text
5411 #: build/C/man2/lseek.2:93
5412 msgid ""
5413 "Since version 3.1, Linux supports the following additional values for "
5414 "I<whence>:"
5415 msgstr ""
5416 "Linux バージョン 3.1 以降では、\n"
5417 "I<whence> に以下の値も指定することができる。"
5418
5419 #. type: TP
5420 #: build/C/man2/lseek.2:93
5421 #, no-wrap
5422 msgid "B<SEEK_DATA>"
5423 msgstr "B<SEEK_DATA>"
5424
5425 #. type: Plain text
5426 #: build/C/man2/lseek.2:104
5427 msgid ""
5428 "Adjust the file offset to the next location in the file greater than or "
5429 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5430 "file offset is set to I<offset>."
5431 msgstr ""
5432
5433 #. type: TP
5434 #: build/C/man2/lseek.2:104
5435 #, no-wrap
5436 msgid "B<SEEK_HOLE>"
5437 msgstr "B<SEEK_HOLE>"
5438
5439 #. type: Plain text
5440 #: build/C/man2/lseek.2:118
5441 msgid ""
5442 "Adjust the file offset to the next hole in the file greater than or equal to "
5443 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5444 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5445 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5446 "hole at the end of any file)."
5447 msgstr ""
5448
5449 #. type: Plain text
5450 #: build/C/man2/lseek.2:124
5451 msgid ""
5452 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5453 "end of the file."
5454 msgstr ""
5455
5456 #. type: Plain text
5457 #: build/C/man2/lseek.2:130
5458 msgid ""
5459 "These operations allow applications to map holes in a sparsely allocated "
5460 "file.  This can be useful for applications such as file backup tools, which "
5461 "can save space when creating backups and preserve holes, if they have a "
5462 "mechanism for discovering holes."
5463 msgstr ""
5464
5465 #.  https://lkml.org/lkml/2011/4/22/79
5466 #.  http://lwn.net/Articles/440255/
5467 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5468 #. type: Plain text
5469 #: build/C/man2/lseek.2:153
5470 msgid ""
5471 "For the purposes of these operations, a hole is a sequence of zeros that "
5472 "(normally) has not been allocated in the underlying file storage.  However, "
5473 "a file system is not obliged to report holes, so these operations are not a "
5474 "guaranteed mechanism for mapping the storage space actually allocated to a "
5475 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5476 "the underlying storage may not be reported as a hole.)  In the simplest "
5477 "implementation, a file system can support the operations by making "
5478 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5479 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5480 "by I<offset> is a hole, it can be considered to consist of data that is a "
5481 "sequence of zeros)."
5482 msgstr ""
5483
5484 #. type: Plain text
5485 #: build/C/man2/lseek.2:161
5486 msgid ""
5487 "Upon successful completion, B<lseek>()  returns the resulting offset "
5488 "location as measured in bytes from the beginning of the file.  On error, the "
5489 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5490 msgstr ""
5491 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5492 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5493 "される。"
5494
5495 #.  Some systems may allow negative offsets for character devices
5496 #.  and/or for remote file systems.
5497 #. type: Plain text
5498 #: build/C/man2/lseek.2:174
5499 msgid ""
5500 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5501 "beyond the end of a seekable device."
5502 msgstr ""
5503 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5504 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5505
5506 #. type: TP
5507 #: build/C/man2/lseek.2:174 build/C/man2/open.2:584
5508 #, no-wrap
5509 msgid "B<EOVERFLOW>"
5510 msgstr "B<EOVERFLOW>"
5511
5512 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5513 #. type: Plain text
5514 #: build/C/man2/lseek.2:179
5515 msgid "The resulting file offset cannot be represented in an I<off_t>."
5516 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5517
5518 #. type: TP
5519 #: build/C/man2/lseek.2:179
5520 #, no-wrap
5521 msgid "B<ESPIPE>"
5522 msgstr "B<ESPIPE>"
5523
5524 #. type: Plain text
5525 #: build/C/man2/lseek.2:183
5526 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5527 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5528
5529 #. type: TP
5530 #: build/C/man2/lseek.2:183 build/C/man2/open.2:578
5531 #, no-wrap
5532 msgid "B<ENXIO>"
5533 msgstr "B<ENXIO>"
5534
5535 #. type: Plain text
5536 #: build/C/man2/lseek.2:191
5537 msgid ""
5538 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5539 "beyond the end of the file."
5540 msgstr ""
5541 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5542 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5543
5544 #.  SVr4 documents additional error
5545 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5546 #. type: Plain text
5547 #: build/C/man2/lseek.2:193 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
5548 #: build/C/man2/symlink.2:155 build/C/man2/unlink.2:145
5549 #: build/C/man2/write.2:189
5550 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5551 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5552
5553 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5554 #. type: Plain text
5555 #: build/C/man2/lseek.2:201
5556 msgid ""
5557 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5558 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5559 "next POSIX revision (Issue 8)."
5560 msgstr ""
5561
5562 #. type: Plain text
5563 #: build/C/man2/lseek.2:205
5564 msgid ""
5565 "Some devices are incapable of seeking and POSIX does not specify which "
5566 "devices must support B<lseek>()."
5567 msgstr ""
5568 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5569 "に対応すべきかは規定していない。"
5570
5571 #.  Other systems return the number of written characters,
5572 #.  using SEEK_SET to set the counter. (Of written characters.)
5573 #. type: Plain text
5574 #: build/C/man2/lseek.2:212
5575 #, fuzzy
5576 #| msgid "On Linux, using B<lseek>()  on a tty device returns B<ESPIPE>."
5577 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
5578 msgstr ""
5579 "Linux では、 tty デバイスに B<lseek>()  を使用すると B<ESPIPE> を返す。"
5580
5581 #. type: Plain text
5582 #: build/C/man2/lseek.2:215
5583 msgid ""
5584 "When converting old code, substitute values for I<whence> with the following "
5585 "macros:"
5586 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5587
5588 #. type: tbl table
5589 #: build/C/man2/lseek.2:218
5590 #, no-wrap
5591 msgid "old\tnew\n"
5592 msgstr "old \tnew\n"
5593
5594 #. type: tbl table
5595 #: build/C/man2/lseek.2:219
5596 #, no-wrap
5597 msgid "0\tSEEK_SET\n"
5598 msgstr "0\tSEEK_SET\n"
5599
5600 #. type: tbl table
5601 #: build/C/man2/lseek.2:220
5602 #, no-wrap
5603 msgid "1\tSEEK_CUR\n"
5604 msgstr "1\tSEEK_CUR\n"
5605
5606 #. type: tbl table
5607 #: build/C/man2/lseek.2:221
5608 #, no-wrap
5609 msgid "2\tSEEK_END\n"
5610 msgstr "2\tSEEK_END\n"
5611
5612 #. type: tbl table
5613 #: build/C/man2/lseek.2:222
5614 #, no-wrap
5615 msgid "L_SET\tSEEK_SET\n"
5616 msgstr "L_SET\tSEEK_SET\n"
5617
5618 #. type: tbl table
5619 #: build/C/man2/lseek.2:223
5620 #, no-wrap
5621 msgid "L_INCR\tSEEK_CUR\n"
5622 msgstr "L_INCR\tSEEK_CUR\n"
5623
5624 #. type: tbl table
5625 #: build/C/man2/lseek.2:224
5626 #, no-wrap
5627 msgid "L_XTND\tSEEK_END\n"
5628 msgstr "L_XTND\tSEEK_END\n"
5629
5630 #. type: Plain text
5631 #: build/C/man2/lseek.2:236
5632 msgid ""
5633 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5634 "current file position pointer, so seeking on such files may be subject to "
5635 "race conditions."
5636 msgstr ""
5637 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5638 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5639 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5640
5641 #. type: Plain text
5642 #: build/C/man2/lseek.2:243
5643 msgid ""
5644 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5645 "B<posix_fallocate>(3)"
5646 msgstr ""
5647 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5648 "B<posix_fallocate>(3)"
5649
5650 #. type: TH
5651 #: build/C/man3/lseek64.3:25
5652 #, no-wrap
5653 msgid "LSEEK64"
5654 msgstr "LSEEK64"
5655
5656 #. type: TH
5657 #: build/C/man3/lseek64.3:25
5658 #, no-wrap
5659 msgid "2004-12-11"
5660 msgstr "2004-12-11"
5661
5662 #. type: Plain text
5663 #: build/C/man3/lseek64.3:28
5664 msgid "lseek64 - reposition 64-bit read/write file offset"
5665 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5666
5667 #. type: Plain text
5668 #: build/C/man3/lseek64.3:30
5669 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5670 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5671
5672 #. type: Plain text
5673 #: build/C/man3/lseek64.3:36
5674 msgid ""
5675 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5676 msgstr ""
5677 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5678
5679 #. type: Plain text
5680 #: build/C/man3/lseek64.3:53
5681 msgid ""
5682 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5683 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5684 "start, current position, or end of the file, when I<whence> has the value "
5685 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5686 msgstr ""
5687 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5688 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5689 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5690 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5691
5692 #. type: Plain text
5693 #: build/C/man3/lseek64.3:56
5694 msgid "For more details, return value, and errors, see B<lseek>(2)."
5695 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5696
5697 #. type: Plain text
5698 #: build/C/man3/lseek64.3:63
5699 msgid ""
5700 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5701 "the raw system call B<_llseek>(2)."
5702 msgstr ""
5703 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5704 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5705
5706 #. type: SS
5707 #: build/C/man3/lseek64.3:63
5708 #, no-wrap
5709 msgid "lseek"
5710 msgstr "lseek"
5711
5712 #. type: Plain text
5713 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
5714 #: build/C/man3/lseek64.3:116
5715 msgid "Prototype:"
5716 msgstr "プロトタイプ:"
5717
5718 #. type: Plain text
5719 #: build/C/man3/lseek64.3:69
5720 #, no-wrap
5721 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5722 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5723
5724 #. type: Plain text
5725 #: build/C/man3/lseek64.3:77
5726 msgid ""
5727 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5728 "architectures, unless one compiles with"
5729 msgstr ""
5730 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5731 "ビット符号付き型である。 ただし、"
5732
5733 #. type: Plain text
5734 #: build/C/man3/lseek64.3:85
5735 msgid "in which case it is a 64-bit signed type."
5736 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5737
5738 #. type: SS
5739 #: build/C/man3/lseek64.3:85
5740 #, no-wrap
5741 msgid "lseek64"
5742 msgstr "lseek64"
5743
5744 #. type: Plain text
5745 #: build/C/man3/lseek64.3:91
5746 #, no-wrap
5747 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5748 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5749
5750 #. type: Plain text
5751 #: build/C/man3/lseek64.3:102
5752 msgid ""
5753 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5754 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5755 "when one compiles with"
5756 msgstr ""
5757 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5758 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5759 "ルした場合にのみ使用可能である。"
5760
5761 #. type: Plain text
5762 #: build/C/man3/lseek64.3:106
5763 #, no-wrap
5764 msgid "#define _LARGEFILE64_SOURCE\n"
5765 msgstr "#define _LARGEFILE64_SOURCE\n"
5766
5767 #.  in glibc 2.0.94, not in 2.0.6
5768 #. type: Plain text
5769 #: build/C/man3/lseek64.3:114
5770 msgid ""
5771 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5772 "be an alias for B<llseek>()."
5773 msgstr ""
5774 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5775 "アスとして定義されている。"
5776
5777 #. type: SS
5778 #: build/C/man3/lseek64.3:114
5779 #, no-wrap
5780 msgid "llseek"
5781 msgstr "llseek"
5782
5783 #. type: Plain text
5784 #: build/C/man3/lseek64.3:120
5785 #, no-wrap
5786 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5787 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5788
5789 #.  in libc 5.0.9, not in 4.7.6
5790 #. type: Plain text
5791 #: build/C/man3/lseek64.3:139
5792 msgid ""
5793 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5794 "()  is available in libc5 and glibc and works without special defines.  Its "
5795 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5796 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5797 "should add the above prototype, or something equivalent, to their own "
5798 "source.  When users complained about data loss caused by a miscompilation of "
5799 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5800 msgstr ""
5801 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5802 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5803 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5804 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5805 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5806 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5807 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5808
5809 #. type: Plain text
5810 #: build/C/man3/lseek64.3:142
5811 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5812 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5813
5814 #. type: Plain text
5815 #: build/C/man3/lseek64.3:146
5816 msgid ""
5817 "This makes this function unusable if one desires a warning-free compilation."
5818 msgstr ""
5819 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5820
5821 #. type: SS
5822 #: build/C/man3/lseek64.3:146
5823 #, no-wrap
5824 msgid "_llseek"
5825 msgstr "_llseek"
5826
5827 #. type: Plain text
5828 #: build/C/man3/lseek64.3:149
5829 msgid ""
5830 "All the above functions are implemented in terms of this system call.  The "
5831 "prototype is:"
5832 msgstr ""
5833 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5834 "下の通り:"
5835
5836 #. type: Plain text
5837 #: build/C/man3/lseek64.3:154
5838 #, no-wrap
5839 msgid ""
5840 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5841 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5842 msgstr ""
5843 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5844 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5845
5846 #. type: Plain text
5847 #: build/C/man3/lseek64.3:159
5848 msgid "For more details, see B<llseek>(2)."
5849 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5850
5851 #. type: Plain text
5852 #: build/C/man3/lseek64.3:162
5853 msgid "B<llseek>(2), B<lseek>(2)"
5854 msgstr "B<llseek>(2), B<lseek>(2)"
5855
5856 #. type: TH
5857 #: build/C/man2/open.2:52
5858 #, no-wrap
5859 msgid "OPEN"
5860 msgstr "OPEN"
5861
5862 #. type: TH
5863 #: build/C/man2/open.2:52
5864 #, fuzzy, no-wrap
5865 #| msgid "2012-02-14"
5866 msgid "2013-02-18"
5867 msgstr "2012-02-14"
5868
5869 #. type: Plain text
5870 #: build/C/man2/open.2:55
5871 msgid "open, creat - open and possibly create a file or device"
5872 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5873
5874 #. type: Plain text
5875 #: build/C/man2/open.2:60
5876 #, no-wrap
5877 msgid ""
5878 "B<#include E<lt>sys/types.hE<gt>>\n"
5879 "B<#include E<lt>sys/stat.hE<gt>>\n"
5880 "B<#include E<lt>fcntl.hE<gt>>\n"
5881 msgstr ""
5882 "B<#include E<lt>sys/types.hE<gt>>\n"
5883 "B<#include E<lt>sys/stat.hE<gt>>\n"
5884 "B<#include E<lt>fcntl.hE<gt>>\n"
5885
5886 #. type: Plain text
5887 #: build/C/man2/open.2:63
5888 #, no-wrap
5889 msgid ""
5890 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5891 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5892 msgstr ""
5893 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5894 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5895
5896 #. type: Plain text
5897 #: build/C/man2/open.2:65
5898 #, no-wrap
5899 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5900 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5901
5902 #. type: Plain text
5903 #: build/C/man2/open.2:76
5904 msgid ""
5905 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
5906 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
5907 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
5908 "by a successful call will be the lowest-numbered file descriptor not "
5909 "currently open for the process."
5910 msgstr ""
5911 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
5912 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
5913 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
5914 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
5915 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
5916 "のものとなる。"
5917
5918 #. type: Plain text
5919 #: build/C/man2/open.2:88
5920 msgid ""
5921 "By default, the new file descriptor is set to remain open across an B<execve>"
5922 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
5923 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
5924 "to change this default).  The file offset is set to the beginning of the "
5925 "file (see B<lseek>(2))."
5926 msgstr ""
5927 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
5928 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
5929 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
5930 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
5931 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
5932
5933 #. type: Plain text
5934 #: build/C/man2/open.2:107
5935 msgid ""
5936 "A call to B<open>()  creates a new I<open file description>, an entry in the "
5937 "system-wide table of open files.  This entry records the file offset and the "
5938 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
5939 "file descriptor is a reference to one of these entries; this reference is "
5940 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
5941 "different file.  The new open file description is initially not shared with "
5942 "any other process, but sharing may arise via B<fork>(2)."
5943 msgstr ""
5944 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
5945 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
5946 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
5947 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
5948 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
5949 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
5950 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
5951 "が、 B<fork>(2)  で共有が起こる場合がある。"
5952
5953 #. type: Plain text
5954 #: build/C/man2/open.2:115
5955 msgid ""
5956 "The argument I<flags> must include one of the following I<access modes>: "
5957 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
5958 "only, write-only, or read/write, respectively."
5959 msgstr ""
5960 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
5961 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
5962 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
5963
5964 #.  SUSv4 divides the flags into:
5965 #.  * Access mode
5966 #.  * File creation
5967 #.  * File status
5968 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
5969 #.  though it's not clear what the difference between "other" and
5970 #.  "File creation" flags is.  I raised an Aardvark to see if this
5971 #.  can be clarified in SUSv4; 10 Oct 2008.
5972 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
5973 #.  TC1 (balloted in 2013), resolved this, so that those three constants
5974 #.  are also categorized" as file status flags.
5975 #. type: Plain text
5976 #: build/C/man2/open.2:153
5977 #, fuzzy
5978 #| msgid ""
5979 #| "In addition, zero or more file creation flags and file status flags can "
5980 #| "be bitwise-I<or>'d in I<flags>.  The I<file creation flags> are "
5981 #| "B<O_CREAT>, B<O_EXCL>, B<O_NOCTTY>, and B<O_TRUNC>.  The I<file status "
5982 #| "flags> are all of the remaining flags listed below.  The distinction "
5983 #| "between these two groups of flags is that the file status flags can be "
5984 #| "retrieved and (in some cases)  modified using B<fcntl>(2).  The full list "
5985 #| "of file creation flags and file status flags is as follows:"
5986 msgid ""
5987 "In addition, zero or more file creation flags and file status flags can be "
5988 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
5989 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
5990 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
5991 "remaining flags listed below.  The distinction between these two groups of "
5992 "flags is that the file status flags can be retrieved and (in some cases)  "
5993 "modified using B<fcntl>(2).  The full list of file creation flags and file "
5994 "status flags is as follows:"
5995 msgstr ""
5996 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
5997 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
5998 "定することができる。 I<ファイル作成フラグ> は B<O_CREAT>, B<O_EXCL>, "
5999 "B<O_NOCTTY>, B<O_TRUNC> である。 I<ファイル状態フラグ> は以下のリストのうち上"
6000 "記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は "
6001 "B<fcntl>(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点"
6002 "にある。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
6003
6004 #. type: TP
6005 #: build/C/man2/open.2:153
6006 #, no-wrap
6007 msgid "B<O_APPEND>"
6008 msgstr "B<O_APPEND>"
6009
6010 #.  For more background, see
6011 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6012 #.  http://nfs.sourceforge.net/
6013 #. type: Plain text
6014 #: build/C/man2/open.2:170
6015 msgid ""
6016 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6017 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6018 "may lead to corrupted files on NFS file systems if more than one process "
6019 "appends data to a file at once.  This is because NFS does not support "
6020 "appending to a file, so the client kernel has to simulate it, which can't be "
6021 "done without a race condition."
6022 msgstr ""
6023 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6024 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6025 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6026 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6027 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6028 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6029 "とはできないからである。"
6030
6031 #. type: TP
6032 #: build/C/man2/open.2:170
6033 #, no-wrap
6034 msgid "B<O_ASYNC>"
6035 msgstr "B<O_ASYNC>"
6036
6037 #. type: Plain text
6038 #: build/C/man2/open.2:183
6039 msgid ""
6040 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6041 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6042 "this file descriptor.  This feature is only available for terminals, "
6043 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6044 "B<fcntl>(2)  for further details."
6045 msgstr ""
6046 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6047 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6048 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6049 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6050 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
6051
6052 #. type: TP
6053 #: build/C/man2/open.2:183
6054 #, no-wrap
6055 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
6056 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6057
6058 #.  This flag fixes only one form of the race condition;
6059 #.  The race can also occur with, for example, descriptors
6060 #.  returned by accept(), pipe(), etc.
6061 #. type: Plain text
6062 #: build/C/man2/open.2:208
6063 msgid ""
6064 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6065 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6066 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
6067 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
6068 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
6069 "race conditions where one thread opens a file descriptor at the same time as "
6070 "another thread does a B<fork>(2)  plus B<execve>(2)."
6071 msgstr ""
6072 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6073 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
6074 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
6075 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
6076 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
6077 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
6078 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
6079 "はないからである。"
6080
6081 #. type: TP
6082 #: build/C/man2/open.2:208
6083 #, no-wrap
6084 msgid "B<O_CREAT>"
6085 msgstr "B<O_CREAT>"
6086
6087 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6088 #.  XFS (since 2.6.14).
6089 #. type: Plain text
6090 #: build/C/man2/open.2:224
6091 msgid ""
6092 "If the file does not exist it will be created.  The owner (user ID) of the "
6093 "file is set to the effective user ID of the process.  The group ownership "
6094 "(group ID) is set either to the effective group ID of the process or to the "
6095 "group ID of the parent directory (depending on file system type and mount "
6096 "options, and the mode of the parent directory, see the mount options "
6097 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6098 msgstr ""
6099 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6100 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6101 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6102 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6103 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6104 "I<bsdgroups> と I<sysvgroups> を参照)。"
6105
6106 #. type: Plain text
6107 #: build/C/man2/open.2:247
6108 msgid ""
6109 "I<mode> specifies the permissions to use in case a new file is created.  "
6110 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
6111 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
6112 "permissions are modified by the process's I<umask> in the usual way: The "
6113 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
6114 "mode only applies to future accesses of the newly created file; the B<open>"
6115 "()  call that creates a read-only file may well return a read/write file "
6116 "descriptor."
6117 msgstr ""
6118 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6119 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
6120 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
6121 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
6122 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
6123 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
6124 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
6125 "可能なファイルディスクリプタを返すことがありうる。"
6126
6127 #. type: Plain text
6128 #: build/C/man2/open.2:250
6129 msgid "The following symbolic constants are provided for I<mode>:"
6130 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6131
6132 #. type: TP
6133 #: build/C/man2/open.2:250
6134 #, no-wrap
6135 msgid "B<S_IRWXU>"
6136 msgstr "B<S_IRWXU>"
6137
6138 #. type: Plain text
6139 #: build/C/man2/open.2:253
6140 msgid "00700 user (file owner) has read, write and execute permission"
6141 msgstr ""
6142 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6143
6144 #. type: TP
6145 #: build/C/man2/open.2:253
6146 #, no-wrap
6147 msgid "B<S_IRUSR>"
6148 msgstr "B<S_IRUSR>"
6149
6150 #. type: Plain text
6151 #: build/C/man2/open.2:256
6152 msgid "00400 user has read permission"
6153 msgstr "00400 ユーザーに読み込みの許可がある。"
6154
6155 #. type: TP
6156 #: build/C/man2/open.2:256
6157 #, no-wrap
6158 msgid "B<S_IWUSR>"
6159 msgstr "B<S_IWUSR>"
6160
6161 #. type: Plain text
6162 #: build/C/man2/open.2:259
6163 msgid "00200 user has write permission"
6164 msgstr "00200 ユーザーに書き込みの許可がある。"
6165
6166 #. type: TP
6167 #: build/C/man2/open.2:259
6168 #, no-wrap
6169 msgid "B<S_IXUSR>"
6170 msgstr "B<S_IXUSR>"
6171
6172 #. type: Plain text
6173 #: build/C/man2/open.2:262
6174 msgid "00100 user has execute permission"
6175 msgstr "00100 ユーザーに実行の許可がある。"
6176
6177 #. type: TP
6178 #: build/C/man2/open.2:262
6179 #, no-wrap
6180 msgid "B<S_IRWXG>"
6181 msgstr "B<S_IRWXG>"
6182
6183 #. type: Plain text
6184 #: build/C/man2/open.2:265
6185 msgid "00070 group has read, write and execute permission"
6186 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6187
6188 #. type: TP
6189 #: build/C/man2/open.2:265
6190 #, no-wrap
6191 msgid "B<S_IRGRP>"
6192 msgstr "B<S_IRGRP>"
6193
6194 #. type: Plain text
6195 #: build/C/man2/open.2:268
6196 msgid "00040 group has read permission"
6197 msgstr "00040 グループに読み込みの許可がある。"
6198
6199 #. type: TP
6200 #: build/C/man2/open.2:268
6201 #, no-wrap
6202 msgid "B<S_IWGRP>"
6203 msgstr "B<S_IWGRP>"
6204
6205 #. type: Plain text
6206 #: build/C/man2/open.2:271
6207 msgid "00020 group has write permission"
6208 msgstr "00020 グループに書き込みの許可がある。"
6209
6210 #. type: TP
6211 #: build/C/man2/open.2:271
6212 #, no-wrap
6213 msgid "B<S_IXGRP>"
6214 msgstr "B<S_IXGRP>"
6215
6216 #. type: Plain text
6217 #: build/C/man2/open.2:274
6218 msgid "00010 group has execute permission"
6219 msgstr "00010 グループに実行の許可がある。"
6220
6221 #. type: TP
6222 #: build/C/man2/open.2:274
6223 #, no-wrap
6224 msgid "B<S_IRWXO>"
6225 msgstr "B<S_IRWXO>"
6226
6227 #. type: Plain text
6228 #: build/C/man2/open.2:277
6229 msgid "00007 others have read, write and execute permission"
6230 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6231
6232 #. type: TP
6233 #: build/C/man2/open.2:277
6234 #, no-wrap
6235 msgid "B<S_IROTH>"
6236 msgstr "B<S_IROTH>"
6237
6238 #. type: Plain text
6239 #: build/C/man2/open.2:280
6240 msgid "00004 others have read permission"
6241 msgstr "00004 他人に読み込みの許可がある。"
6242
6243 #. type: TP
6244 #: build/C/man2/open.2:280
6245 #, no-wrap
6246 msgid "B<S_IWOTH>"
6247 msgstr "B<S_IWOTH>"
6248
6249 #. type: Plain text
6250 #: build/C/man2/open.2:283
6251 msgid "00002 others have write permission"
6252 msgstr "00002 他人に書き込みの許可がある。"
6253
6254 #. type: TP
6255 #: build/C/man2/open.2:283
6256 #, no-wrap
6257 msgid "B<S_IXOTH>"
6258 msgstr "B<S_IXOTH>"
6259
6260 #. type: Plain text
6261 #: build/C/man2/open.2:286
6262 msgid "00001 others have execute permission"
6263 msgstr "00001 他人に実行の許可がある。"
6264
6265 #. type: TP
6266 #: build/C/man2/open.2:287
6267 #, no-wrap
6268 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6269 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6270
6271 #. type: Plain text
6272 #: build/C/man2/open.2:304
6273 #, fuzzy
6274 #| msgid ""
6275 #| "Try to minimize cache effects of the I/O to and from this file.  In "
6276 #| "general this will degrade performance, but it is useful in special "
6277 #| "situations, such as when applications do their own caching.  File I/O is "
6278 #| "done directly to/from user space buffers.  The B<O_DIRECT> flag on its "
6279 #| "own makes an effort to transfer data synchronously, but does not give the "
6280 #| "guarantees of the B<O_SYNC> flag that data and necessary metadata are "
6281 #| "transferred.  To guarantee synchronous I/O, B<O_SYNC> must be used in "
6282 #| "addition to B<O_DIRECT>.  See NOTES below for further discussion."
6283 msgid ""
6284 "Try to minimize cache effects of the I/O to and from this file.  In general "
6285 "this will degrade performance, but it is useful in special situations, such "
6286 "as when applications do their own caching.  File I/O is done directly to/"
6287 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6288 "transfer data synchronously, but does not give the guarantees of the "
6289 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6290 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6291 "B<O_DIRECT>.  See NOTES below for further discussion."
6292 msgstr ""
6293 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグ"
6294 "を\n"
6295 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシング"
6296 "を\n"
6297 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6298 "ファ\n"
6299 "に対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようとは"
6300 "す\n"
6301 "るが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証されるわ"
6302 "け\n"
6303 "ではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を使"
6304 "用\n"
6305 "しなければならない。下記の「注意」の節の議論も参照。"
6306
6307 #. type: Plain text
6308 #: build/C/man2/open.2:308
6309 msgid ""
6310 "A semantically similar (but deprecated) interface for block devices is "
6311 "described in B<raw>(8)."
6312 msgstr ""
6313 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6314 "れている (但し、このインタフェースは非推奨である)。"
6315
6316 #. type: TP
6317 #: build/C/man2/open.2:308
6318 #, no-wrap
6319 msgid "B<O_DIRECTORY>"
6320 msgstr "B<O_DIRECTORY>"
6321
6322 #.  But see the following and its replies:
6323 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6324 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6325 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6326 #. type: Plain text
6327 #: build/C/man2/open.2:322
6328 msgid ""
6329 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6330 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6331 "service problems if B<opendir>(3)  is called on a FIFO or tape device, but "
6332 "should not be used outside of the implementation of B<opendir>(3)."
6333 msgstr ""
6334 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6335 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6336 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6337 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6338
6339 #. type: TP
6340 #: build/C/man2/open.2:322
6341 #, no-wrap
6342 msgid "B<O_EXCL>"
6343 msgstr "B<O_EXCL>"
6344
6345 #. type: Plain text
6346 #: build/C/man2/open.2:332
6347 msgid ""
6348 "Ensure that this call creates the file: if this flag is specified in "
6349 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6350 "will fail."
6351 msgstr ""
6352 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6353 "と\n"
6354 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6355 "敗\n"
6356 "する。"
6357
6358 #.  POSIX.1-2001 explicitly requires this behavior.
6359 #. type: Plain text
6360 #: build/C/man2/open.2:340
6361 msgid ""
6362 "When these two flags are specified, symbolic links are not followed: if "
6363 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6364 "the symbolic link points to."
6365 msgstr ""
6366 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6367 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6368 "かに関わらず B<open>()  は失敗する。"
6369
6370 #. type: Plain text
6371 #: build/C/man2/open.2:356
6372 msgid ""
6373 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6374 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6375 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6376 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6377 "the error B<EBUSY>."
6378 msgstr ""
6379 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6380 "B<O_EXCL> の動作は規定されていない。\n"
6381 "これには一つ例外があり、Linux 2.6 以降では、\n"
6382 "I<pathname> がブロックデバイスを参照している場合、\n"
6383 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6384 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6385 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6386
6387 #. type: Plain text
6388 #: build/C/man2/open.2:378
6389 msgid ""
6390 "On NFS, B<O_EXCL> is only supported when using NFSv3 or later on kernel 2.6 "
6391 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6392 "programs that rely on it for performing locking tasks will contain a race "
6393 "condition.  Portable programs that want to perform atomic file locking using "
6394 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6395 "create a unique file on the same file system (e.g., incorporating hostname "
6396 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6397 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6398 "unique file to check if its link count has increased to 2, in which case the "
6399 "lock is also successful."
6400 msgstr ""
6401 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6402 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6403 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6404 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6405 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6406 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6407 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6408 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6409 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6410 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6411 "じくロックに成功しているということである。"
6412
6413 #. type: TP
6414 #: build/C/man2/open.2:378
6415 #, no-wrap
6416 msgid "B<O_LARGEFILE>"
6417 msgstr "B<O_LARGEFILE>"
6418
6419 #. type: Plain text
6420 #: build/C/man2/open.2:400
6421 msgid ""
6422 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6423 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6424 "macro must be defined (before including I<any> header files)  in order to "
6425 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6426 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6427 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6428 msgstr ""
6429 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6430 "ファ\n"
6431 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6432 "イ\n"
6433 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6434 "ば\n"
6435 "ならない。\n"
6436 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6437 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6438 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6439
6440 #. type: TP
6441 #: build/C/man2/open.2:400
6442 #, no-wrap
6443 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6444 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6445
6446 #.  The O_NOATIME flag also affects the treatment of st_atime
6447 #.  by mmap() and readdir(2), MTK, Dec 04.
6448 #. type: Plain text
6449 #: build/C/man2/open.2:413
6450 #, fuzzy
6451 #| msgid ""
6452 #| "Do not update the file last access time (st_atime in the inode)  when the "
6453 #| "file is B<read>(2).  This flag is intended for use by indexing or backup "
6454 #| "programs, where its use can significantly reduce the amount of disk "
6455 #| "activity.  This flag may not be effective on all file systems.  One "
6456 #| "example is NFS, where the server maintains the access time."
6457 msgid ""
6458 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6459 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6460 "programs, where its use can significantly reduce the amount of disk "
6461 "activity.  This flag may not be effective on all file systems.  One example "
6462 "is NFS, where the server maintains the access time."
6463 msgstr ""
6464 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6465 "st_atime) を更新しない。 このフラグはインデックス作成やバックアッププログラム"
6466 "で使うことを意図している。 これを使うとディスクに対する操作を大幅に減らすこと"
6467 "ができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6468 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6469
6470 #. type: TP
6471 #: build/C/man2/open.2:413
6472 #, no-wrap
6473 msgid "B<O_NOCTTY>"
6474 msgstr "B<O_NOCTTY>"
6475
6476 #. type: Plain text
6477 #: build/C/man2/open.2:421
6478 #, fuzzy
6479 #| msgid ""
6480 #| "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(em it will "
6481 #| "not become the process's controlling terminal even if the process does "
6482 #| "not have one."
6483 msgid ""
6484 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
6485 "become the process's controlling terminal even if the process does not have "
6486 "one."
6487 msgstr ""
6488 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6489 "る\n"
6490 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6491 "ル\n"
6492 "は制御端末にはならない。"
6493
6494 #. type: TP
6495 #: build/C/man2/open.2:421
6496 #, no-wrap
6497 msgid "B<O_NOFOLLOW>"
6498 msgstr "B<O_NOFOLLOW>"
6499
6500 #.  The headers from glibc 2.0.100 and later include a
6501 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6502 #.  used\fP.
6503 #. type: Plain text
6504 #: build/C/man2/open.2:430
6505 msgid ""
6506 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6507 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6508 "earlier components of the pathname will still be followed."
6509 msgstr ""
6510 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6511 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6512 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6513 "が シンボリックリンクである場合には、それが指す先が参照される。"
6514
6515 #. type: TP
6516 #: build/C/man2/open.2:430
6517 #, no-wrap
6518 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6519 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6520
6521 #. type: Plain text
6522 #: build/C/man2/open.2:443
6523 msgid ""
6524 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6525 "()  nor any subsequent operations on the file descriptor which is returned "
6526 "will cause the calling process to wait.  For the handling of FIFOs (named "
6527 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6528 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6529 "see B<fcntl>(2)."
6530 msgstr ""
6531 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6532 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6533 "出\n"
6534 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6535 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6536 "イ\n"
6537 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6538 "議論は、 B<fcntl>(2) を参照すること。"
6539
6540 #. type: TP
6541 #: build/C/man2/open.2:443
6542 #, no-wrap
6543 msgid "B<O_SYNC>"
6544 msgstr "B<O_SYNC>"
6545
6546 #. type: Plain text
6547 #: build/C/man2/open.2:451
6548 msgid ""
6549 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6550 "file descriptor will block the calling process until the data has been "
6551 "physically written to the underlying hardware.  I<But see NOTES below>."
6552 msgstr ""
6553 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6554 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6555 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6556 "「注意」の章も参照。>"
6557
6558 #. type: TP
6559 #: build/C/man2/open.2:451
6560 #, no-wrap
6561 msgid "B<O_TRUNC>"
6562 msgstr "B<O_TRUNC>"
6563
6564 #. type: Plain text
6565 #: build/C/man2/open.2:465
6566 msgid ""
6567 "If the file already exists and is a regular file and the open mode allows "
6568 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6569 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6570 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6571 msgstr ""
6572 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6573 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6574 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6575 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6576 "ある。"
6577
6578 #. type: Plain text
6579 #: build/C/man2/open.2:469
6580 msgid ""
6581 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6582 "file has been opened."
6583 msgstr ""
6584 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6585 "用して変更することができる。"
6586
6587 #. type: Plain text
6588 #: build/C/man2/open.2:477
6589 msgid ""
6590 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6591 "O_WRONLY|O_TRUNC>."
6592 msgstr ""
6593 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6594 "を行うのと等価である。"
6595
6596 #. type: Plain text
6597 #: build/C/man2/open.2:485
6598 msgid ""
6599 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6600 "occurred (in which case, I<errno> is set appropriately)."
6601 msgstr ""
6602 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6603 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6604
6605 #. type: Plain text
6606 #: build/C/man2/open.2:495
6607 msgid ""
6608 "The requested access to the file is not allowed, or search permission is "
6609 "denied for one of the directories in the path prefix of I<pathname>, or the "
6610 "file did not exist yet and write access to the parent directory is not "
6611 "allowed.  (See also B<path_resolution>(7).)"
6612 msgstr ""
6613 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6614 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6615 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6616 "すること。)"
6617
6618 #. type: Plain text
6619 #: build/C/man2/open.2:501
6620 msgid ""
6621 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
6622 "of disk blocks or inodes on the file system has been exhausted."
6623 msgstr ""
6624
6625 #. type: Plain text
6626 #: build/C/man2/open.2:507
6627 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6628 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6629
6630 #. type: Plain text
6631 #: build/C/man2/open.2:511 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6632 msgid "I<pathname> points outside your accessible address space."
6633 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6634
6635 #. type: TP
6636 #: build/C/man2/open.2:511 build/C/man2/write.2:145
6637 #, no-wrap
6638 msgid "B<EFBIG>"
6639 msgstr "B<EFBIG>"
6640
6641 #. type: Plain text
6642 #: build/C/man2/open.2:515
6643 msgid "See B<EOVERFLOW>."
6644 msgstr "B<EOVERFLOW> 参照。"
6645
6646 #. type: TP
6647 #: build/C/man2/open.2:515 build/C/man2/read.2:122 build/C/man3/scanf.3:562
6648 #: build/C/man3/tmpfile.3:61 build/C/man2/write.2:150
6649 #, no-wrap
6650 msgid "B<EINTR>"
6651 msgstr "B<EINTR>"
6652
6653 #. type: Plain text
6654 #: build/C/man2/open.2:522
6655 msgid ""
6656 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6657 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6658 "(7)."
6659 msgstr ""
6660 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6661 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6662 "B<signal>(7)  参照。"
6663
6664 #. type: TP
6665 #: build/C/man2/open.2:522 build/C/man2/read.2:158 build/C/man2/rename.2:143
6666 #: build/C/man2/unlink.2:87
6667 #, no-wrap
6668 msgid "B<EISDIR>"
6669 msgstr "B<EISDIR>"
6670
6671 #. type: Plain text
6672 #: build/C/man2/open.2:531
6673 msgid ""
6674 "I<pathname> refers to a directory and the access requested involved writing "
6675 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6676 msgstr ""
6677 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6678 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6679
6680 #. type: Plain text
6681 #: build/C/man2/open.2:538
6682 msgid ""
6683 "Too many symbolic links were encountered in resolving I<pathname>, or "
6684 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6685 msgstr ""
6686 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6687 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6688
6689 #. type: TP
6690 #: build/C/man2/open.2:538 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:64
6691 #, no-wrap
6692 msgid "B<EMFILE>"
6693 msgstr "B<EMFILE>"
6694
6695 #. type: Plain text
6696 #: build/C/man2/open.2:541
6697 msgid "The process already has the maximum number of files open."
6698 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6699
6700 #. type: Plain text
6701 #: build/C/man2/open.2:545 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6702 msgid "I<pathname> was too long."
6703 msgstr "I<pathname> が長過ぎる。"
6704
6705 #. type: TP
6706 #: build/C/man2/open.2:545 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:67
6707 #, no-wrap
6708 msgid "B<ENFILE>"
6709 msgstr "B<ENFILE>"
6710
6711 #. type: Plain text
6712 #: build/C/man2/open.2:548 build/C/man2/pipe.2:113
6713 msgid "The system limit on the total number of open files has been reached."
6714 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6715
6716 #. type: TP
6717 #: build/C/man2/open.2:548
6718 #, no-wrap
6719 msgid "B<ENODEV>"
6720 msgstr "B<ENODEV>"
6721
6722 #. type: Plain text
6723 #: build/C/man2/open.2:555
6724 msgid ""
6725 "I<pathname> refers to a device special file and no corresponding device "
6726 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6727 "returned.)"
6728 msgstr ""
6729 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6730 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6731 "るべきである)"
6732
6733 #. type: Plain text
6734 #: build/C/man2/open.2:562
6735 msgid ""
6736 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6737 "component in I<pathname> does not exist or is a dangling symbolic link."
6738 msgstr ""
6739 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6740 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6741 "ンクである。"
6742
6743 #. type: Plain text
6744 #: build/C/man2/open.2:571
6745 msgid ""
6746 "I<pathname> was to be created but the device containing I<pathname> has no "
6747 "room for the new file."
6748 msgstr ""
6749 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6750 "ファイルのための空き容量がない。"
6751
6752 #. type: Plain text
6753 #: build/C/man2/open.2:578
6754 msgid ""
6755 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6756 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6757 msgstr ""
6758 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6759 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6760
6761 #. type: Plain text
6762 #: build/C/man2/open.2:584
6763 msgid ""
6764 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6765 "has the file open for reading.  Or, the file is a device special file and no "
6766 "corresponding device exists."
6767 msgstr ""
6768 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6769 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6770 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6771
6772 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6773 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6774 #.  Reported 2006-10-03
6775 #. type: Plain text
6776 #: build/C/man2/open.2:604
6777 msgid ""
6778 "I<pathname> refers to a regular file that is too large to be opened.  The "
6779 "usual scenario here is that an application compiled on a 32-bit platform "
6780 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6781 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6782 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6783 "B<EFBIG> for this case."
6784 msgstr ""
6785 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6786 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6787 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6788 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6789 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6790 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6791 "いた。"
6792
6793 #.  Strictly speaking, it's the file system UID... (MTK)
6794 #. type: Plain text
6795 #: build/C/man2/open.2:612
6796 msgid ""
6797 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6798 "did not match the owner of the file and the caller was not privileged "
6799 "(B<CAP_FOWNER>)."
6800 msgstr ""
6801 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6802 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6803
6804 #. type: Plain text
6805 #: build/C/man2/open.2:617
6806 msgid ""
6807 "I<pathname> refers to a file on a read-only file system and write access was "
6808 "requested."
6809 msgstr ""
6810 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6811 "込みアクセスが要求された。"
6812
6813 #. type: TP
6814 #: build/C/man2/open.2:617
6815 #, no-wrap
6816 msgid "B<ETXTBSY>"
6817 msgstr "B<ETXTBSY>"
6818
6819 #. type: Plain text
6820 #: build/C/man2/open.2:622
6821 msgid ""
6822 "I<pathname> refers to an executable image which is currently being executed "
6823 "and write access was requested."
6824 msgstr ""
6825 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6826
6827 #. type: TP
6828 #: build/C/man2/open.2:622
6829 #, no-wrap
6830 msgid "B<EWOULDBLOCK>"
6831 msgstr "B<EWOULDBLOCK>"
6832
6833 #. type: Plain text
6834 #: build/C/man2/open.2:629
6835 msgid ""
6836 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6837 "the file (see B<fcntl>(2))."
6838 msgstr ""
6839 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6840 "ていた (B<fcntl>(2)  参照)。"
6841
6842 #. type: Plain text
6843 #: build/C/man2/open.2:642
6844 msgid ""
6845 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
6846 "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
6847 "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
6848 "definitions."
6849 msgstr ""
6850 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
6851 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
6852 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
6853 "定義する必要があるかもしれない。"
6854
6855 #. type: Plain text
6856 #: build/C/man2/open.2:647
6857 msgid ""
6858 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
6859 "POSIX.1-2008."
6860 msgstr ""
6861 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
6862 "定されている。"
6863
6864 #. type: Plain text
6865 #: build/C/man2/open.2:655
6866 msgid ""
6867 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
6868 "(before including I<any> header files)  to get its definition."
6869 msgstr ""
6870 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
6871 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
6872 "なければならない。"
6873
6874 #. type: Plain text
6875 #: build/C/man2/open.2:663
6876 msgid ""
6877 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
6878 "does not necessarily have the intention to read or write.  This is typically "
6879 "used to open devices in order to get a file descriptor for use with B<ioctl>"
6880 "(2)."
6881 msgstr ""
6882 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
6883 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
6884 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
6885 "られる。"
6886
6887 #.  See for example util-linux's disk-utils/setfdprm.c
6888 #.  For some background on access mode 3, see
6889 #.  http://thread.gmane.org/gmane.linux.kernel/653123
6890 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
6891 #.  LKML, 12 Mar 2008
6892 #. type: Plain text
6893 #: build/C/man2/open.2:692
6894 msgid ""
6895 "Unlike the other values that can be specified in I<flags>, the I<access "
6896 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
6897 "individual bits.  Rather, they define the low order two bits of I<flags>, "
6898 "and are defined respectively as 0, 1, and 2.  In other words, the "
6899 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
6900 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
6901 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
6902 "and write permission on the file and return a descriptor that can't be used "
6903 "for reading or writing.  This nonstandard access mode is used by some Linux "
6904 "drivers to return a descriptor that is only to be used for device-specific "
6905 "B<ioctl>(2)  operations."
6906 msgstr ""
6907 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
6908 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
6909 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
6910 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
6911 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
6912 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
6913 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
6914 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
6915 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで使用され"
6916 "ており、 デバイス固有の B<ioctl>(2)  操作にのみ使用されるディスクリプタを返す"
6917 "ために使われている。"
6918
6919 #.  Linux 2.0, 2.5: truncate
6920 #.  Solaris 5.7, 5.8: truncate
6921 #.  Irix 6.5: truncate
6922 #.  Tru64 5.1B: truncate
6923 #.  HP-UX 11.22: truncate
6924 #.  FreeBSD 4.7: truncate
6925 #. type: Plain text
6926 #: build/C/man2/open.2:703
6927 msgid ""
6928 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
6929 "implementations.  On many systems the file is actually truncated."
6930 msgstr ""
6931 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
6932 "くのシステムではファイルは実際に切り詰められる。"
6933
6934 #. type: Plain text
6935 #: build/C/man2/open.2:707
6936 msgid ""
6937 "There are many infelicities in the protocol underlying NFS, affecting "
6938 "amongst others B<O_SYNC> and B<O_NDELAY>."
6939 msgstr ""
6940 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
6941 "B<O_NDELAY> に影響する。"
6942
6943 #. type: Plain text
6944 #: build/C/man2/open.2:729
6945 #, fuzzy
6946 #| msgid ""
6947 #| "POSIX provides for three different variants of synchronized I/O, "
6948 #| "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  "
6949 #| "Currently (2.6.31), Linux only implements B<O_SYNC>, but glibc maps "
6950 #| "B<O_DSYNC> and B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most "
6951 #| "Linux file systems don't actually implement the POSIX B<O_SYNC> "
6952 #| "semantics, which require all metadata updates of a write to be on disk on "
6953 #| "returning to userspace, but only the B<O_DSYNC> semantics, which require "
6954 #| "only actual file data and metadata necessary to retrieve it to be on disk "
6955 #| "by the time the system call returns."
6956 msgid ""
6957 "POSIX provides for three different variants of synchronized I/O, "
6958 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
6959 "(2.6.31), Linux only implements B<O_SYNC>, but glibc maps B<O_DSYNC> and "
6960 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
6961 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
6962 "require all metadata updates of a write to be on disk on returning to user "
6963 "space, but only the B<O_DSYNC> semantics, which require only actual file "
6964 "data and metadata necessary to retrieve it to be on disk by the time the "
6965 "system call returns."
6966 msgstr ""
6967 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
6968 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
6969 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
6970 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
6971 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
6972 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
6973 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
6974 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
6975 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
6976 "ていればよい。"
6977
6978 #. type: Plain text
6979 #: build/C/man2/open.2:737
6980 msgid ""
6981 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
6982 "create them; use B<mknod>(2)  instead."
6983 msgstr ""
6984 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
6985 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
6986 "用する。"
6987
6988 #. type: Plain text
6989 #: build/C/man2/open.2:750
6990 msgid ""
6991 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
6992 "descriptor but, for example, B<read>(2)  requests are denied with "
6993 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
6994 "permissions, but UID mapping is performed by the server upon read and write "
6995 "requests."
6996 msgstr ""
6997 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
6998 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
6999 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7000 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7001 "る。"
7002
7003 #. type: Plain text
7004 #: build/C/man2/open.2:769
7005 msgid ""
7006 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7007 "fields (respectively, time of last access, time of last status change, and "
7008 "time of last modification; see B<stat>(2))  are set to the current time, and "
7009 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7010 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7011 "st_ctime and st_mtime fields are set to the current time."
7012 msgstr ""
7013 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7014 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7015 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7016 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7017 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7018 "I<st_mtime> フィールドが現在時刻に設定される。"
7019
7020 #. type: SS
7021 #: build/C/man2/open.2:769
7022 #, no-wrap
7023 msgid "O_DIRECT"
7024 msgstr "O_DIRECT"
7025
7026 #. type: Plain text
7027 #: build/C/man2/open.2:786
7028 #, fuzzy
7029 #| msgid ""
7030 #| "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7031 #| "address of userspace buffers and the file offset of I/Os.  In Linux "
7032 #| "alignment restrictions vary by file system and kernel version and might "
7033 #| "be absent entirely.  However there is currently no file system-"
7034 #| "independent interface for an application to discover these restrictions "
7035 #| "for a given file or file system.  Some file systems provide their own "
7036 #| "interfaces for doing so, for example the B<XFS_IOC_DIOINFO> operation in "
7037 #| "B<xfsctl>(3)."
7038 msgid ""
7039 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7040 "address of user-space buffers and the file offset of I/Os.  In Linux "
7041 "alignment restrictions vary by file system and kernel version and might be "
7042 "absent entirely.  However there is currently no file system-independent "
7043 "interface for an application to discover these restrictions for a given file "
7044 "or file system.  Some file systems provide their own interfaces for doing "
7045 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
7046 msgstr ""
7047 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
7048 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
7049 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
7050 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
7051 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
7052 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
7053 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
7054 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
7055
7056 #. type: Plain text
7057 #: build/C/man2/open.2:791
7058 msgid ""
7059 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
7060 "the file offset must all be multiples of the logical block size of the file "
7061 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
7062 msgstr ""
7063 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
7064 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
7065 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
7066
7067 #. type: Plain text
7068 #: build/C/man2/open.2:825
7069 #, fuzzy
7070 #| msgid ""
7071 #| "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7072 #| "system call, if the memory buffer is a private mapping (i.e., any mapping "
7073 #| "created with the B<mmap(2)> B<MAP_PRIVATE> flag; this includes memory "
7074 #| "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7075 #| "whether submitted via an asynchronous I/O interface or from another "
7076 #| "thread in the process, should be completed before B<fork>(2)  is called.  "
7077 #| "Failure to do so can result in data corruption and undefined behavior in "
7078 #| "parent and child processes.  This restriction does not apply when the "
7079 #| "memory buffer for the B<O_DIRECT> I/Os was created using B<shmat>(2)  or "
7080 #| "B<mmap>(2)  with the B<MAP_SHARED> flag.  Nor does this restriction apply "
7081 #| "when the memory buffer has been advised as B<MADV_DONTFORK> with B<madvise"
7082 #| "(2),> ensuring that it will not be available to the child after B<fork>"
7083 #| "(2)."
7084 msgid ""
7085 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7086 "system call, if the memory buffer is a private mapping (i.e., any mapping "
7087 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
7088 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7089 "whether submitted via an asynchronous I/O interface or from another thread "
7090 "in the process, should be completed before B<fork>(2)  is called.  Failure "
7091 "to do so can result in data corruption and undefined behavior in parent and "
7092 "child processes.  This restriction does not apply when the memory buffer for "
7093 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
7094 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
7095 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
7096 "will not be available to the child after B<fork>(2)."
7097 msgstr ""
7098 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
7099 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
7100 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
7101 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
7102 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
7103 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
7104 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
7105 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
7106 "動作が起こる可能性がある。\n"
7107 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
7108 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
7109 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
7110 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
7111 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
7112 "のである)。"
7113
7114 #. type: Plain text
7115 #: build/C/man2/open.2:835
7116 msgid ""
7117 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
7118 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
7119 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
7120 "flag of the same name, but without alignment restrictions."
7121 msgstr ""
7122 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
7123 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
7124 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
7125 "ラグを導入したが、アラインメントの制限はない。"
7126
7127 #. type: Plain text
7128 #: build/C/man2/open.2:844
7129 msgid ""
7130 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
7131 "Linux kernels simply ignore this flag.  Some file systems may not implement "
7132 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
7133 msgstr ""
7134 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
7135 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
7136 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
7137 "と B<open>()  は B<EINVAL> で失敗する。"
7138
7139 #. type: Plain text
7140 #: build/C/man2/open.2:855
7141 msgid ""
7142 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
7143 "file, and especially to overlapping byte regions in the same file.  Even "
7144 "when the file system correctly handles the coherency issues in this "
7145 "situation, overall I/O throughput is likely to be slower than using either "
7146 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
7147 "with direct I/O to the same files."
7148 msgstr ""
7149 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
7150 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
7151 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
7152 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
7153 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
7154 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
7155
7156 #. type: Plain text
7157 #: build/C/man2/open.2:877
7158 msgid ""
7159 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
7160 "Older kernels, or kernels configured in certain ways, may not support this "
7161 "combination.  The NFS protocol does not support passing the flag to the "
7162 "server, so B<O_DIRECT> I/O will only bypass the page cache on the client; "
7163 "the server may still cache the I/O.  The client asks the server to make the "
7164 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
7165 "servers will perform poorly under these circumstances, especially if the I/O "
7166 "size is small.  Some servers may also be configured to lie to clients about "
7167 "the I/O having reached stable storage; this will avoid the performance "
7168 "penalty at some risk to data integrity in the event of server power "
7169 "failure.  The Linux NFS client places no alignment restrictions on "
7170 "B<O_DIRECT> I/O."
7171 msgstr ""
7172 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
7173 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
7174 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
7175 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
7176 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
7177 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
7178 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
7179 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
7180 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
7181 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
7182 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
7183 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
7184
7185 #. type: Plain text
7186 #: build/C/man2/open.2:884
7187 msgid ""
7188 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
7189 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
7190 "as a performance option which is disabled by default."
7191 msgstr ""
7192 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
7193 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
7194 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
7195
7196 #. type: Plain text
7197 #: build/C/man2/open.2:889
7198 msgid ""
7199 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
7200 "interface is just stupid, and was probably designed by a deranged monkey on "
7201 "some serious mind-controlling substances.\"\\(emLinus"
7202 msgstr ""
7203 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
7204 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
7205 "な」 \\(em Linus"
7206
7207 #.  FIXME . Check bugzilla report on open(O_ASYNC)
7208 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
7209 #. type: Plain text
7210 #: build/C/man2/open.2:901
7211 msgid ""
7212 "Currently, it is not possible to enable signal-driven I/O by specifying "
7213 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
7214 msgstr ""
7215 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
7216 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
7217 "すること。"
7218
7219 #. type: Plain text
7220 #: build/C/man2/open.2:923
7221 msgid ""
7222 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7223 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7224 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7225 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7226 msgstr ""
7227 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7228 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7229 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7230 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7231
7232 #. type: TH
7233 #: build/C/man3/perror.3:31
7234 #, no-wrap
7235 msgid "PERROR"
7236 msgstr "PERROR"
7237
7238 #. type: TH
7239 #: build/C/man3/perror.3:31
7240 #, no-wrap
7241 msgid "2012-04-17"
7242 msgstr "2012-04-17"
7243
7244 #. type: Plain text
7245 #: build/C/man3/perror.3:34
7246 msgid "perror - print a system error message"
7247 msgstr "perror - システムエラーメッセージを出力する"
7248
7249 #. type: Plain text
7250 #: build/C/man3/perror.3:38
7251 msgid "B<void perror(const char *>I<s>B<);>"
7252 msgstr "B<void perror(const char *>I<s>B<);>"
7253
7254 #. type: Plain text
7255 #: build/C/man3/perror.3:40
7256 msgid "B<#include E<lt>errno.hE<gt>>"
7257 msgstr "B<#include E<lt>errno.hE<gt>>"
7258
7259 #. type: Plain text
7260 #: build/C/man3/perror.3:42
7261 msgid "B<const char *>I<sys_errlist>B<[];>"
7262 msgstr "B<const char *>I<sys_errlist>B<[];>"
7263
7264 #. type: Plain text
7265 #: build/C/man3/perror.3:44
7266 msgid "B<int >I<sys_nerr>B<;>"
7267 msgstr "B<int >I<sys_nerr>B<;>"
7268
7269 #. type: Plain text
7270 #: build/C/man3/perror.3:46
7271 msgid "B<int >I<errno>B<;>"
7272 msgstr "B<int >I<errno>B<;>"
7273
7274 #. type: Plain text
7275 #: build/C/man3/perror.3:55
7276 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7277 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7278
7279 #. type: Plain text
7280 #: build/C/man3/perror.3:68
7281 msgid ""
7282 "The routine B<perror>()  produces a message on the standard error output, "
7283 "describing the last error encountered during a call to a system or library "
7284 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7285 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7286 "blank.  Then the message and a new-line."
7287 msgstr ""
7288 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7289 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7290 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7291 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7292 "メッセージと改行が出力される。"
7293
7294 #. type: Plain text
7295 #: build/C/man3/perror.3:76
7296 msgid ""
7297 "To be of most use, the argument string should include the name of the "
7298 "function that incurred the error.  The error number is taken from the "
7299 "external variable I<errno>, which is set when errors occur but not cleared "
7300 "when successful calls are made."
7301 msgstr ""
7302 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7303 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7304 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7305
7306 #. type: Plain text
7307 #: build/C/man3/perror.3:90
7308 msgid ""
7309 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7310 "obtain the error message without the newline.  The largest message number "
7311 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7312 "this list because new error values may not have been added to I<sys_errlist>"
7313 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7314 msgstr ""
7315 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7316 "の\n"
7317 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7318 "ジ\n"
7319 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7320 "と。\n"
7321 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7322 "る。\n"
7323 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7324
7325 #. type: Plain text
7326 #: build/C/man3/perror.3:111
7327 msgid ""
7328 "When a system call fails, it usually returns -1 and sets the variable "
7329 "I<errno> to a value describing what went wrong.  (These values can be found "
7330 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7331 "B<perror>()  serves to translate this error code into human-readable form.  "
7332 "Note that I<errno> is undefined after a successful library call: this call "
7333 "may well change this variable, even though it succeeds, for example because "
7334 "it internally used some other library function that failed.  Thus, if a "
7335 "failing call is not immediately followed by a call to B<perror>(), the value "
7336 "of I<errno> should be saved."
7337 msgstr ""
7338 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7339 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7340 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7341 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7342 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7343 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7344 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7345 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7346 "い。"
7347
7348 #. type: Plain text
7349 #: build/C/man3/perror.3:124
7350 msgid ""
7351 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7352 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7353 "I<sys_errlist> conform to BSD."
7354 msgstr ""
7355 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7356 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7357 "に準拠している。"
7358
7359 #.  and only when _BSD_SOURCE is defined.
7360 #.  When
7361 #.  .B _GNU_SOURCE
7362 #.  is defined, the symbols
7363 #.  .I _sys_nerr
7364 #.  and
7365 #.  .I _sys_errlist
7366 #.  are provided.
7367 #. type: Plain text
7368 #: build/C/man3/perror.3:139
7369 msgid ""
7370 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7371 "I<E<lt>stdio.hE<gt>>."
7372 msgstr ""
7373 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7374 "I<E<lt>stdio.hE<gt>> に含まれている。"
7375
7376 #. type: Plain text
7377 #: build/C/man3/perror.3:144
7378 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7379 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7380
7381 #. type: TH
7382 #: build/C/man2/pipe.2:36
7383 #, no-wrap
7384 msgid "PIPE"
7385 msgstr "PIPE"
7386
7387 #. type: TH
7388 #: build/C/man2/pipe.2:36
7389 #, no-wrap
7390 msgid "2012-02-14"
7391 msgstr "2012-02-14"
7392
7393 #. type: Plain text
7394 #: build/C/man2/pipe.2:39
7395 msgid "pipe, pipe2 - create pipe"
7396 msgstr "pipe, pipe2 - パイプを生成する"
7397
7398 #. type: Plain text
7399 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7400 #, no-wrap
7401 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7402 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7403
7404 #. type: Plain text
7405 #: build/C/man2/pipe.2:44
7406 #, no-wrap
7407 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7408 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7409
7410 #. type: Plain text
7411 #: build/C/man2/pipe.2:48
7412 #, no-wrap
7413 msgid ""
7414 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7415 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7416 "B<#include E<lt>unistd.hE<gt>>\n"
7417 msgstr ""
7418 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7419 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7420 "B<#include E<lt>unistd.hE<gt>>\n"
7421
7422 #. type: Plain text
7423 #: build/C/man2/pipe.2:50
7424 #, no-wrap
7425 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7426 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7427
7428 #. type: Plain text
7429 #: build/C/man2/pipe.2:66
7430 msgid ""
7431 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7432 "for interprocess communication.  The array I<pipefd> is used to return two "
7433 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7434 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7435 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7436 "until it is read from the read end of the pipe.  For further details, see "
7437 "B<pipe>(7)."
7438 msgstr ""
7439 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7440 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7441 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7442 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7443 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7444 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7445
7446 #. type: Plain text
7447 #: build/C/man2/pipe.2:76
7448 msgid ""
7449 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7450 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7451 msgstr ""
7452 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7453 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7454 "きる。"
7455
7456 #. type: TP
7457 #: build/C/man2/pipe.2:76
7458 #, no-wrap
7459 msgid "B<O_NONBLOCK>"
7460 msgstr "B<O_NONBLOCK>"
7461
7462 #. type: Plain text
7463 #: build/C/man2/pipe.2:84
7464 msgid ""
7465 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7466 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7467 "the same result."
7468 msgstr ""
7469 "新しく生成される二つのオープンファイル記述 (open file description) の "
7470 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7471 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7472 "なる。"
7473
7474 #. type: TP
7475 #: build/C/man2/pipe.2:84
7476 #, no-wrap
7477 msgid "B<O_CLOEXEC>"
7478 msgstr "B<O_CLOEXEC>"
7479
7480 #. type: Plain text
7481 #: build/C/man2/pipe.2:92
7482 msgid ""
7483 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7484 "descriptors.  See the description of the same flag in B<open>(2)  for "
7485 "reasons why this may be useful."
7486 msgstr ""
7487 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7488 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7489 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7490
7491 #. type: Plain text
7492 #: build/C/man2/pipe.2:102
7493 msgid "I<pipefd> is not valid."
7494 msgstr "I<pipefd> が無効な値である。"
7495
7496 #. type: Plain text
7497 #: build/C/man2/pipe.2:107
7498 msgid "(B<pipe2>())  Invalid value in I<flags>."
7499 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7500
7501 #. type: Plain text
7502 #: build/C/man2/pipe.2:110
7503 msgid "Too many file descriptors are in use by the process."
7504 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7505
7506 #. type: Plain text
7507 #: build/C/man2/pipe.2:118
7508 msgid ""
7509 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7510 "starting with version 2.9."
7511 msgstr ""
7512 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7513 "はバージョン 2.9 以降で利用できる。"
7514
7515 #. type: Plain text
7516 #: build/C/man2/pipe.2:121
7517 msgid "B<pipe>(): POSIX.1-2001."
7518 msgstr "B<pipe>(): POSIX.1-2001."
7519
7520 #. type: Plain text
7521 #: build/C/man2/pipe.2:124
7522 msgid "B<pipe2>()  is Linux-specific."
7523 msgstr "B<pipe2>()  は Linux 固有である。"
7524
7525 #.  fork.2 refers to this example program.
7526 #. type: Plain text
7527 #: build/C/man2/pipe.2:140
7528 msgid ""
7529 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7530 "process; the child inherits a duplicate set of file descriptors that refer "
7531 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7532 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7533 "the string contained in the program's command-line argument to the pipe, and "
7534 "the child reads this string a byte at a time from the pipe and echoes it on "
7535 "standard output."
7536 msgstr ""
7537 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7538 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7539 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7540 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7541 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7542 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7543
7544 #. type: Plain text
7545 #: build/C/man2/pipe.2:147
7546 #, no-wrap
7547 msgid ""
7548 "#include E<lt>sys/wait.hE<gt>\n"
7549 "#include E<lt>stdio.hE<gt>\n"
7550 "#include E<lt>stdlib.hE<gt>\n"
7551 "#include E<lt>unistd.hE<gt>\n"
7552 "#include E<lt>string.hE<gt>\n"
7553 msgstr ""
7554 "#include E<lt>sys/wait.hE<gt>\n"
7555 "#include E<lt>stdio.hE<gt>\n"
7556 "#include E<lt>stdlib.hE<gt>\n"
7557 "#include E<lt>unistd.hE<gt>\n"
7558 "#include E<lt>string.hE<gt>\n"
7559
7560 #. type: Plain text
7561 #: build/C/man2/pipe.2:154
7562 #, no-wrap
7563 msgid ""
7564 "int\n"
7565 "main(int argc, char *argv[])\n"
7566 "{\n"
7567 "    int pipefd[2];\n"
7568 "    pid_t cpid;\n"
7569 "    char buf;\n"
7570 msgstr ""
7571 "int\n"
7572 "main(int argc, char *argv[])\n"
7573 "{\n"
7574 "    int pipefd[2];\n"
7575 "    pid_t cpid;\n"
7576 "    char buf;\n"
7577
7578 #. type: Plain text
7579 #: build/C/man2/pipe.2:159
7580 #, no-wrap
7581 msgid ""
7582 "    if (argc != 2) {\n"
7583 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7584 "\texit(EXIT_FAILURE);\n"
7585 "    }\n"
7586 msgstr ""
7587 "    if (argc != 2) {\n"
7588 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7589 "\texit(EXIT_FAILURE);\n"
7590 "    }\n"
7591
7592 #. type: Plain text
7593 #: build/C/man2/pipe.2:164
7594 #, no-wrap
7595 msgid ""
7596 "    if (pipe(pipefd) == -1) {\n"
7597 "        perror(\"pipe\");\n"
7598 "        exit(EXIT_FAILURE);\n"
7599 "    }\n"
7600 msgstr ""
7601 "    if (pipe(pipefd) == -1) {\n"
7602 "        perror(\"pipe\");\n"
7603 "        exit(EXIT_FAILURE);\n"
7604 "    }\n"
7605
7606 #. type: Plain text
7607 #: build/C/man2/pipe.2:170
7608 #, no-wrap
7609 msgid ""
7610 "    cpid = fork();\n"
7611 "    if (cpid == -1) {\n"
7612 "        perror(\"fork\");\n"
7613 "        exit(EXIT_FAILURE);\n"
7614 "    }\n"
7615 msgstr ""
7616 "    cpid = fork();\n"
7617 "    if (cpid == -1) {\n"
7618 "        perror(\"fork\");\n"
7619 "        exit(EXIT_FAILURE);\n"
7620 "    }\n"
7621
7622 #. type: Plain text
7623 #: build/C/man2/pipe.2:173
7624 #, no-wrap
7625 msgid ""
7626 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7627 "        close(pipefd[1]);          /* Close unused write end */\n"
7628 msgstr ""
7629 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7630 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7631
7632 #. type: Plain text
7633 #: build/C/man2/pipe.2:176
7634 #, no-wrap
7635 msgid ""
7636 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7637 "            write(STDOUT_FILENO, &buf, 1);\n"
7638 msgstr ""
7639 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7640 "            write(STDOUT_FILENO, &buf, 1);\n"
7641
7642 #. type: Plain text
7643 #: build/C/man2/pipe.2:180
7644 #, no-wrap
7645 msgid ""
7646 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7647 "        close(pipefd[0]);\n"
7648 "        _exit(EXIT_SUCCESS);\n"
7649 msgstr ""
7650 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7651 "        close(pipefd[0]);\n"
7652 "        _exit(EXIT_SUCCESS);\n"
7653
7654 #. type: Plain text
7655 #: build/C/man2/pipe.2:189
7656 #, no-wrap
7657 msgid ""
7658 "    } else {            /* Parent writes argv[1] to pipe */\n"
7659 "        close(pipefd[0]);          /* Close unused read end */\n"
7660 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7661 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7662 "        wait(NULL);                /* Wait for child */\n"
7663 "        exit(EXIT_SUCCESS);\n"
7664 "    }\n"
7665 "}\n"
7666 msgstr ""
7667 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7668 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7669 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7670 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7671 "        wait(NULL);                /* 子プロセスを待つ */\n"
7672 "        exit(EXIT_SUCCESS);\n"
7673 "    }\n"
7674 "}\n"
7675
7676 #. type: Plain text
7677 #: build/C/man2/pipe.2:197
7678 msgid ""
7679 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7680 "(7)"
7681 msgstr ""
7682 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7683 "(7)"
7684
7685 #. type: TH
7686 #: build/C/man3/popen.3:40
7687 #, no-wrap
7688 msgid "POPEN"
7689 msgstr "POPEN"
7690
7691 #. type: TH
7692 #: build/C/man3/popen.3:40
7693 #, no-wrap
7694 msgid "2010-02-03"
7695 msgstr "2010-02-03"
7696
7697 #. type: Plain text
7698 #: build/C/man3/popen.3:43
7699 msgid "popen, pclose - pipe stream to or from a process"
7700 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7701
7702 #. type: Plain text
7703 #: build/C/man3/popen.3:48
7704 #, no-wrap
7705 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7706 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7707
7708 #. type: Plain text
7709 #: build/C/man3/popen.3:50
7710 #, no-wrap
7711 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7712 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7713
7714 #. type: Plain text
7715 #: build/C/man3/popen.3:60
7716 msgid "B<popen>(), B<pclose>():"
7717 msgstr "B<popen>(), B<pclose>():"
7718
7719 #. type: Plain text
7720 #: build/C/man3/popen.3:62
7721 msgid ""
7722 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7723 msgstr ""
7724 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7725
7726 #. type: Plain text
7727 #: build/C/man3/popen.3:73
7728 msgid ""
7729 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7730 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7731 "I<type> argument may specify only reading or writing, not both; the "
7732 "resulting stream is correspondingly read-only or write-only."
7733 msgstr ""
7734 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7735 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7736 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7737 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7738 "たは 書き込み専用のいずれかとなる。"
7739
7740 #. type: Plain text
7741 #: build/C/man3/popen.3:97
7742 msgid ""
7743 "The I<command> argument is a pointer to a null-terminated string containing "
7744 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7745 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7746 "argument is a pointer to a null-terminated string which must contain either "
7747 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7748 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7749 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7750 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7751 "B<open>(2)  for reasons why this may be useful."
7752 msgstr ""
7753 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7754 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7755 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7756 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7757 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7758 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7759 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7760 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7761 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7762
7763 #. type: Plain text
7764 #: build/C/man3/popen.3:113
7765 msgid ""
7766 "The return value from B<popen>()  is a normal standard I/O stream in all "
7767 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7768 "(3).  Writing to such a stream writes to the standard input of the command; "
7769 "the command's standard output is the same as that of the process that called "
7770 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7771 "reading from a \"popened\" stream reads the command's standard output, and "
7772 "the command's standard input is the same as that of the process that called "
7773 "B<popen>()."
7774 msgstr ""
7775 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7776 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7777 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7778 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7779 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7780 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7781 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7782 "セスの標準入力と同一である。"
7783
7784 #. type: Plain text
7785 #: build/C/man3/popen.3:117
7786 msgid "Note that output B<popen>()  streams are fully buffered by default."
7787 msgstr ""
7788 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7789 "に注意しよう。"
7790
7791 #. type: Plain text
7792 #: build/C/man3/popen.3:123
7793 msgid ""
7794 "The B<pclose>()  function waits for the associated process to terminate and "
7795 "returns the exit status of the command as returned by B<wait4>(2)."
7796 msgstr ""
7797 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7798 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7799
7800 #. type: Plain text
7801 #: build/C/man3/popen.3:131
7802 msgid ""
7803 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7804 "calls fail, or if it cannot allocate memory."
7805 msgstr ""
7806 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7807 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7808
7809 #.  These conditions actually give undefined results, so I commented
7810 #.  them out.
7811 #.  .I stream
7812 #.  is not associated with a "popen()ed" command, if
7813 #. .I stream
7814 #.  already "pclose()d", or if
7815 #. type: Plain text
7816 #: build/C/man3/popen.3:143
7817 msgid ""
7818 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7819 "some other error is detected."
7820 msgstr ""
7821 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7822 "かった場合、 -1 を返す。"
7823
7824 #. type: Plain text
7825 #: build/C/man3/popen.3:162
7826 msgid ""
7827 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7828 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7829 "appropriately.  If the I<type> argument is invalid, and this condition is "
7830 "detected, I<errno> is set to B<EINVAL>."
7831 msgstr ""
7832 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7833 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7834 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7835 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7836
7837 #. type: Plain text
7838 #: build/C/man3/popen.3:169
7839 msgid ""
7840 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7841 msgstr ""
7842 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7843 "B<ECHILD> にセットされる。"
7844
7845 #. type: Plain text
7846 #: build/C/man3/popen.3:175
7847 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7848 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7849
7850 #. type: Plain text
7851 #: build/C/man3/popen.3:188
7852 msgid ""
7853 "Since the standard input of a command opened for reading shares its seek "
7854 "offset with the process that called B<popen>(), if the original process has "
7855 "done a buffered read, the command's input position may not be as expected.  "
7856 "Similarly, the output from a command opened for writing may become "
7857 "intermingled with that of the original process.  The latter can be avoided "
7858 "by calling B<fflush>(3)  before B<popen>()."
7859 msgstr ""
7860 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7861 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7862 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7863 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7864 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7865 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7866
7867 #.  .SH HISTORY
7868 #.  A
7869 #.  .BR popen ()
7870 #.  and a
7871 #.  .BR pclose ()
7872 #.  function appeared in Version 7 AT&T UNIX.
7873 #. type: Plain text
7874 #: build/C/man3/popen.3:198
7875 msgid ""
7876 "Failure to execute the shell is indistinguishable from the shell's failure "
7877 "to execute command, or an immediate exit of the command.  The only hint is "
7878 "an exit status of 127."
7879 msgstr ""
7880 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
7881 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
7882 "なることである。"
7883
7884 #. type: Plain text
7885 #: build/C/man3/popen.3:208
7886 msgid ""
7887 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7888 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7889 msgstr ""
7890 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7891 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7892
7893 #. type: TH
7894 #: build/C/man3/printf.3:34
7895 #, no-wrap
7896 msgid "PRINTF"
7897 msgstr "PRINTF"
7898
7899 #. type: TH
7900 #: build/C/man3/printf.3:34
7901 #, fuzzy, no-wrap
7902 #| msgid "2012-03-30"
7903 msgid "2013-03-05"
7904 msgstr "2012-03-30"
7905
7906 #. type: Plain text
7907 #: build/C/man3/printf.3:38
7908 msgid ""
7909 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7910 "formatted output conversion"
7911 msgstr ""
7912 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7913 "指定された書式に変換して出力を行う"
7914
7915 #. type: Plain text
7916 #: build/C/man3/printf.3:42
7917 msgid "B<int printf(const char *>I<format>B<, ...);>"
7918 msgstr "B<int printf(const char *>I<format>B<, ...);>"
7919
7920 #. type: Plain text
7921 #: build/C/man3/printf.3:44
7922 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7923 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7924
7925 #. type: Plain text
7926 #: build/C/man3/printf.3:46
7927 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7928 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7929
7930 #. type: Plain text
7931 #: build/C/man3/printf.3:48
7932 msgid ""
7933 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7934 "*>I<format>B<, ...);>"
7935 msgstr ""
7936 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7937 "*>I<format>B<, ...);>"
7938
7939 #. type: Plain text
7940 #: build/C/man3/printf.3:50
7941 msgid "B<#include E<lt>stdarg.hE<gt>>"
7942 msgstr "B<#include E<lt>stdarg.hE<gt>>"
7943
7944 #. type: Plain text
7945 #: build/C/man3/printf.3:52
7946 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7947 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7948
7949 #. type: Plain text
7950 #: build/C/man3/printf.3:54
7951 msgid ""
7952 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7953 ">I<ap>B<);>"
7954 msgstr ""
7955 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7956 ">I<ap>B<);>"
7957
7958 #. type: Plain text
7959 #: build/C/man3/printf.3:56
7960 msgid ""
7961 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7962 msgstr ""
7963 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7964
7965 #. type: Plain text
7966 #: build/C/man3/printf.3:59
7967 msgid ""
7968 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7969 "*>I<format>B<, va_list >I<ap>B<);>"
7970 msgstr ""
7971 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7972 "*>I<format>B<, va_list >I<ap>B<);>"
7973
7974 #. type: Plain text
7975 #: build/C/man3/printf.3:68
7976 msgid "B<snprintf>(), B<vsnprintf>():"
7977 msgstr "B<snprintf>(), B<vsnprintf>():"
7978
7979 #. type: Plain text
7980 #: build/C/man3/printf.3:71
7981 msgid ""
7982 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7983 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7984 msgstr ""
7985 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7986 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7987
7988 #. type: Plain text
7989 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
7990 msgid "or I<cc -std=c99>"
7991 msgstr "or I<cc -std=c99>"
7992
7993 #. type: Plain text
7994 #: build/C/man3/printf.3:101
7995 msgid ""
7996 "The functions in the B<printf>()  family produce output according to a "
7997 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
7998 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
7999 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
8000 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
8001 "string I<str>."
8002 msgstr ""
8003 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
8004 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
8005 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
8006 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8007 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
8008
8009 #. type: Plain text
8010 #: build/C/man3/printf.3:110
8011 msgid ""
8012 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
8013 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
8014 msgstr ""
8015 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
8016 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
8017
8018 #. type: Plain text
8019 #: build/C/man3/printf.3:134
8020 msgid ""
8021 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
8022 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
8023 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
8024 "instead of a variable number of arguments.  These functions do not call the "
8025 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
8026 "I<ap> is undefined after the call.  See B<stdarg>(3)."
8027 msgstr ""
8028 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
8029 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
8030 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
8031 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
8032 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
8033 "(3)  を参照のこと。"
8034
8035 #. type: Plain text
8036 #: build/C/man3/printf.3:141
8037 msgid ""
8038 "These eight functions write the output under the control of a I<format> "
8039 "string that specifies how subsequent arguments (or arguments accessed via "
8040 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
8041 "output."
8042 msgstr ""
8043 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
8044 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
8045 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
8046
8047 #. type: Plain text
8048 #: build/C/man3/printf.3:152
8049 msgid ""
8050 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
8051 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
8052 "copying to take place between objects that overlap (e.g., if the target "
8053 "string array and one of the supplied input arguments refer to the same "
8054 "buffer).  See NOTES."
8055 msgstr ""
8056 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8057 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
8058 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
8059 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
8060 "照。"
8061
8062 #. type: SS
8063 #: build/C/man3/printf.3:152
8064 #, no-wrap
8065 msgid "Return value"
8066 msgstr "Return Values"
8067
8068 #. type: Plain text
8069 #: build/C/man3/printf.3:155
8070 msgid ""
8071 "Upon successful return, these functions return the number of characters "
8072 "printed (excluding the null byte used to end output to strings)."
8073 msgstr ""
8074 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
8075 "用する NULL バイトは数に含まれない)。"
8076
8077 #. type: Plain text
8078 #: build/C/man3/printf.3:171
8079 msgid ""
8080 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
8081 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
8082 "the output was truncated due to this limit then the return value is the "
8083 "number of characters (excluding the terminating null byte)  which would have "
8084 "been written to the final string if enough space had been available.  Thus, "
8085 "a return value of I<size> or more means that the output was truncated.  (See "
8086 "also below under NOTES.)"
8087 msgstr ""
8088 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
8089 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
8090 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
8091 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
8092 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
8093 "する (後述の注意も参照のこと)。"
8094
8095 #. type: Plain text
8096 #: build/C/man3/printf.3:173
8097 msgid "If an output error is encountered, a negative value is returned."
8098 msgstr "エラーが発生した場合は、負の数を返す。"
8099
8100 #. type: SS
8101 #: build/C/man3/printf.3:173
8102 #, no-wrap
8103 msgid "Format of the format string"
8104 msgstr "フォーマット文字列のフォーマット"
8105
8106 #. type: Plain text
8107 #: build/C/man3/printf.3:195
8108 msgid ""
8109 "The format string is a character string, beginning and ending in its initial "
8110 "shift state, if any.  The format string is composed of zero or more "
8111 "directives: ordinary characters (not B<%>), which are copied unchanged to "
8112 "the output stream; and conversion specifications, each of which results in "
8113 "fetching zero or more subsequent arguments.  Each conversion specification "
8114 "is introduced by the character B<%>, and ends with a I<conversion "
8115 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
8116 "an optional minimum I<field width>, an optional I<precision> and an optional "
8117 "I<length modifier>."
8118 msgstr ""
8119 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
8120 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
8121 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
8122 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
8123 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
8124 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
8125 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
8126 "子> を (この順序で) 置くことができる。"
8127
8128 #. type: Plain text
8129 #: build/C/man3/printf.3:208
8130 msgid ""
8131 "The arguments must correspond properly (after type promotion) with the "
8132 "conversion specifier.  By default, the arguments are used in the order "
8133 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
8134 "next argument (and it is an error if insufficiently many arguments are "
8135 "given).  One can also specify explicitly which argument is taken, at each "
8136 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
8137 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
8138 "denotes the position in the argument list of the desired argument, indexed "
8139 "starting from 1.  Thus,"
8140 msgstr ""
8141 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
8142 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
8143 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
8144 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
8145 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
8146 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
8147 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
8148
8149 #. type: Plain text
8150 #: build/C/man3/printf.3:212
8151 #, no-wrap
8152 msgid "printf(\"%*d\", width, num);\n"
8153 msgstr "printf(\"%*d\", width, num);\n"
8154
8155 #. type: Plain text
8156 #: build/C/man3/printf.3:216
8157 msgid "and"
8158 msgstr "と"
8159
8160 #. type: Plain text
8161 #: build/C/man3/printf.3:220
8162 #, no-wrap
8163 msgid "printf(\"%2$*1$d\", width, num);\n"
8164 msgstr "printf(\"%2$*1$d\", width, num);\n"
8165
8166 #. type: Plain text
8167 #: build/C/man3/printf.3:236
8168 msgid ""
8169 "are equivalent.  The second style allows repeated references to the same "
8170 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
8171 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
8172 "\\(aq is used, it must be used throughout for all conversions taking an "
8173 "argument and all width and precision arguments, but it may be mixed with \"%%"
8174 "\" formats which do not consume an argument.  There may be no gaps in the "
8175 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
8176 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
8177 "format string."
8178 msgstr ""
8179 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
8180 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
8181 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
8182 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
8183 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
8184 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
8185 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
8186
8187 #. type: Plain text
8188 #: build/C/man3/printf.3:246
8189 msgid ""
8190 "For some numeric conversions a radix character (\"decimal point\") or "
8191 "thousands' grouping character is used.  The actual character used depends on "
8192 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
8193 "radix character, and does not have a grouping character.  Thus,"
8194 msgstr ""
8195 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
8196 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
8197 "\\(aq を用い、 区切り文字は使わない。 従って、"
8198
8199 #. type: Plain text
8200 #: build/C/man3/printf.3:250
8201 #, no-wrap
8202 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
8203 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
8204
8205 #. type: Plain text
8206 #: build/C/man3/printf.3:255
8207 msgid ""
8208 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
8209 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
8210 msgstr ""
8211 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
8212 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
8213
8214 #. type: SS
8215 #: build/C/man3/printf.3:255
8216 #, no-wrap
8217 msgid "The flag characters"
8218 msgstr "フラグ文字"
8219
8220 #. type: Plain text
8221 #: build/C/man3/printf.3:257
8222 msgid "The character % is followed by zero or more of the following flags:"
8223 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
8224
8225 #. type: TP
8226 #: build/C/man3/printf.3:257
8227 #, no-wrap
8228 msgid "B<#>"
8229 msgstr "B<#>"
8230
8231 #. type: Plain text
8232 #: build/C/man3/printf.3:291
8233 msgid ""
8234 "The value should be converted to an \"alternate form\".  For B<o> "
8235 "conversions, the first character of the output string is made zero (by "
8236 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
8237 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
8238 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
8239 "conversions, the result will always contain a decimal point, even if no "
8240 "digits follow it (normally, a decimal point appears in the results of those "
8241 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
8242 "trailing zeros are not removed from the result as they would otherwise be.  "
8243 "For other conversions, the result is undefined."
8244 msgstr ""
8245 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
8246 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
8247 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
8248 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
8249 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
8250 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
8251 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
8252 "変換では、結果は未定義である。"
8253
8254 #. type: TP
8255 #: build/C/man3/printf.3:291
8256 #, no-wrap
8257 msgid "B<\\&0>"
8258 msgstr "B<\\&0>"
8259
8260 #. type: Plain text
8261 #: build/C/man3/printf.3:331
8262 msgid ""
8263 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8264 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8265 "converted value is padded on the left with zeros rather than blanks.  If the "
8266 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8267 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8268 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8269 "is undefined."
8270 msgstr ""
8271 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8272 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8273 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8274 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8275 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8276 "である。"
8277
8278 #. type: TP
8279 #: build/C/man3/printf.3:331
8280 #, no-wrap
8281 msgid "B<->"
8282 msgstr "B<->"
8283
8284 #. type: Plain text
8285 #: build/C/man3/printf.3:344
8286 msgid ""
8287 "The converted value is to be left adjusted on the field boundary.  (The "
8288 "default is right justification.)  Except for B<n> conversions, the converted "
8289 "value is padded on the right with blanks, rather than on the left with "
8290 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8291 msgstr ""
8292 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8293 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8294 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8295
8296 #. type: TP
8297 #: build/C/man3/printf.3:344
8298 #, no-wrap
8299 msgid "B<\\(aq \\(aq>"
8300 msgstr "B<' '>"
8301
8302 #. type: Plain text
8303 #: build/C/man3/printf.3:348
8304 msgid ""
8305 "(a space) A blank should be left before a positive number (or empty string) "
8306 "produced by a signed conversion."
8307 msgstr ""
8308 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8309 "列) が置かれる。"
8310
8311 #. type: TP
8312 #: build/C/man3/printf.3:348
8313 #, no-wrap
8314 msgid "B<+>"
8315 msgstr "B<+>"
8316
8317 #. type: Plain text
8318 #: build/C/man3/printf.3:356
8319 msgid ""
8320 "A sign (+ or -) should always be placed before a number produced by a signed "
8321 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8322 "overrides a space if both are used."
8323 msgstr ""
8324 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8325 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8326 "が使われている場合には、 B<+> が優先される。"
8327
8328 #. type: Plain text
8329 #: build/C/man3/printf.3:359
8330 msgid ""
8331 "The five flag characters above are defined in the C standard.  The SUSv2 "
8332 "specifies one further flag character."
8333 msgstr ""
8334 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8335 "グ文字が規定されている。"
8336
8337 #. type: TP
8338 #: build/C/man3/printf.3:359
8339 #, no-wrap
8340 msgid "B<\\(aq>"
8341 msgstr "B<\\(aq>"
8342
8343 #. type: Plain text
8344 #: build/C/man3/printf.3:376
8345 msgid ""
8346 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8347 "output is to be grouped with thousands' grouping characters if the locale "
8348 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8349 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8350 "\\(aqF>."
8351 msgstr ""
8352 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8353 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8354 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8355 "\\(aqF は SUSv2 には含まれていない。"
8356
8357 #. type: Plain text
8358 #: build/C/man3/printf.3:378
8359 msgid "glibc 2.2 adds one further flag character."
8360 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8361
8362 #. type: TP
8363 #: build/C/man3/printf.3:378
8364 #, no-wrap
8365 msgid "B<I>"
8366 msgstr "B<I>"
8367
8368 #.  outdigits keyword in locale file
8369 #. type: Plain text
8370 #: build/C/man3/printf.3:388
8371 msgid ""
8372 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8373 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8374 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8375 msgstr ""
8376 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8377 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8378 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8379
8380 #. type: SS
8381 #: build/C/man3/printf.3:388
8382 #, no-wrap
8383 msgid "The field width"
8384 msgstr "フィールド幅"
8385
8386 #. type: Plain text
8387 #: build/C/man3/printf.3:404
8388 msgid ""
8389 "An optional decimal digit string (with nonzero first digit) specifying a "
8390 "minimum field width.  If the converted value has fewer characters than the "
8391 "field width, it will be padded with spaces on the left (or right, if the "
8392 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8393 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8394 "the field width is given in the next argument, or in the I<m>-th argument, "
8395 "respectively, which must be of type I<int>.  A negative field width is taken "
8396 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8397 "nonexistent or small field width cause truncation of a field; if the result "
8398 "of a conversion is wider than the field width, the field is expanded to "
8399 "contain the conversion result."
8400 msgstr ""
8401 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8402 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8403 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8404 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8405 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8406 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8407 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8408 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8409 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8410 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8411
8412 #. type: SS
8413 #: build/C/man3/printf.3:404
8414 #, no-wrap
8415 msgid "The precision"
8416 msgstr "精度"
8417
8418 #. type: Plain text
8419 #: build/C/man3/printf.3:440
8420 msgid ""
8421 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8422 "optional decimal digit string.  Instead of a decimal digit string one may "
8423 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8424 "precision is given in the next argument, or in the m-th argument, "
8425 "respectively, which must be of type I<int>.  If the precision is given as "
8426 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8427 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8428 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8429 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8430 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8431 "the maximum number of characters to be printed from a string for B<s> and "
8432 "B<S> conversions."
8433 msgstr ""
8434 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8435 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8436 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8437 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8438 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8439 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8440 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8441 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8442 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8443 "る最大文字数を指定する。"
8444
8445 #. type: SS
8446 #: build/C/man3/printf.3:440
8447 #, no-wrap
8448 msgid "The length modifier"
8449 msgstr "長さ修飾子"
8450
8451 #. type: Plain text
8452 #: build/C/man3/printf.3:450
8453 msgid ""
8454 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8455 "B<X> conversion."
8456 msgstr ""
8457 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8458
8459 #. type: TP
8460 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:294
8461 #, no-wrap
8462 msgid "B<hh>"
8463 msgstr "B<hh>"
8464
8465 #. type: Plain text
8466 #: build/C/man3/printf.3:461
8467 msgid ""
8468 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8469 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8470 "I<signed char> argument."
8471 msgstr ""
8472 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8473 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8474
8475 #. type: TP
8476 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:284
8477 #, no-wrap
8478 msgid "B<h>"
8479 msgstr "B<h>"
8480
8481 #. type: Plain text
8482 #: build/C/man3/printf.3:472
8483 msgid ""
8484 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8485 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8486 "to a I<short int> argument."
8487 msgstr ""
8488 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8489 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8490
8491 #. type: TP
8492 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:311
8493 #, no-wrap
8494 msgid "B<l>"
8495 msgstr "B<l>"
8496
8497 #. type: Plain text
8498 #: build/C/man3/printf.3:491
8499 msgid ""
8500 "(ell) A following integer conversion corresponds to a I<long int> or "
8501 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8502 "a pointer to a I<long int> argument, or a following B<c> conversion "
8503 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8504 "corresponds to a pointer to I<wchar_t> argument."
8505 msgstr ""
8506 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8507 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8508 "変換では I<wchar_t> へのポインタであることを示す。"
8509
8510 #. type: TP
8511 #: build/C/man3/printf.3:491
8512 #, no-wrap
8513 msgid "B<ll>"
8514 msgstr "B<ll> (エルエル)"
8515
8516 #. type: Plain text
8517 #: build/C/man3/printf.3:503
8518 msgid ""
8519 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8520 "or I<unsigned long long int> argument, or a following B<n> conversion "
8521 "corresponds to a pointer to a I<long long int> argument."
8522 msgstr ""
8523 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8524 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8525
8526 #. type: TP
8527 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:338
8528 #, no-wrap
8529 msgid "B<L>"
8530 msgstr "B<L>"
8531
8532 #. type: Plain text
8533 #: build/C/man3/printf.3:519
8534 msgid ""
8535 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8536 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8537 "not.)"
8538 msgstr ""
8539 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8540 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8541 "認められていない。)"
8542
8543 #. type: TP
8544 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:354
8545 #, no-wrap
8546 msgid "B<q>"
8547 msgstr "B<q>"
8548
8549 #. type: Plain text
8550 #: build/C/man3/printf.3:525
8551 msgid ""
8552 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8553 "B<ll>."
8554 msgstr ""
8555 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8556 "意味である。"
8557
8558 #. type: TP
8559 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:302
8560 #, no-wrap
8561 msgid "B<j>"
8562 msgstr "B<j>"
8563
8564 #. type: Plain text
8565 #: build/C/man3/printf.3:532
8566 msgid ""
8567 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8568 "argument."
8569 msgstr ""
8570 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8571
8572 #. type: TP
8573 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:366
8574 #, no-wrap
8575 msgid "B<z>"
8576 msgstr "B<z>"
8577
8578 #. type: Plain text
8579 #: build/C/man3/printf.3:543
8580 msgid ""
8581 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8582 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8583 msgstr ""
8584 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8585 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8586
8587 #. type: TP
8588 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:359
8589 #, no-wrap
8590 msgid "B<t>"
8591 msgstr "B<t>"
8592
8593 #. type: Plain text
8594 #: build/C/man3/printf.3:548
8595 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8596 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8597
8598 #. type: Plain text
8599 #: build/C/man3/printf.3:577
8600 msgid ""
8601 "The SUSv2 only knows about the length modifiers B<h> (in B<hd>, B<hi>, "
8602 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8603 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8604 msgstr ""
8605 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8606 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8607 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8608
8609 #. type: SS
8610 #: build/C/man3/printf.3:577
8611 #, no-wrap
8612 msgid "The conversion specifier"
8613 msgstr "変換指定子"
8614
8615 #. type: Plain text
8616 #: build/C/man3/printf.3:580
8617 msgid ""
8618 "A character that specifies the type of conversion to be applied.  The "
8619 "conversion specifiers and their meanings are:"
8620 msgstr ""
8621 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8622
8623 #. type: TP
8624 #: build/C/man3/printf.3:580
8625 #, no-wrap
8626 msgid "B<d>, B<i>"
8627 msgstr "B<d>, B<i>"
8628
8629 #. type: Plain text
8630 #: build/C/man3/printf.3:590
8631 msgid ""
8632 "The I<int> argument is converted to signed decimal notation.  The precision, "
8633 "if any, gives the minimum number of digits that must appear; if the "
8634 "converted value requires fewer digits, it is padded on the left with zeros.  "
8635 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8636 "the output is empty."
8637 msgstr ""
8638 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8639 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8640 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8641 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8642
8643 #. type: TP
8644 #: build/C/man3/printf.3:590
8645 #, no-wrap
8646 msgid "B<o>, B<u>, B<x>, B<X>"
8647 msgstr "B<o>, B<u>, B<x>, B<X>"
8648
8649 #. type: Plain text
8650 #: build/C/man3/printf.3:617
8651 msgid ""
8652 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8653 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8654 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8655 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8656 "of digits that must appear; if the converted value requires fewer digits, it "
8657 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8658 "printed with an explicit precision 0, the output is empty."
8659 msgstr ""
8660 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8661 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8662 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8663 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8664 "られる。"
8665
8666 #. type: TP
8667 #: build/C/man3/printf.3:617
8668 #, no-wrap
8669 msgid "B<e>, B<E>"
8670 msgstr "B<e>, B<E>"
8671
8672 #. type: Plain text
8673 #: build/C/man3/printf.3:636
8674 msgid ""
8675 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
8676 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
8677 "and the number of digits after it is equal to the precision; if the "
8678 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
8679 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
8680 "than B<e>)  to introduce the exponent.  The exponent always contains at "
8681 "least two digits; if the value is zero, the exponent is 00."
8682 msgstr ""
8683 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
8684 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
8685 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
8686 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
8687 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
8688 "指数の値が 0 の場合には、00 と表示される。"
8689
8690 #. type: TP
8691 #: build/C/man3/printf.3:636
8692 #, no-wrap
8693 msgid "B<f>, B<F>"
8694 msgstr "B<f>, B<F>"
8695
8696 #. type: Plain text
8697 #: build/C/man3/printf.3:647
8698 msgid ""
8699 "The I<double> argument is rounded and converted to decimal notation in the "
8700 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8701 "character is equal to the precision specification.  If the precision is "
8702 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8703 "point character appears.  If a decimal point appears, at least one digit "
8704 "appears before it."
8705 msgstr ""
8706 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8707 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8708 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8709 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8710
8711 #. type: Plain text
8712 #: build/C/man3/printf.3:658
8713 msgid ""
8714 "(The SUSv2 does not know about B<F> and says that character string "
8715 "representations for infinity and NaN may be made available.  The C99 "
8716 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8717 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8718 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8719 msgstr ""
8720 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8721 "行ってもよいことになっている。\n"
8722 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8723 "し、\n"
8724 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8725 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8726
8727 #. type: TP
8728 #: build/C/man3/printf.3:658
8729 #, no-wrap
8730 msgid "B<g>, B<G>"
8731 msgstr "B<g>, B<G>"
8732
8733 #. type: Plain text
8734 #: build/C/man3/printf.3:683
8735 msgid ""
8736 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8737 "for B<G> conversions).  The precision specifies the number of significant "
8738 "digits.  If the precision is missing, 6 digits are given; if the precision "
8739 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8740 "conversion is less than -4 or greater than or equal to the precision.  "
8741 "Trailing zeros are removed from the fractional part of the result; a decimal "
8742 "point appears only if it is followed by at least one digit."
8743 msgstr ""
8744 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8745 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8746 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8747 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8748 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8749 "一つある場合にだけである。"
8750
8751 #. type: TP
8752 #: build/C/man3/printf.3:683
8753 #, no-wrap
8754 msgid "B<a>, B<A>"
8755 msgstr "B<a>, B<A>"
8756
8757 #. type: Plain text
8758 #: build/C/man3/printf.3:707
8759 msgid ""
8760 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8761 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8762 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
8763 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8764 "digit before the decimal point, and the number of digits after it is equal "
8765 "to the precision.  The default precision suffices for an exact "
8766 "representation of the value if an exact representation in base 2 exists and "
8767 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8768 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8769 "and nonzero but otherwise unspecified for normalized numbers."
8770 msgstr ""
8771 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
8772 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8773 "16 進表記に変換する。\n"
8774 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8775 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8776 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8777 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8778 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8779 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8780 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8781
8782 #. type: TP
8783 #: build/C/man3/printf.3:707 build/C/man3/scanf.3:459
8784 #: build/C/man3/wprintf.3:134
8785 #, no-wrap
8786 msgid "B<c>"
8787 msgstr "B<c>"
8788
8789 #. type: Plain text
8790 #: build/C/man3/printf.3:725
8791 msgid ""
8792 "If no B<l> modifier is present, the I<int> argument is converted to an "
8793 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8794 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8795 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8796 "conversion state starting in the initial state, and the resulting multibyte "
8797 "string is written."
8798 msgstr ""
8799 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8800 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8801 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8802 "換し、 変換されたマルチバイト文字列を出力する。"
8803
8804 #. type: TP
8805 #: build/C/man3/printf.3:725 build/C/man3/scanf.3:451
8806 #: build/C/man3/wprintf.3:148
8807 #, no-wrap
8808 msgid "B<s>"
8809 msgstr "B<s>"
8810
8811 #. type: Plain text
8812 #: build/C/man3/printf.3:740
8813 msgid ""
8814 "If no B<l> modifier is present: The I<const char *> argument is expected to "
8815 "be a pointer to an array of character type (pointer to a string).  "
8816 "Characters from the array are written up to (but not including) a "
8817 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8818 "than the number specified are written.  If a precision is given, no null "
8819 "byte need be present; if the precision is not specified, or is greater than "
8820 "the size of the array, the array must contain a terminating null byte."
8821 msgstr ""
8822 "B<l> 修飾子がない場合、 引き数は I<const char *> 型で文字型の配列へのポイン"
8823 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8824 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8825 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8826 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8827 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8828 "なければならない。"
8829
8830 #. type: Plain text
8831 #: build/C/man3/printf.3:767
8832 msgid ""
8833 "If an B<l> modifier is present: The I<const wchar_t *> argument is expected "
8834 "to be a pointer to an array of wide characters.  Wide characters from the "
8835 "array are converted to multibyte characters (each by a call to the B<wcrtomb>"
8836 "(3)  function, with a conversion state starting in the initial state before "
8837 "the first wide character), up to and including a terminating null wide "
8838 "character.  The resulting multibyte characters are written up to (but not "
8839 "including) the terminating null byte.  If a precision is specified, no more "
8840 "bytes than the number specified are written, but no partial multibyte "
8841 "characters are written.  Note that the precision determines the number of "
8842 "I<bytes> written, not the number of I<wide characters> or I<screen "
8843 "positions>.  The array must contain a terminating null wide character, "
8844 "unless a precision is given and it is so small that the number of bytes "
8845 "written exceeds it before the end of the array is reached."
8846 msgstr ""
8847 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t *> 型でワイド文字"
8848 "の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字毎"
8849 "に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド文"
8850 "字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8851 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8852 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8853 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8854 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8855 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8856 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8857 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8858 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8859 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8860 "い。"
8861
8862 #. type: TP
8863 #: build/C/man3/printf.3:767
8864 #, no-wrap
8865 msgid "B<C>"
8866 msgstr "B<C>"
8867
8868 #. type: Plain text
8869 #: build/C/man3/printf.3:773
8870 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8871 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8872
8873 #. type: TP
8874 #: build/C/man3/printf.3:773
8875 #, no-wrap
8876 msgid "B<S>"
8877 msgstr "B<S>"
8878
8879 #. type: Plain text
8880 #: build/C/man3/printf.3:779
8881 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
8882 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
8883
8884 #. type: TP
8885 #: build/C/man3/printf.3:779 build/C/man3/scanf.3:503
8886 #, no-wrap
8887 msgid "B<p>"
8888 msgstr "B<p>"
8889
8890 #. type: Plain text
8891 #: build/C/man3/printf.3:787
8892 msgid ""
8893 "The I<void *> pointer argument is printed in hexadecimal (as if by B<%#x> or "
8894 "B<%#lx>)."
8895 msgstr ""
8896 "I<void *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
8897
8898 #. type: TP
8899 #: build/C/man3/printf.3:787 build/C/man3/scanf.3:511
8900 #, no-wrap
8901 msgid "B<n>"
8902 msgstr "B<n>"
8903
8904 #. type: Plain text
8905 #: build/C/man3/printf.3:794
8906 msgid ""
8907 "The number of characters written so far is stored into the integer indicated "
8908 "by the I<int *> (or variant) pointer argument.  No argument is converted."
8909 msgstr ""
8910 "これまでに出力された文字数を I<int *> (または類似の型) のポインタ引き数が指す"
8911 "整数に保存する。 引き数の変換は行われない。"
8912
8913 #. type: TP
8914 #: build/C/man3/printf.3:794
8915 #, no-wrap
8916 msgid "B<m>"
8917 msgstr "B<m>"
8918
8919 #. type: Plain text
8920 #: build/C/man3/printf.3:800
8921 msgid ""
8922 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
8923 "required."
8924 msgstr ""
8925 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
8926
8927 #. type: TP
8928 #: build/C/man3/printf.3:800 build/C/man3/scanf.3:377
8929 #, no-wrap
8930 msgid "B<%>"
8931 msgstr "B<%>"
8932
8933 #. type: Plain text
8934 #: build/C/man3/printf.3:806
8935 msgid ""
8936 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
8937 "conversion specification is \\(aq%%\\(aq."
8938 msgstr ""
8939 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
8940 "%\" となる。"
8941
8942 #. type: Plain text
8943 #: build/C/man3/printf.3:821
8944 msgid ""
8945 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8946 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
8947 "B<vsnprintf>()  functions conform to C99."
8948 msgstr ""
8949 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8950 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
8951 "B<vsnprintf>()  は C99 に準拠している。"
8952
8953 #. type: Plain text
8954 #: build/C/man3/printf.3:834
8955 msgid ""
8956 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
8957 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
8958 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
8959 "this case, and gives the return value (as always)  as the number of "
8960 "characters that would have been written in case the output string has been "
8961 "large enough."
8962 msgstr ""
8963 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
8964 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
8965 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
8966 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
8967 "出力されるであろう文字数を返す。"
8968
8969 #. type: Plain text
8970 #: build/C/man3/printf.3:848
8971 msgid ""
8972 "Linux libc4 knows about the five C standard flags.  It knows about the "
8973 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
8974 "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 "
8975 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
8976 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
8977 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
8978 "dependent radix character, no thousands' separator, no NaN or infinity, no "
8979 "\"%m$\" and \"*m$\"."
8980 msgstr ""
8981 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
8982 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
8983 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
8984 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
8985 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
8986 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
8987 "えない。"
8988
8989 #. type: Plain text
8990 #: build/C/man3/printf.3:859
8991 msgid ""
8992 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
8993 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
8994 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
8995 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
8996 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
8997 "outputs I<strerror(errno)>."
8998 msgstr ""
8999 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
9000 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
9001 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
9002 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
9003 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
9004 "ある。"
9005
9006 #. type: Plain text
9007 #: build/C/man3/printf.3:861
9008 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
9009 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
9010
9011 #. type: Plain text
9012 #: build/C/man3/printf.3:864
9013 msgid ""
9014 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
9015 "characters B<a> and B<A>."
9016 msgstr ""
9017 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
9018 "加された。"
9019
9020 #. type: Plain text
9021 #: build/C/man3/printf.3:867
9022 msgid ""
9023 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
9024 "flag character B<I>."
9025 msgstr ""
9026 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
9027 "追加された。"
9028
9029 #. type: Plain text
9030 #: build/C/man3/printf.3:869
9031 msgid "Some programs imprudently rely on code such as the following"
9032 msgstr ""
9033 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
9034 "ラムがある。"
9035
9036 #. type: Plain text
9037 #: build/C/man3/printf.3:871
9038 #, no-wrap
9039 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
9040 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
9041
9042 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
9043 #. type: Plain text
9044 #: build/C/man3/printf.3:887
9045 msgid ""
9046 "to append text to I<buf>.  However, the standards explicitly note that the "
9047 "results are undefined if source and destination buffers overlap when calling "
9048 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
9049 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
9050 "such as the above will B<not> produce the expected results."
9051 msgstr ""
9052 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
9053 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
9054 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
9055 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
9056 "結果が得られ「ない」ことがある。"
9057
9058 #.  .SH HISTORY
9059 #.  UNIX V7 defines the three routines
9060 #.  .BR printf (),
9061 #.  .BR fprintf (),
9062 #.  .BR sprintf (),
9063 #.  and has the flag \-, the width or precision *, the length modifier l,
9064 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
9065 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
9066 #.  #, + and <space> and no longer mentions D,O,U,X.
9067 #.  2.11BSD has
9068 #.  .BR vprintf (),
9069 #.  .BR vfprintf (),
9070 #.  .BR vsprintf (),
9071 #.  and warns not to use D,O,U,X.
9072 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
9073 #.  and the conversions n, p, E, G, X (with current meaning)
9074 #.  and deprecates D,O,U.
9075 #.  4.4BSD introduces the functions
9076 #.  .BR snprintf ()
9077 #.  and
9078 #.  .BR vsnprintf (),
9079 #.  and the length modifier q.
9080 #.  FreeBSD also has functions
9081 #.  .BR asprintf ()
9082 #.  and
9083 #.  .BR vasprintf (),
9084 #.  that allocate a buffer large enough for
9085 #.  .BR sprintf ().
9086 #.  In glibc there are functions
9087 #.  .BR dprintf ()
9088 #.  and
9089 #.  .BR vdprintf ()
9090 #.  that print to a file descriptor instead of a stream.
9091 #. type: Plain text
9092 #: build/C/man3/printf.3:929
9093 msgid ""
9094 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
9095 "conforms to the C99 standard, that is, behaves as described above, since "
9096 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
9097 "was truncated."
9098 msgstr ""
9099 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
9100 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
9101 "切り詰められた場合は -1 を返す。"
9102
9103 #. type: Plain text
9104 #: build/C/man3/printf.3:946
9105 msgid ""
9106 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
9107 "callers must be careful not to overflow the actual space; this is often "
9108 "impossible to assure.  Note that the length of the strings produced is "
9109 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
9110 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
9111 msgstr ""
9112 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
9113 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
9114 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
9115 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
9116 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
9117
9118 #. type: Plain text
9119 #: build/C/man3/printf.3:959
9120 msgid ""
9121 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
9122 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
9123 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
9124 "libc4 leads to serious security problems."
9125 msgstr ""
9126 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
9127 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
9128 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
9129 "深刻なセキュリティ問題を引き起こすことがある。"
9130
9131 #.  .PP
9132 #.  Some floating-point conversions under early libc4
9133 #.  caused memory leaks.
9134 #. type: Plain text
9135 #: build/C/man3/printf.3:973
9136 msgid ""
9137 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
9138 "contain a % character.  If I<foo> comes from untrusted user input, it may "
9139 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
9140 "a security hole."
9141 msgstr ""
9142 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
9143 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
9144 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
9145 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
9146 "ルを作ることになるかもしれない。"
9147
9148 #. type: Plain text
9149 #: build/C/man3/printf.3:977
9150 msgid "To print I<Pi> to five decimal places:"
9151 msgstr "I<Pi> を 5 桁で出力する。"
9152
9153 #. type: Plain text
9154 #: build/C/man3/printf.3:983
9155 #, no-wrap
9156 msgid ""
9157 "#include E<lt>math.hE<gt>\n"
9158 "#include E<lt>stdio.hE<gt>\n"
9159 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9160 msgstr ""
9161 "#include E<lt>math.hE<gt>\n"
9162 "#include E<lt>stdio.hE<gt>\n"
9163 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9164
9165 #. type: Plain text
9166 #: build/C/man3/printf.3:992
9167 msgid ""
9168 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
9169 "I<weekday> and I<month> are pointers to strings:"
9170 msgstr ""
9171 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
9172 "I<month> は文字列へのポインタである)"
9173
9174 #. type: Plain text
9175 #: build/C/man3/printf.3:998
9176 #, no-wrap
9177 msgid ""
9178 "#include E<lt>stdio.hE<gt>\n"
9179 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9180 "        weekday, month, day, hour, min);\n"
9181 msgstr ""
9182 "#include E<lt>stdio.hE<gt>\n"
9183 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9184 "\tweekday, month, day, hour, min);\n"
9185
9186 #. type: Plain text
9187 #: build/C/man3/printf.3:1004
9188 msgid ""
9189 "Many countries use the day-month-year order.  Hence, an internationalized "
9190 "version must be able to print the arguments in an order specified by the "
9191 "format:"
9192 msgstr ""
9193 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
9194 "順番で 引き数を表示できなければならない。"
9195
9196 #. type: Plain text
9197 #: build/C/man3/printf.3:1010
9198 #, no-wrap
9199 msgid ""
9200 "#include E<lt>stdio.hE<gt>\n"
9201 "fprintf(stdout, format,\n"
9202 "        weekday, month, day, hour, min);\n"
9203 msgstr ""
9204 "#include E<lt>stdio.hE<gt>\n"
9205 "fprintf(stdout, format,\n"
9206 "\tweekday, month, day, hour, min);\n"
9207
9208 #. type: Plain text
9209 #: build/C/man3/printf.3:1017
9210 msgid ""
9211 "where I<format> depends on locale, and may permute the arguments.  With the "
9212 "value:"
9213 msgstr ""
9214 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
9215 "I<format> が"
9216
9217 #. type: Plain text
9218 #: build/C/man3/printf.3:1021
9219 #, no-wrap
9220 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9221 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9222
9223 #. type: Plain text
9224 #: build/C/man3/printf.3:1025
9225 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
9226 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
9227
9228 #. type: Plain text
9229 #: build/C/man3/printf.3:1028
9230 msgid ""
9231 "To allocate a sufficiently large string and print into it (code correct for "
9232 "both glibc 2.0 and glibc 2.1):"
9233 msgstr ""
9234 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
9235 "と glibc 2.1 の両方で正しく動作するコード):"
9236
9237 #. type: Plain text
9238 #: build/C/man3/printf.3:1031
9239 msgid ""
9240 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
9241 "error instead of being handled gracefully."
9242 msgstr ""
9243
9244 #. type: Plain text
9245 #: build/C/man3/printf.3:1036
9246 #, no-wrap
9247 msgid ""
9248 "#include E<lt>stdio.hE<gt>\n"
9249 "#include E<lt>stdlib.hE<gt>\n"
9250 "#include E<lt>stdarg.hE<gt>\n"
9251 msgstr ""
9252 "#include E<lt>stdio.hE<gt>\n"
9253 "#include E<lt>stdlib.hE<gt>\n"
9254 "#include E<lt>stdarg.hE<gt>\n"
9255
9256 #. type: Plain text
9257 #: build/C/man3/printf.3:1044
9258 #, fuzzy, no-wrap
9259 #| msgid ""
9260 #| "char *\n"
9261 #| "make_message(const char *fmt, ...)\n"
9262 #| "{\n"
9263 #| "    int n;\n"
9264 #| "    int size = 100;     /* Guess we need no more than 100 bytes. */\n"
9265 #| "    char *p, *np;\n"
9266 #| "    va_list ap;\n"
9267 msgid ""
9268 "char *\n"
9269 "make_message(const char *fmt, ...)\n"
9270 "{\n"
9271 "    int n;\n"
9272 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9273 "    char *p, *np;\n"
9274 "    va_list ap;\n"
9275 msgstr ""
9276 "char *\n"
9277 "make_message(const char *fmt, ...)\n"
9278 "{\n"
9279 "    int n;\n"
9280 "    int size = 100;     /* Guess we need no more than 100 bytes. */\n"
9281 "    char *p, *np;\n"
9282 "    va_list ap;\n"
9283
9284 #. type: Plain text
9285 #: build/C/man3/printf.3:1047
9286 #, no-wrap
9287 msgid ""
9288 "    if ((p = malloc(size)) == NULL)\n"
9289 "        return NULL;\n"
9290 msgstr ""
9291 "    if ((p = malloc(size)) == NULL)\n"
9292 "        return NULL;\n"
9293
9294 #. type: Plain text
9295 #: build/C/man3/printf.3:1049
9296 #, no-wrap
9297 msgid "    while (1) {\n"
9298 msgstr "    while (1) {\n"
9299
9300 #. type: Plain text
9301 #: build/C/man3/printf.3:1051
9302 #, fuzzy, no-wrap
9303 #| msgid "        /* Try to print in the allocated space. */\n"
9304 msgid "        /* Try to print in the allocated space */\n"
9305 msgstr "        /* Try to print in the allocated space. */\n"
9306
9307 #. type: Plain text
9308 #: build/C/man3/printf.3:1055
9309 #, no-wrap
9310 msgid ""
9311 "        va_start(ap, fmt);\n"
9312 "        n = vsnprintf(p, size, fmt, ap);\n"
9313 "        va_end(ap);\n"
9314 msgstr ""
9315 "        va_start(ap, fmt);\n"
9316 "        n = vsnprintf(p, size, fmt, ap);\n"
9317 "        va_end(ap);\n"
9318
9319 #. type: Plain text
9320 #: build/C/man3/printf.3:1057
9321 #, no-wrap
9322 msgid "        /* Check error code */\n"
9323 msgstr ""
9324
9325 #. type: Plain text
9326 #: build/C/man3/printf.3:1060
9327 #, fuzzy, no-wrap
9328 #| msgid ""
9329 #| "        if (n E<gt> -1 && n E<lt> size)\n"
9330 #| "            return p;\n"
9331 msgid ""
9332 "        if (n E<lt> 0)\n"
9333 "            return NULL;\n"
9334 msgstr ""
9335 "        if (n E<gt> -1 && n E<lt> size)\n"
9336 "            return p;\n"
9337
9338 #. type: Plain text
9339 #: build/C/man3/printf.3:1062
9340 #, fuzzy, no-wrap
9341 #| msgid "        /* If that worked, return the string. */\n"
9342 msgid "        /* If that worked, return the string */\n"
9343 msgstr "        /* If that worked, return the string. */\n"
9344
9345 #. type: Plain text
9346 #: build/C/man3/printf.3:1065
9347 #, fuzzy, no-wrap
9348 #| msgid ""
9349 #| "        if (n E<gt> -1 && n E<lt> size)\n"
9350 #| "            return p;\n"
9351 msgid ""
9352 "        if (n E<lt> size)\n"
9353 "            return p;\n"
9354 msgstr ""
9355 "        if (n E<gt> -1 && n E<lt> size)\n"
9356 "            return p;\n"
9357
9358 #. type: Plain text
9359 #: build/C/man3/printf.3:1067
9360 #, fuzzy, no-wrap
9361 #| msgid "        /* Else try again with more space. */\n"
9362 msgid "        /* Else try again with more space */\n"
9363 msgstr "        /* Else try again with more space. */\n"
9364
9365 #. type: Plain text
9366 #: build/C/man3/printf.3:1069
9367 #, no-wrap
9368 msgid "        size = n + 1;       /* Precisely what is needed */\n"
9369 msgstr ""
9370
9371 #. type: Plain text
9372 #: build/C/man3/printf.3:1079
9373 #, no-wrap
9374 msgid ""
9375 "        if ((np = realloc (p, size)) == NULL) {\n"
9376 "            free(p);\n"
9377 "            return NULL;\n"
9378 "        } else {\n"
9379 "            p = np;\n"
9380 "        }\n"
9381 "    }\n"
9382 "}\n"
9383 msgstr ""
9384 "        if ((np = realloc (p, size)) == NULL) {\n"
9385 "            free(p);\n"
9386 "            return NULL;\n"
9387 "        } else {\n"
9388 "            p = np;\n"
9389 "        }\n"
9390 "    }\n"
9391 "}\n"
9392
9393 #. type: Plain text
9394 #: build/C/man3/printf.3:1089
9395 msgid ""
9396 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9397 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9398 msgstr ""
9399 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9400 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9401
9402 #. type: TH
9403 #: build/C/man3/puts.3:26
9404 #, no-wrap
9405 msgid "PUTS"
9406 msgstr "PUTS"
9407
9408 #. type: TH
9409 #: build/C/man3/puts.3:26
9410 #, no-wrap
9411 msgid "2011-09-28"
9412 msgstr "2011-09-28"
9413
9414 #. type: Plain text
9415 #: build/C/man3/puts.3:29
9416 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9417 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9418
9419 #. type: Plain text
9420 #: build/C/man3/puts.3:34
9421 #, no-wrap
9422 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9423 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9424
9425 #. type: Plain text
9426 #: build/C/man3/puts.3:36
9427 #, no-wrap
9428 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9429 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9430
9431 #. type: Plain text
9432 #: build/C/man3/puts.3:38
9433 #, no-wrap
9434 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9435 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9436
9437 #. type: Plain text
9438 #: build/C/man3/puts.3:40
9439 #, no-wrap
9440 msgid "B<int putchar(int >I<c>B<);>\n"
9441 msgstr "B<int putchar(int >I<c>B<);>\n"
9442
9443 #. type: Plain text
9444 #: build/C/man3/puts.3:42
9445 #, no-wrap
9446 msgid "B<int puts(const char *>I<s>B<);>\n"
9447 msgstr "B<int puts(const char *>I<s>B<);>\n"
9448
9449 #. type: Plain text
9450 #: build/C/man3/puts.3:51
9451 msgid ""
9452 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9453 "I<stream>."
9454 msgstr ""
9455 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9456 "に書き込む。"
9457
9458 #. type: Plain text
9459 #: build/C/man3/puts.3:58
9460 msgid ""
9461 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9462 "null byte (\\(aq\\e0\\(aq)."
9463 msgstr ""
9464 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9465 "ト (\\(aq\\e0\\(aq) は出力しない。"
9466
9467 #. type: Plain text
9468 #: build/C/man3/puts.3:65
9469 msgid ""
9470 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9471 "a macro which evaluates I<stream> more than once."
9472 msgstr ""
9473 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9474 "れないという点を除き、 B<fputc>()  と同じである。"
9475
9476 #. type: Plain text
9477 #: build/C/man3/puts.3:69
9478 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9479 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9480
9481 #. type: Plain text
9482 #: build/C/man3/puts.3:76
9483 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9484 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9485
9486 #. type: Plain text
9487 #: build/C/man3/puts.3:81
9488 msgid ""
9489 "Calls to the functions described here can be mixed with each other and with "
9490 "calls to other output functions from the I<stdio> library for the same "
9491 "output stream."
9492 msgstr ""
9493 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9494 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9495 "る。"
9496
9497 #. type: Plain text
9498 #: build/C/man3/puts.3:96
9499 msgid ""
9500 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9501 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9502 msgstr ""
9503 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9504 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9505
9506 #. type: Plain text
9507 #: build/C/man3/puts.3:103
9508 msgid ""
9509 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9510 "on error."
9511 msgstr ""
9512 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9513 "は B<EOF> を返す。"
9514
9515 #. type: Plain text
9516 #: build/C/man3/puts.3:112
9517 msgid ""
9518 "It is not advisable to mix calls to output functions from the I<stdio> "
9519 "library with low-level calls to B<write>(2)  for the file descriptor "
9520 "associated with the same output stream; the results will be undefined and "
9521 "very probably not what you want."
9522 msgstr ""
9523 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9524 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9525 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9526 "性が高い。"
9527
9528 #. type: Plain text
9529 #: build/C/man3/puts.3:124
9530 msgid ""
9531 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9532 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9533 "(3)"
9534 msgstr ""
9535 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9536 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9537 "(3)"
9538
9539 #. type: TH
9540 #: build/C/man2/read.2:35
9541 #, no-wrap
9542 msgid "READ"
9543 msgstr "READ"
9544
9545 #. type: TH
9546 #: build/C/man2/read.2:35
9547 #, fuzzy, no-wrap
9548 #| msgid "2012-02-14"
9549 msgid "2013-02-12"
9550 msgstr "2012-02-14"
9551
9552 #. type: Plain text
9553 #: build/C/man2/read.2:38
9554 msgid "read - read from a file descriptor"
9555 msgstr "read - ファイルディスクリプタから読み込む"
9556
9557 #. type: Plain text
9558 #: build/C/man2/read.2:43
9559 #, no-wrap
9560 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9561 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9562
9563 #. type: Plain text
9564 #: build/C/man2/read.2:52
9565 msgid ""
9566 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9567 "into the buffer starting at I<buf>."
9568 msgstr ""
9569 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9570 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9571
9572 #. type: Plain text
9573 #: build/C/man2/read.2:60
9574 msgid ""
9575 "On files that support seeking, the read operation commences at the current "
9576 "file offset, and the file offset is incremented by the number of bytes "
9577 "read.  If the current file offset is at or past the end of file, no bytes "
9578 "are read, and B<read>()  returns zero."
9579 msgstr ""
9580
9581 #. type: Plain text
9582 #: build/C/man2/read.2:75
9583 msgid ""
9584 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
9585 "In the absence of any errors, or if B<read>()  does not check for errors, a "
9586 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
9587 msgstr ""
9588
9589 #. type: Plain text
9590 #: build/C/man2/read.2:81
9591 #, fuzzy
9592 #| msgid ""
9593 #| "If I<count> is zero, B<read>()  returns zero and has no other results.  "
9594 #| "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9595 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9596 msgstr ""
9597 "I<count> が 0 ならば、 B<read>()  は 0 を返し、他に何も起きない。 I<count> "
9598 "が B<SSIZE_MAX> より大きければ、結果は特定できない。"
9599
9600 #. type: Plain text
9601 #: build/C/man2/read.2:95
9602 msgid ""
9603 "On success, the number of bytes read is returned (zero indicates end of "
9604 "file), and the file position is advanced by this number.  It is not an error "
9605 "if this number is smaller than the number of bytes requested; this may "
9606 "happen for example because fewer bytes are actually available right now "
9607 "(maybe because we were close to end-of-file, or because we are reading from "
9608 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9609 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9610 "this case it is left unspecified whether the file position (if any) changes."
9611 msgstr ""
9612 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9613 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9614 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9615 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9616 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9617 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9618 "の場合はファイル位置が変更されるかどうかは 不定である。"
9619
9620 #. type: TP
9621 #: build/C/man2/read.2:96 build/C/man3/scanf.3:549 build/C/man2/write.2:108
9622 #, no-wrap
9623 msgid "B<EAGAIN>"
9624 msgstr "B<EAGAIN>"
9625
9626 #. type: Plain text
9627 #: build/C/man2/read.2:103
9628 msgid ""
9629 "The file descriptor I<fd> refers to a file other than a socket and has been "
9630 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9631 msgstr ""
9632 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9633 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9634 "する状況にある。"
9635
9636 #. type: TP
9637 #: build/C/man2/read.2:103 build/C/man2/write.2:115
9638 #, no-wrap
9639 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9640 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9641
9642 #.  Actually EAGAIN on Linux
9643 #. type: Plain text
9644 #: build/C/man2/read.2:114
9645 msgid ""
9646 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9647 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9648 "to be returned for this case, and does not require these constants to have "
9649 "the same value, so a portable application should check for both "
9650 "possibilities."
9651 msgstr ""
9652 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9653 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9654 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9655 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9656 "プリケーションでは、両方の可能性を 確認すべきである。"
9657
9658 #. type: Plain text
9659 #: build/C/man2/read.2:118
9660 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9661 msgstr ""
9662 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9663 "(open) されていない。"
9664
9665 #. type: Plain text
9666 #: build/C/man2/read.2:122 build/C/man2/write.2:145
9667 msgid "I<buf> is outside your accessible address space."
9668 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9669
9670 #. type: Plain text
9671 #: build/C/man2/read.2:126
9672 msgid ""
9673 "The call was interrupted by a signal before any data was read; see B<signal>"
9674 "(7)."
9675 msgstr ""
9676 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9677
9678 #. type: Plain text
9679 #: build/C/man2/read.2:137
9680 msgid ""
9681 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9682 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9683 "I<buf>, the value specified in I<count>, or the current file offset is not "
9684 "suitably aligned."
9685 msgstr ""
9686 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9687 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9688 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9689 "ンメントが不適切である。"
9690
9691 #. type: Plain text
9692 #: build/C/man2/read.2:147
9693 msgid ""
9694 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9695 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9696 "information."
9697 msgstr ""
9698 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9699 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9700 "こと。"
9701
9702 #. type: Plain text
9703 #: build/C/man2/read.2:158
9704 #, fuzzy
9705 #| msgid ""
9706 #| "I/O error.  This will happen for example when the process is in a "
9707 #| "background process group, tries to read from its controlling tty, and "
9708 #| "either it is ignoring or blocking B<SIGTTIN> or its process group is "
9709 #| "orphaned.  It may also occur when there is a low-level I/O error while "
9710 #| "reading from a disk or tape."
9711 msgid ""
9712 "I/O error.  This will happen for example when the process is in a background "
9713 "process group, tries to read from its controlling terminal, and either it is "
9714 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9715 "also occur when there is a low-level I/O error while reading from a disk or "
9716 "tape."
9717 msgstr ""
9718 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、 それを"
9719 "制御している tty から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9720 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9721 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9722 "た場合にも起こる。"
9723
9724 #. type: Plain text
9725 #: build/C/man2/read.2:162
9726 msgid "I<fd> refers to a directory."
9727 msgstr "I<fd> がディレクトリを参照している。"
9728
9729 #. type: Plain text
9730 #: build/C/man2/read.2:173
9731 msgid ""
9732 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9733 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9734 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9735 "read."
9736 msgstr ""
9737 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9738 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9739 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9740 "数を返してもよい。"
9741
9742 #. type: Plain text
9743 #: build/C/man2/read.2:187
9744 msgid ""
9745 "On NFS file systems, reading small amounts of data will only update the "
9746 "timestamp the first time, subsequent calls may not do so.  This is caused by "
9747 "client side attribute caching, because most if not all NFS clients leave "
9748 "st_atime (last file access time)  updates to the server and client side "
9749 "reads satisfied from the client's cache will not cause st_atime updates on "
9750 "the server as there are no server side reads.  UNIX semantics can be "
9751 "obtained by disabling client side attribute caching, but in most situations "
9752 "this will substantially increase server load and decrease performance."
9753 msgstr ""
9754 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9755 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9756 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9757 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9758 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9759 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9760 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9761 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9762
9763 #. type: Plain text
9764 #: build/C/man2/read.2:200
9765 msgid ""
9766 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9767 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9768 "B<fread>(3)"
9769 msgstr ""
9770 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9771 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9772 "B<fread>(3)"
9773
9774 #. type: TH
9775 #: build/C/man2/readlink.2:43
9776 #, no-wrap
9777 msgid "READLINK"
9778 msgstr "READLINK"
9779
9780 #. type: TH
9781 #: build/C/man2/readlink.2:43
9782 #, no-wrap
9783 msgid "2011-09-20"
9784 msgstr "2011-09-20"
9785
9786 #. type: Plain text
9787 #: build/C/man2/readlink.2:46
9788 msgid "readlink - read value of a symbolic link"
9789 msgstr "readlink - シンボリックリンクの値を読む"
9790
9791 #. type: Plain text
9792 #: build/C/man2/readlink.2:50
9793 msgid ""
9794 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9795 ">I<bufsiz>B<);>"
9796 msgstr ""
9797 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9798 ">I<bufsiz>B<);>"
9799
9800 #. type: Plain text
9801 #: build/C/man2/readlink.2:58
9802 msgid "B<readlink>():"
9803 msgstr "B<readlink>():"
9804
9805 #. type: Plain text
9806 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
9807 msgid ""
9808 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9809 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9810 msgstr ""
9811 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9812 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9813
9814 #. type: Plain text
9815 #: build/C/man2/readlink.2:77
9816 msgid ""
9817 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9818 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9819 "null byte to I<buf>.  It will truncate the contents (to a length of "
9820 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9821 "contents."
9822 msgstr ""
9823 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9824 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9825 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9826 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9827
9828 #. type: Plain text
9829 #: build/C/man2/readlink.2:85
9830 msgid ""
9831 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9832 "error, -1 is returned and I<errno> is set to indicate the error."
9833 msgstr ""
9834 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9835 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9836
9837 #. type: Plain text
9838 #: build/C/man2/readlink.2:91
9839 msgid ""
9840 "Search permission is denied for a component of the path prefix.  (See also "
9841 "B<path_resolution>(7).)"
9842 msgstr ""
9843 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9844 "参照すること)。"
9845
9846 #. type: Plain text
9847 #: build/C/man2/readlink.2:95
9848 msgid "I<buf> extends outside the process's allocated address space."
9849 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9850
9851 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9852 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9853 #.  and this error can also occur if bufsiz < 0.
9854 #.  See: http://thread.gmane.org/gmane.linux.man/380
9855 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9856 #. type: Plain text
9857 #: build/C/man2/readlink.2:104
9858 msgid "I<bufsiz> is not positive."
9859 msgstr "I<bufsiz> が正でない。"
9860
9861 #. type: Plain text
9862 #: build/C/man2/readlink.2:107
9863 msgid "The named file is not a symbolic link."
9864 msgstr "指定したファイルがシンボリックリンクでない。"
9865
9866 #. type: Plain text
9867 #: build/C/man2/readlink.2:110
9868 msgid "An I/O error occurred while reading from the file system."
9869 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9870
9871 #. type: Plain text
9872 #: build/C/man2/readlink.2:113
9873 msgid "Too many symbolic links were encountered in translating the pathname."
9874 msgstr "パス名にシンボリックリンクが多すぎる。"
9875
9876 #. type: Plain text
9877 #: build/C/man2/readlink.2:116
9878 msgid "A pathname, or a component of a pathname, was too long."
9879 msgstr "パス名かパス名の一部分が長過ぎる。"
9880
9881 #. type: Plain text
9882 #: build/C/man2/readlink.2:119
9883 msgid "The named file does not exist."
9884 msgstr "その名前のファイルが存在しない。"
9885
9886 #. type: Plain text
9887 #: build/C/man2/readlink.2:125
9888 msgid "A component of the path prefix is not a directory."
9889 msgstr "パスのディレクトリ部分がディレクトリでない。"
9890
9891 #. type: Plain text
9892 #: build/C/man2/readlink.2:130
9893 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9894 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9895
9896 #. type: Plain text
9897 #: build/C/man2/readlink.2:138
9898 msgid ""
9899 "In versions of glibc up to and including glibc 2.4, the return type of "
9900 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
9901 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
9902 msgstr ""
9903 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
9904 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
9905 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
9906
9907 #. type: Plain text
9908 #: build/C/man2/readlink.2:157
9909 msgid ""
9910 "Using a statically sized buffer might not provide enough room for the "
9911 "symbolic link contents.  The required size for the buffer can be obtained "
9912 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
9913 "link.  However, the number of bytes written by B<readlink>()  should be "
9914 "checked to make sure that the size of the symbolic link did not increase "
9915 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
9916 "also addresses a common portability problem when using I<PATH_MAX> for the "
9917 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
9918 "the system does not have such limit."
9919 msgstr ""
9920 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
9921 "格納するのに十分な領域がない場合がある。\n"
9922 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
9923 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
9924 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
9925 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
9926 "の間で増えていないことを確認すべきである。\n"
9927 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
9928 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
9929 "問題を解決することができる。なぜなら、POSIX では、\n"
9930 "システムがそのような上限値を定義していない場合には、\n"
9931 "I<PATH_MAX> が定義されることが保証されていないからである。"
9932
9933 #. type: Plain text
9934 #: build/C/man2/readlink.2:163
9935 msgid ""
9936 "The following program allocates the buffer needed by B<readlink>()  "
9937 "dynamically from the information provided by B<lstat>(), making sure there's "
9938 "no race condition between the calls."
9939 msgstr ""
9940 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
9941 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
9942 "また、両方の呼び出し間で競合条件がないことを保証している。"
9943
9944 #. type: Plain text
9945 #: build/C/man2/readlink.2:170
9946 #, no-wrap
9947 msgid ""
9948 "#include E<lt>sys/types.hE<gt>\n"
9949 "#include E<lt>sys/stat.hE<gt>\n"
9950 "#include E<lt>stdio.hE<gt>\n"
9951 "#include E<lt>stdlib.hE<gt>\n"
9952 "#include E<lt>unistd.hE<gt>\n"
9953 msgstr ""
9954 "#include E<lt>sys/types.hE<gt>\n"
9955 "#include E<lt>sys/stat.hE<gt>\n"
9956 "#include E<lt>stdio.hE<gt>\n"
9957 "#include E<lt>stdlib.hE<gt>\n"
9958 "#include E<lt>unistd.hE<gt>\n"
9959
9960 #. type: Plain text
9961 #: build/C/man2/readlink.2:177
9962 #, no-wrap
9963 msgid ""
9964 "int\n"
9965 "main(int argc, char *argv[])\n"
9966 "{\n"
9967 "    struct stat sb;\n"
9968 "    char *linkname;\n"
9969 "    ssize_t r;\n"
9970 msgstr ""
9971 "int\n"
9972 "main(int argc, char *argv[])\n"
9973 "{\n"
9974 "    struct stat sb;\n"
9975 "    char *linkname;\n"
9976 "    ssize_t r;\n"
9977
9978 #. type: Plain text
9979 #: build/C/man2/readlink.2:182
9980 #, no-wrap
9981 msgid ""
9982 "    if (argc != 2) {\n"
9983 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9984 "        exit(EXIT_FAILURE);\n"
9985 "    }\n"
9986 msgstr ""
9987 "    if (argc != 2) {\n"
9988 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9989 "        exit(EXIT_FAILURE);\n"
9990 "    }\n"
9991
9992 #. type: Plain text
9993 #: build/C/man2/readlink.2:187
9994 #, no-wrap
9995 msgid ""
9996 "    if (lstat(argv[1], &sb) == -1) {\n"
9997 "        perror(\"lstat\");\n"
9998 "        exit(EXIT_FAILURE);\n"
9999 "    }\n"
10000 msgstr ""
10001 "    if (lstat(argv[1], &sb) == -1) {\n"
10002 "        perror(\"lstat\");\n"
10003 "        exit(EXIT_FAILURE);\n"
10004 "    }\n"
10005
10006 #. type: Plain text
10007 #: build/C/man2/readlink.2:193
10008 #, no-wrap
10009 msgid ""
10010 "    linkname = malloc(sb.st_size + 1);\n"
10011 "    if (linkname == NULL) {\n"
10012 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10013 "        exit(EXIT_FAILURE);\n"
10014 "    }\n"
10015 msgstr ""
10016 "    linkname = malloc(sb.st_size + 1);\n"
10017 "    if (linkname == NULL) {\n"
10018 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10019 "        exit(EXIT_FAILURE);\n"
10020 "    }\n"
10021
10022 #. type: Plain text
10023 #: build/C/man2/readlink.2:195
10024 #, no-wrap
10025 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10026 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10027
10028 #. type: Plain text
10029 #: build/C/man2/readlink.2:200
10030 #, no-wrap
10031 msgid ""
10032 "    if (r E<lt> 0) {\n"
10033 "        perror(\"lstat\");\n"
10034 "        exit(EXIT_FAILURE);\n"
10035 "    }\n"
10036 msgstr ""
10037 "    if (r E<lt> 0) {\n"
10038 "        perror(\"lstat\");\n"
10039 "        exit(EXIT_FAILURE);\n"
10040 "    }\n"
10041
10042 #. type: Plain text
10043 #: build/C/man2/readlink.2:206
10044 #, no-wrap
10045 msgid ""
10046 "    if (r E<gt> sb.st_size) {\n"
10047 "        fprintf(stderr, \"symlink increased in size \"\n"
10048 "                        \"between lstat() and readlink()\\en\");\n"
10049 "        exit(EXIT_FAILURE);\n"
10050 "    }\n"
10051 msgstr ""
10052 "    if (r E<gt> sb.st_size) {\n"
10053 "        fprintf(stderr, \"symlink increased in size \"\n"
10054 "                        \"between lstat() and readlink()\\en\");\n"
10055 "        exit(EXIT_FAILURE);\n"
10056 "    }\n"
10057
10058 #. type: Plain text
10059 #: build/C/man2/readlink.2:208
10060 #, no-wrap
10061 msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10062 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10063
10064 #. type: Plain text
10065 #: build/C/man2/readlink.2:210
10066 #, no-wrap
10067 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10068 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10069
10070 #. type: Plain text
10071 #: build/C/man2/readlink.2:222
10072 msgid ""
10073 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
10074 "B<path_resolution>(7), B<symlink>(7)"
10075 msgstr ""
10076 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
10077 "B<path_resolution>(7), B<symlink>(7)"
10078
10079 #. type: TH
10080 #: build/C/man2/readv.2:32
10081 #, no-wrap
10082 msgid "READV"
10083 msgstr "READV"
10084
10085 #. type: TH
10086 #: build/C/man2/readv.2:32
10087 #, no-wrap
10088 msgid "2010-11-17"
10089 msgstr "2010-11-17"
10090
10091 #. type: Plain text
10092 #: build/C/man2/readv.2:35
10093 msgid ""
10094 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
10095 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
10096
10097 #. type: Plain text
10098 #: build/C/man2/readv.2:38
10099 #, no-wrap
10100 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
10101 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
10102
10103 #. type: Plain text
10104 #: build/C/man2/readv.2:40
10105 #, no-wrap
10106 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10107 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10108
10109 #. type: Plain text
10110 #: build/C/man2/readv.2:42
10111 #, no-wrap
10112 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10113 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10114
10115 #. type: Plain text
10116 #: build/C/man2/readv.2:45
10117 #, no-wrap
10118 msgid ""
10119 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10120 "B<               off_t >I<offset>B<);>\n"
10121 msgstr ""
10122 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10123 "B<               off_t >I<offset>B<);>\n"
10124
10125 #. type: Plain text
10126 #: build/C/man2/readv.2:48
10127 #, no-wrap
10128 msgid ""
10129 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10130 "B<                off_t >I<offset>B<);>\n"
10131 msgstr ""
10132 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10133 "B<                off_t >I<offset>B<);>\n"
10134
10135 #. type: Plain text
10136 #: build/C/man2/readv.2:58
10137 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10138 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10139
10140 #. type: Plain text
10141 #: build/C/man2/readv.2:68
10142 msgid ""
10143 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
10144 "with the file descriptor I<fd> into the buffers described by I<iov> "
10145 "(\"scatter input\")."
10146 msgstr ""
10147 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
10148 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
10149 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
10150
10151 #. type: Plain text
10152 #: build/C/man2/readv.2:78
10153 msgid ""
10154 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
10155 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
10156 "\")."
10157 msgstr ""
10158 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
10159 "I<iovcnt>\n"
10160 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
10161 "ら\n"
10162 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/readv.2:87
10166 msgid ""
10167 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
10168 "I<E<lt>sys/uio.hE<gt>> as:"
10169 msgstr ""
10170 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
10171 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10172
10173 #. type: Plain text
10174 #: build/C/man2/readv.2:95
10175 #, no-wrap
10176 msgid ""
10177 "struct iovec {\n"
10178 "    void  *iov_base;    /* Starting address */\n"
10179 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10180 "};\n"
10181 msgstr ""
10182 "struct iovec {\n"
10183 "    void  *iov_base;    /* Starting address */\n"
10184 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10185 "};\n"
10186
10187 #. type: Plain text
10188 #: build/C/man2/readv.2:103
10189 msgid ""
10190 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
10191 "buffers are filled."
10192 msgstr ""
10193 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
10194 "B<read>(2) と全く同様の動作を行う。"
10195
10196 #. type: Plain text
10197 #: build/C/man2/readv.2:109
10198 msgid ""
10199 "The B<writev>()  system call works just like B<write>(2)  except that "
10200 "multiple buffers are written out."
10201 msgstr ""
10202 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
10203 "B<write>(2) と全く同様の動作を行う。"
10204
10205 #. type: Plain text
10206 #: build/C/man2/readv.2:128
10207 msgid ""
10208 "Buffers are processed in array order.  This means that B<readv>()  "
10209 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
10210 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
10211 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
10212 "[0] before proceeding to I<iov>[1], and so on."
10213 msgstr ""
10214 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
10215 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
10216 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
10217 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
10218
10219 #. type: Plain text
10220 #: build/C/man2/readv.2:146
10221 msgid ""
10222 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
10223 "data written by B<writev>()  is written as a single block that is not "
10224 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
10225 "for an exception); analogously, B<readv>()  is guaranteed to read a "
10226 "contiguous block of data from the file, regardless of read operations "
10227 "performed in other threads or processes that have file descriptors referring "
10228 "to the same open file description (see B<open>(2))."
10229 msgstr ""
10230 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
10231 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
10232 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
10233 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
10234 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
10235 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
10236 "作の影響を受けることはない。"
10237
10238 #. type: SS
10239 #: build/C/man2/readv.2:146
10240 #, no-wrap
10241 msgid "preadv() and pwritev()"
10242 msgstr "preadv() と pwritev()"
10243
10244 #. type: Plain text
10245 #: build/C/man2/readv.2:159
10246 msgid ""
10247 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
10248 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
10249 "argument, I<offset>, which specifies the file offset at which the input "
10250 "operation is to be performed."
10251 msgstr ""
10252 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
10253 "組み合わせたものである。\n"
10254 "B<readv>() と同じ処理を実行するが、\n"
10255 "4 番目の引き数 I<offset> が追加されており、\n"
10256 "この引き数は入力操作を行うファイルオフセットを指定する。"
10257
10258 #. type: Plain text
10259 #: build/C/man2/readv.2:172
10260 msgid ""
10261 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
10262 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
10263 "argument, I<offset>, which specifies the file offset at which the output "
10264 "operation is to be performed."
10265 msgstr ""
10266 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
10267 "組み合わせたものである。\n"
10268 "B<writev>() と同じ処理を実行するが、\n"
10269 "4 番目の引き数 I<offset> が追加されており、\n"
10270 "この引き数は出力操作を行うファイルオフセットを指定する。"
10271
10272 #. type: Plain text
10273 #: build/C/man2/readv.2:177
10274 msgid ""
10275 "The file offset is not changed by these system calls.  The file referred to "
10276 "by I<fd> must be capable of seeking."
10277 msgstr ""
10278 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
10279 "I<fd> が参照するファイルは seek 可能でなければならない。"
10280
10281 #. type: Plain text
10282 #: build/C/man2/readv.2:188
10283 msgid ""
10284 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
10285 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
10286 "error, -1 is returned, and I<errno> is set appropriately."
10287 msgstr ""
10288 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
10289 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
10290 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
10291
10292 #. type: Plain text
10293 #: build/C/man2/readv.2:200
10294 msgid ""
10295 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
10296 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
10297 "(2).  Additionally, the following error is defined:"
10298 msgstr ""
10299 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
10300 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
10301 "る。\n"
10302 "また、追加で以下のエラーが定義されている:"
10303
10304 #. type: Plain text
10305 #: build/C/man2/readv.2:209
10306 msgid ""
10307 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
10308 "vector count I<iovcnt> is less than zero or greater than the permitted "
10309 "maximum."
10310 msgstr ""
10311 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
10312 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
10313
10314 #. type: Plain text
10315 #: build/C/man2/readv.2:214
10316 msgid ""
10317 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10318 "support was added in glibc 2.10."
10319 msgstr ""
10320 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10321 "ライブラリによるサポートは glibc 2.10 で追加された。"
10322
10323 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10324 #.  (Says release.libc.)
10325 #. type: Plain text
10326 #: build/C/man2/readv.2:222
10327 msgid ""
10328 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10329 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10330 "I<iovcnt> argument, and I<int> as the return type."
10331 msgstr ""
10332 "B<readv>(), B<writev>(): \n"
10333 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10334 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10335 "返り値の型として I<int> を使用していた。"
10336
10337 #. type: Plain text
10338 #: build/C/man2/readv.2:226
10339 msgid ""
10340 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10341 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10342
10343 #. type: SS
10344 #: build/C/man2/readv.2:227
10345 #, fuzzy, no-wrap
10346 #| msgid "Linux Notes"
10347 msgid "Linux notes"
10348 msgstr "Linux での注意"
10349
10350 #. type: Plain text
10351 #: build/C/man2/readv.2:258
10352 msgid ""
10353 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10354 "items that can be passed in I<iov>.  An implementation can advertise its "
10355 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10356 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10357 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10358 "glibc wrapper functions do some extra work if they detect that the "
10359 "underlying kernel system call failed because this limit was exceeded.  In "
10360 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10361 "large enough for all of the items specified by I<iov>, passes that buffer in "
10362 "a call to B<read>(2), copies data from the buffer to the locations specified "
10363 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10364 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10365 "using a temporary buffer and a call to B<write>(2)."
10366 msgstr ""
10367 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10368 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10369 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10370 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10371 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10372 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10373 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10374 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10375 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10376 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10377 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10378 "(2)  を呼び出す。"
10379
10380 #. type: Plain text
10381 #: build/C/man2/readv.2:265
10382 msgid ""
10383 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10384 "operate on file descriptors, with the functions from the stdio library; the "
10385 "results will be undefined and probably not what you want."
10386 msgstr ""
10387 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10388 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10389 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10390 "得られないだろう。"
10391
10392 #. type: Plain text
10393 #: build/C/man2/readv.2:268
10394 msgid "The following code sample demonstrates the use of B<writev>():"
10395 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10396
10397 #. type: Plain text
10398 #: build/C/man2/readv.2:275
10399 #, no-wrap
10400 msgid ""
10401 "char *str0 = \"hello \";\n"
10402 "char *str1 = \"world\\en\";\n"
10403 "struct iovec iov[2];\n"
10404 "ssize_t nwritten;\n"
10405 msgstr ""
10406 "char *str0 = \"hello \";\n"
10407 "char *str1 = \"world\\en\";\n"
10408 "struct iovec iov[2];\n"
10409 "ssize_t nwritten;\n"
10410
10411 #. type: Plain text
10412 #: build/C/man2/readv.2:280
10413 #, no-wrap
10414 msgid ""
10415 "iov[0].iov_base = str0;\n"
10416 "iov[0].iov_len = strlen(str0);\n"
10417 "iov[1].iov_base = str1;\n"
10418 "iov[1].iov_len = strlen(str1);\n"
10419 msgstr ""
10420 "iov[0].iov_base = str0;\n"
10421 "iov[0].iov_len = strlen(str0);\n"
10422 "iov[1].iov_base = str1;\n"
10423 "iov[1].iov_len = strlen(str1);\n"
10424
10425 #. type: Plain text
10426 #: build/C/man2/readv.2:282
10427 #, no-wrap
10428 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10429 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10430
10431 #. type: Plain text
10432 #: build/C/man2/readv.2:288
10433 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10434 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10435
10436 #. type: TH
10437 #: build/C/man3/remove.3:31
10438 #, no-wrap
10439 msgid "REMOVE"
10440 msgstr "REMOVE"
10441
10442 #. type: TH
10443 #: build/C/man3/remove.3:31
10444 #, no-wrap
10445 msgid "2008-12-03"
10446 msgstr "2008-12-03"
10447
10448 #. type: Plain text
10449 #: build/C/man3/remove.3:34
10450 msgid "remove - remove a file or directory"
10451 msgstr "remove - ファイルやディレクトリを削除する"
10452
10453 #. type: Plain text
10454 #: build/C/man3/remove.3:38
10455 msgid "B<int remove(const char *>I<pathname>B<);>"
10456 msgstr "B<int remove(const char *>I<pathname>B<);>"
10457
10458 #. type: Plain text
10459 #: build/C/man3/remove.3:46
10460 msgid ""
10461 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10462 "for files, and B<rmdir>(2)  for directories."
10463 msgstr ""
10464 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10465 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10466
10467 #. type: Plain text
10468 #: build/C/man3/remove.3:50
10469 msgid ""
10470 "If the removed name was the last link to a file and no processes have the "
10471 "file open, the file is deleted and the space it was using is made available "
10472 "for reuse."
10473 msgstr ""
10474 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10475 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10476 "ことができるようになる。"
10477
10478 #. type: Plain text
10479 #: build/C/man3/remove.3:55
10480 msgid ""
10481 "If the name was the last link to a file, but any processes still have the "
10482 "file open, the file will remain in existence until the last file descriptor "
10483 "referring to it is closed."
10484 msgstr ""
10485 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10486 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10487 "でファイルは存在し続ける。"
10488
10489 #. type: Plain text
10490 #: build/C/man3/remove.3:57
10491 msgid "If the name referred to a symbolic link, the link is removed."
10492 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10493
10494 #. type: Plain text
10495 #: build/C/man3/remove.3:60
10496 msgid ""
10497 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10498 "processes which have the object open may continue to use it."
10499 msgstr ""
10500 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10501 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10502
10503 #. type: Plain text
10504 #: build/C/man3/remove.3:70
10505 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10506 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10507
10508 #. type: Plain text
10509 #: build/C/man3/remove.3:72
10510 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10511 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10512
10513 #. type: Plain text
10514 #: build/C/man3/remove.3:78
10515 msgid ""
10516 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10517 "hence would not remove directories)."
10518 msgstr ""
10519 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10520 "(従ってディレクトリを削除できなかった)。"
10521
10522 #. type: Plain text
10523 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10524 msgid ""
10525 "Infelicities in the protocol underlying NFS can cause the unexpected "
10526 "disappearance of files which are still being used."
10527 msgstr ""
10528 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10529 "うことがありえる。"
10530
10531 #. type: Plain text
10532 #: build/C/man3/remove.3:92
10533 msgid ""
10534 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10535 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10536 msgstr ""
10537 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10538 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10539
10540 #. type: TH
10541 #: build/C/man2/rename.2:32
10542 #, no-wrap
10543 msgid "RENAME"
10544 msgstr "RENAME"
10545
10546 #. type: Plain text
10547 #: build/C/man2/rename.2:35
10548 msgid "rename - change the name or location of a file"
10549 msgstr "rename - ファイルの名前や位置を変更する"
10550
10551 #. type: Plain text
10552 #: build/C/man2/rename.2:39
10553 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10554 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10555
10556 #. type: Plain text
10557 #: build/C/man2/rename.2:48
10558 msgid ""
10559 "B<rename>()  renames a file, moving it between directories if required.  Any "
10560 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10561 "Open file descriptors for I<oldpath> are also unaffected."
10562 msgstr ""
10563 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10564 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10565 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10566 "リプタにも影響はない。"
10567
10568 #. type: Plain text
10569 #: build/C/man2/rename.2:56
10570 msgid ""
10571 "If I<newpath> already exists it will be atomically replaced (subject to a "
10572 "few conditions; see ERRORS below), so that there is no point at which "
10573 "another process attempting to access I<newpath> will find it missing."
10574 msgstr ""
10575 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10576 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10577 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10578 "とはない (訳註: 常にアクセス可能である)。"
10579
10580 #. type: Plain text
10581 #: build/C/man2/rename.2:64
10582 msgid ""
10583 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10584 "file, then B<rename>()  does nothing, and returns a success status."
10585 msgstr ""
10586 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10587 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10588
10589 #. type: Plain text
10590 #: build/C/man2/rename.2:72
10591 msgid ""
10592 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10593 "guarantees to leave an instance of I<newpath> in place."
10594 msgstr ""
10595 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10596 "I<newpath> の実体を元のまま残すことを保証する。"
10597
10598 #. type: Plain text
10599 #: build/C/man2/rename.2:78
10600 msgid ""
10601 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10602 "not exist, or it must specify an empty directory."
10603 msgstr ""
10604 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10605 "存在しないか、空のディレクトリでなければならない。"
10606
10607 #. type: Plain text
10608 #: build/C/man2/rename.2:85
10609 msgid ""
10610 "However, when overwriting there will probably be a window in which both "
10611 "I<oldpath> and I<newpath> refer to the file being renamed."
10612 msgstr ""
10613 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10614 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10615
10616 #. type: Plain text
10617 #: build/C/man2/rename.2:91
10618 msgid ""
10619 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10620 "refers to a symbolic link the link will be overwritten."
10621 msgstr ""
10622 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10623 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10624 "は、リンクが上書きされる。"
10625
10626 #. type: Plain text
10627 #: build/C/man2/rename.2:116
10628 msgid ""
10629 "Write permission is denied for the directory containing I<oldpath> or "
10630 "I<newpath>, or, search permission is denied for one of the directories in "
10631 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10632 "and does not allow write permission (needed to update the I<..> entry).  "
10633 "(See also B<path_resolution>(7).)"
10634 msgstr ""
10635 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10636 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10637 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10638 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10639
10640 #. type: TP
10641 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10642 #, no-wrap
10643 msgid "B<EBUSY>"
10644 msgstr "B<EBUSY>"
10645
10646 #. type: Plain text
10647 #: build/C/man2/rename.2:133
10648 msgid ""
10649 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10650 "use by some process (perhaps as current working directory, or as root "
10651 "directory, or because it was open for reading) or is in use by the system "
10652 "(for example as mount point), while the system considers this an error.  "
10653 "(Note that there is no requirement to return B<EBUSY> in such cases"
10654 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10655 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10656 "situations.)"
10657 msgstr ""
10658 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10659 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10660 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10661 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10662 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10663 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10664 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10665 "B<EBUSY> を返すことが許されている。)"
10666
10667 #. type: Plain text
10668 #: build/C/man2/rename.2:143
10669 msgid ""
10670 "The new pathname contained a path prefix of the old, or, more generally, an "
10671 "attempt was made to make a directory a subdirectory of itself."
10672 msgstr ""
10673 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10674 "ディレクトリに 変更しようとした場合がほとんどである。"
10675
10676 #. type: Plain text
10677 #: build/C/man2/rename.2:149
10678 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10679 msgstr ""
10680 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10681 "い。"
10682
10683 #. type: Plain text
10684 #: build/C/man2/rename.2:160
10685 msgid ""
10686 "I<oldpath> already has the maximum number of links to it, or it was a "
10687 "directory and the directory containing I<newpath> has the maximum number of "
10688 "links."
10689 msgstr ""
10690 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10691 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10692
10693 #. type: Plain text
10694 #: build/C/man2/rename.2:176
10695 msgid ""
10696 "The link named by I<oldpath> does not exist; or, a directory component in "
10697 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10698 msgstr ""
10699 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10700 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10701
10702 #. type: Plain text
10703 #: build/C/man2/rename.2:193
10704 msgid ""
10705 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10706 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10707 "not a directory."
10708 msgstr ""
10709 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10710 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10711 "トリでない。"
10712
10713 #. type: TP
10714 #: build/C/man2/rename.2:193
10715 #, no-wrap
10716 msgid "B<ENOTEMPTY> or B<EEXIST>"
10717 msgstr "B<ENOTEMPTY  または  EEXIST>"
10718
10719 #. type: Plain text
10720 #: build/C/man2/rename.2:197
10721 msgid ""
10722 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10723 "\" and \"..\"."
10724 msgstr ""
10725 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10726 "でいる。"
10727
10728 #. type: TP
10729 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
10730 #, no-wrap
10731 msgid "B<EPERM> or B<EACCES>"
10732 msgstr "B<EPERM> または B<EACCES>"
10733
10734 #. type: Plain text
10735 #: build/C/man2/rename.2:221
10736 msgid ""
10737 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10738 "the process's effective user ID is neither the user ID of the file to be "
10739 "deleted nor that of the directory containing it, and the process is not "
10740 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10741 "I<newpath> is an existing file and the directory containing it has the "
10742 "sticky bit set and the process's effective user ID is neither the user ID of "
10743 "the file to be replaced nor that of the directory containing it, and the "
10744 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10745 "capability); or the file system containing I<pathname> does not support "
10746 "renaming of the type requested."
10747 msgstr ""
10748 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10749 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10750 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10751 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10752 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10753 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10754 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10755 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10756 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10757 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10758
10759 #. type: Plain text
10760 #: build/C/man2/rename.2:232
10761 msgid ""
10762 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10763 "permits a file system to be mounted at multiple points, but B<rename>()  "
10764 "does not work across different mount points, even if the same file system is "
10765 "mounted on both.)"
10766 msgstr ""
10767 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10768 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10769 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10770 "別々のマウント位置を跨いでは動作しない。)"
10771
10772 #. type: Plain text
10773 #: build/C/man2/rename.2:234
10774 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10775 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10776
10777 #. type: Plain text
10778 #: build/C/man2/rename.2:245
10779 msgid ""
10780 "On NFS file systems, you can not assume that if the operation failed the "
10781 "file was not renamed.  If the server does the rename operation and then "
10782 "crashes, the retransmitted RPC which will be processed when the server is up "
10783 "again causes a failure.  The application is expected to deal with this.  See "
10784 "B<link>(2)  for a similar problem."
10785 msgstr ""
10786 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10787 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10788 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10789 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10790 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10791
10792 #. type: Plain text
10793 #: build/C/man2/rename.2:254
10794 msgid ""
10795 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10796 "(2), B<path_resolution>(7), B<symlink>(7)"
10797 msgstr ""
10798 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10799 "(2), B<path_resolution>(7), B<symlink>(7)"
10800
10801 #. type: TH
10802 #: build/C/man2/rmdir.2:30
10803 #, no-wrap
10804 msgid "RMDIR"
10805 msgstr "RMDIR"
10806
10807 #. type: TH
10808 #: build/C/man2/rmdir.2:30
10809 #, no-wrap
10810 msgid "2008-05-08"
10811 msgstr "2008-05-08"
10812
10813 #. type: Plain text
10814 #: build/C/man2/rmdir.2:33
10815 msgid "rmdir - delete a directory"
10816 msgstr "rmdir - ディレクトリを削除する"
10817
10818 #. type: Plain text
10819 #: build/C/man2/rmdir.2:37
10820 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10821 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10822
10823 #. type: Plain text
10824 #: build/C/man2/rmdir.2:40
10825 msgid "B<rmdir>()  deletes a directory, which must be empty."
10826 msgstr ""
10827 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10828 "ない。"
10829
10830 #. type: Plain text
10831 #: build/C/man2/rmdir.2:55
10832 msgid ""
10833 "Write access to the directory containing I<pathname> was not allowed, or one "
10834 "of the directories in the path prefix of I<pathname> did not allow search "
10835 "permission.  (See also B<path_resolution>(7)."
10836 msgstr ""
10837 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10838 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10839 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10840 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10841 "と)"
10842
10843 #. type: Plain text
10844 #: build/C/man2/rmdir.2:64
10845 msgid ""
10846 "I<pathname> is currently in use by the system or some process that prevents "
10847 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10848 "point or is the root directory of the calling process."
10849 msgstr ""
10850 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10851 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10852 "たプロセスのルートディレクトリであることを意味する。"
10853
10854 #. type: Plain text
10855 #: build/C/man2/rmdir.2:73
10856 msgid "I<pathname> has I<.> as last component."
10857 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10858
10859 #. type: Plain text
10860 #: build/C/man2/rmdir.2:77
10861 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10862 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10863
10864 #. type: Plain text
10865 #: build/C/man2/rmdir.2:85
10866 msgid ""
10867 "A directory component in I<pathname> does not exist or is a dangling "
10868 "symbolic link."
10869 msgstr ""
10870 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10871 "リックリンク (symbolic link) である。"
10872
10873 #. type: Plain text
10874 #: build/C/man2/rmdir.2:94
10875 msgid ""
10876 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10877 "fact, a directory."
10878 msgstr ""
10879 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10880 "クトリでない。"
10881
10882 #. type: TP
10883 #: build/C/man2/rmdir.2:94
10884 #, no-wrap
10885 msgid "B<ENOTEMPTY>"
10886 msgstr "B<ENOTEMPTY>"
10887
10888 #. type: Plain text
10889 #: build/C/man2/rmdir.2:107
10890 msgid ""
10891 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10892 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10893 "condition."
10894 msgstr ""
10895 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
10896 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
10897 "で B<EEXIST> を返すことを認めている。"
10898
10899 #. type: Plain text
10900 #: build/C/man2/rmdir.2:118
10901 msgid ""
10902 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
10903 "and the process's effective user ID is neither the user ID of the file to be "
10904 "deleted nor that of the directory containing it, and the process is not "
10905 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
10906 msgstr ""
10907 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
10908 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
10909 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
10910 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
10911
10912 #. type: Plain text
10913 #: build/C/man2/rmdir.2:123
10914 msgid ""
10915 "The file system containing I<pathname> does not support the removal of "
10916 "directories."
10917 msgstr ""
10918 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
10919 "ない。"
10920
10921 #. type: Plain text
10922 #: build/C/man2/rmdir.2:127
10923 msgid "I<pathname> refers to a directory on a read-only file system."
10924 msgstr ""
10925 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
10926
10927 #. type: Plain text
10928 #: build/C/man2/rmdir.2:132
10929 msgid ""
10930 "Infelicities in the protocol underlying NFS can cause the unexpected "
10931 "disappearance of directories which are still being used."
10932 msgstr ""
10933 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
10934 "する現象が引き起こされることがある。"
10935
10936 #. type: Plain text
10937 #: build/C/man2/rmdir.2:141
10938 msgid ""
10939 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10940 "B<unlink>(2), B<unlinkat>(2)"
10941 msgstr ""
10942 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10943 "B<unlink>(2), B<unlinkat>(2)"
10944
10945 #. type: TH
10946 #: build/C/man3/scanf.3:52
10947 #, no-wrap
10948 msgid "SCANF"
10949 msgstr "SCANF"
10950
10951 #. type: TH
10952 #: build/C/man3/scanf.3:52
10953 #, fuzzy, no-wrap
10954 #| msgid "2012-01-18"
10955 msgid "2013-01-30"
10956 msgstr "2012-01-18"
10957
10958 #. type: Plain text
10959 #: build/C/man3/scanf.3:55
10960 msgid ""
10961 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
10962 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
10963
10964 #. type: Plain text
10965 #: build/C/man3/scanf.3:62
10966 #, no-wrap
10967 msgid ""
10968 "B<int scanf(const char *>I<format>B<, ...);>\n"
10969 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10970 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10971 msgstr ""
10972 "B<int scanf(const char *>I<format>B<, ...);>\n"
10973 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10974 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10975
10976 #. type: Plain text
10977 #: build/C/man3/scanf.3:64
10978 #, no-wrap
10979 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
10980 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
10981
10982 #. type: Plain text
10983 #: build/C/man3/scanf.3:68
10984 #, no-wrap
10985 msgid ""
10986 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10987 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10988 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10989 msgstr ""
10990 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10991 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10992 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10993
10994 #. type: Plain text
10995 #: build/C/man3/scanf.3:79
10996 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10997 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10998
10999 #. type: Plain text
11000 #: build/C/man3/scanf.3:82
11001 msgid ""
11002 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11003 "200112L;"
11004 msgstr ""
11005 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11006 "200112L;"
11007
11008 #. type: Plain text
11009 #: build/C/man3/scanf.3:104
11010 msgid ""
11011 "The B<scanf>()  family of functions scans input according to I<format> as "
11012 "described below.  This format may contain I<conversion specifications>; the "
11013 "results from such conversions, if any, are stored in the locations pointed "
11014 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
11015 "argument must be of a type that is appropriate for the value returned by the "
11016 "corresponding conversion specification."
11017 msgstr ""
11018 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
11019 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
11020 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
11021 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
11022 "は、対応する変換指定が返す値に 適合していなければならない。"
11023
11024 #. type: Plain text
11025 #: build/C/man3/scanf.3:115
11026 msgid ""
11027 "If the number of conversion specifications in I<format> exceeds the number "
11028 "of I<pointer> arguments, the results are undefined.  If the number of "
11029 "I<pointer> arguments exceeds the number of conversion specifications, then "
11030 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
11031 msgstr ""
11032 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
11033 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
11034 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
11035
11036 #. type: Plain text
11037 #: build/C/man3/scanf.3:127
11038 msgid ""
11039 "The B<scanf>()  function reads input from the standard input stream "
11040 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
11041 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
11042 msgstr ""
11043 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
11044 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
11045 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
11046
11047 #. type: Plain text
11048 #: build/C/man3/scanf.3:145
11049 msgid ""
11050 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
11051 "from the stream pointer I<stream> using a variable argument list of pointers "
11052 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
11053 "from the standard input and the B<vsscanf>()  function scans it from a "
11054 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
11055 "functions respectively."
11056 msgstr ""
11057 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
11058 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
11059 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
11060 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
11061 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
11062
11063 #. type: Plain text
11064 #: build/C/man3/scanf.3:159
11065 msgid ""
11066 "The I<format> string consists of a sequence of I<directives> which describe "
11067 "how to process the sequence of input characters.  If processing of a "
11068 "directive fails, no further input is read, and B<scanf>()  returns.  A "
11069 "\"failure\" can be either of the following: I<input failure>, meaning that "
11070 "input characters were unavailable, or I<matching failure>, meaning that the "
11071 "input was inappropriate (see below)."
11072 msgstr ""
11073 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
11074 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
11075 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
11076 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
11077 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
11078 "であったこと (下記参照) を意味する。"
11079
11080 #. type: Plain text
11081 #: build/C/man3/scanf.3:161
11082 msgid "A directive is one of the following:"
11083 msgstr "命令は以下のいずれかである:"
11084
11085 #. type: TP
11086 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
11087 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
11088 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
11089 #, no-wrap
11090 msgid "\\(bu"
11091 msgstr "\\(bu"
11092
11093 #. type: Plain text
11094 #: build/C/man3/scanf.3:167
11095 msgid ""
11096 "A sequence of white-space characters (space, tab, newline, etc.; see "
11097 "B<isspace>(3)).  This directive matches any amount of white space, including "
11098 "none, in the input."
11099 msgstr ""
11100 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
11101 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
11102 "致する)。"
11103
11104 #. type: Plain text
11105 #: build/C/man3/scanf.3:171
11106 msgid ""
11107 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
11108 "This character must exactly match the next character of input."
11109 msgstr ""
11110 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
11111 "の次の文字に正確に一致しなければならない。"
11112
11113 #. type: Plain text
11114 #: build/C/man3/scanf.3:182
11115 msgid ""
11116 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
11117 "character.  A sequence of characters from the input is converted according "
11118 "to this specification, and the result is placed in the corresponding "
11119 "I<pointer> argument.  If the next item of input does not match the "
11120 "conversion specification, the conversion fails\\(emthis is a I<matching "
11121 "failure>."
11122 msgstr ""
11123 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
11124 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
11125 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
11126 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
11127
11128 #. type: Plain text
11129 #: build/C/man3/scanf.3:190
11130 msgid ""
11131 "Each I<conversion specification> in I<format> begins with either the "
11132 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
11133 "for the distinction) followed by:"
11134 msgstr ""
11135 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
11136 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
11137
11138 #. type: Plain text
11139 #: build/C/man3/scanf.3:201
11140 msgid ""
11141 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
11142 "input as directed by the conversion specification, but discards the input.  "
11143 "No corresponding I<pointer> argument is required, and this specification is "
11144 "not included in the count of successful assignments returned by B<scanf>()."
11145 msgstr ""
11146 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
11147 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
11148 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
11149
11150 #. type: Plain text
11151 #: build/C/man3/scanf.3:220
11152 #, fuzzy
11153 #| msgid ""
11154 #| "An optional \\(aqa\\(aq character.  This is used with string conversions, "
11155 #| "and relieves the caller of the need to allocate a corresponding buffer to "
11156 #| "hold the input: instead, B<scanf>()  allocates a buffer of sufficient "
11157 #| "size, and assigns the address of this buffer to the corresponding "
11158 #| "I<pointer> argument, which should be a pointer to a I<char *> variable "
11159 #| "(this variable does not need to be initialized before the call).  The "
11160 #| "caller should subsequently B<free>(3)  this buffer when it is no longer "
11161 #| "required.  This is a GNU extension; C99 employs the \\(aqa\\(aq character "
11162 #| "as a conversion specifier (and it can also be used as such in the GNU "
11163 #| "implementation)."
11164 msgid ""
11165 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
11166 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11167 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11168 "buffer of sufficient size, and assigns the address of this buffer to the "
11169 "corresponding I<pointer> argument, which should be a pointer to a I<char *> "
11170 "variable (this variable does not need to be initialized before the call).  "
11171 "The caller should subsequently B<free>(3)  this buffer when it is no longer "
11172 "required."
11173 msgstr ""
11174 "文字 \\(aqa\\(aq (省略可能)。これは文字列変換とともに使用され、これを使うと "
11175 "呼び出し元が入力を保持する対応するバッファを確保する必要がなくなる。 代わり"
11176 "に B<scanf>()  が必要な大きさのバッファを確保し、このバッファのアドレスを 対"
11177 "応する I<pointer> 引き数に代入する。 I<pointer> 引き数は I<char *> 型の変数へ"
11178 "のポインタでなければならない (変数自体は呼び出し前に初期化されている必要はな"
11179 "い)。 呼び出し元は、不要になった時点で、このバッファを B<free>(3)  すべきであ"
11180 "る。この機能は GNU による拡張である。 C99 は \\(aqa\\(aq 文字を変換指定として"
11181 "使用している (こちらも GNU の実装と同じように使用することができる)。"
11182
11183 #. type: Plain text
11184 #: build/C/man3/scanf.3:232
11185 msgid ""
11186 "An optional decimal integer which specifies the I<maximum field width>.  "
11187 "Reading of characters stops either when this maximum is reached or when a "
11188 "nonmatching character is found, whichever happens first.  Most conversions "
11189 "discard initial white space characters (the exceptions are noted below), and "
11190 "these discarded characters don't count toward the maximum field width.  "
11191 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
11192 "mark the end of the input; the maximum field width does not include this "
11193 "terminator."
11194 msgstr ""
11195 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
11196 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
11197 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
11198 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
11199 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
11200 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
11201
11202 #. type: Plain text
11203 #: build/C/man3/scanf.3:246
11204 msgid ""
11205 "An optional I<type modifier character>.  For example, the B<l> type modifier "
11206 "is used with integer conversions such as B<%d> to specify that the "
11207 "corresponding I<pointer> argument refers to a I<long int> rather than a "
11208 "pointer to an I<int>."
11209 msgstr ""
11210 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
11211 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
11212 "I<int> ではなく I<long int> を参照していることを指定できる。"
11213
11214 #. type: Plain text
11215 #: build/C/man3/scanf.3:251
11216 msgid ""
11217 "A I<conversion specifier> that specifies the type of input conversion to be "
11218 "performed."
11219 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
11220
11221 #. type: Plain text
11222 #: build/C/man3/scanf.3:280
11223 msgid ""
11224 "The conversion specifications in I<format> are of two forms, either "
11225 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
11226 "forms should not be mixed in the same I<format> string, except that a string "
11227 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
11228 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
11229 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
11230 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
11231 "specifies that the converted input should be placed in the location referred "
11232 "to by the I<n>-th I<pointer> argument following I<format>."
11233 msgstr ""
11234 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
11235 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
11236 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
11237 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
11238 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
11239 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
11240 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
11241 "I<pointer> 引き数が参照する場所に格納することを指定する。"
11242
11243 #. type: SS
11244 #: build/C/man3/scanf.3:280
11245 #, no-wrap
11246 msgid "Conversions"
11247 msgstr "変換"
11248
11249 #. type: Plain text
11250 #: build/C/man3/scanf.3:284
11251 msgid ""
11252 "The following I<type modifier characters> can appear in a conversion "
11253 "specification:"
11254 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
11255
11256 #. type: Plain text
11257 #: build/C/man3/scanf.3:294
11258 msgid ""
11259 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
11260 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
11261 "I<unsigned short int> (rather than I<int>)."
11262 msgstr ""
11263 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
11264 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
11265 "あることを示す。"
11266
11267 #. type: Plain text
11268 #: build/C/man3/scanf.3:302
11269 msgid ""
11270 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
11271 "I<unsigned char>."
11272 msgstr ""
11273 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
11274 "タであることを示す。"
11275
11276 #. type: Plain text
11277 #: build/C/man3/scanf.3:311
11278 msgid ""
11279 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
11280 "I<uintmax_t>.  This modifier was introduced in C99."
11281 msgstr ""
11282 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
11283 "ることを示す。 この修飾子は C99 で導入された。"
11284
11285 #.  This use of l was introduced in Amendment 1 to ISO C90.
11286 #. type: Plain text
11287 #: build/C/man3/scanf.3:338
11288 msgid ""
11289 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
11290 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
11291 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
11292 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
11293 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
11294 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
11295 "as a pointer to a wide character or wide-character string respectively."
11296 msgstr ""
11297 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
11298 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
11299 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
11300 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
11301 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
11302 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
11303 "ンタであると みなされる。"
11304
11305 #.  MTK, Jul 05: The following is no longer true for modern
11306 #.  ANSI C (i.e., C99):
11307 #.  (Note that long long is not an
11308 #.  ANSI C
11309 #.  type. Any program using this will not be portable to all
11310 #.  architectures).
11311 #. type: Plain text
11312 #: build/C/man3/scanf.3:354
11313 msgid ""
11314 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
11315 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
11316 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
11317 msgstr ""
11318 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
11319 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
11320 "I<long long> へのポインタであることのいずれかであることを示す。"
11321
11322 #. type: Plain text
11323 #: build/C/man3/scanf.3:359
11324 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
11325 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
11326
11327 #. type: Plain text
11328 #: build/C/man3/scanf.3:366
11329 msgid ""
11330 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11331 "modifier was introduced in C99."
11332 msgstr ""
11333 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11334 "この修飾子は C99 で導入された。"
11335
11336 #. type: Plain text
11337 #: build/C/man3/scanf.3:373
11338 msgid ""
11339 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11340 "modifier was introduced in C99."
11341 msgstr ""
11342 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11343 "修飾子は C99 で導入された。"
11344
11345 #. type: Plain text
11346 #: build/C/man3/scanf.3:377
11347 msgid "The following I<conversion specifiers> are available:"
11348 msgstr "以下の I<「変換指定子」> が利用可能である。"
11349
11350 #. type: Plain text
11351 #: build/C/man3/scanf.3:386
11352 msgid ""
11353 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11354 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11355 "initial white space characters are discarded), and assignment does not occur."
11356 msgstr ""
11357 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11358 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11359 "る)、 変数への代入は生じない。"
11360
11361 #. type: TP
11362 #: build/C/man3/scanf.3:386
11363 #, no-wrap
11364 msgid "B<d>"
11365 msgstr "B<d>"
11366
11367 #. type: Plain text
11368 #: build/C/man3/scanf.3:391
11369 msgid ""
11370 "Matches an optionally signed decimal integer; the next pointer must be a "
11371 "pointer to I<int>."
11372 msgstr ""
11373 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11374 "ばならない。"
11375
11376 #. type: TP
11377 #: build/C/man3/scanf.3:391
11378 #, no-wrap
11379 msgid "B<D>"
11380 msgstr "B<D>"
11381
11382 #. type: Plain text
11383 #: build/C/man3/scanf.3:400
11384 msgid ""
11385 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11386 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11387 "causing old programs to fail mysteriously.)"
11388 msgstr ""
11389 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11390 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11391 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11392
11393 #. type: TP
11394 #: build/C/man3/scanf.3:400
11395 #, no-wrap
11396 msgid "B<i>"
11397 msgstr "B<i>"
11398
11399 #. type: Plain text
11400 #: build/C/man3/scanf.3:412
11401 msgid ""
11402 "Matches an optionally signed integer; the next pointer must be a pointer to "
11403 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11404 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11405 "that correspond to the base are used."
11406 msgstr ""
11407 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11408 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11409 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11410 "される文字は、これらの基数に対応しているものだけである。"
11411
11412 #. type: TP
11413 #: build/C/man3/scanf.3:412
11414 #, no-wrap
11415 msgid "B<o>"
11416 msgstr "B<o>"
11417
11418 #. type: Plain text
11419 #: build/C/man3/scanf.3:416
11420 msgid ""
11421 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11422 "I<unsigned int>."
11423 msgstr ""
11424 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11425 "らない。"
11426
11427 #. type: TP
11428 #: build/C/man3/scanf.3:416
11429 #, no-wrap
11430 msgid "B<u>"
11431 msgstr "B<u>"
11432
11433 #. type: Plain text
11434 #: build/C/man3/scanf.3:421
11435 msgid ""
11436 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11437 "I<unsigned int>."
11438 msgstr ""
11439 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11440 "でなければならない。"
11441
11442 #. type: Plain text
11443 #: build/C/man3/scanf.3:426
11444 msgid ""
11445 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11446 "to I<unsigned int>."
11447 msgstr ""
11448 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11449 "タでなければならない。"
11450
11451 #. type: TP
11452 #: build/C/man3/scanf.3:426
11453 #, no-wrap
11454 msgid "B<X>"
11455 msgstr "B<X>"
11456
11457 #. type: Plain text
11458 #: build/C/man3/scanf.3:430
11459 msgid "Equivalent to B<x>."
11460 msgstr "B<x> と同一である。"
11461
11462 #. type: TP
11463 #: build/C/man3/scanf.3:430
11464 #, no-wrap
11465 msgid "B<f>"
11466 msgstr "B<f>"
11467
11468 #. type: Plain text
11469 #: build/C/man3/scanf.3:435
11470 msgid ""
11471 "Matches an optionally signed floating-point number; the next pointer must be "
11472 "a pointer to I<float>."
11473 msgstr ""
11474 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11475 "ればならない。"
11476
11477 #. type: TP
11478 #: build/C/man3/scanf.3:435
11479 #, no-wrap
11480 msgid "B<e>"
11481 msgstr "B<e>"
11482
11483 #. type: Plain text
11484 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
11485 msgid "Equivalent to B<f>."
11486 msgstr "B<f> と同一である。"
11487
11488 #. type: TP
11489 #: build/C/man3/scanf.3:439
11490 #, no-wrap
11491 msgid "B<g>"
11492 msgstr "B<g>"
11493
11494 #. type: TP
11495 #: build/C/man3/scanf.3:443
11496 #, no-wrap
11497 msgid "B<E>"
11498 msgstr "B<E>"
11499
11500 #. type: Plain text
11501 #: build/C/man3/scanf.3:451
11502 msgid "(C99) Equivalent to B<f>."
11503 msgstr "(C99)  B<f> と同一である。"
11504
11505 #. type: Plain text
11506 #: build/C/man3/scanf.3:459
11507 msgid ""
11508 "Matches a sequence of non-white-space characters; the next pointer must be a "
11509 "pointer to character array that is long enough to hold the input sequence "
11510 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11511 "automatically.  The input string stops at white space or at the maximum "
11512 "field width, whichever occurs first."
11513 msgstr ""
11514 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11515 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11516 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11517 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11518 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11519
11520 #. type: Plain text
11521 #: build/C/man3/scanf.3:470
11522 msgid ""
11523 "Matches a sequence of characters whose length is specified by the I<maximum "
11524 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11525 "there must be enough room for all the characters (no terminating null byte "
11526 "is added).  The usual skip of leading white space is suppressed.  To skip "
11527 "white space first, use an explicit space in the format."
11528 msgstr ""
11529 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11530 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11531 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11532 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11533 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11534
11535 #. type: TP
11536 #: build/C/man3/scanf.3:470
11537 #, no-wrap
11538 msgid "B<\\&[>"
11539 msgstr "B<\\&[>"
11540
11541 #. type: Plain text
11542 #: build/C/man3/scanf.3:503
11543 msgid ""
11544 "Matches a nonempty sequence of characters from the specified set of accepted "
11545 "characters; the next pointer must be a pointer to I<char>, and there must be "
11546 "enough room for all the characters in the string, plus a terminating null "
11547 "byte.  The usual skip of leading white space is suppressed.  The string is "
11548 "to be made up of characters in (or not in) a particular set; the set is "
11549 "defined by the characters between the open bracket B<[> character and a "
11550 "close bracket B<]> character.  The set I<excludes> those characters if the "
11551 "first character after the open bracket is a circumflex (B<^>).  To include a "
11552 "close bracket in the set, make it the first character after the open bracket "
11553 "or the circumflex; any other position will end the set.  The hyphen "
11554 "character B<-> is also special; when placed between two other characters, it "
11555 "adds all intervening characters to the set.  To include a hyphen, make it "
11556 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11557 "> means the set \"everything except close bracket, zero through nine, and "
11558 "hyphen\".  The string ends with the appearance of a character not in the "
11559 "(or, with a circumflex, in) set or when the field width runs out."
11560 msgstr ""
11561 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11562 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11563 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11564 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11565 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11566 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11567 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11568 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11569 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11570 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11571 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11572 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11573 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11574 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11575 "文字の 出現または確保された領域が使い切られた時に終了する。"
11576
11577 #. type: Plain text
11578 #: build/C/man3/scanf.3:511
11579 msgid ""
11580 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11581 "pointer must be a pointer to a pointer to I<void>."
11582 msgstr ""
11583 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11584 "タは I<void> へのポインタへのポインタでなければならない。"
11585
11586 #. type: Plain text
11587 #: build/C/man3/scanf.3:531
11588 msgid ""
11589 "Nothing is expected; instead, the number of characters consumed thus far "
11590 "from the input is stored through the next pointer, which must be a pointer "
11591 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11592 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11593 "of a B<%n> directive does not increment the assignment count returned at the "
11594 "completion of execution\" but the Corrigendum seems to contradict this.  "
11595 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11596 "conversions on the return value."
11597 msgstr ""
11598 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11599 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11600 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11601 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11602 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11603 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11604 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11605
11606 #. type: Plain text
11607 #: build/C/man3/scanf.3:536
11608 msgid ""
11609 "These functions return the number of input items successfully matched and "
11610 "assigned, which can be fewer than provided for, or even zero in the event of "
11611 "an early matching failure."
11612 msgstr ""
11613 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11614 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11615 "ることもある。"
11616
11617 #. type: Plain text
11618 #: build/C/man3/scanf.3:548
11619 msgid ""
11620 "The value B<EOF> is returned if the end of input is reached before either "
11621 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11622 "also returned if a read error occurs, in which case the error indicator for "
11623 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11624 "error."
11625 msgstr ""
11626 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11627 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11628 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11629 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11630
11631 #. type: Plain text
11632 #: build/C/man3/scanf.3:554
11633 msgid ""
11634 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11635 "operation would block."
11636 msgstr ""
11637 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11638 "込み操作は停止 (block) することになる。"
11639
11640 #. type: Plain text
11641 #: build/C/man3/scanf.3:559
11642 msgid ""
11643 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11644 msgstr ""
11645 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11646 "ンされていない。"
11647
11648 #. type: Plain text
11649 #: build/C/man3/scanf.3:562
11650 msgid "Input byte sequence does not form a valid character."
11651 msgstr "入力されたバイト列が有効な文字を構成していない。"
11652
11653 #. type: Plain text
11654 #: build/C/man3/scanf.3:566
11655 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11656 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11657
11658 #. type: Plain text
11659 #: build/C/man3/scanf.3:571
11660 msgid "Not enough arguments; or I<format> is NULL."
11661 msgstr "引き数が十分でない。または I<format> が NULL である。"
11662
11663 #. type: Plain text
11664 #: build/C/man3/scanf.3:574
11665 msgid "Out of memory."
11666 msgstr "メモリ不足。"
11667
11668 #. type: TP
11669 #: build/C/man3/scanf.3:574
11670 #, no-wrap
11671 msgid "B<ERANGE>"
11672 msgstr "B<ERANGE>"
11673
11674 #. type: Plain text
11675 #: build/C/man3/scanf.3:578
11676 msgid ""
11677 "The result of an integer conversion would exceed the size that can be stored "
11678 "in the corresponding integer type."
11679 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11680
11681 #. type: Plain text
11682 #: build/C/man3/scanf.3:588
11683 msgid ""
11684 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11685 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11686 msgstr ""
11687 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11688 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11689
11690 #. type: Plain text
11691 #: build/C/man3/scanf.3:598
11692 msgid ""
11693 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11694 "the usage of B<L> in integer conversions is the GNU notation."
11695 msgstr ""
11696 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11697 "B<ll> または B<L> の使用は GNU での拡張である。"
11698
11699 #. type: Plain text
11700 #: build/C/man3/scanf.3:609
11701 msgid ""
11702 "The Linux version of these functions is based on the I<GNU> I<libio> "
11703 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11704 "(glibc-1.08)> for a more concise description."
11705 msgstr ""
11706 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11707 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11708
11709 #. type: Plain text
11710 #: build/C/man3/scanf.3:615
11711 msgid ""
11712 "The GNU C library supported the dynamic allocation conversion specifier (as "
11713 "a nonstandard extension) via the B<a> character.  This feature seems to be "
11714 "present at least as far back as glibc 2.0."
11715 msgstr ""
11716
11717 #. type: Plain text
11718 #: build/C/man3/scanf.3:625
11719 #, fuzzy
11720 #| msgid ""
11721 #| "The B<a> modifier is not available if the program is compiled with I<gcc -"
11722 #| "std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also "
11723 #| "specified), in which case the B<a> is interpreted as a specifier for "
11724 #| "floating-point numbers (see above)."
11725 msgid ""
11726 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
11727 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
11728 "the B<a> is interpreted as a specifier for floating-point numbers (see "
11729 "above)."
11730 msgstr ""
11731 "I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプログラムでは "
11732 "(B<_GNU_SOURCE> も同時に指定していない場合)、 B<a> 修飾子は利用できない。 上"
11733 "記の場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11734
11735 #. type: Plain text
11736 #: build/C/man3/scanf.3:634
11737 msgid ""
11738 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11739 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11740 "advantages:"
11741 msgstr ""
11742 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11743 "ている。 B<m> 修飾子は以下の利点がある。"
11744
11745 #. type: Plain text
11746 #: build/C/man3/scanf.3:639
11747 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11748 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11749
11750 #. type: Plain text
11751 #: build/C/man3/scanf.3:645
11752 msgid ""
11753 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11754 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11755 msgstr ""
11756 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11757 "std=c99> などの影響も避けられる)。"
11758
11759 #. type: Plain text
11760 #: build/C/man3/scanf.3:647
11761 #, fuzzy
11762 #| msgid "It is specified in the upcoming revision of the POSIX.1 standard."
11763 msgid "It is specified in the POSIX.1-2008 standard."
11764 msgstr "POSIX.1 標準の次の改訂版で規定される。"
11765
11766 #. type: Plain text
11767 #: build/C/man3/scanf.3:660
11768 msgid ""
11769 "All functions are fully C89 conformant, but provide the additional "
11770 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11771 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11772 "the behavior of specifiers defined in C89."
11773 msgstr ""
11774 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11775 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11776 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11777 "れない。"
11778
11779 #. type: Plain text
11780 #: build/C/man3/scanf.3:676
11781 msgid ""
11782 "Some combinations of the type modifiers and conversion specifiers defined by "
11783 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
11784 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11785 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11786 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11787 "B<u>, B<x>, and B<X> conversions or B<ll>."
11788 msgstr ""
11789 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
11790 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
11791 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
11792 "他のアーキテクチャでも同様になっているとは限らない。\n"
11793 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
11794 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
11795 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11796
11797 #. type: Plain text
11798 #: build/C/man3/scanf.3:682
11799 msgid ""
11800 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11801 "conversions equivalently to B<L>."
11802 msgstr ""
11803 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11804 "動小数の変換に使用される。"
11805
11806 #. type: Plain text
11807 #: build/C/man3/scanf.3:692
11808 #, fuzzy
11809 #| msgid ""
11810 #| "The GNU C library supports a nonstandard extension that causes the "
11811 #| "library to dynamically allocate a string of sufficient size for input "
11812 #| "strings for the B<%s> and B<%a[>I<range>B<]> conversion specifiers.  To "
11813 #| "make use of this feature, specify B<a> as a length modifier (thus B<%as> "
11814 #| "or B<%a[>I<range>B<]>).  The caller must B<free>(3)  the returned string, "
11815 #| "as in the following example:"
11816 msgid ""
11817 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
11818 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
11819 "the returned string, as in the following example:"
11820 msgstr ""
11821 "GNU C ライブラリ (glibc) では非標準のオプションをサポートしており、 このオプ"
11822 "ションを使うと変換指定子 B<%s> や B<%a[>I<range>B<]> への入力文字列に対して十"
11823 "分な大きさの文字列をライブラリが動的に確保する ようになる。 この機能を使用す"
11824 "るには、長さ修飾子として B<a> を指定する (したがって、全体としては B<%as> や "
11825 "B<%a[>I<range>B<]> となる)。 以下の例にあるように、呼び出し側は返された文字列"
11826 "を B<free>(3)  しなければならない。"
11827
11828 #. type: Plain text
11829 #: build/C/man3/scanf.3:697
11830 #, no-wrap
11831 msgid ""
11832 "char *p;\n"
11833 "int n;\n"
11834 msgstr ""
11835 "char *p;\n"
11836 "int n;\n"
11837
11838 #. type: Plain text
11839 #: build/C/man3/scanf.3:708
11840 #, fuzzy, no-wrap
11841 #| msgid ""
11842 #| "errno = 0;\n"
11843 #| "n = scanf(\"%a[a-z]\", &p);\n"
11844 #| "if (n == 1) {\n"
11845 #| "    printf(\"read: %s\\en\", p);\n"
11846 #| "    free(p);\n"
11847 #| "} else if (errno != 0) {\n"
11848 #| "    perror(\"scanf\");\n"
11849 #| "} else {\n"
11850 #| "    fprintf(stderr, \"No matching characters\\en\");\n"
11851 #| "}\n"
11852 msgid ""
11853 "errno = 0;\n"
11854 "n = scanf(\"%m[a-z]\", &p);\n"
11855 "if (n == 1) {\n"
11856 "    printf(\"read: %s\\en\", p);\n"
11857 "    free(p);\n"
11858 "} else if (errno != 0) {\n"
11859 "    perror(\"scanf\");\n"
11860 "} else {\n"
11861 "    fprintf(stderr, \"No matching characters\\en\");\n"
11862 "}\n"
11863 msgstr ""
11864 "errno = 0;\n"
11865 "n = scanf(\"%a[a-z]\", &p);\n"
11866 "if (n == 1) {\n"
11867 "    printf(\"read: %s\\en\", p);\n"
11868 "    free(p);\n"
11869 "} else if (errno != 0) {\n"
11870 "    perror(\"scanf\");\n"
11871 "} else {\n"
11872 "    fprintf(stderr, \"No matching characters\\en\");\n"
11873 "}\n"
11874
11875 #. type: Plain text
11876 #: build/C/man3/scanf.3:716
11877 msgid ""
11878 "As shown in the above example, it is only necessary to call B<free>(3)  if "
11879 "the B<scanf>()  call successfully read a string."
11880 msgstr ""
11881 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11882 "B<free>(3)  を呼び出す必要がある。"
11883
11884 #. type: Plain text
11885 #: build/C/man3/scanf.3:723
11886 msgid ""
11887 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11888 "B<strtoul>(3)"
11889 msgstr ""
11890 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11891 "B<strtoul>(3),"
11892
11893 #. type: TH
11894 #: build/C/man3/setbuf.3:48
11895 #, no-wrap
11896 msgid "SETBUF"
11897 msgstr "SETBUF"
11898
11899 #. type: TH
11900 #: build/C/man3/setbuf.3:48
11901 #, fuzzy, no-wrap
11902 #| msgid "2012-04-30"
11903 msgid "2012-08-03"
11904 msgstr "2012-04-30"
11905
11906 #. type: Plain text
11907 #: build/C/man3/setbuf.3:51
11908 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11909 msgstr ""
11910 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11911
11912 #. type: Plain text
11913 #: build/C/man3/setbuf.3:56
11914 #, no-wrap
11915 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11916 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11917
11918 #. type: Plain text
11919 #: build/C/man3/setbuf.3:58
11920 #, no-wrap
11921 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11922 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11923
11924 #. type: Plain text
11925 #: build/C/man3/setbuf.3:60
11926 #, no-wrap
11927 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11928 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11929
11930 #. type: Plain text
11931 #: build/C/man3/setbuf.3:63
11932 #, no-wrap
11933 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11934 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11935
11936 #. type: Plain text
11937 #: build/C/man3/setbuf.3:73
11938 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11939 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11940
11941 #. type: Plain text
11942 #: build/C/man3/setbuf.3:96
11943 msgid ""
11944 "The three types of buffering available are unbuffered, block buffered, and "
11945 "line buffered.  When an output stream is unbuffered, information appears on "
11946 "the destination file or terminal as soon as written; when it is block "
11947 "buffered many characters are saved up and written as a block; when it is "
11948 "line buffered characters are saved up until a newline is output or input is "
11949 "read from any stream attached to a terminal device (typically I<stdin>).  "
11950 "The function B<fflush>(3)  may be used to force the block out early.  (See "
11951 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
11952 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
11953 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
11954 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
11955 "by default."
11956 msgstr ""
11957 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
11958 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
11959 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
11960 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
11961 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
11962 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
11963 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
11964 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
11965 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
11966 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
11967 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
11968 "unbuffered である。"
11969
11970 #. type: Plain text
11971 #: build/C/man3/setbuf.3:103
11972 msgid ""
11973 "The B<setvbuf>()  function may be used on any open stream to change its "
11974 "buffer.  The I<mode> argument must be one of the following three macros:"
11975 msgstr ""
11976 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
11977 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
11978
11979 #. type: TP
11980 #: build/C/man3/setbuf.3:104
11981 #, no-wrap
11982 msgid "B<_IONBF>"
11983 msgstr "B<_IONBF>"
11984
11985 #. type: Plain text
11986 #: build/C/man3/setbuf.3:107
11987 msgid "unbuffered"
11988 msgstr "unbuffered"
11989
11990 #. type: TP
11991 #: build/C/man3/setbuf.3:107
11992 #, no-wrap
11993 msgid "B<_IOLBF>"
11994 msgstr "B<_IOLBF>"
11995
11996 #. type: Plain text
11997 #: build/C/man3/setbuf.3:110
11998 msgid "line buffered"
11999 msgstr "line buffered"
12000
12001 #. type: TP
12002 #: build/C/man3/setbuf.3:110
12003 #, no-wrap
12004 msgid "B<_IOFBF>"
12005 msgstr "B<_IOFBF>"
12006
12007 #. type: Plain text
12008 #: build/C/man3/setbuf.3:113
12009 msgid "fully buffered"
12010 msgstr "fully buffered"
12011
12012 #. type: Plain text
12013 #: build/C/man3/setbuf.3:129
12014 msgid ""
12015 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
12016 "least I<size> bytes long; this buffer will be used instead of the current "
12017 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
12018 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
12019 "()  function may only be used after opening a stream and before any other "
12020 "operations have been performed on it."
12021 msgstr ""
12022 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
12023 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
12024 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
12025 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
12026 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
12027
12028 #. type: Plain text
12029 #: build/C/man3/setbuf.3:135
12030 msgid ""
12031 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
12032 "().  The B<setbuf>()  function is exactly equivalent to the call"
12033 msgstr ""
12034 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
12035 "B<setbuf>()  関数は、"
12036
12037 #. type: Plain text
12038 #: build/C/man3/setbuf.3:138
12039 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12040 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12041
12042 #. type: Plain text
12043 #: build/C/man3/setbuf.3:148
12044 msgid ""
12045 "The B<setbuffer>()  function is the same, except that the size of the buffer "
12046 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
12047 "The B<setlinebuf>()  function is exactly equivalent to the call:"
12048 msgstr ""
12049 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
12050 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
12051 "は以下と同じである。"
12052
12053 #. type: Plain text
12054 #: build/C/man3/setbuf.3:151
12055 #, fuzzy
12056 #| msgid "setvbuf(stream, (char *) NULL, _IOLBF, 0);"
12057 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
12058 msgstr "setvbuf(stream, (char *) NULL, _IOLBF, 0);"
12059
12060 #. type: Plain text
12061 #: build/C/man3/setbuf.3:162
12062 msgid ""
12063 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
12064 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
12065 "I<errno> on failure."
12066 msgstr ""
12067 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
12068 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
12069 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
12070
12071 #. type: Plain text
12072 #: build/C/man3/setbuf.3:164
12073 msgid "The other functions do not return a value."
12074 msgstr "その他の関数は値を返さない。"
12075
12076 #. type: Plain text
12077 #: build/C/man3/setbuf.3:170
12078 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
12079 msgstr ""
12080 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
12081
12082 #. type: Plain text
12083 #: build/C/man3/setbuf.3:180
12084 msgid ""
12085 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
12086 "versions of BSD before 4.2BSD, and are available under Linux since libc "
12087 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
12088 "buffer size and should be avoided."
12089 msgstr ""
12090 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
12091 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
12092 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
12093 "ズを使用するので、これも使うべきでない。"
12094
12095 #. type: Plain text
12096 #: build/C/man3/setbuf.3:187
12097 msgid ""
12098 "You must make sure that the space that I<buf> points to still exists by the "
12099 "time I<stream> is closed, which also happens at program termination.  For "
12100 "example, the following is invalid:"
12101 msgstr ""
12102 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
12103 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
12104 "な使い方は許されない:"
12105
12106 #. type: Plain text
12107 #: build/C/man3/setbuf.3:190
12108 #, no-wrap
12109 msgid "#include E<lt>stdio.hE<gt>\n"
12110 msgstr "#include E<lt>stdio.hE<gt>\n"
12111
12112 #. type: Plain text
12113 #: build/C/man3/setbuf.3:199
12114 #, no-wrap
12115 msgid ""
12116 "int\n"
12117 "main(void)\n"
12118 "{\n"
12119 "    char buf[BUFSIZ];\n"
12120 "    setbuf(stdin, buf);\n"
12121 "    printf(\"Hello, world!\\en\");\n"
12122 "    return 0;\n"
12123 "}\n"
12124 msgstr ""
12125 "int\n"
12126 "main(void)\n"
12127 "{\n"
12128 "    char buf[BUFSIZ];\n"
12129 "    setbuf(stdin, buf);\n"
12130 "    printf(\"Hello, world!\\en\");\n"
12131 "    return 0;\n"
12132 "}\n"
12133
12134 #. type: Plain text
12135 #: build/C/man3/setbuf.3:208
12136 msgid ""
12137 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12138 "(3), B<puts>(3)"
12139 msgstr ""
12140 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12141 "(3), B<puts>(3)"
12142
12143 #. type: TH
12144 #: build/C/man3/stdin.3:13
12145 #, no-wrap
12146 msgid "STDIN"
12147 msgstr "STDIN"
12148
12149 #. type: TH
12150 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
12151 #, no-wrap
12152 msgid "2008-07-14"
12153 msgstr "2008-07-14"
12154
12155 #. type: Plain text
12156 #: build/C/man3/stdin.3:16
12157 msgid "stdin, stdout, stderr - standard I/O streams"
12158 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
12159
12160 #. type: Plain text
12161 #: build/C/man3/stdin.3:23
12162 #, no-wrap
12163 msgid ""
12164 "B<extern FILE *>I<stdin>B<;>\n"
12165 "B<extern FILE *>I<stdout>B<;>\n"
12166 "B<extern FILE *>I<stderr>B<;>\n"
12167 msgstr ""
12168 "B<extern FILE *>I<stdin>B<;>\n"
12169 "B<extern FILE *>I<stdout>B<;>\n"
12170 "B<extern FILE *>I<stderr>B<;>\n"
12171
12172 #. type: Plain text
12173 #: build/C/man3/stdin.3:35
12174 msgid ""
12175 "Under normal circumstances every UNIX program has three streams opened for "
12176 "it when it starts up, one for input, one for output, and one for printing "
12177 "diagnostic or error messages.  These are typically attached to the user's "
12178 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
12179 "depending on what the parent process chose to set up.  (See also the "
12180 "\"Redirection\" section of B<sh>(1).)"
12181 msgstr ""
12182 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
12183 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
12184 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
12185 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
12186 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
12187
12188 #. type: Plain text
12189 #: build/C/man3/stdin.3:45
12190 msgid ""
12191 "The input stream is referred to as \"standard input\"; the output stream is "
12192 "referred to as \"standard output\"; and the error stream is referred to as "
12193 "\"standard error\".  These terms are abbreviated to form the symbols used to "
12194 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
12195 msgstr ""
12196 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
12197 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
12198 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
12199 "I<stdout>, I<stderr> である。"
12200
12201 #. type: Plain text
12202 #: build/C/man3/stdin.3:54
12203 msgid ""
12204 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
12205 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
12206 msgstr ""
12207 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
12208 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
12209
12210 #. type: Plain text
12211 #: build/C/man3/stdin.3:63
12212 msgid ""
12213 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
12214 "same underlying files may also be accessed using the raw UNIX file "
12215 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
12216 msgstr ""
12217 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
12218 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
12219 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
12220 "る。"
12221
12222 #. type: Plain text
12223 #: build/C/man3/stdin.3:82
12224 msgid ""
12225 "On program startup, the integer file descriptors associated with the streams "
12226 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
12227 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
12228 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
12229 "(3)  to one of these streams can change the file descriptor number "
12230 "associated with the stream.)"
12231 msgstr ""
12232 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
12233 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
12234 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
12235 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
12236 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
12237 "たファイルディスクリプタ の番号を変更することができる。)"
12238
12239 #. type: Plain text
12240 #: build/C/man3/stdin.3:95
12241 msgid ""
12242 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
12243 "unexpected results and should generally be avoided.  (For the masochistic "
12244 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
12245 "is supposed to work.)  A general rule is that file descriptors are handled "
12246 "in the kernel, while stdio is just a library.  This means for example, that "
12247 "after an B<exec>(3), the child inherits all open file descriptors, but all "
12248 "old streams have become inaccessible."
12249 msgstr ""
12250 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
12251 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
12252 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
12253 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
12254 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
12255 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
12256 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
12257
12258 #. type: Plain text
12259 #: build/C/man3/stdin.3:113
12260 msgid ""
12261 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
12262 "macros, assigning to them is nonportable.  The standard streams can be made "
12263 "to refer to different files with help of the library function B<freopen>(3), "
12264 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
12265 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
12266 "by normal program termination."
12267 msgstr ""
12268 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
12269 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
12270 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
12271 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
12272 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
12273 "グラムの正常終了によってクローズされる。"
12274
12275 #. type: Plain text
12276 #: build/C/man3/stdin.3:122
12277 msgid ""
12278 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
12279 "standard also stipulates that these three streams shall be open at program "
12280 "startup."
12281 msgstr ""
12282 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
12283 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
12284 "とが規定されている。"
12285
12286 #. type: Plain text
12287 #: build/C/man3/stdin.3:154
12288 msgid ""
12289 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
12290 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
12291 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
12292 "unexpected results, especially with debugging output.  The buffering mode of "
12293 "the standard streams (or any other stream)  can be changed using the "
12294 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
12295 "associated with a terminal, there may also be input buffering in the "
12296 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
12297 "terminal input is line buffered in the kernel.)  This kernel input handling "
12298 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
12299 "B<termios>(3)."
12300 msgstr ""
12301 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
12302 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
12303 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
12304 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
12305 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
12306 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
12307 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
12308 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
12309 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
12310 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
12311 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
12312 "B<termios>(3)  も参照すること。"
12313
12314 #. type: Plain text
12315 #: build/C/man3/stdin.3:160
12316 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12317 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12318
12319 #. type: TH
12320 #: build/C/man3/stdio.3:39
12321 #, no-wrap
12322 msgid "STDIO"
12323 msgstr "STDIO"
12324
12325 #. type: TH
12326 #: build/C/man3/stdio.3:39
12327 #, no-wrap
12328 msgid "2001-12-26"
12329 msgstr "2001-12-26"
12330
12331 #. type: Plain text
12332 #: build/C/man3/stdio.3:42
12333 msgid "stdio - standard input/output library functions"
12334 msgstr "stdio - 標準入出力ライブラリ関数"
12335
12336 #. type: Plain text
12337 #: build/C/man3/stdio.3:46
12338 msgid "B<FILE *>I<stdin>B<;>"
12339 msgstr "B<FILE *>I<stdin>B<;>"
12340
12341 #. type: Plain text
12342 #: build/C/man3/stdio.3:48
12343 msgid "B<FILE *>I<stdout>B<;>"
12344 msgstr "B<FILE *>I<stdout>B<;>"
12345
12346 #. type: Plain text
12347 #: build/C/man3/stdio.3:50
12348 msgid "B<FILE *>I<stderr>B<;>"
12349 msgstr "B<FILE *>I<stderr>B<;>"
12350
12351 #. type: Plain text
12352 #: build/C/man3/stdio.3:57
12353 msgid ""
12354 "The standard I/O library provides a simple and efficient buffered stream I/O "
12355 "interface.  Input and output is mapped into logical data streams and the "
12356 "physical I/O characteristics are concealed.  The functions and macros are "
12357 "listed below; more information is available from the individual man pages."
12358 msgstr ""
12359 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
12360 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
12361 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12362 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12363
12364 #. type: Plain text
12365 #: build/C/man3/stdio.3:80
12366 msgid ""
12367 "A stream is associated with an external file (which may be a physical "
12368 "device) by I<opening> a file, which may involve creating a new file.  "
12369 "Creating an existing file causes its former contents to be discarded.  If a "
12370 "file can support positioning requests (such as a disk file, as opposed to a "
12371 "terminal) then a I<file position indicator> associated with the stream is "
12372 "positioned at the start of the file (byte zero), unless the file is opened "
12373 "with append mode.  If append mode is used, it is unspecified whether the "
12374 "position indicator will be placed at the start or the end of the file.  The "
12375 "position indicator is maintained by subsequent reads, writes and positioning "
12376 "requests.  All input occurs as if the characters were read by successive "
12377 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12378 "characters were written by successive calls to the B<fputc>(3)  function."
12379 msgstr ""
12380 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12381 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12382 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12383 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12384 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12385 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12386 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12387 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12388 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12389 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12390 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12391 "字を書き込んだかのように行われる。"
12392
12393 #. type: Plain text
12394 #: build/C/man3/stdio.3:90
12395 msgid ""
12396 "A file is disassociated from a stream by I<closing> the file.  Output "
12397 "streams are flushed (any unwritten buffer contents are transferred to the "
12398 "host environment) before the stream is disassociated from the file.  The "
12399 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12400 "closed (garbage)."
12401 msgstr ""
12402 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12403 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12404 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12405 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12406 "確定になる (ゴミになってしまう)。"
12407
12408 #. type: Plain text
12409 #: build/C/man3/stdio.3:103
12410 msgid ""
12411 "A file may be subsequently reopened, by the same or another program "
12412 "execution, and its contents reclaimed or modified (if it can be repositioned "
12413 "at the start).  If the main function returns to its original caller, or the "
12414 "B<exit>(3)  function is called, all open files are closed (hence all output "
12415 "streams are flushed) before program termination.  Other methods of program "
12416 "termination, such as B<abort>(3)  do not bother about closing files properly."
12417 msgstr ""
12418 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12419 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12420 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12421 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12422 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12423 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12424 "保証はない。"
12425
12426 #. type: Plain text
12427 #: build/C/man3/stdio.3:119
12428 #, fuzzy
12429 #| msgid ""
12430 #| "At program startup, three text streams are predefined and need not be "
12431 #| "opened explicitly: I<standard input> (for reading conventional input), "
12432 #| "I<standard output> (for writing conventional input), and I<standard "
12433 #| "error> (for writing diagnostic output).  These streams are abbreviated "
12434 #| "I<stdin>,I<stdout> and I<stderr>.  When opened, the standard error stream "
12435 #| "is not fully buffered; the standard input and output streams are fully "
12436 #| "buffered if and only if the streams do not to refer to an interactive "
12437 #| "device."
12438 msgid ""
12439 "At program startup, three text streams are predefined and need not be opened "
12440 "explicitly: I<standard input> (for reading conventional input), I<standard "
12441 "output> (for writing conventional input), and I<standard error> (for writing "
12442 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12443 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12444 "the standard input and output streams are fully buffered if and only if the "
12445 "streams do not refer to an interactive device."
12446 msgstr ""
12447 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12448 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12449 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12450 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12451 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12452 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12453 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12454 "スを参照していなければ、 完全にバッファリングされている。"
12455
12456 #. type: Plain text
12457 #: build/C/man3/stdio.3:129
12458 msgid ""
12459 "Output streams that refer to terminal devices are always line buffered by "
12460 "default; pending output to such streams is written automatically whenever an "
12461 "input stream that refers to a terminal device is read.  In cases where a "
12462 "large amount of computation is done after printing part of a line on an "
12463 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12464 "going off and computing so that the output will appear."
12465 msgstr ""
12466 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12467 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12468 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12469 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12470 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12471 "必要がある。"
12472
12473 #. type: Plain text
12474 #: build/C/man3/stdio.3:143
12475 msgid ""
12476 "The I<stdio> library is a part of the library B<libc> and routines are "
12477 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12478 "SYNOPSIS sections of the following manual pages indicate which include files "
12479 "are to be used, what the compiler declaration for the function looks like "
12480 "and which external variables are of interest."
12481 msgstr ""
12482 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12483 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12484 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12485 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12486 "数が関係するのかが示されている。"
12487
12488 #.  Not on Linux: .BR fropen ,
12489 #.  Not on Linux: .BR fwopen ,
12490 #. type: Plain text
12491 #: build/C/man3/stdio.3:183
12492 msgid ""
12493 "The following are defined as macros; these names may not be reused without "
12494 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12495 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12496 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12497 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12498 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12499 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12500 "and B<putchar> exist and will be used if the macros definitions are "
12501 "explicitly removed."
12502 msgstr ""
12503 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12504 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12505 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12506 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12507 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12508 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12509 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12510 "示的に消去されている場合には、 これらを使用することになるだろう。"
12511
12512 #. type: SS
12513 #: build/C/man3/stdio.3:183
12514 #, fuzzy, no-wrap
12515 #| msgid "List of Functions"
12516 msgid "List of functions"
12517 msgstr "関数のリスト"
12518
12519 #. type: tbl table
12520 #: build/C/man3/stdio.3:188
12521 #, no-wrap
12522 msgid "Function\tDescription\n"
12523 msgstr "関数\t説明\n"
12524
12525 #. type: tbl table
12526 #: build/C/man3/stdio.3:189
12527 #, no-wrap
12528 msgid "_\n"
12529 msgstr "_\n"
12530
12531 #. type: tbl table
12532 #: build/C/man3/stdio.3:190
12533 #, no-wrap
12534 msgid "clearerr\tcheck and reset stream status\n"
12535 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12536
12537 #. type: tbl table
12538 #: build/C/man3/stdio.3:191
12539 #, no-wrap
12540 msgid "fclose\tclose a stream\n"
12541 msgstr "fclose\tストリームをクローズする\n"
12542
12543 #. type: tbl table
12544 #: build/C/man3/stdio.3:192
12545 #, no-wrap
12546 msgid "fdopen\tstream open functions\n"
12547 msgstr "fdopen\tストリームをオープンする\n"
12548
12549 #. type: tbl table
12550 #: build/C/man3/stdio.3:193
12551 #, no-wrap
12552 msgid "feof\tcheck and reset stream status\n"
12553 msgstr "feof\tストリームの状態の確認とリセット\n"
12554
12555 #. type: tbl table
12556 #: build/C/man3/stdio.3:194
12557 #, no-wrap
12558 msgid "ferror\tcheck and reset stream status\n"
12559 msgstr "ferror\tストリームの状態の確認とリセット\n"
12560
12561 #. type: tbl table
12562 #: build/C/man3/stdio.3:195
12563 #, no-wrap
12564 msgid "fflush\tflush a stream\n"
12565 msgstr "fflush\tストリームをフラッシュする\n"
12566
12567 #. type: tbl table
12568 #: build/C/man3/stdio.3:196
12569 #, no-wrap
12570 msgid "fgetc\tget next character or word from input stream\n"
12571 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12572
12573 #. type: tbl table
12574 #: build/C/man3/stdio.3:197
12575 #, no-wrap
12576 msgid "fgetpos\treposition a stream\n"
12577 msgstr "fgetpos\tストリームの位置を取得する\n"
12578
12579 #. type: tbl table
12580 #: build/C/man3/stdio.3:198
12581 #, no-wrap
12582 msgid "fgets\tget a line from a stream\n"
12583 msgstr "fgets\tストリームから行を取得する\n"
12584
12585 #. type: tbl table
12586 #: build/C/man3/stdio.3:199
12587 #, no-wrap
12588 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12589 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12590
12591 #. type: tbl table
12592 #: build/C/man3/stdio.3:200
12593 #, no-wrap
12594 msgid "fopen\tstream open functions\n"
12595 msgstr "fopen\tストリームをオープンする\n"
12596
12597 #. type: tbl table
12598 #: build/C/man3/stdio.3:201
12599 #, no-wrap
12600 msgid "fprintf\tformatted output conversion\n"
12601 msgstr "fprintf\t書式付き出力変換\n"
12602
12603 #. type: tbl table
12604 #: build/C/man3/stdio.3:202
12605 #, no-wrap
12606 msgid "fpurge\tflush a stream\n"
12607 msgstr "fpurge\tストリームをフラッシュする\n"
12608
12609 #. type: tbl table
12610 #: build/C/man3/stdio.3:203
12611 #, no-wrap
12612 msgid "fputc\toutput a character or word to a stream\n"
12613 msgstr "fputc\t文字または語をストリームに出力する\n"
12614
12615 #. type: tbl table
12616 #: build/C/man3/stdio.3:204
12617 #, no-wrap
12618 msgid "fputs\toutput a line to a stream\n"
12619 msgstr "fputs\t行をストリームに出力する\n"
12620
12621 #. type: tbl table
12622 #: build/C/man3/stdio.3:205
12623 #, no-wrap
12624 msgid "fread\tbinary stream input/output\n"
12625 msgstr "fread\tバイナリーストリーム入出力\n"
12626
12627 #. type: tbl table
12628 #: build/C/man3/stdio.3:206
12629 #, no-wrap
12630 msgid "freopen\tstream open functions\n"
12631 msgstr "freopen\tストリームをオープンする\n"
12632
12633 #. type: tbl table
12634 #: build/C/man3/stdio.3:207
12635 #, no-wrap
12636 msgid "fscanf\tinput format conversion\n"
12637 msgstr "fscanf\t書式付き入力変換\n"
12638
12639 #. type: tbl table
12640 #: build/C/man3/stdio.3:208
12641 #, no-wrap
12642 msgid "fseek\treposition a stream\n"
12643 msgstr "fseek\tストリームの位置指示子を移動する\n"
12644
12645 #. type: tbl table
12646 #: build/C/man3/stdio.3:209
12647 #, no-wrap
12648 msgid "fsetpos\treposition a stream\n"
12649 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12650
12651 #. type: tbl table
12652 #: build/C/man3/stdio.3:210
12653 #, no-wrap
12654 msgid "ftell\treposition a stream\n"
12655 msgstr "ftell\tストリームの位置を取得する\n"
12656
12657 #. type: tbl table
12658 #: build/C/man3/stdio.3:211
12659 #, no-wrap
12660 msgid "fwrite\tbinary stream input/output\n"
12661 msgstr "fwrite\tバイナリーストリーム入出力\n"
12662
12663 #. type: tbl table
12664 #: build/C/man3/stdio.3:212
12665 #, no-wrap
12666 msgid "getc\tget next character or word from input stream\n"
12667 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12668
12669 #. type: tbl table
12670 #: build/C/man3/stdio.3:213
12671 #, no-wrap
12672 msgid "getchar\tget next character or word from input stream\n"
12673 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12674
12675 #. type: tbl table
12676 #: build/C/man3/stdio.3:214
12677 #, no-wrap
12678 msgid "gets\tget a line from a stream\n"
12679 msgstr "gets\t行を入力ストリームから取得する\n"
12680
12681 #. type: tbl table
12682 #: build/C/man3/stdio.3:215
12683 #, no-wrap
12684 msgid "getw\tget next character or word from input stream\n"
12685 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12686
12687 #. type: tbl table
12688 #: build/C/man3/stdio.3:216
12689 #, no-wrap
12690 msgid "mktemp\tmake temporary filename (unique)\n"
12691 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12692
12693 #. type: tbl table
12694 #: build/C/man3/stdio.3:217
12695 #, no-wrap
12696 msgid "perror\tsystem error messages\n"
12697 msgstr "perror\tシステムエラーメッセージ\n"
12698
12699 #. type: tbl table
12700 #: build/C/man3/stdio.3:218
12701 #, no-wrap
12702 msgid "printf\tformatted output conversion\n"
12703 msgstr "printf\t書式付き出力変換\n"
12704
12705 #. type: tbl table
12706 #: build/C/man3/stdio.3:219
12707 #, no-wrap
12708 msgid "putc\toutput a character or word to a stream\n"
12709 msgstr "putc\t文字または語をストリームに出力する\n"
12710
12711 #. type: tbl table
12712 #: build/C/man3/stdio.3:220
12713 #, no-wrap
12714 msgid "putchar\toutput a character or word to a stream\n"
12715 msgstr "putchar\t文字または語をストリームに出力する\n"
12716
12717 #. type: tbl table
12718 #: build/C/man3/stdio.3:221
12719 #, no-wrap
12720 msgid "puts\toutput a line to a stream\n"
12721 msgstr "puts\t行をストリームに出力する\n"
12722
12723 #. type: tbl table
12724 #: build/C/man3/stdio.3:222
12725 #, no-wrap
12726 msgid "putw\toutput a character or word to a stream\n"
12727 msgstr "putw\t文字または語をストリームに出力する\n"
12728
12729 #. type: tbl table
12730 #: build/C/man3/stdio.3:223
12731 #, no-wrap
12732 msgid "remove\tremove directory entry\n"
12733 msgstr "remove\tディレクトリエントリを削除する\n"
12734
12735 #. type: tbl table
12736 #: build/C/man3/stdio.3:224
12737 #, no-wrap
12738 msgid "rewind\treposition a stream\n"
12739 msgstr "rewind\tストリームの位置指示子を移動する\n"
12740
12741 #. type: tbl table
12742 #: build/C/man3/stdio.3:225
12743 #, no-wrap
12744 msgid "scanf\tinput format conversion\n"
12745 msgstr "scanf\t書式付き入力変換\n"
12746
12747 #. type: tbl table
12748 #: build/C/man3/stdio.3:226
12749 #, no-wrap
12750 msgid "setbuf\tstream buffering operations\n"
12751 msgstr "setbuf\tストリームのバッファリングの操作\n"
12752
12753 #. type: tbl table
12754 #: build/C/man3/stdio.3:227
12755 #, no-wrap
12756 msgid "setbuffer\tstream buffering operations\n"
12757 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12758
12759 #. type: tbl table
12760 #: build/C/man3/stdio.3:228
12761 #, no-wrap
12762 msgid "setlinebuf\tstream buffering operations\n"
12763 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12764
12765 #. type: tbl table
12766 #: build/C/man3/stdio.3:229
12767 #, no-wrap
12768 msgid "setvbuf\tstream buffering operations\n"
12769 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12770
12771 #. type: tbl table
12772 #: build/C/man3/stdio.3:230
12773 #, no-wrap
12774 msgid "sprintf\tformatted output conversion\n"
12775 msgstr "sprintf\t書式付き出力変換\n"
12776
12777 #. type: tbl table
12778 #: build/C/man3/stdio.3:231
12779 #, no-wrap
12780 msgid "sscanf\tinput format conversion\n"
12781 msgstr "sscanf\t書式付き入力変換\n"
12782
12783 #. type: tbl table
12784 #: build/C/man3/stdio.3:232
12785 #, no-wrap
12786 msgid "strerror\tsystem error messages\n"
12787 msgstr "strerror\tシステムエラーメッセージ\n"
12788
12789 #. type: tbl table
12790 #: build/C/man3/stdio.3:233
12791 #, no-wrap
12792 msgid "sys_errlist\tsystem error messages\n"
12793 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12794
12795 #. type: tbl table
12796 #: build/C/man3/stdio.3:234
12797 #, no-wrap
12798 msgid "sys_nerr\tsystem error messages\n"
12799 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12800
12801 #. type: tbl table
12802 #: build/C/man3/stdio.3:235
12803 #, no-wrap
12804 msgid "tempnam\ttemporary file routines\n"
12805 msgstr "tempnam\tテンポラリファイルの操作\n"
12806
12807 #. type: tbl table
12808 #: build/C/man3/stdio.3:236
12809 #, no-wrap
12810 msgid "tmpfile\ttemporary file routines\n"
12811 msgstr "tmpfile\tテンポラリファイルの操作\n"
12812
12813 #. type: tbl table
12814 #: build/C/man3/stdio.3:237
12815 #, no-wrap
12816 msgid "tmpnam\ttemporary file routines\n"
12817 msgstr "tmpnam\tテンポラリファイルの操作\n"
12818
12819 #. type: tbl table
12820 #: build/C/man3/stdio.3:238
12821 #, no-wrap
12822 msgid "ungetc\tun-get character from input stream\n"
12823 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12824
12825 #. type: tbl table
12826 #: build/C/man3/stdio.3:239
12827 #, no-wrap
12828 msgid "vfprintf\tformatted output conversion\n"
12829 msgstr "vfprintf\t書式付き出力変換\n"
12830
12831 #. type: tbl table
12832 #: build/C/man3/stdio.3:240
12833 #, no-wrap
12834 msgid "vfscanf\tinput format conversion\n"
12835 msgstr "vfscanf\t書式付き入力変換\n"
12836
12837 #. type: tbl table
12838 #: build/C/man3/stdio.3:241
12839 #, no-wrap
12840 msgid "vprintf\tformatted output conversion\n"
12841 msgstr "vprintf\t書式付き出力変換\n"
12842
12843 #. type: tbl table
12844 #: build/C/man3/stdio.3:242
12845 #, no-wrap
12846 msgid "vscanf\tinput format conversion\n"
12847 msgstr "vscanf\t書式付き入力変換\n"
12848
12849 #. type: tbl table
12850 #: build/C/man3/stdio.3:243
12851 #, no-wrap
12852 msgid "vsprintf\tformatted output conversion\n"
12853 msgstr "vsprintf\t書式付き出力変換\n"
12854
12855 #. type: tbl table
12856 #: build/C/man3/stdio.3:244
12857 #, no-wrap
12858 msgid "vsscanf\tinput format conversion\n"
12859 msgstr "vsscanf\t書式付き入力変換\n"
12860
12861 #. type: Plain text
12862 #: build/C/man3/stdio.3:250
12863 msgid "The I<stdio> library conforms to C89."
12864 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12865
12866 #. type: Plain text
12867 #: build/C/man3/stdio.3:257
12868 msgid ""
12869 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12870 "B<unlocked_stdio>(3)"
12871 msgstr ""
12872 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12873 "B<unlocked_stdio>(3)"
12874
12875 #. type: TH
12876 #: build/C/man3/stdio_ext.3:25
12877 #, no-wrap
12878 msgid "STDIO_EXT"
12879 msgstr "STDIO_EXT"
12880
12881 #. type: TH
12882 #: build/C/man3/stdio_ext.3:25
12883 #, no-wrap
12884 msgid "2001-12-16"
12885 msgstr "2001-12-16"
12886
12887 #. type: Plain text
12888 #: build/C/man3/stdio_ext.3:30
12889 msgid ""
12890 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12891 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12892 "structure"
12893 msgstr ""
12894 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12895 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12896 "へのインタフェース"
12897
12898 #. type: Plain text
12899 #: build/C/man3/stdio_ext.3:34
12900 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12901 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12902
12903 #. type: Plain text
12904 #: build/C/man3/stdio_ext.3:36
12905 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12906 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12907
12908 #. type: Plain text
12909 #: build/C/man3/stdio_ext.3:38
12910 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12911 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12912
12913 #. type: Plain text
12914 #: build/C/man3/stdio_ext.3:40
12915 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12916 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12917
12918 #. type: Plain text
12919 #: build/C/man3/stdio_ext.3:42
12920 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12921 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12922
12923 #. type: Plain text
12924 #: build/C/man3/stdio_ext.3:44
12925 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12926 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12927
12928 #. type: Plain text
12929 #: build/C/man3/stdio_ext.3:46
12930 msgid "B<int __freading(FILE *>I<stream>B<);>"
12931 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12932
12933 #. type: Plain text
12934 #: build/C/man3/stdio_ext.3:48
12935 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12936 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12937
12938 #. type: Plain text
12939 #: build/C/man3/stdio_ext.3:50
12940 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12941 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12942
12943 #. type: Plain text
12944 #: build/C/man3/stdio_ext.3:52
12945 msgid "B<void _flushlbf(void);>"
12946 msgstr "B<void _flushlbf(void);>"
12947
12948 #. type: Plain text
12949 #: build/C/man3/stdio_ext.3:54
12950 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12951 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12952
12953 #. type: Plain text
12954 #: build/C/man3/stdio_ext.3:59
12955 msgid ""
12956 "Solaris introduced routines to allow portable access to the internals of the "
12957 "I<FILE> structure, and glibc also implemented these."
12958 msgstr ""
12959 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
12960 "が導入されており、これらは glibc でも実装されている。"
12961
12962 #. type: Plain text
12963 #: build/C/man3/stdio_ext.3:64
12964 msgid ""
12965 "The B<__fbufsize>()  function returns the size of the buffer currently used "
12966 "by the given stream."
12967 msgstr ""
12968 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
12969 "す。"
12970
12971 #. type: Plain text
12972 #: build/C/man3/stdio_ext.3:71
12973 msgid ""
12974 "The B<__fpending>()  function returns the number of bytes in the output "
12975 "buffer.  For wide-oriented streams the unit is wide characters.  This "
12976 "function is undefined on buffers in reading mode, or opened read-only."
12977 msgstr ""
12978 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
12979 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
12980 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
12981 "は未定義である。"
12982
12983 #. type: Plain text
12984 #: build/C/man3/stdio_ext.3:76
12985 msgid ""
12986 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
12987 "buffered, and zero otherwise."
12988 msgstr ""
12989 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
12990 "場合は 0 を返す。"
12991
12992 #. type: Plain text
12993 #: build/C/man3/stdio_ext.3:81
12994 msgid ""
12995 "The B<__freadable>()  function returns a nonzero value if the stream allows "
12996 "reading, and zero otherwise."
12997 msgstr ""
12998 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
12999 "外の場合は 0 を返す。"
13000
13001 #. type: Plain text
13002 #: build/C/man3/stdio_ext.3:86
13003 msgid ""
13004 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
13005 "writing, and zero otherwise."
13006 msgstr ""
13007 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
13008 "外の場合は 0 を返す。"
13009
13010 #. type: Plain text
13011 #: build/C/man3/stdio_ext.3:92
13012 msgid ""
13013 "The B<__freading>()  function returns a nonzero value if the stream is read-"
13014 "only, or if the last operation on the stream was a read operation, and zero "
13015 "otherwise."
13016 msgstr ""
13017 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
13018 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
13019 "を返す。"
13020
13021 #. type: Plain text
13022 #: build/C/man3/stdio_ext.3:98
13023 msgid ""
13024 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
13025 "only (or append-only), or if the last operation on the stream was a write "
13026 "operation, and zero otherwise."
13027 msgstr ""
13028 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
13029 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
13030 "し、 それ以外の場合は 0 を返す。"
13031
13032 #. type: Plain text
13033 #: build/C/man3/stdio_ext.3:106
13034 msgid ""
13035 "The B<__fsetlocking>()  function can be used to select the desired type of "
13036 "locking on the stream.  It returns the current type.  The I<type> argument "
13037 "can take the following three values:"
13038 msgstr ""
13039 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
13040 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
13041 "ることができる :"
13042
13043 #. type: TP
13044 #: build/C/man3/stdio_ext.3:106
13045 #, no-wrap
13046 msgid "B<FSETLOCKING_INTERNAL>"
13047 msgstr "B<FSETLOCKING_INTERNAL>"
13048
13049 #. type: Plain text
13050 #: build/C/man3/stdio_ext.3:111
13051 msgid ""
13052 "Perform implicit locking around every operation on the given stream (except "
13053 "for the *_unlocked ones).  This is the default."
13054 msgstr ""
13055 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
13056 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
13057 "である)。 これがデフォルトのロック形式である。"
13058
13059 #. type: TP
13060 #: build/C/man3/stdio_ext.3:111
13061 #, no-wrap
13062 msgid "B<FSETLOCKING_BYCALLER>"
13063 msgstr "B<FSETLOCKING_BYCALLER>"
13064
13065 #. type: Plain text
13066 #: build/C/man3/stdio_ext.3:118
13067 msgid ""
13068 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
13069 "case there is more than one thread), and the stdio routines will not do "
13070 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
13071 msgstr ""
13072 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
13073 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
13074 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
13075 "理を行わない。"
13076
13077 #. type: TP
13078 #: build/C/man3/stdio_ext.3:118
13079 #, no-wrap
13080 msgid "B<FSETLOCKING_QUERY>"
13081 msgstr "B<FSETLOCKING_QUERY>"
13082
13083 #. type: Plain text
13084 #: build/C/man3/stdio_ext.3:122
13085 msgid "Don't change the type of locking.  (Only return it.)"
13086 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
13087
13088 #. type: Plain text
13089 #: build/C/man3/stdio_ext.3:128
13090 msgid ""
13091 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
13092 "so that output to a terminal is forced out, say before reading keyboard "
13093 "input.)"
13094 msgstr ""
13095 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
13096 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
13097 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
13098 "いだろう)"
13099
13100 #. type: Plain text
13101 #: build/C/man3/stdio_ext.3:132
13102 msgid ""
13103 "The B<__fpurge>()  function discards the contents of the stream's buffer."
13104 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
13105
13106 #. type: Plain text
13107 #: build/C/man3/stdio_ext.3:135
13108 msgid "B<flockfile>(3), B<fpurge>(3)"
13109 msgstr "B<flockfile>(3), B<fpurge>(3)"
13110
13111 #. type: TH
13112 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
13113 #, no-wrap
13114 msgid "SYMLINK"
13115 msgstr "SYMLINK"
13116
13117 #. type: Plain text
13118 #: build/C/man2/symlink.2:35
13119 msgid "symlink - make a new name for a file"
13120 msgstr "symlink - ファイルに新しい名前を付ける"
13121
13122 #. type: Plain text
13123 #: build/C/man2/symlink.2:39
13124 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13125 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13126
13127 #. type: Plain text
13128 #: build/C/man2/symlink.2:47
13129 msgid "B<symlink>():"
13130 msgstr "B<symlink>():"
13131
13132 #. type: Plain text
13133 #: build/C/man2/symlink.2:58
13134 msgid ""
13135 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
13136 "string I<oldpath>."
13137 msgstr ""
13138 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
13139 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
13140
13141 #. type: Plain text
13142 #: build/C/man2/symlink.2:62
13143 msgid ""
13144 "Symbolic links are interpreted at run time as if the contents of the link "
13145 "had been substituted into the path being followed to find a file or "
13146 "directory."
13147 msgstr ""
13148 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
13149 "スを辿ることで、 ファイルやディレクトリに到達する。"
13150
13151 #. type: Plain text
13152 #: build/C/man2/symlink.2:67
13153 msgid ""
13154 "Symbolic links may contain I<..> path components, which (if used at the "
13155 "start of the link) refer to the parent directories of that in which the link "
13156 "resides."
13157 msgstr ""
13158 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
13159 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
13160 "される。"
13161
13162 #. type: Plain text
13163 #: build/C/man2/symlink.2:71
13164 msgid ""
13165 "A symbolic link (also known as a soft link) may point to an existing file or "
13166 "to a nonexistent one; the latter case is known as a dangling link."
13167 msgstr ""
13168 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
13169 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
13170 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
13171
13172 #. type: Plain text
13173 #: build/C/man2/symlink.2:78
13174 msgid ""
13175 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
13176 "when following the link, but is checked when removal or renaming of the link "
13177 "is requested and the link is in a directory with the sticky bit "
13178 "(B<S_ISVTX>)  set."
13179 msgstr ""
13180 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
13181 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
13182 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
13183 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
13184
13185 #. type: Plain text
13186 #: build/C/man2/symlink.2:99
13187 msgid ""
13188 "Write access to the directory containing I<newpath> is denied, or one of the "
13189 "directories in the path prefix of I<newpath> did not allow search "
13190 "permission.  (See also B<path_resolution>(7).)"
13191 msgstr ""
13192 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
13193 "含まれているディレクトリのどれかに検索許可が与えられていない "
13194 "(B<path_resolution>(7)  も参照すること)。"
13195
13196 #. type: Plain text
13197 #: build/C/man2/symlink.2:104
13198 msgid ""
13199 "The user's quota of resources on the file system has been exhausted.  The "
13200 "resources could be inodes or disk blocks, depending on the file system "
13201 "implementation."
13202 msgstr ""
13203
13204 #. type: Plain text
13205 #: build/C/man2/symlink.2:118
13206 msgid "Too many symbolic links were encountered in resolving I<newpath>."
13207 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13208
13209 #. type: Plain text
13210 #: build/C/man2/symlink.2:128
13211 msgid ""
13212 "A directory component in I<newpath> does not exist or is a dangling symbolic "
13213 "link, or I<oldpath> is the empty string."
13214 msgstr ""
13215 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
13216 "I<oldpath> が空文字列である。"
13217
13218 #. type: Plain text
13219 #: build/C/man2/symlink.2:140
13220 msgid ""
13221 "A component used as a directory in I<newpath> is not, in fact, a directory."
13222 msgstr ""
13223 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
13224
13225 #. type: Plain text
13226 #: build/C/man2/symlink.2:145
13227 msgid ""
13228 "The file system containing I<newpath> does not support the creation of "
13229 "symbolic links."
13230 msgstr ""
13231 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
13232 "作成をサポートしていない。"
13233
13234 #. type: Plain text
13235 #: build/C/man2/symlink.2:149
13236 msgid "I<newpath> is on a read-only file system."
13237 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
13238
13239 #. type: Plain text
13240 #: build/C/man2/symlink.2:159
13241 msgid "No checking of I<oldpath> is done."
13242 msgstr "I<oldpath> についてのチェックは行なわれない。"
13243
13244 #. type: Plain text
13245 #: build/C/man2/symlink.2:164
13246 msgid ""
13247 "Deleting the name referred to by a symlink will actually delete the file "
13248 "(unless it also has other hard links).  If this behavior is not desired, use "
13249 "B<link>(2)."
13250 msgstr ""
13251 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
13252 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
13253 "場合は、 B<link>(2)  を使用すること。"
13254
13255 #. type: Plain text
13256 #: build/C/man2/symlink.2:176
13257 msgid ""
13258 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13259 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13260 "B<symlink>(7)"
13261 msgstr ""
13262 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13263 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13264 "B<symlink>(7)"
13265
13266 #. type: TH
13267 #: build/C/man7/symlink.7:36
13268 #, no-wrap
13269 msgid "2008-06-18"
13270 msgstr "2008-06-18"
13271
13272 #. type: Plain text
13273 #: build/C/man7/symlink.7:39
13274 msgid "symlink - symbolic link handling"
13275 msgstr ""
13276
13277 #. type: SH
13278 #: build/C/man7/symlink.7:39
13279 #, no-wrap
13280 msgid "SYMBOLIC LINK HANDLING"
13281 msgstr ""
13282
13283 #. type: Plain text
13284 #: build/C/man7/symlink.7:43
13285 msgid ""
13286 "Symbolic links are files that act as pointers to other files.  To understand "
13287 "their behavior, you must first understand how hard links work."
13288 msgstr ""
13289
13290 #. type: Plain text
13291 #: build/C/man7/symlink.7:59
13292 msgid ""
13293 "A hard link to a file is indistinguishable from the original file because it "
13294 "is a reference to the object underlying the original filename.  (To be "
13295 "precise: each of the hard links to a file is a reference to the same I<i-"
13296 "node number>, where an i-node number is an index into the i-node table, "
13297 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
13298 "Changes to a file are independent of the name used to reference the file.  "
13299 "Hard links may not refer to directories (to prevent the possibility of loops "
13300 "within the file system tree, which would confuse many programs)  and may not "
13301 "refer to files on different file systems (because i-node numbers are not "
13302 "unique across file systems)."
13303 msgstr ""
13304
13305 #. type: Plain text
13306 #: build/C/man7/symlink.7:66
13307 msgid ""
13308 "A symbolic link is a special type of file whose contents are a string that "
13309 "is the pathname another file, the file to which the link refers.  In other "
13310 "words, a symbolic link is a pointer to another name, and not to an "
13311 "underlying object.  For this reason, symbolic links may refer to directories "
13312 "and may cross file system boundaries."
13313 msgstr ""
13314
13315 #. type: Plain text
13316 #: build/C/man7/symlink.7:72
13317 msgid ""
13318 "There is no requirement that the pathname referred to by a symbolic link "
13319 "should exist.  A symbolic link that refers to a pathname that does not exist "
13320 "is said to be a I<dangling link>."
13321 msgstr ""
13322
13323 #. type: Plain text
13324 #: build/C/man7/symlink.7:84
13325 msgid ""
13326 "Because a symbolic link and its referenced object coexist in the file system "
13327 "name space, confusion can arise in distinguishing between the link itself "
13328 "and the referenced object.  On historical systems, commands and system calls "
13329 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
13330 "Rules for a more uniform approach, as they are implemented on Linux and "
13331 "other systems, are outlined here.  It is important that site-local "
13332 "applications also conform to these rules, so that the user interface can be "
13333 "as consistent as possible."
13334 msgstr ""
13335
13336 #. type: SS
13337 #: build/C/man7/symlink.7:84
13338 #, no-wrap
13339 msgid "Symbolic link ownership, permissions, and timestamps"
13340 msgstr ""
13341
13342 #. type: Plain text
13343 #: build/C/man7/symlink.7:92
13344 msgid ""
13345 "The owner and group of an existing symbolic link can be changed using "
13346 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
13347 "is when the link is being removed or renamed in a directory that has the "
13348 "sticky bit set (see B<stat>(2))."
13349 msgstr ""
13350
13351 #. type: Plain text
13352 #: build/C/man7/symlink.7:98
13353 msgid ""
13354 "The last access and last modification timestamps of a symbolic link can be "
13355 "changed using B<utimensat>(2)  or B<lutimes>(3)."
13356 msgstr ""
13357
13358 #.  Linux does not currently implement an lchmod(2).
13359 #.  The
13360 #.  4.4BSD
13361 #.  system differs from historical
13362 #.  4BSD
13363 #.  systems in that the system call
13364 #.  .BR chown (2)
13365 #.  has been changed to follow symbolic links.
13366 #.  The
13367 #.  .BR lchown (2)
13368 #.  system call was added later when the limitations of the new
13369 #.  .BR chown (2)
13370 #.  became apparent.
13371 #. type: Plain text
13372 #: build/C/man7/symlink.7:117
13373 msgid ""
13374 "On Linux, the permissions of a symbolic link are not used in any operations; "
13375 "the permissions are always 0777 (read, write, and execute for all user "
13376 "categories), and can't be changed."
13377 msgstr ""
13378
13379 #. type: SS
13380 #: build/C/man7/symlink.7:117
13381 #, no-wrap
13382 msgid "Handling of symbolic links by system calls and commands"
13383 msgstr ""
13384
13385 #. type: Plain text
13386 #: build/C/man7/symlink.7:132
13387 msgid ""
13388 "Symbolic links are handled either by operating on the link itself, or by "
13389 "operating on the object referred to by the link.  In the latter case, an "
13390 "application or system call is said to I<follow> the link.  Symbolic links "
13391 "may refer to other symbolic links, in which case the links are dereferenced "
13392 "until an object that is not a symbolic link is found, a symbolic link that "
13393 "refers to a file which does not exist is found, or a loop is detected.  "
13394 "(Loop detection is done by placing an upper limit on the number of links "
13395 "that may be followed, and an error results if this limit is exceeded.)"
13396 msgstr ""
13397
13398 #. type: Plain text
13399 #: build/C/man7/symlink.7:135
13400 msgid ""
13401 "There are three separate areas that need to be discussed.  They are as "
13402 "follows:"
13403 msgstr ""
13404
13405 #. type: IP
13406 #: build/C/man7/symlink.7:135
13407 #, no-wrap
13408 msgid "1."
13409 msgstr "1."
13410
13411 #. type: Plain text
13412 #: build/C/man7/symlink.7:137
13413 msgid "Symbolic links used as filename arguments for system calls."
13414 msgstr ""
13415
13416 #. type: IP
13417 #: build/C/man7/symlink.7:137
13418 #, no-wrap
13419 msgid "2."
13420 msgstr "2."
13421
13422 #. type: Plain text
13423 #: build/C/man7/symlink.7:140
13424 msgid ""
13425 "Symbolic links specified as command-line arguments to utilities that are not "
13426 "traversing a file tree."
13427 msgstr ""
13428
13429 #. type: IP
13430 #: build/C/man7/symlink.7:140
13431 #, no-wrap
13432 msgid "3."
13433 msgstr "3."
13434
13435 #. type: Plain text
13436 #: build/C/man7/symlink.7:144
13437 msgid ""
13438 "Symbolic links encountered by utilities that are traversing a file tree "
13439 "(either specified on the command line or encountered as part of the file "
13440 "hierarchy walk)."
13441 msgstr ""
13442
13443 #. type: SS
13444 #: build/C/man7/symlink.7:144
13445 #, no-wrap
13446 msgid "System calls"
13447 msgstr ""
13448
13449 #. type: Plain text
13450 #: build/C/man7/symlink.7:147
13451 msgid ""
13452 "The first area is symbolic links used as filename arguments for system calls."
13453 msgstr ""
13454
13455 #. type: Plain text
13456 #: build/C/man7/symlink.7:157
13457 msgid ""
13458 "Except as noted below, all system calls follow symbolic links.  For example, "
13459 "if there were a symbolic link I<slink> which pointed to a file named "
13460 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13461 "descriptor referring to the file I<afile>."
13462 msgstr ""
13463
13464 #.  Maybe one day: .BR fchownat (2)
13465 #. type: Plain text
13466 #: build/C/man7/symlink.7:207
13467 msgid ""
13468 "Various system calls do not follow links, and operate on the symbolic link "
13469 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13470 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13471 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13472 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13473 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13474 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13475 "(2), that library function also does not follow symbolic links.  When "
13476 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13477 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13478 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13479 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13480 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13481 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13482 "to allow either behavior in an implementation."
13483 msgstr ""
13484
13485 #. type: SS
13486 #: build/C/man7/symlink.7:207
13487 #, no-wrap
13488 msgid "Commands not traversing a file tree"
13489 msgstr ""
13490
13491 #. type: Plain text
13492 #: build/C/man7/symlink.7:210
13493 msgid ""
13494 "The second area is symbolic links, specified as command-line filename "
13495 "arguments, to commands which are not traversing a file tree."
13496 msgstr ""
13497
13498 #. type: Plain text
13499 #: build/C/man7/symlink.7:221
13500 msgid ""
13501 "Except as noted below, commands follow symbolic links named as command-line "
13502 "arguments.  For example, if there were a symbolic link I<slink> which "
13503 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13504 "contents of the file I<afile>."
13505 msgstr ""
13506
13507 #. type: Plain text
13508 #: build/C/man7/symlink.7:229
13509 msgid ""
13510 "It is important to realize that this rule includes commands which may "
13511 "optionally traverse file trees, e.g., the command I<chown file> is included "
13512 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13513 "traversal, is not.  (The latter is described in the third area, below.)"
13514 msgstr ""
13515
13516 #. type: Plain text
13517 #: build/C/man7/symlink.7:247
13518 msgid ""
13519 "If it is explicitly intended that the command operate on the symbolic link "
13520 "instead of following the symbolic link, e.g., it is desired that I<chown "
13521 "slink> change the ownership of the file that I<slink> is, whether it is a "
13522 "symbolic link or not, the I<-h> option should be used.  In the above "
13523 "example, I<chown root slink> would change the ownership of the file referred "
13524 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13525 "I<slink> itself."
13526 msgstr ""
13527
13528 #. type: Plain text
13529 #: build/C/man7/symlink.7:249
13530 msgid "There are some exceptions to this rule:"
13531 msgstr ""
13532
13533 #. type: Plain text
13534 #: build/C/man7/symlink.7:259
13535 msgid ""
13536 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13537 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13538 "the symbolic link references a file via a relative path, moving it to "
13539 "another directory may very well cause it to stop working, since the path may "
13540 "no longer be correct.)"
13541 msgstr ""
13542
13543 #. type: Plain text
13544 #: build/C/man7/symlink.7:289
13545 msgid ""
13546 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13547 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13548 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13549 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13550 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13551 "the only command where the I<-H> and I<-L> options affect its behavior even "
13552 "though it is not doing a walk of a file tree.)"
13553 msgstr ""
13554
13555 #. The 4.4BSD system differs from historical 4BSD systems in that the
13556 #. .BR chown (1)
13557 #. and
13558 #. .BR chgrp (1)
13559 #. commands follow symbolic links specified on the command line.
13560 #. type: Plain text
13561 #: build/C/man7/symlink.7:307
13562 msgid ""
13563 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13564 "command does not follow symbolic links named as argument by default.  The "
13565 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13566 "L> option is specified."
13567 msgstr ""
13568
13569 #. type: SS
13570 #: build/C/man7/symlink.7:307
13571 #, no-wrap
13572 msgid "Commands traversing a file tree"
13573 msgstr ""
13574
13575 #. type: Plain text
13576 #: build/C/man7/symlink.7:320
13577 msgid ""
13578 "The following commands either optionally or always traverse file trees: "
13579 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13580 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13581 msgstr ""
13582
13583 #. type: Plain text
13584 #: build/C/man7/symlink.7:324
13585 msgid ""
13586 "It is important to realize that the following rules apply equally to "
13587 "symbolic links encountered during the file tree traversal and symbolic links "
13588 "listed as command-line arguments."
13589 msgstr ""
13590
13591 #. type: Plain text
13592 #: build/C/man7/symlink.7:329
13593 msgid ""
13594 "The I<first rule> applies to symbolic links that reference files other than "
13595 "directories.  Operations that apply to symbolic links are performed on the "
13596 "links themselves, but otherwise the links are ignored."
13597 msgstr ""
13598
13599 #. type: Plain text
13600 #: build/C/man7/symlink.7:341
13601 msgid ""
13602 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13603 "symbolic links encountered in the tree traversal of I<directory>, because "
13604 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13605 "referred to by I<slink>."
13606 msgstr ""
13607
13608 #. type: Plain text
13609 #: build/C/man7/symlink.7:346
13610 msgid ""
13611 "The I<second rule> applies to symbolic links that refer to directories.  "
13612 "Symbolic links that refer to directories are never followed by default.  "
13613 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13614 "\" walk (where symbolic links the refer to directories are followed)."
13615 msgstr ""
13616
13617 #. type: Plain text
13618 #: build/C/man7/symlink.7:349
13619 msgid ""
13620 "Certain conventions are (should be) followed as consistently as possible by "
13621 "commands that perform file tree walks:"
13622 msgstr ""
13623
13624 #. type: Plain text
13625 #: build/C/man7/symlink.7:362
13626 msgid ""
13627 "A command can be made to follow any symbolic links named on the command "
13628 "line, regardless of the type of file they reference, by specifying the I<-H> "
13629 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13630 "name space look like the logical name space.  (Note, for commands that do "
13631 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13632 "R> flag is not also specified.)"
13633 msgstr ""
13634
13635 #. type: Plain text
13636 #: build/C/man7/symlink.7:378
13637 msgid ""
13638 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13639 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13640 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13641 "symbolic links specified on the command line to be dereferenced for the "
13642 "purposes of both the action to be performed and the tree walk, and it is as "
13643 "if the user had specified the name of the file to which the symbolic link "
13644 "pointed."
13645 msgstr ""
13646
13647 #. type: Plain text
13648 #: build/C/man7/symlink.7:392
13649 msgid ""
13650 "A command can be made to follow any symbolic links named on the command "
13651 "line, as well as any symbolic links encountered during the traversal, "
13652 "regardless of the type of file they reference, by specifying the I<-L> (for "
13653 "\"logical\") flag.  This flag is intended to make the entire name space look "
13654 "like the logical name space.  (Note, for commands that do not always do file "
13655 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13656 "also specified.)"
13657 msgstr ""
13658
13659 #. type: Plain text
13660 #: build/C/man7/symlink.7:407
13661 msgid ""
13662 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13663 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13664 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13665 "references.  In addition, if any symbolic links are encountered in any file "
13666 "tree that B<chown> traverses, they will be treated in the same fashion as "
13667 "I<slink>."
13668 msgstr ""
13669
13670 #. type: Plain text
13671 #: build/C/man7/symlink.7:414
13672 msgid ""
13673 "A command can be made to provide the default behavior by specifying the I<-"
13674 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13675 "space look like the physical name space."
13676 msgstr ""
13677
13678 #. type: Plain text
13679 #: build/C/man7/symlink.7:432
13680 msgid ""
13681 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13682 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13683 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13684 "once; the last one specified determines the command's behavior.  This is "
13685 "intended to permit you to alias commands to behave one way or the other, and "
13686 "then override that behavior on the command line."
13687 msgstr ""
13688
13689 #. type: Plain text
13690 #: build/C/man7/symlink.7:438
13691 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13692 msgstr ""
13693
13694 #. type: Plain text
13695 #: build/C/man7/symlink.7:451
13696 msgid ""
13697 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13698 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13699 "command does not support the I<-H>, I<-L>, or I<-P> options."
13700 msgstr ""
13701
13702 #. type: Plain text
13703 #: build/C/man7/symlink.7:471
13704 msgid ""
13705 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13706 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13707 "options, B<ls>(1)  will follow symbolic links specified on the command "
13708 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13709 "regardless of their type, whether specified on the command line or "
13710 "encountered in the tree walk."
13711 msgstr ""
13712
13713 #. type: Plain text
13714 #: build/C/man7/symlink.7:489
13715 msgid ""
13716 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13717 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13718 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13719 "B<path_resolution>(7)"
13720 msgstr ""
13721 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13722 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13723 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13724 "B<lutimes>(3), B<path_resolution>(7)"
13725
13726 #. type: TH
13727 #: build/C/man3/tempnam.3:25
13728 #, no-wrap
13729 msgid "TEMPNAM"
13730 msgstr "TEMPNAM"
13731
13732 #. type: TH
13733 #: build/C/man3/tempnam.3:25
13734 #, no-wrap
13735 msgid "2008-08-06"
13736 msgstr "2008-08-06"
13737
13738 #. type: Plain text
13739 #: build/C/man3/tempnam.3:28
13740 msgid "tempnam - create a name for a temporary file"
13741 msgstr "tempnam - テンポラリファイルの名前を作成する"
13742
13743 #. type: Plain text
13744 #: build/C/man3/tempnam.3:33
13745 #, no-wrap
13746 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13747 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13748
13749 #. type: Plain text
13750 #: build/C/man3/tempnam.3:42
13751 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13752 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13753
13754 #. type: Plain text
13755 #: build/C/man3/tempnam.3:56
13756 msgid ""
13757 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13758 "filename, and such that a file with this name did not exist when B<tempnam>"
13759 "()  checked.  The filename suffix of the pathname generated will start with "
13760 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13761 "directory prefix part of the pathname generated is required to be "
13762 "\"appropriate\" (often that at least implies writable)."
13763 msgstr ""
13764 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13765 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13766 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13767 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13768 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13769 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13770
13771 #. type: Plain text
13772 #: build/C/man3/tempnam.3:59
13773 msgid ""
13774 "Attempts to find an appropriate directory go through the following steps:"
13775 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13776
13777 #. type: TP
13778 #: build/C/man3/tempnam.3:59
13779 #, no-wrap
13780 msgid "a)"
13781 msgstr "a)"
13782
13783 #. type: Plain text
13784 #: build/C/man3/tempnam.3:65
13785 msgid ""
13786 "In case the environment variable B<TMPDIR> exists and contains the name of "
13787 "an appropriate directory, that is used."
13788 msgstr ""
13789 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13790 "ら、それを用いる。"
13791
13792 #. type: TP
13793 #: build/C/man3/tempnam.3:65
13794 #, no-wrap
13795 msgid "b)"
13796 msgstr "b)"
13797
13798 #. type: Plain text
13799 #: build/C/man3/tempnam.3:70
13800 msgid ""
13801 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13802 msgstr ""
13803 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13804 "る。"
13805
13806 #. type: TP
13807 #: build/C/man3/tempnam.3:70
13808 #, no-wrap
13809 msgid "c)"
13810 msgstr "c)"
13811
13812 #. type: Plain text
13813 #: build/C/man3/tempnam.3:77
13814 msgid ""
13815 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13816 "appropriate."
13817 msgstr ""
13818 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13819 "なら、それを用いる。"
13820
13821 #. type: TP
13822 #: build/C/man3/tempnam.3:77
13823 #, no-wrap
13824 msgid "d)"
13825 msgstr "d)"
13826
13827 #. type: Plain text
13828 #: build/C/man3/tempnam.3:80
13829 msgid "Finally an implementation-defined directory may be used."
13830 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13831
13832 #. type: Plain text
13833 #: build/C/man3/tempnam.3:87
13834 msgid ""
13835 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13836 "hence should be freed by B<free>(3)."
13837 msgstr ""
13838 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13839 "B<free>(3)  で解放すべきである。"
13840
13841 #. type: Plain text
13842 #: build/C/man3/tempnam.3:92
13843 msgid ""
13844 "The B<tempnam>()  function returns a pointer to a unique temporary filename, "
13845 "or NULL if a unique name cannot be generated."
13846 msgstr ""
13847 "B<tempnam>()  関数は他と重ならないテンポラリファイル名へのポインタを返す。 他"
13848 "と重ならない名前が生成できなければ NULL を返す。"
13849
13850 #. type: Plain text
13851 #: build/C/man3/tempnam.3:96
13852 msgid "Allocation of storage failed."
13853 msgstr "保存領域の割り当てに失敗した。"
13854
13855 #. type: Plain text
13856 #: build/C/man3/tempnam.3:101
13857 msgid ""
13858 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13859 msgstr ""
13860 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13861 "る。"
13862
13863 #. type: Plain text
13864 #: build/C/man3/tempnam.3:120
13865 msgid ""
13866 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13867 "nevertheless possible that between the time that B<tempnam>()  returns a "
13868 "pathname, and the time that the program opens it, another program might "
13869 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13870 "This can lead to security holes.  To avoid such possibilities, use the "
13871 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13872 "B<mkstemp>(3)  or B<tmpfile>(3)."
13873 msgstr ""
13874 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13875 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13876 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13877 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13878 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13879 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13880 "B<tmpfile>(3)  を使うことである。"
13881
13882 #. type: Plain text
13883 #: build/C/man3/tempnam.3:128
13884 msgid ""
13885 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13886 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13887 "tmp> (and this is what glibc does)."
13888 msgstr ""
13889 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13890 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13891 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13892
13893 #. type: Plain text
13894 #: build/C/man3/tempnam.3:133
13895 msgid ""
13896 "Because it dynamically allocates memory used to return the pathname, "
13897 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13898 msgstr ""
13899 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13900 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13901
13902 #. type: Plain text
13903 #: build/C/man3/tempnam.3:146
13904 msgid ""
13905 "The B<tempnam>()  function generates a different string each time it is "
13906 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13907 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13908 msgstr ""
13909 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13910 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13911 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13912
13913 #. type: Plain text
13914 #: build/C/man3/tempnam.3:150
13915 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13916 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13917
13918 #. type: Plain text
13919 #: build/C/man3/tempnam.3:156
13920 msgid ""
13921 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13922 "upon failure to find a unique name."
13923 msgstr ""
13924 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13925 "ラー B<EEXIST> で失敗する。"
13926
13927 #. type: Plain text
13928 #: build/C/man3/tempnam.3:159
13929 msgid ""
13930 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13931 "accessibility of a directory is determined."
13932 msgstr ""
13933 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13934 "度のアクセス権限が必要なのかは指定されていない。"
13935
13936 #. type: Plain text
13937 #: build/C/man3/tempnam.3:166 build/C/man3/tmpnam.3:153
13938 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
13939 msgstr ""
13940 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
13941 "を使うこと。"
13942
13943 #. type: Plain text
13944 #: build/C/man3/tempnam.3:171
13945 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13946 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13947
13948 #. type: TH
13949 #: build/C/man3/tmpfile.3:31
13950 #, no-wrap
13951 msgid "TMPFILE"
13952 msgstr "TMPFILE"
13953
13954 #. type: Plain text
13955 #: build/C/man3/tmpfile.3:34
13956 msgid "tmpfile - create a temporary file"
13957 msgstr "tmpfile - テンポラリファイルを作成する"
13958
13959 #. type: Plain text
13960 #: build/C/man3/tmpfile.3:39
13961 #, no-wrap
13962 msgid "B<FILE *tmpfile(void);>\n"
13963 msgstr "B<FILE *tmpfile(void);>\n"
13964
13965 #. type: Plain text
13966 #: build/C/man3/tmpfile.3:47
13967 msgid ""
13968 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
13969 "write (w+b) mode.  The file will be automatically deleted when it is closed "
13970 "or the program terminates."
13971 msgstr ""
13972 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
13973 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
13974 "自動的に削除される。"
13975
13976 #. type: Plain text
13977 #: build/C/man3/tmpfile.3:54
13978 msgid ""
13979 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
13980 "filename cannot be generated or the unique file cannot be opened.  In the "
13981 "latter case, I<errno> is set to indicate the error."
13982 msgstr ""
13983 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
13984 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
13985 "I<errno> を設定する。"
13986
13987 #. type: Plain text
13988 #: build/C/man3/tmpfile.3:58
13989 msgid "Search permission denied for directory in file's path prefix."
13990 msgstr ""
13991 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
13992
13993 #. type: Plain text
13994 #: build/C/man3/tmpfile.3:61
13995 msgid "Unable to generate a unique filename."
13996 msgstr "ユニークなファイル名が作成できなかった。"
13997
13998 #. type: Plain text
13999 #: build/C/man3/tmpfile.3:64
14000 msgid "The call was interrupted by a signal."
14001 msgstr "呼び出しがシグナルによって中断された。"
14002
14003 #. type: Plain text
14004 #: build/C/man3/tmpfile.3:67
14005 msgid "Too many file descriptors in use by the process."
14006 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
14007
14008 #. type: Plain text
14009 #: build/C/man3/tmpfile.3:70
14010 msgid "Too many files open in the system."
14011 msgstr "システム全体でオープン可能なファイル数を超過した。"
14012
14013 #. type: Plain text
14014 #: build/C/man3/tmpfile.3:73
14015 msgid "There was no room in the directory to add the new filename."
14016 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
14017
14018 #. type: Plain text
14019 #: build/C/man3/tmpfile.3:76
14020 msgid "Read-only file system."
14021 msgstr "読みだし専用ファイルシステムである。"
14022
14023 #. type: Plain text
14024 #: build/C/man3/tmpfile.3:78
14025 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14026 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14027
14028 #. type: Plain text
14029 #: build/C/man3/tmpfile.3:82
14030 msgid ""
14031 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
14032 "stream cannot be opened."
14033 msgstr ""
14034 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
14035 "メッセージが書き出される、と規定されている。"
14036
14037 #. type: Plain text
14038 #: build/C/man3/tmpfile.3:88
14039 msgid ""
14040 "The standard does not specify the directory that B<tmpfile>()  will use.  "
14041 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
14042 "and if that fails the directory I</tmp>."
14043 msgstr ""
14044 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
14045 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
14046 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
14047
14048 #. type: Plain text
14049 #: build/C/man3/tmpfile.3:94
14050 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14051 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14052
14053 #. type: TH
14054 #: build/C/man3/tmpnam.3:27
14055 #, no-wrap
14056 msgid "TMPNAM"
14057 msgstr "TMPNAM"
14058
14059 #. type: TH
14060 #: build/C/man3/tmpnam.3:27
14061 #, no-wrap
14062 msgid "2010-09-10"
14063 msgstr "2010-09-10"
14064
14065 #. type: Plain text
14066 #: build/C/man3/tmpnam.3:30
14067 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
14068 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
14069
14070 #. type: Plain text
14071 #: build/C/man3/tmpnam.3:35
14072 #, no-wrap
14073 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
14074 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
14075
14076 #. type: Plain text
14077 #: build/C/man3/tmpnam.3:58
14078 msgid ""
14079 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
14080 "filename, and such that a file with this name did not exist at some point in "
14081 "time, so that naive programmers may think it a suitable name for a temporary "
14082 "file.  If the argument I<s> is NULL this name is generated in an internal "
14083 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
14084 "I<s> is not NULL, the name is copied to the character array (of length at "
14085 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
14086 "case of success."
14087 msgstr ""
14088 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
14089 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
14090 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
14091 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
14092 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
14093 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
14094 "ピーされ、 成功した場合は I<s> が返される。"
14095
14096 #. type: Plain text
14097 #: build/C/man3/tmpnam.3:70
14098 msgid ""
14099 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
14100 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
14101 "the B<TMP_MAX> mentioned below.)"
14102 msgstr ""
14103 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
14104 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
14105 "hE<gt>> で定義されている。)"
14106
14107 #. type: Plain text
14108 #: build/C/man3/tmpnam.3:75
14109 msgid ""
14110 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
14111 "or NULL if a unique name cannot be generated."
14112 msgstr ""
14113 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
14114 "が作成できなかった場合は NULL を返す。"
14115
14116 #. type: Plain text
14117 #: build/C/man3/tmpnam.3:77
14118 msgid "No errors are defined."
14119 msgstr "エラーは定義されていない。"
14120
14121 #. type: Plain text
14122 #: build/C/man3/tmpnam.3:82
14123 msgid ""
14124 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
14125 "obsolete."
14126 msgstr ""
14127 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
14128 "定としている。"
14129
14130 #. type: Plain text
14131 #: build/C/man3/tmpnam.3:93
14132 msgid ""
14133 "The B<tmpnam>()  function generates a different string each time it is "
14134 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
14135 "the behavior is implementation defined."
14136 msgstr ""
14137 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
14138 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
14139
14140 #. type: Plain text
14141 #: build/C/man3/tmpnam.3:112
14142 msgid ""
14143 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
14144 "nevertheless possible that between the time that B<tmpnam>()  returns a "
14145 "pathname, and the time that the program opens it, another program might "
14146 "create that pathname using B<open>(2), or create it as a symbolic link.  "
14147 "This can lead to security holes.  To avoid such possibilities, use the "
14148 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
14149 "B<mkstemp>(3)  or B<tmpfile>(3)."
14150 msgstr ""
14151 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
14152 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
14153 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
14154 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
14155 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
14156 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
14157 "B<tmpfile>(3)  を使うことである。"
14158
14159 #. type: Plain text
14160 #: build/C/man3/tmpnam.3:120
14161 msgid ""
14162 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
14163 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
14164 "defined."
14165 msgstr ""
14166 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
14167 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
14168 "NULL 引き数で呼び出してはならない。"
14169
14170 #. type: Plain text
14171 #: build/C/man3/tmpnam.3:124
14172 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
14173 msgstr ""
14174 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
14175 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
14176 "扱いしている。"
14177
14178 #. type: Plain text
14179 #: build/C/man3/tmpnam.3:132
14180 #, no-wrap
14181 msgid ""
14182 "char *\n"
14183 "tmpnam_r(char *s)\n"
14184 "{\n"
14185 "    return s ? tmpnam(s) : NULL;\n"
14186 "}\n"
14187 msgstr ""
14188 "char *\n"
14189 "tmpnam_r(char *s)\n"
14190 "{\n"
14191 "    return s ? tmpnam(s) : NULL;\n"
14192 "}\n"
14193
14194 #. type: Plain text
14195 #: build/C/man3/tmpnam.3:146
14196 msgid ""
14197 "apparently as a warning not to use NULL.  A few systems implement it.  To "
14198 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
14199 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
14200 msgstr ""
14201 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
14202 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
14203 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
14204 "がある。"
14205
14206 #. type: Plain text
14207 #: build/C/man3/tmpnam.3:158
14208 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14209 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14210
14211 #. type: TH
14212 #: build/C/man2/unlink.2:32
14213 #, no-wrap
14214 msgid "UNLINK"
14215 msgstr "UNLINK"
14216
14217 #. type: TH
14218 #: build/C/man2/unlink.2:32
14219 #, no-wrap
14220 msgid "2011-09-15"
14221 msgstr "2011-09-15"
14222
14223 #. type: Plain text
14224 #: build/C/man2/unlink.2:35
14225 msgid "unlink - delete a name and possibly the file it refers to"
14226 msgstr ""
14227 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
14228
14229 #. type: Plain text
14230 #: build/C/man2/unlink.2:39
14231 msgid "B<int unlink(const char *>I<pathname>B<);>"
14232 msgstr "B<int unlink(const char *>I<pathname>B<);>"
14233
14234 #. type: Plain text
14235 #: build/C/man2/unlink.2:45
14236 msgid ""
14237 "B<unlink>()  deletes a name from the file system.  If that name was the last "
14238 "link to a file and no processes have the file open the file is deleted and "
14239 "the space it was using is made available for reuse."
14240 msgstr ""
14241 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
14242 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
14243 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
14244 "は再利用が可能になる。"
14245
14246 #. type: Plain text
14247 #: build/C/man2/unlink.2:49
14248 msgid ""
14249 "If the name was the last link to a file but any processes still have the "
14250 "file open the file will remain in existence until the last file descriptor "
14251 "referring to it is closed."
14252 msgstr ""
14253 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
14254 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
14255 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
14256 "ける。"
14257
14258 #. type: Plain text
14259 #: build/C/man2/unlink.2:51
14260 msgid "If the name referred to a symbolic link the link is removed."
14261 msgstr ""
14262 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
14263 "削除される。"
14264
14265 #. type: Plain text
14266 #: build/C/man2/unlink.2:55
14267 msgid ""
14268 "If the name referred to a socket, fifo or device the name for it is removed "
14269 "but processes which have the object open may continue to use it."
14270 msgstr ""
14271 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
14272 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
14273 "とができる。"
14274
14275 #. type: Plain text
14276 #: build/C/man2/unlink.2:71
14277 msgid ""
14278 "Write access to the directory containing I<pathname> is not allowed for the "
14279 "process's effective UID, or one of the directories in I<pathname> did not "
14280 "allow search permission.  (See also B<path_resolution>(7).)"
14281 msgstr ""
14282 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
14283 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
14284 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
14285 "と)。"
14286
14287 #. type: Plain text
14288 #: build/C/man2/unlink.2:80
14289 msgid ""
14290 "The file I<pathname> cannot be unlinked because it is being used by the "
14291 "system or another process; for example, it is a mount point or the NFS "
14292 "client software created it to represent an active but otherwise nameless "
14293 "inode (\"NFS silly renamed\")."
14294 msgstr ""
14295 "システムか別のプロセスがそのファイルを使用中のため、\n"
14296 "ファイル I<pathname> を unlink できない。\n"
14297 "例えば、そのファイルがマウントポイントの場合や、\n"
14298 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
14299 "名前なし inode (nameless inode) であることを示すために作成した\n"
14300 "場合 (\"NFS silly renamed\") などがある。"
14301
14302 #. type: Plain text
14303 #: build/C/man2/unlink.2:92
14304 msgid ""
14305 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
14306 "Linux since 2.1.132.)"
14307 msgstr ""
14308 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
14309 "で、Linux 2.1.132 以降で返される。)"
14310
14311 #. type: Plain text
14312 #: build/C/man2/unlink.2:96
14313 msgid "Too many symbolic links were encountered in translating I<pathname>."
14314 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
14315
14316 #. type: Plain text
14317 #: build/C/man2/unlink.2:106
14318 msgid ""
14319 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14320 "I<pathname> is empty."
14321 msgstr ""
14322 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
14323 "I<pathname> が空である。"
14324
14325 #. type: Plain text
14326 #: build/C/man2/unlink.2:114
14327 msgid ""
14328 "A component used as a directory in I<pathname> is not, in fact, a directory."
14329 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14330
14331 #. type: Plain text
14332 #: build/C/man2/unlink.2:123
14333 msgid ""
14334 "The system does not allow unlinking of directories, or unlinking of "
14335 "directories requires privileges that the calling process doesn't have.  "
14336 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14337 "B<EISDIR> for this case.)"
14338 msgstr ""
14339 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14340 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14341 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14342 "合には Linux は B<EISDIR> を返す。)"
14343
14344 #. type: TP
14345 #: build/C/man2/unlink.2:123
14346 #, no-wrap
14347 msgid "B<EPERM> (Linux only)"
14348 msgstr "B<EPERM> (Linux のみ)"
14349
14350 #. type: Plain text
14351 #: build/C/man2/unlink.2:126
14352 msgid "The file system does not allow unlinking of files."
14353 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14354
14355 #. type: Plain text
14356 #: build/C/man2/unlink.2:137
14357 msgid ""
14358 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14359 "and the process's effective UID is neither the UID of the file to be deleted "
14360 "nor that of the directory containing it, and the process is not privileged "
14361 "(Linux: does not have the B<CAP_FOWNER> capability)."
14362 msgstr ""
14363 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14364 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14365 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14366 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14367
14368 #. type: Plain text
14369 #: build/C/man2/unlink.2:141
14370 msgid "I<pathname> refers to a file on a read-only file system."
14371 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14372
14373 #. type: Plain text
14374 #: build/C/man2/unlink.2:161
14375 msgid ""
14376 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14377 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14378 "(7), B<symlink>(7)"
14379 msgstr ""
14380 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14381 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14382 "(7), B<symlink>(7)"
14383
14384 #. type: TH
14385 #: build/C/man3/unlocked_stdio.3:25
14386 #, no-wrap
14387 msgid "UNLOCKED_STDIO"
14388 msgstr "UNLOCKED_STDIO"
14389
14390 #. type: Plain text
14391 #: build/C/man3/unlocked_stdio.3:29
14392 msgid ""
14393 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14394 "nonlocking stdio functions"
14395 msgstr ""
14396 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14397 "わずに標準入出力を行う関数群"
14398
14399 #. type: Plain text
14400 #: build/C/man3/unlocked_stdio.3:37
14401 #, no-wrap
14402 msgid ""
14403 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14404 "B<int getchar_unlocked(void);>\n"
14405 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14406 "B<int putchar_unlocked(int >I<c>B<);>\n"
14407 msgstr ""
14408 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14409 "B<int getchar_unlocked(void);>\n"
14410 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14411 "B<int putchar_unlocked(int >I<c>B<);>\n"
14412
14413 #. type: Plain text
14414 #: build/C/man3/unlocked_stdio.3:49
14415 #, no-wrap
14416 msgid ""
14417 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14418 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14419 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14420 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14421 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14422 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14423 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14424 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14425 "B<                      FILE *>I<stream>B<);>\n"
14426 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14427 "B<                      FILE *>I<stream>B<);>\n"
14428 msgstr ""
14429 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14430 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14431 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14432 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14433 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14434 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14435 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14436 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14437 "B<                      FILE *>I<stream>B<);>\n"
14438 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14439 "B<                      FILE *>I<stream>B<);>\n"
14440
14441 #. type: Plain text
14442 #: build/C/man3/unlocked_stdio.3:52
14443 #, no-wrap
14444 msgid ""
14445 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14446 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14447 msgstr ""
14448 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14449 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14450
14451 #. type: Plain text
14452 #: build/C/man3/unlocked_stdio.3:63
14453 #, no-wrap
14454 msgid ""
14455 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14456 "B<wint_t getwchar_unlocked(void);>\n"
14457 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14458 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14459 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14460 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14461 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14462 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14463 msgstr ""
14464 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14465 "B<wint_t getwchar_unlocked(void);>\n"
14466 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14467 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14468 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14469 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14470 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14471 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14472
14473 #. type: Plain text
14474 #: build/C/man3/unlocked_stdio.3:75
14475 msgid ""
14476 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14477 "B<putchar_unlocked>():"
14478 msgstr ""
14479 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14480 "B<putchar_unlocked>():"
14481
14482 #. type: Plain text
14483 #: build/C/man3/unlocked_stdio.3:78
14484 msgid ""
14485 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14486 "_BSD_SOURCE || _SVID_SOURCE"
14487 msgstr ""
14488 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14489 "_BSD_SOURCE || _SVID_SOURCE"
14490
14491 #. type: Plain text
14492 #: build/C/man3/unlocked_stdio.3:89
14493 msgid ""
14494 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14495 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14496 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14497 msgstr ""
14498 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14499 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14500 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14501
14502 #. type: Plain text
14503 #: build/C/man3/unlocked_stdio.3:91
14504 msgid "_BSD_SOURCE || _SVID_SOURCE"
14505 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14506
14507 #. type: Plain text
14508 #: build/C/man3/unlocked_stdio.3:102
14509 msgid ""
14510 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14511 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14512 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14513 msgstr ""
14514 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14515 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14516 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14517
14518 #. type: Plain text
14519 #: build/C/man3/unlocked_stdio.3:113
14520 msgid ""
14521 "Each of these functions has the same behavior as its counterpart without the "
14522 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14523 "locks themselves, and do not test for the presence of locks set by others) "
14524 "and hence are thread-unsafe.  See B<flockfile>(3)."
14525 msgstr ""
14526 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14527 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14528 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14529 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14530 "B<flockfile>(3)  を参照のこと。"
14531
14532 #. type: Plain text
14533 #: build/C/man3/unlocked_stdio.3:120
14534 msgid ""
14535 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14536 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14537 msgstr ""
14538 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14539 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14540
14541 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14542 #.  moved to a compatibility library.
14543 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14544 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14545 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14546 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14547 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14548 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14549 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14550 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14551 #.  ungetc_unlocked, ungetwc_unlocked.
14552 #. type: Plain text
14553 #: build/C/man3/unlocked_stdio.3:136
14554 msgid ""
14555 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14556 "are available in recent glibc.  They should probably not be used."
14557 msgstr ""
14558 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14559 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14560
14561 #. type: Plain text
14562 #: build/C/man3/unlocked_stdio.3:139
14563 msgid "B<flockfile>(3), B<stdio>(3)"
14564 msgstr "B<flockfile>(3), B<stdio>(3)"
14565
14566 #. type: TH
14567 #: build/C/man3/wprintf.3:16
14568 #, no-wrap
14569 msgid "WPRINTF"
14570 msgstr "WPRINTF"
14571
14572 #. type: TH
14573 #: build/C/man3/wprintf.3:16
14574 #, no-wrap
14575 msgid "2011-09-17"
14576 msgstr "2011-09-17"
14577
14578 #. type: Plain text
14579 #: build/C/man3/wprintf.3:20
14580 msgid ""
14581 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14582 "character output conversion"
14583 msgstr ""
14584 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14585 "フォーマットして出力する"
14586
14587 #. type: Plain text
14588 #: build/C/man3/wprintf.3:24
14589 #, no-wrap
14590 msgid ""
14591 "B<#include E<lt>stdio.hE<gt>>\n"
14592 "B<#include E<lt>wchar.hE<gt>>\n"
14593 msgstr ""
14594 "B<#include E<lt>stdio.hE<gt>>\n"
14595 "B<#include E<lt>wchar.hE<gt>>\n"
14596
14597 #. type: Plain text
14598 #: build/C/man3/wprintf.3:29
14599 #, no-wrap
14600 msgid ""
14601 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14602 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14603 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14604 "B<             const wchar_t *>I<format>B<, ...);>\n"
14605 msgstr ""
14606 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14607 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14608 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14609 "B<             const wchar_t *>I<format>B<, ...);>\n"
14610
14611 #. type: Plain text
14612 #: build/C/man3/wprintf.3:34
14613 #, no-wrap
14614 msgid ""
14615 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14616 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14617 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14618 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14619 msgstr ""
14620 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14621 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14622 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14623 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14624
14625 #.  .BR wprintf (),
14626 #.  .BR fwprintf (),
14627 #.  .BR swprintf (),
14628 #.  .BR vwprintf (),
14629 #.  .BR vfwprintf (),
14630 #.  .BR vswprintf ():
14631 #. type: Plain text
14632 #: build/C/man3/wprintf.3:51
14633 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14634 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14635
14636 #. type: Plain text
14637 #: build/C/man3/wprintf.3:53
14638 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14639 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14640
14641 #. type: Plain text
14642 #: build/C/man3/wprintf.3:55
14643 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14644 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14645
14646 #. type: Plain text
14647 #: build/C/man3/wprintf.3:58
14648 msgid "or I<cc\\ -std=c99>"
14649 msgstr "or I<cc\\ -std=c99>"
14650
14651 #. type: Plain text
14652 #: build/C/man3/wprintf.3:69
14653 msgid ""
14654 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14655 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14656 "characters."
14657 msgstr ""
14658 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14659 "版である。これらはワイド文字をフォーマットして出力する。"
14660
14661 #. type: Plain text
14662 #: build/C/man3/wprintf.3:79
14663 msgid ""
14664 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14665 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14666 "more information."
14667 msgstr ""
14668 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14669 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14670 "ること。"
14671
14672 #. type: Plain text
14673 #: build/C/man3/wprintf.3:89
14674 msgid ""
14675 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14676 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14677 "for more information."
14678 msgstr ""
14679 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14680 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14681 "B<fwide>(3)  を参照すること。"
14682
14683 #. type: Plain text
14684 #: build/C/man3/wprintf.3:100
14685 msgid ""
14686 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14687 "output to an array of wide characters.  The programmer must ensure that "
14688 "there is room for at least I<maxlen> wide characters at I<wcs>."
14689 msgstr ""
14690 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14691 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14692 "空きがあることを保証しなければ ならない。"
14693
14694 #. type: Plain text
14695 #: build/C/man3/wprintf.3:111
14696 msgid ""
14697 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14698 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14699 "following differences:"
14700 msgstr ""
14701 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14702 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14703
14704 #. type: TP
14705 #: build/C/man3/wprintf.3:111 build/C/man3/wprintf.3:114
14706 #: build/C/man3/wprintf.3:117
14707 #, no-wrap
14708 msgid "B<\\(bu>"
14709 msgstr "B<\\(bu>"
14710
14711 #. type: Plain text
14712 #: build/C/man3/wprintf.3:114
14713 msgid "The I<format> string is a wide-character string."
14714 msgstr "I<format> がワイド文字列で与えられる。"
14715
14716 #. type: Plain text
14717 #: build/C/man3/wprintf.3:117
14718 msgid "The output consists of wide characters, not bytes."
14719 msgstr "出力がバイトではなくワイド文字で構成される。"
14720
14721 #. type: Plain text
14722 #: build/C/man3/wprintf.3:132
14723 msgid ""
14724 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14725 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14726 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14727 "overflow on Linux.)"
14728 msgstr ""
14729 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14730 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14731 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14732 "も -1 を返さない)。"
14733
14734 #. type: Plain text
14735 #: build/C/man3/wprintf.3:134
14736 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14737 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14738
14739 #. type: Plain text
14740 #: build/C/man3/wprintf.3:148
14741 msgid ""
14742 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14743 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14744 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14745 "character) argument is written."
14746 msgstr ""
14747 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14748 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14749 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14750
14751 #. type: Plain text
14752 #: build/C/man3/wprintf.3:187
14753 msgid ""
14754 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14755 "to be a pointer to an array of character type (pointer to a string) "
14756 "containing a multibyte character sequence beginning in the initial shift "
14757 "state.  Characters from the array are converted to wide characters (each by "
14758 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14759 "the initial state before the first byte).  The resulting wide characters are "
14760 "written up to (but not including) the terminating null wide character.  If a "
14761 "precision is specified, no more wide characters than the number specified "
14762 "are written.  Note that the precision determines the number of I<wide "
14763 "characters> written, not the number of I<bytes> or I<screen positions>.  The "
14764 "array must contain a terminating null byte, unless a precision is given and "
14765 "it is so small that the number of converted wide characters reaches it "
14766 "before the end of the array is reached.  If an B<l> modifier is present: The "
14767 "I<const\\ wchar_t\\ *> argument is expected to be a pointer to an array of "
14768 "wide characters.  Wide characters from the array are written up to (but not "
14769 "including) a terminating null wide character.  If a precision is specified, "
14770 "no more than the number specified are written.  The array must contain a "
14771 "terminating null wide character, unless a precision is given and it is "
14772 "smaller than or equal to the number of wide characters in the array."
14773 msgstr ""
14774 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14775 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14776 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14777 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14778 "字は終端の ナルワイド文字の手前までが書き込まれる。精度(precision)が指定され"
14779 "た 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込まれ"
14780 "る I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字> の数を指定することに"
14781 "注意すること。 精度がない場合には配列の終端にナル文字を含む必要がある。 精度"
14782 "を指定する場合には、配列の最後に到着する前に変換されたワイド文字の 数がそれに"
14783 "到達するよう、精度は十分に小さな数でなければならない。 もし B<l> 修飾子が存在"
14784 "する場合、 I<const\\ wchar_t\\ *> 引き数はワイド文字の配列へのポインタとみな"
14785 "される。 配列のワイド文字列は終端のナルワイド文字の手間まで出力される。 もし"
14786 "精度が指定された場合には指定された精度以上の文字は出力されない。 精度を指定し"
14787 "ない場合には終端のナルワイド文字を含む必要がある。 精度を指定する場合にはそれ"
14788 "はワイド文字の配列の大きさよりも小さくな ければならない。"
14789
14790 #. type: Plain text
14791 #: build/C/man3/wprintf.3:195
14792 msgid ""
14793 "The functions return the number of wide characters written, excluding the "
14794 "terminating null wide character in case of the functions B<swprintf>()  and "
14795 "B<vswprintf>().  They return -1 when an error occurs."
14796 msgstr ""
14797 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14798 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14799 "場合は -1 を返す。"
14800
14801 #. type: Plain text
14802 #: build/C/man3/wprintf.3:197
14803 msgid "C99."
14804 msgstr "C99."
14805
14806 #. type: Plain text
14807 #: build/C/man3/wprintf.3:205
14808 msgid ""
14809 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14810 "the current locale."
14811 msgstr ""
14812 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14813
14814 #. type: Plain text
14815 #: build/C/man3/wprintf.3:231
14816 msgid ""
14817 "If the I<format> string contains non-ASCII wide characters, the program will "
14818 "only work correctly if the B<LC_CTYPE> category of the current locale at run "
14819 "time is the same as the B<LC_CTYPE> category of the current locale at "
14820 "compile time.  This is because the I<wchar_t> representation is platform- "
14821 "and locale-dependent.  (The glibc represents wide characters using their "
14822 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14823 "the use of C99 universal character names of the form \\eunnnn does not solve "
14824 "this problem.)  Therefore, in internationalized programs, the I<format> "
14825 "string should consist of ASCII wide characters only, or should be "
14826 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14827 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14828 msgstr ""
14829 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14830 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14831 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14832 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14833 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14834 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14835 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14836 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14837 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14838
14839 #.  .BR wscanf (3)
14840 #. type: Plain text
14841 #: build/C/man3/wprintf.3:238
14842 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14843 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14844
14845 #. type: TH
14846 #: build/C/man2/write.2:39
14847 #, no-wrap
14848 msgid "WRITE"
14849 msgstr "WRITE"
14850
14851 #. type: Plain text
14852 #: build/C/man2/write.2:42
14853 msgid "write - write to a file descriptor"
14854 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14855
14856 #. type: Plain text
14857 #: build/C/man2/write.2:46
14858 msgid ""
14859 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14860 msgstr ""
14861 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14862
14863 #. type: Plain text
14864 #: build/C/man2/write.2:54
14865 msgid ""
14866 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14867 "the file referred to by the file descriptor I<fd>."
14868 msgstr ""
14869 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14870 "照するファイルへ、最大 I<count> バイトを書き込む。"
14871
14872 #. type: Plain text
14873 #: build/C/man2/write.2:68
14874 msgid ""
14875 "The number of bytes written may be less than I<count> if, for example, there "
14876 "is insufficient space on the underlying physical medium, or the "
14877 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14878 "call was interrupted by a signal handler after having written less than "
14879 "I<count> bytes.  (See also B<pipe>(7).)"
14880 msgstr ""
14881 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14882 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14883 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14884 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14885 "(7)  も参照のこと。)"
14886
14887 #. type: Plain text
14888 #: build/C/man2/write.2:82
14889 msgid ""
14890 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14891 "example, a regular file)  writing takes place at the current file offset, "
14892 "and the file offset is incremented by the number of bytes actually written.  "
14893 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14894 "to the end of the file before writing.  The adjustment of the file offset "
14895 "and the write operation are performed as an atomic step."
14896 msgstr ""
14897 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14898 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14899 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14900 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14901 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14902 "処理として 実行される。"
14903
14904 #. type: Plain text
14905 #: build/C/man2/write.2:89
14906 msgid ""
14907 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14908 "B<write>()  has returned returns the new data.  Note that not all file "
14909 "systems are POSIX conforming."
14910 msgstr ""
14911 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14912 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14913 "ること。"
14914
14915 #. type: Plain text
14916 #: build/C/man2/write.2:94
14917 msgid ""
14918 "On success, the number of bytes written is returned (zero indicates nothing "
14919 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14920 msgstr ""
14921 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14922 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
14923
14924 #. type: Plain text
14925 #: build/C/man2/write.2:107
14926 msgid ""
14927 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
14928 "return a failure status if one of the errors below is detected.  If no "
14929 "errors are detected, 0 will be returned without causing any other effect.  "
14930 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
14931 "the results are not specified."
14932 msgstr ""
14933 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
14934 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
14935 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
14936 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
14937 "その結果は規定されていない。"
14938
14939 #. type: Plain text
14940 #: build/C/man2/write.2:115
14941 msgid ""
14942 "The file descriptor I<fd> refers to a file other than a socket and has been "
14943 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
14944 msgstr ""
14945 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
14946 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
14947 "する状況にある。"
14948
14949 #.  Actually EAGAIN on Linux
14950 #. type: Plain text
14951 #: build/C/man2/write.2:126
14952 msgid ""
14953 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
14954 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
14955 "error to be returned for this case, and does not require these constants to "
14956 "have the same value, so a portable application should check for both "
14957 "possibilities."
14958 msgstr ""
14959 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
14960 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
14961 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
14962 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
14963 "プリケーションでは、両方の可能性を 確認すべきである。"
14964
14965 #. type: Plain text
14966 #: build/C/man2/write.2:130
14967 msgid "I<fd> is not a valid file descriptor or is not open for writing."
14968 msgstr ""
14969 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
14970 "されていない。"
14971
14972 #. type: TP
14973 #: build/C/man2/write.2:130
14974 #, no-wrap
14975 msgid "B<EDESTADDRREQ>"
14976 msgstr "B<EDESTADDRREQ>"
14977
14978 #. type: Plain text
14979 #: build/C/man2/write.2:135
14980 msgid ""
14981 "I<fd> refers to a datagram socket for which a peer address has not been set "
14982 "using B<connect>(2)."
14983 msgstr ""
14984 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
14985 "グラムソケットを 参照している。"
14986
14987 #. type: Plain text
14988 #: build/C/man2/write.2:141
14989 #, fuzzy
14990 #| msgid ""
14991 #| "The device containing the file referred to by I<fd> has no room for the "
14992 #| "data."
14993 msgid ""
14994 "The user's quota of disk blocks on the file system containing the file "
14995 "referred to by I<fd> has been exhausted."
14996 msgstr ""
14997 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
14998
14999 #. type: Plain text
15000 #: build/C/man2/write.2:150
15001 msgid ""
15002 "An attempt was made to write a file that exceeds the implementation-defined "
15003 "maximum file size or the process's file size limit, or to write at a "
15004 "position past the maximum allowed offset."
15005 msgstr ""
15006 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
15007 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
15008 "書き込もうとした。"
15009
15010 #. type: Plain text
15011 #: build/C/man2/write.2:154
15012 msgid ""
15013 "The call was interrupted by a signal before any data was written; see "
15014 "B<signal>(7)."
15015 msgstr ""
15016 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
15017 "(7)  参照。"
15018
15019 #. type: Plain text
15020 #: build/C/man2/write.2:165
15021 msgid ""
15022 "I<fd> is attached to an object which is unsuitable for writing; or the file "
15023 "was opened with the B<O_DIRECT> flag, and either the address specified in "
15024 "I<buf>, the value specified in I<count>, or the current file offset is not "
15025 "suitably aligned."
15026 msgstr ""
15027 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
15028 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
15029 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
15030 "メントが不適切である。"
15031
15032 #. type: Plain text
15033 #: build/C/man2/write.2:168
15034 msgid "A low-level I/O error occurred while modifying the inode."
15035 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
15036
15037 #. type: Plain text
15038 #: build/C/man2/write.2:173
15039 msgid ""
15040 "The device containing the file referred to by I<fd> has no room for the data."
15041 msgstr ""
15042 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
15043
15044 #. type: TP
15045 #: build/C/man2/write.2:173
15046 #, no-wrap
15047 msgid "B<EPIPE>"
15048 msgstr "B<EPIPE>"
15049
15050 #. type: Plain text
15051 #: build/C/man2/write.2:182
15052 msgid ""
15053 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
15054 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
15055 "(Thus, the write return value is seen only if the program catches, blocks or "
15056 "ignores this signal.)"
15057 msgstr ""
15058 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
15059 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
15060 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
15061 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
15062 "write の返り値を参照できる。)"
15063
15064 #. type: Plain text
15065 #: build/C/man2/write.2:185
15066 msgid "Other errors may occur, depending on the object connected to I<fd>."
15067 msgstr ""
15068 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
15069
15070 #. type: Plain text
15071 #: build/C/man2/write.2:194
15072 msgid ""
15073 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
15074 "just before any data is written."
15075 msgstr ""
15076 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
15077 "で B<EINTR> が返る。"
15078
15079 #. type: Plain text
15080 #: build/C/man2/write.2:203
15081 msgid ""
15082 "A successful return from B<write>()  does not make any guarantee that data "
15083 "has been committed to disk.  In fact, on some buggy implementations, it does "
15084 "not even guarantee that space has successfully been reserved for the data.  "
15085 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
15086 "all your data."
15087 msgstr ""
15088 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
15089 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
15090 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
15091 "write した後に B<fsync>(2)  を呼び出すことである。"
15092
15093 #. type: Plain text
15094 #: build/C/man2/write.2:211
15095 msgid ""
15096 "If a B<write>()  is interrupted by a signal handler before any bytes are "
15097 "written, then the call fails with the error B<EINTR>; if it is interrupted "
15098 "after at least one byte has been written, the call succeeds, and returns the "
15099 "number of bytes written."
15100 msgstr ""
15101 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
15102 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
15103 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
15104
15105 #. type: Plain text
15106 #: build/C/man2/write.2:223
15107 msgid ""
15108 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15109 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15110 msgstr ""
15111 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15112 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15113
15114 #~ msgid "2008-08-21"
15115 #~ msgstr "2008-08-21"
15116
15117 #~ msgid "2007-06-01"
15118 #~ msgstr "2007-06-01"
15119
15120 #~ msgid "2012-05-01"
15121 #~ msgstr "2012-05-01"
15122
15123 #~ msgid ""
15124 #~ "        if (n E<gt> -1)    /* glibc 2.1 */\n"
15125 #~ "            size = n+1; /* precisely what is needed */\n"
15126 #~ "        else           /* glibc 2.0 */\n"
15127 #~ "            size *= 2;  /* twice the old size */\n"
15128 #~ msgstr ""
15129 #~ "        if (n E<gt> -1)    /* glibc 2.1 */\n"
15130 #~ "            size = n+1; /* precisely what is needed */\n"
15131 #~ "        else           /* glibc 2.0 */\n"
15132 #~ "            size *= 2;  /* twice the old size */\n"
15133
15134 #~ msgid ""
15135 #~ "Many file systems and disks were considered to be fast enough that the "
15136 #~ "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, "
15137 #~ "B<O_NONBLOCK> may not be available on files and/or disks."
15138 #~ msgstr ""
15139 #~ "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むく"
15140 #~ "らいに十分に高速であると考えられている。 それでそのようなファイルやディス"
15141 #~ "クには B<O_NONBLOCK> は利用できないかもしれない。"
15142
15143 #~ msgid "2009-03-30"
15144 #~ msgstr "2009-03-30"
15145
15146 #~ msgid "2008-06-26"
15147 #~ msgstr "2008-06-26"
15148
15149 #~ msgid "2010-09-20"
15150 #~ msgstr "2010-09-20"
15151
15152 #~ msgid "2010-08-29"
15153 #~ msgstr "2010-08-29"
15154
15155 #~ msgid "2008-12-05"
15156 #~ msgstr "2008-12-05"
15157
15158 #~ msgid "2012-02-27"
15159 #~ msgstr "2012-02-27"
15160
15161 #~ msgid "The I<double> argument is rounded and converted in the style"
15162 #~ msgstr "I<double> 引き数を丸めて"
15163
15164 #~ msgid "2012-04-25"
15165 #~ msgstr "2012-04-25"
15166
15167 #~ msgid ""
15168 #~ "The I<local_iov> and I<remote_iov> arguments point to an array of "
15169 #~ "I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
15170 #~ msgstr ""
15171 #~ "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
15172 #~ "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
15173 #~ "されている:"
15174
15175 #~ msgid ""
15176 #~ "Buffers are processed in array order.  This means that B<process_vm_readv>"
15177 #~ "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]"
15178 #~ ">, and so on.  Likewise, I<remote_iov[0]> is completely read before "
15179 #~ "proceeding to I<remote_iov[1]>, and so on."
15180 #~ msgstr ""
15181 #~ "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
15182 #~ "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
15183 #~ "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
15184 #~ "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
15185 #~ "以降も同様である。"
15186
15187 #~ msgid "The I<flags> argument is currently unused and must be set to 0."
15188 #~ msgstr ""
15189 #~ "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
15190
15191 #~ msgid "On error, -1 is returned and I<errno> is set appropriately."
15192 #~ msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
15193
15194 #~ msgid "I<flags> is not 0."
15195 #~ msgstr "I<flags> が 0 でない。"
15196
15197 #~ msgid "I<liovcnt> or I<riovcnt> is too large."
15198 #~ msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
15199
15200 #~ msgid ""
15201 #~ "The memory described by I<local_iov> is outside the caller's accessible "
15202 #~ "address space."
15203 #~ msgstr ""
15204 #~ "I<local_iov> が示すメモリが呼び出し側がアクセス可能な\n"
15205 #~ "アドレス空間の外にある。"
15206
15207 #~ msgid ""
15208 #~ "The caller does not have permission to access the address space of the "
15209 #~ "process I<pid>."
15210 #~ msgstr ""
15211 #~ "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
15212 #~ "持っていない。"
15213
15214 #~ msgid "B<ESRCH>"
15215 #~ msgstr "B<ESRCH>"
15216
15217 #~ msgid "No process with ID I<pid> exists."
15218 #~ msgstr "ID が I<pid> のプロセスが存在しない。"
15219
15220 #~ msgid ""
15221 #~ "These system calls were added in Linux 3.2.  Support is provided in glibc "
15222 #~ "since version 2.15."
15223 #~ msgstr ""
15224 #~ "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
15225 #~ "サポートは glibc バージョン 2.15 以降で提供されている。"
15226
15227 #~ msgid "These system calls are nonstandard Linux extensions."
15228 #~ msgstr "これらのシステムコールは非標準で Linux による拡張である。"
15229
15230 #~ msgid "#include E<lt>sys/uio.hE<gt>\n"
15231 #~ msgstr "#include E<lt>sys/uio.hE<gt>\n"
15232
15233 #~ msgid ""
15234 #~ "int\n"
15235 #~ "main(void)\n"
15236 #~ "{\n"
15237 #~ "    struct iovec local[2];\n"
15238 #~ "    struct iovec remote[1];\n"
15239 #~ "    char buf1[10];\n"
15240 #~ "    char buf2[10];\n"
15241 #~ "    ssize_t nread;\n"
15242 #~ "    pid_t pid = 10;             /* PID of remote process */\n"
15243 #~ msgstr ""
15244 #~ "int\n"
15245 #~ "main(void)\n"
15246 #~ "{\n"
15247 #~ "    struct iovec local[2];\n"
15248 #~ "    struct iovec remote[1];\n"
15249 #~ "    char buf1[10];\n"
15250 #~ "    char buf2[10];\n"
15251 #~ "    ssize_t nread;\n"
15252 #~ "    pid_t pid = 10;             /* PID of remote process */\n"
15253
15254 #~ msgid ""
15255 #~ "    local[0].iov_base = buf1;\n"
15256 #~ "    local[0].iov_len = 10;\n"
15257 #~ "    local[1].iov_base = buf2;\n"
15258 #~ "    local[1].iov_len = 10;\n"
15259 #~ "    remote[0].iov_base = (void *) 0x10000;\n"
15260 #~ "    remote[1].iov_len = 20;\n"
15261 #~ msgstr ""
15262 #~ "    local[0].iov_base = buf1;\n"
15263 #~ "    local[0].iov_len = 10;\n"
15264 #~ "    local[1].iov_base = buf2;\n"
15265 #~ "    local[1].iov_len = 10;\n"
15266 #~ "    remote[0].iov_base = (void *) 0x10000;\n"
15267 #~ "    remote[1].iov_len = 20;\n"
15268
15269 #~ msgid ""
15270 #~ "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
15271 #~ "    if (nread != 20)\n"
15272 #~ "        return 1;\n"
15273 #~ "    else\n"
15274 #~ "        return 0;\n"
15275 #~ "}\n"
15276 #~ msgstr ""
15277 #~ "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
15278 #~ "    if (nread != 20)\n"
15279 #~ "        return 1;\n"
15280 #~ "    else\n"
15281 #~ "        return 0;\n"
15282 #~ "}\n"
15283
15284 #~ msgid "B<readv>(2), B<writev>(2)"
15285 #~ msgstr "B<readv>(2), B<writev>(2)"
15286
15287 #~ msgid "call."
15288 #~ msgstr "の呼び出しを実行したかのように) ファイル末尾に対して行われる。"
15289
15290 #~ msgid ""
15291 #~ "C89, C99, POSIX.1-2001.  LSB deprecates B<gets>().  POSIX.1-2008 marks "
15292 #~ "B<gets>()  obsolescent."
15293 #~ msgstr ""
15294 #~ "C89, C99, POSIX.1-2001.  LSB では B<gets>()  は非推奨である。 "
15295 #~ "POSIX.1-2008 では B<gets>()  は廃止予定であるとされている。"
15296
15297 #~ msgid ""
15298 #~ "This document's use of I<whence> is incorrect English, but maintained for "
15299 #~ "historical reasons."
15300 #~ msgstr ""
15301 #~ "この文章で使用した I<whence> は英語として正しくないが、 歴史的理由によりそ"
15302 #~ "のまま使われている。"
15303
15304 #~ msgid "B<EBUSY> (not on Linux)"
15305 #~ msgstr "B<EBUSY> (Linux 以外)"