OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.52.
[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-07-15 16:09+0900\n"
10 "PO-Revision-Date: 2013-05-07 03:41+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/asprintf.3:27
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25
26 #: build/C/man3/ferror.3:44 build/C/man3/fmtmsg.3:13
27 #: build/C/man3/stdio_ext.3:25 build/C/man3/tmpnam.3:27
28 #, fuzzy, no-wrap
29 #| msgid "2013-03-17"
30 msgid "2013-06-21"
31 msgstr "2013-03-17"
32
33 #. type: TH
34 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
35 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
36 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
37 #: build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44
38 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
39 #: build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25
40 #: build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26
41 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:52 build/C/man3/wprintf.3:16
42 #, no-wrap
43 msgid "GNU"
44 msgstr "GNU"
45
46 #. type: TH
47 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
48 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
49 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
50 #: build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18
51 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
52 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
53 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
54 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
55 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:27
56 #: build/C/man3/getw.3:25 build/C/man2/link.2:31 build/C/man2/llseek.2:28
57 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:52
58 #: build/C/man3/perror.3:31 build/C/man2/pipe.2:36 build/C/man3/popen.3:40
59 #: build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man2/read.2:35
60 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man3/remove.3:31
61 #: build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52
62 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man3/stdio.3:39
63 #: build/C/man3/stdio_ext.3:25 build/C/man2/symlink.2:32
64 #: build/C/man7/symlink.7:36 build/C/man3/tempnam.3:25
65 #: build/C/man3/tmpfile.3:31 build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:32
66 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
67 #: build/C/man2/write.2:39
68 #, no-wrap
69 msgid "Linux Programmer's Manual"
70 msgstr "Linux Programmer's Manual"
71
72 #. type: SH
73 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
74 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
75 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
76 #: build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19
77 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
78 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
79 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
80 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
81 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28
82 #: build/C/man3/getw.3:26 build/C/man2/link.2:32 build/C/man2/llseek.2:29
83 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:53
84 #: build/C/man3/perror.3:32 build/C/man2/pipe.2:37 build/C/man3/popen.3:41
85 #: build/C/man3/printf.3:35 build/C/man3/puts.3:27 build/C/man2/read.2:36
86 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:32
87 #: build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53
88 #: build/C/man3/setbuf.3:49 build/C/man3/stdin.3:14 build/C/man3/stdio.3:40
89 #: build/C/man3/stdio_ext.3:26 build/C/man2/symlink.2:33
90 #: build/C/man7/symlink.7:37 build/C/man3/tempnam.3:26
91 #: build/C/man3/tmpfile.3:32 build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:33
92 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
93 #: build/C/man2/write.2:40
94 #, no-wrap
95 msgid "NAME"
96 msgstr "名前"
97
98 #. type: Plain text
99 #: build/C/man3/asprintf.3:30
100 msgid "asprintf, vasprintf - print to allocated string"
101 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
102
103 #. type: SH
104 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
105 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
106 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
107 #: build/C/man3/fflush.3:48 build/C/man3/fgetwc.3:21
108 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
109 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
110 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
111 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
112 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:30
113 #: build/C/man3/getw.3:28 build/C/man2/link.2:34 build/C/man2/llseek.2:31
114 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:55
115 #: build/C/man3/perror.3:34 build/C/man2/pipe.2:39 build/C/man3/popen.3:43
116 #: build/C/man3/printf.3:38 build/C/man3/puts.3:29 build/C/man2/read.2:38
117 #: build/C/man2/readlink.2:46 build/C/man2/readv.2:35 build/C/man3/remove.3:34
118 #: build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55
119 #: build/C/man3/setbuf.3:51 build/C/man3/stdin.3:16 build/C/man3/stdio.3:42
120 #: build/C/man3/stdio_ext.3:30 build/C/man2/symlink.2:35
121 #: build/C/man3/tempnam.3:28 build/C/man3/tmpfile.3:34
122 #: build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:35
123 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
124 #: build/C/man2/write.2:42
125 #, no-wrap
126 msgid "SYNOPSIS"
127 msgstr "書式"
128
129 #. type: Plain text
130 #: build/C/man3/asprintf.3:32
131 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
132 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
133
134 #. type: Plain text
135 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
136 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
137 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
138 #: build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:44
139 #: build/C/man3/stdio_ext.3:32
140 msgid "B<#include E<lt>stdio.hE<gt>>"
141 msgstr "B<#include E<lt>stdio.hE<gt>>"
142
143 #. type: Plain text
144 #: build/C/man3/asprintf.3:36
145 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
146 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
147
148 #. type: Plain text
149 #: build/C/man3/asprintf.3:38
150 msgid ""
151 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
152 msgstr ""
153 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
154
155 #. type: SH
156 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
157 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
158 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
159 #: build/C/man3/fflush.3:52 build/C/man3/fgetwc.3:30
160 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
161 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
162 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
163 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
164 #: build/C/man3/fseeko.3:37 build/C/man3/getline.3:58 build/C/man3/gets.3:46
165 #: build/C/man3/getw.3:59 build/C/man2/link.2:38 build/C/man2/llseek.2:43
166 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:66
167 #: build/C/man3/perror.3:55 build/C/man2/pipe.2:51 build/C/man3/popen.3:64
168 #: build/C/man3/printf.3:76 build/C/man3/puts.3:43 build/C/man2/read.2:44
169 #: build/C/man2/readlink.2:63 build/C/man2/readv.2:58 build/C/man3/remove.3:38
170 #: build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87
171 #: build/C/man3/setbuf.3:73 build/C/man3/stdin.3:24 build/C/man3/stdio.3:50
172 #: build/C/man3/stdio_ext.3:54 build/C/man2/symlink.2:52
173 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
174 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:39
175 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:60
176 #: build/C/man2/write.2:46
177 #, no-wrap
178 msgid "DESCRIPTION"
179 msgstr "説明"
180
181 #. type: Plain text
182 #: build/C/man3/asprintf.3:53
183 #, fuzzy
184 #| msgid ""
185 #| "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
186 #| "(3)  and B<vsprintf>(3), except that they allocate a string large enough "
187 #| "to hold the output including the terminating null byte, and return a "
188 #| "pointer to it via the first argument.  This pointer should be passed to "
189 #| "B<free>(3)  to release the allocated storage when it is no longer needed."
190 msgid ""
191 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
192 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
193 "hold the output including the terminating null byte (\\(aq\\e0\\(aq), and "
194 "return a pointer to it via the first argument.  This pointer should be "
195 "passed to B<free>(3)  to release the allocated storage when it is no longer "
196 "needed."
197 msgstr ""
198 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
199 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端の NULL バイトも含"
200 "めて)  保持するのに十分な大きさのメモリを確保し、 最初の引数にその文字列への"
201 "ポインタを返す。 このポインタは、不要になったら B<free>(3)  に渡し、割り当て"
202 "られた記憶領域を解放すべきである。"
203
204 #. type: SH
205 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
206 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
207 #: build/C/man3/fflush.3:74 build/C/man3/fgetwc.3:55
208 #: build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:176
209 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
210 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
211 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
212 #: build/C/man3/fseeko.3:75 build/C/man3/getline.3:110 build/C/man3/gets.3:111
213 #: build/C/man3/getw.3:73 build/C/man2/link.2:52 build/C/man2/llseek.2:62
214 #: build/C/man2/lseek.2:162 build/C/man2/open.2:477 build/C/man2/pipe.2:92
215 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
216 #: build/C/man2/readlink.2:77 build/C/man2/readv.2:177
217 #: build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40
218 #: build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152
219 #: build/C/man2/symlink.2:84 build/C/man3/tempnam.3:87
220 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:70 build/C/man2/unlink.2:55
221 #: build/C/man3/wprintf.3:205 build/C/man2/write.2:89
222 #, no-wrap
223 msgid "RETURN VALUE"
224 msgstr "返り値"
225
226 #. type: Plain text
227 #: build/C/man3/asprintf.3:61
228 msgid ""
229 "When successful, these functions return the number of bytes printed, just "
230 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
231 "error occurs, these functions will return -1, and the contents of I<strp> is "
232 "undefined."
233 msgstr ""
234 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
235 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
236 "は -1 を返し、 I<strp> の内容は未定義となる。"
237
238 #. type: SH
239 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67
240 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
241 #: build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115
242 #: build/C/man3/fflush.3:93 build/C/man3/fgetwc.3:70
243 #: build/C/man3/flockfile.3:127 build/C/man3/fmemopen.3:195
244 #: build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246
245 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
246 #: build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:168
247 #: build/C/man3/fseeko.3:87 build/C/man3/getline.3:137 build/C/man3/gets.3:138
248 #: build/C/man3/getw.3:80 build/C/man2/link.2:138 build/C/man2/llseek.2:81
249 #: build/C/man2/lseek.2:200 build/C/man2/open.2:629 build/C/man3/perror.3:111
250 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:172 build/C/man3/printf.3:806
251 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:125
252 #: build/C/man2/readv.2:214 build/C/man3/remove.3:70 build/C/man2/rename.2:232
253 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:164
254 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
255 #: build/C/man2/symlink.2:149 build/C/man3/tempnam.3:98
256 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:87
257 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:113
258 #: build/C/man3/wprintf.3:213 build/C/man2/write.2:185
259 #, no-wrap
260 msgid "CONFORMING TO"
261 msgstr "準拠"
262
263 #. type: Plain text
264 #: build/C/man3/asprintf.3:67
265 msgid ""
266 "These functions are GNU extensions, not in C or POSIX.  They are also "
267 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
268 "error."
269 msgstr ""
270 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
271 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
272 "る。"
273
274 #. type: SH
275 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77
276 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
277 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:122
278 #: build/C/man3/fflush.3:108 build/C/man3/fgetwc.3:87
279 #: build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:341
280 #: build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348
281 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
282 #: build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:170
283 #: build/C/man3/fseeko.3:93 build/C/man3/getline.3:171 build/C/man3/gets.3:173
284 #: build/C/man3/getw.3:86 build/C/man2/link.2:187 build/C/man2/llseek.2:87
285 #: build/C/man2/lseek.2:245 build/C/man3/lseek64.3:159 build/C/man2/open.2:901
286 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:201
287 #: build/C/man3/printf.3:1080 build/C/man3/puts.3:112 build/C/man2/read.2:187
288 #: build/C/man2/readlink.2:214 build/C/man2/readv.2:284
289 #: build/C/man3/remove.3:81 build/C/man2/rename.2:245 build/C/man2/rmdir.2:132
290 #: build/C/man3/scanf.3:715 build/C/man3/setbuf.3:200 build/C/man3/stdin.3:154
291 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151
292 #: build/C/man2/symlink.2:164 build/C/man7/symlink.7:471
293 #: build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97
294 #: build/C/man3/tmpnam.3:163 build/C/man2/unlink.2:148
295 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:253
296 #: build/C/man2/write.2:211
297 #, no-wrap
298 msgid "SEE ALSO"
299 msgstr "関連項目"
300
301 #. type: Plain text
302 #: build/C/man3/asprintf.3:71
303 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
304 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
305
306 #. type: SH
307 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79
308 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
309 #: build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:127
310 #: build/C/man3/fflush.3:116 build/C/man3/fgetwc.3:92
311 #: build/C/man3/flockfile.3:137 build/C/man3/fmemopen.3:344
312 #: build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354
313 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
314 #: build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:173
315 #: build/C/man3/fseeko.3:95 build/C/man3/getline.3:178 build/C/man3/gets.3:189
316 #: build/C/man3/getw.3:92 build/C/man2/link.2:197 build/C/man2/llseek.2:90
317 #: build/C/man2/lseek.2:252 build/C/man3/lseek64.3:162 build/C/man2/open.2:923
318 #: build/C/man3/perror.3:144 build/C/man2/pipe.2:197 build/C/man3/popen.3:211
319 #: build/C/man3/printf.3:1089 build/C/man3/puts.3:124 build/C/man2/read.2:200
320 #: build/C/man2/readlink.2:222 build/C/man2/readv.2:288
321 #: build/C/man3/remove.3:92 build/C/man2/rename.2:254 build/C/man2/rmdir.2:141
322 #: build/C/man3/scanf.3:722 build/C/man3/setbuf.3:208 build/C/man3/stdin.3:160
323 #: build/C/man3/stdio.3:257 build/C/man3/stdio_ext.3:154
324 #: build/C/man2/symlink.2:176 build/C/man7/symlink.7:489
325 #: build/C/man3/tempnam.3:173 build/C/man3/tmpfile.3:103
326 #: build/C/man3/tmpnam.3:168 build/C/man2/unlink.2:161
327 #: build/C/man3/unlocked_stdio.3:139 build/C/man3/wprintf.3:260
328 #: build/C/man2/write.2:223
329 #, no-wrap
330 msgid "COLOPHON"
331 msgstr "この文書について"
332
333 #. type: Plain text
334 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:86
335 #: build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115
336 #: build/C/man3/fcloseall.3:75 build/C/man3/ferror.3:134
337 #: build/C/man3/fflush.3:123 build/C/man3/fgetwc.3:99
338 #: build/C/man3/flockfile.3:144 build/C/man3/fmemopen.3:351
339 #: build/C/man3/fmtmsg.3:319 build/C/man3/fopen.3:361
340 #: build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92
341 #: build/C/man3/fputwc.3:96 build/C/man3/fread.3:118 build/C/man3/fseek.3:180
342 #: build/C/man3/fseeko.3:102 build/C/man3/getline.3:185
343 #: build/C/man3/gets.3:196 build/C/man3/getw.3:99 build/C/man2/link.2:204
344 #: build/C/man2/llseek.2:97 build/C/man2/lseek.2:259
345 #: build/C/man3/lseek64.3:169 build/C/man2/open.2:930
346 #: build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:218
347 #: build/C/man3/printf.3:1096 build/C/man3/puts.3:131 build/C/man2/read.2:207
348 #: build/C/man2/readlink.2:229 build/C/man2/readv.2:295
349 #: build/C/man3/remove.3:99 build/C/man2/rename.2:261 build/C/man2/rmdir.2:148
350 #: build/C/man3/scanf.3:729 build/C/man3/setbuf.3:215 build/C/man3/stdin.3:167
351 #: build/C/man3/stdio.3:264 build/C/man3/stdio_ext.3:161
352 #: build/C/man2/symlink.2:183 build/C/man7/symlink.7:496
353 #: build/C/man3/tempnam.3:180 build/C/man3/tmpfile.3:110
354 #: build/C/man3/tmpnam.3:175 build/C/man2/unlink.2:168
355 #: build/C/man3/unlocked_stdio.3:146 build/C/man3/wprintf.3:267
356 #: build/C/man2/write.2:230
357 #, fuzzy
358 #| msgid ""
359 #| "This page is part of release 3.51 of the Linux I<man-pages> project.  A "
360 #| "description of the project, and information about reporting bugs, can be "
361 #| "found at http://www.kernel.org/doc/man-pages/."
362 msgid ""
363 "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
364 "description of the project, and information about reporting bugs, can be "
365 "found at \\%http://www.kernel.org/doc/man-pages/."
366 msgstr ""
367 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.51 の一部\n"
368 "である。プロジェクトの説明とバグ報告に関する情報は\n"
369 "http://www.kernel.org/doc/man-pages/ に書かれている。"
370
371 #. type: TH
372 #: build/C/man3/ctermid.3:26
373 #, no-wrap
374 msgid "CTERMID"
375 msgstr "CTERMID"
376
377 #. type: TH
378 #: build/C/man3/ctermid.3:26
379 #, fuzzy, no-wrap
380 #| msgid "2013-03-05"
381 msgid "2013-07-04"
382 msgstr "2013-03-05"
383
384 #. type: Plain text
385 #: build/C/man3/ctermid.3:29
386 msgid "ctermid - get controlling terminal name"
387 msgstr "ctermid - 制御端末名の取得"
388
389 #. type: Plain text
390 #: build/C/man3/ctermid.3:34 build/C/man3/fgetwc.3:24
391 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
392 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
393 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:33
394 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
395 #: build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54 build/C/man3/stdin.3:19
396 #: build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
397 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
398 #, no-wrap
399 msgid "B<#include E<lt>stdio.hE<gt>>\n"
400 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
401
402 #. type: Plain text
403 #: build/C/man3/ctermid.3:36
404 #, no-wrap
405 msgid "B<char *ctermid(char *>I<s>B<);>\n"
406 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
407
408 #. type: Plain text
409 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
410 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
411 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61
412 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man3/perror.3:50
413 #: build/C/man3/popen.3:55 build/C/man3/printf.3:63 build/C/man2/readlink.2:54
414 #: build/C/man2/readv.2:53 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
415 #: build/C/man2/symlink.2:43 build/C/man3/tempnam.3:38
416 #: build/C/man3/unlocked_stdio.3:68 build/C/man3/wprintf.3:39
417 msgid ""
418 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
419 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
420
421 #.  From <unistd.h>: _XOPEN_SOURCE
422 #. type: Plain text
423 #: build/C/man3/ctermid.3:46
424 msgid ""
425 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
426 msgstr ""
427 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
428
429 #. type: Plain text
430 #: build/C/man3/ctermid.3:59
431 msgid ""
432 "B<ctermid>()  returns a string which is the pathname for the current "
433 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
434 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
435 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
436 "the returned pathname."
437 msgstr ""
438 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
439 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
440 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
441 "ス名の最大文字数である。"
442
443 #. type: Plain text
444 #: build/C/man3/ctermid.3:61
445 msgid "The pointer to the pathname."
446 msgstr "パス名へのポインタ。"
447
448 #. type: SH
449 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55
450 #: build/C/man3/ferror.3:106 build/C/man3/fmtmsg.3:225
451 #: build/C/man3/stdio_ext.3:132 build/C/man3/tmpnam.3:77
452 #, no-wrap
453 msgid "ATTRIBUTES"
454 msgstr ""
455
456 #. type: SS
457 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
458 #: build/C/man3/ferror.3:107 build/C/man3/fmtmsg.3:226
459 #: build/C/man3/stdio_ext.3:133 build/C/man3/tmpnam.3:78
460 #, no-wrap
461 msgid "Multithreading (see pthreads(7))"
462 msgstr ""
463
464 #. type: Plain text
465 #: build/C/man3/ctermid.3:67
466 msgid ""
467 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
468 "safe if called with a NULL parameter."
469 msgstr ""
470
471 #. type: Plain text
472 #: build/C/man3/ctermid.3:69
473 msgid "Svr4, POSIX.1-2001."
474 msgstr "SVr4, POSIX.1-2001."
475
476 #. type: SH
477 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213
478 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82
479 #: build/C/man2/link.2:181 build/C/man2/open.2:890 build/C/man3/popen.3:178
480 #: build/C/man3/printf.3:929 build/C/man3/puts.3:105 build/C/man2/readv.2:258
481 #: build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129
482 #: build/C/man3/scanf.3:646 build/C/man3/setbuf.3:170
483 #: build/C/man3/tempnam.3:158 build/C/man3/tmpnam.3:156
484 #: build/C/man2/unlink.2:145
485 #, no-wrap
486 msgid "BUGS"
487 msgstr "バグ"
488
489 #. type: Plain text
490 #: build/C/man3/ctermid.3:73
491 msgid ""
492 "The path returned may not uniquely identify the controlling terminal; it "
493 "may, for example, be I</dev/tty>."
494 msgstr ""
495 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
496 "ように。"
497
498 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
499 #.  if ctermid() was given an argument; fixed in 2.4.
500 #. type: Plain text
501 #: build/C/man3/ctermid.3:77
502 msgid "It is not assured that the program can open the terminal."
503 msgstr "プログラムが端末をオープンできることは保証されていない。"
504
505 #. type: Plain text
506 #: build/C/man3/ctermid.3:79
507 msgid "B<ttyname>(3)"
508 msgstr "B<ttyname>(3)"
509
510 #. type: TH
511 #: build/C/man3/dprintf.3:26
512 #, no-wrap
513 msgid "DPRINTF"
514 msgstr "DPRINTF"
515
516 #. type: TH
517 #: build/C/man3/dprintf.3:26
518 #, no-wrap
519 msgid "2010-09-15"
520 msgstr "2010-09-15"
521
522 #. type: Plain text
523 #: build/C/man3/dprintf.3:29
524 msgid "dprintf, vdprintf - print to a file descriptor"
525 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
526
527 #. type: Plain text
528 #: build/C/man3/dprintf.3:33
529 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
530 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
531
532 #. type: Plain text
533 #: build/C/man3/dprintf.3:35
534 msgid ""
535 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
536 msgstr ""
537 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
538
539 #. type: Plain text
540 #: build/C/man3/dprintf.3:43
541 msgid "B<dprintf>(), B<vdprintf>():"
542 msgstr "B<dprintf>(), B<vdprintf>():"
543
544 #. type: TP
545 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
546 #: build/C/man3/getline.3:49
547 #, no-wrap
548 msgid "Since glibc 2.10:"
549 msgstr "glibc 2.10 以降:"
550
551 #. type: Plain text
552 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
553 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
554 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
555
556 #. type: TP
557 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
558 #: build/C/man3/getline.3:52
559 #, no-wrap
560 msgid "Before glibc 2.10:"
561 msgstr "glibc 2.10 より前:"
562
563 #. type: Plain text
564 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
565 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
566 msgid "_GNU_SOURCE"
567 msgstr "_GNU_SOURCE"
568
569 #. type: Plain text
570 #: build/C/man3/dprintf.3:69
571 msgid ""
572 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
573 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
574 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
575 msgstr ""
576 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
577 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
578 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
579 "行う。"
580
581 #.  .SH NOTES
582 #.  These functions are GNU extensions, not in C or POSIX.
583 #.  Clearly, the names were badly chosen.
584 #.  Many systems (like MacOS) have incompatible functions called
585 #.  .BR dprintf (),
586 #.  usually some debugging version of
587 #.  .BR printf (3),
588 #.  perhaps with a prototype like
589 #.  .BI "void dprintf(int level, const char *" format ", ...);"
590 #.  where the first argument is a debugging level (and output is to
591 #.  .IR stderr ).
592 #.  Moreover,
593 #.  .BR dprintf ()
594 #.  (or
595 #.  .BR DPRINTF )
596 #.  is also a popular macro name for a debugging printf.
597 #.  So, probably, it is better to avoid this function in programs
598 #.  intended to be portable.
599 #.  A better name would have been
600 #.  .BR fdprintf ().
601 #. type: Plain text
602 #: build/C/man3/dprintf.3:95
603 msgid ""
604 "These functions are GNU extensions that are nowadays specified in "
605 "POSIX.1-2008."
606 msgstr ""
607 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
608 "る。"
609
610 #. type: Plain text
611 #: build/C/man3/dprintf.3:97
612 msgid "B<printf>(3)"
613 msgstr "B<printf>(3)"
614
615 #. type: TH
616 #: build/C/man3/fclose.3:44
617 #, no-wrap
618 msgid "FCLOSE"
619 msgstr "FCLOSE"
620
621 #. type: TH
622 #: build/C/man3/fclose.3:44
623 #, no-wrap
624 msgid "2009-02-23"
625 msgstr "2009-02-23"
626
627 #. type: Plain text
628 #: build/C/man3/fclose.3:47
629 msgid "fclose - close a stream"
630 msgstr "fclose - ストリームを閉じる"
631
632 #. type: Plain text
633 #: build/C/man3/fclose.3:51
634 msgid "B<int fclose(FILE *>I<fp>B<);>"
635 msgstr "B<int fclose(FILE *>I<fp>B<);>"
636
637 #. type: Plain text
638 #: build/C/man3/fclose.3:59
639 msgid ""
640 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
641 "any buffered output data using B<fflush>(3))  and closes the underlying file "
642 "descriptor."
643 msgstr ""
644 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
645 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
646 "対応するファイルディスクリプタをクローズする。"
647
648 #. type: Plain text
649 #: build/C/man3/fclose.3:70
650 msgid ""
651 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
652 "I<errno> is set to indicate the error.  In either case any further access "
653 "(including another call to B<fclose>())  to the stream results in undefined "
654 "behavior."
655 msgstr ""
656 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
657 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
658 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
659 "は 未定義の動作を生じさせる。"
660
661 #. type: SH
662 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
663 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
664 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
665 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:84
666 #: build/C/man3/getline.3:125 build/C/man2/link.2:57 build/C/man2/llseek.2:69
667 #: build/C/man2/lseek.2:170 build/C/man2/open.2:485 build/C/man2/pipe.2:97
668 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:85
669 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96
670 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:89
671 #: build/C/man3/tempnam.3:94 build/C/man3/tmpfile.3:56
672 #: build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
673 #, no-wrap
674 msgid "ERRORS"
675 msgstr "エラー"
676
677 #. type: TP
678 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
679 #: build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:171
680 #: build/C/man2/read.2:114 build/C/man3/scanf.3:553 build/C/man2/write.2:126
681 #, no-wrap
682 msgid "B<EBADF>"
683 msgstr "B<EBADF>"
684
685 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
686 #.   low-level file operations on the same stream. If you do get this error,
687 #.   you must have closed the stream's low-level file descriptor using
688 #.   something like close(fileno(fp)).
689 #. type: Plain text
690 #: build/C/man3/fclose.3:80
691 msgid "The file descriptor underlying I<fp> is not valid."
692 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
693
694 #. type: Plain text
695 #: build/C/man3/fclose.3:90
696 msgid ""
697 "The B<fclose>()  function may also fail and set I<errno> for any of the "
698 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
699 msgstr ""
700 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
701 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
702 "された値に設定される。"
703
704 #. type: Plain text
705 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
706 msgid "C89, C99."
707 msgstr "C89, C99."
708
709 #. type: SH
710 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:99 build/C/man3/fgetwc.3:72
711 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
712 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
713 #: build/C/man3/fseeko.3:89 build/C/man2/link.2:143 build/C/man2/llseek.2:84
714 #: build/C/man2/lseek.2:210 build/C/man2/open.2:655 build/C/man3/perror.3:124
715 #: build/C/man3/printf.3:867 build/C/man2/read.2:175
716 #: build/C/man2/readlink.2:130 build/C/man2/readv.2:226
717 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
718 #: build/C/man2/symlink.2:155 build/C/man3/tempnam.3:103
719 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:92
720 #: build/C/man3/wprintf.3:215 build/C/man2/write.2:194
721 #, no-wrap
722 msgid "NOTES"
723 msgstr "注意"
724
725 #. type: Plain text
726 #: build/C/man3/fclose.3:102
727 msgid ""
728 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
729 "library.  To ensure that the data is physically stored on disk the kernel "
730 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
731 msgstr ""
732 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
733 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
734 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
735 "ればならない。"
736
737 #. type: Plain text
738 #: build/C/man3/fclose.3:108
739 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
740 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
741
742 #. type: TH
743 #: build/C/man3/fcloseall.3:25
744 #, no-wrap
745 msgid "FCLOSEALL"
746 msgstr "FCLOSEALL"
747
748 #. type: Plain text
749 #: build/C/man3/fcloseall.3:28
750 msgid "fcloseall - close all open streams"
751 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
752
753 #. type: Plain text
754 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
755 #, no-wrap
756 msgid ""
757 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
758 "B<#include E<lt>stdio.hE<gt>>\n"
759 msgstr ""
760 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
761 "B<#include E<lt>stdio.hE<gt>>\n"
762
763 #. type: Plain text
764 #: build/C/man3/fcloseall.3:34
765 #, no-wrap
766 msgid "B<int fcloseall(void);>\n"
767 msgstr "B<int fcloseall(void);>\n"
768
769 #. type: Plain text
770 #: build/C/man3/fcloseall.3:43
771 msgid ""
772 "The B<fcloseall>()  function closes all of the calling process's open "
773 "streams.  Buffered output for each stream is written before it is closed (as "
774 "for B<fflush>(3)); buffered input is discarded."
775 msgstr ""
776 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
777 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
778 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
779 "れる。"
780
781 #. type: Plain text
782 #: build/C/man3/fcloseall.3:50
783 msgid ""
784 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
785 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
786
787 #. type: Plain text
788 #: build/C/man3/fcloseall.3:55
789 msgid ""
790 "This function returns 0 if all files were successfully closed; on error, "
791 "B<EOF> is returned."
792 msgstr ""
793 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
794 "B<EOF> を返す。"
795
796 #. type: Plain text
797 #: build/C/man3/fcloseall.3:60
798 #, fuzzy
799 #| msgid ""
800 #| "The B<__fwritable>()  function returns a nonzero value if the stream "
801 #| "allows writing, and zero otherwise."
802 msgid ""
803 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
804 "safe."
805 msgstr ""
806 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
807 "外の場合は 0 を返す。"
808
809 #. type: Plain text
810 #: build/C/man3/fcloseall.3:62
811 msgid "This function is a GNU extension."
812 msgstr "この関数は GNU 拡張である。"
813
814 #. type: Plain text
815 #: build/C/man3/fcloseall.3:68
816 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
817 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
818
819 #. type: TH
820 #: build/C/man3/ferror.3:44
821 #, no-wrap
822 msgid "FERROR"
823 msgstr "FERROR"
824
825 #. type: Plain text
826 #: build/C/man3/ferror.3:47
827 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
828 msgstr ""
829 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
830
831 #. type: Plain text
832 #: build/C/man3/ferror.3:51
833 msgid "B<void clearerr(FILE *>I<stream>B<);>"
834 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
835
836 #. type: Plain text
837 #: build/C/man3/ferror.3:53
838 msgid "B<int feof(FILE *>I<stream>B<);>"
839 msgstr "B<int feof(FILE *>I<stream>B<);>"
840
841 #. type: Plain text
842 #: build/C/man3/ferror.3:55
843 msgid "B<int ferror(FILE *>I<stream>B<);>"
844 msgstr "B<int ferror(FILE *>I<stream>B<);>"
845
846 #. type: Plain text
847 #: build/C/man3/ferror.3:57
848 msgid "B<int fileno(FILE *>I<stream>B<);>"
849 msgstr "B<int fileno(FILE *>I<stream>B<);>"
850
851 #. type: Plain text
852 #: build/C/man3/ferror.3:65
853 msgid ""
854 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
855 msgstr ""
856 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
857
858 #. type: Plain text
859 #: build/C/man3/ferror.3:70
860 msgid ""
861 "The function B<clearerr>()  clears the end-of-file and error indicators for "
862 "the stream pointed to by I<stream>."
863 msgstr ""
864 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
865 "子とエラー指示子をクリアする。"
866
867 #. type: Plain text
868 #: build/C/man3/ferror.3:78
869 msgid ""
870 "The function B<feof>()  tests the end-of-file indicator for the stream "
871 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
872 "indicator can be cleared only by the function B<clearerr>()."
873 msgstr ""
874 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
875 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
876 "よってのみクリアすることができる。"
877
878 #. type: Plain text
879 #: build/C/man3/ferror.3:87
880 msgid ""
881 "The function B<ferror>()  tests the error indicator for the stream pointed "
882 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
883 "reset only by the B<clearerr>()  function."
884 msgstr ""
885 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
886 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
887 "()  によってのみリセットすることができる。"
888
889 #. type: Plain text
890 #: build/C/man3/ferror.3:93
891 msgid ""
892 "The function B<fileno>()  examines the argument I<stream> and returns its "
893 "integer descriptor."
894 msgstr ""
895 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
896
897 #. type: Plain text
898 #: build/C/man3/ferror.3:96 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54
899 #: build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
900 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
901 msgstr ""
902 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
903
904 #. type: Plain text
905 #: build/C/man3/ferror.3:106
906 msgid ""
907 "These functions should not fail and do not set the external variable "
908 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
909 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
910 msgstr ""
911 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
912 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
913 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
914
915 #. type: Plain text
916 #: build/C/man3/ferror.3:115
917 #, fuzzy
918 #| msgid ""
919 #| "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 "
920 #| "and C99."
921 msgid ""
922 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
923 "thread-safe."
924 msgstr ""
925 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
926
927 #. type: Plain text
928 #: build/C/man3/ferror.3:122
929 msgid ""
930 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
931 "C99."
932 msgstr ""
933 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
934
935 #. type: Plain text
936 #: build/C/man3/ferror.3:127
937 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
938 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
939
940 #. type: TH
941 #: build/C/man3/fflush.3:45
942 #, no-wrap
943 msgid "FFLUSH"
944 msgstr "FFLUSH"
945
946 #. type: TH
947 #: build/C/man3/fflush.3:45
948 #, no-wrap
949 msgid "2009-09-06"
950 msgstr "2009-09-06"
951
952 #. type: Plain text
953 #: build/C/man3/fflush.3:48
954 msgid "fflush - flush a stream"
955 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
956
957 #. type: Plain text
958 #: build/C/man3/fflush.3:52
959 msgid "B<int fflush(FILE *>I<stream>B<);>"
960 msgstr "B<int fflush(FILE *>I<stream>B<);>"
961
962 #. type: Plain text
963 #: build/C/man3/fflush.3:63
964 msgid ""
965 "For output streams, B<fflush>()  forces a write of all user-space buffered "
966 "data for the given output or update I<stream> via the stream's underlying "
967 "write function.  For input streams, B<fflush>()  discards any buffered data "
968 "that has been fetched from the underlying file, but has not been consumed by "
969 "the application.  The open status of the stream is unaffected."
970 msgstr ""
971 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
972 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
973 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
974 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
975 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
976 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
977 "い。"
978
979 #. type: Plain text
980 #: build/C/man3/fflush.3:71
981 msgid ""
982 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
983 "streams."
984 msgstr ""
985 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
986 "トリームをフラッシュする。"
987
988 #. type: Plain text
989 #: build/C/man3/fflush.3:74
990 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
991 msgstr ""
992 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
993 "と。"
994
995 #. type: Plain text
996 #: build/C/man3/fflush.3:81
997 msgid ""
998 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
999 "I<errno> is set to indicate the error."
1000 msgstr ""
1001 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
1002 "ラーに対応した値に設定される。"
1003
1004 #. type: Plain text
1005 #: build/C/man3/fflush.3:86
1006 msgid "I<Stream> is not an open stream, or is not open for writing."
1007 msgstr ""
1008 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
1009 "ない。"
1010
1011 #. type: Plain text
1012 #: build/C/man3/fflush.3:93
1013 msgid ""
1014 "The function B<fflush>()  may also fail and set I<errno> for any of the "
1015 "errors specified for B<write>(2)."
1016 msgstr ""
1017 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1018 "ある。 この場合 I<errno> もその値に設定される。"
1019
1020 #. type: Plain text
1021 #: build/C/man3/fflush.3:95
1022 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1023 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1024
1025 #.  Verified on: Solaris 8.
1026 #. type: Plain text
1027 #: build/C/man3/fflush.3:99
1028 msgid ""
1029 "The standards do not specify the behavior for input streams.  Most other "
1030 "implementations behave the same as Linux."
1031 msgstr ""
1032 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1033 "は Linux と同じ動作をする。"
1034
1035 #. type: Plain text
1036 #: build/C/man3/fflush.3:108
1037 msgid ""
1038 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1039 "library.  To ensure that the data is physically stored on disk the kernel "
1040 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1041 msgstr ""
1042 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1043 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1044 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1045 "B<fsync>(2)  を用いる。"
1046
1047 #. type: Plain text
1048 #: build/C/man3/fflush.3:116
1049 msgid ""
1050 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1051 "(3), B<unlocked_stdio>(3)"
1052 msgstr ""
1053 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1054 "(3), B<unlocked_stdio>(3)"
1055
1056 #. type: TH
1057 #: build/C/man3/fgetwc.3:18
1058 #, no-wrap
1059 msgid "FGETWC"
1060 msgstr "FGETWC"
1061
1062 #. type: TH
1063 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/getline.3:26
1064 #: build/C/man3/popen.3:40 build/C/man3/tempnam.3:25
1065 #, fuzzy, no-wrap
1066 #| msgid "2013-03-17"
1067 msgid "2013-04-19"
1068 msgstr "2013-03-17"
1069
1070 #. type: Plain text
1071 #: build/C/man3/fgetwc.3:21
1072 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1073 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1074
1075 #. type: Plain text
1076 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1077 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1078 #, no-wrap
1079 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1080 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1081
1082 #. type: Plain text
1083 #: build/C/man3/fgetwc.3:29
1084 #, no-wrap
1085 msgid ""
1086 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1087 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1088 msgstr ""
1089 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1090 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1091
1092 #. type: Plain text
1093 #: build/C/man3/fgetwc.3:44
1094 msgid ""
1095 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1096 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1097 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1098 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1099 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1100 msgstr ""
1101 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1102 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1103 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1104 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1105 "し、 B<WEOF> を返す。"
1106
1107 #. type: Plain text
1108 #: build/C/man3/fgetwc.3:52
1109 msgid ""
1110 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1111 "may be implemented as a macro, and may evaluate its argument more than "
1112 "once.  There is no reason ever to use it."
1113 msgstr ""
1114 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1115 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1116 "ない。この関数を使う理由はもはや存在しない。"
1117
1118 #. type: Plain text
1119 #: build/C/man3/fgetwc.3:64
1120 #, fuzzy
1121 #| msgid ""
1122 #| "The B<fgetwc>()  function returns the next wide-character from the "
1123 #| "stream, or B<WEOF>."
1124 msgid ""
1125 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1126 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1127 msgstr ""
1128 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。"
1129
1130 #. type: Plain text
1131 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1132 msgid "Apart from the usual ones, there is"
1133 msgstr "通常のエラーに加えて、以下のエラーがある:"
1134
1135 #. type: TP
1136 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1137 #, no-wrap
1138 msgid "B<EILSEQ>"
1139 msgstr "B<EILSEQ>"
1140
1141 #. type: Plain text
1142 #: build/C/man3/fgetwc.3:70
1143 msgid ""
1144 "The data obtained from the input stream does not form a valid character."
1145 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1146
1147 #. type: Plain text
1148 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1149 msgid "C99, POSIX.1-2001."
1150 msgstr "C99, POSIX.1-2001."
1151
1152 #. type: Plain text
1153 #: build/C/man3/fgetwc.3:79
1154 msgid ""
1155 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1156 "current locale."
1157 msgstr ""
1158 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1159
1160 #. type: Plain text
1161 #: build/C/man3/fgetwc.3:87
1162 msgid ""
1163 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1164 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1165 "sequence from the stream and then convert it to a wide character."
1166 msgstr ""
1167 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1168 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1169 "換すると期待することは適切である。"
1170
1171 #. type: Plain text
1172 #: build/C/man3/fgetwc.3:92
1173 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1174 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1175
1176 #. type: TH
1177 #: build/C/man3/flockfile.3:25
1178 #, no-wrap
1179 msgid "FLOCKFILE"
1180 msgstr "FLOCKFILE"
1181
1182 #. type: TH
1183 #: build/C/man3/flockfile.3:25 build/C/man3/unlocked_stdio.3:25
1184 #, no-wrap
1185 msgid "2008-08-29"
1186 msgstr "2008-08-29"
1187
1188 #. type: Plain text
1189 #: build/C/man3/flockfile.3:28
1190 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1191 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1192
1193 #. type: Plain text
1194 #: build/C/man3/flockfile.3:33
1195 #, no-wrap
1196 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1197 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1198
1199 #. type: Plain text
1200 #: build/C/man3/flockfile.3:35
1201 #, no-wrap
1202 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1203 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1204
1205 #. type: Plain text
1206 #: build/C/man3/flockfile.3:37
1207 #, no-wrap
1208 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1209 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1210
1211 #. type: Plain text
1212 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1213 msgid "All functions shown above:"
1214 msgstr "上記の全ての関数:"
1215
1216 #. type: Plain text
1217 #: build/C/man3/flockfile.3:49
1218 msgid ""
1219 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1220 "|| _POSIX_SOURCE"
1221 msgstr ""
1222 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1223 "|| _POSIX_SOURCE"
1224
1225 #. type: Plain text
1226 #: build/C/man3/flockfile.3:63
1227 msgid ""
1228 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1229 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1230 "thread.  For each library call, these functions wait until the I<FILE> "
1231 "object is no longer locked by a different thread, then lock it, do the "
1232 "requested I/O, and unlock the object again."
1233 msgstr ""
1234 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1235 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1236 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1237 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1238 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1239 "オブジェクトのロックを解除する。"
1240
1241 #. type: Plain text
1242 #: build/C/man3/flockfile.3:69
1243 msgid ""
1244 "(Note: this locking has nothing to do with the file locking done by "
1245 "functions like B<flock>(2)  and B<lockf>(3).)"
1246 msgstr ""
1247 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1248 "全く無関係である。)"
1249
1250 #. type: Plain text
1251 #: build/C/man3/flockfile.3:77
1252 msgid ""
1253 "All this is invisible to the C-programmer, but there may be two reasons to "
1254 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1255 "actions by one thread belongs together, and should not be interrupted by the "
1256 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1257 "should be avoided for greater efficiency."
1258 msgstr ""
1259 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1260 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1261 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1262 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1263 "避ける必要があるということであろう。"
1264
1265 #. type: Plain text
1266 #: build/C/man3/flockfile.3:94
1267 msgid ""
1268 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1269 "series of I/O actions, then unlock.  This prevents other threads from coming "
1270 "in between.  If the reason for doing this was to achieve greater efficiency, "
1271 "one does the I/O with the nonlocking versions of the stdio functions: with "
1272 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1273 "B<putc>(3)."
1274 msgstr ""
1275 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1276 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1277 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1278 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1279 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1280 "B<putc_unlocked>(3)  を使用する。"
1281
1282 #. type: Plain text
1283 #: build/C/man3/flockfile.3:105
1284 msgid ""
1285 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1286 "by a different thread, then makes the current thread owner of "
1287 "I<*filehandle>, and increments the lockcount."
1288 msgstr ""
1289 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1290 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1291 "ロック数を加算する。"
1292
1293 #. type: Plain text
1294 #: build/C/man3/flockfile.3:109
1295 msgid "The B<funlockfile>()  function decrements the lock count."
1296 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1297
1298 #. type: Plain text
1299 #: build/C/man3/flockfile.3:120
1300 msgid ""
1301 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1302 "It does nothing in case some other thread owns I<*filehandle>, and it "
1303 "obtains ownership and increments the lockcount otherwise."
1304 msgstr ""
1305 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1306 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1307 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1308
1309 #. type: Plain text
1310 #: build/C/man3/flockfile.3:125
1311 msgid ""
1312 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1313 "obtained), and nonzero for failure."
1314 msgstr ""
1315 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1316 "の値を返す。"
1317
1318 #. type: Plain text
1319 #: build/C/man3/flockfile.3:127
1320 msgid "None."
1321 msgstr "なし。"
1322
1323 #. type: Plain text
1324 #: build/C/man3/flockfile.3:129 build/C/man3/popen.3:174
1325 msgid "POSIX.1-2001."
1326 msgstr "POSIX.1-2001."
1327
1328 #. type: SH
1329 #: build/C/man3/flockfile.3:129
1330 #, no-wrap
1331 msgid "AVAILABILITY"
1332 msgstr "可用性"
1333
1334 #. type: Plain text
1335 #: build/C/man3/flockfile.3:135
1336 msgid ""
1337 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1338 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1339 msgstr ""
1340 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1341 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1342
1343 #. type: Plain text
1344 #: build/C/man3/flockfile.3:137
1345 msgid "B<unlocked_stdio>(3)"
1346 msgstr "B<unlocked_stdio>(3)"
1347
1348 #. type: TH
1349 #: build/C/man3/fmemopen.3:10
1350 #, no-wrap
1351 msgid "FMEMOPEN"
1352 msgstr "FMEMOPEN"
1353
1354 #. type: TH
1355 #: build/C/man3/fmemopen.3:10
1356 #, no-wrap
1357 msgid "2012-04-28"
1358 msgstr "2012-04-28"
1359
1360 #. type: Plain text
1361 #: build/C/man3/fmemopen.3:13
1362 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1363 msgstr ""
1364 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1365 "する"
1366
1367 #. type: Plain text
1368 #: build/C/man3/fmemopen.3:18
1369 #, no-wrap
1370 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1371 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1372
1373 #. type: Plain text
1374 #: build/C/man3/fmemopen.3:20
1375 #, no-wrap
1376 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1377 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1378
1379 #. type: Plain text
1380 #: build/C/man3/fmemopen.3:24
1381 #, no-wrap
1382 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1383 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1384
1385 #. type: Plain text
1386 #: build/C/man3/fmemopen.3:34
1387 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1388 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1389
1390 #. type: Plain text
1391 #: build/C/man3/fmemopen.3:57
1392 msgid ""
1393 "The B<fmemopen>()  function opens a stream that permits the access specified "
1394 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1395 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1396 "long."
1397 msgstr ""
1398 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1399 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1400 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1401 "I<size> バイトの長さでなければならない。"
1402
1403 #. type: Plain text
1404 #: build/C/man3/fmemopen.3:77
1405 msgid ""
1406 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1407 "an append mode, then the initial file position is set to the location of the "
1408 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1409 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1410 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1411 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1412 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1413 "e., the value specified by the I<size> argument), rather than the current "
1414 "string length."
1415 msgstr ""
1416 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1417 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1418 "最初の NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1419 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1420 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1421 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1422 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1423 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1424 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1425
1426 #. type: Plain text
1427 #: build/C/man3/fmemopen.3:89
1428 msgid ""
1429 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1430 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1431 "there is space.  The caller should ensure that an extra byte is available in "
1432 "the buffer (and that I<size> counts that byte)  to allow for this."
1433 msgstr ""
1434 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1435 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1436 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1437 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1438
1439 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1440 #.  and
1441 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1442 #. type: Plain text
1443 #: build/C/man3/fmemopen.3:107
1444 msgid ""
1445 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1446 "(By default, such errors will be visible only when the I<stdio> buffer is "
1447 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1448 "detect errors at the time of an output operation.  Alternatively, the caller "
1449 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1450 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1451 msgstr ""
1452 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1453 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1454 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1455 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1456 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1457 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1458 "stdio に教える方法がある。)"
1459
1460 #. type: Plain text
1461 #: build/C/man3/fmemopen.3:115
1462 msgid ""
1463 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1464 "not cause read operations to return an end-of-file indication.  A read from "
1465 "the buffer will only indicate end-of-file when the file pointer advances "
1466 "I<size> bytes past the start of the buffer."
1467 msgstr ""
1468 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1469 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1470 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1471 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1472
1473 #. type: Plain text
1474 #: build/C/man3/fmemopen.3:130
1475 msgid ""
1476 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1477 "buffer I<size> bytes long.  This is useful for an application that wants to "
1478 "write data to a temporary buffer and then read it back again.  The buffer is "
1479 "automatically freed when the stream is closed.  Note that the caller has no "
1480 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1481 "see B<open_memstream>()  below)."
1482 msgstr ""
1483 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1484 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1485 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1486 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1487 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1488 "の B<open_memstream>()  も参照)。"
1489
1490 #. type: Plain text
1491 #: build/C/man3/fmemopen.3:141
1492 msgid ""
1493 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1494 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1495 "automatically grows as required.  After closing the stream, the caller "
1496 "should B<free>(3)  this buffer."
1497 msgstr ""
1498 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1499 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1500 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1501 "B<free>(3)  すべきである。"
1502
1503 #. type: Plain text
1504 #: build/C/man3/fmemopen.3:156
1505 msgid ""
1506 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1507 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1508 "respectively, a pointer to the buffer and the current size of the buffer.  "
1509 "These values remain valid only as long as the caller performs no further "
1510 "output on the stream.  If further output is performed, then the stream must "
1511 "again be flushed before trying to access these variables."
1512 msgstr ""
1513 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1514 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1515 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1516 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1517 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1518
1519 #. type: Plain text
1520 #: build/C/man3/fmemopen.3:162
1521 msgid ""
1522 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1523 "included in the size value stored at I<sizeloc>."
1524 msgstr ""
1525 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1526 "されるサイズには「含まれない」。"
1527
1528 #. type: Plain text
1529 #: build/C/man3/fmemopen.3:170
1530 msgid ""
1531 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1532 "(3).  Moving the file position past the end of the data already written "
1533 "fills the intervening space with zeros."
1534 msgstr ""
1535 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1536 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1537 "は 0 で埋められる。"
1538
1539 #. type: Plain text
1540 #: build/C/man3/fmemopen.3:176
1541 msgid ""
1542 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1543 "wide characters instead of bytes."
1544 msgstr ""
1545 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1546 "ド文字に対して操作を行う点が異なる。"
1547
1548 #. type: Plain text
1549 #: build/C/man3/fmemopen.3:188
1550 msgid ""
1551 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1552 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1553 "and I<errno> is set to indicate the error."
1554 msgstr ""
1555 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1556 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1557 "し、 I<errno> にエラーを示す値をセットする。"
1558
1559 #. type: SH
1560 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1561 #: build/C/man3/getline.3:135 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1562 #, no-wrap
1563 msgid "VERSIONS"
1564 msgstr "バージョン"
1565
1566 #. type: Plain text
1567 #: build/C/man3/fmemopen.3:195
1568 msgid ""
1569 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1570 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1571 msgstr ""
1572 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1573 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1574
1575 #. type: Plain text
1576 #: build/C/man3/fmemopen.3:199
1577 msgid ""
1578 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1579 "not widely available on other systems."
1580 msgstr ""
1581 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1582 "のシステムで広く利用可能である。"
1583
1584 #.  http://austingroupbugs.net/view.php?id=396
1585 #. type: Plain text
1586 #: build/C/man3/fmemopen.3:207
1587 msgid ""
1588 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1589 "However, Technical Corrigendum 1 adjusts the standard to allow "
1590 "implementation-specific treatment for this case, thus permitting the glibc "
1591 "treatment of \\(aqb\\(aq."
1592 msgstr ""
1593 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1594 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1595 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1596 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1597
1598 #. type: Plain text
1599 #: build/C/man3/fmemopen.3:213
1600 msgid ""
1601 "There is no file descriptor associated with the file stream returned by "
1602 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1603 "returned stream)."
1604 msgstr ""
1605 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1606 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1607 "とになる)。"
1608
1609 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1610 #. type: Plain text
1611 #: build/C/man3/fmemopen.3:220
1612 msgid ""
1613 "In glibc before version 2.7, seeking past the end of a stream created by "
1614 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1615 "call fails, returning -1."
1616 msgstr ""
1617 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1618 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1619 "B<fseek>(3)  が失敗し -1 が返る。"
1620
1621 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1622 #. type: Plain text
1623 #: build/C/man3/fmemopen.3:231
1624 msgid ""
1625 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1626 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1627 "stream that then returned end of file on the first attempt at reading.  "
1628 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1629 msgstr ""
1630 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1631 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1632 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1633 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1634
1635 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1636 #. type: Plain text
1637 #: build/C/man3/fmemopen.3:239
1638 msgid ""
1639 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1640 "file position to the first null byte, but (if the file offset is reset to a "
1641 "location other than the end of the stream)  does not force subsequent writes "
1642 "to append at the end of the stream."
1643 msgstr ""
1644 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1645 "ファイル位置の初期値は最初の NULL バイトに設定されるが、(ファイル\n"
1646 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1647 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1648
1649 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1650 #. type: Plain text
1651 #: build/C/man3/fmemopen.3:255
1652 msgid ""
1653 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1654 "\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1655 "according to POSIX.1-2008, the initial file position should be set to the "
1656 "next byte after the end of the buffer.  However, in this case the glibc "
1657 "B<fmemopen>()  sets the file position to -1."
1658 msgstr ""
1659 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1660 "I<size> 引き数で指定した範囲の I<buf> 内に NULL バイトがない場合、\n"
1661 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1662 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1663 "この場合ファイル位置は -1 に設定される。"
1664
1665 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1666 #. type: Plain text
1667 #: build/C/man3/fmemopen.3:268
1668 msgid ""
1669 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1670 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1671 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1672 "I<mode> by B<fopen>(3)."
1673 msgstr ""
1674 "B<fmemopen>() でバイナリモードを指定するには、\n"
1675 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1676 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1677 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1678
1679 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1680 #. type: Plain text
1681 #: build/C/man3/fmemopen.3:276
1682 msgid ""
1683 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1684 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1685 msgstr ""
1686 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1687 "ABI (Application Binary Interface) が黙って変更された。\n"
1688 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1689
1690 #. type: SH
1691 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1692 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1693 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:973
1694 #: build/C/man2/readlink.2:157 build/C/man2/readv.2:265
1695 #: build/C/man3/scanf.3:681
1696 #, no-wrap
1697 msgid "EXAMPLE"
1698 msgstr "例"
1699
1700 #. type: Plain text
1701 #: build/C/man3/fmemopen.3:286
1702 msgid ""
1703 "The program below uses B<fmemopen>()  to open an input buffer, and "
1704 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1705 "scans its input string (taken from the program's first command-line "
1706 "argument) reading integers, and writes the squares of these integers to the "
1707 "output buffer.  An example of the output produced by this program is the "
1708 "following:"
1709 msgstr ""
1710 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1711 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1712 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1713 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1714 "ムの実行例は以下のようになる。"
1715
1716 #. type: Plain text
1717 #: build/C/man3/fmemopen.3:291
1718 #, no-wrap
1719 msgid ""
1720 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1721 "size=11; ptr=1 529 1849\n"
1722 msgstr ""
1723 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1724 "size=11; ptr=1 529 1849\n"
1725
1726 #. type: SS
1727 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1728 #, no-wrap
1729 msgid "Program source"
1730 msgstr "プログラムのソース"
1731
1732 #. type: Plain text
1733 #: build/C/man3/fmemopen.3:300
1734 #, no-wrap
1735 msgid ""
1736 "#define _GNU_SOURCE\n"
1737 "#include E<lt>string.hE<gt>\n"
1738 "#include E<lt>stdio.hE<gt>\n"
1739 "#include E<lt>stdlib.hE<gt>\n"
1740 msgstr ""
1741 "#define _GNU_SOURCE\n"
1742 "#include E<lt>string.hE<gt>\n"
1743 "#include E<lt>stdio.hE<gt>\n"
1744 "#include E<lt>stdlib.hE<gt>\n"
1745
1746 #. type: Plain text
1747 #: build/C/man3/fmemopen.3:303
1748 #, no-wrap
1749 msgid ""
1750 "#define handle_error(msg) \\e\n"
1751 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1752 msgstr ""
1753 "#define handle_error(msg) \\e\n"
1754 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1755
1756 #. type: Plain text
1757 #: build/C/man3/fmemopen.3:311
1758 #, no-wrap
1759 msgid ""
1760 "int\n"
1761 "main(int argc, char *argv[])\n"
1762 "{\n"
1763 "    FILE *out, *in;\n"
1764 "    int v, s;\n"
1765 "    size_t size;\n"
1766 "    char *ptr;\n"
1767 msgstr ""
1768 "int\n"
1769 "main(int argc, char *argv[])\n"
1770 "{\n"
1771 "    FILE *out, *in;\n"
1772 "    int v, s;\n"
1773 "    size_t size;\n"
1774 "    char *ptr;\n"
1775
1776 #. type: Plain text
1777 #: build/C/man3/fmemopen.3:316
1778 #, no-wrap
1779 msgid ""
1780 "    if (argc != 2) {\n"
1781 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1782 "\texit(EXIT_FAILURE);\n"
1783 "    }\n"
1784 msgstr ""
1785 "    if (argc != 2) {\n"
1786 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1787 "\texit(EXIT_FAILURE);\n"
1788 "    }\n"
1789
1790 #. type: Plain text
1791 #: build/C/man3/fmemopen.3:320
1792 #, no-wrap
1793 msgid ""
1794 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1795 "    if (in == NULL)\n"
1796 "        handle_error(\"fmemopen\");\n"
1797 msgstr ""
1798 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1799 "    if (in == NULL)\n"
1800 "        handle_error(\"fmemopen\");\n"
1801
1802 #. type: Plain text
1803 #: build/C/man3/fmemopen.3:324
1804 #, no-wrap
1805 msgid ""
1806 "    out = open_memstream(&ptr, &size);\n"
1807 "    if (out == NULL)\n"
1808 "        handle_error(\"open_memstream\");\n"
1809 msgstr ""
1810 "    out = open_memstream(&ptr, &size);\n"
1811 "    if (out == NULL)\n"
1812 "        handle_error(\"open_memstream\");\n"
1813
1814 #. type: Plain text
1815 #: build/C/man3/fmemopen.3:329
1816 #, no-wrap
1817 msgid ""
1818 "    for (;;) {\n"
1819 "        s = fscanf(in, \"%d\", &v);\n"
1820 "        if (s E<lt>= 0)\n"
1821 "            break;\n"
1822 msgstr ""
1823 "    for (;;) {\n"
1824 "        s = fscanf(in, \"%d\", &v);\n"
1825 "        if (s E<lt>= 0)\n"
1826 "            break;\n"
1827
1828 #. type: Plain text
1829 #: build/C/man3/fmemopen.3:340
1830 #, no-wrap
1831 msgid ""
1832 "        s = fprintf(out, \"%d \", v * v);\n"
1833 "        if (s == -1)\n"
1834 "            handle_error(\"fprintf\");\n"
1835 "    }\n"
1836 "    fclose(in);\n"
1837 "    fclose(out);\n"
1838 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1839 "    free(ptr);\n"
1840 "    exit(EXIT_SUCCESS);\n"
1841 "}\n"
1842 msgstr ""
1843 "        s = fprintf(out, \"%d \", v * v);\n"
1844 "        if (s == -1)\n"
1845 "            handle_error(\"fprintf\");\n"
1846 "    }\n"
1847 "    fclose(in);\n"
1848 "    fclose(out);\n"
1849 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1850 "    free(ptr);\n"
1851 "    exit(EXIT_SUCCESS);\n"
1852 "}\n"
1853
1854 #. type: Plain text
1855 #: build/C/man3/fmemopen.3:344
1856 msgid "B<fopen>(3), B<fopencookie>(3)"
1857 msgstr "B<fopen>(3), B<fopencookie>(3)"
1858
1859 #. type: TH
1860 #: build/C/man3/fmtmsg.3:13
1861 #, no-wrap
1862 msgid "FMTMSG"
1863 msgstr "FMTMSG"
1864
1865 #. type: Plain text
1866 #: build/C/man3/fmtmsg.3:16
1867 msgid "fmtmsg - print formatted error messages"
1868 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1869
1870 #. type: Plain text
1871 #: build/C/man3/fmtmsg.3:19
1872 #, no-wrap
1873 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1874 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1875
1876 #. type: Plain text
1877 #: build/C/man3/fmtmsg.3:21
1878 #, no-wrap
1879 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1880 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1881
1882 #. type: Plain text
1883 #: build/C/man3/fmtmsg.3:23
1884 #, no-wrap
1885 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1886 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1887
1888 #. type: Plain text
1889 #: build/C/man3/fmtmsg.3:25
1890 #, no-wrap
1891 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1892 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1893
1894 #. type: Plain text
1895 #: build/C/man3/fmtmsg.3:36
1896 msgid ""
1897 "This function displays a message described by its arguments on the device"
1898 "(s)  specified in the I<classification> argument.  For messages written to "
1899 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1900 msgstr ""
1901 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1902 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1903 "は、 B<MSGVERB> 環境変数に依存する。"
1904
1905 #. type: Plain text
1906 #: build/C/man3/fmtmsg.3:43
1907 msgid ""
1908 "The I<label> argument identifies the source of the message.  The string must "
1909 "consist of two colon separated parts where the first part has not more than "
1910 "10 and the second part not more than 14 characters."
1911 msgstr ""
1912 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1913 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1914 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1915
1916 #. type: Plain text
1917 #: build/C/man3/fmtmsg.3:47
1918 msgid "The I<text> argument describes the condition of the error."
1919 msgstr "I<text> 引き数にはエラー条件を記述する。"
1920
1921 #. type: Plain text
1922 #: build/C/man3/fmtmsg.3:52
1923 msgid ""
1924 "The I<action> argument describes possible steps to recover from the error.  "
1925 "If it is printed, it is prefixed by \"TO FIX: \"."
1926 msgstr ""
1927 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1928 "れが表示される場合、\"TO FIX: \" が前に付く。"
1929
1930 #. type: Plain text
1931 #: build/C/man3/fmtmsg.3:60
1932 msgid ""
1933 "The I<tag> argument is a reference to the online documentation where more "
1934 "information can be found.  It should contain the I<label> value and a unique "
1935 "identification number."
1936 msgstr ""
1937 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1938 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1939
1940 #. type: SS
1941 #: build/C/man3/fmtmsg.3:60
1942 #, no-wrap
1943 msgid "Dummy arguments"
1944 msgstr "ダミー引き数"
1945
1946 #. type: Plain text
1947 #: build/C/man3/fmtmsg.3:79
1948 #, fuzzy
1949 #| msgid ""
1950 #| "Each of the arguments can have a dummy value.  The dummy classification "
1951 #| "value B<MM_NULLMC> (0L) does not specify any output, so nothing is "
1952 #| "printed.  The dummy severity value B<NO_SEV> (0) says that no severity is "
1953 #| "supplied.  The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, "
1954 #| "B<MM_NULLTAG> are synonyms for I<((char *) 0)>, the empty string, and "
1955 #| "B<MM_NULLSEV> is a synonym for B<NO_SEV>."
1956 msgid ""
1957 "Each of the arguments can have a dummy value.  The dummy classification "
1958 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1959 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1960 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1961 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
1962 "synonym for B<NO_SEV>."
1963 msgstr ""
1964 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1965 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1966 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1967 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1968 "((char *) 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名であ"
1969 "る。"
1970
1971 #. type: SS
1972 #: build/C/man3/fmtmsg.3:79
1973 #, no-wrap
1974 msgid "The classification argument"
1975 msgstr "classification 引き数"
1976
1977 #. type: Plain text
1978 #: build/C/man3/fmtmsg.3:83
1979 msgid ""
1980 "The I<classification> argument is the sum of values describing 4 types of "
1981 "information."
1982 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1983
1984 #. type: Plain text
1985 #: build/C/man3/fmtmsg.3:86
1986 msgid "The first value defines the output channel."
1987 msgstr "最初の値は出力チャンネルを定義する。"
1988
1989 #. type: TP
1990 #: build/C/man3/fmtmsg.3:86
1991 #, no-wrap
1992 msgid "B<MM_PRINT>"
1993 msgstr "B<MM_PRINT>"
1994
1995 #. type: Plain text
1996 #: build/C/man3/fmtmsg.3:90
1997 msgid "Output to I<stderr>."
1998 msgstr "I<stderr> に出力する。"
1999
2000 #. type: TP
2001 #: build/C/man3/fmtmsg.3:90
2002 #, no-wrap
2003 msgid "B<MM_CONSOLE>"
2004 msgstr "B<MM_CONSOLE>"
2005
2006 #. type: Plain text
2007 #: build/C/man3/fmtmsg.3:93
2008 msgid "Output to the system console."
2009 msgstr "システムコンソールに出力する。"
2010
2011 #. type: TP
2012 #: build/C/man3/fmtmsg.3:93
2013 #, no-wrap
2014 msgid "B<MM_PRINT | MM_CONSOLE>"
2015 msgstr "B<MM_PRINT | MM_CONSOLE>"
2016
2017 #. type: Plain text
2018 #: build/C/man3/fmtmsg.3:96
2019 msgid "Output to both."
2020 msgstr "両方に出力する。"
2021
2022 #. type: Plain text
2023 #: build/C/man3/fmtmsg.3:98
2024 msgid "The second value is the source of the error:"
2025 msgstr "2 番目の値はエラーの発生源である:"
2026
2027 #. type: TP
2028 #: build/C/man3/fmtmsg.3:98
2029 #, no-wrap
2030 msgid "B<MM_HARD>"
2031 msgstr "B<MM_HARD>"
2032
2033 #. type: Plain text
2034 #: build/C/man3/fmtmsg.3:101
2035 msgid "A hardware error occurred."
2036 msgstr "ハードウェアエラーが起こった。"
2037
2038 #. type: TP
2039 #: build/C/man3/fmtmsg.3:101
2040 #, no-wrap
2041 msgid "B<MM_FIRM>"
2042 msgstr "B<MM_FIRM>"
2043
2044 #. type: Plain text
2045 #: build/C/man3/fmtmsg.3:104
2046 msgid "A firmware error occurred."
2047 msgstr "ファームウェアエラーが起こった。"
2048
2049 #. type: TP
2050 #: build/C/man3/fmtmsg.3:104
2051 #, no-wrap
2052 msgid "B<MM_SOFT>"
2053 msgstr "B<MM_SOFT>"
2054
2055 #. type: Plain text
2056 #: build/C/man3/fmtmsg.3:107
2057 msgid "A software error occurred."
2058 msgstr "ソフトウェアエラーが起こった。"
2059
2060 #. type: Plain text
2061 #: build/C/man3/fmtmsg.3:109
2062 msgid "The third value encodes the detector of the problem:"
2063 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2064
2065 #. type: TP
2066 #: build/C/man3/fmtmsg.3:109
2067 #, no-wrap
2068 msgid "B<MM_APPL>"
2069 msgstr "B<MM_APPL>"
2070
2071 #. type: Plain text
2072 #: build/C/man3/fmtmsg.3:112
2073 msgid "It is detected by an application."
2074 msgstr "アプリケーションによって検知された。"
2075
2076 #. type: TP
2077 #: build/C/man3/fmtmsg.3:112
2078 #, no-wrap
2079 msgid "B<MM_UTIL>"
2080 msgstr "B<MM_UTIL>"
2081
2082 #. type: Plain text
2083 #: build/C/man3/fmtmsg.3:115
2084 msgid "It is detected by a utility."
2085 msgstr "ユーティリティによって検知された。"
2086
2087 #. type: TP
2088 #: build/C/man3/fmtmsg.3:115
2089 #, no-wrap
2090 msgid "B<MM_OPSYS>"
2091 msgstr "B<MM_OPSYS>"
2092
2093 #. type: Plain text
2094 #: build/C/man3/fmtmsg.3:118
2095 msgid "It is detected by the operating system."
2096 msgstr "オペレーティングシステムによって検知された。"
2097
2098 #. type: Plain text
2099 #: build/C/man3/fmtmsg.3:120
2100 msgid "The fourth value shows the severity of the incident:"
2101 msgstr "4 番目の値は問題の重大度を表す:"
2102
2103 #. type: TP
2104 #: build/C/man3/fmtmsg.3:120
2105 #, no-wrap
2106 msgid "B<MM_RECOVER>"
2107 msgstr "B<MM_RECOVER>"
2108
2109 #. type: Plain text
2110 #: build/C/man3/fmtmsg.3:123
2111 msgid "It is a recoverable error."
2112 msgstr "回復可能なエラーである。"
2113
2114 #. type: TP
2115 #: build/C/man3/fmtmsg.3:123
2116 #, no-wrap
2117 msgid "B<MM_NRECOV>"
2118 msgstr "B<MM_NRECOV>"
2119
2120 #. type: Plain text
2121 #: build/C/man3/fmtmsg.3:126
2122 msgid "It is a nonrecoverable error."
2123 msgstr "回復不可能なエラーである。"
2124
2125 #. type: SS
2126 #: build/C/man3/fmtmsg.3:126
2127 #, no-wrap
2128 msgid "The severity argument"
2129 msgstr "severity 引き数"
2130
2131 #. type: Plain text
2132 #: build/C/man3/fmtmsg.3:130
2133 msgid "The I<severity> argument can take one of the following values:"
2134 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2135
2136 #. type: TP
2137 #: build/C/man3/fmtmsg.3:130
2138 #, no-wrap
2139 msgid "B<MM_NOSEV>"
2140 msgstr "B<MM_NOSEV>"
2141
2142 #. type: Plain text
2143 #: build/C/man3/fmtmsg.3:133
2144 msgid "No severity is printed."
2145 msgstr "重大度は表示されない。"
2146
2147 #. type: TP
2148 #: build/C/man3/fmtmsg.3:133
2149 #, no-wrap
2150 msgid "B<MM_HALT>"
2151 msgstr "B<MM_HALT>"
2152
2153 #. type: Plain text
2154 #: build/C/man3/fmtmsg.3:136
2155 msgid "This value is printed as HALT."
2156 msgstr "この値は HALT として表示される。"
2157
2158 #. type: TP
2159 #: build/C/man3/fmtmsg.3:136
2160 #, no-wrap
2161 msgid "B<MM_ERROR>"
2162 msgstr "B<MM_ERROR>"
2163
2164 #. type: Plain text
2165 #: build/C/man3/fmtmsg.3:139
2166 msgid "This value is printed as ERROR."
2167 msgstr "この値は ERROR として表示される。"
2168
2169 #. type: TP
2170 #: build/C/man3/fmtmsg.3:139
2171 #, no-wrap
2172 msgid "B<MM_WARNING>"
2173 msgstr "B<MM_WARNING>"
2174
2175 #. type: Plain text
2176 #: build/C/man3/fmtmsg.3:142
2177 msgid "This value is printed as WARNING."
2178 msgstr "この値は WARNING として表示される。"
2179
2180 #. type: TP
2181 #: build/C/man3/fmtmsg.3:142
2182 #, no-wrap
2183 msgid "B<MM_INFO>"
2184 msgstr "B<MM_INFO>"
2185
2186 #. type: Plain text
2187 #: build/C/man3/fmtmsg.3:145
2188 msgid "This value is printed as INFO."
2189 msgstr "この値は INFO として表示される。"
2190
2191 #. type: Plain text
2192 #: build/C/man3/fmtmsg.3:152
2193 msgid ""
2194 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2195 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2196 "print."
2197 msgstr ""
2198 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2199 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2200
2201 #. type: Plain text
2202 #: build/C/man3/fmtmsg.3:154
2203 msgid "The function can return 4 values:"
2204 msgstr "関数は 4 つの値を返す:"
2205
2206 #. type: TP
2207 #: build/C/man3/fmtmsg.3:154
2208 #, no-wrap
2209 msgid "B<MM_OK>"
2210 msgstr "B<MM_OK>"
2211
2212 #. type: Plain text
2213 #: build/C/man3/fmtmsg.3:157
2214 msgid "Everything went smooth."
2215 msgstr "全てがうまくいった。"
2216
2217 #. type: TP
2218 #: build/C/man3/fmtmsg.3:157
2219 #, no-wrap
2220 msgid "B<MM_NOTOK>"
2221 msgstr "B<MM_NOTOK>"
2222
2223 #. type: Plain text
2224 #: build/C/man3/fmtmsg.3:160
2225 msgid "Complete failure."
2226 msgstr "完全に失敗した。"
2227
2228 #. type: TP
2229 #: build/C/man3/fmtmsg.3:160
2230 #, no-wrap
2231 msgid "B<MM_NOMSG>"
2232 msgstr "B<MM_NOMSG>"
2233
2234 #. type: Plain text
2235 #: build/C/man3/fmtmsg.3:164
2236 msgid "Error writing to I<stderr>."
2237 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2238
2239 #. type: TP
2240 #: build/C/man3/fmtmsg.3:164
2241 #, no-wrap
2242 msgid "B<MM_NOCON>"
2243 msgstr "B<MM_NOCON>"
2244
2245 #. type: Plain text
2246 #: build/C/man3/fmtmsg.3:167
2247 msgid "Error writing to the console."
2248 msgstr "コンソールに書き込むときにエラーが起こった。"
2249
2250 #. type: SH
2251 #: build/C/man3/fmtmsg.3:167
2252 #, no-wrap
2253 msgid "ENVIRONMENT"
2254 msgstr "環境変数"
2255
2256 #. type: Plain text
2257 #: build/C/man3/fmtmsg.3:178
2258 msgid ""
2259 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2260 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2261 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2262 "separated list of valid keywords, then only the parts of the message "
2263 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2264 "\"severity\", \"text\", \"action\" and \"tag\"."
2265 msgstr ""
2266 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2267 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2268 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2269 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2270 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2271
2272 #. type: Plain text
2273 #: build/C/man3/fmtmsg.3:190
2274 msgid ""
2275 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2276 "levels.  By default, only the five severity levels described above are "
2277 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2278 "If the user puts B<SEV_LEVEL> with a format like"
2279 msgstr ""
2280 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2281 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2282 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2283 "B<SEV_LEVEL> を"
2284
2285 #. type: Plain text
2286 #: build/C/man3/fmtmsg.3:193
2287 msgid "SEV_LEVEL=[description[:description[:...]]]"
2288 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2289
2290 #. type: Plain text
2291 #: build/C/man3/fmtmsg.3:198
2292 msgid ""
2293 "in the environment of the process before the first call to B<fmtmsg>(), "
2294 "where each description is of the form"
2295 msgstr ""
2296 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2297 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2298 "指定された printstring を表示する。 各 description は"
2299
2300 #. type: Plain text
2301 #: build/C/man3/fmtmsg.3:201
2302 msgid "severity-keyword,level,printstring"
2303 msgstr "severity-keyword,level,printstring"
2304
2305 #. type: Plain text
2306 #: build/C/man3/fmtmsg.3:208
2307 msgid ""
2308 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2309 "addition to the standard levels 0-4), and use the indicated printstring when "
2310 "such a level occurs."
2311 msgstr "という形式である。"
2312
2313 #. type: Plain text
2314 #: build/C/man3/fmtmsg.3:222
2315 msgid ""
2316 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2317 "present.  The level part is a string representation of a number.  The "
2318 "numeric value must be a number greater than 4.  This value must be used in "
2319 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2320 "possible to overwrite any of the predefined classes.  The printstring is the "
2321 "string printed when a message of this class is processed by B<fmtmsg>()."
2322 msgstr ""
2323 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2324 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2325 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2326 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2327 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2328 "た場合に表示される文字列である。"
2329
2330 #. type: Plain text
2331 #: build/C/man3/fmtmsg.3:225
2332 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2333 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2334
2335 #. type: Plain text
2336 #: build/C/man3/fmtmsg.3:231
2337 msgid ""
2338 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2339 "not protected, so it is not thread-safe."
2340 msgstr ""
2341
2342 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2343 #. type: Plain text
2344 #: build/C/man3/fmtmsg.3:237
2345 msgid ""
2346 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2347 "static variable, so it is thread-safe."
2348 msgstr ""
2349
2350 #. type: Plain text
2351 #: build/C/man3/fmtmsg.3:252
2352 msgid ""
2353 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2354 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2355 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2356 msgstr ""
2357 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2358 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2359 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2360
2361 #. type: Plain text
2362 #: build/C/man3/fmtmsg.3:256
2363 msgid ""
2364 "System V and UnixWare man pages tell us that these functions have been "
2365 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2366 "vlfmt()\", and will be removed later."
2367 msgstr ""
2368 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2369 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2370 "は削除される予定である」と書かれている。"
2371
2372 #. type: Plain text
2373 #: build/C/man3/fmtmsg.3:261
2374 #, no-wrap
2375 msgid ""
2376 "#include E<lt>stdio.hE<gt>\n"
2377 "#include E<lt>stdlib.hE<gt>\n"
2378 "#include E<lt>fmtmsg.hE<gt>\n"
2379 msgstr ""
2380 "#include E<lt>stdio.hE<gt>\n"
2381 "#include E<lt>stdlib.hE<gt>\n"
2382 "#include E<lt>fmtmsg.hE<gt>\n"
2383
2384 #. type: Plain text
2385 #: build/C/man3/fmtmsg.3:267
2386 #, no-wrap
2387 msgid ""
2388 "int\n"
2389 "main(void)\n"
2390 "{\n"
2391 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2392 "    int err;\n"
2393 msgstr ""
2394 "int\n"
2395 "main(void)\n"
2396 "{\n"
2397 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2398 "    int err;\n"
2399
2400 #. type: Plain text
2401 #: build/C/man3/fmtmsg.3:288
2402 #, no-wrap
2403 msgid ""
2404 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2405 "                \"unknown mount option\", \"See mount(8).\",\n"
2406 "                \"util-linux:mount:017\");\n"
2407 "    switch (err) {\n"
2408 "    case MM_OK:\n"
2409 "        break;\n"
2410 "    case MM_NOTOK:\n"
2411 "        printf(\"Nothing printed\\en\");\n"
2412 "        break;\n"
2413 "    case MM_NOMSG:\n"
2414 "        printf(\"Nothing printed to stderr\\en\");\n"
2415 "        break;\n"
2416 "    case MM_NOCON:\n"
2417 "        printf(\"No console output\\en\");\n"
2418 "        break;\n"
2419 "    default:\n"
2420 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2421 "    }\n"
2422 "    exit(EXIT_SUCCESS);\n"
2423 "}\n"
2424 msgstr ""
2425 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2426 "                \"unknown mount option\", \"See mount(8).\",\n"
2427 "                \"util-linux:mount:017\");\n"
2428 "    switch (err) {\n"
2429 "    case MM_OK:\n"
2430 "      break;\n"
2431 "    case MM_NOTOK:\n"
2432 "        printf(\"Nothing printed\\en\");\n"
2433 "        break;\n"
2434 "    case MM_NOMSG:\n"
2435 "        printf(\"Nothing printed to stderr\\en\");\n"
2436 "        break;\n"
2437 "    case MM_NOCON:\n"
2438 "        printf(\"No console output\\en\");\n"
2439 "        break;\n"
2440 "    default:\n"
2441 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2442 "    }\n"
2443 "    exit(EXIT_SUCCESS);\n"
2444 "}\n"
2445
2446 #. type: Plain text
2447 #: build/C/man3/fmtmsg.3:291
2448 msgid "The output should be:"
2449 msgstr "出力は"
2450
2451 #. type: Plain text
2452 #: build/C/man3/fmtmsg.3:295
2453 #, no-wrap
2454 msgid ""
2455 "    util-linux:mount: ERROR: unknown mount option\n"
2456 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2457 msgstr ""
2458 "    util-linux:mount: ERROR: unknown mount option\n"
2459 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2460
2461 #. type: Plain text
2462 #: build/C/man3/fmtmsg.3:298
2463 msgid "and after"
2464 msgstr "のようになり、"
2465
2466 #. type: Plain text
2467 #: build/C/man3/fmtmsg.3:301
2468 #, no-wrap
2469 msgid "    MSGVERB=text:action; export MSGVERB\n"
2470 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2471
2472 #. type: Plain text
2473 #: build/C/man3/fmtmsg.3:304
2474 msgid "the output becomes:"
2475 msgstr "を実行すると、次のようになる。"
2476
2477 #. type: Plain text
2478 #: build/C/man3/fmtmsg.3:308
2479 #, no-wrap
2480 msgid ""
2481 "    unknown mount option\n"
2482 "    TO FIX: See mount(8).\n"
2483 msgstr ""
2484 "    unknown mount option\n"
2485 "    TO FIX: See mount(8).\n"
2486
2487 #. type: Plain text
2488 #: build/C/man3/fmtmsg.3:312
2489 msgid "B<addseverity>(3), B<perror>(3)"
2490 msgstr "B<addseverity>(3), B<perror>(3)"
2491
2492 #. type: TH
2493 #: build/C/man3/fopen.3:44
2494 #, no-wrap
2495 msgid "FOPEN"
2496 msgstr "FOPEN"
2497
2498 #. type: TH
2499 #: build/C/man3/fopen.3:44
2500 #, no-wrap
2501 msgid "2012-04-22"
2502 msgstr "2012-04-22"
2503
2504 #. type: Plain text
2505 #: build/C/man3/fopen.3:47
2506 msgid "fopen, fdopen, freopen - stream open functions"
2507 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2508
2509 #. type: Plain text
2510 #: build/C/man3/fopen.3:52
2511 #, no-wrap
2512 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2513 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2514
2515 #. type: Plain text
2516 #: build/C/man3/fopen.3:54
2517 #, no-wrap
2518 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2519 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2520
2521 #. type: Plain text
2522 #: build/C/man3/fopen.3:56
2523 #, no-wrap
2524 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2525 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2526
2527 #. type: Plain text
2528 #: build/C/man3/fopen.3:65
2529 msgid ""
2530 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2531 msgstr ""
2532 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2533
2534 #. type: Plain text
2535 #: build/C/man3/fopen.3:71
2536 msgid ""
2537 "The B<fopen>()  function opens the file whose name is the string pointed to "
2538 "by I<path> and associates a stream with it."
2539 msgstr ""
2540 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2541 "びつける。"
2542
2543 #. type: Plain text
2544 #: build/C/man3/fopen.3:76
2545 msgid ""
2546 "The argument I<mode> points to a string beginning with one of the following "
2547 "sequences (possibly followed by additional characters, as described below):"
2548 msgstr ""
2549 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2550 "る (以下の述べる、追加の文字が後に続くこともある):"
2551
2552 #. type: TP
2553 #: build/C/man3/fopen.3:76
2554 #, no-wrap
2555 msgid "B<r>"
2556 msgstr "B<r>"
2557
2558 #. type: Plain text
2559 #: build/C/man3/fopen.3:80
2560 msgid ""
2561 "Open text file for reading.  The stream is positioned at the beginning of "
2562 "the file."
2563 msgstr ""
2564 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2565 "る。"
2566
2567 #. type: TP
2568 #: build/C/man3/fopen.3:80
2569 #, no-wrap
2570 msgid "B<r+>"
2571 msgstr "B<r+>"
2572
2573 #. type: Plain text
2574 #: build/C/man3/fopen.3:84
2575 msgid ""
2576 "Open for reading and writing.  The stream is positioned at the beginning of "
2577 "the file."
2578 msgstr ""
2579 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2580 "る。"
2581
2582 #. type: TP
2583 #: build/C/man3/fopen.3:84
2584 #, no-wrap
2585 msgid "B<w>"
2586 msgstr "B<w>"
2587
2588 #. type: Plain text
2589 #: build/C/man3/fopen.3:88
2590 msgid ""
2591 "Truncate file to zero length or create text file for writing.  The stream is "
2592 "positioned at the beginning of the file."
2593 msgstr ""
2594 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2595 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2596 "頭に位置される。"
2597
2598 #. type: TP
2599 #: build/C/man3/fopen.3:88
2600 #, no-wrap
2601 msgid "B<w+>"
2602 msgstr "B<w+>"
2603
2604 #. type: Plain text
2605 #: build/C/man3/fopen.3:94
2606 msgid ""
2607 "Open for reading and writing.  The file is created if it does not exist, "
2608 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2609 "file."
2610 msgstr ""
2611 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2612 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2613 "の先頭に位置される。"
2614
2615 #. type: TP
2616 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2617 #, no-wrap
2618 msgid "B<a>"
2619 msgstr "B<a>"
2620
2621 #. type: Plain text
2622 #: build/C/man3/fopen.3:99
2623 msgid ""
2624 "Open for appending (writing at end of file).  The file is created if it does "
2625 "not exist.  The stream is positioned at the end of the file."
2626 msgstr ""
2627 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2628 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2629
2630 #. type: TP
2631 #: build/C/man3/fopen.3:99
2632 #, no-wrap
2633 msgid "B<a+>"
2634 msgstr "B<a+>"
2635
2636 #. type: Plain text
2637 #: build/C/man3/fopen.3:105
2638 msgid ""
2639 "Open for reading and appending (writing at end of file).  The file is "
2640 "created if it does not exist.  The initial file position for reading is at "
2641 "the beginning of the file, but output is always appended to the end of the "
2642 "file."
2643 msgstr ""
2644 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2645 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2646 "あるが、 書き込みは常にファイルの最後に追加される。"
2647
2648 #. type: Plain text
2649 #: build/C/man3/fopen.3:118
2650 msgid ""
2651 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2652 "character or as a character between the characters in any of the two-"
2653 "character strings described above.  This is strictly for compatibility with "
2654 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2655 "systems, including Linux.  (Other systems may treat text files and binary "
2656 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2657 "O to a binary file and expect that your program may be ported to non-UNIX "
2658 "environments.)"
2659 msgstr ""
2660 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2661 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2662 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2663 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2664 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2665 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2666 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2667 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2668
2669 #. type: Plain text
2670 #: build/C/man3/fopen.3:121
2671 msgid "See NOTES below for details of glibc extensions for I<mode>."
2672 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2673
2674 #. type: Plain text
2675 #: build/C/man3/fopen.3:126
2676 msgid ""
2677 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2678 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2679 "umask value (see B<umask>(2))."
2680 msgstr ""
2681 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2682 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2683 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2684
2685 #. type: Plain text
2686 #: build/C/man3/fopen.3:141
2687 msgid ""
2688 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2689 "that ANSI C requires that a file positioning function intervene between "
2690 "output and input, unless an input operation encounters end-of-file.  (If "
2691 "this condition is not met, then a read is allowed to return the result of "
2692 "writes other than the most recent.)  Therefore it is good practice (and "
2693 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2694 "(3)  operation between write and read operations on such a stream.  This "
2695 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2696 "for its synchronizing side effect."
2697 msgstr ""
2698 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2699 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2700 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2701 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2702 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2703 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2704 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2705 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2706 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2707 "い)。"
2708
2709 #. type: Plain text
2710 #: build/C/man3/fopen.3:146
2711 msgid ""
2712 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2713 "causes all subsequent write operations to this stream to occur at end-of-"
2714 "file, as if preceded the call:"
2715 msgstr ""
2716 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2717 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2718 "かのように) ファイルの末尾で行われる。"
2719
2720 #. type: Plain text
2721 #: build/C/man3/fopen.3:149
2722 #, no-wrap
2723 msgid "    fseek(stream, 0, SEEK_END);\n"
2724 msgstr "    fseek(stream, 0, SEEK_END);\n"
2725
2726 #. type: Plain text
2727 #: build/C/man3/fopen.3:171
2728 msgid ""
2729 "The B<fdopen>()  function associates a stream with the existing file "
2730 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2731 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2732 "file descriptor.  The file position indicator of the new stream is set to "
2733 "that belonging to I<fd>, and the error and end-of-file indicators are "
2734 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2735 "file descriptor is not dup'ed, and will be closed when the stream created by "
2736 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2737 "memory object is undefined."
2738 msgstr ""
2739 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2740 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2741 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2742 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2743 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2744 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2745 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2746 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2747
2748 #. type: Plain text
2749 #: build/C/man3/fopen.3:189
2750 msgid ""
2751 "The B<freopen>()  function opens the file whose name is the string pointed "
2752 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2753 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2754 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2755 "function is to change the file associated with a standard text stream "
2756 "(I<stderr>, I<stdin>, or I<stdout>)."
2757 msgstr ""
2758 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2759 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2760 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2761 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2762 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2763
2764 #. type: Plain text
2765 #: build/C/man3/fopen.3:201
2766 msgid ""
2767 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2768 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2769 "indicate the error."
2770 msgstr ""
2771 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2772 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2773
2774 #. type: TP
2775 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2776 #: build/C/man3/getline.3:126 build/C/man2/llseek.2:77
2777 #: build/C/man2/lseek.2:175 build/C/man2/pipe.2:102 build/C/man2/read.2:126
2778 #: build/C/man2/read.2:137 build/C/man2/readlink.2:95
2779 #: build/C/man2/readlink.2:104 build/C/man2/readv.2:200
2780 #: build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:565
2781 #: build/C/man2/write.2:154
2782 #, no-wrap
2783 msgid "B<EINVAL>"
2784 msgstr "B<EINVAL>"
2785
2786 #. type: Plain text
2787 #: build/C/man3/fopen.3:212
2788 msgid ""
2789 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2790 "invalid."
2791 msgstr ""
2792 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2793
2794 #. type: Plain text
2795 #: build/C/man3/fopen.3:222
2796 msgid ""
2797 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2798 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2799 msgstr ""
2800 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2801 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2802 "する。"
2803
2804 #. type: Plain text
2805 #: build/C/man3/fopen.3:229
2806 msgid ""
2807 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2808 "errors specified for the routine B<open>(2)."
2809 msgstr ""
2810 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2811 "があり、 その時は対応する値に I<errno> をセットする。"
2812
2813 #. type: Plain text
2814 #: build/C/man3/fopen.3:236
2815 msgid ""
2816 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2817 "errors specified for the routine B<fcntl>(2)."
2818 msgstr ""
2819 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2820 "とがあり、 その時は対応する値に I<errno> をセットする。"
2821
2822 #. type: Plain text
2823 #: build/C/man3/fopen.3:246
2824 msgid ""
2825 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2826 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2827 msgstr ""
2828 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2829 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2830 "トする。"
2831
2832 #. type: Plain text
2833 #: build/C/man3/fopen.3:255
2834 msgid ""
2835 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2836 "()  function conforms to POSIX.1-1990."
2837 msgstr ""
2838 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2839 "は POSIX.1-1990 に準拠している。"
2840
2841 #. type: SS
2842 #: build/C/man3/fopen.3:256
2843 #, no-wrap
2844 msgid "Glibc notes"
2845 msgstr "glibc での注意"
2846
2847 #. type: Plain text
2848 #: build/C/man3/fopen.3:259
2849 msgid ""
2850 "The GNU C library allows the following extensions for the string specified "
2851 "in I<mode>:"
2852 msgstr ""
2853 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2854 "いる:"
2855
2856 #. type: TP
2857 #: build/C/man3/fopen.3:259
2858 #, no-wrap
2859 msgid "B<c> (since glibc 2.3.3)"
2860 msgstr "B<c> (glibc 2.3.3 以降)"
2861
2862 #. type: Plain text
2863 #: build/C/man3/fopen.3:266
2864 msgid ""
2865 "Do not make the open operation, or subsequent read and write operations, "
2866 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2867 msgstr ""
2868 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2869 "(cancellation points) を作成しない。\n"
2870 "このフラグは B<fdopen>() では無視される。"
2871
2872 #. type: TP
2873 #: build/C/man3/fopen.3:266
2874 #, no-wrap
2875 msgid "B<e> (since glibc 2.7)"
2876 msgstr "B<e> (glibc 2.7 以降)"
2877
2878 #. type: Plain text
2879 #: build/C/man3/fopen.3:276
2880 msgid ""
2881 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2882 "information.  This flag is ignored for B<fdopen>()."
2883 msgstr ""
2884 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2885 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2886
2887 #. type: TP
2888 #: build/C/man3/fopen.3:276
2889 #, no-wrap
2890 msgid "B<m> (since glibc 2.3)"
2891 msgstr "B<m> (glibc 2.3 以降)"
2892
2893 #.  As at glibc 2.4:
2894 #. type: Plain text
2895 #: build/C/man3/fopen.3:288
2896 msgid ""
2897 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2898 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
2899 "for a file opened for reading."
2900 msgstr ""
2901 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2902 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2903 "オープンするファイルについてだけである。"
2904
2905 #. type: TP
2906 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2907 #, no-wrap
2908 msgid "B<x>"
2909 msgstr "B<x>"
2910
2911 #.  Since glibc 2.0?
2912 #.  FIXME C11 specifies this flag
2913 #. type: Plain text
2914 #: build/C/man3/fopen.3:305
2915 msgid ""
2916 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2917 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2918 "This flag is ignored for B<fdopen>()."
2919 msgstr ""
2920 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2921 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2922 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2923
2924 #. type: Plain text
2925 #: build/C/man3/fopen.3:313
2926 msgid ""
2927 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2928 "the following syntax in I<mode>:"
2929 msgstr ""
2930 "上記の文字に加えて、\n"
2931 "B<fopen>() と B<freopen>() では I<mode> に\n"
2932 "以下の書式を 指定することができる。"
2933
2934 #. type: Plain text
2935 #: build/C/man3/fopen.3:315
2936 msgid "B< ,ccs=>I<string>"
2937 msgstr "B< ,ccs=>I<string>"
2938
2939 #. type: Plain text
2940 #: build/C/man3/fopen.3:331
2941 msgid ""
2942 "The given I<string> is taken as the name of a coded character set and the "
2943 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2944 "functions convert I/O to and from the character set I<string>.  If the B<,"
2945 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2946 "stream is determined by the first file operation.  If that operation is a "
2947 "wide-character operation, the stream is marked wide-oriented, and functions "
2948 "to convert to the coded character set are loaded."
2949 msgstr ""
2950 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2951 "ストリームではワイド文字のストリームとして扱われる。\n"
2952 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2953 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2954 "ストリームをワイド文字のストリームとして扱うかは\n"
2955 "最初のファイル操作時に決定される。\n"
2956 "最初のファイル操作がワイド文字操作であった場合は、\n"
2957 "そのストリームはワイド文字のストリームとして扱われ、\n"
2958 "符号化文字集合との変換を行う関数が読み込まれる。"
2959
2960 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2961 #. type: Plain text
2962 #: build/C/man3/fopen.3:348
2963 msgid ""
2964 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2965 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
2966 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2967 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2968 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2969 "B<fdopen>()  parses at most 5 characters in I<mode>."
2970 msgstr ""
2971 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2972 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2973 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2974 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2975 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2976 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2977
2978 #. type: Plain text
2979 #: build/C/man3/fopen.3:354
2980 msgid ""
2981 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2982 msgstr ""
2983 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2984
2985 #. type: TH
2986 #: build/C/man3/fopencookie.3:26
2987 #, no-wrap
2988 msgid "FOPENCOOKIE"
2989 msgstr "FOPENCOOKIE"
2990
2991 #. type: TH
2992 #: build/C/man3/fopencookie.3:26
2993 #, no-wrap
2994 msgid "2013-03-17"
2995 msgstr "2013-03-17"
2996
2997 #. type: TH
2998 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31
2999 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
3000 #: build/C/man2/open.2:52 build/C/man2/pipe.2:36 build/C/man2/read.2:35
3001 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32
3002 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13
3003 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
3004 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
3005 #, no-wrap
3006 msgid "Linux"
3007 msgstr "Linux"
3008
3009 #. type: Plain text
3010 #: build/C/man3/fopencookie.3:29
3011 msgid "fopencookie - opening a custom stream"
3012 msgstr ""
3013
3014 #. type: Plain text
3015 #: build/C/man3/fopencookie.3:36
3016 #, no-wrap
3017 msgid ""
3018 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3019 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3020 msgstr ""
3021 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3022 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3023
3024 #. type: Plain text
3025 #: build/C/man3/fopencookie.3:49
3026 msgid ""
3027 "The B<fopencookie>()  function allows the programmer to create a custom "
3028 "implementation for a standard I/O stream.  This implementation can store the "
3029 "stream's data at a location of its own choosing; for example, B<fopencookie>"
3030 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
3031 "to data that is stored in a buffer in memory."
3032 msgstr ""
3033
3034 #. type: Plain text
3035 #: build/C/man3/fopencookie.3:51
3036 msgid "In order to create a custom stream the programmer must:"
3037 msgstr ""
3038
3039 #. type: IP
3040 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3041 #: build/C/man3/fopencookie.3:65 build/C/man3/scanf.3:633
3042 #: build/C/man3/scanf.3:638 build/C/man3/scanf.3:644
3043 #: build/C/man7/symlink.7:249 build/C/man7/symlink.7:259
3044 #: build/C/man7/symlink.7:289 build/C/man7/symlink.7:349
3045 #: build/C/man7/symlink.7:378 build/C/man7/symlink.7:407
3046 #: build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
3047 #, no-wrap
3048 msgid "*"
3049 msgstr "*"
3050
3051 #. type: Plain text
3052 #: build/C/man3/fopencookie.3:54
3053 msgid ""
3054 "Implement four \"hook\" functions that are used internally by the standard I/"
3055 "O library when performing I/O on the stream."
3056 msgstr ""
3057
3058 #. type: Plain text
3059 #: build/C/man3/fopencookie.3:65
3060 msgid ""
3061 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3062 "information (e.g., where to store data) used by the aforementioned hook "
3063 "functions.  The standard I/O package knows nothing about the contents of "
3064 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3065 "()), but automatically supplies the cookie as the first argument when "
3066 "calling the hook functions."
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: build/C/man3/fopencookie.3:70
3071 msgid ""
3072 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3073 "hook functions with that stream."
3074 msgstr ""
3075
3076 #. type: Plain text
3077 #: build/C/man3/fopencookie.3:78
3078 msgid ""
3079 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3080 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3081 "operate on that stream."
3082 msgstr ""
3083
3084 #. type: Plain text
3085 #: build/C/man3/fopencookie.3:85
3086 msgid ""
3087 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3088 "to be associated with the new stream.  This pointer is supplied as the first "
3089 "argument when the standard I/O library invokes any of the hook functions "
3090 "described below."
3091 msgstr ""
3092
3093 #. type: Plain text
3094 #: build/C/man3/fopencookie.3:101
3095 msgid ""
3096 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3097 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3098 "See B<fopen>(3)  for details."
3099 msgstr ""
3100
3101 #. type: Plain text
3102 #: build/C/man3/fopencookie.3:107
3103 msgid ""
3104 "The I<io_funcs> argument is a structure that contains four fields pointing "
3105 "to the programmer-defined hook functions that are used to implement this "
3106 "stream.  The structure is defined as follows"
3107 msgstr ""
3108
3109 #. type: Plain text
3110 #: build/C/man3/fopencookie.3:116
3111 #, no-wrap
3112 msgid ""
3113 "typedef struct {\n"
3114 "    cookie_read_function_t  *read;\n"
3115 "    cookie_write_function_t *write;\n"
3116 "    cookie_seek_function_t  *seek;\n"
3117 "    cookie_close_function_t *close;\n"
3118 "} cookie_io_functions_t;\n"
3119 msgstr ""
3120 "typedef struct {\n"
3121 "    cookie_read_function_t  *read;\n"
3122 "    cookie_write_function_t *write;\n"
3123 "    cookie_seek_function_t  *seek;\n"
3124 "    cookie_close_function_t *close;\n"
3125 "} cookie_io_functions_t;\n"
3126
3127 #. type: Plain text
3128 #: build/C/man3/fopencookie.3:120
3129 msgid "The four fields are as follows:"
3130 msgstr ""
3131
3132 #. type: TP
3133 #: build/C/man3/fopencookie.3:120
3134 #, no-wrap
3135 msgid "I<cookie_read_function_t *read>"
3136 msgstr "I<cookie_read_function_t *read>"
3137
3138 #. type: Plain text
3139 #: build/C/man3/fopencookie.3:124
3140 msgid ""
3141 "This function implements read operations for the stream.  When called, it "
3142 "receives three arguments:"
3143 msgstr ""
3144
3145 #. type: Plain text
3146 #: build/C/man3/fopencookie.3:126
3147 #, no-wrap
3148 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3149 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3150
3151 #. type: Plain text
3152 #: build/C/man3/fopencookie.3:141
3153 msgid ""
3154 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3155 "input data can be placed and the size of that buffer.  As its function "
3156 "result, the I<read> function should return the number of bytes copied into "
3157 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3158 "update the stream offset appropriately."
3159 msgstr ""
3160
3161 #. type: Plain text
3162 #: build/C/man3/fopencookie.3:146
3163 msgid ""
3164 "If I<*read> is a NULL pointer, then reads from the custom stream always "
3165 "return end of file."
3166 msgstr ""
3167
3168 #. type: TP
3169 #: build/C/man3/fopencookie.3:146
3170 #, no-wrap
3171 msgid "I<cookie_write_function_t *write>"
3172 msgstr "I<cookie_write_function_t *write>"
3173
3174 #. type: Plain text
3175 #: build/C/man3/fopencookie.3:150
3176 msgid ""
3177 "This function implements write operations for the stream.  When called, it "
3178 "receives three arguments:"
3179 msgstr ""
3180
3181 #. type: Plain text
3182 #: build/C/man3/fopencookie.3:152
3183 #, no-wrap
3184 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3185 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3186
3187 #. type: Plain text
3188 #: build/C/man3/fopencookie.3:168
3189 msgid ""
3190 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3191 "output to the stream and the size of that buffer.  As its function result, "
3192 "the I<write> function should return the number of bytes copied from I<buf>, "
3193 "or 0 on error.  (The function must not return a negative value.)  The "
3194 "I<write> function should update the stream offset appropriately."
3195 msgstr ""
3196
3197 #. type: Plain text
3198 #: build/C/man3/fopencookie.3:173
3199 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3200 msgstr ""
3201
3202 #. type: TP
3203 #: build/C/man3/fopencookie.3:173
3204 #, no-wrap
3205 msgid "I<cookie_seek_function_t *seek>"
3206 msgstr "I<cookie_seek_function_t *seek>"
3207
3208 #. type: Plain text
3209 #: build/C/man3/fopencookie.3:177
3210 msgid ""
3211 "This function implements seek operations on the stream.  When called, it "
3212 "receives three arguments:"
3213 msgstr ""
3214
3215 #. type: Plain text
3216 #: build/C/man3/fopencookie.3:179
3217 #, no-wrap
3218 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3219 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3220
3221 #. type: Plain text
3222 #: build/C/man3/fopencookie.3:185
3223 msgid ""
3224 "The I<*offset> argument specifies the new file offset depending on which of "
3225 "the following three values is supplied in I<whence>:"
3226 msgstr ""
3227
3228 #. type: TP
3229 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3230 #, no-wrap
3231 msgid "B<SEEK_SET>"
3232 msgstr "B<SEEK_SET>"
3233
3234 #. type: Plain text
3235 #: build/C/man3/fopencookie.3:191
3236 msgid ""
3237 "The stream offset should be set I<*offset> bytes from the start of the "
3238 "stream."
3239 msgstr ""
3240
3241 #. type: TP
3242 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3243 #, no-wrap
3244 msgid "B<SEEK_CUR>"
3245 msgstr "B<SEEK_CUR>"
3246
3247 #. type: Plain text
3248 #: build/C/man3/fopencookie.3:195
3249 msgid "I<*offset> should be added to the current stream offset."
3250 msgstr ""
3251
3252 #. type: TP
3253 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3254 #, no-wrap
3255 msgid "B<SEEK_END>"
3256 msgstr "B<SEEK_END>"
3257
3258 #. type: Plain text
3259 #: build/C/man3/fopencookie.3:199
3260 msgid ""
3261 "The stream offset should be set to the size of the stream plus I<*offset>."
3262 msgstr ""
3263
3264 #. type: Plain text
3265 #: build/C/man3/fopencookie.3:206
3266 msgid ""
3267 "Before returning, the I<seek> function should update I<*offset> to indicate "
3268 "the new stream offset."
3269 msgstr ""
3270
3271 #. type: Plain text
3272 #: build/C/man3/fopencookie.3:210
3273 msgid ""
3274 "As its function result, the I<seek> function should return 0 on success, and "
3275 "-1 on error."
3276 msgstr ""
3277
3278 #. type: Plain text
3279 #: build/C/man3/fopencookie.3:215
3280 msgid ""
3281 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3282 "operations on the stream."
3283 msgstr ""
3284
3285 #. type: TP
3286 #: build/C/man3/fopencookie.3:215
3287 #, no-wrap
3288 msgid "I<cookie_close_function_t *close>"
3289 msgstr "I<cookie_close_function_t *close>"
3290
3291 #. type: Plain text
3292 #: build/C/man3/fopencookie.3:221
3293 msgid ""
3294 "This function closes the stream.  The hook function can do things such as "
3295 "freeing buffers allocated for the stream.  When called, it receives one "
3296 "argument:"
3297 msgstr ""
3298
3299 #. type: Plain text
3300 #: build/C/man3/fopencookie.3:223
3301 #, no-wrap
3302 msgid "    int close(void *cookie);\n"
3303 msgstr "    int close(void *cookie);\n"
3304
3305 #. type: Plain text
3306 #: build/C/man3/fopencookie.3:228
3307 msgid ""
3308 "The I<cookie> argument is the cookie that the programmer supplied when "
3309 "calling B<fopencookie>()."
3310 msgstr ""
3311
3312 #. type: Plain text
3313 #: build/C/man3/fopencookie.3:234
3314 msgid ""
3315 "As its function result, the I<close> function should return 0 on success, "
3316 "and B<EOF> on error."
3317 msgstr ""
3318
3319 #. type: Plain text
3320 #: build/C/man3/fopencookie.3:238
3321 msgid ""
3322 "If I<*close> is NULL, then no special action is performed when the stream is "
3323 "closed."
3324 msgstr ""
3325
3326 #.  .SH ERRORS
3327 #.  It's not clear if errno ever gets set...
3328 #. type: Plain text
3329 #: build/C/man3/fopencookie.3:245
3330 msgid ""
3331 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3332 "NULL is returned."
3333 msgstr ""
3334
3335 #. type: Plain text
3336 #: build/C/man3/fopencookie.3:247
3337 msgid "This function is a nonstandard GNU extension."
3338 msgstr ""
3339
3340 #. type: Plain text
3341 #: build/C/man3/fopencookie.3:256
3342 msgid ""
3343 "The program below implements a custom stream whose functionality is similar "
3344 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3345 "stream whose data is stored in a memory buffer.  The program writes its "
3346 "command-line arguments to the stream, and then seeks through the stream "
3347 "reading two out of every five characters and writing them to standard "
3348 "output.  The following shell session demonstrates the use of the program:"
3349 msgstr ""
3350
3351 #. type: Plain text
3352 #: build/C/man3/fopencookie.3:264
3353 #, no-wrap
3354 msgid ""
3355 "$B< ./a.out \\(aqhello world\\(aq>\n"
3356 "/he/\n"
3357 "/ w/\n"
3358 "/d/\n"
3359 "Reached end of file\n"
3360 msgstr ""
3361 "$B< ./a.out \\(aqhello world\\(aq>\n"
3362 "/he/\n"
3363 "/ w/\n"
3364 "/d/\n"
3365 "Reached end of file\n"
3366
3367 #. type: Plain text
3368 #: build/C/man3/fopencookie.3:271
3369 msgid ""
3370 "Note that a more general version of the program below could be improved to "
3371 "more robustly handle various error situations (e.g., opening a stream with a "
3372 "cookie that already has an open stream; closing a stream that has already "
3373 "been closed)."
3374 msgstr ""
3375
3376 #. type: Plain text
3377 #: build/C/man3/fopencookie.3:280
3378 #, no-wrap
3379 msgid ""
3380 "#define _GNU_SOURCE\n"
3381 "#include E<lt>sys/types.hE<gt>\n"
3382 "#include E<lt>stdio.hE<gt>\n"
3383 "#include E<lt>stdlib.hE<gt>\n"
3384 "#include E<lt>unistd.hE<gt>\n"
3385 "#include E<lt>string.hE<gt>\n"
3386 msgstr ""
3387 "#define _GNU_SOURCE\n"
3388 "#include E<lt>sys/types.hE<gt>\n"
3389 "#include E<lt>stdio.hE<gt>\n"
3390 "#include E<lt>stdlib.hE<gt>\n"
3391 "#include E<lt>unistd.hE<gt>\n"
3392 "#include E<lt>string.hE<gt>\n"
3393
3394 #. type: Plain text
3395 #: build/C/man3/fopencookie.3:282
3396 #, no-wrap
3397 msgid "#define INIT_BUF_SIZE 4\n"
3398 msgstr "#define INIT_BUF_SIZE 4\n"
3399
3400 #. type: Plain text
3401 #: build/C/man3/fopencookie.3:289
3402 #, no-wrap
3403 msgid ""
3404 "struct memfile_cookie {\n"
3405 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3406 "    size_t  allocated;  /* Size of buf */\n"
3407 "    size_t  endpos;     /* Number of characters in buf */\n"
3408 "    off_t   offset;     /* Current file offset in buf */\n"
3409 "};\n"
3410 msgstr ""
3411 "struct memfile_cookie {\n"
3412 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3413 "    size_t  allocated;  /* Size of buf */\n"
3414 "    size_t  endpos;     /* Number of characters in buf */\n"
3415 "    off_t   offset;     /* Current file offset in buf */\n"
3416 "};\n"
3417
3418 #. type: Plain text
3419 #: build/C/man3/fopencookie.3:295
3420 #, no-wrap
3421 msgid ""
3422 "ssize_t\n"
3423 "memfile_write(void *c, const char *buf, size_t size)\n"
3424 "{\n"
3425 "    char *new_buff;\n"
3426 "    struct memfile_cookie *cookie = c;\n"
3427 msgstr ""
3428 "ssize_t\n"
3429 "memfile_write(void *c, const char *buf, size_t size)\n"
3430 "{\n"
3431 "    char *new_buff;\n"
3432 "    struct memfile_cookie *cookie = c;\n"
3433
3434 #. type: Plain text
3435 #: build/C/man3/fopencookie.3:297
3436 #, no-wrap
3437 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3438 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3439
3440 #. type: Plain text
3441 #: build/C/man3/fopencookie.3:307
3442 #, no-wrap
3443 msgid ""
3444 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3445 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3446 "        if (new_buff == NULL) {\n"
3447 "            return -1;\n"
3448 "        } else {\n"
3449 "            cookie-E<gt>allocated *= 2;\n"
3450 "            cookie-E<gt>buf = new_buff;\n"
3451 "        }\n"
3452 "    }\n"
3453 msgstr ""
3454 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3455 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3456 "        if (new_buff == NULL) {\n"
3457 "            return -1;\n"
3458 "        } else {\n"
3459 "            cookie-E<gt>allocated *= 2;\n"
3460 "            cookie-E<gt>buf = new_buff;\n"
3461 "        }\n"
3462 "    }\n"
3463
3464 #. type: Plain text
3465 #: build/C/man3/fopencookie.3:309
3466 #, no-wrap
3467 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3468 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3469
3470 #. type: Plain text
3471 #: build/C/man3/fopencookie.3:313
3472 #, no-wrap
3473 msgid ""
3474 "    cookie-E<gt>offset += size;\n"
3475 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3476 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3477 msgstr ""
3478 "    cookie-E<gt>offset += size;\n"
3479 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3480 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3481
3482 #. type: Plain text
3483 #: build/C/man3/fopencookie.3:316
3484 #, no-wrap
3485 msgid ""
3486 "    return size;\n"
3487 "}\n"
3488 msgstr ""
3489 "    return size;\n"
3490 "}\n"
3491
3492 #. type: Plain text
3493 #: build/C/man3/fopencookie.3:322
3494 #, no-wrap
3495 msgid ""
3496 "ssize_t\n"
3497 "memfile_read(void *c, char *buf, size_t size)\n"
3498 "{\n"
3499 "    ssize_t xbytes;\n"
3500 "    struct memfile_cookie *cookie = c;\n"
3501 msgstr ""
3502 "ssize_t\n"
3503 "memfile_read(void *c, char *buf, size_t size)\n"
3504 "{\n"
3505 "    ssize_t xbytes;\n"
3506 "    struct memfile_cookie *cookie = c;\n"
3507
3508 #. type: Plain text
3509 #: build/C/man3/fopencookie.3:324
3510 #, no-wrap
3511 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3512 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3513
3514 #. type: Plain text
3515 #: build/C/man3/fopencookie.3:330
3516 #, no-wrap
3517 msgid ""
3518 "    xbytes = size;\n"
3519 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3520 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3521 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3522 "       xbytes = 0;\n"
3523 msgstr ""
3524 "    xbytes = size;\n"
3525 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3526 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3527 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3528 "       xbytes = 0;\n"
3529
3530 #. type: Plain text
3531 #: build/C/man3/fopencookie.3:332
3532 #, no-wrap
3533 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3534 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3535
3536 #. type: Plain text
3537 #: build/C/man3/fopencookie.3:336
3538 #, no-wrap
3539 msgid ""
3540 "    cookie-E<gt>offset += xbytes;\n"
3541 "    return xbytes;\n"
3542 "}\n"
3543 msgstr ""
3544 "    cookie-E<gt>offset += xbytes;\n"
3545 "    return xbytes;\n"
3546 "}\n"
3547
3548 #. type: Plain text
3549 #: build/C/man3/fopencookie.3:342
3550 #, no-wrap
3551 msgid ""
3552 "int\n"
3553 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3554 "{\n"
3555 "    off64_t new_offset;\n"
3556 "    struct memfile_cookie *cookie = c;\n"
3557 msgstr ""
3558 "int\n"
3559 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3560 "{\n"
3561 "    off64_t new_offset;\n"
3562 "    struct memfile_cookie *cookie = c;\n"
3563
3564 #. type: Plain text
3565 #: build/C/man3/fopencookie.3:351
3566 #, no-wrap
3567 msgid ""
3568 "    if (whence == SEEK_SET)\n"
3569 "        new_offset = *offset;\n"
3570 "    else if (whence == SEEK_END)\n"
3571 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3572 "    else if (whence == SEEK_CUR)\n"
3573 "        new_offset = cookie-E<gt>offset + *offset;\n"
3574 "    else\n"
3575 "        return -1;\n"
3576 msgstr ""
3577 "    if (whence == SEEK_SET)\n"
3578 "        new_offset = *offset;\n"
3579 "    else if (whence == SEEK_END)\n"
3580 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3581 "    else if (whence == SEEK_CUR)\n"
3582 "        new_offset = cookie-E<gt>offset + *offset;\n"
3583 "    else\n"
3584 "        return -1;\n"
3585
3586 #. type: Plain text
3587 #: build/C/man3/fopencookie.3:354
3588 #, no-wrap
3589 msgid ""
3590 "    if (new_offset E<lt> 0)\n"
3591 "        return -1;\n"
3592 msgstr ""
3593 "    if (new_offset E<lt> 0)\n"
3594 "        return -1;\n"
3595
3596 #. type: Plain text
3597 #: build/C/man3/fopencookie.3:359
3598 #, no-wrap
3599 msgid ""
3600 "    cookie-E<gt>offset = new_offset;\n"
3601 "    *offset = new_offset;\n"
3602 "    return 0;\n"
3603 "}\n"
3604 msgstr ""
3605 "    cookie-E<gt>offset = new_offset;\n"
3606 "    *offset = new_offset;\n"
3607 "    return 0;\n"
3608 "}\n"
3609
3610 #. type: Plain text
3611 #: build/C/man3/fopencookie.3:364
3612 #, no-wrap
3613 msgid ""
3614 "int\n"
3615 "memfile_close(void *c)\n"
3616 "{\n"
3617 "    struct memfile_cookie *cookie = c;\n"
3618 msgstr ""
3619 "int\n"
3620 "memfile_close(void *c)\n"
3621 "{\n"
3622 "    struct memfile_cookie *cookie = c;\n"
3623
3624 #. type: Plain text
3625 #: build/C/man3/fopencookie.3:368
3626 #, no-wrap
3627 msgid ""
3628 "    free(cookie-E<gt>buf);\n"
3629 "    cookie-E<gt>allocated = 0;\n"
3630 "    cookie-E<gt>buf = NULL;\n"
3631 msgstr ""
3632 "    free(cookie-E<gt>buf);\n"
3633 "    cookie-E<gt>allocated = 0;\n"
3634 "    cookie-E<gt>buf = NULL;\n"
3635
3636 #. type: Plain text
3637 #: build/C/man3/fopencookie.3:371
3638 #, no-wrap
3639 msgid ""
3640 "    return 0;\n"
3641 "}\n"
3642 msgstr ""
3643 "    return 0;\n"
3644 "}\n"
3645
3646 #. type: Plain text
3647 #: build/C/man3/fopencookie.3:387
3648 #, no-wrap
3649 msgid ""
3650 "int\n"
3651 "main(int argc, char *argv[])\n"
3652 "{\n"
3653 "    cookie_io_functions_t  memfile_func = {\n"
3654 "        .read  = memfile_read,\n"
3655 "        .write = memfile_write,\n"
3656 "        .seek  = memfile_seek,\n"
3657 "        .close = memfile_close\n"
3658 "    };\n"
3659 "    FILE *fp;\n"
3660 "    struct memfile_cookie mycookie;\n"
3661 "    ssize_t nread;\n"
3662 "    long p;\n"
3663 "    int j;\n"
3664 "    char buf[1000];\n"
3665 msgstr ""
3666 "int\n"
3667 "main(int argc, char *argv[])\n"
3668 "{\n"
3669 "    cookie_io_functions_t  memfile_func = {\n"
3670 "        .read  = memfile_read,\n"
3671 "        .write = memfile_write,\n"
3672 "        .seek  = memfile_seek,\n"
3673 "        .close = memfile_close\n"
3674 "    };\n"
3675 "    FILE *fp;\n"
3676 "    struct memfile_cookie mycookie;\n"
3677 "    ssize_t nread;\n"
3678 "    long p;\n"
3679 "    int j;\n"
3680 "    char buf[1000];\n"
3681
3682 #. type: Plain text
3683 #: build/C/man3/fopencookie.3:389
3684 #, no-wrap
3685 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3686 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3687
3688 #. type: Plain text
3689 #: build/C/man3/fopencookie.3:395
3690 #, no-wrap
3691 msgid ""
3692 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3693 "    if (mycookie.buf == NULL) {\n"
3694 "        perror(\"malloc\");\n"
3695 "        exit(EXIT_FAILURE);\n"
3696 "    }\n"
3697 msgstr ""
3698 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3699 "    if (mycookie.buf == NULL) {\n"
3700 "        perror(\"malloc\");\n"
3701 "        exit(EXIT_FAILURE);\n"
3702 "    }\n"
3703
3704 #. type: Plain text
3705 #: build/C/man3/fopencookie.3:399
3706 #, no-wrap
3707 msgid ""
3708 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3709 "    mycookie.offset = 0;\n"
3710 "    mycookie.endpos = 0;\n"
3711 msgstr ""
3712 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3713 "    mycookie.offset = 0;\n"
3714 "    mycookie.endpos = 0;\n"
3715
3716 #. type: Plain text
3717 #: build/C/man3/fopencookie.3:405
3718 #, no-wrap
3719 msgid ""
3720 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3721 "    if (fp == NULL) {\n"
3722 "        perror(\"fopencookie\");\n"
3723 "        exit(EXIT_FAILURE);\n"
3724 "    }\n"
3725 msgstr ""
3726 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3727 "    if (fp == NULL) {\n"
3728 "        perror(\"fopencookie\");\n"
3729 "        exit(EXIT_FAILURE);\n"
3730 "    }\n"
3731
3732 #. type: Plain text
3733 #: build/C/man3/fopencookie.3:407
3734 #, no-wrap
3735 msgid "    /* Write command-line arguments to our file */\n"
3736 msgstr "    /* Write command-line arguments to our file */\n"
3737
3738 #. type: Plain text
3739 #: build/C/man3/fopencookie.3:413
3740 #, no-wrap
3741 msgid ""
3742 "    for (j = 1; j E<lt> argc; j++)\n"
3743 "        if (fputs(argv[j], fp) == EOF) {\n"
3744 "            perror(\"fputs\");\n"
3745 "            exit(EXIT_FAILURE);\n"
3746 "        }\n"
3747 msgstr ""
3748 "    for (j = 1; j E<lt> argc; j++)\n"
3749 "        if (fputs(argv[j], fp) == EOF) {\n"
3750 "            perror(\"fputs\");\n"
3751 "            exit(EXIT_FAILURE);\n"
3752 "        }\n"
3753
3754 #. type: Plain text
3755 #: build/C/man3/fopencookie.3:415
3756 #, no-wrap
3757 msgid "    /* Read two bytes out of every five, until EOF */\n"
3758 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3759
3760 #. type: Plain text
3761 #: build/C/man3/fopencookie.3:430
3762 #, no-wrap
3763 msgid ""
3764 "    for (p = 0; ; p += 5) {\n"
3765 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3766 "            perror(\"fseek\");\n"
3767 "            exit(EXIT_FAILURE);\n"
3768 "        }\n"
3769 "        nread = fread(buf, 1, 2, fp);\n"
3770 "        if (nread == -1) {\n"
3771 "            perror(\"fread\");\n"
3772 "            exit(EXIT_FAILURE);\n"
3773 "        }\n"
3774 "        if (nread == 0) {\n"
3775 "            printf(\"Reached end of file\\en\");\n"
3776 "            break;\n"
3777 "        }\n"
3778 msgstr ""
3779 "    for (p = 0; ; p += 5) {\n"
3780 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3781 "            perror(\"fseek\");\n"
3782 "            exit(EXIT_FAILURE);\n"
3783 "        }\n"
3784 "        nread = fread(buf, 1, 2, fp);\n"
3785 "        if (nread == -1) {\n"
3786 "            perror(\"fread\");\n"
3787 "            exit(EXIT_FAILURE);\n"
3788 "        }\n"
3789 "        if (nread == 0) {\n"
3790 "            printf(\"Reached end of file\\en\");\n"
3791 "            break;\n"
3792 "        }\n"
3793
3794 #. type: Plain text
3795 #: build/C/man3/fopencookie.3:433
3796 #, no-wrap
3797 msgid ""
3798 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3799 "    }\n"
3800 msgstr ""
3801 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3802 "    }\n"
3803
3804 #. type: Plain text
3805 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
3806 #, no-wrap
3807 msgid ""
3808 "    exit(EXIT_SUCCESS);\n"
3809 "}\n"
3810 msgstr ""
3811 "    exit(EXIT_SUCCESS);\n"
3812 "}\n"
3813
3814 #. type: Plain text
3815 #: build/C/man3/fopencookie.3:442
3816 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3817 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3818
3819 #. type: TH
3820 #: build/C/man3/fpurge.3:25
3821 #, no-wrap
3822 msgid "FPURGE"
3823 msgstr "FPURGE"
3824
3825 #. type: TH
3826 #: build/C/man3/fpurge.3:25
3827 #, no-wrap
3828 msgid "2001-12-15"
3829 msgstr "2001-12-15"
3830
3831 #. type: Plain text
3832 #: build/C/man3/fpurge.3:28
3833 msgid "fpurge, __fpurge - purge a stream"
3834 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3835
3836 #. type: Plain text
3837 #: build/C/man3/fpurge.3:32
3838 #, no-wrap
3839 msgid ""
3840 "/* unsupported */\n"
3841 "B<#include E<lt>stdio.hE<gt>>\n"
3842 msgstr ""
3843 "/* unsupported */\n"
3844 "B<#include E<lt>stdio.hE<gt>>\n"
3845
3846 #. type: Plain text
3847 #: build/C/man3/fpurge.3:34
3848 #, no-wrap
3849 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3850 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3851
3852 #. type: Plain text
3853 #: build/C/man3/fpurge.3:37
3854 #, no-wrap
3855 msgid ""
3856 "/* supported */\n"
3857 "B<#include E<lt>stdio.hE<gt>>\n"
3858 msgstr ""
3859 "/* supported */\n"
3860 "B<#include E<lt>stdio.hE<gt>>\n"
3861
3862 #. type: Plain text
3863 #: build/C/man3/fpurge.3:39
3864 #, no-wrap
3865 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3866 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3867
3868 #. type: Plain text
3869 #: build/C/man3/fpurge.3:41
3870 #, no-wrap
3871 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3872 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3873
3874 #. type: Plain text
3875 #: build/C/man3/fpurge.3:54
3876 msgid ""
3877 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3878 "output streams this discards any unwritten output.  For input streams this "
3879 "discards any input read from the underlying object but not yet obtained via "
3880 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3881 "B<fflush>(3)."
3882 msgstr ""
3883 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3884 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3885 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3886 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3887 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3888
3889 #. type: Plain text
3890 #: build/C/man3/fpurge.3:58
3891 msgid ""
3892 "The function B<__fpurge>()  does precisely the same, but without returning a "
3893 "value."
3894 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3895
3896 #. type: Plain text
3897 #: build/C/man3/fpurge.3:65
3898 msgid ""
3899 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3900 "and sets I<errno> appropriately."
3901 msgstr ""
3902 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3903 "を適切な値に設定する。"
3904
3905 #. type: Plain text
3906 #: build/C/man3/fpurge.3:70
3907 msgid "I<stream> is not an open stream."
3908 msgstr "I<stream> がオープンされていない。"
3909
3910 #. type: Plain text
3911 #: build/C/man3/fpurge.3:78
3912 msgid ""
3913 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3914 "was introduced in 4.4BSD and is not available under Linux.  The function "
3915 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3916 "later."
3917 msgstr ""
3918 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3919 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3920 "され、glibc 2.1.95 以降には存在している。"
3921
3922 #. type: Plain text
3923 #: build/C/man3/fpurge.3:80
3924 msgid "Usually it is a mistake to want to discard input buffers."
3925 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3926
3927 #.  .BR fclean (3),
3928 #. type: Plain text
3929 #: build/C/man3/fpurge.3:85
3930 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3931 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3932
3933 #. type: TH
3934 #: build/C/man3/fputwc.3:16
3935 #, no-wrap
3936 msgid "FPUTWC"
3937 msgstr "FPUTWC"
3938
3939 #. type: Plain text
3940 #: build/C/man3/fputwc.3:19
3941 msgid "fputwc, putwc - write a wide character to a FILE stream"
3942 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3943
3944 #. type: Plain text
3945 #: build/C/man3/fputwc.3:27
3946 #, no-wrap
3947 msgid ""
3948 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3949 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3950 msgstr ""
3951 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3952 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3953
3954 #. type: Plain text
3955 #: build/C/man3/fputwc.3:43
3956 msgid ""
3957 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3958 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3959 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3960 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3961 "it returns I<wc>."
3962 msgstr ""
3963 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3964 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3965 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3966 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3967 "関数は I<wc> を返す。"
3968
3969 #. type: Plain text
3970 #: build/C/man3/fputwc.3:51
3971 msgid ""
3972 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3973 "may be implemented as a macro, and may evaluate its argument more than "
3974 "once.  There is no reason ever to use it."
3975 msgstr ""
3976 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3977 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3978 "ない。この関数を使う理由はもはや存在しない。"
3979
3980 #. type: Plain text
3981 #: build/C/man3/fputwc.3:63
3982 #, fuzzy
3983 #| msgid ""
3984 #| "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> "
3985 #| "to indicate an error."
3986 msgid ""
3987 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3988 "indicate an error.  In the event of an error, I<errno> is set to indicate "
3989 "the cause."
3990 msgstr ""
3991 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3992 "B<WEOF> を返す。"
3993
3994 #. type: Plain text
3995 #: build/C/man3/fputwc.3:68
3996 msgid "Conversion of I<wc> to the stream's encoding fails."
3997 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3998
3999 #. type: Plain text
4000 #: build/C/man3/fputwc.3:77
4001 msgid ""
4002 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
4003 "current locale."
4004 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
4005
4006 #. type: Plain text
4007 #: build/C/man3/fputwc.3:85
4008 msgid ""
4009 "In the absence of additional information passed to the B<fopen>(3)  call, it "
4010 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4011 "sequence corresponding to the wide character I<wc>."
4012 msgstr ""
4013 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4014 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4015 "よい。"
4016
4017 #. type: Plain text
4018 #: build/C/man3/fputwc.3:89
4019 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4020 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4021
4022 #. type: TH
4023 #: build/C/man3/fread.3:45
4024 #, no-wrap
4025 msgid "FREAD"
4026 msgstr "FREAD"
4027
4028 #. type: TH
4029 #: build/C/man3/fread.3:45
4030 #, no-wrap
4031 msgid "2012-03-30"
4032 msgstr "2012-03-30"
4033
4034 #. type: Plain text
4035 #: build/C/man3/fread.3:48
4036 msgid "fread, fwrite - binary stream input/output"
4037 msgstr "fread, fwrite - バイナリストリームの入出力"
4038
4039 #. type: Plain text
4040 #: build/C/man3/fread.3:54
4041 #, no-wrap
4042 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4043 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4044
4045 #. type: Plain text
4046 #: build/C/man3/fread.3:57
4047 #, no-wrap
4048 msgid ""
4049 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4050 "B<              FILE *>I<stream>B<);>\n"
4051 msgstr ""
4052 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4053 "B<              FILE *>I<stream>B<);>\n"
4054
4055 #. type: Plain text
4056 #: build/C/man3/fread.3:69
4057 msgid ""
4058 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4059 "long, from the stream pointed to by I<stream>, storing them at the location "
4060 "given by I<ptr>."
4061 msgstr ""
4062 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4063 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4064 "I<size> バイトの長さを持つ。"
4065
4066 #. type: Plain text
4067 #: build/C/man3/fread.3:80
4068 msgid ""
4069 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4070 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4071 "location given by I<ptr>."
4072 msgstr ""
4073 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4074 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4075 "バイトの長さを持つ。"
4076
4077 #. type: Plain text
4078 #: build/C/man3/fread.3:96
4079 msgid ""
4080 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4081 "or written.  This number equals the number of bytes transferred only when "
4082 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4083 "return value is a short item count (or zero)."
4084 msgstr ""
4085 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4086 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4087 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4088 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4089
4090 #. type: Plain text
4091 #: build/C/man3/fread.3:103
4092 msgid ""
4093 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4094 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4095 msgstr ""
4096 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4097 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4098 "らない。"
4099
4100 #. type: Plain text
4101 #: build/C/man3/fread.3:105
4102 msgid "C89, POSIX.1-2001."
4103 msgstr "C89, POSIX.1-2001."
4104
4105 #. type: Plain text
4106 #: build/C/man3/fread.3:111
4107 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4108 msgstr ""
4109 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4110
4111 #. type: TH
4112 #: build/C/man3/fseek.3:42
4113 #, no-wrap
4114 msgid "FSEEK"
4115 msgstr "FSEEK"
4116
4117 #. type: TH
4118 #: build/C/man3/fseek.3:42
4119 #, no-wrap
4120 msgid "1993-11-29"
4121 msgstr "1993-11-29"
4122
4123 #. type: Plain text
4124 #: build/C/man3/fseek.3:45
4125 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4126 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4127
4128 #. type: Plain text
4129 #: build/C/man3/fseek.3:49
4130 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4131 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4132
4133 #. type: Plain text
4134 #: build/C/man3/fseek.3:51
4135 msgid "B<long ftell(FILE *>I<stream>B<);>"
4136 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4137
4138 #. type: Plain text
4139 #: build/C/man3/fseek.3:53
4140 msgid "B<void rewind(FILE *>I<stream>B<);>"
4141 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4142
4143 #. type: Plain text
4144 #: build/C/man3/fseek.3:55
4145 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4146 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4147
4148 #. type: Plain text
4149 #: build/C/man3/fseek.3:57
4150 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4151 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4152
4153 #. type: Plain text
4154 #: build/C/man3/fseek.3:81
4155 msgid ""
4156 "The B<fseek>()  function sets the file position indicator for the stream "
4157 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4158 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4159 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4160 "relative to the start of the file, the current position indicator, or end-of-"
4161 "file, respectively.  A successful call to the B<fseek>()  function clears "
4162 "the end-of-file indicator for the stream and undoes any effects of the "
4163 "B<ungetc>(3)  function on the same stream."
4164 msgstr ""
4165 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4166 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4167 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4168 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4169 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4170 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4171 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4172 "かったことになる。"
4173
4174 #. type: Plain text
4175 #: build/C/man3/fseek.3:87
4176 msgid ""
4177 "The B<ftell>()  function obtains the current value of the file position "
4178 "indicator for the stream pointed to by I<stream>."
4179 msgstr ""
4180 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4181 "置表示子 の現時点での値を与える。"
4182
4183 #. type: Plain text
4184 #: build/C/man3/fseek.3:94
4185 msgid ""
4186 "The B<rewind>()  function sets the file position indicator for the stream "
4187 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4188 msgstr ""
4189 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4190 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4191
4192 #. type: Plain text
4193 #: build/C/man3/fseek.3:97
4194 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4195 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4196
4197 #. type: Plain text
4198 #: build/C/man3/fseek.3:101
4199 msgid ""
4200 "except that the error indicator for the stream is also cleared (see "
4201 "B<clearerr>(3))."
4202 msgstr ""
4203 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4204 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4205
4206 #. type: Plain text
4207 #: build/C/man3/fseek.3:121
4208 msgid ""
4209 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4210 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4211 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4212 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4213 "I<fpos_t> object may be a complex object and these routines may be the only "
4214 "way to portably reposition a text stream."
4215 msgstr ""
4216 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4217 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4218 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4219 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4220 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4221 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4222 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4223
4224 #. type: Plain text
4225 #: build/C/man3/fseek.3:136
4226 msgid ""
4227 "The B<rewind>()  function returns no value.  Upon successful completion, "
4228 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4229 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4230 "indicate the error."
4231 msgstr ""
4232 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4233 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4234 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4235
4236 #. type: Plain text
4237 #: build/C/man3/fseek.3:142
4238 msgid "The I<stream> specified is not a seekable stream."
4239 msgstr "指定した I<stream> がシークできない。"
4240
4241 #. type: Plain text
4242 #: build/C/man3/fseek.3:153
4243 msgid ""
4244 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4245 "B<SEEK_CUR>."
4246 msgstr ""
4247 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4248 "B<SEEK_CUR> 以外の値であった。"
4249
4250 #. type: Plain text
4251 #: build/C/man3/fseek.3:168
4252 msgid ""
4253 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4254 "also fail and set I<errno> for any of the errors specified for the routines "
4255 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4256 msgstr ""
4257 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4258 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4259 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4260
4261 #. type: Plain text
4262 #: build/C/man3/fseek.3:173
4263 msgid "B<lseek>(2), B<fseeko>(3)"
4264 msgstr "B<lseek>(2), B<fseeko>(3)"
4265
4266 #. type: TH
4267 #: build/C/man3/fseeko.3:25
4268 #, no-wrap
4269 msgid "FSEEKO"
4270 msgstr "FSEEKO"
4271
4272 #. type: TH
4273 #: build/C/man3/fseeko.3:25
4274 #, no-wrap
4275 msgid "2001-11-05"
4276 msgstr "2001-11-05"
4277
4278 #. type: Plain text
4279 #: build/C/man3/fseeko.3:28
4280 msgid "fseeko, ftello - seek to or report file position"
4281 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4282
4283 #. type: Plain text
4284 #: build/C/man3/fseeko.3:33
4285 #, no-wrap
4286 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4287 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4288
4289 #. type: Plain text
4290 #: build/C/man3/fseeko.3:36
4291 #, no-wrap
4292 msgid ""
4293 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4294 "\n"
4295 msgstr ""
4296 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4297 "\n"
4298
4299 #. type: Plain text
4300 #: build/C/man3/fseeko.3:58
4301 msgid ""
4302 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4303 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4304 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4305 "I<off_t> instead of I<long>."
4306 msgstr ""
4307 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4308 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4309 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4310 "I<off_t> になっている。"
4311
4312 #. type: Plain text
4313 #: build/C/man3/fseeko.3:65
4314 msgid ""
4315 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4316 "compilation with"
4317 msgstr ""
4318 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4319
4320 #. type: Plain text
4321 #: build/C/man3/fseeko.3:69 build/C/man3/lseek64.3:81
4322 #, no-wrap
4323 msgid "#define _FILE_OFFSET_BITS 64\n"
4324 msgstr "#define _FILE_OFFSET_BITS 64\n"
4325
4326 #. type: Plain text
4327 #: build/C/man3/fseeko.3:75
4328 msgid "will turn I<off_t> into a 64-bit type."
4329 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4330
4331 #. type: Plain text
4332 #: build/C/man3/fseeko.3:84
4333 msgid ""
4334 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4335 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4336 "indicate the error."
4337 msgstr ""
4338 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4339 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4340
4341 #. type: Plain text
4342 #: build/C/man3/fseeko.3:87
4343 msgid "See the ERRORS in B<fseek>(3)."
4344 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4345
4346 #. type: Plain text
4347 #: build/C/man3/fseeko.3:89
4348 msgid "SUSv2, POSIX.1-2001."
4349 msgstr "SUSv2, POSIX.1-2001."
4350
4351 #. type: Plain text
4352 #: build/C/man3/fseeko.3:93
4353 msgid ""
4354 "These functions are found on System V-like systems.  They are not present in "
4355 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4356 msgstr ""
4357 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4358 "かったが、 glibc 2.1 から使えるようになった。"
4359
4360 #. type: Plain text
4361 #: build/C/man3/fseeko.3:95
4362 msgid "B<fseek>(3)"
4363 msgstr "B<fseek>(3)"
4364
4365 #. type: TH
4366 #: build/C/man3/getline.3:26
4367 #, no-wrap
4368 msgid "GETLINE"
4369 msgstr "GETLINE"
4370
4371 #. type: Plain text
4372 #: build/C/man3/getline.3:29
4373 msgid "getline, getdelim - delimited string input"
4374 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4375
4376 #. type: Plain text
4377 #: build/C/man3/getline.3:34
4378 #, no-wrap
4379 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4380 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4381
4382 #. type: Plain text
4383 #: build/C/man3/getline.3:37
4384 #, no-wrap
4385 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4386 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4387
4388 #. type: Plain text
4389 #: build/C/man3/getline.3:47
4390 msgid "B<getline>(), B<getdelim>():"
4391 msgstr "B<getline>(), B<getdelim>():"
4392
4393 #. type: Plain text
4394 #: build/C/man3/getline.3:52
4395 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4396 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4397
4398 #. type: Plain text
4399 #: build/C/man3/getline.3:65
4400 msgid ""
4401 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4402 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4403 "terminated and includes the newline character, if one was found."
4404 msgstr ""
4405 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4406 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4407 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4408
4409 #. type: Plain text
4410 #: build/C/man3/getline.3:75
4411 msgid ""
4412 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4413 "storing the line, which should be freed by the user program.  (In this case, "
4414 "the value in I<*n> is ignored.)"
4415 msgstr ""
4416 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4417 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4418 "合、 I<*n> の値は無視される)。"
4419
4420 #. type: Plain text
4421 #: build/C/man3/getline.3:93
4422 msgid ""
4423 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4424 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4425 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4426 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4427 msgstr ""
4428 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4429 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4430 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4431 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4432 "I<*n> を更新する。"
4433
4434 #. type: Plain text
4435 #: build/C/man3/getline.3:99
4436 msgid ""
4437 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4438 "to reflect the buffer address and allocated size respectively."
4439 msgstr ""
4440 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4441 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4442
4443 #. type: Plain text
4444 #: build/C/man3/getline.3:110
4445 msgid ""
4446 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4447 "than newline can be specified as the I<delimiter> argument.  As with "
4448 "B<getline>(), a delimiter character is not added if one was not present in "
4449 "the input before end of file was reached."
4450 msgstr ""
4451 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4452 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4453 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4454 "ファに追加しない。"
4455
4456 #. type: Plain text
4457 #: build/C/man3/getline.3:119
4458 #, fuzzy
4459 #| msgid ""
4460 #| "On success, B<getline>()  and B<getdelim>()  return the number of "
4461 #| "characters read, including the delimiter character, but not including the "
4462 #| "terminating null byte.  This value can be used to handle embedded null "
4463 #| "bytes in the line read."
4464 msgid ""
4465 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4466 "read, including the delimiter character, but not including the terminating "
4467 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4468 "bytes in the line read."
4469 msgstr ""
4470 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4471 "字数には区切り文字は含まれるが、終端に使う NULL バイトは含まれない。 この値に"
4472 "よって、読み込んだ行に含まれる NULL バイトを操作することができる。"
4473
4474 #. type: Plain text
4475 #: build/C/man3/getline.3:125
4476 #, fuzzy
4477 #| msgid ""
4478 #| "Both functions return -1 on failure to read a line (including end-of-file "
4479 #| "condition)."
4480 msgid ""
4481 "Both functions return -1 on failure to read a line (including end-of-file "
4482 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4483 msgstr ""
4484 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4485 "した場合にも -1 を返す)。"
4486
4487 #. type: Plain text
4488 #: build/C/man3/getline.3:135
4489 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4490 msgstr ""
4491 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4492 "I<stream> が有効でない)。"
4493
4494 #. type: Plain text
4495 #: build/C/man3/getline.3:137
4496 msgid "These functions are available since libc 4.6.27."
4497 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4498
4499 #. type: Plain text
4500 #: build/C/man3/getline.3:144
4501 msgid ""
4502 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4503 "were standardized in POSIX.1-2008."
4504 msgstr ""
4505 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4506 "POSIX.1-2008 で標準化された。"
4507
4508 #. type: Plain text
4509 #: build/C/man3/getline.3:149
4510 #, no-wrap
4511 msgid ""
4512 "#define _GNU_SOURCE\n"
4513 "#include E<lt>stdio.hE<gt>\n"
4514 "#include E<lt>stdlib.hE<gt>\n"
4515 msgstr ""
4516 "#define _GNU_SOURCE\n"
4517 "#include E<lt>stdio.hE<gt>\n"
4518 "#include E<lt>stdlib.hE<gt>\n"
4519
4520 #. type: Plain text
4521 #: build/C/man3/getline.3:157
4522 #, no-wrap
4523 msgid ""
4524 "int\n"
4525 "main(void)\n"
4526 "{\n"
4527 "    FILE *fp;\n"
4528 "    char *line = NULL;\n"
4529 "    size_t len = 0;\n"
4530 "    ssize_t read;\n"
4531 msgstr ""
4532 "int\n"
4533 "main(void)\n"
4534 "{\n"
4535 "    FILE *fp;\n"
4536 "    char *line = NULL;\n"
4537 "    size_t len = 0;\n"
4538 "    ssize_t read;\n"
4539
4540 #. type: Plain text
4541 #: build/C/man3/getline.3:161
4542 #, no-wrap
4543 msgid ""
4544 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4545 "    if (fp == NULL)\n"
4546 "        exit(EXIT_FAILURE);\n"
4547 msgstr ""
4548 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4549 "    if (fp == NULL)\n"
4550 "        exit(EXIT_FAILURE);\n"
4551
4552 #. type: Plain text
4553 #: build/C/man3/getline.3:166
4554 #, no-wrap
4555 msgid ""
4556 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4557 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4558 "        printf(\"%s\", line);\n"
4559 "    }\n"
4560 msgstr ""
4561 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4562 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4563 "        printf(\"%s\", line);\n"
4564 "    }\n"
4565
4566 #. type: Plain text
4567 #: build/C/man3/getline.3:170
4568 #, no-wrap
4569 msgid ""
4570 "    free(line);\n"
4571 "    exit(EXIT_SUCCESS);\n"
4572 "}\n"
4573 msgstr ""
4574 "    free(line);\n"
4575 "    exit(EXIT_SUCCESS);\n"
4576 "}\n"
4577
4578 #. type: Plain text
4579 #: build/C/man3/getline.3:178
4580 msgid ""
4581 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4582 msgstr ""
4583 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4584
4585 #. type: TH
4586 #: build/C/man3/gets.3:27
4587 #, no-wrap
4588 msgid "GETS"
4589 msgstr "GETS"
4590
4591 #. type: TH
4592 #: build/C/man3/gets.3:27
4593 #, no-wrap
4594 msgid "2012-01-18"
4595 msgstr "2012-01-18"
4596
4597 #. type: Plain text
4598 #: build/C/man3/gets.3:30
4599 msgid ""
4600 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4601 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4602
4603 #. type: Plain text
4604 #: build/C/man3/gets.3:35
4605 #, no-wrap
4606 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4607 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4608
4609 #. type: Plain text
4610 #: build/C/man3/gets.3:37
4611 #, no-wrap
4612 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4613 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4614
4615 #. type: Plain text
4616 #: build/C/man3/gets.3:39
4617 #, no-wrap
4618 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4619 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4620
4621 #. type: Plain text
4622 #: build/C/man3/gets.3:41
4623 #, no-wrap
4624 msgid "B<int getchar(void);>\n"
4625 msgstr "B<int getchar(void);>\n"
4626
4627 #. type: Plain text
4628 #: build/C/man3/gets.3:43
4629 #, no-wrap
4630 msgid "B<char *gets(char *>I<s>B<);>\n"
4631 msgstr "B<char *gets(char *>I<s>B<);>\n"
4632
4633 #. type: Plain text
4634 #: build/C/man3/gets.3:45
4635 #, no-wrap
4636 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4637 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4638
4639 #. type: Plain text
4640 #: build/C/man3/gets.3:57
4641 msgid ""
4642 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4643 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4644 msgstr ""
4645 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4646 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4647 "す。"
4648
4649 #. type: Plain text
4650 #: build/C/man3/gets.3:64
4651 msgid ""
4652 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4653 "a macro which evaluates I<stream> more than once."
4654 msgstr ""
4655 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4656 "実装されているかもしれない。"
4657
4658 #. type: Plain text
4659 #: build/C/man3/gets.3:68
4660 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4661 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4662
4663 #. type: Plain text
4664 #: build/C/man3/gets.3:78
4665 msgid ""
4666 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4667 "until either a terminating newline or B<EOF>, which it replaces with a null "
4668 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4669 "below)."
4670 msgstr ""
4671 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4672 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4673 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4674 "記の「バグ」を参照)。"
4675
4676 #. type: Plain text
4677 #: build/C/man3/gets.3:92
4678 msgid ""
4679 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4680 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4681 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4682 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4683 "in the buffer."
4684 msgstr ""
4685 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4686 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4687 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4688 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4689
4690 #. type: Plain text
4691 #: build/C/man3/gets.3:103
4692 msgid ""
4693 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4694 "it is available for subsequent read operations.  Pushed-back characters will "
4695 "be returned in reverse order; only one pushback is guaranteed."
4696 msgstr ""
4697 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4698 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4699 "しとして保証されているのは、一文字だけである。"
4700
4701 #. type: Plain text
4702 #: build/C/man3/gets.3:108
4703 msgid ""
4704 "Calls to the functions described here can be mixed with each other and with "
4705 "calls to other input functions from the I<stdio> library for the same input "
4706 "stream."
4707 msgstr ""
4708 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4709 "互いに混ぜて使うことができる。"
4710
4711 #. type: Plain text
4712 #: build/C/man3/gets.3:123
4713 msgid ""
4714 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4715 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4716 msgstr ""
4717 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4718 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4719 "す。"
4720
4721 #. type: Plain text
4722 #: build/C/man3/gets.3:131
4723 msgid ""
4724 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4725 "end of file occurs while no characters have been read."
4726 msgstr ""
4727 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4728 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4729
4730 #. type: Plain text
4731 #: build/C/man3/gets.3:138
4732 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4733 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4734
4735 #. type: Plain text
4736 #: build/C/man3/gets.3:140
4737 msgid "C89, C99, POSIX.1-2001."
4738 msgstr "C89, C99, POSIX.1-2001."
4739
4740 #. type: Plain text
4741 #: build/C/man3/gets.3:152
4742 msgid ""
4743 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4744 "C11 removes the specification of B<gets>()  from the C language, and since "
4745 "version 2.16, glibc header files don't expose the function declaration if "
4746 "the B<_ISOC11_SOURCE> feature test macro is defined."
4747 msgstr ""
4748 "LSB は B<gets>() を非推奨としている。\n"
4749 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4750 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4751 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4752 "た\n"
4753 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4754
4755 #. type: Plain text
4756 #: build/C/man3/gets.3:166
4757 msgid ""
4758 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4759 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4760 "()  will continue to store characters past the end of the buffer, it is "
4761 "extremely dangerous to use.  It has been used to break computer security.  "
4762 "Use B<fgets>()  instead."
4763 msgstr ""
4764 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4765 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4766 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4767 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4768 "と。"
4769
4770 #. type: Plain text
4771 #: build/C/man3/gets.3:173
4772 msgid ""
4773 "It is not advisable to mix calls to input functions from the I<stdio> "
4774 "library with low-level calls to B<read>(2)  for the file descriptor "
4775 "associated with the input stream; the results will be undefined and very "
4776 "probably not what you want."
4777 msgstr ""
4778 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4779 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4780 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4781
4782 #. type: Plain text
4783 #: build/C/man3/gets.3:189
4784 msgid ""
4785 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4786 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4787 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4788 msgstr ""
4789 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4790 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4791 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4792 "B<feature_test_macros>(7)"
4793
4794 #. type: TH
4795 #: build/C/man3/getw.3:25
4796 #, no-wrap
4797 msgid "GETW"
4798 msgstr "GETW"
4799
4800 #. type: TH
4801 #: build/C/man3/getw.3:25
4802 #, no-wrap
4803 msgid "2010-09-26"
4804 msgstr "2010-09-26"
4805
4806 #. type: Plain text
4807 #: build/C/man3/getw.3:28
4808 msgid "getw, putw - input and output of words (ints)"
4809 msgstr "getw, putw - ワード(int)の入出力"
4810
4811 #. type: Plain text
4812 #: build/C/man3/getw.3:33
4813 #, no-wrap
4814 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4815 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4816
4817 #. type: Plain text
4818 #: build/C/man3/getw.3:35
4819 #, no-wrap
4820 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4821 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4822
4823 #. type: Plain text
4824 #: build/C/man3/getw.3:44
4825 msgid "B<getw>(), B<putw>():"
4826 msgstr "B<getw>(), B<putw>():"
4827
4828 #. type: TP
4829 #: build/C/man3/getw.3:47
4830 #, no-wrap
4831 msgid "Since glibc 2.3.3:"
4832 msgstr "glibc 2.3.3 以降:"
4833
4834 #. type: Plain text
4835 #: build/C/man3/getw.3:50
4836 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4837 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4838
4839 #. type: Plain text
4840 #: build/C/man3/getw.3:53
4841 #, no-wrap
4842 msgid ""
4843 "(_XOPEN_SOURCE &&\n"
4844 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4845 msgstr ""
4846 "(_XOPEN_SOURCE &&\n"
4847 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4848
4849 #. type: TP
4850 #: build/C/man3/getw.3:53
4851 #, no-wrap
4852 msgid "Before glibc 2.3.3:"
4853 msgstr "glibc 2.3.3 より前:"
4854
4855 #. type: Plain text
4856 #: build/C/man3/getw.3:56
4857 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4858 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4859
4860 #. type: Plain text
4861 #: build/C/man3/getw.3:66
4862 msgid ""
4863 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4864 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4865 msgstr ""
4866 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4867 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4868 "ことを勧める。"
4869
4870 #. type: Plain text
4871 #: build/C/man3/getw.3:73
4872 msgid ""
4873 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4874 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4875 "instead."
4876 msgstr ""
4877 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4878 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4879 "使用することを勧める。"
4880
4881 #. type: Plain text
4882 #: build/C/man3/getw.3:80
4883 msgid ""
4884 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4885 "error, they return B<EOF>."
4886 msgstr ""
4887 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4888 "が発生した場合、これらの関数は B<EOF> を返す。"
4889
4890 #. type: Plain text
4891 #: build/C/man3/getw.3:82
4892 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4893 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4894
4895 #. type: Plain text
4896 #: build/C/man3/getw.3:86
4897 msgid ""
4898 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4899 "can be used to distinguish between the two cases."
4900 msgstr ""
4901 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4902 "(3)  を用いると、この二つの場合を区別することが出来る。"
4903
4904 #. type: Plain text
4905 #: build/C/man3/getw.3:92
4906 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4907 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4908
4909 #. type: TH
4910 #: build/C/man2/link.2:31
4911 #, no-wrap
4912 msgid "LINK"
4913 msgstr "LINK"
4914
4915 #. type: TH
4916 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32
4917 #: build/C/man2/write.2:39
4918 #, no-wrap
4919 msgid "2013-01-27"
4920 msgstr "2013-01-27"
4921
4922 #. type: Plain text
4923 #: build/C/man2/link.2:34
4924 msgid "link - make a new name for a file"
4925 msgstr "link - ファイルの新しい名前を作成する"
4926
4927 #. type: Plain text
4928 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34
4929 #: build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35
4930 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4931 msgid "B<#include E<lt>unistd.hE<gt>>"
4932 msgstr "B<#include E<lt>unistd.hE<gt>>"
4933
4934 #. type: Plain text
4935 #: build/C/man2/link.2:38
4936 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4937 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4938
4939 #. type: Plain text
4940 #: build/C/man2/link.2:41
4941 msgid ""
4942 "B<link>()  creates a new link (also known as a hard link) to an existing "
4943 "file."
4944 msgstr ""
4945 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4946 "link) ともいう) を作成する。"
4947
4948 #. type: Plain text
4949 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4950 msgid "If I<newpath> exists it will I<not> be overwritten."
4951 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4952
4953 #. type: Plain text
4954 #: build/C/man2/link.2:52
4955 msgid ""
4956 "This new name may be used exactly as the old one for any operation; both "
4957 "names refer to the same file (and so have the same permissions and "
4958 "ownership) and it is impossible to tell which name was the \"original\"."
4959 msgstr ""
4960 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4961 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4962 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4963
4964 #. type: Plain text
4965 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4966 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4967 #: build/C/man2/unlink.2:60
4968 msgid ""
4969 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4970 "appropriately."
4971 msgstr ""
4972 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4973 "定される。"
4974
4975 #. type: TP
4976 #: build/C/man2/link.2:58 build/C/man2/open.2:486 build/C/man2/readlink.2:86
4977 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4978 #: build/C/man3/tmpfile.3:57 build/C/man2/unlink.2:61
4979 #, no-wrap
4980 msgid "B<EACCES>"
4981 msgstr "B<EACCES>"
4982
4983 #. type: Plain text
4984 #: build/C/man2/link.2:69
4985 msgid ""
4986 "Write access to the directory containing I<newpath> is denied, or search "
4987 "permission is denied for one of the directories in the path prefix of "
4988 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4989 msgstr ""
4990 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4991 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4992 "(B<path_resolution>(7)  を参照)。"
4993
4994 #. type: TP
4995 #: build/C/man2/link.2:69 build/C/man2/open.2:495 build/C/man2/rename.2:133
4996 #: build/C/man2/symlink.2:99 build/C/man2/write.2:135
4997 #, no-wrap
4998 msgid "B<EDQUOT>"
4999 msgstr "B<EDQUOT>"
5000
5001 #. type: Plain text
5002 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
5003 msgid "The user's quota of disk blocks on the file system has been exhausted."
5004 msgstr ""
5005 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
5006
5007 #. type: TP
5008 #: build/C/man2/link.2:72 build/C/man2/open.2:501 build/C/man2/symlink.2:104
5009 #: build/C/man3/tmpfile.3:60
5010 #, no-wrap
5011 msgid "B<EEXIST>"
5012 msgstr "B<EEXIST>"
5013
5014 #. type: Plain text
5015 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
5016 msgid "I<newpath> already exists."
5017 msgstr "I<newpath> が既に存在する。"
5018
5019 #. type: TP
5020 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:507
5021 #: build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91
5022 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:64
5023 #: build/C/man2/symlink.2:108 build/C/man2/unlink.2:80
5024 #: build/C/man2/write.2:141
5025 #, no-wrap
5026 msgid "B<EFAULT>"
5027 msgstr "B<EFAULT>"
5028
5029 #. type: Plain text
5030 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
5031 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5032 msgstr ""
5033 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5034
5035 #. type: TP
5036 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107
5037 #: build/C/man2/symlink.2:111 build/C/man2/unlink.2:84
5038 #: build/C/man2/write.2:165
5039 #, no-wrap
5040 msgid "B<EIO>"
5041 msgstr "B<EIO>"
5042
5043 #. type: Plain text
5044 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
5045 msgid "An I/O error occurred."
5046 msgstr "I/O エラーが発生した。"
5047
5048 #. type: TP
5049 #: build/C/man2/link.2:82 build/C/man2/open.2:531 build/C/man2/readlink.2:110
5050 #: build/C/man2/rename.2:149 build/C/man2/rmdir.2:73
5051 #: build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
5052 #, no-wrap
5053 msgid "B<ELOOP>"
5054 msgstr "B<ELOOP>"
5055
5056 #. type: Plain text
5057 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5058 msgid ""
5059 "Too many symbolic links were encountered in resolving I<oldpath> or "
5060 "I<newpath>."
5061 msgstr ""
5062 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5063 "る。"
5064
5065 #. type: TP
5066 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5067 #, no-wrap
5068 msgid "B<EMLINK>"
5069 msgstr "B<EMLINK>"
5070
5071 #. type: Plain text
5072 #: build/C/man2/link.2:91
5073 msgid ""
5074 "The file referred to by I<oldpath> already has the maximum number of links "
5075 "to it."
5076 msgstr ""
5077 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5078
5079 #. type: TP
5080 #: build/C/man2/link.2:91 build/C/man2/open.2:541 build/C/man2/readlink.2:113
5081 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:77
5082 #: build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
5083 #, no-wrap
5084 msgid "B<ENAMETOOLONG>"
5085 msgstr "B<ENAMETOOLONG>"
5086
5087 #. type: Plain text
5088 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
5089 msgid "I<oldpath> or I<newpath> was too long."
5090 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5091
5092 #. type: TP
5093 #: build/C/man2/link.2:94 build/C/man2/open.2:555 build/C/man2/readlink.2:116
5094 #: build/C/man2/rename.2:163 build/C/man2/rmdir.2:80
5095 #: build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
5096 #, no-wrap
5097 msgid "B<ENOENT>"
5098 msgstr "B<ENOENT>"
5099
5100 #. type: Plain text
5101 #: build/C/man2/link.2:99
5102 msgid ""
5103 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5104 "dangling symbolic link."
5105 msgstr ""
5106 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5107 "(dangling)シンボリックリンクである。"
5108
5109 #. type: TP
5110 #: build/C/man2/link.2:99 build/C/man2/open.2:562 build/C/man2/readlink.2:119
5111 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5112 #: build/C/man2/symlink.2:128 build/C/man3/tempnam.3:95
5113 #: build/C/man2/unlink.2:106
5114 #, no-wrap
5115 msgid "B<ENOMEM>"
5116 msgstr "B<ENOMEM>"
5117
5118 #. type: Plain text
5119 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/readlink.2:122
5120 #: build/C/man2/rename.2:179 build/C/man2/rmdir.2:88
5121 #: build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
5122 msgid "Insufficient kernel memory was available."
5123 msgstr "十分なカーネルメモリーがない。"
5124
5125 #. type: TP
5126 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/rename.2:179
5127 #: build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:72
5128 #: build/C/man2/write.2:168
5129 #, no-wrap
5130 msgid "B<ENOSPC>"
5131 msgstr "B<ENOSPC>"
5132
5133 #. type: Plain text
5134 #: build/C/man2/link.2:106 build/C/man2/rename.2:183
5135 #: build/C/man2/symlink.2:135
5136 msgid "The device containing the file has no room for the new directory entry."
5137 msgstr ""
5138 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5139 "空きがない。"
5140
5141 #. type: TP
5142 #: build/C/man2/link.2:106 build/C/man2/open.2:571 build/C/man2/readlink.2:122
5143 #: build/C/man2/rename.2:183 build/C/man2/rmdir.2:88
5144 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
5145 #, no-wrap
5146 msgid "B<ENOTDIR>"
5147 msgstr "B<ENOTDIR>"
5148
5149 #. type: Plain text
5150 #: build/C/man2/link.2:111
5151 msgid ""
5152 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5153 "a directory."
5154 msgstr ""
5155 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5156 "い。"
5157
5158 #. type: TP
5159 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:604
5160 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5161 #: build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
5162 #, no-wrap
5163 msgid "B<EPERM>"
5164 msgstr "B<EPERM>"
5165
5166 #. type: Plain text
5167 #: build/C/man2/link.2:115
5168 msgid "I<oldpath> is a directory."
5169 msgstr "I<oldpath> がディレクトリである。"
5170
5171 #. type: Plain text
5172 #: build/C/man2/link.2:120
5173 msgid ""
5174 "The file system containing I<oldpath> and I<newpath> does not support the "
5175 "creation of hard links."
5176 msgstr ""
5177 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5178 "していない。"
5179
5180 #. type: TP
5181 #: build/C/man2/link.2:120
5182 #, no-wrap
5183 msgid "B<EPERM> (since Linux 3.6)"
5184 msgstr "B<EPERM> (Linux 3.6 以降)"
5185
5186 #. type: Plain text
5187 #: build/C/man2/link.2:127
5188 msgid ""
5189 "The caller does not have permission to create a hard link to this file (see "
5190 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
5191 msgstr ""
5192 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5193 "の I</proc/sys/fs/protected_hardlink> の説明を参照)。"
5194
5195 #. type: TP
5196 #: build/C/man2/link.2:127 build/C/man2/open.2:612 build/C/man2/rename.2:221
5197 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145
5198 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:137
5199 #, no-wrap
5200 msgid "B<EROFS>"
5201 msgstr "B<EROFS>"
5202
5203 #. type: Plain text
5204 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5205 msgid "The file is on a read-only file system."
5206 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5207
5208 #. type: TP
5209 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5210 #, no-wrap
5211 msgid "B<EXDEV>"
5212 msgstr "B<EXDEV>"
5213
5214 #. type: Plain text
5215 #: build/C/man2/link.2:138
5216 msgid ""
5217 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
5218 "permits a file system to be mounted at multiple points, but B<link>()  does "
5219 "not work across different mount points, even if the same file system is "
5220 "mounted on both.)"
5221 msgstr ""
5222 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5223 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5224 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5225 "のマウント位置を跨いでは動作しない。)"
5226
5227 #.  SVr4 documents additional ENOLINK and
5228 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5229 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5230 #. type: Plain text
5231 #: build/C/man2/link.2:143
5232 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5233 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5234
5235 #. type: Plain text
5236 #: build/C/man2/link.2:150
5237 msgid ""
5238 "Hard links, as created by B<link>(), cannot span file systems.  Use "
5239 "B<symlink>(2)  if this is required."
5240 msgstr ""
5241 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5242 "このような場合は B<symlink>(2)  を使用すること。"
5243
5244 #.  more precisely: since kernel 1.3.56
5245 #.  For example, the default Solaris compilation environment
5246 #.  behaves like Linux, and contributors to a March 2005
5247 #.  thread in the Austin mailing list reported that some
5248 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5249 #. type: Plain text
5250 #: build/C/man2/link.2:181
5251 msgid ""
5252 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5253 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5254 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5255 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5256 "the same file that I<oldpath> refers to).  Some other implementations behave "
5257 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5258 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5259 "dereferenced if it is a symbolic link.  For precise control over the "
5260 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5261 msgstr ""
5262 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5263 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5264 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5265 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5266 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5267 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5268 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5269 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5270 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5271 "は B<linkat>(2)  を参照のこと。"
5272
5273 #. type: Plain text
5274 #: build/C/man2/link.2:187
5275 msgid ""
5276 "On NFS file systems, the return code may be wrong in case the NFS server "
5277 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5278 "to find out if the link got created."
5279 msgstr ""
5280 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5281 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5282 "ためには B<stat>(2)  を使用すること。"
5283
5284 #. type: Plain text
5285 #: build/C/man2/link.2:197
5286 msgid ""
5287 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5288 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5289 msgstr ""
5290 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5291 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5292
5293 #. type: TH
5294 #: build/C/man2/llseek.2:28
5295 #, no-wrap
5296 msgid "LLSEEK"
5297 msgstr "LLSEEK"
5298
5299 #. type: TH
5300 #: build/C/man2/llseek.2:28
5301 #, no-wrap
5302 msgid "2012-07-13"
5303 msgstr "2012-07-13"
5304
5305 #. type: Plain text
5306 #: build/C/man2/llseek.2:31
5307 msgid "_llseek - reposition read/write file offset"
5308 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5309
5310 #. type: Plain text
5311 #: build/C/man2/llseek.2:35
5312 #, no-wrap
5313 msgid ""
5314 "B<#include E<lt>sys/types.hE<gt>>\n"
5315 "B<#include E<lt>unistd.hE<gt>>\n"
5316 msgstr ""
5317 "B<#include E<lt>sys/types.hE<gt>>\n"
5318 "B<#include E<lt>unistd.hE<gt>>\n"
5319
5320 #. type: Plain text
5321 #: build/C/man2/llseek.2:39
5322 #, no-wrap
5323 msgid ""
5324 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5325 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5326 "B<            unsigned int >I<whence>B<);>\n"
5327 msgstr ""
5328 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5329 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5330 "B<            unsigned int >I<whence>B<);>\n"
5331
5332 #. type: Plain text
5333 #: build/C/man2/llseek.2:43
5334 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5335 msgstr ""
5336 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5337 "を参照。"
5338
5339 #. type: Plain text
5340 #: build/C/man2/llseek.2:62
5341 msgid ""
5342 "The B<_llseek>()  function repositions the offset of the open file "
5343 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5344 "offset_low> bytes relative to the beginning of the file, the current "
5345 "position in the file, or the end of the file, depending on whether I<whence> "
5346 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5347 "resulting file position in the argument I<result>."
5348 msgstr ""
5349 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5350 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5351 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5352 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5353 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5354 "のファイル位置を I<result> 引き数に返す。"
5355
5356 #. type: Plain text
5357 #: build/C/man2/llseek.2:69
5358 msgid ""
5359 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5360 "-1 is returned and I<errno> is set to indicate the error."
5361 msgstr ""
5362 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5363 "エラーを示す I<errno> が設定される。"
5364
5365 #. type: Plain text
5366 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:175
5367 msgid "I<fd> is not an open file descriptor."
5368 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5369
5370 #. type: Plain text
5371 #: build/C/man2/llseek.2:77
5372 msgid "Problem with copying results to user space."
5373 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5374
5375 #. type: Plain text
5376 #: build/C/man2/llseek.2:81
5377 msgid "I<whence> is invalid."
5378 msgstr "I<whence> が不正である。"
5379
5380 #. type: Plain text
5381 #: build/C/man2/llseek.2:84
5382 msgid ""
5383 "This function is Linux-specific, and should not be used in programs intended "
5384 "to be portable."
5385 msgstr ""
5386 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5387
5388 #. type: Plain text
5389 #: build/C/man2/llseek.2:87
5390 msgid ""
5391 "Glibc does not provide a wrapper for this system call; call it using "
5392 "B<syscall>(2)."
5393 msgstr ""
5394 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5395 "(2)  を使って呼び出すこと。"
5396
5397 #. type: Plain text
5398 #: build/C/man2/llseek.2:90
5399 msgid "B<lseek>(2), B<lseek64>(3)"
5400 msgstr "B<lseek>(2), B<lseek64>(3)"
5401
5402 #. type: TH
5403 #: build/C/man2/lseek.2:47
5404 #, no-wrap
5405 msgid "LSEEK"
5406 msgstr "LSEEK"
5407
5408 #. type: TH
5409 #: build/C/man2/lseek.2:47
5410 #, no-wrap
5411 msgid "2013-03-27"
5412 msgstr "2013-03-27"
5413
5414 #. type: Plain text
5415 #: build/C/man2/lseek.2:50
5416 msgid "lseek - reposition read/write file offset"
5417 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5418
5419 #. type: Plain text
5420 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5421 msgid "B<#include E<lt>sys/types.hE<gt>>"
5422 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5423
5424 #. type: Plain text
5425 #: build/C/man2/lseek.2:56
5426 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5427 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5428
5429 #. type: Plain text
5430 #: build/C/man2/lseek.2:67
5431 msgid ""
5432 "The B<lseek>()  function repositions the offset of the open file associated "
5433 "with the file descriptor I<fd> to the argument I<offset> according to the "
5434 "directive I<whence> as follows:"
5435 msgstr ""
5436 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5437 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5438 "へ以下のように変更する:"
5439
5440 #. type: Plain text
5441 #: build/C/man2/lseek.2:72
5442 msgid "The offset is set to I<offset> bytes."
5443 msgstr "オフセットは I<offset> バイトに設定される。"
5444
5445 #. type: Plain text
5446 #: build/C/man2/lseek.2:77
5447 msgid "The offset is set to its current location plus I<offset> bytes."
5448 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5449
5450 #. type: Plain text
5451 #: build/C/man2/lseek.2:82
5452 msgid "The offset is set to the size of the file plus I<offset> bytes."
5453 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5454
5455 #. type: Plain text
5456 #: build/C/man2/lseek.2:90
5457 msgid ""
5458 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5459 "the file (but this does not change the size of the file).  If data is later "
5460 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5461 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5462 "gap."
5463 msgstr ""
5464 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5465 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5466 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5467 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5468 "される。"
5469
5470 #. type: SS
5471 #: build/C/man2/lseek.2:90
5472 #, no-wrap
5473 msgid "Seeking file data and holes"
5474 msgstr "ファイルのデータとホールの探索"
5475
5476 #. type: Plain text
5477 #: build/C/man2/lseek.2:93
5478 msgid ""
5479 "Since version 3.1, Linux supports the following additional values for "
5480 "I<whence>:"
5481 msgstr ""
5482 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5483
5484 #. type: TP
5485 #: build/C/man2/lseek.2:93
5486 #, no-wrap
5487 msgid "B<SEEK_DATA>"
5488 msgstr "B<SEEK_DATA>"
5489
5490 #. type: Plain text
5491 #: build/C/man2/lseek.2:104
5492 msgid ""
5493 "Adjust the file offset to the next location in the file greater than or "
5494 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5495 "file offset is set to I<offset>."
5496 msgstr ""
5497 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5498 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5499 "定される。"
5500
5501 #. type: TP
5502 #: build/C/man2/lseek.2:104
5503 #, no-wrap
5504 msgid "B<SEEK_HOLE>"
5505 msgstr "B<SEEK_HOLE>"
5506
5507 #. type: Plain text
5508 #: build/C/man2/lseek.2:118
5509 msgid ""
5510 "Adjust the file offset to the next hole in the file greater than or equal to "
5511 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5512 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5513 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5514 "hole at the end of any file)."
5515 msgstr ""
5516 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5517 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5518 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5519 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5520 "だ)。"
5521
5522 #. type: Plain text
5523 #: build/C/man2/lseek.2:124
5524 msgid ""
5525 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5526 "end of the file."
5527 msgstr ""
5528 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5529 "B<lseek>() は失敗する。"
5530
5531 #. type: Plain text
5532 #: build/C/man2/lseek.2:130
5533 msgid ""
5534 "These operations allow applications to map holes in a sparsely allocated "
5535 "file.  This can be useful for applications such as file backup tools, which "
5536 "can save space when creating backups and preserve holes, if they have a "
5537 "mechanism for discovering holes."
5538 msgstr ""
5539 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5540 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5541 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5542 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5543 "約し、ホールを保持することができる。"
5544
5545 #.  https://lkml.org/lkml/2011/4/22/79
5546 #.  http://lwn.net/Articles/440255/
5547 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5548 #. type: Plain text
5549 #: build/C/man2/lseek.2:153
5550 msgid ""
5551 "For the purposes of these operations, a hole is a sequence of zeros that "
5552 "(normally) has not been allocated in the underlying file storage.  However, "
5553 "a file system is not obliged to report holes, so these operations are not a "
5554 "guaranteed mechanism for mapping the storage space actually allocated to a "
5555 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5556 "the underlying storage may not be reported as a hole.)  In the simplest "
5557 "implementation, a file system can support the operations by making "
5558 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5559 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5560 "by I<offset> is a hole, it can be considered to consist of data that is a "
5561 "sequence of zeros)."
5562 msgstr ""
5563 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5564 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5565 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5566 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5567 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5568 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5569 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5570 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5571 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5572 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5573 "ということである)。"
5574
5575 #. type: Plain text
5576 #: build/C/man2/lseek.2:162
5577 msgid ""
5578 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5579 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5580 msgstr ""
5581 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5582 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5583
5584 #. type: Plain text
5585 #: build/C/man2/lseek.2:170
5586 msgid ""
5587 "Upon successful completion, B<lseek>()  returns the resulting offset "
5588 "location as measured in bytes from the beginning of the file.  On error, the "
5589 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5590 msgstr ""
5591 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5592 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5593 "される。"
5594
5595 #.  Some systems may allow negative offsets for character devices
5596 #.  and/or for remote file systems.
5597 #. type: Plain text
5598 #: build/C/man2/lseek.2:183
5599 msgid ""
5600 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5601 "beyond the end of a seekable device."
5602 msgstr ""
5603 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5604 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5605
5606 #. type: TP
5607 #: build/C/man2/lseek.2:183 build/C/man2/open.2:584
5608 #, no-wrap
5609 msgid "B<EOVERFLOW>"
5610 msgstr "B<EOVERFLOW>"
5611
5612 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5613 #. type: Plain text
5614 #: build/C/man2/lseek.2:188
5615 msgid "The resulting file offset cannot be represented in an I<off_t>."
5616 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5617
5618 #. type: TP
5619 #: build/C/man2/lseek.2:188
5620 #, no-wrap
5621 msgid "B<ESPIPE>"
5622 msgstr "B<ESPIPE>"
5623
5624 #. type: Plain text
5625 #: build/C/man2/lseek.2:192
5626 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5627 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5628
5629 #. type: TP
5630 #: build/C/man2/lseek.2:192 build/C/man2/open.2:578
5631 #, no-wrap
5632 msgid "B<ENXIO>"
5633 msgstr "B<ENXIO>"
5634
5635 #. type: Plain text
5636 #: build/C/man2/lseek.2:200
5637 msgid ""
5638 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5639 "beyond the end of the file."
5640 msgstr ""
5641 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5642 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5643
5644 #.  SVr4 documents additional error
5645 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5646 #. type: Plain text
5647 #: build/C/man2/lseek.2:202 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
5648 #: build/C/man2/symlink.2:155 build/C/man2/unlink.2:145
5649 #: build/C/man2/write.2:189
5650 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5651 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5652
5653 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5654 #. type: Plain text
5655 #: build/C/man2/lseek.2:210
5656 msgid ""
5657 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5658 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5659 "next POSIX revision (Issue 8)."
5660 msgstr ""
5661 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
5662 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
5663 "る。"
5664
5665 #. type: Plain text
5666 #: build/C/man2/lseek.2:214
5667 msgid ""
5668 "Some devices are incapable of seeking and POSIX does not specify which "
5669 "devices must support B<lseek>()."
5670 msgstr ""
5671 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5672 "に対応すべきかは規定していない。"
5673
5674 #.  Other systems return the number of written characters,
5675 #.  using SEEK_SET to set the counter. (Of written characters.)
5676 #. type: Plain text
5677 #: build/C/man2/lseek.2:221
5678 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
5679 msgstr ""
5680 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
5681 "る。"
5682
5683 #. type: Plain text
5684 #: build/C/man2/lseek.2:224
5685 msgid ""
5686 "When converting old code, substitute values for I<whence> with the following "
5687 "macros:"
5688 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5689
5690 #. type: tbl table
5691 #: build/C/man2/lseek.2:227
5692 #, no-wrap
5693 msgid "old\tnew\n"
5694 msgstr "old \tnew\n"
5695
5696 #. type: tbl table
5697 #: build/C/man2/lseek.2:228
5698 #, no-wrap
5699 msgid "0\tSEEK_SET\n"
5700 msgstr "0\tSEEK_SET\n"
5701
5702 #. type: tbl table
5703 #: build/C/man2/lseek.2:229
5704 #, no-wrap
5705 msgid "1\tSEEK_CUR\n"
5706 msgstr "1\tSEEK_CUR\n"
5707
5708 #. type: tbl table
5709 #: build/C/man2/lseek.2:230
5710 #, no-wrap
5711 msgid "2\tSEEK_END\n"
5712 msgstr "2\tSEEK_END\n"
5713
5714 #. type: tbl table
5715 #: build/C/man2/lseek.2:231
5716 #, no-wrap
5717 msgid "L_SET\tSEEK_SET\n"
5718 msgstr "L_SET\tSEEK_SET\n"
5719
5720 #. type: tbl table
5721 #: build/C/man2/lseek.2:232
5722 #, no-wrap
5723 msgid "L_INCR\tSEEK_CUR\n"
5724 msgstr "L_INCR\tSEEK_CUR\n"
5725
5726 #. type: tbl table
5727 #: build/C/man2/lseek.2:233
5728 #, no-wrap
5729 msgid "L_XTND\tSEEK_END\n"
5730 msgstr "L_XTND\tSEEK_END\n"
5731
5732 #. type: Plain text
5733 #: build/C/man2/lseek.2:245
5734 msgid ""
5735 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5736 "current file position pointer, so seeking on such files may be subject to "
5737 "race conditions."
5738 msgstr ""
5739 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5740 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5741 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5742
5743 #. type: Plain text
5744 #: build/C/man2/lseek.2:252
5745 msgid ""
5746 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5747 "B<posix_fallocate>(3)"
5748 msgstr ""
5749 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5750 "B<posix_fallocate>(3)"
5751
5752 #. type: TH
5753 #: build/C/man3/lseek64.3:25
5754 #, no-wrap
5755 msgid "LSEEK64"
5756 msgstr "LSEEK64"
5757
5758 #. type: TH
5759 #: build/C/man3/lseek64.3:25
5760 #, no-wrap
5761 msgid "2004-12-11"
5762 msgstr "2004-12-11"
5763
5764 #. type: Plain text
5765 #: build/C/man3/lseek64.3:28
5766 msgid "lseek64 - reposition 64-bit read/write file offset"
5767 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5768
5769 #. type: Plain text
5770 #: build/C/man3/lseek64.3:30
5771 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5772 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5773
5774 #. type: Plain text
5775 #: build/C/man3/lseek64.3:36
5776 msgid ""
5777 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5778 msgstr ""
5779 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5780
5781 #. type: Plain text
5782 #: build/C/man3/lseek64.3:53
5783 msgid ""
5784 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5785 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5786 "start, current position, or end of the file, when I<whence> has the value "
5787 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5788 msgstr ""
5789 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5790 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5791 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5792 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5793
5794 #. type: Plain text
5795 #: build/C/man3/lseek64.3:56
5796 msgid "For more details, return value, and errors, see B<lseek>(2)."
5797 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5798
5799 #. type: Plain text
5800 #: build/C/man3/lseek64.3:63
5801 msgid ""
5802 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5803 "the raw system call B<_llseek>(2)."
5804 msgstr ""
5805 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5806 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5807
5808 #. type: SS
5809 #: build/C/man3/lseek64.3:63
5810 #, no-wrap
5811 msgid "lseek"
5812 msgstr "lseek"
5813
5814 #. type: Plain text
5815 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
5816 #: build/C/man3/lseek64.3:116
5817 msgid "Prototype:"
5818 msgstr "プロトタイプ:"
5819
5820 #. type: Plain text
5821 #: build/C/man3/lseek64.3:69
5822 #, no-wrap
5823 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5824 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5825
5826 #. type: Plain text
5827 #: build/C/man3/lseek64.3:77
5828 msgid ""
5829 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5830 "architectures, unless one compiles with"
5831 msgstr ""
5832 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5833 "ビット符号付き型である。 ただし、"
5834
5835 #. type: Plain text
5836 #: build/C/man3/lseek64.3:85
5837 msgid "in which case it is a 64-bit signed type."
5838 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5839
5840 #. type: SS
5841 #: build/C/man3/lseek64.3:85
5842 #, no-wrap
5843 msgid "lseek64"
5844 msgstr "lseek64"
5845
5846 #. type: Plain text
5847 #: build/C/man3/lseek64.3:91
5848 #, no-wrap
5849 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5850 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5851
5852 #. type: Plain text
5853 #: build/C/man3/lseek64.3:102
5854 msgid ""
5855 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5856 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5857 "when one compiles with"
5858 msgstr ""
5859 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5860 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5861 "ルした場合にのみ使用可能である。"
5862
5863 #. type: Plain text
5864 #: build/C/man3/lseek64.3:106
5865 #, no-wrap
5866 msgid "#define _LARGEFILE64_SOURCE\n"
5867 msgstr "#define _LARGEFILE64_SOURCE\n"
5868
5869 #.  in glibc 2.0.94, not in 2.0.6
5870 #. type: Plain text
5871 #: build/C/man3/lseek64.3:114
5872 msgid ""
5873 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5874 "be an alias for B<llseek>()."
5875 msgstr ""
5876 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5877 "アスとして定義されている。"
5878
5879 #. type: SS
5880 #: build/C/man3/lseek64.3:114
5881 #, no-wrap
5882 msgid "llseek"
5883 msgstr "llseek"
5884
5885 #. type: Plain text
5886 #: build/C/man3/lseek64.3:120
5887 #, no-wrap
5888 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5889 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5890
5891 #.  in libc 5.0.9, not in 4.7.6
5892 #. type: Plain text
5893 #: build/C/man3/lseek64.3:139
5894 msgid ""
5895 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5896 "()  is available in libc5 and glibc and works without special defines.  Its "
5897 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5898 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5899 "should add the above prototype, or something equivalent, to their own "
5900 "source.  When users complained about data loss caused by a miscompilation of "
5901 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5902 msgstr ""
5903 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5904 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5905 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5906 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5907 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5908 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5909 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5910
5911 #. type: Plain text
5912 #: build/C/man3/lseek64.3:142
5913 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5914 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5915
5916 #. type: Plain text
5917 #: build/C/man3/lseek64.3:146
5918 msgid ""
5919 "This makes this function unusable if one desires a warning-free compilation."
5920 msgstr ""
5921 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5922
5923 #. type: SS
5924 #: build/C/man3/lseek64.3:146
5925 #, no-wrap
5926 msgid "_llseek"
5927 msgstr "_llseek"
5928
5929 #. type: Plain text
5930 #: build/C/man3/lseek64.3:149
5931 msgid ""
5932 "All the above functions are implemented in terms of this system call.  The "
5933 "prototype is:"
5934 msgstr ""
5935 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5936 "下の通り:"
5937
5938 #. type: Plain text
5939 #: build/C/man3/lseek64.3:154
5940 #, no-wrap
5941 msgid ""
5942 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5943 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5944 msgstr ""
5945 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5946 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5947
5948 #. type: Plain text
5949 #: build/C/man3/lseek64.3:159
5950 msgid "For more details, see B<llseek>(2)."
5951 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5952
5953 #. type: Plain text
5954 #: build/C/man3/lseek64.3:162
5955 msgid "B<llseek>(2), B<lseek>(2)"
5956 msgstr "B<llseek>(2), B<lseek>(2)"
5957
5958 #. type: TH
5959 #: build/C/man2/open.2:52
5960 #, no-wrap
5961 msgid "OPEN"
5962 msgstr "OPEN"
5963
5964 #. type: TH
5965 #: build/C/man2/open.2:52
5966 #, no-wrap
5967 msgid "2013-02-18"
5968 msgstr "2013-02-18"
5969
5970 #. type: Plain text
5971 #: build/C/man2/open.2:55
5972 msgid "open, creat - open and possibly create a file or device"
5973 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5974
5975 #. type: Plain text
5976 #: build/C/man2/open.2:60
5977 #, no-wrap
5978 msgid ""
5979 "B<#include E<lt>sys/types.hE<gt>>\n"
5980 "B<#include E<lt>sys/stat.hE<gt>>\n"
5981 "B<#include E<lt>fcntl.hE<gt>>\n"
5982 msgstr ""
5983 "B<#include E<lt>sys/types.hE<gt>>\n"
5984 "B<#include E<lt>sys/stat.hE<gt>>\n"
5985 "B<#include E<lt>fcntl.hE<gt>>\n"
5986
5987 #. type: Plain text
5988 #: build/C/man2/open.2:63
5989 #, no-wrap
5990 msgid ""
5991 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5992 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5993 msgstr ""
5994 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5995 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5996
5997 #. type: Plain text
5998 #: build/C/man2/open.2:65
5999 #, no-wrap
6000 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6001 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
6002
6003 #. type: Plain text
6004 #: build/C/man2/open.2:76
6005 msgid ""
6006 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
6007 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
6008 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
6009 "by a successful call will be the lowest-numbered file descriptor not "
6010 "currently open for the process."
6011 msgstr ""
6012 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
6013 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
6014 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6015 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
6016 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
6017 "のものとなる。"
6018
6019 #. type: Plain text
6020 #: build/C/man2/open.2:88
6021 msgid ""
6022 "By default, the new file descriptor is set to remain open across an B<execve>"
6023 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
6024 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
6025 "to change this default).  The file offset is set to the beginning of the "
6026 "file (see B<lseek>(2))."
6027 msgstr ""
6028 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
6029 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6030 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
6031 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
6032 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6033
6034 #. type: Plain text
6035 #: build/C/man2/open.2:107
6036 msgid ""
6037 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6038 "system-wide table of open files.  This entry records the file offset and the "
6039 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
6040 "file descriptor is a reference to one of these entries; this reference is "
6041 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
6042 "different file.  The new open file description is initially not shared with "
6043 "any other process, but sharing may arise via B<fork>(2)."
6044 msgstr ""
6045 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6046 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6047 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6048 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6049 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6050 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6051 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6052 "が、 B<fork>(2)  で共有が起こる場合がある。"
6053
6054 #. type: Plain text
6055 #: build/C/man2/open.2:115
6056 msgid ""
6057 "The argument I<flags> must include one of the following I<access modes>: "
6058 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6059 "only, write-only, or read/write, respectively."
6060 msgstr ""
6061 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6062 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6063 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6064
6065 #.  SUSv4 divides the flags into:
6066 #.  * Access mode
6067 #.  * File creation
6068 #.  * File status
6069 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6070 #.  though it's not clear what the difference between "other" and
6071 #.  "File creation" flags is.  I raised an Aardvark to see if this
6072 #.  can be clarified in SUSv4; 10 Oct 2008.
6073 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6074 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6075 #.  are also categorized" as file status flags.
6076 #. type: Plain text
6077 #: build/C/man2/open.2:153
6078 msgid ""
6079 "In addition, zero or more file creation flags and file status flags can be "
6080 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6081 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6082 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
6083 "remaining flags listed below.  The distinction between these two groups of "
6084 "flags is that the file status flags can be retrieved and (in some cases)  "
6085 "modified using B<fcntl>(2).  The full list of file creation flags and file "
6086 "status flags is as follows:"
6087 msgstr ""
6088 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6089 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6090 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6091 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TRUNC>, "
6092 "B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち上記以外の残"
6093 "りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は B<fcntl>"
6094 "(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点にあ"
6095 "る。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
6096
6097 #. type: TP
6098 #: build/C/man2/open.2:153
6099 #, no-wrap
6100 msgid "B<O_APPEND>"
6101 msgstr "B<O_APPEND>"
6102
6103 #.  For more background, see
6104 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6105 #.  http://nfs.sourceforge.net/
6106 #. type: Plain text
6107 #: build/C/man2/open.2:170
6108 msgid ""
6109 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6110 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6111 "may lead to corrupted files on NFS file systems if more than one process "
6112 "appends data to a file at once.  This is because NFS does not support "
6113 "appending to a file, so the client kernel has to simulate it, which can't be "
6114 "done without a race condition."
6115 msgstr ""
6116 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6117 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6118 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6119 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6120 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6121 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6122 "とはできないからである。"
6123
6124 #. type: TP
6125 #: build/C/man2/open.2:170
6126 #, no-wrap
6127 msgid "B<O_ASYNC>"
6128 msgstr "B<O_ASYNC>"
6129
6130 #. type: Plain text
6131 #: build/C/man2/open.2:183
6132 msgid ""
6133 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6134 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6135 "this file descriptor.  This feature is available only for terminals, "
6136 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6137 "B<fcntl>(2)  for further details."
6138 msgstr ""
6139 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6140 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6141 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6142 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6143 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
6144
6145 #. type: TP
6146 #: build/C/man2/open.2:183
6147 #, no-wrap
6148 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
6149 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6150
6151 #.  This flag fixes only one form of the race condition;
6152 #.  The race can also occur with, for example, descriptors
6153 #.  returned by accept(), pipe(), etc.
6154 #. type: Plain text
6155 #: build/C/man2/open.2:208
6156 msgid ""
6157 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6158 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6159 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
6160 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
6161 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
6162 "race conditions where one thread opens a file descriptor at the same time as "
6163 "another thread does a B<fork>(2)  plus B<execve>(2)."
6164 msgstr ""
6165 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6166 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
6167 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
6168 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
6169 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
6170 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
6171 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
6172 "はないからである。"
6173
6174 #. type: TP
6175 #: build/C/man2/open.2:208
6176 #, no-wrap
6177 msgid "B<O_CREAT>"
6178 msgstr "B<O_CREAT>"
6179
6180 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6181 #.  XFS (since 2.6.14).
6182 #. type: Plain text
6183 #: build/C/man2/open.2:224
6184 msgid ""
6185 "If the file does not exist it will be created.  The owner (user ID) of the "
6186 "file is set to the effective user ID of the process.  The group ownership "
6187 "(group ID) is set either to the effective group ID of the process or to the "
6188 "group ID of the parent directory (depending on file system type and mount "
6189 "options, and the mode of the parent directory, see the mount options "
6190 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6191 msgstr ""
6192 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6193 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6194 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6195 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6196 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6197 "I<bsdgroups> と I<sysvgroups> を参照)。"
6198
6199 #. type: Plain text
6200 #: build/C/man2/open.2:247
6201 msgid ""
6202 "I<mode> specifies the permissions to use in case a new file is created.  "
6203 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
6204 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
6205 "permissions are modified by the process's I<umask> in the usual way: The "
6206 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
6207 "mode applies only to future accesses of the newly created file; the B<open>"
6208 "()  call that creates a read-only file may well return a read/write file "
6209 "descriptor."
6210 msgstr ""
6211 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6212 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
6213 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
6214 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
6215 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
6216 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
6217 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
6218 "可能なファイルディスクリプタを返すことがありうる。"
6219
6220 #. type: Plain text
6221 #: build/C/man2/open.2:250
6222 msgid "The following symbolic constants are provided for I<mode>:"
6223 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6224
6225 #. type: TP
6226 #: build/C/man2/open.2:250
6227 #, no-wrap
6228 msgid "B<S_IRWXU>"
6229 msgstr "B<S_IRWXU>"
6230
6231 #. type: Plain text
6232 #: build/C/man2/open.2:253
6233 msgid "00700 user (file owner) has read, write and execute permission"
6234 msgstr ""
6235 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6236
6237 #. type: TP
6238 #: build/C/man2/open.2:253
6239 #, no-wrap
6240 msgid "B<S_IRUSR>"
6241 msgstr "B<S_IRUSR>"
6242
6243 #. type: Plain text
6244 #: build/C/man2/open.2:256
6245 msgid "00400 user has read permission"
6246 msgstr "00400 ユーザーに読み込みの許可がある。"
6247
6248 #. type: TP
6249 #: build/C/man2/open.2:256
6250 #, no-wrap
6251 msgid "B<S_IWUSR>"
6252 msgstr "B<S_IWUSR>"
6253
6254 #. type: Plain text
6255 #: build/C/man2/open.2:259
6256 msgid "00200 user has write permission"
6257 msgstr "00200 ユーザーに書き込みの許可がある。"
6258
6259 #. type: TP
6260 #: build/C/man2/open.2:259
6261 #, no-wrap
6262 msgid "B<S_IXUSR>"
6263 msgstr "B<S_IXUSR>"
6264
6265 #. type: Plain text
6266 #: build/C/man2/open.2:262
6267 msgid "00100 user has execute permission"
6268 msgstr "00100 ユーザーに実行の許可がある。"
6269
6270 #. type: TP
6271 #: build/C/man2/open.2:262
6272 #, no-wrap
6273 msgid "B<S_IRWXG>"
6274 msgstr "B<S_IRWXG>"
6275
6276 #. type: Plain text
6277 #: build/C/man2/open.2:265
6278 msgid "00070 group has read, write and execute permission"
6279 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6280
6281 #. type: TP
6282 #: build/C/man2/open.2:265
6283 #, no-wrap
6284 msgid "B<S_IRGRP>"
6285 msgstr "B<S_IRGRP>"
6286
6287 #. type: Plain text
6288 #: build/C/man2/open.2:268
6289 msgid "00040 group has read permission"
6290 msgstr "00040 グループに読み込みの許可がある。"
6291
6292 #. type: TP
6293 #: build/C/man2/open.2:268
6294 #, no-wrap
6295 msgid "B<S_IWGRP>"
6296 msgstr "B<S_IWGRP>"
6297
6298 #. type: Plain text
6299 #: build/C/man2/open.2:271
6300 msgid "00020 group has write permission"
6301 msgstr "00020 グループに書き込みの許可がある。"
6302
6303 #. type: TP
6304 #: build/C/man2/open.2:271
6305 #, no-wrap
6306 msgid "B<S_IXGRP>"
6307 msgstr "B<S_IXGRP>"
6308
6309 #. type: Plain text
6310 #: build/C/man2/open.2:274
6311 msgid "00010 group has execute permission"
6312 msgstr "00010 グループに実行の許可がある。"
6313
6314 #. type: TP
6315 #: build/C/man2/open.2:274
6316 #, no-wrap
6317 msgid "B<S_IRWXO>"
6318 msgstr "B<S_IRWXO>"
6319
6320 #. type: Plain text
6321 #: build/C/man2/open.2:277
6322 msgid "00007 others have read, write and execute permission"
6323 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6324
6325 #. type: TP
6326 #: build/C/man2/open.2:277
6327 #, no-wrap
6328 msgid "B<S_IROTH>"
6329 msgstr "B<S_IROTH>"
6330
6331 #. type: Plain text
6332 #: build/C/man2/open.2:280
6333 msgid "00004 others have read permission"
6334 msgstr "00004 他人に読み込みの許可がある。"
6335
6336 #. type: TP
6337 #: build/C/man2/open.2:280
6338 #, no-wrap
6339 msgid "B<S_IWOTH>"
6340 msgstr "B<S_IWOTH>"
6341
6342 #. type: Plain text
6343 #: build/C/man2/open.2:283
6344 msgid "00002 others have write permission"
6345 msgstr "00002 他人に書き込みの許可がある。"
6346
6347 #. type: TP
6348 #: build/C/man2/open.2:283
6349 #, no-wrap
6350 msgid "B<S_IXOTH>"
6351 msgstr "B<S_IXOTH>"
6352
6353 #. type: Plain text
6354 #: build/C/man2/open.2:286
6355 msgid "00001 others have execute permission"
6356 msgstr "00001 他人に実行の許可がある。"
6357
6358 #. type: TP
6359 #: build/C/man2/open.2:287
6360 #, no-wrap
6361 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6362 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6363
6364 #. type: Plain text
6365 #: build/C/man2/open.2:304
6366 msgid ""
6367 "Try to minimize cache effects of the I/O to and from this file.  In general "
6368 "this will degrade performance, but it is useful in special situations, such "
6369 "as when applications do their own caching.  File I/O is done directly to/"
6370 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6371 "transfer data synchronously, but does not give the guarantees of the "
6372 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6373 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6374 "B<O_DIRECT>.  See NOTES below for further discussion."
6375 msgstr ""
6376 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6377 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6378 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6379 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6380 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6381 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6382 "使用しなければならない。下記の「注意」の節の議論も参照。"
6383
6384 #. type: Plain text
6385 #: build/C/man2/open.2:308
6386 msgid ""
6387 "A semantically similar (but deprecated) interface for block devices is "
6388 "described in B<raw>(8)."
6389 msgstr ""
6390 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6391 "れている (但し、このインタフェースは非推奨である)。"
6392
6393 #. type: TP
6394 #: build/C/man2/open.2:308
6395 #, no-wrap
6396 msgid "B<O_DIRECTORY>"
6397 msgstr "B<O_DIRECTORY>"
6398
6399 #.  But see the following and its replies:
6400 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6401 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6402 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6403 #. type: Plain text
6404 #: build/C/man2/open.2:322
6405 msgid ""
6406 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6407 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6408 "service problems if B<opendir>(3)  is called on a FIFO or tape device, but "
6409 "should not be used outside of the implementation of B<opendir>(3)."
6410 msgstr ""
6411 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6412 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6413 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6414 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6415
6416 #. type: TP
6417 #: build/C/man2/open.2:322
6418 #, no-wrap
6419 msgid "B<O_EXCL>"
6420 msgstr "B<O_EXCL>"
6421
6422 #. type: Plain text
6423 #: build/C/man2/open.2:332
6424 msgid ""
6425 "Ensure that this call creates the file: if this flag is specified in "
6426 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6427 "will fail."
6428 msgstr ""
6429 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6430 "と\n"
6431 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6432 "敗\n"
6433 "する。"
6434
6435 #.  POSIX.1-2001 explicitly requires this behavior.
6436 #. type: Plain text
6437 #: build/C/man2/open.2:340
6438 msgid ""
6439 "When these two flags are specified, symbolic links are not followed: if "
6440 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6441 "the symbolic link points to."
6442 msgstr ""
6443 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6444 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6445 "かに関わらず B<open>()  は失敗する。"
6446
6447 #. type: Plain text
6448 #: build/C/man2/open.2:356
6449 msgid ""
6450 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6451 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6452 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6453 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6454 "the error B<EBUSY>."
6455 msgstr ""
6456 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6457 "B<O_EXCL> の動作は規定されていない。\n"
6458 "これには一つ例外があり、Linux 2.6 以降では、\n"
6459 "I<pathname> がブロックデバイスを参照している場合、\n"
6460 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6461 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6462 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6463
6464 #. type: Plain text
6465 #: build/C/man2/open.2:378
6466 msgid ""
6467 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6468 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6469 "programs that rely on it for performing locking tasks will contain a race "
6470 "condition.  Portable programs that want to perform atomic file locking using "
6471 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6472 "create a unique file on the same file system (e.g., incorporating hostname "
6473 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6474 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6475 "unique file to check if its link count has increased to 2, in which case the "
6476 "lock is also successful."
6477 msgstr ""
6478 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6479 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6480 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6481 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6482 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6483 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6484 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6485 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6486 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6487 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6488 "じくロックに成功しているということである。"
6489
6490 #. type: TP
6491 #: build/C/man2/open.2:378
6492 #, no-wrap
6493 msgid "B<O_LARGEFILE>"
6494 msgstr "B<O_LARGEFILE>"
6495
6496 #. type: Plain text
6497 #: build/C/man2/open.2:400
6498 msgid ""
6499 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6500 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6501 "macro must be defined (before including I<any> header files)  in order to "
6502 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6503 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6504 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6505 msgstr ""
6506 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6507 "ファ\n"
6508 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6509 "イ\n"
6510 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6511 "ば\n"
6512 "ならない。\n"
6513 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6514 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6515 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6516
6517 #. type: TP
6518 #: build/C/man2/open.2:400
6519 #, no-wrap
6520 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6521 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6522
6523 #.  The O_NOATIME flag also affects the treatment of st_atime
6524 #.  by mmap() and readdir(2), MTK, Dec 04.
6525 #. type: Plain text
6526 #: build/C/man2/open.2:413
6527 msgid ""
6528 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6529 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6530 "programs, where its use can significantly reduce the amount of disk "
6531 "activity.  This flag may not be effective on all file systems.  One example "
6532 "is NFS, where the server maintains the access time."
6533 msgstr ""
6534 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6535 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
6536 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
6537 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6538 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6539
6540 #. type: TP
6541 #: build/C/man2/open.2:413
6542 #, no-wrap
6543 msgid "B<O_NOCTTY>"
6544 msgstr "B<O_NOCTTY>"
6545
6546 #. type: Plain text
6547 #: build/C/man2/open.2:421
6548 msgid ""
6549 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
6550 "become the process's controlling terminal even if the process does not have "
6551 "one."
6552 msgstr ""
6553 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6554 "る\n"
6555 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6556 "ル\n"
6557 "は制御端末にはならない。"
6558
6559 #. type: TP
6560 #: build/C/man2/open.2:421
6561 #, no-wrap
6562 msgid "B<O_NOFOLLOW>"
6563 msgstr "B<O_NOFOLLOW>"
6564
6565 #.  The headers from glibc 2.0.100 and later include a
6566 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6567 #.  used\fP.
6568 #. type: Plain text
6569 #: build/C/man2/open.2:430
6570 msgid ""
6571 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6572 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6573 "earlier components of the pathname will still be followed."
6574 msgstr ""
6575 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6576 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6577 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6578 "が シンボリックリンクである場合には、それが指す先が参照される。"
6579
6580 #. type: TP
6581 #: build/C/man2/open.2:430
6582 #, no-wrap
6583 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6584 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6585
6586 #. type: Plain text
6587 #: build/C/man2/open.2:443
6588 msgid ""
6589 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6590 "()  nor any subsequent operations on the file descriptor which is returned "
6591 "will cause the calling process to wait.  For the handling of FIFOs (named "
6592 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6593 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6594 "see B<fcntl>(2)."
6595 msgstr ""
6596 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6597 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6598 "出\n"
6599 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6600 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6601 "イ\n"
6602 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6603 "議論は、 B<fcntl>(2) を参照すること。"
6604
6605 #. type: TP
6606 #: build/C/man2/open.2:443
6607 #, no-wrap
6608 msgid "B<O_SYNC>"
6609 msgstr "B<O_SYNC>"
6610
6611 #. type: Plain text
6612 #: build/C/man2/open.2:451
6613 msgid ""
6614 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6615 "file descriptor will block the calling process until the data has been "
6616 "physically written to the underlying hardware.  I<But see NOTES below>."
6617 msgstr ""
6618 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6619 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6620 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6621 "「注意」の章も参照。>"
6622
6623 #. type: TP
6624 #: build/C/man2/open.2:451
6625 #, no-wrap
6626 msgid "B<O_TRUNC>"
6627 msgstr "B<O_TRUNC>"
6628
6629 #. type: Plain text
6630 #: build/C/man2/open.2:465
6631 msgid ""
6632 "If the file already exists and is a regular file and the open mode allows "
6633 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6634 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6635 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6636 msgstr ""
6637 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6638 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6639 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6640 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6641 "ある。"
6642
6643 #. type: Plain text
6644 #: build/C/man2/open.2:469
6645 msgid ""
6646 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6647 "file has been opened."
6648 msgstr ""
6649 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6650 "用して変更することができる。"
6651
6652 #. type: Plain text
6653 #: build/C/man2/open.2:477
6654 msgid ""
6655 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6656 "O_WRONLY|O_TRUNC>."
6657 msgstr ""
6658 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6659 "を行うのと等価である。"
6660
6661 #. type: Plain text
6662 #: build/C/man2/open.2:485
6663 msgid ""
6664 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6665 "occurred (in which case, I<errno> is set appropriately)."
6666 msgstr ""
6667 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6668 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6669
6670 #. type: Plain text
6671 #: build/C/man2/open.2:495
6672 msgid ""
6673 "The requested access to the file is not allowed, or search permission is "
6674 "denied for one of the directories in the path prefix of I<pathname>, or the "
6675 "file did not exist yet and write access to the parent directory is not "
6676 "allowed.  (See also B<path_resolution>(7).)"
6677 msgstr ""
6678 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6679 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6680 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6681 "すること。)"
6682
6683 #. type: Plain text
6684 #: build/C/man2/open.2:501
6685 msgid ""
6686 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
6687 "of disk blocks or inodes on the file system has been exhausted."
6688 msgstr ""
6689 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
6690 "inode がそのファイルシステムのユーザクォータに達していた。"
6691
6692 #. type: Plain text
6693 #: build/C/man2/open.2:507
6694 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6695 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6696
6697 #. type: Plain text
6698 #: build/C/man2/open.2:511 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6699 msgid "I<pathname> points outside your accessible address space."
6700 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6701
6702 #. type: TP
6703 #: build/C/man2/open.2:511 build/C/man2/write.2:145
6704 #, no-wrap
6705 msgid "B<EFBIG>"
6706 msgstr "B<EFBIG>"
6707
6708 #. type: Plain text
6709 #: build/C/man2/open.2:515
6710 msgid "See B<EOVERFLOW>."
6711 msgstr "B<EOVERFLOW> 参照。"
6712
6713 #. type: TP
6714 #: build/C/man2/open.2:515 build/C/man2/read.2:122 build/C/man3/scanf.3:561
6715 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
6716 #, no-wrap
6717 msgid "B<EINTR>"
6718 msgstr "B<EINTR>"
6719
6720 #. type: Plain text
6721 #: build/C/man2/open.2:522
6722 msgid ""
6723 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6724 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6725 "(7)."
6726 msgstr ""
6727 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6728 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6729 "B<signal>(7)  参照。"
6730
6731 #. type: TP
6732 #: build/C/man2/open.2:522 build/C/man2/read.2:158 build/C/man2/rename.2:143
6733 #: build/C/man2/unlink.2:87
6734 #, no-wrap
6735 msgid "B<EISDIR>"
6736 msgstr "B<EISDIR>"
6737
6738 #. type: Plain text
6739 #: build/C/man2/open.2:531
6740 msgid ""
6741 "I<pathname> refers to a directory and the access requested involved writing "
6742 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6743 msgstr ""
6744 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6745 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6746
6747 #. type: Plain text
6748 #: build/C/man2/open.2:538
6749 msgid ""
6750 "Too many symbolic links were encountered in resolving I<pathname>, or "
6751 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6752 msgstr ""
6753 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6754 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6755
6756 #. type: TP
6757 #: build/C/man2/open.2:538 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:66
6758 #, no-wrap
6759 msgid "B<EMFILE>"
6760 msgstr "B<EMFILE>"
6761
6762 #. type: Plain text
6763 #: build/C/man2/open.2:541
6764 msgid "The process already has the maximum number of files open."
6765 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6766
6767 #. type: Plain text
6768 #: build/C/man2/open.2:545 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6769 msgid "I<pathname> was too long."
6770 msgstr "I<pathname> が長過ぎる。"
6771
6772 #. type: TP
6773 #: build/C/man2/open.2:545 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:69
6774 #, no-wrap
6775 msgid "B<ENFILE>"
6776 msgstr "B<ENFILE>"
6777
6778 #. type: Plain text
6779 #: build/C/man2/open.2:548 build/C/man2/pipe.2:113
6780 msgid "The system limit on the total number of open files has been reached."
6781 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6782
6783 #. type: TP
6784 #: build/C/man2/open.2:548
6785 #, no-wrap
6786 msgid "B<ENODEV>"
6787 msgstr "B<ENODEV>"
6788
6789 #. type: Plain text
6790 #: build/C/man2/open.2:555
6791 msgid ""
6792 "I<pathname> refers to a device special file and no corresponding device "
6793 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6794 "returned.)"
6795 msgstr ""
6796 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6797 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6798 "るべきである)"
6799
6800 #. type: Plain text
6801 #: build/C/man2/open.2:562
6802 msgid ""
6803 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6804 "component in I<pathname> does not exist or is a dangling symbolic link."
6805 msgstr ""
6806 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6807 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6808 "ンクである。"
6809
6810 #. type: Plain text
6811 #: build/C/man2/open.2:571
6812 msgid ""
6813 "I<pathname> was to be created but the device containing I<pathname> has no "
6814 "room for the new file."
6815 msgstr ""
6816 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6817 "ファイルのための空き容量がない。"
6818
6819 #. type: Plain text
6820 #: build/C/man2/open.2:578
6821 msgid ""
6822 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6823 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6824 msgstr ""
6825 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6826 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6827
6828 #. type: Plain text
6829 #: build/C/man2/open.2:584
6830 msgid ""
6831 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6832 "has the file open for reading.  Or, the file is a device special file and no "
6833 "corresponding device exists."
6834 msgstr ""
6835 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6836 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6837 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6838
6839 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6840 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6841 #.  Reported 2006-10-03
6842 #. type: Plain text
6843 #: build/C/man2/open.2:604
6844 msgid ""
6845 "I<pathname> refers to a regular file that is too large to be opened.  The "
6846 "usual scenario here is that an application compiled on a 32-bit platform "
6847 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6848 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6849 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6850 "B<EFBIG> for this case."
6851 msgstr ""
6852 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6853 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6854 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6855 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6856 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6857 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6858 "いた。"
6859
6860 #.  Strictly speaking, it's the file system UID... (MTK)
6861 #. type: Plain text
6862 #: build/C/man2/open.2:612
6863 msgid ""
6864 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6865 "did not match the owner of the file and the caller was not privileged "
6866 "(B<CAP_FOWNER>)."
6867 msgstr ""
6868 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6869 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6870
6871 #. type: Plain text
6872 #: build/C/man2/open.2:617
6873 msgid ""
6874 "I<pathname> refers to a file on a read-only file system and write access was "
6875 "requested."
6876 msgstr ""
6877 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6878 "込みアクセスが要求された。"
6879
6880 #. type: TP
6881 #: build/C/man2/open.2:617
6882 #, no-wrap
6883 msgid "B<ETXTBSY>"
6884 msgstr "B<ETXTBSY>"
6885
6886 #. type: Plain text
6887 #: build/C/man2/open.2:622
6888 msgid ""
6889 "I<pathname> refers to an executable image which is currently being executed "
6890 "and write access was requested."
6891 msgstr ""
6892 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6893
6894 #. type: TP
6895 #: build/C/man2/open.2:622
6896 #, no-wrap
6897 msgid "B<EWOULDBLOCK>"
6898 msgstr "B<EWOULDBLOCK>"
6899
6900 #. type: Plain text
6901 #: build/C/man2/open.2:629
6902 msgid ""
6903 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6904 "the file (see B<fcntl>(2))."
6905 msgstr ""
6906 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6907 "ていた (B<fcntl>(2)  参照)。"
6908
6909 #. type: Plain text
6910 #: build/C/man2/open.2:642
6911 msgid ""
6912 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
6913 "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
6914 "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
6915 "definitions."
6916 msgstr ""
6917 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
6918 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
6919 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
6920 "定義する必要があるかもしれない。"
6921
6922 #. type: Plain text
6923 #: build/C/man2/open.2:647
6924 msgid ""
6925 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
6926 "POSIX.1-2008."
6927 msgstr ""
6928 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
6929 "定されている。"
6930
6931 #. type: Plain text
6932 #: build/C/man2/open.2:655
6933 msgid ""
6934 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
6935 "(before including I<any> header files)  to get its definition."
6936 msgstr ""
6937 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
6938 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
6939 "なければならない。"
6940
6941 #. type: Plain text
6942 #: build/C/man2/open.2:663
6943 msgid ""
6944 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
6945 "does not necessarily have the intention to read or write.  This is typically "
6946 "used to open devices in order to get a file descriptor for use with B<ioctl>"
6947 "(2)."
6948 msgstr ""
6949 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
6950 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
6951 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
6952 "られる。"
6953
6954 #.  See for example util-linux's disk-utils/setfdprm.c
6955 #.  For some background on access mode 3, see
6956 #.  http://thread.gmane.org/gmane.linux.kernel/653123
6957 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
6958 #.  LKML, 12 Mar 2008
6959 #. type: Plain text
6960 #: build/C/man2/open.2:692
6961 msgid ""
6962 "Unlike the other values that can be specified in I<flags>, the I<access "
6963 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
6964 "individual bits.  Rather, they define the low order two bits of I<flags>, "
6965 "and are defined respectively as 0, 1, and 2.  In other words, the "
6966 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
6967 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
6968 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
6969 "and write permission on the file and return a descriptor that can't be used "
6970 "for reading or writing.  This nonstandard access mode is used by some Linux "
6971 "drivers to return a descriptor that is to be used only for device-specific "
6972 "B<ioctl>(2)  operations."
6973 msgstr ""
6974 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
6975 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
6976 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
6977 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
6978 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
6979 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
6980 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
6981 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
6982 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、デバイ"
6983 "ス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使われてい"
6984 "る。"
6985
6986 #.  Linux 2.0, 2.5: truncate
6987 #.  Solaris 5.7, 5.8: truncate
6988 #.  Irix 6.5: truncate
6989 #.  Tru64 5.1B: truncate
6990 #.  HP-UX 11.22: truncate
6991 #.  FreeBSD 4.7: truncate
6992 #. type: Plain text
6993 #: build/C/man2/open.2:703
6994 msgid ""
6995 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
6996 "implementations.  On many systems the file is actually truncated."
6997 msgstr ""
6998 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
6999 "くのシステムではファイルは実際に切り詰められる。"
7000
7001 #. type: Plain text
7002 #: build/C/man2/open.2:707
7003 msgid ""
7004 "There are many infelicities in the protocol underlying NFS, affecting "
7005 "amongst others B<O_SYNC> and B<O_NDELAY>."
7006 msgstr ""
7007 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
7008 "B<O_NDELAY> に影響する。"
7009
7010 #. type: Plain text
7011 #: build/C/man2/open.2:729
7012 msgid ""
7013 "POSIX provides for three different variants of synchronized I/O, "
7014 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
7015 "(2.6.31), Linux implements only B<O_SYNC>, but glibc maps B<O_DSYNC> and "
7016 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
7017 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
7018 "require all metadata updates of a write to be on disk on returning to user "
7019 "space, but only the B<O_DSYNC> semantics, which require only actual file "
7020 "data and metadata necessary to retrieve it to be on disk by the time the "
7021 "system call returns."
7022 msgstr ""
7023 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
7024 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
7025 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
7026 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
7027 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
7028 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
7029 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
7030 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
7031 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
7032 "ていればよい。"
7033
7034 #. type: Plain text
7035 #: build/C/man2/open.2:737
7036 msgid ""
7037 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7038 "create them; use B<mknod>(2)  instead."
7039 msgstr ""
7040 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7041 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7042 "用する。"
7043
7044 #. type: Plain text
7045 #: build/C/man2/open.2:750
7046 msgid ""
7047 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
7048 "descriptor but, for example, B<read>(2)  requests are denied with "
7049 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
7050 "permissions, but UID mapping is performed by the server upon read and write "
7051 "requests."
7052 msgstr ""
7053 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
7054 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
7055 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7056 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7057 "る。"
7058
7059 #. type: Plain text
7060 #: build/C/man2/open.2:769
7061 msgid ""
7062 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7063 "fields (respectively, time of last access, time of last status change, and "
7064 "time of last modification; see B<stat>(2))  are set to the current time, and "
7065 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7066 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7067 "st_ctime and st_mtime fields are set to the current time."
7068 msgstr ""
7069 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7070 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7071 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7072 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7073 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7074 "I<st_mtime> フィールドが現在時刻に設定される。"
7075
7076 #. type: SS
7077 #: build/C/man2/open.2:769
7078 #, no-wrap
7079 msgid "O_DIRECT"
7080 msgstr "O_DIRECT"
7081
7082 #. type: Plain text
7083 #: build/C/man2/open.2:786
7084 msgid ""
7085 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7086 "address of user-space buffers and the file offset of I/Os.  In Linux "
7087 "alignment restrictions vary by file system and kernel version and might be "
7088 "absent entirely.  However there is currently no file system-independent "
7089 "interface for an application to discover these restrictions for a given file "
7090 "or file system.  Some file systems provide their own interfaces for doing "
7091 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
7092 msgstr ""
7093 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
7094 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
7095 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
7096 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
7097 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
7098 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
7099 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
7100 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
7101
7102 #. type: Plain text
7103 #: build/C/man2/open.2:791
7104 msgid ""
7105 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
7106 "the file offset must all be multiples of the logical block size of the file "
7107 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
7108 msgstr ""
7109 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
7110 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
7111 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
7112
7113 #. type: Plain text
7114 #: build/C/man2/open.2:825
7115 msgid ""
7116 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7117 "system call, if the memory buffer is a private mapping (i.e., any mapping "
7118 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
7119 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7120 "whether submitted via an asynchronous I/O interface or from another thread "
7121 "in the process, should be completed before B<fork>(2)  is called.  Failure "
7122 "to do so can result in data corruption and undefined behavior in parent and "
7123 "child processes.  This restriction does not apply when the memory buffer for "
7124 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
7125 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
7126 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
7127 "will not be available to the child after B<fork>(2)."
7128 msgstr ""
7129 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
7130 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
7131 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
7132 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
7133 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
7134 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
7135 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
7136 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
7137 "動作が起こる可能性がある。\n"
7138 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
7139 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
7140 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
7141 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
7142 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
7143 "のである)。"
7144
7145 #. type: Plain text
7146 #: build/C/man2/open.2:835
7147 msgid ""
7148 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
7149 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
7150 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
7151 "flag of the same name, but without alignment restrictions."
7152 msgstr ""
7153 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
7154 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
7155 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
7156 "ラグを導入したが、アラインメントの制限はない。"
7157
7158 #. type: Plain text
7159 #: build/C/man2/open.2:844
7160 msgid ""
7161 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
7162 "Linux kernels simply ignore this flag.  Some file systems may not implement "
7163 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
7164 msgstr ""
7165 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
7166 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
7167 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
7168 "と B<open>()  は B<EINVAL> で失敗する。"
7169
7170 #. type: Plain text
7171 #: build/C/man2/open.2:855
7172 msgid ""
7173 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
7174 "file, and especially to overlapping byte regions in the same file.  Even "
7175 "when the file system correctly handles the coherency issues in this "
7176 "situation, overall I/O throughput is likely to be slower than using either "
7177 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
7178 "with direct I/O to the same files."
7179 msgstr ""
7180 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
7181 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
7182 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
7183 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
7184 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
7185 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
7186
7187 #. type: Plain text
7188 #: build/C/man2/open.2:877
7189 msgid ""
7190 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
7191 "Older kernels, or kernels configured in certain ways, may not support this "
7192 "combination.  The NFS protocol does not support passing the flag to the "
7193 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
7194 "the server may still cache the I/O.  The client asks the server to make the "
7195 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
7196 "servers will perform poorly under these circumstances, especially if the I/O "
7197 "size is small.  Some servers may also be configured to lie to clients about "
7198 "the I/O having reached stable storage; this will avoid the performance "
7199 "penalty at some risk to data integrity in the event of server power "
7200 "failure.  The Linux NFS client places no alignment restrictions on "
7201 "B<O_DIRECT> I/O."
7202 msgstr ""
7203 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
7204 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
7205 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
7206 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
7207 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
7208 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
7209 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
7210 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
7211 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
7212 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
7213 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
7214 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
7215
7216 #. type: Plain text
7217 #: build/C/man2/open.2:884
7218 msgid ""
7219 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
7220 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
7221 "as a performance option which is disabled by default."
7222 msgstr ""
7223 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
7224 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
7225 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
7226
7227 #. type: Plain text
7228 #: build/C/man2/open.2:889
7229 msgid ""
7230 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
7231 "interface is just stupid, and was probably designed by a deranged monkey on "
7232 "some serious mind-controlling substances.\"\\(emLinus"
7233 msgstr ""
7234 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
7235 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
7236 "な」 \\(em Linus"
7237
7238 #.  FIXME . Check bugzilla report on open(O_ASYNC)
7239 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
7240 #. type: Plain text
7241 #: build/C/man2/open.2:901
7242 msgid ""
7243 "Currently, it is not possible to enable signal-driven I/O by specifying "
7244 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
7245 msgstr ""
7246 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
7247 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
7248 "すること。"
7249
7250 #. type: Plain text
7251 #: build/C/man2/open.2:923
7252 msgid ""
7253 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7254 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7255 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7256 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7257 msgstr ""
7258 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7259 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7260 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7261 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7262
7263 #. type: TH
7264 #: build/C/man3/perror.3:31
7265 #, no-wrap
7266 msgid "PERROR"
7267 msgstr "PERROR"
7268
7269 #. type: TH
7270 #: build/C/man3/perror.3:31
7271 #, no-wrap
7272 msgid "2012-04-17"
7273 msgstr "2012-04-17"
7274
7275 #. type: Plain text
7276 #: build/C/man3/perror.3:34
7277 msgid "perror - print a system error message"
7278 msgstr "perror - システムエラーメッセージを出力する"
7279
7280 #. type: Plain text
7281 #: build/C/man3/perror.3:38
7282 msgid "B<void perror(const char *>I<s>B<);>"
7283 msgstr "B<void perror(const char *>I<s>B<);>"
7284
7285 #. type: Plain text
7286 #: build/C/man3/perror.3:40
7287 msgid "B<#include E<lt>errno.hE<gt>>"
7288 msgstr "B<#include E<lt>errno.hE<gt>>"
7289
7290 #. type: Plain text
7291 #: build/C/man3/perror.3:42
7292 msgid "B<const char *>I<sys_errlist>B<[];>"
7293 msgstr "B<const char *>I<sys_errlist>B<[];>"
7294
7295 #. type: Plain text
7296 #: build/C/man3/perror.3:44
7297 msgid "B<int >I<sys_nerr>B<;>"
7298 msgstr "B<int >I<sys_nerr>B<;>"
7299
7300 #. type: Plain text
7301 #: build/C/man3/perror.3:46
7302 msgid "B<int >I<errno>B<;>"
7303 msgstr "B<int >I<errno>B<;>"
7304
7305 #. type: Plain text
7306 #: build/C/man3/perror.3:55
7307 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7308 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7309
7310 #. type: Plain text
7311 #: build/C/man3/perror.3:68
7312 msgid ""
7313 "The routine B<perror>()  produces a message on the standard error output, "
7314 "describing the last error encountered during a call to a system or library "
7315 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7316 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7317 "blank.  Then the message and a new-line."
7318 msgstr ""
7319 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7320 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7321 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7322 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7323 "メッセージと改行が出力される。"
7324
7325 #. type: Plain text
7326 #: build/C/man3/perror.3:76
7327 msgid ""
7328 "To be of most use, the argument string should include the name of the "
7329 "function that incurred the error.  The error number is taken from the "
7330 "external variable I<errno>, which is set when errors occur but not cleared "
7331 "when successful calls are made."
7332 msgstr ""
7333 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7334 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7335 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7336
7337 #. type: Plain text
7338 #: build/C/man3/perror.3:90
7339 msgid ""
7340 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7341 "obtain the error message without the newline.  The largest message number "
7342 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7343 "this list because new error values may not have been added to I<sys_errlist>"
7344 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7345 msgstr ""
7346 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7347 "の\n"
7348 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7349 "ジ\n"
7350 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7351 "と。\n"
7352 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7353 "る。\n"
7354 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7355
7356 #. type: Plain text
7357 #: build/C/man3/perror.3:111
7358 msgid ""
7359 "When a system call fails, it usually returns -1 and sets the variable "
7360 "I<errno> to a value describing what went wrong.  (These values can be found "
7361 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7362 "B<perror>()  serves to translate this error code into human-readable form.  "
7363 "Note that I<errno> is undefined after a successful library call: this call "
7364 "may well change this variable, even though it succeeds, for example because "
7365 "it internally used some other library function that failed.  Thus, if a "
7366 "failing call is not immediately followed by a call to B<perror>(), the value "
7367 "of I<errno> should be saved."
7368 msgstr ""
7369 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7370 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7371 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7372 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7373 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7374 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7375 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7376 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7377 "い。"
7378
7379 #. type: Plain text
7380 #: build/C/man3/perror.3:124
7381 msgid ""
7382 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7383 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7384 "I<sys_errlist> conform to BSD."
7385 msgstr ""
7386 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7387 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7388 "に準拠している。"
7389
7390 #.  and only when _BSD_SOURCE is defined.
7391 #.  When
7392 #.  .B _GNU_SOURCE
7393 #.  is defined, the symbols
7394 #.  .I _sys_nerr
7395 #.  and
7396 #.  .I _sys_errlist
7397 #.  are provided.
7398 #. type: Plain text
7399 #: build/C/man3/perror.3:139
7400 msgid ""
7401 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7402 "I<E<lt>stdio.hE<gt>>."
7403 msgstr ""
7404 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7405 "I<E<lt>stdio.hE<gt>> に含まれている。"
7406
7407 #. type: Plain text
7408 #: build/C/man3/perror.3:144
7409 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7410 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7411
7412 #. type: TH
7413 #: build/C/man2/pipe.2:36
7414 #, no-wrap
7415 msgid "PIPE"
7416 msgstr "PIPE"
7417
7418 #. type: TH
7419 #: build/C/man2/pipe.2:36
7420 #, no-wrap
7421 msgid "2012-02-14"
7422 msgstr "2012-02-14"
7423
7424 #. type: Plain text
7425 #: build/C/man2/pipe.2:39
7426 msgid "pipe, pipe2 - create pipe"
7427 msgstr "pipe, pipe2 - パイプを生成する"
7428
7429 #. type: Plain text
7430 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7431 #, no-wrap
7432 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7433 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7434
7435 #. type: Plain text
7436 #: build/C/man2/pipe.2:44
7437 #, no-wrap
7438 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7439 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7440
7441 #. type: Plain text
7442 #: build/C/man2/pipe.2:48
7443 #, no-wrap
7444 msgid ""
7445 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7446 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7447 "B<#include E<lt>unistd.hE<gt>>\n"
7448 msgstr ""
7449 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7450 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7451 "B<#include E<lt>unistd.hE<gt>>\n"
7452
7453 #. type: Plain text
7454 #: build/C/man2/pipe.2:50
7455 #, no-wrap
7456 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7457 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7458
7459 #. type: Plain text
7460 #: build/C/man2/pipe.2:66
7461 msgid ""
7462 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7463 "for interprocess communication.  The array I<pipefd> is used to return two "
7464 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7465 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7466 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7467 "until it is read from the read end of the pipe.  For further details, see "
7468 "B<pipe>(7)."
7469 msgstr ""
7470 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7471 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7472 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7473 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7474 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7475 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7476
7477 #. type: Plain text
7478 #: build/C/man2/pipe.2:76
7479 msgid ""
7480 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7481 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7482 msgstr ""
7483 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7484 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7485 "きる。"
7486
7487 #. type: TP
7488 #: build/C/man2/pipe.2:76
7489 #, no-wrap
7490 msgid "B<O_NONBLOCK>"
7491 msgstr "B<O_NONBLOCK>"
7492
7493 #. type: Plain text
7494 #: build/C/man2/pipe.2:84
7495 msgid ""
7496 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7497 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7498 "the same result."
7499 msgstr ""
7500 "新しく生成される二つのオープンファイル記述 (open file description) の "
7501 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7502 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7503 "なる。"
7504
7505 #. type: TP
7506 #: build/C/man2/pipe.2:84
7507 #, no-wrap
7508 msgid "B<O_CLOEXEC>"
7509 msgstr "B<O_CLOEXEC>"
7510
7511 #. type: Plain text
7512 #: build/C/man2/pipe.2:92
7513 msgid ""
7514 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7515 "descriptors.  See the description of the same flag in B<open>(2)  for "
7516 "reasons why this may be useful."
7517 msgstr ""
7518 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7519 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7520 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7521
7522 #. type: Plain text
7523 #: build/C/man2/pipe.2:102
7524 msgid "I<pipefd> is not valid."
7525 msgstr "I<pipefd> が無効な値である。"
7526
7527 #. type: Plain text
7528 #: build/C/man2/pipe.2:107
7529 msgid "(B<pipe2>())  Invalid value in I<flags>."
7530 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7531
7532 #. type: Plain text
7533 #: build/C/man2/pipe.2:110
7534 msgid "Too many file descriptors are in use by the process."
7535 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7536
7537 #. type: Plain text
7538 #: build/C/man2/pipe.2:118
7539 msgid ""
7540 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7541 "starting with version 2.9."
7542 msgstr ""
7543 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7544 "はバージョン 2.9 以降で利用できる。"
7545
7546 #. type: Plain text
7547 #: build/C/man2/pipe.2:121
7548 msgid "B<pipe>(): POSIX.1-2001."
7549 msgstr "B<pipe>(): POSIX.1-2001."
7550
7551 #. type: Plain text
7552 #: build/C/man2/pipe.2:124
7553 msgid "B<pipe2>()  is Linux-specific."
7554 msgstr "B<pipe2>()  は Linux 固有である。"
7555
7556 #.  fork.2 refers to this example program.
7557 #. type: Plain text
7558 #: build/C/man2/pipe.2:140
7559 msgid ""
7560 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7561 "process; the child inherits a duplicate set of file descriptors that refer "
7562 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7563 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7564 "the string contained in the program's command-line argument to the pipe, and "
7565 "the child reads this string a byte at a time from the pipe and echoes it on "
7566 "standard output."
7567 msgstr ""
7568 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7569 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7570 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7571 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7572 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7573 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7574
7575 #. type: Plain text
7576 #: build/C/man2/pipe.2:147
7577 #, no-wrap
7578 msgid ""
7579 "#include E<lt>sys/wait.hE<gt>\n"
7580 "#include E<lt>stdio.hE<gt>\n"
7581 "#include E<lt>stdlib.hE<gt>\n"
7582 "#include E<lt>unistd.hE<gt>\n"
7583 "#include E<lt>string.hE<gt>\n"
7584 msgstr ""
7585 "#include E<lt>sys/wait.hE<gt>\n"
7586 "#include E<lt>stdio.hE<gt>\n"
7587 "#include E<lt>stdlib.hE<gt>\n"
7588 "#include E<lt>unistd.hE<gt>\n"
7589 "#include E<lt>string.hE<gt>\n"
7590
7591 #. type: Plain text
7592 #: build/C/man2/pipe.2:154
7593 #, no-wrap
7594 msgid ""
7595 "int\n"
7596 "main(int argc, char *argv[])\n"
7597 "{\n"
7598 "    int pipefd[2];\n"
7599 "    pid_t cpid;\n"
7600 "    char buf;\n"
7601 msgstr ""
7602 "int\n"
7603 "main(int argc, char *argv[])\n"
7604 "{\n"
7605 "    int pipefd[2];\n"
7606 "    pid_t cpid;\n"
7607 "    char buf;\n"
7608
7609 #. type: Plain text
7610 #: build/C/man2/pipe.2:159
7611 #, no-wrap
7612 msgid ""
7613 "    if (argc != 2) {\n"
7614 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7615 "\texit(EXIT_FAILURE);\n"
7616 "    }\n"
7617 msgstr ""
7618 "    if (argc != 2) {\n"
7619 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7620 "\texit(EXIT_FAILURE);\n"
7621 "    }\n"
7622
7623 #. type: Plain text
7624 #: build/C/man2/pipe.2:164
7625 #, no-wrap
7626 msgid ""
7627 "    if (pipe(pipefd) == -1) {\n"
7628 "        perror(\"pipe\");\n"
7629 "        exit(EXIT_FAILURE);\n"
7630 "    }\n"
7631 msgstr ""
7632 "    if (pipe(pipefd) == -1) {\n"
7633 "        perror(\"pipe\");\n"
7634 "        exit(EXIT_FAILURE);\n"
7635 "    }\n"
7636
7637 #. type: Plain text
7638 #: build/C/man2/pipe.2:170
7639 #, no-wrap
7640 msgid ""
7641 "    cpid = fork();\n"
7642 "    if (cpid == -1) {\n"
7643 "        perror(\"fork\");\n"
7644 "        exit(EXIT_FAILURE);\n"
7645 "    }\n"
7646 msgstr ""
7647 "    cpid = fork();\n"
7648 "    if (cpid == -1) {\n"
7649 "        perror(\"fork\");\n"
7650 "        exit(EXIT_FAILURE);\n"
7651 "    }\n"
7652
7653 #. type: Plain text
7654 #: build/C/man2/pipe.2:173
7655 #, no-wrap
7656 msgid ""
7657 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7658 "        close(pipefd[1]);          /* Close unused write end */\n"
7659 msgstr ""
7660 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7661 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7662
7663 #. type: Plain text
7664 #: build/C/man2/pipe.2:176
7665 #, no-wrap
7666 msgid ""
7667 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7668 "            write(STDOUT_FILENO, &buf, 1);\n"
7669 msgstr ""
7670 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7671 "            write(STDOUT_FILENO, &buf, 1);\n"
7672
7673 #. type: Plain text
7674 #: build/C/man2/pipe.2:180
7675 #, no-wrap
7676 msgid ""
7677 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7678 "        close(pipefd[0]);\n"
7679 "        _exit(EXIT_SUCCESS);\n"
7680 msgstr ""
7681 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7682 "        close(pipefd[0]);\n"
7683 "        _exit(EXIT_SUCCESS);\n"
7684
7685 #. type: Plain text
7686 #: build/C/man2/pipe.2:189
7687 #, no-wrap
7688 msgid ""
7689 "    } else {            /* Parent writes argv[1] to pipe */\n"
7690 "        close(pipefd[0]);          /* Close unused read end */\n"
7691 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7692 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7693 "        wait(NULL);                /* Wait for child */\n"
7694 "        exit(EXIT_SUCCESS);\n"
7695 "    }\n"
7696 "}\n"
7697 msgstr ""
7698 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7699 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7700 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7701 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7702 "        wait(NULL);                /* 子プロセスを待つ */\n"
7703 "        exit(EXIT_SUCCESS);\n"
7704 "    }\n"
7705 "}\n"
7706
7707 #. type: Plain text
7708 #: build/C/man2/pipe.2:197
7709 msgid ""
7710 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7711 "(7)"
7712 msgstr ""
7713 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7714 "(7)"
7715
7716 #. type: TH
7717 #: build/C/man3/popen.3:40
7718 #, no-wrap
7719 msgid "POPEN"
7720 msgstr "POPEN"
7721
7722 #. type: Plain text
7723 #: build/C/man3/popen.3:43
7724 msgid "popen, pclose - pipe stream to or from a process"
7725 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7726
7727 #. type: Plain text
7728 #: build/C/man3/popen.3:48
7729 #, no-wrap
7730 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7731 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7732
7733 #. type: Plain text
7734 #: build/C/man3/popen.3:50
7735 #, no-wrap
7736 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7737 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7738
7739 #. type: Plain text
7740 #: build/C/man3/popen.3:60
7741 msgid "B<popen>(), B<pclose>():"
7742 msgstr "B<popen>(), B<pclose>():"
7743
7744 #. type: Plain text
7745 #: build/C/man3/popen.3:62
7746 msgid ""
7747 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7748 msgstr ""
7749 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7750
7751 #. type: Plain text
7752 #: build/C/man3/popen.3:73
7753 msgid ""
7754 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7755 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7756 "I<type> argument may specify only reading or writing, not both; the "
7757 "resulting stream is correspondingly read-only or write-only."
7758 msgstr ""
7759 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7760 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7761 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7762 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7763 "たは 書き込み専用のいずれかとなる。"
7764
7765 #. type: Plain text
7766 #: build/C/man3/popen.3:97
7767 msgid ""
7768 "The I<command> argument is a pointer to a null-terminated string containing "
7769 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7770 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7771 "argument is a pointer to a null-terminated string which must contain either "
7772 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7773 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7774 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7775 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7776 "B<open>(2)  for reasons why this may be useful."
7777 msgstr ""
7778 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7779 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7780 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7781 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7782 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7783 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7784 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7785 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7786 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7787
7788 #. type: Plain text
7789 #: build/C/man3/popen.3:113
7790 msgid ""
7791 "The return value from B<popen>()  is a normal standard I/O stream in all "
7792 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7793 "(3).  Writing to such a stream writes to the standard input of the command; "
7794 "the command's standard output is the same as that of the process that called "
7795 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7796 "reading from a \"popened\" stream reads the command's standard output, and "
7797 "the command's standard input is the same as that of the process that called "
7798 "B<popen>()."
7799 msgstr ""
7800 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7801 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7802 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7803 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7804 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7805 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7806 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7807 "セスの標準入力と同一である。"
7808
7809 #. type: Plain text
7810 #: build/C/man3/popen.3:117
7811 msgid "Note that output B<popen>()  streams are fully buffered by default."
7812 msgstr ""
7813 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7814 "に注意しよう。"
7815
7816 #. type: Plain text
7817 #: build/C/man3/popen.3:123
7818 msgid ""
7819 "The B<pclose>()  function waits for the associated process to terminate and "
7820 "returns the exit status of the command as returned by B<wait4>(2)."
7821 msgstr ""
7822 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7823 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7824
7825 #. type: Plain text
7826 #: build/C/man3/popen.3:131
7827 msgid ""
7828 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7829 "calls fail, or if it cannot allocate memory."
7830 msgstr ""
7831 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7832 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7833
7834 #.  These conditions actually give undefined results, so I commented
7835 #.  them out.
7836 #.  .I stream
7837 #.  is not associated with a "popen()ed" command, if
7838 #. .I stream
7839 #.  already "pclose()d", or if
7840 #. type: Plain text
7841 #: build/C/man3/popen.3:146
7842 #, fuzzy
7843 #| msgid ""
7844 #| "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7845 #| "some other error is detected."
7846 msgid ""
7847 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7848 "some other error is detected.  In the event of an error, these functions set "
7849 "I<errnro> to indicate the cause of the error."
7850 msgstr ""
7851 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7852 "かった場合、 -1 を返す。"
7853
7854 #. type: Plain text
7855 #: build/C/man3/popen.3:165
7856 msgid ""
7857 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7858 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7859 "appropriately.  If the I<type> argument is invalid, and this condition is "
7860 "detected, I<errno> is set to B<EINVAL>."
7861 msgstr ""
7862 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7863 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7864 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7865 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7866
7867 #. type: Plain text
7868 #: build/C/man3/popen.3:172
7869 msgid ""
7870 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7871 msgstr ""
7872 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7873 "B<ECHILD> にセットされる。"
7874
7875 #. type: Plain text
7876 #: build/C/man3/popen.3:178
7877 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7878 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7879
7880 #. type: Plain text
7881 #: build/C/man3/popen.3:191
7882 msgid ""
7883 "Since the standard input of a command opened for reading shares its seek "
7884 "offset with the process that called B<popen>(), if the original process has "
7885 "done a buffered read, the command's input position may not be as expected.  "
7886 "Similarly, the output from a command opened for writing may become "
7887 "intermingled with that of the original process.  The latter can be avoided "
7888 "by calling B<fflush>(3)  before B<popen>()."
7889 msgstr ""
7890 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7891 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7892 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7893 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7894 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7895 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7896
7897 #.  .SH HISTORY
7898 #.  A
7899 #.  .BR popen ()
7900 #.  and a
7901 #.  .BR pclose ()
7902 #.  function appeared in Version 7 AT&T UNIX.
7903 #. type: Plain text
7904 #: build/C/man3/popen.3:201
7905 msgid ""
7906 "Failure to execute the shell is indistinguishable from the shell's failure "
7907 "to execute command, or an immediate exit of the command.  The only hint is "
7908 "an exit status of 127."
7909 msgstr ""
7910 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
7911 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
7912 "なることである。"
7913
7914 #. type: Plain text
7915 #: build/C/man3/popen.3:211
7916 msgid ""
7917 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7918 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7919 msgstr ""
7920 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7921 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7922
7923 #. type: TH
7924 #: build/C/man3/printf.3:34
7925 #, no-wrap
7926 msgid "PRINTF"
7927 msgstr "PRINTF"
7928
7929 #. type: TH
7930 #: build/C/man3/printf.3:34
7931 #, no-wrap
7932 msgid "2013-03-05"
7933 msgstr "2013-03-05"
7934
7935 #. type: Plain text
7936 #: build/C/man3/printf.3:38
7937 msgid ""
7938 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7939 "formatted output conversion"
7940 msgstr ""
7941 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7942 "指定された書式に変換して出力を行う"
7943
7944 #. type: Plain text
7945 #: build/C/man3/printf.3:42
7946 msgid "B<int printf(const char *>I<format>B<, ...);>"
7947 msgstr "B<int printf(const char *>I<format>B<, ...);>"
7948
7949 #. type: Plain text
7950 #: build/C/man3/printf.3:44
7951 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7952 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7953
7954 #. type: Plain text
7955 #: build/C/man3/printf.3:46
7956 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7957 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7958
7959 #. type: Plain text
7960 #: build/C/man3/printf.3:48
7961 msgid ""
7962 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7963 "*>I<format>B<, ...);>"
7964 msgstr ""
7965 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7966 "*>I<format>B<, ...);>"
7967
7968 #. type: Plain text
7969 #: build/C/man3/printf.3:50
7970 msgid "B<#include E<lt>stdarg.hE<gt>>"
7971 msgstr "B<#include E<lt>stdarg.hE<gt>>"
7972
7973 #. type: Plain text
7974 #: build/C/man3/printf.3:52
7975 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7976 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7977
7978 #. type: Plain text
7979 #: build/C/man3/printf.3:54
7980 msgid ""
7981 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7982 ">I<ap>B<);>"
7983 msgstr ""
7984 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7985 ">I<ap>B<);>"
7986
7987 #. type: Plain text
7988 #: build/C/man3/printf.3:56
7989 msgid ""
7990 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7991 msgstr ""
7992 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7993
7994 #. type: Plain text
7995 #: build/C/man3/printf.3:59
7996 msgid ""
7997 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7998 "*>I<format>B<, va_list >I<ap>B<);>"
7999 msgstr ""
8000 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8001 "*>I<format>B<, va_list >I<ap>B<);>"
8002
8003 #. type: Plain text
8004 #: build/C/man3/printf.3:68
8005 msgid "B<snprintf>(), B<vsnprintf>():"
8006 msgstr "B<snprintf>(), B<vsnprintf>():"
8007
8008 #. type: Plain text
8009 #: build/C/man3/printf.3:71
8010 msgid ""
8011 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8012 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8013 msgstr ""
8014 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8015 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8016
8017 #. type: Plain text
8018 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
8019 msgid "or I<cc -std=c99>"
8020 msgstr "or I<cc -std=c99>"
8021
8022 #. type: Plain text
8023 #: build/C/man3/printf.3:101
8024 msgid ""
8025 "The functions in the B<printf>()  family produce output according to a "
8026 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
8027 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
8028 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
8029 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
8030 "string I<str>."
8031 msgstr ""
8032 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
8033 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
8034 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
8035 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8036 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
8037
8038 #. type: Plain text
8039 #: build/C/man3/printf.3:110
8040 msgid ""
8041 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
8042 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
8043 msgstr ""
8044 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
8045 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
8046
8047 #. type: Plain text
8048 #: build/C/man3/printf.3:134
8049 msgid ""
8050 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
8051 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
8052 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
8053 "instead of a variable number of arguments.  These functions do not call the "
8054 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
8055 "I<ap> is undefined after the call.  See B<stdarg>(3)."
8056 msgstr ""
8057 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
8058 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
8059 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
8060 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
8061 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
8062 "(3)  を参照のこと。"
8063
8064 #. type: Plain text
8065 #: build/C/man3/printf.3:141
8066 msgid ""
8067 "These eight functions write the output under the control of a I<format> "
8068 "string that specifies how subsequent arguments (or arguments accessed via "
8069 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
8070 "output."
8071 msgstr ""
8072 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
8073 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
8074 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
8075
8076 #. type: Plain text
8077 #: build/C/man3/printf.3:152
8078 msgid ""
8079 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
8080 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
8081 "copying to take place between objects that overlap (e.g., if the target "
8082 "string array and one of the supplied input arguments refer to the same "
8083 "buffer).  See NOTES."
8084 msgstr ""
8085 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8086 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
8087 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
8088 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
8089 "照。"
8090
8091 #. type: SS
8092 #: build/C/man3/printf.3:152
8093 #, no-wrap
8094 msgid "Return value"
8095 msgstr "Return Values"
8096
8097 #. type: Plain text
8098 #: build/C/man3/printf.3:155
8099 msgid ""
8100 "Upon successful return, these functions return the number of characters "
8101 "printed (excluding the null byte used to end output to strings)."
8102 msgstr ""
8103 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
8104 "用する NULL バイトは数に含まれない)。"
8105
8106 #. type: Plain text
8107 #: build/C/man3/printf.3:171
8108 msgid ""
8109 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
8110 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
8111 "the output was truncated due to this limit then the return value is the "
8112 "number of characters (excluding the terminating null byte)  which would have "
8113 "been written to the final string if enough space had been available.  Thus, "
8114 "a return value of I<size> or more means that the output was truncated.  (See "
8115 "also below under NOTES.)"
8116 msgstr ""
8117 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
8118 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
8119 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
8120 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
8121 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
8122 "する (後述の注意も参照のこと)。"
8123
8124 #. type: Plain text
8125 #: build/C/man3/printf.3:173
8126 msgid "If an output error is encountered, a negative value is returned."
8127 msgstr "エラーが発生した場合は、負の数を返す。"
8128
8129 #. type: SS
8130 #: build/C/man3/printf.3:173
8131 #, no-wrap
8132 msgid "Format of the format string"
8133 msgstr "フォーマット文字列のフォーマット"
8134
8135 #. type: Plain text
8136 #: build/C/man3/printf.3:195
8137 msgid ""
8138 "The format string is a character string, beginning and ending in its initial "
8139 "shift state, if any.  The format string is composed of zero or more "
8140 "directives: ordinary characters (not B<%>), which are copied unchanged to "
8141 "the output stream; and conversion specifications, each of which results in "
8142 "fetching zero or more subsequent arguments.  Each conversion specification "
8143 "is introduced by the character B<%>, and ends with a I<conversion "
8144 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
8145 "an optional minimum I<field width>, an optional I<precision> and an optional "
8146 "I<length modifier>."
8147 msgstr ""
8148 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
8149 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
8150 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
8151 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
8152 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
8153 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
8154 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
8155 "子> を (この順序で) 置くことができる。"
8156
8157 #. type: Plain text
8158 #: build/C/man3/printf.3:208
8159 msgid ""
8160 "The arguments must correspond properly (after type promotion) with the "
8161 "conversion specifier.  By default, the arguments are used in the order "
8162 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
8163 "next argument (and it is an error if insufficiently many arguments are "
8164 "given).  One can also specify explicitly which argument is taken, at each "
8165 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
8166 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
8167 "denotes the position in the argument list of the desired argument, indexed "
8168 "starting from 1.  Thus,"
8169 msgstr ""
8170 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
8171 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
8172 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
8173 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
8174 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
8175 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
8176 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
8177
8178 #. type: Plain text
8179 #: build/C/man3/printf.3:212
8180 #, no-wrap
8181 msgid "printf(\"%*d\", width, num);\n"
8182 msgstr "printf(\"%*d\", width, num);\n"
8183
8184 #. type: Plain text
8185 #: build/C/man3/printf.3:216
8186 msgid "and"
8187 msgstr "と"
8188
8189 #. type: Plain text
8190 #: build/C/man3/printf.3:220
8191 #, no-wrap
8192 msgid "printf(\"%2$*1$d\", width, num);\n"
8193 msgstr "printf(\"%2$*1$d\", width, num);\n"
8194
8195 #. type: Plain text
8196 #: build/C/man3/printf.3:236
8197 msgid ""
8198 "are equivalent.  The second style allows repeated references to the same "
8199 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
8200 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
8201 "\\(aq is used, it must be used throughout for all conversions taking an "
8202 "argument and all width and precision arguments, but it may be mixed with \"%%"
8203 "\" formats which do not consume an argument.  There may be no gaps in the "
8204 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
8205 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
8206 "format string."
8207 msgstr ""
8208 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
8209 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
8210 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
8211 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
8212 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
8213 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
8214 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
8215
8216 #. type: Plain text
8217 #: build/C/man3/printf.3:246
8218 msgid ""
8219 "For some numeric conversions a radix character (\"decimal point\") or "
8220 "thousands' grouping character is used.  The actual character used depends on "
8221 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
8222 "radix character, and does not have a grouping character.  Thus,"
8223 msgstr ""
8224 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
8225 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
8226 "\\(aq を用い、 区切り文字は使わない。 従って、"
8227
8228 #. type: Plain text
8229 #: build/C/man3/printf.3:250
8230 #, no-wrap
8231 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
8232 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
8233
8234 #. type: Plain text
8235 #: build/C/man3/printf.3:255
8236 msgid ""
8237 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
8238 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
8239 msgstr ""
8240 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
8241 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
8242
8243 #. type: SS
8244 #: build/C/man3/printf.3:255
8245 #, no-wrap
8246 msgid "The flag characters"
8247 msgstr "フラグ文字"
8248
8249 #. type: Plain text
8250 #: build/C/man3/printf.3:257
8251 msgid "The character % is followed by zero or more of the following flags:"
8252 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
8253
8254 #. type: TP
8255 #: build/C/man3/printf.3:257
8256 #, no-wrap
8257 msgid "B<#>"
8258 msgstr "B<#>"
8259
8260 #. type: Plain text
8261 #: build/C/man3/printf.3:291
8262 msgid ""
8263 "The value should be converted to an \"alternate form\".  For B<o> "
8264 "conversions, the first character of the output string is made zero (by "
8265 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
8266 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
8267 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
8268 "conversions, the result will always contain a decimal point, even if no "
8269 "digits follow it (normally, a decimal point appears in the results of those "
8270 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
8271 "trailing zeros are not removed from the result as they would otherwise be.  "
8272 "For other conversions, the result is undefined."
8273 msgstr ""
8274 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
8275 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
8276 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
8277 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
8278 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
8279 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
8280 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
8281 "変換では、結果は未定義である。"
8282
8283 #. type: TP
8284 #: build/C/man3/printf.3:291
8285 #, no-wrap
8286 msgid "B<\\&0>"
8287 msgstr "B<\\&0>"
8288
8289 #. type: Plain text
8290 #: build/C/man3/printf.3:331
8291 msgid ""
8292 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8293 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8294 "converted value is padded on the left with zeros rather than blanks.  If the "
8295 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8296 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8297 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8298 "is undefined."
8299 msgstr ""
8300 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8301 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8302 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8303 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8304 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8305 "である。"
8306
8307 #. type: TP
8308 #: build/C/man3/printf.3:331
8309 #, no-wrap
8310 msgid "B<->"
8311 msgstr "B<->"
8312
8313 #. type: Plain text
8314 #: build/C/man3/printf.3:344
8315 msgid ""
8316 "The converted value is to be left adjusted on the field boundary.  (The "
8317 "default is right justification.)  Except for B<n> conversions, the converted "
8318 "value is padded on the right with blanks, rather than on the left with "
8319 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8320 msgstr ""
8321 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8322 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8323 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8324
8325 #. type: TP
8326 #: build/C/man3/printf.3:344
8327 #, no-wrap
8328 msgid "B<\\(aq \\(aq>"
8329 msgstr "B<' '>"
8330
8331 #. type: Plain text
8332 #: build/C/man3/printf.3:348
8333 msgid ""
8334 "(a space) A blank should be left before a positive number (or empty string) "
8335 "produced by a signed conversion."
8336 msgstr ""
8337 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8338 "列) が置かれる。"
8339
8340 #. type: TP
8341 #: build/C/man3/printf.3:348
8342 #, no-wrap
8343 msgid "B<+>"
8344 msgstr "B<+>"
8345
8346 #. type: Plain text
8347 #: build/C/man3/printf.3:356
8348 msgid ""
8349 "A sign (+ or -) should always be placed before a number produced by a signed "
8350 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8351 "overrides a space if both are used."
8352 msgstr ""
8353 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8354 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8355 "が使われている場合には、 B<+> が優先される。"
8356
8357 #. type: Plain text
8358 #: build/C/man3/printf.3:359
8359 msgid ""
8360 "The five flag characters above are defined in the C standard.  The SUSv2 "
8361 "specifies one further flag character."
8362 msgstr ""
8363 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8364 "グ文字が規定されている。"
8365
8366 #. type: TP
8367 #: build/C/man3/printf.3:359
8368 #, no-wrap
8369 msgid "B<\\(aq>"
8370 msgstr "B<\\(aq>"
8371
8372 #. type: Plain text
8373 #: build/C/man3/printf.3:376
8374 msgid ""
8375 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8376 "output is to be grouped with thousands' grouping characters if the locale "
8377 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8378 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8379 "\\(aqF>."
8380 msgstr ""
8381 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8382 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8383 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8384 "\\(aqF は SUSv2 には含まれていない。"
8385
8386 #. type: Plain text
8387 #: build/C/man3/printf.3:378
8388 msgid "glibc 2.2 adds one further flag character."
8389 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8390
8391 #. type: TP
8392 #: build/C/man3/printf.3:378
8393 #, no-wrap
8394 msgid "B<I>"
8395 msgstr "B<I>"
8396
8397 #.  outdigits keyword in locale file
8398 #. type: Plain text
8399 #: build/C/man3/printf.3:388
8400 msgid ""
8401 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8402 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8403 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8404 msgstr ""
8405 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8406 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8407 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8408
8409 #. type: SS
8410 #: build/C/man3/printf.3:388
8411 #, no-wrap
8412 msgid "The field width"
8413 msgstr "フィールド幅"
8414
8415 #. type: Plain text
8416 #: build/C/man3/printf.3:404
8417 msgid ""
8418 "An optional decimal digit string (with nonzero first digit) specifying a "
8419 "minimum field width.  If the converted value has fewer characters than the "
8420 "field width, it will be padded with spaces on the left (or right, if the "
8421 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8422 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8423 "the field width is given in the next argument, or in the I<m>-th argument, "
8424 "respectively, which must be of type I<int>.  A negative field width is taken "
8425 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8426 "nonexistent or small field width cause truncation of a field; if the result "
8427 "of a conversion is wider than the field width, the field is expanded to "
8428 "contain the conversion result."
8429 msgstr ""
8430 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8431 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8432 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8433 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8434 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8435 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8436 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8437 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8438 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8439 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8440
8441 #. type: SS
8442 #: build/C/man3/printf.3:404
8443 #, no-wrap
8444 msgid "The precision"
8445 msgstr "精度"
8446
8447 #. type: Plain text
8448 #: build/C/man3/printf.3:440
8449 msgid ""
8450 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8451 "optional decimal digit string.  Instead of a decimal digit string one may "
8452 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8453 "precision is given in the next argument, or in the m-th argument, "
8454 "respectively, which must be of type I<int>.  If the precision is given as "
8455 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8456 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8457 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8458 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8459 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8460 "the maximum number of characters to be printed from a string for B<s> and "
8461 "B<S> conversions."
8462 msgstr ""
8463 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8464 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8465 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8466 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8467 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8468 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8469 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8470 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8471 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8472 "る最大文字数を指定する。"
8473
8474 #. type: SS
8475 #: build/C/man3/printf.3:440
8476 #, no-wrap
8477 msgid "The length modifier"
8478 msgstr "長さ修飾子"
8479
8480 #. type: Plain text
8481 #: build/C/man3/printf.3:450
8482 msgid ""
8483 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8484 "B<X> conversion."
8485 msgstr ""
8486 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8487
8488 #. type: TP
8489 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:294
8490 #, no-wrap
8491 msgid "B<hh>"
8492 msgstr "B<hh>"
8493
8494 #. type: Plain text
8495 #: build/C/man3/printf.3:461
8496 msgid ""
8497 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8498 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8499 "I<signed char> argument."
8500 msgstr ""
8501 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8502 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8503
8504 #. type: TP
8505 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:284
8506 #, no-wrap
8507 msgid "B<h>"
8508 msgstr "B<h>"
8509
8510 #. type: Plain text
8511 #: build/C/man3/printf.3:472
8512 msgid ""
8513 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8514 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8515 "to a I<short int> argument."
8516 msgstr ""
8517 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8518 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8519
8520 #. type: TP
8521 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:311
8522 #, no-wrap
8523 msgid "B<l>"
8524 msgstr "B<l>"
8525
8526 #. type: Plain text
8527 #: build/C/man3/printf.3:491
8528 msgid ""
8529 "(ell) A following integer conversion corresponds to a I<long int> or "
8530 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8531 "a pointer to a I<long int> argument, or a following B<c> conversion "
8532 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8533 "corresponds to a pointer to I<wchar_t> argument."
8534 msgstr ""
8535 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8536 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8537 "変換では I<wchar_t> へのポインタであることを示す。"
8538
8539 #. type: TP
8540 #: build/C/man3/printf.3:491
8541 #, no-wrap
8542 msgid "B<ll>"
8543 msgstr "B<ll> (エルエル)"
8544
8545 #. type: Plain text
8546 #: build/C/man3/printf.3:503
8547 msgid ""
8548 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8549 "or I<unsigned long long int> argument, or a following B<n> conversion "
8550 "corresponds to a pointer to a I<long long int> argument."
8551 msgstr ""
8552 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8553 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8554
8555 #. type: TP
8556 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:338
8557 #, no-wrap
8558 msgid "B<L>"
8559 msgstr "B<L>"
8560
8561 #. type: Plain text
8562 #: build/C/man3/printf.3:519
8563 msgid ""
8564 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8565 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8566 "not.)"
8567 msgstr ""
8568 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8569 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8570 "認められていない。)"
8571
8572 #. type: TP
8573 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:354
8574 #, no-wrap
8575 msgid "B<q>"
8576 msgstr "B<q>"
8577
8578 #. type: Plain text
8579 #: build/C/man3/printf.3:525
8580 msgid ""
8581 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8582 "B<ll>."
8583 msgstr ""
8584 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8585 "意味である。"
8586
8587 #. type: TP
8588 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:302
8589 #, no-wrap
8590 msgid "B<j>"
8591 msgstr "B<j>"
8592
8593 #. type: Plain text
8594 #: build/C/man3/printf.3:532
8595 msgid ""
8596 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8597 "argument."
8598 msgstr ""
8599 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8600
8601 #. type: TP
8602 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:366
8603 #, no-wrap
8604 msgid "B<z>"
8605 msgstr "B<z>"
8606
8607 #. type: Plain text
8608 #: build/C/man3/printf.3:543
8609 msgid ""
8610 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8611 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8612 msgstr ""
8613 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8614 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8615
8616 #. type: TP
8617 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:359
8618 #, no-wrap
8619 msgid "B<t>"
8620 msgstr "B<t>"
8621
8622 #. type: Plain text
8623 #: build/C/man3/printf.3:548
8624 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8625 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8626
8627 #. type: Plain text
8628 #: build/C/man3/printf.3:577
8629 msgid ""
8630 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
8631 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8632 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8633 msgstr ""
8634 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8635 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8636 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8637
8638 #. type: SS
8639 #: build/C/man3/printf.3:577
8640 #, no-wrap
8641 msgid "The conversion specifier"
8642 msgstr "変換指定子"
8643
8644 #. type: Plain text
8645 #: build/C/man3/printf.3:580
8646 msgid ""
8647 "A character that specifies the type of conversion to be applied.  The "
8648 "conversion specifiers and their meanings are:"
8649 msgstr ""
8650 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8651
8652 #. type: TP
8653 #: build/C/man3/printf.3:580
8654 #, no-wrap
8655 msgid "B<d>, B<i>"
8656 msgstr "B<d>, B<i>"
8657
8658 #. type: Plain text
8659 #: build/C/man3/printf.3:590
8660 msgid ""
8661 "The I<int> argument is converted to signed decimal notation.  The precision, "
8662 "if any, gives the minimum number of digits that must appear; if the "
8663 "converted value requires fewer digits, it is padded on the left with zeros.  "
8664 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8665 "the output is empty."
8666 msgstr ""
8667 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8668 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8669 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8670 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8671
8672 #. type: TP
8673 #: build/C/man3/printf.3:590
8674 #, no-wrap
8675 msgid "B<o>, B<u>, B<x>, B<X>"
8676 msgstr "B<o>, B<u>, B<x>, B<X>"
8677
8678 #. type: Plain text
8679 #: build/C/man3/printf.3:617
8680 msgid ""
8681 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8682 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8683 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8684 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8685 "of digits that must appear; if the converted value requires fewer digits, it "
8686 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8687 "printed with an explicit precision 0, the output is empty."
8688 msgstr ""
8689 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8690 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8691 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8692 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8693 "られる。"
8694
8695 #. type: TP
8696 #: build/C/man3/printf.3:617
8697 #, no-wrap
8698 msgid "B<e>, B<E>"
8699 msgstr "B<e>, B<E>"
8700
8701 #. type: Plain text
8702 #: build/C/man3/printf.3:636
8703 msgid ""
8704 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
8705 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
8706 "and the number of digits after it is equal to the precision; if the "
8707 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
8708 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
8709 "than B<e>)  to introduce the exponent.  The exponent always contains at "
8710 "least two digits; if the value is zero, the exponent is 00."
8711 msgstr ""
8712 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
8713 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
8714 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
8715 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
8716 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
8717 "指数の値が 0 の場合には、00 と表示される。"
8718
8719 #. type: TP
8720 #: build/C/man3/printf.3:636
8721 #, no-wrap
8722 msgid "B<f>, B<F>"
8723 msgstr "B<f>, B<F>"
8724
8725 #. type: Plain text
8726 #: build/C/man3/printf.3:647
8727 msgid ""
8728 "The I<double> argument is rounded and converted to decimal notation in the "
8729 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8730 "character is equal to the precision specification.  If the precision is "
8731 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8732 "point character appears.  If a decimal point appears, at least one digit "
8733 "appears before it."
8734 msgstr ""
8735 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8736 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8737 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8738 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8739
8740 #. type: Plain text
8741 #: build/C/man3/printf.3:658
8742 msgid ""
8743 "(The SUSv2 does not know about B<F> and says that character string "
8744 "representations for infinity and NaN may be made available.  The C99 "
8745 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8746 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8747 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8748 msgstr ""
8749 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8750 "行ってもよいことになっている。\n"
8751 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8752 "し、\n"
8753 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8754 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8755
8756 #. type: TP
8757 #: build/C/man3/printf.3:658
8758 #, no-wrap
8759 msgid "B<g>, B<G>"
8760 msgstr "B<g>, B<G>"
8761
8762 #. type: Plain text
8763 #: build/C/man3/printf.3:683
8764 msgid ""
8765 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8766 "for B<G> conversions).  The precision specifies the number of significant "
8767 "digits.  If the precision is missing, 6 digits are given; if the precision "
8768 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8769 "conversion is less than -4 or greater than or equal to the precision.  "
8770 "Trailing zeros are removed from the fractional part of the result; a decimal "
8771 "point appears only if it is followed by at least one digit."
8772 msgstr ""
8773 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8774 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8775 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8776 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8777 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8778 "一つある場合にだけである。"
8779
8780 #. type: TP
8781 #: build/C/man3/printf.3:683
8782 #, no-wrap
8783 msgid "B<a>, B<A>"
8784 msgstr "B<a>, B<A>"
8785
8786 #. type: Plain text
8787 #: build/C/man3/printf.3:707
8788 msgid ""
8789 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8790 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8791 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
8792 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8793 "digit before the decimal point, and the number of digits after it is equal "
8794 "to the precision.  The default precision suffices for an exact "
8795 "representation of the value if an exact representation in base 2 exists and "
8796 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8797 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8798 "and nonzero but otherwise unspecified for normalized numbers."
8799 msgstr ""
8800 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
8801 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8802 "16 進表記に変換する。\n"
8803 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8804 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8805 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8806 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8807 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8808 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8809 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8810
8811 #. type: TP
8812 #: build/C/man3/printf.3:707 build/C/man3/scanf.3:459
8813 #: build/C/man3/wprintf.3:151
8814 #, no-wrap
8815 msgid "B<c>"
8816 msgstr "B<c>"
8817
8818 #. type: Plain text
8819 #: build/C/man3/printf.3:725
8820 msgid ""
8821 "If no B<l> modifier is present, the I<int> argument is converted to an "
8822 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8823 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8824 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8825 "conversion state starting in the initial state, and the resulting multibyte "
8826 "string is written."
8827 msgstr ""
8828 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8829 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8830 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8831 "換し、 変換されたマルチバイト文字列を出力する。"
8832
8833 #. type: TP
8834 #: build/C/man3/printf.3:725 build/C/man3/scanf.3:451
8835 #: build/C/man3/wprintf.3:165
8836 #, no-wrap
8837 msgid "B<s>"
8838 msgstr "B<s>"
8839
8840 #. type: Plain text
8841 #: build/C/man3/printf.3:740
8842 #, fuzzy
8843 #| msgid ""
8844 #| "If no B<l> modifier is present: The I<const char *> argument is expected "
8845 #| "to be a pointer to an array of character type (pointer to a string).  "
8846 #| "Characters from the array are written up to (but not including) a "
8847 #| "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no "
8848 #| "more than the number specified are written.  If a precision is given, no "
8849 #| "null byte need be present; if the precision is not specified, or is "
8850 #| "greater than the size of the array, the array must contain a terminating "
8851 #| "null byte."
8852 msgid ""
8853 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
8854 "to be a pointer to an array of character type (pointer to a string).  "
8855 "Characters from the array are written up to (but not including) a "
8856 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8857 "than the number specified are written.  If a precision is given, no null "
8858 "byte need be present; if the precision is not specified, or is greater than "
8859 "the size of the array, the array must contain a terminating null byte."
8860 msgstr ""
8861 "B<l> 修飾子がない場合、 引き数は I<const char *> 型で文字型の配列へのポイン"
8862 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8863 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8864 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8865 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8866 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8867 "なければならない。"
8868
8869 #. type: Plain text
8870 #: build/C/man3/printf.3:767
8871 #, fuzzy
8872 #| msgid ""
8873 #| "If an B<l> modifier is present: The I<const wchar_t *> argument is "
8874 #| "expected to be a pointer to an array of wide characters.  Wide characters "
8875 #| "from the array are converted to multibyte characters (each by a call to "
8876 #| "the B<wcrtomb>(3)  function, with a conversion state starting in the "
8877 #| "initial state before the first wide character), up to and including a "
8878 #| "terminating null wide character.  The resulting multibyte characters are "
8879 #| "written up to (but not including) the terminating null byte.  If a "
8880 #| "precision is specified, no more bytes than the number specified are "
8881 #| "written, but no partial multibyte characters are written.  Note that the "
8882 #| "precision determines the number of I<bytes> written, not the number of "
8883 #| "I<wide characters> or I<screen positions>.  The array must contain a "
8884 #| "terminating null wide character, unless a precision is given and it is so "
8885 #| "small that the number of bytes written exceeds it before the end of the "
8886 #| "array is reached."
8887 msgid ""
8888 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
8889 "expected to be a pointer to an array of wide characters.  Wide characters "
8890 "from the array are converted to multibyte characters (each by a call to the "
8891 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
8892 "state before the first wide character), up to and including a terminating "
8893 "null wide character.  The resulting multibyte characters are written up to "
8894 "(but not including) the terminating null byte.  If a precision is specified, "
8895 "no more bytes than the number specified are written, but no partial "
8896 "multibyte characters are written.  Note that the precision determines the "
8897 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
8898 "positions>.  The array must contain a terminating null wide character, "
8899 "unless a precision is given and it is so small that the number of bytes "
8900 "written exceeds it before the end of the array is reached."
8901 msgstr ""
8902 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t *> 型でワイド文字"
8903 "の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字毎"
8904 "に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド文"
8905 "字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8906 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8907 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8908 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8909 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8910 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8911 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8912 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8913 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8914 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8915 "い。"
8916
8917 #. type: TP
8918 #: build/C/man3/printf.3:767
8919 #, no-wrap
8920 msgid "B<C>"
8921 msgstr "B<C>"
8922
8923 #. type: Plain text
8924 #: build/C/man3/printf.3:773
8925 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8926 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8927
8928 #. type: TP
8929 #: build/C/man3/printf.3:773
8930 #, no-wrap
8931 msgid "B<S>"
8932 msgstr "B<S>"
8933
8934 #. type: Plain text
8935 #: build/C/man3/printf.3:779
8936 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
8937 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
8938
8939 #. type: TP
8940 #: build/C/man3/printf.3:779 build/C/man3/scanf.3:502
8941 #, no-wrap
8942 msgid "B<p>"
8943 msgstr "B<p>"
8944
8945 #. type: Plain text
8946 #: build/C/man3/printf.3:787
8947 #, fuzzy
8948 #| msgid ""
8949 #| "The I<void *> pointer argument is printed in hexadecimal (as if by B<%#x> "
8950 #| "or B<%#lx>)."
8951 msgid ""
8952 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
8953 "or B<%#lx>)."
8954 msgstr ""
8955 "I<void *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
8956
8957 #. type: TP
8958 #: build/C/man3/printf.3:787 build/C/man3/scanf.3:510
8959 #, no-wrap
8960 msgid "B<n>"
8961 msgstr "B<n>"
8962
8963 #. type: Plain text
8964 #: build/C/man3/printf.3:794
8965 #, fuzzy
8966 #| msgid ""
8967 #| "The number of characters written so far is stored into the integer "
8968 #| "indicated by the I<int *> (or variant) pointer argument.  No argument is "
8969 #| "converted."
8970 msgid ""
8971 "The number of characters written so far is stored into the integer indicated "
8972 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
8973 msgstr ""
8974 "これまでに出力された文字数を I<int *> (または類似の型) のポインタ引き数が指す"
8975 "整数に保存する。 引き数の変換は行われない。"
8976
8977 #. type: TP
8978 #: build/C/man3/printf.3:794
8979 #, no-wrap
8980 msgid "B<m>"
8981 msgstr "B<m>"
8982
8983 #. type: Plain text
8984 #: build/C/man3/printf.3:800
8985 msgid ""
8986 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
8987 "required."
8988 msgstr ""
8989 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
8990
8991 #. type: TP
8992 #: build/C/man3/printf.3:800 build/C/man3/scanf.3:377
8993 #, no-wrap
8994 msgid "B<%>"
8995 msgstr "B<%>"
8996
8997 #. type: Plain text
8998 #: build/C/man3/printf.3:806
8999 msgid ""
9000 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
9001 "conversion specification is \\(aq%%\\(aq."
9002 msgstr ""
9003 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
9004 "%\" となる。"
9005
9006 #. type: Plain text
9007 #: build/C/man3/printf.3:821
9008 msgid ""
9009 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9010 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
9011 "B<vsnprintf>()  functions conform to C99."
9012 msgstr ""
9013 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9014 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
9015 "B<vsnprintf>()  は C99 に準拠している。"
9016
9017 #. type: Plain text
9018 #: build/C/man3/printf.3:834
9019 msgid ""
9020 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
9021 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
9022 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
9023 "this case, and gives the return value (as always)  as the number of "
9024 "characters that would have been written in case the output string has been "
9025 "large enough."
9026 msgstr ""
9027 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
9028 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
9029 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
9030 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
9031 "出力されるであろう文字数を返す。"
9032
9033 #. type: Plain text
9034 #: build/C/man3/printf.3:848
9035 msgid ""
9036 "Linux libc4 knows about the five C standard flags.  It knows about the "
9037 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
9038 "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 "
9039 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
9040 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
9041 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
9042 "dependent radix character, no thousands' separator, no NaN or infinity, no "
9043 "\"%m$\" and \"*m$\"."
9044 msgstr ""
9045 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
9046 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
9047 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
9048 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
9049 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
9050 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
9051 "えない。"
9052
9053 #. type: Plain text
9054 #: build/C/man3/printf.3:859
9055 msgid ""
9056 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
9057 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
9058 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
9059 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
9060 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
9061 "outputs I<strerror(errno)>."
9062 msgstr ""
9063 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
9064 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
9065 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
9066 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
9067 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
9068 "ある。"
9069
9070 #. type: Plain text
9071 #: build/C/man3/printf.3:861
9072 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
9073 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
9074
9075 #. type: Plain text
9076 #: build/C/man3/printf.3:864
9077 msgid ""
9078 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
9079 "characters B<a> and B<A>."
9080 msgstr ""
9081 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
9082 "加された。"
9083
9084 #. type: Plain text
9085 #: build/C/man3/printf.3:867
9086 msgid ""
9087 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
9088 "flag character B<I>."
9089 msgstr ""
9090 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
9091 "追加された。"
9092
9093 #. type: Plain text
9094 #: build/C/man3/printf.3:869
9095 msgid "Some programs imprudently rely on code such as the following"
9096 msgstr ""
9097 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
9098 "ラムがある。"
9099
9100 #. type: Plain text
9101 #: build/C/man3/printf.3:871
9102 #, no-wrap
9103 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
9104 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
9105
9106 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
9107 #. type: Plain text
9108 #: build/C/man3/printf.3:887
9109 msgid ""
9110 "to append text to I<buf>.  However, the standards explicitly note that the "
9111 "results are undefined if source and destination buffers overlap when calling "
9112 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
9113 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
9114 "such as the above will B<not> produce the expected results."
9115 msgstr ""
9116 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
9117 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
9118 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
9119 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
9120 "結果が得られ「ない」ことがある。"
9121
9122 #.  .SH HISTORY
9123 #.  UNIX V7 defines the three routines
9124 #.  .BR printf (),
9125 #.  .BR fprintf (),
9126 #.  .BR sprintf (),
9127 #.  and has the flag \-, the width or precision *, the length modifier l,
9128 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
9129 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
9130 #.  #, + and <space> and no longer mentions D,O,U,X.
9131 #.  2.11BSD has
9132 #.  .BR vprintf (),
9133 #.  .BR vfprintf (),
9134 #.  .BR vsprintf (),
9135 #.  and warns not to use D,O,U,X.
9136 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
9137 #.  and the conversions n, p, E, G, X (with current meaning)
9138 #.  and deprecates D,O,U.
9139 #.  4.4BSD introduces the functions
9140 #.  .BR snprintf ()
9141 #.  and
9142 #.  .BR vsnprintf (),
9143 #.  and the length modifier q.
9144 #.  FreeBSD also has functions
9145 #.  .BR asprintf ()
9146 #.  and
9147 #.  .BR vasprintf (),
9148 #.  that allocate a buffer large enough for
9149 #.  .BR sprintf ().
9150 #.  In glibc there are functions
9151 #.  .BR dprintf ()
9152 #.  and
9153 #.  .BR vdprintf ()
9154 #.  that print to a file descriptor instead of a stream.
9155 #. type: Plain text
9156 #: build/C/man3/printf.3:929
9157 msgid ""
9158 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
9159 "conforms to the C99 standard, that is, behaves as described above, since "
9160 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
9161 "was truncated."
9162 msgstr ""
9163 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
9164 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
9165 "切り詰められた場合は -1 を返す。"
9166
9167 #. type: Plain text
9168 #: build/C/man3/printf.3:946
9169 msgid ""
9170 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
9171 "callers must be careful not to overflow the actual space; this is often "
9172 "impossible to assure.  Note that the length of the strings produced is "
9173 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
9174 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
9175 msgstr ""
9176 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
9177 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
9178 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
9179 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
9180 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
9181
9182 #. type: Plain text
9183 #: build/C/man3/printf.3:959
9184 msgid ""
9185 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
9186 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
9187 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
9188 "libc4 leads to serious security problems."
9189 msgstr ""
9190 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
9191 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
9192 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
9193 "深刻なセキュリティ問題を引き起こすことがある。"
9194
9195 #.  .PP
9196 #.  Some floating-point conversions under early libc4
9197 #.  caused memory leaks.
9198 #. type: Plain text
9199 #: build/C/man3/printf.3:973
9200 msgid ""
9201 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
9202 "contain a % character.  If I<foo> comes from untrusted user input, it may "
9203 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
9204 "a security hole."
9205 msgstr ""
9206 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
9207 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
9208 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
9209 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
9210 "ルを作ることになるかもしれない。"
9211
9212 #. type: Plain text
9213 #: build/C/man3/printf.3:977
9214 msgid "To print I<Pi> to five decimal places:"
9215 msgstr "I<Pi> を 5 桁で出力する。"
9216
9217 #. type: Plain text
9218 #: build/C/man3/printf.3:983
9219 #, no-wrap
9220 msgid ""
9221 "#include E<lt>math.hE<gt>\n"
9222 "#include E<lt>stdio.hE<gt>\n"
9223 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9224 msgstr ""
9225 "#include E<lt>math.hE<gt>\n"
9226 "#include E<lt>stdio.hE<gt>\n"
9227 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9228
9229 #. type: Plain text
9230 #: build/C/man3/printf.3:992
9231 msgid ""
9232 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
9233 "I<weekday> and I<month> are pointers to strings:"
9234 msgstr ""
9235 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
9236 "I<month> は文字列へのポインタである)"
9237
9238 #. type: Plain text
9239 #: build/C/man3/printf.3:998
9240 #, no-wrap
9241 msgid ""
9242 "#include E<lt>stdio.hE<gt>\n"
9243 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9244 "        weekday, month, day, hour, min);\n"
9245 msgstr ""
9246 "#include E<lt>stdio.hE<gt>\n"
9247 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9248 "\tweekday, month, day, hour, min);\n"
9249
9250 #. type: Plain text
9251 #: build/C/man3/printf.3:1004
9252 msgid ""
9253 "Many countries use the day-month-year order.  Hence, an internationalized "
9254 "version must be able to print the arguments in an order specified by the "
9255 "format:"
9256 msgstr ""
9257 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
9258 "順番で 引き数を表示できなければならない。"
9259
9260 #. type: Plain text
9261 #: build/C/man3/printf.3:1010
9262 #, no-wrap
9263 msgid ""
9264 "#include E<lt>stdio.hE<gt>\n"
9265 "fprintf(stdout, format,\n"
9266 "        weekday, month, day, hour, min);\n"
9267 msgstr ""
9268 "#include E<lt>stdio.hE<gt>\n"
9269 "fprintf(stdout, format,\n"
9270 "\tweekday, month, day, hour, min);\n"
9271
9272 #. type: Plain text
9273 #: build/C/man3/printf.3:1017
9274 msgid ""
9275 "where I<format> depends on locale, and may permute the arguments.  With the "
9276 "value:"
9277 msgstr ""
9278 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
9279 "I<format> が"
9280
9281 #. type: Plain text
9282 #: build/C/man3/printf.3:1021
9283 #, no-wrap
9284 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9285 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9286
9287 #. type: Plain text
9288 #: build/C/man3/printf.3:1025
9289 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
9290 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
9291
9292 #. type: Plain text
9293 #: build/C/man3/printf.3:1028
9294 msgid ""
9295 "To allocate a sufficiently large string and print into it (code correct for "
9296 "both glibc 2.0 and glibc 2.1):"
9297 msgstr ""
9298 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
9299 "と glibc 2.1 の両方で正しく動作するコード):"
9300
9301 #. type: Plain text
9302 #: build/C/man3/printf.3:1031
9303 msgid ""
9304 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
9305 "error instead of being handled gracefully."
9306 msgstr ""
9307 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
9308 "理されず、エラーとして扱われる。"
9309
9310 #. type: Plain text
9311 #: build/C/man3/printf.3:1036
9312 #, no-wrap
9313 msgid ""
9314 "#include E<lt>stdio.hE<gt>\n"
9315 "#include E<lt>stdlib.hE<gt>\n"
9316 "#include E<lt>stdarg.hE<gt>\n"
9317 msgstr ""
9318 "#include E<lt>stdio.hE<gt>\n"
9319 "#include E<lt>stdlib.hE<gt>\n"
9320 "#include E<lt>stdarg.hE<gt>\n"
9321
9322 #. type: Plain text
9323 #: build/C/man3/printf.3:1044
9324 #, no-wrap
9325 msgid ""
9326 "char *\n"
9327 "make_message(const char *fmt, ...)\n"
9328 "{\n"
9329 "    int n;\n"
9330 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9331 "    char *p, *np;\n"
9332 "    va_list ap;\n"
9333 msgstr ""
9334 "char *\n"
9335 "make_message(const char *fmt, ...)\n"
9336 "{\n"
9337 "    int n;\n"
9338 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9339 "    char *p, *np;\n"
9340 "    va_list ap;\n"
9341
9342 #. type: Plain text
9343 #: build/C/man3/printf.3:1047
9344 #, no-wrap
9345 msgid ""
9346 "    if ((p = malloc(size)) == NULL)\n"
9347 "        return NULL;\n"
9348 msgstr ""
9349 "    if ((p = malloc(size)) == NULL)\n"
9350 "        return NULL;\n"
9351
9352 #. type: Plain text
9353 #: build/C/man3/printf.3:1049
9354 #, no-wrap
9355 msgid "    while (1) {\n"
9356 msgstr "    while (1) {\n"
9357
9358 #. type: Plain text
9359 #: build/C/man3/printf.3:1051
9360 #, no-wrap
9361 msgid "        /* Try to print in the allocated space */\n"
9362 msgstr "        /* Try to print in the allocated space */\n"
9363
9364 #. type: Plain text
9365 #: build/C/man3/printf.3:1055
9366 #, no-wrap
9367 msgid ""
9368 "        va_start(ap, fmt);\n"
9369 "        n = vsnprintf(p, size, fmt, ap);\n"
9370 "        va_end(ap);\n"
9371 msgstr ""
9372 "        va_start(ap, fmt);\n"
9373 "        n = vsnprintf(p, size, fmt, ap);\n"
9374 "        va_end(ap);\n"
9375
9376 #. type: Plain text
9377 #: build/C/man3/printf.3:1057
9378 #, no-wrap
9379 msgid "        /* Check error code */\n"
9380 msgstr "        /* Check error code */\n"
9381
9382 #. type: Plain text
9383 #: build/C/man3/printf.3:1060
9384 #, no-wrap
9385 msgid ""
9386 "        if (n E<lt> 0)\n"
9387 "            return NULL;\n"
9388 msgstr ""
9389 "        if (n E<lt> 0)\n"
9390 "            return NULL;\n"
9391
9392 #. type: Plain text
9393 #: build/C/man3/printf.3:1062
9394 #, no-wrap
9395 msgid "        /* If that worked, return the string */\n"
9396 msgstr "        /* If that worked, return the string */\n"
9397
9398 #. type: Plain text
9399 #: build/C/man3/printf.3:1065
9400 #, no-wrap
9401 msgid ""
9402 "        if (n E<lt> size)\n"
9403 "            return p;\n"
9404 msgstr ""
9405 "        if (n E<lt> size)\n"
9406 "            return p;\n"
9407
9408 #. type: Plain text
9409 #: build/C/man3/printf.3:1067
9410 #, no-wrap
9411 msgid "        /* Else try again with more space */\n"
9412 msgstr "        /* Else try again with more space */\n"
9413
9414 #. type: Plain text
9415 #: build/C/man3/printf.3:1069
9416 #, no-wrap
9417 msgid "        size = n + 1;       /* Precisely what is needed */\n"
9418 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
9419
9420 #. type: Plain text
9421 #: build/C/man3/printf.3:1079
9422 #, no-wrap
9423 msgid ""
9424 "        if ((np = realloc (p, size)) == NULL) {\n"
9425 "            free(p);\n"
9426 "            return NULL;\n"
9427 "        } else {\n"
9428 "            p = np;\n"
9429 "        }\n"
9430 "    }\n"
9431 "}\n"
9432 msgstr ""
9433 "        if ((np = realloc (p, size)) == NULL) {\n"
9434 "            free(p);\n"
9435 "            return NULL;\n"
9436 "        } else {\n"
9437 "            p = np;\n"
9438 "        }\n"
9439 "    }\n"
9440 "}\n"
9441
9442 #. type: Plain text
9443 #: build/C/man3/printf.3:1089
9444 msgid ""
9445 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9446 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9447 msgstr ""
9448 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9449 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9450
9451 #. type: TH
9452 #: build/C/man3/puts.3:26
9453 #, no-wrap
9454 msgid "PUTS"
9455 msgstr "PUTS"
9456
9457 #. type: TH
9458 #: build/C/man3/puts.3:26
9459 #, no-wrap
9460 msgid "2011-09-28"
9461 msgstr "2011-09-28"
9462
9463 #. type: Plain text
9464 #: build/C/man3/puts.3:29
9465 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9466 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9467
9468 #. type: Plain text
9469 #: build/C/man3/puts.3:34
9470 #, no-wrap
9471 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9472 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9473
9474 #. type: Plain text
9475 #: build/C/man3/puts.3:36
9476 #, no-wrap
9477 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9478 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9479
9480 #. type: Plain text
9481 #: build/C/man3/puts.3:38
9482 #, no-wrap
9483 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9484 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9485
9486 #. type: Plain text
9487 #: build/C/man3/puts.3:40
9488 #, no-wrap
9489 msgid "B<int putchar(int >I<c>B<);>\n"
9490 msgstr "B<int putchar(int >I<c>B<);>\n"
9491
9492 #. type: Plain text
9493 #: build/C/man3/puts.3:42
9494 #, no-wrap
9495 msgid "B<int puts(const char *>I<s>B<);>\n"
9496 msgstr "B<int puts(const char *>I<s>B<);>\n"
9497
9498 #. type: Plain text
9499 #: build/C/man3/puts.3:51
9500 msgid ""
9501 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9502 "I<stream>."
9503 msgstr ""
9504 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9505 "に書き込む。"
9506
9507 #. type: Plain text
9508 #: build/C/man3/puts.3:58
9509 msgid ""
9510 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9511 "null byte (\\(aq\\e0\\(aq)."
9512 msgstr ""
9513 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9514 "ト (\\(aq\\e0\\(aq) は出力しない。"
9515
9516 #. type: Plain text
9517 #: build/C/man3/puts.3:65
9518 msgid ""
9519 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9520 "a macro which evaluates I<stream> more than once."
9521 msgstr ""
9522 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9523 "れないという点を除き、 B<fputc>()  と同じである。"
9524
9525 #. type: Plain text
9526 #: build/C/man3/puts.3:69
9527 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9528 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9529
9530 #. type: Plain text
9531 #: build/C/man3/puts.3:76
9532 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9533 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9534
9535 #. type: Plain text
9536 #: build/C/man3/puts.3:81
9537 msgid ""
9538 "Calls to the functions described here can be mixed with each other and with "
9539 "calls to other output functions from the I<stdio> library for the same "
9540 "output stream."
9541 msgstr ""
9542 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9543 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9544 "る。"
9545
9546 #. type: Plain text
9547 #: build/C/man3/puts.3:96
9548 msgid ""
9549 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9550 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9551 msgstr ""
9552 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9553 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9554
9555 #. type: Plain text
9556 #: build/C/man3/puts.3:103
9557 msgid ""
9558 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9559 "on error."
9560 msgstr ""
9561 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9562 "は B<EOF> を返す。"
9563
9564 #. type: Plain text
9565 #: build/C/man3/puts.3:112
9566 msgid ""
9567 "It is not advisable to mix calls to output functions from the I<stdio> "
9568 "library with low-level calls to B<write>(2)  for the file descriptor "
9569 "associated with the same output stream; the results will be undefined and "
9570 "very probably not what you want."
9571 msgstr ""
9572 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9573 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9574 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9575 "性が高い。"
9576
9577 #. type: Plain text
9578 #: build/C/man3/puts.3:124
9579 msgid ""
9580 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9581 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9582 "(3)"
9583 msgstr ""
9584 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9585 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9586 "(3)"
9587
9588 #. type: TH
9589 #: build/C/man2/read.2:35
9590 #, no-wrap
9591 msgid "READ"
9592 msgstr "READ"
9593
9594 #. type: TH
9595 #: build/C/man2/read.2:35
9596 #, no-wrap
9597 msgid "2013-02-12"
9598 msgstr "2013-02-12"
9599
9600 #. type: Plain text
9601 #: build/C/man2/read.2:38
9602 msgid "read - read from a file descriptor"
9603 msgstr "read - ファイルディスクリプタから読み込む"
9604
9605 #. type: Plain text
9606 #: build/C/man2/read.2:43
9607 #, no-wrap
9608 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9609 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9610
9611 #. type: Plain text
9612 #: build/C/man2/read.2:52
9613 msgid ""
9614 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9615 "into the buffer starting at I<buf>."
9616 msgstr ""
9617 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9618 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9619
9620 #. type: Plain text
9621 #: build/C/man2/read.2:60
9622 msgid ""
9623 "On files that support seeking, the read operation commences at the current "
9624 "file offset, and the file offset is incremented by the number of bytes "
9625 "read.  If the current file offset is at or past the end of file, no bytes "
9626 "are read, and B<read>()  returns zero."
9627 msgstr ""
9628 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
9629 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
9630 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
9631 "0 を返す。"
9632
9633 #. type: Plain text
9634 #: build/C/man2/read.2:75
9635 msgid ""
9636 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
9637 "In the absence of any errors, or if B<read>()  does not check for errors, a "
9638 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
9639 msgstr ""
9640 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
9641 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
9642 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
9643
9644 #. type: Plain text
9645 #: build/C/man2/read.2:81
9646 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9647 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
9648
9649 #. type: Plain text
9650 #: build/C/man2/read.2:95
9651 msgid ""
9652 "On success, the number of bytes read is returned (zero indicates end of "
9653 "file), and the file position is advanced by this number.  It is not an error "
9654 "if this number is smaller than the number of bytes requested; this may "
9655 "happen for example because fewer bytes are actually available right now "
9656 "(maybe because we were close to end-of-file, or because we are reading from "
9657 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9658 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9659 "this case it is left unspecified whether the file position (if any) changes."
9660 msgstr ""
9661 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9662 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9663 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9664 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9665 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9666 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9667 "の場合はファイル位置が変更されるかどうかは 不定である。"
9668
9669 #. type: TP
9670 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
9671 #, no-wrap
9672 msgid "B<EAGAIN>"
9673 msgstr "B<EAGAIN>"
9674
9675 #. type: Plain text
9676 #: build/C/man2/read.2:103
9677 msgid ""
9678 "The file descriptor I<fd> refers to a file other than a socket and has been "
9679 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9680 msgstr ""
9681 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9682 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9683 "する状況にある。"
9684
9685 #. type: TP
9686 #: build/C/man2/read.2:103 build/C/man2/write.2:115
9687 #, no-wrap
9688 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9689 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9690
9691 #.  Actually EAGAIN on Linux
9692 #. type: Plain text
9693 #: build/C/man2/read.2:114
9694 msgid ""
9695 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9696 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9697 "to be returned for this case, and does not require these constants to have "
9698 "the same value, so a portable application should check for both "
9699 "possibilities."
9700 msgstr ""
9701 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9702 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9703 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9704 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9705 "プリケーションでは、両方の可能性を 確認すべきである。"
9706
9707 #. type: Plain text
9708 #: build/C/man2/read.2:118
9709 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9710 msgstr ""
9711 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9712 "(open) されていない。"
9713
9714 #. type: Plain text
9715 #: build/C/man2/read.2:122 build/C/man2/write.2:145
9716 msgid "I<buf> is outside your accessible address space."
9717 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9718
9719 #. type: Plain text
9720 #: build/C/man2/read.2:126
9721 msgid ""
9722 "The call was interrupted by a signal before any data was read; see B<signal>"
9723 "(7)."
9724 msgstr ""
9725 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9726
9727 #. type: Plain text
9728 #: build/C/man2/read.2:137
9729 msgid ""
9730 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9731 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9732 "I<buf>, the value specified in I<count>, or the current file offset is not "
9733 "suitably aligned."
9734 msgstr ""
9735 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9736 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9737 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9738 "ンメントが不適切である。"
9739
9740 #. type: Plain text
9741 #: build/C/man2/read.2:147
9742 msgid ""
9743 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9744 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9745 "information."
9746 msgstr ""
9747 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9748 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9749 "こと。"
9750
9751 #. type: Plain text
9752 #: build/C/man2/read.2:158
9753 msgid ""
9754 "I/O error.  This will happen for example when the process is in a background "
9755 "process group, tries to read from its controlling terminal, and either it is "
9756 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9757 "also occur when there is a low-level I/O error while reading from a disk or "
9758 "tape."
9759 msgstr ""
9760 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
9761 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9762 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9763 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9764 "た場合にも起こる。"
9765
9766 #. type: Plain text
9767 #: build/C/man2/read.2:162
9768 msgid "I<fd> refers to a directory."
9769 msgstr "I<fd> がディレクトリを参照している。"
9770
9771 #. type: Plain text
9772 #: build/C/man2/read.2:173
9773 msgid ""
9774 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9775 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9776 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9777 "read."
9778 msgstr ""
9779 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9780 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9781 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9782 "数を返してもよい。"
9783
9784 #. type: Plain text
9785 #: build/C/man2/read.2:187
9786 msgid ""
9787 "On NFS file systems, reading small amounts of data will update the timestamp "
9788 "only the first time, subsequent calls may not do so.  This is caused by "
9789 "client side attribute caching, because most if not all NFS clients leave "
9790 "st_atime (last file access time)  updates to the server and client side "
9791 "reads satisfied from the client's cache will not cause st_atime updates on "
9792 "the server as there are no server side reads.  UNIX semantics can be "
9793 "obtained by disabling client side attribute caching, but in most situations "
9794 "this will substantially increase server load and decrease performance."
9795 msgstr ""
9796 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9797 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9798 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9799 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9800 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9801 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9802 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9803 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9804
9805 #. type: Plain text
9806 #: build/C/man2/read.2:200
9807 msgid ""
9808 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9809 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9810 "B<fread>(3)"
9811 msgstr ""
9812 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9813 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9814 "B<fread>(3)"
9815
9816 #. type: TH
9817 #: build/C/man2/readlink.2:43
9818 #, no-wrap
9819 msgid "READLINK"
9820 msgstr "READLINK"
9821
9822 #. type: TH
9823 #: build/C/man2/readlink.2:43
9824 #, no-wrap
9825 msgid "2011-09-20"
9826 msgstr "2011-09-20"
9827
9828 #. type: Plain text
9829 #: build/C/man2/readlink.2:46
9830 msgid "readlink - read value of a symbolic link"
9831 msgstr "readlink - シンボリックリンクの値を読む"
9832
9833 #. type: Plain text
9834 #: build/C/man2/readlink.2:50
9835 msgid ""
9836 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9837 ">I<bufsiz>B<);>"
9838 msgstr ""
9839 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9840 ">I<bufsiz>B<);>"
9841
9842 #. type: Plain text
9843 #: build/C/man2/readlink.2:58
9844 msgid "B<readlink>():"
9845 msgstr "B<readlink>():"
9846
9847 #. type: Plain text
9848 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
9849 msgid ""
9850 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9851 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9852 msgstr ""
9853 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9854 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9855
9856 #. type: Plain text
9857 #: build/C/man2/readlink.2:77
9858 msgid ""
9859 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9860 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9861 "null byte to I<buf>.  It will truncate the contents (to a length of "
9862 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9863 "contents."
9864 msgstr ""
9865 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9866 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9867 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9868 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9869
9870 #. type: Plain text
9871 #: build/C/man2/readlink.2:85
9872 msgid ""
9873 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9874 "error, -1 is returned and I<errno> is set to indicate the error."
9875 msgstr ""
9876 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9877 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9878
9879 #. type: Plain text
9880 #: build/C/man2/readlink.2:91
9881 msgid ""
9882 "Search permission is denied for a component of the path prefix.  (See also "
9883 "B<path_resolution>(7).)"
9884 msgstr ""
9885 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9886 "参照すること)。"
9887
9888 #. type: Plain text
9889 #: build/C/man2/readlink.2:95
9890 msgid "I<buf> extends outside the process's allocated address space."
9891 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9892
9893 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9894 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9895 #.  and this error can also occur if bufsiz < 0.
9896 #.  See: http://thread.gmane.org/gmane.linux.man/380
9897 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9898 #. type: Plain text
9899 #: build/C/man2/readlink.2:104
9900 msgid "I<bufsiz> is not positive."
9901 msgstr "I<bufsiz> が正でない。"
9902
9903 #. type: Plain text
9904 #: build/C/man2/readlink.2:107
9905 msgid "The named file is not a symbolic link."
9906 msgstr "指定したファイルがシンボリックリンクでない。"
9907
9908 #. type: Plain text
9909 #: build/C/man2/readlink.2:110
9910 msgid "An I/O error occurred while reading from the file system."
9911 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9912
9913 #. type: Plain text
9914 #: build/C/man2/readlink.2:113
9915 msgid "Too many symbolic links were encountered in translating the pathname."
9916 msgstr "パス名にシンボリックリンクが多すぎる。"
9917
9918 #. type: Plain text
9919 #: build/C/man2/readlink.2:116
9920 msgid "A pathname, or a component of a pathname, was too long."
9921 msgstr "パス名かパス名の一部分が長過ぎる。"
9922
9923 #. type: Plain text
9924 #: build/C/man2/readlink.2:119
9925 msgid "The named file does not exist."
9926 msgstr "その名前のファイルが存在しない。"
9927
9928 #. type: Plain text
9929 #: build/C/man2/readlink.2:125
9930 msgid "A component of the path prefix is not a directory."
9931 msgstr "パスのディレクトリ部分がディレクトリでない。"
9932
9933 #. type: Plain text
9934 #: build/C/man2/readlink.2:130
9935 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9936 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9937
9938 #. type: Plain text
9939 #: build/C/man2/readlink.2:138
9940 msgid ""
9941 "In versions of glibc up to and including glibc 2.4, the return type of "
9942 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
9943 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
9944 msgstr ""
9945 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
9946 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
9947 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
9948
9949 #. type: Plain text
9950 #: build/C/man2/readlink.2:157
9951 msgid ""
9952 "Using a statically sized buffer might not provide enough room for the "
9953 "symbolic link contents.  The required size for the buffer can be obtained "
9954 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
9955 "link.  However, the number of bytes written by B<readlink>()  should be "
9956 "checked to make sure that the size of the symbolic link did not increase "
9957 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
9958 "also addresses a common portability problem when using I<PATH_MAX> for the "
9959 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
9960 "the system does not have such limit."
9961 msgstr ""
9962 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
9963 "格納するのに十分な領域がない場合がある。\n"
9964 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
9965 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
9966 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
9967 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
9968 "の間で増えていないことを確認すべきである。\n"
9969 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
9970 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
9971 "問題を解決することができる。なぜなら、POSIX では、\n"
9972 "システムがそのような上限値を定義していない場合には、\n"
9973 "I<PATH_MAX> が定義されることが保証されていないからである。"
9974
9975 #. type: Plain text
9976 #: build/C/man2/readlink.2:163
9977 msgid ""
9978 "The following program allocates the buffer needed by B<readlink>()  "
9979 "dynamically from the information provided by B<lstat>(), making sure there's "
9980 "no race condition between the calls."
9981 msgstr ""
9982 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
9983 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
9984 "また、両方の呼び出し間で競合条件がないことを保証している。"
9985
9986 #. type: Plain text
9987 #: build/C/man2/readlink.2:170
9988 #, no-wrap
9989 msgid ""
9990 "#include E<lt>sys/types.hE<gt>\n"
9991 "#include E<lt>sys/stat.hE<gt>\n"
9992 "#include E<lt>stdio.hE<gt>\n"
9993 "#include E<lt>stdlib.hE<gt>\n"
9994 "#include E<lt>unistd.hE<gt>\n"
9995 msgstr ""
9996 "#include E<lt>sys/types.hE<gt>\n"
9997 "#include E<lt>sys/stat.hE<gt>\n"
9998 "#include E<lt>stdio.hE<gt>\n"
9999 "#include E<lt>stdlib.hE<gt>\n"
10000 "#include E<lt>unistd.hE<gt>\n"
10001
10002 #. type: Plain text
10003 #: build/C/man2/readlink.2:177
10004 #, no-wrap
10005 msgid ""
10006 "int\n"
10007 "main(int argc, char *argv[])\n"
10008 "{\n"
10009 "    struct stat sb;\n"
10010 "    char *linkname;\n"
10011 "    ssize_t r;\n"
10012 msgstr ""
10013 "int\n"
10014 "main(int argc, char *argv[])\n"
10015 "{\n"
10016 "    struct stat sb;\n"
10017 "    char *linkname;\n"
10018 "    ssize_t r;\n"
10019
10020 #. type: Plain text
10021 #: build/C/man2/readlink.2:182
10022 #, no-wrap
10023 msgid ""
10024 "    if (argc != 2) {\n"
10025 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10026 "        exit(EXIT_FAILURE);\n"
10027 "    }\n"
10028 msgstr ""
10029 "    if (argc != 2) {\n"
10030 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10031 "        exit(EXIT_FAILURE);\n"
10032 "    }\n"
10033
10034 #. type: Plain text
10035 #: build/C/man2/readlink.2:187
10036 #, no-wrap
10037 msgid ""
10038 "    if (lstat(argv[1], &sb) == -1) {\n"
10039 "        perror(\"lstat\");\n"
10040 "        exit(EXIT_FAILURE);\n"
10041 "    }\n"
10042 msgstr ""
10043 "    if (lstat(argv[1], &sb) == -1) {\n"
10044 "        perror(\"lstat\");\n"
10045 "        exit(EXIT_FAILURE);\n"
10046 "    }\n"
10047
10048 #. type: Plain text
10049 #: build/C/man2/readlink.2:193
10050 #, no-wrap
10051 msgid ""
10052 "    linkname = malloc(sb.st_size + 1);\n"
10053 "    if (linkname == NULL) {\n"
10054 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10055 "        exit(EXIT_FAILURE);\n"
10056 "    }\n"
10057 msgstr ""
10058 "    linkname = malloc(sb.st_size + 1);\n"
10059 "    if (linkname == NULL) {\n"
10060 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10061 "        exit(EXIT_FAILURE);\n"
10062 "    }\n"
10063
10064 #. type: Plain text
10065 #: build/C/man2/readlink.2:195
10066 #, no-wrap
10067 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10068 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10069
10070 #. type: Plain text
10071 #: build/C/man2/readlink.2:200
10072 #, no-wrap
10073 msgid ""
10074 "    if (r E<lt> 0) {\n"
10075 "        perror(\"lstat\");\n"
10076 "        exit(EXIT_FAILURE);\n"
10077 "    }\n"
10078 msgstr ""
10079 "    if (r E<lt> 0) {\n"
10080 "        perror(\"lstat\");\n"
10081 "        exit(EXIT_FAILURE);\n"
10082 "    }\n"
10083
10084 #. type: Plain text
10085 #: build/C/man2/readlink.2:206
10086 #, no-wrap
10087 msgid ""
10088 "    if (r E<gt> sb.st_size) {\n"
10089 "        fprintf(stderr, \"symlink increased in size \"\n"
10090 "                        \"between lstat() and readlink()\\en\");\n"
10091 "        exit(EXIT_FAILURE);\n"
10092 "    }\n"
10093 msgstr ""
10094 "    if (r E<gt> sb.st_size) {\n"
10095 "        fprintf(stderr, \"symlink increased in size \"\n"
10096 "                        \"between lstat() and readlink()\\en\");\n"
10097 "        exit(EXIT_FAILURE);\n"
10098 "    }\n"
10099
10100 #. type: Plain text
10101 #: build/C/man2/readlink.2:208
10102 #, no-wrap
10103 msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10104 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10105
10106 #. type: Plain text
10107 #: build/C/man2/readlink.2:210
10108 #, no-wrap
10109 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10110 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10111
10112 #. type: Plain text
10113 #: build/C/man2/readlink.2:222
10114 msgid ""
10115 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
10116 "B<path_resolution>(7), B<symlink>(7)"
10117 msgstr ""
10118 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
10119 "B<path_resolution>(7), B<symlink>(7)"
10120
10121 #. type: TH
10122 #: build/C/man2/readv.2:32
10123 #, no-wrap
10124 msgid "READV"
10125 msgstr "READV"
10126
10127 #. type: TH
10128 #: build/C/man2/readv.2:32
10129 #, no-wrap
10130 msgid "2010-11-17"
10131 msgstr "2010-11-17"
10132
10133 #. type: Plain text
10134 #: build/C/man2/readv.2:35
10135 msgid ""
10136 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
10137 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
10138
10139 #. type: Plain text
10140 #: build/C/man2/readv.2:38
10141 #, no-wrap
10142 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
10143 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
10144
10145 #. type: Plain text
10146 #: build/C/man2/readv.2:40
10147 #, no-wrap
10148 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10149 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10150
10151 #. type: Plain text
10152 #: build/C/man2/readv.2:42
10153 #, no-wrap
10154 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10155 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10156
10157 #. type: Plain text
10158 #: build/C/man2/readv.2:45
10159 #, no-wrap
10160 msgid ""
10161 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10162 "B<               off_t >I<offset>B<);>\n"
10163 msgstr ""
10164 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10165 "B<               off_t >I<offset>B<);>\n"
10166
10167 #. type: Plain text
10168 #: build/C/man2/readv.2:48
10169 #, no-wrap
10170 msgid ""
10171 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10172 "B<                off_t >I<offset>B<);>\n"
10173 msgstr ""
10174 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10175 "B<                off_t >I<offset>B<);>\n"
10176
10177 #. type: Plain text
10178 #: build/C/man2/readv.2:58
10179 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10180 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10181
10182 #. type: Plain text
10183 #: build/C/man2/readv.2:68
10184 msgid ""
10185 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
10186 "with the file descriptor I<fd> into the buffers described by I<iov> "
10187 "(\"scatter input\")."
10188 msgstr ""
10189 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
10190 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
10191 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
10192
10193 #. type: Plain text
10194 #: build/C/man2/readv.2:78
10195 msgid ""
10196 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
10197 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
10198 "\")."
10199 msgstr ""
10200 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
10201 "I<iovcnt>\n"
10202 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
10203 "ら\n"
10204 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
10205
10206 #. type: Plain text
10207 #: build/C/man2/readv.2:87
10208 msgid ""
10209 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
10210 "I<E<lt>sys/uio.hE<gt>> as:"
10211 msgstr ""
10212 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
10213 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10214
10215 #. type: Plain text
10216 #: build/C/man2/readv.2:95
10217 #, no-wrap
10218 msgid ""
10219 "struct iovec {\n"
10220 "    void  *iov_base;    /* Starting address */\n"
10221 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10222 "};\n"
10223 msgstr ""
10224 "struct iovec {\n"
10225 "    void  *iov_base;    /* Starting address */\n"
10226 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10227 "};\n"
10228
10229 #. type: Plain text
10230 #: build/C/man2/readv.2:103
10231 msgid ""
10232 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
10233 "buffers are filled."
10234 msgstr ""
10235 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
10236 "B<read>(2) と全く同様の動作を行う。"
10237
10238 #. type: Plain text
10239 #: build/C/man2/readv.2:109
10240 msgid ""
10241 "The B<writev>()  system call works just like B<write>(2)  except that "
10242 "multiple buffers are written out."
10243 msgstr ""
10244 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
10245 "B<write>(2) と全く同様の動作を行う。"
10246
10247 #. type: Plain text
10248 #: build/C/man2/readv.2:128
10249 msgid ""
10250 "Buffers are processed in array order.  This means that B<readv>()  "
10251 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
10252 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
10253 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
10254 "[0] before proceeding to I<iov>[1], and so on."
10255 msgstr ""
10256 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
10257 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
10258 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
10259 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
10260
10261 #. type: Plain text
10262 #: build/C/man2/readv.2:146
10263 msgid ""
10264 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
10265 "data written by B<writev>()  is written as a single block that is not "
10266 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
10267 "for an exception); analogously, B<readv>()  is guaranteed to read a "
10268 "contiguous block of data from the file, regardless of read operations "
10269 "performed in other threads or processes that have file descriptors referring "
10270 "to the same open file description (see B<open>(2))."
10271 msgstr ""
10272 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
10273 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
10274 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
10275 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
10276 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
10277 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
10278 "作の影響を受けることはない。"
10279
10280 #. type: SS
10281 #: build/C/man2/readv.2:146
10282 #, no-wrap
10283 msgid "preadv() and pwritev()"
10284 msgstr "preadv() と pwritev()"
10285
10286 #. type: Plain text
10287 #: build/C/man2/readv.2:159
10288 msgid ""
10289 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
10290 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
10291 "argument, I<offset>, which specifies the file offset at which the input "
10292 "operation is to be performed."
10293 msgstr ""
10294 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
10295 "組み合わせたものである。\n"
10296 "B<readv>() と同じ処理を実行するが、\n"
10297 "4 番目の引き数 I<offset> が追加されており、\n"
10298 "この引き数は入力操作を行うファイルオフセットを指定する。"
10299
10300 #. type: Plain text
10301 #: build/C/man2/readv.2:172
10302 msgid ""
10303 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
10304 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
10305 "argument, I<offset>, which specifies the file offset at which the output "
10306 "operation is to be performed."
10307 msgstr ""
10308 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
10309 "組み合わせたものである。\n"
10310 "B<writev>() と同じ処理を実行するが、\n"
10311 "4 番目の引き数 I<offset> が追加されており、\n"
10312 "この引き数は出力操作を行うファイルオフセットを指定する。"
10313
10314 #. type: Plain text
10315 #: build/C/man2/readv.2:177
10316 msgid ""
10317 "The file offset is not changed by these system calls.  The file referred to "
10318 "by I<fd> must be capable of seeking."
10319 msgstr ""
10320 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
10321 "I<fd> が参照するファイルは seek 可能でなければならない。"
10322
10323 #. type: Plain text
10324 #: build/C/man2/readv.2:188
10325 msgid ""
10326 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
10327 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
10328 "error, -1 is returned, and I<errno> is set appropriately."
10329 msgstr ""
10330 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
10331 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
10332 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
10333
10334 #. type: Plain text
10335 #: build/C/man2/readv.2:200
10336 msgid ""
10337 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
10338 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
10339 "(2).  Additionally, the following error is defined:"
10340 msgstr ""
10341 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
10342 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
10343 "る。\n"
10344 "また、追加で以下のエラーが定義されている:"
10345
10346 #. type: Plain text
10347 #: build/C/man2/readv.2:209
10348 msgid ""
10349 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
10350 "vector count I<iovcnt> is less than zero or greater than the permitted "
10351 "maximum."
10352 msgstr ""
10353 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
10354 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
10355
10356 #. type: Plain text
10357 #: build/C/man2/readv.2:214
10358 msgid ""
10359 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10360 "support was added in glibc 2.10."
10361 msgstr ""
10362 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10363 "ライブラリによるサポートは glibc 2.10 で追加された。"
10364
10365 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10366 #.  (Says release.libc.)
10367 #. type: Plain text
10368 #: build/C/man2/readv.2:222
10369 msgid ""
10370 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10371 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10372 "I<iovcnt> argument, and I<int> as the return type."
10373 msgstr ""
10374 "B<readv>(), B<writev>(): \n"
10375 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10376 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10377 "返り値の型として I<int> を使用していた。"
10378
10379 #. type: Plain text
10380 #: build/C/man2/readv.2:226
10381 msgid ""
10382 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10383 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10384
10385 #. type: SS
10386 #: build/C/man2/readv.2:227
10387 #, no-wrap
10388 msgid "Linux notes"
10389 msgstr "Linux での注意"
10390
10391 #. type: Plain text
10392 #: build/C/man2/readv.2:258
10393 msgid ""
10394 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10395 "items that can be passed in I<iov>.  An implementation can advertise its "
10396 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10397 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10398 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10399 "glibc wrapper functions do some extra work if they detect that the "
10400 "underlying kernel system call failed because this limit was exceeded.  In "
10401 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10402 "large enough for all of the items specified by I<iov>, passes that buffer in "
10403 "a call to B<read>(2), copies data from the buffer to the locations specified "
10404 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10405 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10406 "using a temporary buffer and a call to B<write>(2)."
10407 msgstr ""
10408 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10409 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10410 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10411 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10412 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10413 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10414 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10415 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10416 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10417 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10418 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10419 "(2)  を呼び出す。"
10420
10421 #. type: Plain text
10422 #: build/C/man2/readv.2:265
10423 msgid ""
10424 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10425 "operate on file descriptors, with the functions from the stdio library; the "
10426 "results will be undefined and probably not what you want."
10427 msgstr ""
10428 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10429 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10430 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10431 "得られないだろう。"
10432
10433 #. type: Plain text
10434 #: build/C/man2/readv.2:268
10435 msgid "The following code sample demonstrates the use of B<writev>():"
10436 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10437
10438 #. type: Plain text
10439 #: build/C/man2/readv.2:275
10440 #, no-wrap
10441 msgid ""
10442 "char *str0 = \"hello \";\n"
10443 "char *str1 = \"world\\en\";\n"
10444 "struct iovec iov[2];\n"
10445 "ssize_t nwritten;\n"
10446 msgstr ""
10447 "char *str0 = \"hello \";\n"
10448 "char *str1 = \"world\\en\";\n"
10449 "struct iovec iov[2];\n"
10450 "ssize_t nwritten;\n"
10451
10452 #. type: Plain text
10453 #: build/C/man2/readv.2:280
10454 #, no-wrap
10455 msgid ""
10456 "iov[0].iov_base = str0;\n"
10457 "iov[0].iov_len = strlen(str0);\n"
10458 "iov[1].iov_base = str1;\n"
10459 "iov[1].iov_len = strlen(str1);\n"
10460 msgstr ""
10461 "iov[0].iov_base = str0;\n"
10462 "iov[0].iov_len = strlen(str0);\n"
10463 "iov[1].iov_base = str1;\n"
10464 "iov[1].iov_len = strlen(str1);\n"
10465
10466 #. type: Plain text
10467 #: build/C/man2/readv.2:282
10468 #, no-wrap
10469 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10470 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10471
10472 #. type: Plain text
10473 #: build/C/man2/readv.2:288
10474 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10475 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10476
10477 #. type: TH
10478 #: build/C/man3/remove.3:31
10479 #, no-wrap
10480 msgid "REMOVE"
10481 msgstr "REMOVE"
10482
10483 #. type: TH
10484 #: build/C/man3/remove.3:31
10485 #, no-wrap
10486 msgid "2008-12-03"
10487 msgstr "2008-12-03"
10488
10489 #. type: Plain text
10490 #: build/C/man3/remove.3:34
10491 msgid "remove - remove a file or directory"
10492 msgstr "remove - ファイルやディレクトリを削除する"
10493
10494 #. type: Plain text
10495 #: build/C/man3/remove.3:38
10496 msgid "B<int remove(const char *>I<pathname>B<);>"
10497 msgstr "B<int remove(const char *>I<pathname>B<);>"
10498
10499 #. type: Plain text
10500 #: build/C/man3/remove.3:46
10501 msgid ""
10502 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10503 "for files, and B<rmdir>(2)  for directories."
10504 msgstr ""
10505 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10506 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10507
10508 #. type: Plain text
10509 #: build/C/man3/remove.3:50
10510 msgid ""
10511 "If the removed name was the last link to a file and no processes have the "
10512 "file open, the file is deleted and the space it was using is made available "
10513 "for reuse."
10514 msgstr ""
10515 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10516 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10517 "ことができるようになる。"
10518
10519 #. type: Plain text
10520 #: build/C/man3/remove.3:55
10521 msgid ""
10522 "If the name was the last link to a file, but any processes still have the "
10523 "file open, the file will remain in existence until the last file descriptor "
10524 "referring to it is closed."
10525 msgstr ""
10526 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10527 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10528 "でファイルは存在し続ける。"
10529
10530 #. type: Plain text
10531 #: build/C/man3/remove.3:57
10532 msgid "If the name referred to a symbolic link, the link is removed."
10533 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10534
10535 #. type: Plain text
10536 #: build/C/man3/remove.3:60
10537 msgid ""
10538 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10539 "processes which have the object open may continue to use it."
10540 msgstr ""
10541 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10542 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10543
10544 #. type: Plain text
10545 #: build/C/man3/remove.3:70
10546 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10547 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10548
10549 #. type: Plain text
10550 #: build/C/man3/remove.3:72
10551 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10552 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10553
10554 #. type: Plain text
10555 #: build/C/man3/remove.3:78
10556 msgid ""
10557 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10558 "hence would not remove directories)."
10559 msgstr ""
10560 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10561 "(従ってディレクトリを削除できなかった)。"
10562
10563 #. type: Plain text
10564 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10565 msgid ""
10566 "Infelicities in the protocol underlying NFS can cause the unexpected "
10567 "disappearance of files which are still being used."
10568 msgstr ""
10569 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10570 "うことがありえる。"
10571
10572 #. type: Plain text
10573 #: build/C/man3/remove.3:92
10574 msgid ""
10575 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10576 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10577 msgstr ""
10578 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10579 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10580
10581 #. type: TH
10582 #: build/C/man2/rename.2:32
10583 #, no-wrap
10584 msgid "RENAME"
10585 msgstr "RENAME"
10586
10587 #. type: Plain text
10588 #: build/C/man2/rename.2:35
10589 msgid "rename - change the name or location of a file"
10590 msgstr "rename - ファイルの名前や位置を変更する"
10591
10592 #. type: Plain text
10593 #: build/C/man2/rename.2:39
10594 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10595 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10596
10597 #. type: Plain text
10598 #: build/C/man2/rename.2:48
10599 msgid ""
10600 "B<rename>()  renames a file, moving it between directories if required.  Any "
10601 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10602 "Open file descriptors for I<oldpath> are also unaffected."
10603 msgstr ""
10604 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10605 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10606 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10607 "リプタにも影響はない。"
10608
10609 #. type: Plain text
10610 #: build/C/man2/rename.2:56
10611 msgid ""
10612 "If I<newpath> already exists it will be atomically replaced (subject to a "
10613 "few conditions; see ERRORS below), so that there is no point at which "
10614 "another process attempting to access I<newpath> will find it missing."
10615 msgstr ""
10616 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10617 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10618 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10619 "とはない (訳註: 常にアクセス可能である)。"
10620
10621 #. type: Plain text
10622 #: build/C/man2/rename.2:64
10623 msgid ""
10624 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10625 "file, then B<rename>()  does nothing, and returns a success status."
10626 msgstr ""
10627 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10628 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10629
10630 #. type: Plain text
10631 #: build/C/man2/rename.2:72
10632 msgid ""
10633 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10634 "guarantees to leave an instance of I<newpath> in place."
10635 msgstr ""
10636 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10637 "I<newpath> の実体を元のまま残すことを保証する。"
10638
10639 #. type: Plain text
10640 #: build/C/man2/rename.2:78
10641 msgid ""
10642 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10643 "not exist, or it must specify an empty directory."
10644 msgstr ""
10645 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10646 "存在しないか、空のディレクトリでなければならない。"
10647
10648 #. type: Plain text
10649 #: build/C/man2/rename.2:85
10650 msgid ""
10651 "However, when overwriting there will probably be a window in which both "
10652 "I<oldpath> and I<newpath> refer to the file being renamed."
10653 msgstr ""
10654 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10655 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10656
10657 #. type: Plain text
10658 #: build/C/man2/rename.2:91
10659 msgid ""
10660 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10661 "refers to a symbolic link the link will be overwritten."
10662 msgstr ""
10663 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10664 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10665 "は、リンクが上書きされる。"
10666
10667 #. type: Plain text
10668 #: build/C/man2/rename.2:116
10669 msgid ""
10670 "Write permission is denied for the directory containing I<oldpath> or "
10671 "I<newpath>, or, search permission is denied for one of the directories in "
10672 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10673 "and does not allow write permission (needed to update the I<..> entry).  "
10674 "(See also B<path_resolution>(7).)"
10675 msgstr ""
10676 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10677 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10678 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10679 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10680
10681 #. type: TP
10682 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10683 #, no-wrap
10684 msgid "B<EBUSY>"
10685 msgstr "B<EBUSY>"
10686
10687 #. type: Plain text
10688 #: build/C/man2/rename.2:133
10689 msgid ""
10690 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10691 "use by some process (perhaps as current working directory, or as root "
10692 "directory, or because it was open for reading) or is in use by the system "
10693 "(for example as mount point), while the system considers this an error.  "
10694 "(Note that there is no requirement to return B<EBUSY> in such cases"
10695 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10696 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10697 "situations.)"
10698 msgstr ""
10699 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10700 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10701 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10702 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10703 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10704 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10705 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10706 "B<EBUSY> を返すことが許されている。)"
10707
10708 #. type: Plain text
10709 #: build/C/man2/rename.2:143
10710 msgid ""
10711 "The new pathname contained a path prefix of the old, or, more generally, an "
10712 "attempt was made to make a directory a subdirectory of itself."
10713 msgstr ""
10714 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10715 "ディレクトリに 変更しようとした場合がほとんどである。"
10716
10717 #. type: Plain text
10718 #: build/C/man2/rename.2:149
10719 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10720 msgstr ""
10721 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10722 "い。"
10723
10724 #. type: Plain text
10725 #: build/C/man2/rename.2:160
10726 msgid ""
10727 "I<oldpath> already has the maximum number of links to it, or it was a "
10728 "directory and the directory containing I<newpath> has the maximum number of "
10729 "links."
10730 msgstr ""
10731 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10732 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10733
10734 #. type: Plain text
10735 #: build/C/man2/rename.2:176
10736 msgid ""
10737 "The link named by I<oldpath> does not exist; or, a directory component in "
10738 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10739 msgstr ""
10740 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10741 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10742
10743 #. type: Plain text
10744 #: build/C/man2/rename.2:193
10745 msgid ""
10746 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10747 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10748 "not a directory."
10749 msgstr ""
10750 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10751 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10752 "トリでない。"
10753
10754 #. type: TP
10755 #: build/C/man2/rename.2:193
10756 #, no-wrap
10757 msgid "B<ENOTEMPTY> or B<EEXIST>"
10758 msgstr "B<ENOTEMPTY  または  EEXIST>"
10759
10760 #. type: Plain text
10761 #: build/C/man2/rename.2:197
10762 msgid ""
10763 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10764 "\" and \"..\"."
10765 msgstr ""
10766 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10767 "でいる。"
10768
10769 #. type: TP
10770 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
10771 #, no-wrap
10772 msgid "B<EPERM> or B<EACCES>"
10773 msgstr "B<EPERM> または B<EACCES>"
10774
10775 #. type: Plain text
10776 #: build/C/man2/rename.2:221
10777 msgid ""
10778 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10779 "the process's effective user ID is neither the user ID of the file to be "
10780 "deleted nor that of the directory containing it, and the process is not "
10781 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10782 "I<newpath> is an existing file and the directory containing it has the "
10783 "sticky bit set and the process's effective user ID is neither the user ID of "
10784 "the file to be replaced nor that of the directory containing it, and the "
10785 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10786 "capability); or the file system containing I<pathname> does not support "
10787 "renaming of the type requested."
10788 msgstr ""
10789 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10790 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10791 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10792 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10793 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10794 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10795 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10796 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10797 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10798 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10799
10800 #. type: Plain text
10801 #: build/C/man2/rename.2:232
10802 msgid ""
10803 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10804 "permits a file system to be mounted at multiple points, but B<rename>()  "
10805 "does not work across different mount points, even if the same file system is "
10806 "mounted on both.)"
10807 msgstr ""
10808 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10809 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10810 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10811 "別々のマウント位置を跨いでは動作しない。)"
10812
10813 #. type: Plain text
10814 #: build/C/man2/rename.2:234
10815 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10816 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10817
10818 #. type: Plain text
10819 #: build/C/man2/rename.2:245
10820 msgid ""
10821 "On NFS file systems, you can not assume that if the operation failed the "
10822 "file was not renamed.  If the server does the rename operation and then "
10823 "crashes, the retransmitted RPC which will be processed when the server is up "
10824 "again causes a failure.  The application is expected to deal with this.  See "
10825 "B<link>(2)  for a similar problem."
10826 msgstr ""
10827 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10828 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10829 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10830 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10831 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10832
10833 #. type: Plain text
10834 #: build/C/man2/rename.2:254
10835 msgid ""
10836 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10837 "(2), B<path_resolution>(7), B<symlink>(7)"
10838 msgstr ""
10839 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10840 "(2), B<path_resolution>(7), B<symlink>(7)"
10841
10842 #. type: TH
10843 #: build/C/man2/rmdir.2:30
10844 #, no-wrap
10845 msgid "RMDIR"
10846 msgstr "RMDIR"
10847
10848 #. type: TH
10849 #: build/C/man2/rmdir.2:30
10850 #, no-wrap
10851 msgid "2008-05-08"
10852 msgstr "2008-05-08"
10853
10854 #. type: Plain text
10855 #: build/C/man2/rmdir.2:33
10856 msgid "rmdir - delete a directory"
10857 msgstr "rmdir - ディレクトリを削除する"
10858
10859 #. type: Plain text
10860 #: build/C/man2/rmdir.2:37
10861 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10862 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10863
10864 #. type: Plain text
10865 #: build/C/man2/rmdir.2:40
10866 msgid "B<rmdir>()  deletes a directory, which must be empty."
10867 msgstr ""
10868 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10869 "ない。"
10870
10871 #. type: Plain text
10872 #: build/C/man2/rmdir.2:55
10873 msgid ""
10874 "Write access to the directory containing I<pathname> was not allowed, or one "
10875 "of the directories in the path prefix of I<pathname> did not allow search "
10876 "permission.  (See also B<path_resolution>(7)."
10877 msgstr ""
10878 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10879 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10880 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10881 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10882 "と)"
10883
10884 #. type: Plain text
10885 #: build/C/man2/rmdir.2:64
10886 msgid ""
10887 "I<pathname> is currently in use by the system or some process that prevents "
10888 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10889 "point or is the root directory of the calling process."
10890 msgstr ""
10891 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10892 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10893 "たプロセスのルートディレクトリであることを意味する。"
10894
10895 #. type: Plain text
10896 #: build/C/man2/rmdir.2:73
10897 msgid "I<pathname> has I<.> as last component."
10898 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10899
10900 #. type: Plain text
10901 #: build/C/man2/rmdir.2:77
10902 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10903 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10904
10905 #. type: Plain text
10906 #: build/C/man2/rmdir.2:85
10907 msgid ""
10908 "A directory component in I<pathname> does not exist or is a dangling "
10909 "symbolic link."
10910 msgstr ""
10911 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10912 "リックリンク (symbolic link) である。"
10913
10914 #. type: Plain text
10915 #: build/C/man2/rmdir.2:94
10916 msgid ""
10917 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10918 "fact, a directory."
10919 msgstr ""
10920 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10921 "クトリでない。"
10922
10923 #. type: TP
10924 #: build/C/man2/rmdir.2:94
10925 #, no-wrap
10926 msgid "B<ENOTEMPTY>"
10927 msgstr "B<ENOTEMPTY>"
10928
10929 #. type: Plain text
10930 #: build/C/man2/rmdir.2:107
10931 msgid ""
10932 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10933 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10934 "condition."
10935 msgstr ""
10936 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
10937 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
10938 "で B<EEXIST> を返すことを認めている。"
10939
10940 #. type: Plain text
10941 #: build/C/man2/rmdir.2:118
10942 msgid ""
10943 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
10944 "and the process's effective user ID is neither the user ID of the file to be "
10945 "deleted nor that of the directory containing it, and the process is not "
10946 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
10947 msgstr ""
10948 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
10949 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
10950 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
10951 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
10952
10953 #. type: Plain text
10954 #: build/C/man2/rmdir.2:123
10955 msgid ""
10956 "The file system containing I<pathname> does not support the removal of "
10957 "directories."
10958 msgstr ""
10959 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
10960 "ない。"
10961
10962 #. type: Plain text
10963 #: build/C/man2/rmdir.2:127
10964 msgid "I<pathname> refers to a directory on a read-only file system."
10965 msgstr ""
10966 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
10967
10968 #. type: Plain text
10969 #: build/C/man2/rmdir.2:132
10970 msgid ""
10971 "Infelicities in the protocol underlying NFS can cause the unexpected "
10972 "disappearance of directories which are still being used."
10973 msgstr ""
10974 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
10975 "する現象が引き起こされることがある。"
10976
10977 #. type: Plain text
10978 #: build/C/man2/rmdir.2:141
10979 msgid ""
10980 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10981 "B<unlink>(2), B<unlinkat>(2)"
10982 msgstr ""
10983 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10984 "B<unlink>(2), B<unlinkat>(2)"
10985
10986 #. type: TH
10987 #: build/C/man3/scanf.3:52
10988 #, no-wrap
10989 msgid "SCANF"
10990 msgstr "SCANF"
10991
10992 #. type: TH
10993 #: build/C/man3/scanf.3:52
10994 #, no-wrap
10995 msgid "2013-01-30"
10996 msgstr "2013-01-30"
10997
10998 #. type: Plain text
10999 #: build/C/man3/scanf.3:55
11000 msgid ""
11001 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
11002 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
11003
11004 #. type: Plain text
11005 #: build/C/man3/scanf.3:62
11006 #, no-wrap
11007 msgid ""
11008 "B<int scanf(const char *>I<format>B<, ...);>\n"
11009 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11010 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11011 msgstr ""
11012 "B<int scanf(const char *>I<format>B<, ...);>\n"
11013 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11014 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11015
11016 #. type: Plain text
11017 #: build/C/man3/scanf.3:64
11018 #, no-wrap
11019 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
11020 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
11021
11022 #. type: Plain text
11023 #: build/C/man3/scanf.3:68
11024 #, no-wrap
11025 msgid ""
11026 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11027 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11028 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11029 msgstr ""
11030 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11031 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11032 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11033
11034 #. type: Plain text
11035 #: build/C/man3/scanf.3:79
11036 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11037 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11038
11039 #. type: Plain text
11040 #: build/C/man3/scanf.3:82
11041 msgid ""
11042 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11043 "200112L;"
11044 msgstr ""
11045 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11046 "200112L;"
11047
11048 #. type: Plain text
11049 #: build/C/man3/scanf.3:104
11050 msgid ""
11051 "The B<scanf>()  family of functions scans input according to I<format> as "
11052 "described below.  This format may contain I<conversion specifications>; the "
11053 "results from such conversions, if any, are stored in the locations pointed "
11054 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
11055 "argument must be of a type that is appropriate for the value returned by the "
11056 "corresponding conversion specification."
11057 msgstr ""
11058 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
11059 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
11060 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
11061 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
11062 "は、対応する変換指定が返す値に 適合していなければならない。"
11063
11064 #. type: Plain text
11065 #: build/C/man3/scanf.3:115
11066 msgid ""
11067 "If the number of conversion specifications in I<format> exceeds the number "
11068 "of I<pointer> arguments, the results are undefined.  If the number of "
11069 "I<pointer> arguments exceeds the number of conversion specifications, then "
11070 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
11071 msgstr ""
11072 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
11073 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
11074 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
11075
11076 #. type: Plain text
11077 #: build/C/man3/scanf.3:127
11078 msgid ""
11079 "The B<scanf>()  function reads input from the standard input stream "
11080 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
11081 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
11082 msgstr ""
11083 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
11084 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
11085 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
11086
11087 #. type: Plain text
11088 #: build/C/man3/scanf.3:145
11089 msgid ""
11090 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
11091 "from the stream pointer I<stream> using a variable argument list of pointers "
11092 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
11093 "from the standard input and the B<vsscanf>()  function scans it from a "
11094 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
11095 "functions respectively."
11096 msgstr ""
11097 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
11098 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
11099 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
11100 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
11101 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
11102
11103 #. type: Plain text
11104 #: build/C/man3/scanf.3:159
11105 msgid ""
11106 "The I<format> string consists of a sequence of I<directives> which describe "
11107 "how to process the sequence of input characters.  If processing of a "
11108 "directive fails, no further input is read, and B<scanf>()  returns.  A "
11109 "\"failure\" can be either of the following: I<input failure>, meaning that "
11110 "input characters were unavailable, or I<matching failure>, meaning that the "
11111 "input was inappropriate (see below)."
11112 msgstr ""
11113 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
11114 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
11115 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
11116 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
11117 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
11118 "であったこと (下記参照) を意味する。"
11119
11120 #. type: Plain text
11121 #: build/C/man3/scanf.3:161
11122 msgid "A directive is one of the following:"
11123 msgstr "命令は以下のいずれかである:"
11124
11125 #. type: TP
11126 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
11127 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
11128 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
11129 #, no-wrap
11130 msgid "\\(bu"
11131 msgstr "\\(bu"
11132
11133 #. type: Plain text
11134 #: build/C/man3/scanf.3:167
11135 msgid ""
11136 "A sequence of white-space characters (space, tab, newline, etc.; see "
11137 "B<isspace>(3)).  This directive matches any amount of white space, including "
11138 "none, in the input."
11139 msgstr ""
11140 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
11141 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
11142 "致する)。"
11143
11144 #. type: Plain text
11145 #: build/C/man3/scanf.3:171
11146 msgid ""
11147 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
11148 "This character must exactly match the next character of input."
11149 msgstr ""
11150 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
11151 "の次の文字に正確に一致しなければならない。"
11152
11153 #. type: Plain text
11154 #: build/C/man3/scanf.3:182
11155 msgid ""
11156 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
11157 "character.  A sequence of characters from the input is converted according "
11158 "to this specification, and the result is placed in the corresponding "
11159 "I<pointer> argument.  If the next item of input does not match the "
11160 "conversion specification, the conversion fails\\(emthis is a I<matching "
11161 "failure>."
11162 msgstr ""
11163 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
11164 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
11165 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
11166 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
11167
11168 #. type: Plain text
11169 #: build/C/man3/scanf.3:190
11170 msgid ""
11171 "Each I<conversion specification> in I<format> begins with either the "
11172 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
11173 "for the distinction) followed by:"
11174 msgstr ""
11175 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
11176 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
11177
11178 #. type: Plain text
11179 #: build/C/man3/scanf.3:201
11180 msgid ""
11181 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
11182 "input as directed by the conversion specification, but discards the input.  "
11183 "No corresponding I<pointer> argument is required, and this specification is "
11184 "not included in the count of successful assignments returned by B<scanf>()."
11185 msgstr ""
11186 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
11187 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
11188 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
11189
11190 #. type: Plain text
11191 #: build/C/man3/scanf.3:220
11192 #, fuzzy
11193 #| msgid ""
11194 #| "An optional \\(aqm\\(aq character.  This is used with string conversions "
11195 #| "(I<%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11196 #| "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11197 #| "buffer of sufficient size, and assigns the address of this buffer to the "
11198 #| "corresponding I<pointer> argument, which should be a pointer to a I<char "
11199 #| "*> variable (this variable does not need to be initialized before the "
11200 #| "call).  The caller should subsequently B<free>(3)  this buffer when it is "
11201 #| "no longer required."
11202 msgid ""
11203 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
11204 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11205 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11206 "buffer of sufficient size, and assigns the address of this buffer to the "
11207 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
11208 "*> variable (this variable does not need to be initialized before the "
11209 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
11210 "longer required."
11211 msgstr ""
11212 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
11213 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
11214 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
11215 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
11216 "は I<char *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に初"
11217 "期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファを "
11218 "B<free>(3) すべきである。"
11219
11220 #. type: Plain text
11221 #: build/C/man3/scanf.3:232
11222 msgid ""
11223 "An optional decimal integer which specifies the I<maximum field width>.  "
11224 "Reading of characters stops either when this maximum is reached or when a "
11225 "nonmatching character is found, whichever happens first.  Most conversions "
11226 "discard initial white space characters (the exceptions are noted below), and "
11227 "these discarded characters don't count toward the maximum field width.  "
11228 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
11229 "mark the end of the input; the maximum field width does not include this "
11230 "terminator."
11231 msgstr ""
11232 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
11233 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
11234 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
11235 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
11236 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
11237 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
11238
11239 #. type: Plain text
11240 #: build/C/man3/scanf.3:246
11241 msgid ""
11242 "An optional I<type modifier character>.  For example, the B<l> type modifier "
11243 "is used with integer conversions such as B<%d> to specify that the "
11244 "corresponding I<pointer> argument refers to a I<long int> rather than a "
11245 "pointer to an I<int>."
11246 msgstr ""
11247 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
11248 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
11249 "I<int> ではなく I<long int> を参照していることを指定できる。"
11250
11251 #. type: Plain text
11252 #: build/C/man3/scanf.3:251
11253 msgid ""
11254 "A I<conversion specifier> that specifies the type of input conversion to be "
11255 "performed."
11256 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
11257
11258 #. type: Plain text
11259 #: build/C/man3/scanf.3:280
11260 msgid ""
11261 "The conversion specifications in I<format> are of two forms, either "
11262 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
11263 "forms should not be mixed in the same I<format> string, except that a string "
11264 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
11265 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
11266 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
11267 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
11268 "specifies that the converted input should be placed in the location referred "
11269 "to by the I<n>-th I<pointer> argument following I<format>."
11270 msgstr ""
11271 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
11272 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
11273 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
11274 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
11275 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
11276 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
11277 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
11278 "I<pointer> 引き数が参照する場所に格納することを指定する。"
11279
11280 #. type: SS
11281 #: build/C/man3/scanf.3:280
11282 #, no-wrap
11283 msgid "Conversions"
11284 msgstr "変換"
11285
11286 #. type: Plain text
11287 #: build/C/man3/scanf.3:284
11288 msgid ""
11289 "The following I<type modifier characters> can appear in a conversion "
11290 "specification:"
11291 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
11292
11293 #. type: Plain text
11294 #: build/C/man3/scanf.3:294
11295 msgid ""
11296 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
11297 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
11298 "I<unsigned short int> (rather than I<int>)."
11299 msgstr ""
11300 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
11301 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
11302 "あることを示す。"
11303
11304 #. type: Plain text
11305 #: build/C/man3/scanf.3:302
11306 msgid ""
11307 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
11308 "I<unsigned char>."
11309 msgstr ""
11310 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
11311 "タであることを示す。"
11312
11313 #. type: Plain text
11314 #: build/C/man3/scanf.3:311
11315 msgid ""
11316 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
11317 "I<uintmax_t>.  This modifier was introduced in C99."
11318 msgstr ""
11319 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
11320 "ることを示す。 この修飾子は C99 で導入された。"
11321
11322 #.  This use of l was introduced in Amendment 1 to ISO C90.
11323 #. type: Plain text
11324 #: build/C/man3/scanf.3:338
11325 msgid ""
11326 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
11327 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
11328 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
11329 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
11330 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
11331 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
11332 "as a pointer to a wide character or wide-character string respectively."
11333 msgstr ""
11334 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
11335 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
11336 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
11337 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
11338 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
11339 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
11340 "ンタであると みなされる。"
11341
11342 #.  MTK, Jul 05: The following is no longer true for modern
11343 #.  ANSI C (i.e., C99):
11344 #.  (Note that long long is not an
11345 #.  ANSI C
11346 #.  type. Any program using this will not be portable to all
11347 #.  architectures).
11348 #. type: Plain text
11349 #: build/C/man3/scanf.3:354
11350 msgid ""
11351 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
11352 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
11353 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
11354 msgstr ""
11355 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
11356 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
11357 "I<long long> へのポインタであることのいずれかであることを示す。"
11358
11359 #. type: Plain text
11360 #: build/C/man3/scanf.3:359
11361 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
11362 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
11363
11364 #. type: Plain text
11365 #: build/C/man3/scanf.3:366
11366 msgid ""
11367 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11368 "modifier was introduced in C99."
11369 msgstr ""
11370 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11371 "この修飾子は C99 で導入された。"
11372
11373 #. type: Plain text
11374 #: build/C/man3/scanf.3:373
11375 msgid ""
11376 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11377 "modifier was introduced in C99."
11378 msgstr ""
11379 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11380 "修飾子は C99 で導入された。"
11381
11382 #. type: Plain text
11383 #: build/C/man3/scanf.3:377
11384 msgid "The following I<conversion specifiers> are available:"
11385 msgstr "以下の I<「変換指定子」> が利用可能である。"
11386
11387 #. type: Plain text
11388 #: build/C/man3/scanf.3:386
11389 msgid ""
11390 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11391 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11392 "initial white space characters are discarded), and assignment does not occur."
11393 msgstr ""
11394 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11395 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11396 "る)、 変数への代入は生じない。"
11397
11398 #. type: TP
11399 #: build/C/man3/scanf.3:386
11400 #, no-wrap
11401 msgid "B<d>"
11402 msgstr "B<d>"
11403
11404 #. type: Plain text
11405 #: build/C/man3/scanf.3:391
11406 msgid ""
11407 "Matches an optionally signed decimal integer; the next pointer must be a "
11408 "pointer to I<int>."
11409 msgstr ""
11410 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11411 "ばならない。"
11412
11413 #. type: TP
11414 #: build/C/man3/scanf.3:391
11415 #, no-wrap
11416 msgid "B<D>"
11417 msgstr "B<D>"
11418
11419 #. type: Plain text
11420 #: build/C/man3/scanf.3:400
11421 msgid ""
11422 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11423 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11424 "causing old programs to fail mysteriously.)"
11425 msgstr ""
11426 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11427 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11428 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11429
11430 #. type: TP
11431 #: build/C/man3/scanf.3:400
11432 #, no-wrap
11433 msgid "B<i>"
11434 msgstr "B<i>"
11435
11436 #. type: Plain text
11437 #: build/C/man3/scanf.3:412
11438 msgid ""
11439 "Matches an optionally signed integer; the next pointer must be a pointer to "
11440 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11441 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11442 "that correspond to the base are used."
11443 msgstr ""
11444 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11445 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11446 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11447 "される文字は、これらの基数に対応しているものだけである。"
11448
11449 #. type: TP
11450 #: build/C/man3/scanf.3:412
11451 #, no-wrap
11452 msgid "B<o>"
11453 msgstr "B<o>"
11454
11455 #. type: Plain text
11456 #: build/C/man3/scanf.3:416
11457 msgid ""
11458 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11459 "I<unsigned int>."
11460 msgstr ""
11461 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11462 "らない。"
11463
11464 #. type: TP
11465 #: build/C/man3/scanf.3:416
11466 #, no-wrap
11467 msgid "B<u>"
11468 msgstr "B<u>"
11469
11470 #. type: Plain text
11471 #: build/C/man3/scanf.3:421
11472 msgid ""
11473 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11474 "I<unsigned int>."
11475 msgstr ""
11476 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11477 "でなければならない。"
11478
11479 #. type: Plain text
11480 #: build/C/man3/scanf.3:426
11481 msgid ""
11482 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11483 "to I<unsigned int>."
11484 msgstr ""
11485 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11486 "タでなければならない。"
11487
11488 #. type: TP
11489 #: build/C/man3/scanf.3:426
11490 #, no-wrap
11491 msgid "B<X>"
11492 msgstr "B<X>"
11493
11494 #. type: Plain text
11495 #: build/C/man3/scanf.3:430
11496 msgid "Equivalent to B<x>."
11497 msgstr "B<x> と同一である。"
11498
11499 #. type: TP
11500 #: build/C/man3/scanf.3:430
11501 #, no-wrap
11502 msgid "B<f>"
11503 msgstr "B<f>"
11504
11505 #. type: Plain text
11506 #: build/C/man3/scanf.3:435
11507 msgid ""
11508 "Matches an optionally signed floating-point number; the next pointer must be "
11509 "a pointer to I<float>."
11510 msgstr ""
11511 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11512 "ればならない。"
11513
11514 #. type: TP
11515 #: build/C/man3/scanf.3:435
11516 #, no-wrap
11517 msgid "B<e>"
11518 msgstr "B<e>"
11519
11520 #. type: Plain text
11521 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
11522 msgid "Equivalent to B<f>."
11523 msgstr "B<f> と同一である。"
11524
11525 #. type: TP
11526 #: build/C/man3/scanf.3:439
11527 #, no-wrap
11528 msgid "B<g>"
11529 msgstr "B<g>"
11530
11531 #. type: TP
11532 #: build/C/man3/scanf.3:443
11533 #, no-wrap
11534 msgid "B<E>"
11535 msgstr "B<E>"
11536
11537 #. type: Plain text
11538 #: build/C/man3/scanf.3:451
11539 msgid "(C99) Equivalent to B<f>."
11540 msgstr "(C99)  B<f> と同一である。"
11541
11542 #. type: Plain text
11543 #: build/C/man3/scanf.3:459
11544 msgid ""
11545 "Matches a sequence of non-white-space characters; the next pointer must be a "
11546 "pointer to character array that is long enough to hold the input sequence "
11547 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11548 "automatically.  The input string stops at white space or at the maximum "
11549 "field width, whichever occurs first."
11550 msgstr ""
11551 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11552 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11553 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11554 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11555 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11556
11557 #. type: Plain text
11558 #: build/C/man3/scanf.3:469
11559 msgid ""
11560 "Matches a sequence of characters whose length is specified by the I<maximum "
11561 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11562 "there must be enough room for all the characters (no terminating null byte "
11563 "is added).  The usual skip of leading white space is suppressed.  To skip "
11564 "white space first, use an explicit space in the format."
11565 msgstr ""
11566 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11567 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11568 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11569 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11570 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11571
11572 #. type: TP
11573 #: build/C/man3/scanf.3:469
11574 #, no-wrap
11575 msgid "B<\\&[>"
11576 msgstr "B<\\&[>"
11577
11578 #. type: Plain text
11579 #: build/C/man3/scanf.3:502
11580 msgid ""
11581 "Matches a nonempty sequence of characters from the specified set of accepted "
11582 "characters; the next pointer must be a pointer to I<char>, and there must be "
11583 "enough room for all the characters in the string, plus a terminating null "
11584 "byte.  The usual skip of leading white space is suppressed.  The string is "
11585 "to be made up of characters in (or not in) a particular set; the set is "
11586 "defined by the characters between the open bracket B<[> character and a "
11587 "close bracket B<]> character.  The set I<excludes> those characters if the "
11588 "first character after the open bracket is a circumflex (B<^>).  To include a "
11589 "close bracket in the set, make it the first character after the open bracket "
11590 "or the circumflex; any other position will end the set.  The hyphen "
11591 "character B<-> is also special; when placed between two other characters, it "
11592 "adds all intervening characters to the set.  To include a hyphen, make it "
11593 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11594 "> means the set \"everything except close bracket, zero through nine, and "
11595 "hyphen\".  The string ends with the appearance of a character not in the "
11596 "(or, with a circumflex, in) set or when the field width runs out."
11597 msgstr ""
11598 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11599 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11600 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11601 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11602 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11603 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11604 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11605 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11606 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11607 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11608 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11609 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11610 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11611 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11612 "文字の 出現または確保された領域が使い切られた時に終了する。"
11613
11614 #. type: Plain text
11615 #: build/C/man3/scanf.3:510
11616 msgid ""
11617 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11618 "pointer must be a pointer to a pointer to I<void>."
11619 msgstr ""
11620 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11621 "タは I<void> へのポインタへのポインタでなければならない。"
11622
11623 #. type: Plain text
11624 #: build/C/man3/scanf.3:530
11625 msgid ""
11626 "Nothing is expected; instead, the number of characters consumed thus far "
11627 "from the input is stored through the next pointer, which must be a pointer "
11628 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11629 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11630 "of a B<%n> directive does not increment the assignment count returned at the "
11631 "completion of execution\" but the Corrigendum seems to contradict this.  "
11632 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11633 "conversions on the return value."
11634 msgstr ""
11635 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11636 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11637 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11638 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11639 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11640 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11641 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11642
11643 #. type: Plain text
11644 #: build/C/man3/scanf.3:535
11645 msgid ""
11646 "These functions return the number of input items successfully matched and "
11647 "assigned, which can be fewer than provided for, or even zero in the event of "
11648 "an early matching failure."
11649 msgstr ""
11650 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11651 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11652 "ることもある。"
11653
11654 #. type: Plain text
11655 #: build/C/man3/scanf.3:547
11656 msgid ""
11657 "The value B<EOF> is returned if the end of input is reached before either "
11658 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11659 "also returned if a read error occurs, in which case the error indicator for "
11660 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11661 "error."
11662 msgstr ""
11663 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11664 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11665 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11666 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11667
11668 #. type: Plain text
11669 #: build/C/man3/scanf.3:553
11670 msgid ""
11671 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11672 "operation would block."
11673 msgstr ""
11674 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11675 "込み操作は停止 (block) することになる。"
11676
11677 #. type: Plain text
11678 #: build/C/man3/scanf.3:558
11679 msgid ""
11680 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11681 msgstr ""
11682 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11683 "ンされていない。"
11684
11685 #. type: Plain text
11686 #: build/C/man3/scanf.3:561
11687 msgid "Input byte sequence does not form a valid character."
11688 msgstr "入力されたバイト列が有効な文字を構成していない。"
11689
11690 #. type: Plain text
11691 #: build/C/man3/scanf.3:565
11692 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11693 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11694
11695 #. type: Plain text
11696 #: build/C/man3/scanf.3:570
11697 msgid "Not enough arguments; or I<format> is NULL."
11698 msgstr "引き数が十分でない。または I<format> が NULL である。"
11699
11700 #. type: Plain text
11701 #: build/C/man3/scanf.3:573
11702 msgid "Out of memory."
11703 msgstr "メモリ不足。"
11704
11705 #. type: TP
11706 #: build/C/man3/scanf.3:573
11707 #, no-wrap
11708 msgid "B<ERANGE>"
11709 msgstr "B<ERANGE>"
11710
11711 #. type: Plain text
11712 #: build/C/man3/scanf.3:577
11713 msgid ""
11714 "The result of an integer conversion would exceed the size that can be stored "
11715 "in the corresponding integer type."
11716 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11717
11718 #. type: Plain text
11719 #: build/C/man3/scanf.3:587
11720 msgid ""
11721 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11722 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11723 msgstr ""
11724 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11725 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11726
11727 #. type: Plain text
11728 #: build/C/man3/scanf.3:597
11729 msgid ""
11730 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11731 "the usage of B<L> in integer conversions is the GNU notation."
11732 msgstr ""
11733 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11734 "B<ll> または B<L> の使用は GNU での拡張である。"
11735
11736 #. type: Plain text
11737 #: build/C/man3/scanf.3:608
11738 msgid ""
11739 "The Linux version of these functions is based on the I<GNU> I<libio> "
11740 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11741 "(glibc-1.08)> for a more concise description."
11742 msgstr ""
11743 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11744 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11745
11746 #. type: Plain text
11747 #: build/C/man3/scanf.3:614
11748 msgid ""
11749 "The GNU C library supported the dynamic allocation conversion specifier (as "
11750 "a nonstandard extension) via the B<a> character.  This feature seems to be "
11751 "present at least as far back as glibc 2.0."
11752 msgstr ""
11753 "GNU C ライブラリ (glibc) では、 B<a> 文字による動的割り当て変換指定子 "
11754 "(dynamic allocation conversion specifier) を (非標準の拡張として) サポートし"
11755 "ている。この機能は少なくとも glibc 2.0 以降で存在しているようである。"
11756
11757 #. type: Plain text
11758 #: build/C/man3/scanf.3:624
11759 msgid ""
11760 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
11761 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
11762 "the B<a> is interpreted as a specifier for floating-point numbers (see "
11763 "above)."
11764 msgstr ""
11765 "この修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
11766 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない。この場"
11767 "合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11768
11769 #. type: Plain text
11770 #: build/C/man3/scanf.3:633
11771 msgid ""
11772 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11773 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11774 "advantages:"
11775 msgstr ""
11776 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11777 "ている。 B<m> 修飾子は以下の利点がある。"
11778
11779 #. type: Plain text
11780 #: build/C/man3/scanf.3:638
11781 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11782 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11783
11784 #. type: Plain text
11785 #: build/C/man3/scanf.3:644
11786 msgid ""
11787 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11788 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11789 msgstr ""
11790 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11791 "std=c99> などの影響も避けられる)。"
11792
11793 #. type: Plain text
11794 #: build/C/man3/scanf.3:646
11795 msgid "It is specified in the POSIX.1-2008 standard."
11796 msgstr "POSIX.1-2008 標準で規定されている。"
11797
11798 #. type: Plain text
11799 #: build/C/man3/scanf.3:659
11800 msgid ""
11801 "All functions are fully C89 conformant, but provide the additional "
11802 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11803 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11804 "the behavior of specifiers defined in C89."
11805 msgstr ""
11806 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11807 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11808 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11809 "れない。"
11810
11811 #. type: Plain text
11812 #: build/C/man3/scanf.3:675
11813 msgid ""
11814 "Some combinations of the type modifiers and conversion specifiers defined by "
11815 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
11816 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11817 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11818 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11819 "B<u>, B<x>, and B<X> conversions or B<ll>."
11820 msgstr ""
11821 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
11822 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
11823 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
11824 "他のアーキテクチャでも同様になっているとは限らない。\n"
11825 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
11826 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
11827 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11828
11829 #. type: Plain text
11830 #: build/C/man3/scanf.3:681
11831 msgid ""
11832 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11833 "conversions equivalently to B<L>."
11834 msgstr ""
11835 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11836 "動小数の変換に使用される。"
11837
11838 #. type: Plain text
11839 #: build/C/man3/scanf.3:691
11840 msgid ""
11841 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
11842 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
11843 "the returned string, as in the following example:"
11844 msgstr ""
11845 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
11846 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
11847 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
11848
11849 #. type: Plain text
11850 #: build/C/man3/scanf.3:696
11851 #, no-wrap
11852 msgid ""
11853 "char *p;\n"
11854 "int n;\n"
11855 msgstr ""
11856 "char *p;\n"
11857 "int n;\n"
11858
11859 #. type: Plain text
11860 #: build/C/man3/scanf.3:707
11861 #, no-wrap
11862 msgid ""
11863 "errno = 0;\n"
11864 "n = scanf(\"%m[a-z]\", &p);\n"
11865 "if (n == 1) {\n"
11866 "    printf(\"read: %s\\en\", p);\n"
11867 "    free(p);\n"
11868 "} else if (errno != 0) {\n"
11869 "    perror(\"scanf\");\n"
11870 "} else {\n"
11871 "    fprintf(stderr, \"No matching characters\\en\");\n"
11872 "}\n"
11873 msgstr ""
11874 "errno = 0;\n"
11875 "n = scanf(\"%m[a-z]\", &p);\n"
11876 "if (n == 1) {\n"
11877 "    printf(\"read: %s\\en\", p);\n"
11878 "    free(p);\n"
11879 "} else if (errno != 0) {\n"
11880 "    perror(\"scanf\");\n"
11881 "} else {\n"
11882 "    fprintf(stderr, \"No matching characters\\en\");\n"
11883 "}\n"
11884
11885 #. type: Plain text
11886 #: build/C/man3/scanf.3:715
11887 msgid ""
11888 "As shown in the above example, it is necessary to call B<free>(3)  only if "
11889 "the B<scanf>()  call successfully read a string."
11890 msgstr ""
11891 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11892 "B<free>(3)  を呼び出す必要がある。"
11893
11894 #. type: Plain text
11895 #: build/C/man3/scanf.3:722
11896 msgid ""
11897 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11898 "B<strtoul>(3)"
11899 msgstr ""
11900 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11901 "B<strtoul>(3),"
11902
11903 #. type: TH
11904 #: build/C/man3/setbuf.3:48
11905 #, no-wrap
11906 msgid "SETBUF"
11907 msgstr "SETBUF"
11908
11909 #. type: TH
11910 #: build/C/man3/setbuf.3:48
11911 #, no-wrap
11912 msgid "2012-08-03"
11913 msgstr "2012-08-03"
11914
11915 #. type: Plain text
11916 #: build/C/man3/setbuf.3:51
11917 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11918 msgstr ""
11919 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11920
11921 #. type: Plain text
11922 #: build/C/man3/setbuf.3:56
11923 #, no-wrap
11924 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11925 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11926
11927 #. type: Plain text
11928 #: build/C/man3/setbuf.3:58
11929 #, no-wrap
11930 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11931 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11932
11933 #. type: Plain text
11934 #: build/C/man3/setbuf.3:60
11935 #, no-wrap
11936 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11937 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11938
11939 #. type: Plain text
11940 #: build/C/man3/setbuf.3:63
11941 #, no-wrap
11942 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11943 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11944
11945 #. type: Plain text
11946 #: build/C/man3/setbuf.3:73
11947 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11948 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11949
11950 #. type: Plain text
11951 #: build/C/man3/setbuf.3:96
11952 msgid ""
11953 "The three types of buffering available are unbuffered, block buffered, and "
11954 "line buffered.  When an output stream is unbuffered, information appears on "
11955 "the destination file or terminal as soon as written; when it is block "
11956 "buffered many characters are saved up and written as a block; when it is "
11957 "line buffered characters are saved up until a newline is output or input is "
11958 "read from any stream attached to a terminal device (typically I<stdin>).  "
11959 "The function B<fflush>(3)  may be used to force the block out early.  (See "
11960 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
11961 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
11962 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
11963 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
11964 "by default."
11965 msgstr ""
11966 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
11967 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
11968 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
11969 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
11970 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
11971 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
11972 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
11973 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
11974 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
11975 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
11976 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
11977 "unbuffered である。"
11978
11979 #. type: Plain text
11980 #: build/C/man3/setbuf.3:103
11981 msgid ""
11982 "The B<setvbuf>()  function may be used on any open stream to change its "
11983 "buffer.  The I<mode> argument must be one of the following three macros:"
11984 msgstr ""
11985 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
11986 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
11987
11988 #. type: TP
11989 #: build/C/man3/setbuf.3:104
11990 #, no-wrap
11991 msgid "B<_IONBF>"
11992 msgstr "B<_IONBF>"
11993
11994 #. type: Plain text
11995 #: build/C/man3/setbuf.3:107
11996 msgid "unbuffered"
11997 msgstr "unbuffered"
11998
11999 #. type: TP
12000 #: build/C/man3/setbuf.3:107
12001 #, no-wrap
12002 msgid "B<_IOLBF>"
12003 msgstr "B<_IOLBF>"
12004
12005 #. type: Plain text
12006 #: build/C/man3/setbuf.3:110
12007 msgid "line buffered"
12008 msgstr "line buffered"
12009
12010 #. type: TP
12011 #: build/C/man3/setbuf.3:110
12012 #, no-wrap
12013 msgid "B<_IOFBF>"
12014 msgstr "B<_IOFBF>"
12015
12016 #. type: Plain text
12017 #: build/C/man3/setbuf.3:113
12018 msgid "fully buffered"
12019 msgstr "fully buffered"
12020
12021 #. type: Plain text
12022 #: build/C/man3/setbuf.3:129
12023 msgid ""
12024 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
12025 "least I<size> bytes long; this buffer will be used instead of the current "
12026 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
12027 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
12028 "()  function may be used only after opening a stream and before any other "
12029 "operations have been performed on it."
12030 msgstr ""
12031 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
12032 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
12033 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
12034 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
12035 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
12036
12037 #. type: Plain text
12038 #: build/C/man3/setbuf.3:135
12039 msgid ""
12040 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
12041 "().  The B<setbuf>()  function is exactly equivalent to the call"
12042 msgstr ""
12043 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
12044 "B<setbuf>()  関数は、"
12045
12046 #. type: Plain text
12047 #: build/C/man3/setbuf.3:138
12048 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12049 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12050
12051 #. type: Plain text
12052 #: build/C/man3/setbuf.3:148
12053 msgid ""
12054 "The B<setbuffer>()  function is the same, except that the size of the buffer "
12055 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
12056 "The B<setlinebuf>()  function is exactly equivalent to the call:"
12057 msgstr ""
12058 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
12059 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
12060 "は以下と同じである。"
12061
12062 #. type: Plain text
12063 #: build/C/man3/setbuf.3:151
12064 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
12065 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
12066
12067 #. type: Plain text
12068 #: build/C/man3/setbuf.3:162
12069 msgid ""
12070 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
12071 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
12072 "I<errno> on failure."
12073 msgstr ""
12074 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
12075 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
12076 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
12077
12078 #. type: Plain text
12079 #: build/C/man3/setbuf.3:164
12080 msgid "The other functions do not return a value."
12081 msgstr "その他の関数は値を返さない。"
12082
12083 #. type: Plain text
12084 #: build/C/man3/setbuf.3:170
12085 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
12086 msgstr ""
12087 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
12088
12089 #. type: Plain text
12090 #: build/C/man3/setbuf.3:180
12091 msgid ""
12092 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
12093 "versions of BSD before 4.2BSD, and are available under Linux since libc "
12094 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
12095 "buffer size and should be avoided."
12096 msgstr ""
12097 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
12098 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
12099 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
12100 "ズを使用するので、これも使うべきでない。"
12101
12102 #. type: Plain text
12103 #: build/C/man3/setbuf.3:187
12104 msgid ""
12105 "You must make sure that the space that I<buf> points to still exists by the "
12106 "time I<stream> is closed, which also happens at program termination.  For "
12107 "example, the following is invalid:"
12108 msgstr ""
12109 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
12110 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
12111 "な使い方は許されない:"
12112
12113 #. type: Plain text
12114 #: build/C/man3/setbuf.3:190
12115 #, no-wrap
12116 msgid "#include E<lt>stdio.hE<gt>\n"
12117 msgstr "#include E<lt>stdio.hE<gt>\n"
12118
12119 #. type: Plain text
12120 #: build/C/man3/setbuf.3:199
12121 #, no-wrap
12122 msgid ""
12123 "int\n"
12124 "main(void)\n"
12125 "{\n"
12126 "    char buf[BUFSIZ];\n"
12127 "    setbuf(stdin, buf);\n"
12128 "    printf(\"Hello, world!\\en\");\n"
12129 "    return 0;\n"
12130 "}\n"
12131 msgstr ""
12132 "int\n"
12133 "main(void)\n"
12134 "{\n"
12135 "    char buf[BUFSIZ];\n"
12136 "    setbuf(stdin, buf);\n"
12137 "    printf(\"Hello, world!\\en\");\n"
12138 "    return 0;\n"
12139 "}\n"
12140
12141 #. type: Plain text
12142 #: build/C/man3/setbuf.3:208
12143 msgid ""
12144 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12145 "(3), B<puts>(3)"
12146 msgstr ""
12147 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12148 "(3), B<puts>(3)"
12149
12150 #. type: TH
12151 #: build/C/man3/stdin.3:13
12152 #, no-wrap
12153 msgid "STDIN"
12154 msgstr "STDIN"
12155
12156 #. type: TH
12157 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
12158 #, no-wrap
12159 msgid "2008-07-14"
12160 msgstr "2008-07-14"
12161
12162 #. type: Plain text
12163 #: build/C/man3/stdin.3:16
12164 msgid "stdin, stdout, stderr - standard I/O streams"
12165 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
12166
12167 #. type: Plain text
12168 #: build/C/man3/stdin.3:23
12169 #, no-wrap
12170 msgid ""
12171 "B<extern FILE *>I<stdin>B<;>\n"
12172 "B<extern FILE *>I<stdout>B<;>\n"
12173 "B<extern FILE *>I<stderr>B<;>\n"
12174 msgstr ""
12175 "B<extern FILE *>I<stdin>B<;>\n"
12176 "B<extern FILE *>I<stdout>B<;>\n"
12177 "B<extern FILE *>I<stderr>B<;>\n"
12178
12179 #. type: Plain text
12180 #: build/C/man3/stdin.3:35
12181 msgid ""
12182 "Under normal circumstances every UNIX program has three streams opened for "
12183 "it when it starts up, one for input, one for output, and one for printing "
12184 "diagnostic or error messages.  These are typically attached to the user's "
12185 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
12186 "depending on what the parent process chose to set up.  (See also the "
12187 "\"Redirection\" section of B<sh>(1).)"
12188 msgstr ""
12189 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
12190 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
12191 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
12192 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
12193 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
12194
12195 #. type: Plain text
12196 #: build/C/man3/stdin.3:45
12197 msgid ""
12198 "The input stream is referred to as \"standard input\"; the output stream is "
12199 "referred to as \"standard output\"; and the error stream is referred to as "
12200 "\"standard error\".  These terms are abbreviated to form the symbols used to "
12201 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
12202 msgstr ""
12203 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
12204 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
12205 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
12206 "I<stdout>, I<stderr> である。"
12207
12208 #. type: Plain text
12209 #: build/C/man3/stdin.3:54
12210 msgid ""
12211 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
12212 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
12213 msgstr ""
12214 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
12215 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
12216
12217 #. type: Plain text
12218 #: build/C/man3/stdin.3:63
12219 msgid ""
12220 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
12221 "same underlying files may also be accessed using the raw UNIX file "
12222 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
12223 msgstr ""
12224 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
12225 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
12226 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
12227 "る。"
12228
12229 #. type: Plain text
12230 #: build/C/man3/stdin.3:82
12231 msgid ""
12232 "On program startup, the integer file descriptors associated with the streams "
12233 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
12234 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
12235 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
12236 "(3)  to one of these streams can change the file descriptor number "
12237 "associated with the stream.)"
12238 msgstr ""
12239 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
12240 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
12241 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
12242 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
12243 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
12244 "たファイルディスクリプタ の番号を変更することができる。)"
12245
12246 #. type: Plain text
12247 #: build/C/man3/stdin.3:95
12248 msgid ""
12249 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
12250 "unexpected results and should generally be avoided.  (For the masochistic "
12251 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
12252 "is supposed to work.)  A general rule is that file descriptors are handled "
12253 "in the kernel, while stdio is just a library.  This means for example, that "
12254 "after an B<exec>(3), the child inherits all open file descriptors, but all "
12255 "old streams have become inaccessible."
12256 msgstr ""
12257 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
12258 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
12259 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
12260 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
12261 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
12262 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
12263 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
12264
12265 #. type: Plain text
12266 #: build/C/man3/stdin.3:113
12267 msgid ""
12268 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
12269 "macros, assigning to them is nonportable.  The standard streams can be made "
12270 "to refer to different files with help of the library function B<freopen>(3), "
12271 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
12272 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
12273 "by normal program termination."
12274 msgstr ""
12275 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
12276 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
12277 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
12278 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
12279 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
12280 "グラムの正常終了によってクローズされる。"
12281
12282 #. type: Plain text
12283 #: build/C/man3/stdin.3:122
12284 msgid ""
12285 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
12286 "standard also stipulates that these three streams shall be open at program "
12287 "startup."
12288 msgstr ""
12289 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
12290 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
12291 "とが規定されている。"
12292
12293 #. type: Plain text
12294 #: build/C/man3/stdin.3:154
12295 msgid ""
12296 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
12297 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
12298 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
12299 "unexpected results, especially with debugging output.  The buffering mode of "
12300 "the standard streams (or any other stream)  can be changed using the "
12301 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
12302 "associated with a terminal, there may also be input buffering in the "
12303 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
12304 "terminal input is line buffered in the kernel.)  This kernel input handling "
12305 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
12306 "B<termios>(3)."
12307 msgstr ""
12308 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
12309 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
12310 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
12311 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
12312 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
12313 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
12314 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
12315 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
12316 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
12317 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
12318 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
12319 "B<termios>(3)  も参照すること。"
12320
12321 #. type: Plain text
12322 #: build/C/man3/stdin.3:160
12323 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12324 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12325
12326 #. type: TH
12327 #: build/C/man3/stdio.3:39
12328 #, no-wrap
12329 msgid "STDIO"
12330 msgstr "STDIO"
12331
12332 #. type: TH
12333 #: build/C/man3/stdio.3:39
12334 #, no-wrap
12335 msgid "2001-12-26"
12336 msgstr "2001-12-26"
12337
12338 #. type: Plain text
12339 #: build/C/man3/stdio.3:42
12340 msgid "stdio - standard input/output library functions"
12341 msgstr "stdio - 標準入出力ライブラリ関数"
12342
12343 #. type: Plain text
12344 #: build/C/man3/stdio.3:46
12345 msgid "B<FILE *>I<stdin>B<;>"
12346 msgstr "B<FILE *>I<stdin>B<;>"
12347
12348 #. type: Plain text
12349 #: build/C/man3/stdio.3:48
12350 msgid "B<FILE *>I<stdout>B<;>"
12351 msgstr "B<FILE *>I<stdout>B<;>"
12352
12353 #. type: Plain text
12354 #: build/C/man3/stdio.3:50
12355 msgid "B<FILE *>I<stderr>B<;>"
12356 msgstr "B<FILE *>I<stderr>B<;>"
12357
12358 #. type: Plain text
12359 #: build/C/man3/stdio.3:57
12360 msgid ""
12361 "The standard I/O library provides a simple and efficient buffered stream I/O "
12362 "interface.  Input and output is mapped into logical data streams and the "
12363 "physical I/O characteristics are concealed.  The functions and macros are "
12364 "listed below; more information is available from the individual man pages."
12365 msgstr ""
12366 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
12367 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
12368 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12369 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12370
12371 #. type: Plain text
12372 #: build/C/man3/stdio.3:80
12373 msgid ""
12374 "A stream is associated with an external file (which may be a physical "
12375 "device) by I<opening> a file, which may involve creating a new file.  "
12376 "Creating an existing file causes its former contents to be discarded.  If a "
12377 "file can support positioning requests (such as a disk file, as opposed to a "
12378 "terminal) then a I<file position indicator> associated with the stream is "
12379 "positioned at the start of the file (byte zero), unless the file is opened "
12380 "with append mode.  If append mode is used, it is unspecified whether the "
12381 "position indicator will be placed at the start or the end of the file.  The "
12382 "position indicator is maintained by subsequent reads, writes and positioning "
12383 "requests.  All input occurs as if the characters were read by successive "
12384 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12385 "characters were written by successive calls to the B<fputc>(3)  function."
12386 msgstr ""
12387 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12388 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12389 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12390 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12391 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12392 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12393 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12394 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12395 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12396 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12397 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12398 "字を書き込んだかのように行われる。"
12399
12400 #. type: Plain text
12401 #: build/C/man3/stdio.3:90
12402 msgid ""
12403 "A file is disassociated from a stream by I<closing> the file.  Output "
12404 "streams are flushed (any unwritten buffer contents are transferred to the "
12405 "host environment) before the stream is disassociated from the file.  The "
12406 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12407 "closed (garbage)."
12408 msgstr ""
12409 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12410 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12411 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12412 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12413 "確定になる (ゴミになってしまう)。"
12414
12415 #. type: Plain text
12416 #: build/C/man3/stdio.3:103
12417 msgid ""
12418 "A file may be subsequently reopened, by the same or another program "
12419 "execution, and its contents reclaimed or modified (if it can be repositioned "
12420 "at the start).  If the main function returns to its original caller, or the "
12421 "B<exit>(3)  function is called, all open files are closed (hence all output "
12422 "streams are flushed) before program termination.  Other methods of program "
12423 "termination, such as B<abort>(3)  do not bother about closing files properly."
12424 msgstr ""
12425 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12426 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12427 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12428 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12429 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12430 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12431 "保証はない。"
12432
12433 #. type: Plain text
12434 #: build/C/man3/stdio.3:119
12435 msgid ""
12436 "At program startup, three text streams are predefined and need not be opened "
12437 "explicitly: I<standard input> (for reading conventional input), I<standard "
12438 "output> (for writing conventional input), and I<standard error> (for writing "
12439 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12440 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12441 "the standard input and output streams are fully buffered if and only if the "
12442 "streams do not refer to an interactive device."
12443 msgstr ""
12444 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12445 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12446 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12447 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12448 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12449 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12450 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12451 "スを参照していなければ、 完全にバッファリングされている。"
12452
12453 #. type: Plain text
12454 #: build/C/man3/stdio.3:129
12455 msgid ""
12456 "Output streams that refer to terminal devices are always line buffered by "
12457 "default; pending output to such streams is written automatically whenever an "
12458 "input stream that refers to a terminal device is read.  In cases where a "
12459 "large amount of computation is done after printing part of a line on an "
12460 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12461 "going off and computing so that the output will appear."
12462 msgstr ""
12463 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12464 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12465 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12466 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12467 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12468 "必要がある。"
12469
12470 #. type: Plain text
12471 #: build/C/man3/stdio.3:143
12472 msgid ""
12473 "The I<stdio> library is a part of the library B<libc> and routines are "
12474 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12475 "SYNOPSIS sections of the following manual pages indicate which include files "
12476 "are to be used, what the compiler declaration for the function looks like "
12477 "and which external variables are of interest."
12478 msgstr ""
12479 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12480 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12481 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12482 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12483 "数が関係するのかが示されている。"
12484
12485 #.  Not on Linux: .BR fropen ,
12486 #.  Not on Linux: .BR fwopen ,
12487 #. type: Plain text
12488 #: build/C/man3/stdio.3:183
12489 msgid ""
12490 "The following are defined as macros; these names may not be reused without "
12491 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12492 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12493 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12494 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12495 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12496 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12497 "and B<putchar> exist and will be used if the macros definitions are "
12498 "explicitly removed."
12499 msgstr ""
12500 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12501 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12502 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12503 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12504 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12505 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12506 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12507 "示的に消去されている場合には、 これらを使用することになるだろう。"
12508
12509 #. type: SS
12510 #: build/C/man3/stdio.3:183
12511 #, no-wrap
12512 msgid "List of functions"
12513 msgstr "関数のリスト"
12514
12515 #. type: tbl table
12516 #: build/C/man3/stdio.3:188
12517 #, no-wrap
12518 msgid "Function\tDescription\n"
12519 msgstr "関数\t説明\n"
12520
12521 #. type: tbl table
12522 #: build/C/man3/stdio.3:189
12523 #, no-wrap
12524 msgid "_\n"
12525 msgstr "_\n"
12526
12527 #. type: tbl table
12528 #: build/C/man3/stdio.3:190
12529 #, no-wrap
12530 msgid "clearerr\tcheck and reset stream status\n"
12531 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12532
12533 #. type: tbl table
12534 #: build/C/man3/stdio.3:191
12535 #, no-wrap
12536 msgid "fclose\tclose a stream\n"
12537 msgstr "fclose\tストリームをクローズする\n"
12538
12539 #. type: tbl table
12540 #: build/C/man3/stdio.3:192
12541 #, no-wrap
12542 msgid "fdopen\tstream open functions\n"
12543 msgstr "fdopen\tストリームをオープンする\n"
12544
12545 #. type: tbl table
12546 #: build/C/man3/stdio.3:193
12547 #, no-wrap
12548 msgid "feof\tcheck and reset stream status\n"
12549 msgstr "feof\tストリームの状態の確認とリセット\n"
12550
12551 #. type: tbl table
12552 #: build/C/man3/stdio.3:194
12553 #, no-wrap
12554 msgid "ferror\tcheck and reset stream status\n"
12555 msgstr "ferror\tストリームの状態の確認とリセット\n"
12556
12557 #. type: tbl table
12558 #: build/C/man3/stdio.3:195
12559 #, no-wrap
12560 msgid "fflush\tflush a stream\n"
12561 msgstr "fflush\tストリームをフラッシュする\n"
12562
12563 #. type: tbl table
12564 #: build/C/man3/stdio.3:196
12565 #, no-wrap
12566 msgid "fgetc\tget next character or word from input stream\n"
12567 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12568
12569 #. type: tbl table
12570 #: build/C/man3/stdio.3:197
12571 #, no-wrap
12572 msgid "fgetpos\treposition a stream\n"
12573 msgstr "fgetpos\tストリームの位置を取得する\n"
12574
12575 #. type: tbl table
12576 #: build/C/man3/stdio.3:198
12577 #, no-wrap
12578 msgid "fgets\tget a line from a stream\n"
12579 msgstr "fgets\tストリームから行を取得する\n"
12580
12581 #. type: tbl table
12582 #: build/C/man3/stdio.3:199
12583 #, no-wrap
12584 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12585 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12586
12587 #. type: tbl table
12588 #: build/C/man3/stdio.3:200
12589 #, no-wrap
12590 msgid "fopen\tstream open functions\n"
12591 msgstr "fopen\tストリームをオープンする\n"
12592
12593 #. type: tbl table
12594 #: build/C/man3/stdio.3:201
12595 #, no-wrap
12596 msgid "fprintf\tformatted output conversion\n"
12597 msgstr "fprintf\t書式付き出力変換\n"
12598
12599 #. type: tbl table
12600 #: build/C/man3/stdio.3:202
12601 #, no-wrap
12602 msgid "fpurge\tflush a stream\n"
12603 msgstr "fpurge\tストリームをフラッシュする\n"
12604
12605 #. type: tbl table
12606 #: build/C/man3/stdio.3:203
12607 #, no-wrap
12608 msgid "fputc\toutput a character or word to a stream\n"
12609 msgstr "fputc\t文字または語をストリームに出力する\n"
12610
12611 #. type: tbl table
12612 #: build/C/man3/stdio.3:204
12613 #, no-wrap
12614 msgid "fputs\toutput a line to a stream\n"
12615 msgstr "fputs\t行をストリームに出力する\n"
12616
12617 #. type: tbl table
12618 #: build/C/man3/stdio.3:205
12619 #, no-wrap
12620 msgid "fread\tbinary stream input/output\n"
12621 msgstr "fread\tバイナリーストリーム入出力\n"
12622
12623 #. type: tbl table
12624 #: build/C/man3/stdio.3:206
12625 #, no-wrap
12626 msgid "freopen\tstream open functions\n"
12627 msgstr "freopen\tストリームをオープンする\n"
12628
12629 #. type: tbl table
12630 #: build/C/man3/stdio.3:207
12631 #, no-wrap
12632 msgid "fscanf\tinput format conversion\n"
12633 msgstr "fscanf\t書式付き入力変換\n"
12634
12635 #. type: tbl table
12636 #: build/C/man3/stdio.3:208
12637 #, no-wrap
12638 msgid "fseek\treposition a stream\n"
12639 msgstr "fseek\tストリームの位置指示子を移動する\n"
12640
12641 #. type: tbl table
12642 #: build/C/man3/stdio.3:209
12643 #, no-wrap
12644 msgid "fsetpos\treposition a stream\n"
12645 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12646
12647 #. type: tbl table
12648 #: build/C/man3/stdio.3:210
12649 #, no-wrap
12650 msgid "ftell\treposition a stream\n"
12651 msgstr "ftell\tストリームの位置を取得する\n"
12652
12653 #. type: tbl table
12654 #: build/C/man3/stdio.3:211
12655 #, no-wrap
12656 msgid "fwrite\tbinary stream input/output\n"
12657 msgstr "fwrite\tバイナリーストリーム入出力\n"
12658
12659 #. type: tbl table
12660 #: build/C/man3/stdio.3:212
12661 #, no-wrap
12662 msgid "getc\tget next character or word from input stream\n"
12663 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12664
12665 #. type: tbl table
12666 #: build/C/man3/stdio.3:213
12667 #, no-wrap
12668 msgid "getchar\tget next character or word from input stream\n"
12669 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12670
12671 #. type: tbl table
12672 #: build/C/man3/stdio.3:214
12673 #, no-wrap
12674 msgid "gets\tget a line from a stream\n"
12675 msgstr "gets\t行を入力ストリームから取得する\n"
12676
12677 #. type: tbl table
12678 #: build/C/man3/stdio.3:215
12679 #, no-wrap
12680 msgid "getw\tget next character or word from input stream\n"
12681 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12682
12683 #. type: tbl table
12684 #: build/C/man3/stdio.3:216
12685 #, no-wrap
12686 msgid "mktemp\tmake temporary filename (unique)\n"
12687 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12688
12689 #. type: tbl table
12690 #: build/C/man3/stdio.3:217
12691 #, no-wrap
12692 msgid "perror\tsystem error messages\n"
12693 msgstr "perror\tシステムエラーメッセージ\n"
12694
12695 #. type: tbl table
12696 #: build/C/man3/stdio.3:218
12697 #, no-wrap
12698 msgid "printf\tformatted output conversion\n"
12699 msgstr "printf\t書式付き出力変換\n"
12700
12701 #. type: tbl table
12702 #: build/C/man3/stdio.3:219
12703 #, no-wrap
12704 msgid "putc\toutput a character or word to a stream\n"
12705 msgstr "putc\t文字または語をストリームに出力する\n"
12706
12707 #. type: tbl table
12708 #: build/C/man3/stdio.3:220
12709 #, no-wrap
12710 msgid "putchar\toutput a character or word to a stream\n"
12711 msgstr "putchar\t文字または語をストリームに出力する\n"
12712
12713 #. type: tbl table
12714 #: build/C/man3/stdio.3:221
12715 #, no-wrap
12716 msgid "puts\toutput a line to a stream\n"
12717 msgstr "puts\t行をストリームに出力する\n"
12718
12719 #. type: tbl table
12720 #: build/C/man3/stdio.3:222
12721 #, no-wrap
12722 msgid "putw\toutput a character or word to a stream\n"
12723 msgstr "putw\t文字または語をストリームに出力する\n"
12724
12725 #. type: tbl table
12726 #: build/C/man3/stdio.3:223
12727 #, no-wrap
12728 msgid "remove\tremove directory entry\n"
12729 msgstr "remove\tディレクトリエントリを削除する\n"
12730
12731 #. type: tbl table
12732 #: build/C/man3/stdio.3:224
12733 #, no-wrap
12734 msgid "rewind\treposition a stream\n"
12735 msgstr "rewind\tストリームの位置指示子を移動する\n"
12736
12737 #. type: tbl table
12738 #: build/C/man3/stdio.3:225
12739 #, no-wrap
12740 msgid "scanf\tinput format conversion\n"
12741 msgstr "scanf\t書式付き入力変換\n"
12742
12743 #. type: tbl table
12744 #: build/C/man3/stdio.3:226
12745 #, no-wrap
12746 msgid "setbuf\tstream buffering operations\n"
12747 msgstr "setbuf\tストリームのバッファリングの操作\n"
12748
12749 #. type: tbl table
12750 #: build/C/man3/stdio.3:227
12751 #, no-wrap
12752 msgid "setbuffer\tstream buffering operations\n"
12753 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12754
12755 #. type: tbl table
12756 #: build/C/man3/stdio.3:228
12757 #, no-wrap
12758 msgid "setlinebuf\tstream buffering operations\n"
12759 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12760
12761 #. type: tbl table
12762 #: build/C/man3/stdio.3:229
12763 #, no-wrap
12764 msgid "setvbuf\tstream buffering operations\n"
12765 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12766
12767 #. type: tbl table
12768 #: build/C/man3/stdio.3:230
12769 #, no-wrap
12770 msgid "sprintf\tformatted output conversion\n"
12771 msgstr "sprintf\t書式付き出力変換\n"
12772
12773 #. type: tbl table
12774 #: build/C/man3/stdio.3:231
12775 #, no-wrap
12776 msgid "sscanf\tinput format conversion\n"
12777 msgstr "sscanf\t書式付き入力変換\n"
12778
12779 #. type: tbl table
12780 #: build/C/man3/stdio.3:232
12781 #, no-wrap
12782 msgid "strerror\tsystem error messages\n"
12783 msgstr "strerror\tシステムエラーメッセージ\n"
12784
12785 #. type: tbl table
12786 #: build/C/man3/stdio.3:233
12787 #, no-wrap
12788 msgid "sys_errlist\tsystem error messages\n"
12789 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12790
12791 #. type: tbl table
12792 #: build/C/man3/stdio.3:234
12793 #, no-wrap
12794 msgid "sys_nerr\tsystem error messages\n"
12795 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12796
12797 #. type: tbl table
12798 #: build/C/man3/stdio.3:235
12799 #, no-wrap
12800 msgid "tempnam\ttemporary file routines\n"
12801 msgstr "tempnam\tテンポラリファイルの操作\n"
12802
12803 #. type: tbl table
12804 #: build/C/man3/stdio.3:236
12805 #, no-wrap
12806 msgid "tmpfile\ttemporary file routines\n"
12807 msgstr "tmpfile\tテンポラリファイルの操作\n"
12808
12809 #. type: tbl table
12810 #: build/C/man3/stdio.3:237
12811 #, no-wrap
12812 msgid "tmpnam\ttemporary file routines\n"
12813 msgstr "tmpnam\tテンポラリファイルの操作\n"
12814
12815 #. type: tbl table
12816 #: build/C/man3/stdio.3:238
12817 #, no-wrap
12818 msgid "ungetc\tun-get character from input stream\n"
12819 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12820
12821 #. type: tbl table
12822 #: build/C/man3/stdio.3:239
12823 #, no-wrap
12824 msgid "vfprintf\tformatted output conversion\n"
12825 msgstr "vfprintf\t書式付き出力変換\n"
12826
12827 #. type: tbl table
12828 #: build/C/man3/stdio.3:240
12829 #, no-wrap
12830 msgid "vfscanf\tinput format conversion\n"
12831 msgstr "vfscanf\t書式付き入力変換\n"
12832
12833 #. type: tbl table
12834 #: build/C/man3/stdio.3:241
12835 #, no-wrap
12836 msgid "vprintf\tformatted output conversion\n"
12837 msgstr "vprintf\t書式付き出力変換\n"
12838
12839 #. type: tbl table
12840 #: build/C/man3/stdio.3:242
12841 #, no-wrap
12842 msgid "vscanf\tinput format conversion\n"
12843 msgstr "vscanf\t書式付き入力変換\n"
12844
12845 #. type: tbl table
12846 #: build/C/man3/stdio.3:243
12847 #, no-wrap
12848 msgid "vsprintf\tformatted output conversion\n"
12849 msgstr "vsprintf\t書式付き出力変換\n"
12850
12851 #. type: tbl table
12852 #: build/C/man3/stdio.3:244
12853 #, no-wrap
12854 msgid "vsscanf\tinput format conversion\n"
12855 msgstr "vsscanf\t書式付き入力変換\n"
12856
12857 #. type: Plain text
12858 #: build/C/man3/stdio.3:250
12859 msgid "The I<stdio> library conforms to C89."
12860 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12861
12862 #. type: Plain text
12863 #: build/C/man3/stdio.3:257
12864 msgid ""
12865 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12866 "B<unlocked_stdio>(3)"
12867 msgstr ""
12868 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12869 "B<unlocked_stdio>(3)"
12870
12871 #. type: TH
12872 #: build/C/man3/stdio_ext.3:25
12873 #, no-wrap
12874 msgid "STDIO_EXT"
12875 msgstr "STDIO_EXT"
12876
12877 #. type: Plain text
12878 #: build/C/man3/stdio_ext.3:30
12879 msgid ""
12880 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12881 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12882 "structure"
12883 msgstr ""
12884 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12885 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12886 "へのインタフェース"
12887
12888 #. type: Plain text
12889 #: build/C/man3/stdio_ext.3:34
12890 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12891 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12892
12893 #. type: Plain text
12894 #: build/C/man3/stdio_ext.3:36
12895 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12896 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12897
12898 #. type: Plain text
12899 #: build/C/man3/stdio_ext.3:38
12900 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12901 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12902
12903 #. type: Plain text
12904 #: build/C/man3/stdio_ext.3:40
12905 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12906 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12907
12908 #. type: Plain text
12909 #: build/C/man3/stdio_ext.3:42
12910 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12911 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12912
12913 #. type: Plain text
12914 #: build/C/man3/stdio_ext.3:44
12915 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12916 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12917
12918 #. type: Plain text
12919 #: build/C/man3/stdio_ext.3:46
12920 msgid "B<int __freading(FILE *>I<stream>B<);>"
12921 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12922
12923 #. type: Plain text
12924 #: build/C/man3/stdio_ext.3:48
12925 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12926 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12927
12928 #. type: Plain text
12929 #: build/C/man3/stdio_ext.3:50
12930 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12931 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12932
12933 #. type: Plain text
12934 #: build/C/man3/stdio_ext.3:52
12935 msgid "B<void _flushlbf(void);>"
12936 msgstr "B<void _flushlbf(void);>"
12937
12938 #. type: Plain text
12939 #: build/C/man3/stdio_ext.3:54
12940 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12941 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12942
12943 #. type: Plain text
12944 #: build/C/man3/stdio_ext.3:59
12945 msgid ""
12946 "Solaris introduced routines to allow portable access to the internals of the "
12947 "I<FILE> structure, and glibc also implemented these."
12948 msgstr ""
12949 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
12950 "が導入されており、これらは glibc でも実装されている。"
12951
12952 #. type: Plain text
12953 #: build/C/man3/stdio_ext.3:64
12954 msgid ""
12955 "The B<__fbufsize>()  function returns the size of the buffer currently used "
12956 "by the given stream."
12957 msgstr ""
12958 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
12959 "す。"
12960
12961 #. type: Plain text
12962 #: build/C/man3/stdio_ext.3:71
12963 msgid ""
12964 "The B<__fpending>()  function returns the number of bytes in the output "
12965 "buffer.  For wide-oriented streams the unit is wide characters.  This "
12966 "function is undefined on buffers in reading mode, or opened read-only."
12967 msgstr ""
12968 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
12969 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
12970 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
12971 "は未定義である。"
12972
12973 #. type: Plain text
12974 #: build/C/man3/stdio_ext.3:76
12975 msgid ""
12976 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
12977 "buffered, and zero otherwise."
12978 msgstr ""
12979 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
12980 "場合は 0 を返す。"
12981
12982 #. type: Plain text
12983 #: build/C/man3/stdio_ext.3:81
12984 msgid ""
12985 "The B<__freadable>()  function returns a nonzero value if the stream allows "
12986 "reading, and zero otherwise."
12987 msgstr ""
12988 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
12989 "外の場合は 0 を返す。"
12990
12991 #. type: Plain text
12992 #: build/C/man3/stdio_ext.3:86
12993 msgid ""
12994 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
12995 "writing, and zero otherwise."
12996 msgstr ""
12997 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
12998 "外の場合は 0 を返す。"
12999
13000 #. type: Plain text
13001 #: build/C/man3/stdio_ext.3:92
13002 msgid ""
13003 "The B<__freading>()  function returns a nonzero value if the stream is read-"
13004 "only, or if the last operation on the stream was a read operation, and zero "
13005 "otherwise."
13006 msgstr ""
13007 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
13008 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
13009 "を返す。"
13010
13011 #. type: Plain text
13012 #: build/C/man3/stdio_ext.3:98
13013 msgid ""
13014 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
13015 "only (or append-only), or if the last operation on the stream was a write "
13016 "operation, and zero otherwise."
13017 msgstr ""
13018 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
13019 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
13020 "し、 それ以外の場合は 0 を返す。"
13021
13022 #. type: Plain text
13023 #: build/C/man3/stdio_ext.3:106
13024 msgid ""
13025 "The B<__fsetlocking>()  function can be used to select the desired type of "
13026 "locking on the stream.  It returns the current type.  The I<type> argument "
13027 "can take the following three values:"
13028 msgstr ""
13029 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
13030 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
13031 "ることができる :"
13032
13033 #. type: TP
13034 #: build/C/man3/stdio_ext.3:106
13035 #, no-wrap
13036 msgid "B<FSETLOCKING_INTERNAL>"
13037 msgstr "B<FSETLOCKING_INTERNAL>"
13038
13039 #. type: Plain text
13040 #: build/C/man3/stdio_ext.3:111
13041 msgid ""
13042 "Perform implicit locking around every operation on the given stream (except "
13043 "for the *_unlocked ones).  This is the default."
13044 msgstr ""
13045 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
13046 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
13047 "である)。 これがデフォルトのロック形式である。"
13048
13049 #. type: TP
13050 #: build/C/man3/stdio_ext.3:111
13051 #, no-wrap
13052 msgid "B<FSETLOCKING_BYCALLER>"
13053 msgstr "B<FSETLOCKING_BYCALLER>"
13054
13055 #. type: Plain text
13056 #: build/C/man3/stdio_ext.3:118
13057 msgid ""
13058 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
13059 "case there is more than one thread), and the stdio routines will not do "
13060 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
13061 msgstr ""
13062 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
13063 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
13064 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
13065 "理を行わない。"
13066
13067 #. type: TP
13068 #: build/C/man3/stdio_ext.3:118
13069 #, no-wrap
13070 msgid "B<FSETLOCKING_QUERY>"
13071 msgstr "B<FSETLOCKING_QUERY>"
13072
13073 #. type: Plain text
13074 #: build/C/man3/stdio_ext.3:122
13075 msgid "Don't change the type of locking.  (Only return it.)"
13076 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
13077
13078 #. type: Plain text
13079 #: build/C/man3/stdio_ext.3:128
13080 msgid ""
13081 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
13082 "so that output to a terminal is forced out, say before reading keyboard "
13083 "input.)"
13084 msgstr ""
13085 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
13086 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
13087 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
13088 "いだろう)"
13089
13090 #. type: Plain text
13091 #: build/C/man3/stdio_ext.3:132
13092 msgid ""
13093 "The B<__fpurge>()  function discards the contents of the stream's buffer."
13094 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
13095
13096 #. type: Plain text
13097 #: build/C/man3/stdio_ext.3:141
13098 msgid ""
13099 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
13100 "functions do not lock the stream, so they are not thread-safe."
13101 msgstr ""
13102
13103 #. type: Plain text
13104 #: build/C/man3/stdio_ext.3:151
13105 msgid ""
13106 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13107 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
13108 msgstr ""
13109
13110 #. type: Plain text
13111 #: build/C/man3/stdio_ext.3:154
13112 msgid "B<flockfile>(3), B<fpurge>(3)"
13113 msgstr "B<flockfile>(3), B<fpurge>(3)"
13114
13115 #. type: TH
13116 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
13117 #, no-wrap
13118 msgid "SYMLINK"
13119 msgstr "SYMLINK"
13120
13121 #. type: Plain text
13122 #: build/C/man2/symlink.2:35
13123 msgid "symlink - make a new name for a file"
13124 msgstr "symlink - ファイルに新しい名前を付ける"
13125
13126 #. type: Plain text
13127 #: build/C/man2/symlink.2:39
13128 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13129 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13130
13131 #. type: Plain text
13132 #: build/C/man2/symlink.2:47
13133 msgid "B<symlink>():"
13134 msgstr "B<symlink>():"
13135
13136 #. type: Plain text
13137 #: build/C/man2/symlink.2:58
13138 msgid ""
13139 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
13140 "string I<oldpath>."
13141 msgstr ""
13142 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
13143 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
13144
13145 #. type: Plain text
13146 #: build/C/man2/symlink.2:62
13147 msgid ""
13148 "Symbolic links are interpreted at run time as if the contents of the link "
13149 "had been substituted into the path being followed to find a file or "
13150 "directory."
13151 msgstr ""
13152 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
13153 "スを辿ることで、 ファイルやディレクトリに到達する。"
13154
13155 #. type: Plain text
13156 #: build/C/man2/symlink.2:67
13157 msgid ""
13158 "Symbolic links may contain I<..> path components, which (if used at the "
13159 "start of the link) refer to the parent directories of that in which the link "
13160 "resides."
13161 msgstr ""
13162 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
13163 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
13164 "される。"
13165
13166 #. type: Plain text
13167 #: build/C/man2/symlink.2:71
13168 msgid ""
13169 "A symbolic link (also known as a soft link) may point to an existing file or "
13170 "to a nonexistent one; the latter case is known as a dangling link."
13171 msgstr ""
13172 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
13173 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
13174 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
13175
13176 #. type: Plain text
13177 #: build/C/man2/symlink.2:78
13178 msgid ""
13179 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
13180 "when following the link, but is checked when removal or renaming of the link "
13181 "is requested and the link is in a directory with the sticky bit "
13182 "(B<S_ISVTX>)  set."
13183 msgstr ""
13184 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
13185 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
13186 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
13187 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
13188
13189 #. type: Plain text
13190 #: build/C/man2/symlink.2:99
13191 msgid ""
13192 "Write access to the directory containing I<newpath> is denied, or one of the "
13193 "directories in the path prefix of I<newpath> did not allow search "
13194 "permission.  (See also B<path_resolution>(7).)"
13195 msgstr ""
13196 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
13197 "含まれているディレクトリのどれかに検索許可が与えられていない "
13198 "(B<path_resolution>(7)  も参照すること)。"
13199
13200 #. type: Plain text
13201 #: build/C/man2/symlink.2:104
13202 msgid ""
13203 "The user's quota of resources on the file system has been exhausted.  The "
13204 "resources could be inodes or disk blocks, depending on the file system "
13205 "implementation."
13206 msgstr ""
13207 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
13208 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
13209 "依存である。"
13210
13211 #. type: Plain text
13212 #: build/C/man2/symlink.2:118
13213 msgid "Too many symbolic links were encountered in resolving I<newpath>."
13214 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13215
13216 #. type: Plain text
13217 #: build/C/man2/symlink.2:128
13218 msgid ""
13219 "A directory component in I<newpath> does not exist or is a dangling symbolic "
13220 "link, or I<oldpath> is the empty string."
13221 msgstr ""
13222 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
13223 "I<oldpath> が空文字列である。"
13224
13225 #. type: Plain text
13226 #: build/C/man2/symlink.2:140
13227 msgid ""
13228 "A component used as a directory in I<newpath> is not, in fact, a directory."
13229 msgstr ""
13230 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
13231
13232 #. type: Plain text
13233 #: build/C/man2/symlink.2:145
13234 msgid ""
13235 "The file system containing I<newpath> does not support the creation of "
13236 "symbolic links."
13237 msgstr ""
13238 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
13239 "作成をサポートしていない。"
13240
13241 #. type: Plain text
13242 #: build/C/man2/symlink.2:149
13243 msgid "I<newpath> is on a read-only file system."
13244 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
13245
13246 #. type: Plain text
13247 #: build/C/man2/symlink.2:159
13248 msgid "No checking of I<oldpath> is done."
13249 msgstr "I<oldpath> についてのチェックは行なわれない。"
13250
13251 #. type: Plain text
13252 #: build/C/man2/symlink.2:164
13253 msgid ""
13254 "Deleting the name referred to by a symlink will actually delete the file "
13255 "(unless it also has other hard links).  If this behavior is not desired, use "
13256 "B<link>(2)."
13257 msgstr ""
13258 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
13259 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
13260 "場合は、 B<link>(2)  を使用すること。"
13261
13262 #. type: Plain text
13263 #: build/C/man2/symlink.2:176
13264 msgid ""
13265 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13266 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13267 "B<symlink>(7)"
13268 msgstr ""
13269 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13270 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13271 "B<symlink>(7)"
13272
13273 #. type: TH
13274 #: build/C/man7/symlink.7:36
13275 #, no-wrap
13276 msgid "2008-06-18"
13277 msgstr "2008-06-18"
13278
13279 #. type: Plain text
13280 #: build/C/man7/symlink.7:39
13281 msgid "symlink - symbolic link handling"
13282 msgstr ""
13283
13284 #. type: SH
13285 #: build/C/man7/symlink.7:39
13286 #, no-wrap
13287 msgid "SYMBOLIC LINK HANDLING"
13288 msgstr ""
13289
13290 #. type: Plain text
13291 #: build/C/man7/symlink.7:43
13292 msgid ""
13293 "Symbolic links are files that act as pointers to other files.  To understand "
13294 "their behavior, you must first understand how hard links work."
13295 msgstr ""
13296
13297 #. type: Plain text
13298 #: build/C/man7/symlink.7:59
13299 msgid ""
13300 "A hard link to a file is indistinguishable from the original file because it "
13301 "is a reference to the object underlying the original filename.  (To be "
13302 "precise: each of the hard links to a file is a reference to the same I<i-"
13303 "node number>, where an i-node number is an index into the i-node table, "
13304 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
13305 "Changes to a file are independent of the name used to reference the file.  "
13306 "Hard links may not refer to directories (to prevent the possibility of loops "
13307 "within the file system tree, which would confuse many programs)  and may not "
13308 "refer to files on different file systems (because i-node numbers are not "
13309 "unique across file systems)."
13310 msgstr ""
13311
13312 #. type: Plain text
13313 #: build/C/man7/symlink.7:66
13314 msgid ""
13315 "A symbolic link is a special type of file whose contents are a string that "
13316 "is the pathname another file, the file to which the link refers.  In other "
13317 "words, a symbolic link is a pointer to another name, and not to an "
13318 "underlying object.  For this reason, symbolic links may refer to directories "
13319 "and may cross file system boundaries."
13320 msgstr ""
13321
13322 #. type: Plain text
13323 #: build/C/man7/symlink.7:72
13324 msgid ""
13325 "There is no requirement that the pathname referred to by a symbolic link "
13326 "should exist.  A symbolic link that refers to a pathname that does not exist "
13327 "is said to be a I<dangling link>."
13328 msgstr ""
13329
13330 #. type: Plain text
13331 #: build/C/man7/symlink.7:84
13332 msgid ""
13333 "Because a symbolic link and its referenced object coexist in the file system "
13334 "name space, confusion can arise in distinguishing between the link itself "
13335 "and the referenced object.  On historical systems, commands and system calls "
13336 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
13337 "Rules for a more uniform approach, as they are implemented on Linux and "
13338 "other systems, are outlined here.  It is important that site-local "
13339 "applications also conform to these rules, so that the user interface can be "
13340 "as consistent as possible."
13341 msgstr ""
13342
13343 #. type: SS
13344 #: build/C/man7/symlink.7:84
13345 #, no-wrap
13346 msgid "Symbolic link ownership, permissions, and timestamps"
13347 msgstr ""
13348
13349 #. type: Plain text
13350 #: build/C/man7/symlink.7:92
13351 msgid ""
13352 "The owner and group of an existing symbolic link can be changed using "
13353 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
13354 "is when the link is being removed or renamed in a directory that has the "
13355 "sticky bit set (see B<stat>(2))."
13356 msgstr ""
13357
13358 #. type: Plain text
13359 #: build/C/man7/symlink.7:98
13360 msgid ""
13361 "The last access and last modification timestamps of a symbolic link can be "
13362 "changed using B<utimensat>(2)  or B<lutimes>(3)."
13363 msgstr ""
13364
13365 #.  Linux does not currently implement an lchmod(2).
13366 #.  The
13367 #.  4.4BSD
13368 #.  system differs from historical
13369 #.  4BSD
13370 #.  systems in that the system call
13371 #.  .BR chown (2)
13372 #.  has been changed to follow symbolic links.
13373 #.  The
13374 #.  .BR lchown (2)
13375 #.  system call was added later when the limitations of the new
13376 #.  .BR chown (2)
13377 #.  became apparent.
13378 #. type: Plain text
13379 #: build/C/man7/symlink.7:117
13380 msgid ""
13381 "On Linux, the permissions of a symbolic link are not used in any operations; "
13382 "the permissions are always 0777 (read, write, and execute for all user "
13383 "categories), and can't be changed."
13384 msgstr ""
13385
13386 #. type: SS
13387 #: build/C/man7/symlink.7:117
13388 #, no-wrap
13389 msgid "Handling of symbolic links by system calls and commands"
13390 msgstr ""
13391
13392 #. type: Plain text
13393 #: build/C/man7/symlink.7:132
13394 msgid ""
13395 "Symbolic links are handled either by operating on the link itself, or by "
13396 "operating on the object referred to by the link.  In the latter case, an "
13397 "application or system call is said to I<follow> the link.  Symbolic links "
13398 "may refer to other symbolic links, in which case the links are dereferenced "
13399 "until an object that is not a symbolic link is found, a symbolic link that "
13400 "refers to a file which does not exist is found, or a loop is detected.  "
13401 "(Loop detection is done by placing an upper limit on the number of links "
13402 "that may be followed, and an error results if this limit is exceeded.)"
13403 msgstr ""
13404
13405 #. type: Plain text
13406 #: build/C/man7/symlink.7:135
13407 msgid ""
13408 "There are three separate areas that need to be discussed.  They are as "
13409 "follows:"
13410 msgstr ""
13411
13412 #. type: IP
13413 #: build/C/man7/symlink.7:135
13414 #, no-wrap
13415 msgid "1."
13416 msgstr "1."
13417
13418 #. type: Plain text
13419 #: build/C/man7/symlink.7:137
13420 msgid "Symbolic links used as filename arguments for system calls."
13421 msgstr ""
13422
13423 #. type: IP
13424 #: build/C/man7/symlink.7:137
13425 #, no-wrap
13426 msgid "2."
13427 msgstr "2."
13428
13429 #. type: Plain text
13430 #: build/C/man7/symlink.7:140
13431 msgid ""
13432 "Symbolic links specified as command-line arguments to utilities that are not "
13433 "traversing a file tree."
13434 msgstr ""
13435
13436 #. type: IP
13437 #: build/C/man7/symlink.7:140
13438 #, no-wrap
13439 msgid "3."
13440 msgstr "3."
13441
13442 #. type: Plain text
13443 #: build/C/man7/symlink.7:144
13444 msgid ""
13445 "Symbolic links encountered by utilities that are traversing a file tree "
13446 "(either specified on the command line or encountered as part of the file "
13447 "hierarchy walk)."
13448 msgstr ""
13449
13450 #. type: SS
13451 #: build/C/man7/symlink.7:144
13452 #, no-wrap
13453 msgid "System calls"
13454 msgstr ""
13455
13456 #. type: Plain text
13457 #: build/C/man7/symlink.7:147
13458 msgid ""
13459 "The first area is symbolic links used as filename arguments for system calls."
13460 msgstr ""
13461
13462 #. type: Plain text
13463 #: build/C/man7/symlink.7:157
13464 msgid ""
13465 "Except as noted below, all system calls follow symbolic links.  For example, "
13466 "if there were a symbolic link I<slink> which pointed to a file named "
13467 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13468 "descriptor referring to the file I<afile>."
13469 msgstr ""
13470
13471 #.  Maybe one day: .BR fchownat (2)
13472 #. type: Plain text
13473 #: build/C/man7/symlink.7:207
13474 msgid ""
13475 "Various system calls do not follow links, and operate on the symbolic link "
13476 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13477 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13478 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13479 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13480 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13481 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13482 "(2), that library function also does not follow symbolic links.  When "
13483 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13484 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13485 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13486 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13487 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13488 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13489 "to allow either behavior in an implementation."
13490 msgstr ""
13491
13492 #. type: SS
13493 #: build/C/man7/symlink.7:207
13494 #, no-wrap
13495 msgid "Commands not traversing a file tree"
13496 msgstr ""
13497
13498 #. type: Plain text
13499 #: build/C/man7/symlink.7:210
13500 msgid ""
13501 "The second area is symbolic links, specified as command-line filename "
13502 "arguments, to commands which are not traversing a file tree."
13503 msgstr ""
13504
13505 #. type: Plain text
13506 #: build/C/man7/symlink.7:221
13507 msgid ""
13508 "Except as noted below, commands follow symbolic links named as command-line "
13509 "arguments.  For example, if there were a symbolic link I<slink> which "
13510 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13511 "contents of the file I<afile>."
13512 msgstr ""
13513
13514 #. type: Plain text
13515 #: build/C/man7/symlink.7:229
13516 msgid ""
13517 "It is important to realize that this rule includes commands which may "
13518 "optionally traverse file trees, e.g., the command I<chown file> is included "
13519 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13520 "traversal, is not.  (The latter is described in the third area, below.)"
13521 msgstr ""
13522
13523 #. type: Plain text
13524 #: build/C/man7/symlink.7:247
13525 msgid ""
13526 "If it is explicitly intended that the command operate on the symbolic link "
13527 "instead of following the symbolic link, e.g., it is desired that I<chown "
13528 "slink> change the ownership of the file that I<slink> is, whether it is a "
13529 "symbolic link or not, the I<-h> option should be used.  In the above "
13530 "example, I<chown root slink> would change the ownership of the file referred "
13531 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13532 "I<slink> itself."
13533 msgstr ""
13534
13535 #. type: Plain text
13536 #: build/C/man7/symlink.7:249
13537 msgid "There are some exceptions to this rule:"
13538 msgstr ""
13539
13540 #. type: Plain text
13541 #: build/C/man7/symlink.7:259
13542 msgid ""
13543 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13544 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13545 "the symbolic link references a file via a relative path, moving it to "
13546 "another directory may very well cause it to stop working, since the path may "
13547 "no longer be correct.)"
13548 msgstr ""
13549
13550 #. type: Plain text
13551 #: build/C/man7/symlink.7:289
13552 msgid ""
13553 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13554 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13555 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13556 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13557 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13558 "the only command where the I<-H> and I<-L> options affect its behavior even "
13559 "though it is not doing a walk of a file tree.)"
13560 msgstr ""
13561
13562 #. The 4.4BSD system differs from historical 4BSD systems in that the
13563 #. .BR chown (1)
13564 #. and
13565 #. .BR chgrp (1)
13566 #. commands follow symbolic links specified on the command line.
13567 #. type: Plain text
13568 #: build/C/man7/symlink.7:307
13569 msgid ""
13570 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13571 "command does not follow symbolic links named as argument by default.  The "
13572 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13573 "L> option is specified."
13574 msgstr ""
13575
13576 #. type: SS
13577 #: build/C/man7/symlink.7:307
13578 #, no-wrap
13579 msgid "Commands traversing a file tree"
13580 msgstr ""
13581
13582 #. type: Plain text
13583 #: build/C/man7/symlink.7:320
13584 msgid ""
13585 "The following commands either optionally or always traverse file trees: "
13586 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13587 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13588 msgstr ""
13589
13590 #. type: Plain text
13591 #: build/C/man7/symlink.7:324
13592 msgid ""
13593 "It is important to realize that the following rules apply equally to "
13594 "symbolic links encountered during the file tree traversal and symbolic links "
13595 "listed as command-line arguments."
13596 msgstr ""
13597
13598 #. type: Plain text
13599 #: build/C/man7/symlink.7:329
13600 msgid ""
13601 "The I<first rule> applies to symbolic links that reference files other than "
13602 "directories.  Operations that apply to symbolic links are performed on the "
13603 "links themselves, but otherwise the links are ignored."
13604 msgstr ""
13605
13606 #. type: Plain text
13607 #: build/C/man7/symlink.7:341
13608 msgid ""
13609 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13610 "symbolic links encountered in the tree traversal of I<directory>, because "
13611 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13612 "referred to by I<slink>."
13613 msgstr ""
13614
13615 #. type: Plain text
13616 #: build/C/man7/symlink.7:346
13617 msgid ""
13618 "The I<second rule> applies to symbolic links that refer to directories.  "
13619 "Symbolic links that refer to directories are never followed by default.  "
13620 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13621 "\" walk (where symbolic links the refer to directories are followed)."
13622 msgstr ""
13623
13624 #. type: Plain text
13625 #: build/C/man7/symlink.7:349
13626 msgid ""
13627 "Certain conventions are (should be) followed as consistently as possible by "
13628 "commands that perform file tree walks:"
13629 msgstr ""
13630
13631 #. type: Plain text
13632 #: build/C/man7/symlink.7:362
13633 msgid ""
13634 "A command can be made to follow any symbolic links named on the command "
13635 "line, regardless of the type of file they reference, by specifying the I<-H> "
13636 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13637 "name space look like the logical name space.  (Note, for commands that do "
13638 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13639 "R> flag is not also specified.)"
13640 msgstr ""
13641
13642 #. type: Plain text
13643 #: build/C/man7/symlink.7:378
13644 msgid ""
13645 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13646 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13647 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13648 "symbolic links specified on the command line to be dereferenced for the "
13649 "purposes of both the action to be performed and the tree walk, and it is as "
13650 "if the user had specified the name of the file to which the symbolic link "
13651 "pointed."
13652 msgstr ""
13653
13654 #. type: Plain text
13655 #: build/C/man7/symlink.7:392
13656 msgid ""
13657 "A command can be made to follow any symbolic links named on the command "
13658 "line, as well as any symbolic links encountered during the traversal, "
13659 "regardless of the type of file they reference, by specifying the I<-L> (for "
13660 "\"logical\") flag.  This flag is intended to make the entire name space look "
13661 "like the logical name space.  (Note, for commands that do not always do file "
13662 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13663 "also specified.)"
13664 msgstr ""
13665
13666 #. type: Plain text
13667 #: build/C/man7/symlink.7:407
13668 msgid ""
13669 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13670 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13671 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13672 "references.  In addition, if any symbolic links are encountered in any file "
13673 "tree that B<chown> traverses, they will be treated in the same fashion as "
13674 "I<slink>."
13675 msgstr ""
13676
13677 #. type: Plain text
13678 #: build/C/man7/symlink.7:414
13679 msgid ""
13680 "A command can be made to provide the default behavior by specifying the I<-"
13681 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13682 "space look like the physical name space."
13683 msgstr ""
13684
13685 #. type: Plain text
13686 #: build/C/man7/symlink.7:432
13687 msgid ""
13688 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13689 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13690 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13691 "once; the last one specified determines the command's behavior.  This is "
13692 "intended to permit you to alias commands to behave one way or the other, and "
13693 "then override that behavior on the command line."
13694 msgstr ""
13695
13696 #. type: Plain text
13697 #: build/C/man7/symlink.7:438
13698 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13699 msgstr ""
13700
13701 #. type: Plain text
13702 #: build/C/man7/symlink.7:451
13703 msgid ""
13704 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13705 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13706 "command does not support the I<-H>, I<-L>, or I<-P> options."
13707 msgstr ""
13708
13709 #. type: Plain text
13710 #: build/C/man7/symlink.7:471
13711 msgid ""
13712 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13713 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13714 "options, B<ls>(1)  will follow symbolic links specified on the command "
13715 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13716 "regardless of their type, whether specified on the command line or "
13717 "encountered in the tree walk."
13718 msgstr ""
13719
13720 #. type: Plain text
13721 #: build/C/man7/symlink.7:489
13722 msgid ""
13723 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13724 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13725 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13726 "B<path_resolution>(7)"
13727 msgstr ""
13728 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13729 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13730 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13731 "B<lutimes>(3), B<path_resolution>(7)"
13732
13733 #. type: TH
13734 #: build/C/man3/tempnam.3:25
13735 #, no-wrap
13736 msgid "TEMPNAM"
13737 msgstr "TEMPNAM"
13738
13739 #. type: Plain text
13740 #: build/C/man3/tempnam.3:28
13741 msgid "tempnam - create a name for a temporary file"
13742 msgstr "tempnam - テンポラリファイルの名前を作成する"
13743
13744 #. type: Plain text
13745 #: build/C/man3/tempnam.3:33
13746 #, no-wrap
13747 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13748 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13749
13750 #. type: Plain text
13751 #: build/C/man3/tempnam.3:42
13752 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13753 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13754
13755 #. type: Plain text
13756 #: build/C/man3/tempnam.3:56
13757 msgid ""
13758 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13759 "filename, and such that a file with this name did not exist when B<tempnam>"
13760 "()  checked.  The filename suffix of the pathname generated will start with "
13761 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13762 "directory prefix part of the pathname generated is required to be "
13763 "\"appropriate\" (often that at least implies writable)."
13764 msgstr ""
13765 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13766 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13767 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13768 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13769 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13770 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13771
13772 #. type: Plain text
13773 #: build/C/man3/tempnam.3:59
13774 msgid ""
13775 "Attempts to find an appropriate directory go through the following steps:"
13776 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13777
13778 #. type: TP
13779 #: build/C/man3/tempnam.3:59
13780 #, no-wrap
13781 msgid "a)"
13782 msgstr "a)"
13783
13784 #. type: Plain text
13785 #: build/C/man3/tempnam.3:65
13786 msgid ""
13787 "In case the environment variable B<TMPDIR> exists and contains the name of "
13788 "an appropriate directory, that is used."
13789 msgstr ""
13790 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13791 "ら、それを用いる。"
13792
13793 #. type: TP
13794 #: build/C/man3/tempnam.3:65
13795 #, no-wrap
13796 msgid "b)"
13797 msgstr "b)"
13798
13799 #. type: Plain text
13800 #: build/C/man3/tempnam.3:70
13801 msgid ""
13802 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13803 msgstr ""
13804 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13805 "る。"
13806
13807 #. type: TP
13808 #: build/C/man3/tempnam.3:70
13809 #, no-wrap
13810 msgid "c)"
13811 msgstr "c)"
13812
13813 #. type: Plain text
13814 #: build/C/man3/tempnam.3:77
13815 msgid ""
13816 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13817 "appropriate."
13818 msgstr ""
13819 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13820 "なら、それを用いる。"
13821
13822 #. type: TP
13823 #: build/C/man3/tempnam.3:77
13824 #, no-wrap
13825 msgid "d)"
13826 msgstr "d)"
13827
13828 #. type: Plain text
13829 #: build/C/man3/tempnam.3:80
13830 msgid "Finally an implementation-defined directory may be used."
13831 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13832
13833 #. type: Plain text
13834 #: build/C/man3/tempnam.3:87
13835 msgid ""
13836 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13837 "hence should be freed by B<free>(3)."
13838 msgstr ""
13839 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13840 "B<free>(3)  で解放すべきである。"
13841
13842 #. type: Plain text
13843 #: build/C/man3/tempnam.3:94
13844 #, fuzzy
13845 #| msgid ""
13846 #| "The B<tempnam>()  function returns a pointer to a unique temporary "
13847 #| "filename, or NULL if a unique name cannot be generated."
13848 msgid ""
13849 "On succes, the B<tempnam>()  function returns a pointer to a unique "
13850 "temporary filename.  It returns NULL if a unique name cannot be generated, "
13851 "with I<errno> set to indicate the cause of the error."
13852 msgstr ""
13853 "B<tempnam>()  関数は他と重ならないテンポラリファイル名へのポインタを返す。 他"
13854 "と重ならない名前が生成できなければ NULL を返す。"
13855
13856 #. type: Plain text
13857 #: build/C/man3/tempnam.3:98
13858 msgid "Allocation of storage failed."
13859 msgstr "保存領域の割り当てに失敗した。"
13860
13861 #. type: Plain text
13862 #: build/C/man3/tempnam.3:103
13863 msgid ""
13864 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13865 msgstr ""
13866 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13867 "る。"
13868
13869 #. type: Plain text
13870 #: build/C/man3/tempnam.3:122
13871 msgid ""
13872 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13873 "nevertheless possible that between the time that B<tempnam>()  returns a "
13874 "pathname, and the time that the program opens it, another program might "
13875 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13876 "This can lead to security holes.  To avoid such possibilities, use the "
13877 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13878 "B<mkstemp>(3)  or B<tmpfile>(3)."
13879 msgstr ""
13880 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13881 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13882 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13883 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13884 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13885 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13886 "B<tmpfile>(3)  を使うことである。"
13887
13888 #. type: Plain text
13889 #: build/C/man3/tempnam.3:130
13890 msgid ""
13891 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13892 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13893 "tmp> (and this is what glibc does)."
13894 msgstr ""
13895 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13896 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13897 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13898
13899 #. type: Plain text
13900 #: build/C/man3/tempnam.3:135
13901 msgid ""
13902 "Because it dynamically allocates memory used to return the pathname, "
13903 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13904 msgstr ""
13905 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13906 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13907
13908 #. type: Plain text
13909 #: build/C/man3/tempnam.3:148
13910 msgid ""
13911 "The B<tempnam>()  function generates a different string each time it is "
13912 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13913 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13914 msgstr ""
13915 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13916 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13917 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13918
13919 #. type: Plain text
13920 #: build/C/man3/tempnam.3:152
13921 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13922 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13923
13924 #. type: Plain text
13925 #: build/C/man3/tempnam.3:158
13926 msgid ""
13927 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13928 "upon failure to find a unique name."
13929 msgstr ""
13930 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13931 "ラー B<EEXIST> で失敗する。"
13932
13933 #. type: Plain text
13934 #: build/C/man3/tempnam.3:161
13935 msgid ""
13936 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13937 "accessibility of a directory is determined."
13938 msgstr ""
13939 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13940 "度のアクセス権限が必要なのかは指定されていない。"
13941
13942 #. type: Plain text
13943 #: build/C/man3/tempnam.3:168 build/C/man3/tmpnam.3:163
13944 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
13945 msgstr ""
13946 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
13947 "を使うこと。"
13948
13949 #. type: Plain text
13950 #: build/C/man3/tempnam.3:173
13951 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13952 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13953
13954 #. type: TH
13955 #: build/C/man3/tmpfile.3:31
13956 #, no-wrap
13957 msgid "TMPFILE"
13958 msgstr "TMPFILE"
13959
13960 #. type: Plain text
13961 #: build/C/man3/tmpfile.3:34
13962 msgid "tmpfile - create a temporary file"
13963 msgstr "tmpfile - テンポラリファイルを作成する"
13964
13965 #. type: Plain text
13966 #: build/C/man3/tmpfile.3:39
13967 #, no-wrap
13968 msgid "B<FILE *tmpfile(void);>\n"
13969 msgstr "B<FILE *tmpfile(void);>\n"
13970
13971 #. type: Plain text
13972 #: build/C/man3/tmpfile.3:47
13973 msgid ""
13974 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
13975 "write (w+b) mode.  The file will be automatically deleted when it is closed "
13976 "or the program terminates."
13977 msgstr ""
13978 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
13979 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
13980 "自動的に削除される。"
13981
13982 #. type: Plain text
13983 #: build/C/man3/tmpfile.3:56
13984 msgid ""
13985 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
13986 "filename cannot be generated or the unique file cannot be opened.  In the "
13987 "latter case, I<errno> is set to indicate the error."
13988 msgstr ""
13989 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
13990 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
13991 "I<errno> を設定する。"
13992
13993 #. type: Plain text
13994 #: build/C/man3/tmpfile.3:60
13995 msgid "Search permission denied for directory in file's path prefix."
13996 msgstr ""
13997 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
13998
13999 #. type: Plain text
14000 #: build/C/man3/tmpfile.3:63
14001 msgid "Unable to generate a unique filename."
14002 msgstr "ユニークなファイル名が作成できなかった。"
14003
14004 #. type: Plain text
14005 #: build/C/man3/tmpfile.3:66
14006 msgid "The call was interrupted by a signal."
14007 msgstr "呼び出しがシグナルによって中断された。"
14008
14009 #. type: Plain text
14010 #: build/C/man3/tmpfile.3:69
14011 msgid "Too many file descriptors in use by the process."
14012 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
14013
14014 #. type: Plain text
14015 #: build/C/man3/tmpfile.3:72
14016 msgid "Too many files open in the system."
14017 msgstr "システム全体でオープン可能なファイル数を超過した。"
14018
14019 #. type: Plain text
14020 #: build/C/man3/tmpfile.3:75
14021 msgid "There was no room in the directory to add the new filename."
14022 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
14023
14024 #. type: Plain text
14025 #: build/C/man3/tmpfile.3:78
14026 msgid "Read-only file system."
14027 msgstr "読みだし専用ファイルシステムである。"
14028
14029 #. type: Plain text
14030 #: build/C/man3/tmpfile.3:80
14031 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14032 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14033
14034 #. type: Plain text
14035 #: build/C/man3/tmpfile.3:86
14036 msgid ""
14037 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
14038 "stream cannot be opened."
14039 msgstr ""
14040 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
14041 "メッセージが書き出される、と規定されている。"
14042
14043 #. type: Plain text
14044 #: build/C/man3/tmpfile.3:97
14045 msgid ""
14046 "The standard does not specify the directory that B<tmpfile>()  will use.  "
14047 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
14048 "and if that fails the directory I</tmp>."
14049 msgstr ""
14050 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
14051 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
14052 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
14053
14054 #. type: Plain text
14055 #: build/C/man3/tmpfile.3:103
14056 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14057 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14058
14059 #. type: TH
14060 #: build/C/man3/tmpnam.3:27
14061 #, no-wrap
14062 msgid "TMPNAM"
14063 msgstr "TMPNAM"
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:83
14123 msgid ""
14124 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
14125 "safe if called with a NULL parameter."
14126 msgstr ""
14127
14128 #. type: Plain text
14129 #: build/C/man3/tmpnam.3:87
14130 msgid "The B<tmpnam_r>()  function is thread-safe."
14131 msgstr ""
14132
14133 #. type: Plain text
14134 #: build/C/man3/tmpnam.3:92
14135 msgid ""
14136 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
14137 "obsolete."
14138 msgstr ""
14139 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
14140 "定としている。"
14141
14142 #. type: Plain text
14143 #: build/C/man3/tmpnam.3:103
14144 msgid ""
14145 "The B<tmpnam>()  function generates a different string each time it is "
14146 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
14147 "the behavior is implementation defined."
14148 msgstr ""
14149 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
14150 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
14151
14152 #. type: Plain text
14153 #: build/C/man3/tmpnam.3:122
14154 msgid ""
14155 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
14156 "nevertheless possible that between the time that B<tmpnam>()  returns a "
14157 "pathname, and the time that the program opens it, another program might "
14158 "create that pathname using B<open>(2), or create it as a symbolic link.  "
14159 "This can lead to security holes.  To avoid such possibilities, use the "
14160 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
14161 "B<mkstemp>(3)  or B<tmpfile>(3)."
14162 msgstr ""
14163 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
14164 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
14165 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
14166 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
14167 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
14168 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
14169 "B<tmpfile>(3)  を使うことである。"
14170
14171 #. type: Plain text
14172 #: build/C/man3/tmpnam.3:130
14173 msgid ""
14174 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
14175 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
14176 "defined."
14177 msgstr ""
14178 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
14179 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
14180 "NULL 引き数で呼び出してはならない。"
14181
14182 #. type: Plain text
14183 #: build/C/man3/tmpnam.3:134
14184 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
14185 msgstr ""
14186 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
14187 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
14188 "扱いしている。"
14189
14190 #. type: Plain text
14191 #: build/C/man3/tmpnam.3:142
14192 #, no-wrap
14193 msgid ""
14194 "char *\n"
14195 "tmpnam_r(char *s)\n"
14196 "{\n"
14197 "    return s ? tmpnam(s) : NULL;\n"
14198 "}\n"
14199 msgstr ""
14200 "char *\n"
14201 "tmpnam_r(char *s)\n"
14202 "{\n"
14203 "    return s ? tmpnam(s) : NULL;\n"
14204 "}\n"
14205
14206 #. type: Plain text
14207 #: build/C/man3/tmpnam.3:156
14208 msgid ""
14209 "apparently as a warning not to use NULL.  A few systems implement it.  To "
14210 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
14211 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
14212 msgstr ""
14213 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
14214 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
14215 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
14216 "がある。"
14217
14218 #. type: Plain text
14219 #: build/C/man3/tmpnam.3:168
14220 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14221 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14222
14223 #. type: TH
14224 #: build/C/man2/unlink.2:32
14225 #, no-wrap
14226 msgid "UNLINK"
14227 msgstr "UNLINK"
14228
14229 #. type: TH
14230 #: build/C/man2/unlink.2:32
14231 #, no-wrap
14232 msgid "2011-09-15"
14233 msgstr "2011-09-15"
14234
14235 #. type: Plain text
14236 #: build/C/man2/unlink.2:35
14237 msgid "unlink - delete a name and possibly the file it refers to"
14238 msgstr ""
14239 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
14240
14241 #. type: Plain text
14242 #: build/C/man2/unlink.2:39
14243 msgid "B<int unlink(const char *>I<pathname>B<);>"
14244 msgstr "B<int unlink(const char *>I<pathname>B<);>"
14245
14246 #. type: Plain text
14247 #: build/C/man2/unlink.2:45
14248 msgid ""
14249 "B<unlink>()  deletes a name from the file system.  If that name was the last "
14250 "link to a file and no processes have the file open the file is deleted and "
14251 "the space it was using is made available for reuse."
14252 msgstr ""
14253 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
14254 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
14255 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
14256 "は再利用が可能になる。"
14257
14258 #. type: Plain text
14259 #: build/C/man2/unlink.2:49
14260 msgid ""
14261 "If the name was the last link to a file but any processes still have the "
14262 "file open the file will remain in existence until the last file descriptor "
14263 "referring to it is closed."
14264 msgstr ""
14265 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
14266 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
14267 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
14268 "ける。"
14269
14270 #. type: Plain text
14271 #: build/C/man2/unlink.2:51
14272 msgid "If the name referred to a symbolic link the link is removed."
14273 msgstr ""
14274 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
14275 "削除される。"
14276
14277 #. type: Plain text
14278 #: build/C/man2/unlink.2:55
14279 msgid ""
14280 "If the name referred to a socket, fifo or device the name for it is removed "
14281 "but processes which have the object open may continue to use it."
14282 msgstr ""
14283 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
14284 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
14285 "とができる。"
14286
14287 #. type: Plain text
14288 #: build/C/man2/unlink.2:71
14289 msgid ""
14290 "Write access to the directory containing I<pathname> is not allowed for the "
14291 "process's effective UID, or one of the directories in I<pathname> did not "
14292 "allow search permission.  (See also B<path_resolution>(7).)"
14293 msgstr ""
14294 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
14295 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
14296 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
14297 "と)。"
14298
14299 #. type: Plain text
14300 #: build/C/man2/unlink.2:80
14301 msgid ""
14302 "The file I<pathname> cannot be unlinked because it is being used by the "
14303 "system or another process; for example, it is a mount point or the NFS "
14304 "client software created it to represent an active but otherwise nameless "
14305 "inode (\"NFS silly renamed\")."
14306 msgstr ""
14307 "システムか別のプロセスがそのファイルを使用中のため、\n"
14308 "ファイル I<pathname> を unlink できない。\n"
14309 "例えば、そのファイルがマウントポイントの場合や、\n"
14310 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
14311 "名前なし inode (nameless inode) であることを示すために作成した\n"
14312 "場合 (\"NFS silly renamed\") などがある。"
14313
14314 #. type: Plain text
14315 #: build/C/man2/unlink.2:92
14316 msgid ""
14317 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
14318 "Linux since 2.1.132.)"
14319 msgstr ""
14320 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
14321 "で、Linux 2.1.132 以降で返される。)"
14322
14323 #. type: Plain text
14324 #: build/C/man2/unlink.2:96
14325 msgid "Too many symbolic links were encountered in translating I<pathname>."
14326 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
14327
14328 #. type: Plain text
14329 #: build/C/man2/unlink.2:106
14330 msgid ""
14331 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14332 "I<pathname> is empty."
14333 msgstr ""
14334 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
14335 "I<pathname> が空である。"
14336
14337 #. type: Plain text
14338 #: build/C/man2/unlink.2:114
14339 msgid ""
14340 "A component used as a directory in I<pathname> is not, in fact, a directory."
14341 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14342
14343 #. type: Plain text
14344 #: build/C/man2/unlink.2:123
14345 msgid ""
14346 "The system does not allow unlinking of directories, or unlinking of "
14347 "directories requires privileges that the calling process doesn't have.  "
14348 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14349 "B<EISDIR> for this case.)"
14350 msgstr ""
14351 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14352 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14353 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14354 "合には Linux は B<EISDIR> を返す。)"
14355
14356 #. type: TP
14357 #: build/C/man2/unlink.2:123
14358 #, no-wrap
14359 msgid "B<EPERM> (Linux only)"
14360 msgstr "B<EPERM> (Linux のみ)"
14361
14362 #. type: Plain text
14363 #: build/C/man2/unlink.2:126
14364 msgid "The file system does not allow unlinking of files."
14365 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14366
14367 #. type: Plain text
14368 #: build/C/man2/unlink.2:137
14369 msgid ""
14370 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14371 "and the process's effective UID is neither the UID of the file to be deleted "
14372 "nor that of the directory containing it, and the process is not privileged "
14373 "(Linux: does not have the B<CAP_FOWNER> capability)."
14374 msgstr ""
14375 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14376 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14377 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14378 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14379
14380 #. type: Plain text
14381 #: build/C/man2/unlink.2:141
14382 msgid "I<pathname> refers to a file on a read-only file system."
14383 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14384
14385 #. type: Plain text
14386 #: build/C/man2/unlink.2:161
14387 msgid ""
14388 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14389 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14390 "(7), B<symlink>(7)"
14391 msgstr ""
14392 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14393 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14394 "(7), B<symlink>(7)"
14395
14396 #. type: TH
14397 #: build/C/man3/unlocked_stdio.3:25
14398 #, no-wrap
14399 msgid "UNLOCKED_STDIO"
14400 msgstr "UNLOCKED_STDIO"
14401
14402 #. type: Plain text
14403 #: build/C/man3/unlocked_stdio.3:29
14404 msgid ""
14405 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14406 "nonlocking stdio functions"
14407 msgstr ""
14408 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14409 "わずに標準入出力を行う関数群"
14410
14411 #. type: Plain text
14412 #: build/C/man3/unlocked_stdio.3:37
14413 #, no-wrap
14414 msgid ""
14415 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14416 "B<int getchar_unlocked(void);>\n"
14417 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14418 "B<int putchar_unlocked(int >I<c>B<);>\n"
14419 msgstr ""
14420 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14421 "B<int getchar_unlocked(void);>\n"
14422 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14423 "B<int putchar_unlocked(int >I<c>B<);>\n"
14424
14425 #. type: Plain text
14426 #: build/C/man3/unlocked_stdio.3:49
14427 #, no-wrap
14428 msgid ""
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 msgstr ""
14441 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14442 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14443 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14444 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14445 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14446 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14447 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14448 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14449 "B<                      FILE *>I<stream>B<);>\n"
14450 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14451 "B<                      FILE *>I<stream>B<);>\n"
14452
14453 #. type: Plain text
14454 #: build/C/man3/unlocked_stdio.3:52
14455 #, no-wrap
14456 msgid ""
14457 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14458 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14459 msgstr ""
14460 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14461 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14462
14463 #. type: Plain text
14464 #: build/C/man3/unlocked_stdio.3:63
14465 #, no-wrap
14466 msgid ""
14467 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14468 "B<wint_t getwchar_unlocked(void);>\n"
14469 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14470 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14471 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14472 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14473 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14474 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14475 msgstr ""
14476 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14477 "B<wint_t getwchar_unlocked(void);>\n"
14478 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14479 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14480 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14481 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14482 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14483 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14484
14485 #. type: Plain text
14486 #: build/C/man3/unlocked_stdio.3:75
14487 msgid ""
14488 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14489 "B<putchar_unlocked>():"
14490 msgstr ""
14491 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14492 "B<putchar_unlocked>():"
14493
14494 #. type: Plain text
14495 #: build/C/man3/unlocked_stdio.3:78
14496 msgid ""
14497 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14498 "_BSD_SOURCE || _SVID_SOURCE"
14499 msgstr ""
14500 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14501 "_BSD_SOURCE || _SVID_SOURCE"
14502
14503 #. type: Plain text
14504 #: build/C/man3/unlocked_stdio.3:89
14505 msgid ""
14506 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14507 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14508 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14509 msgstr ""
14510 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14511 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14512 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14513
14514 #. type: Plain text
14515 #: build/C/man3/unlocked_stdio.3:91
14516 msgid "_BSD_SOURCE || _SVID_SOURCE"
14517 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14518
14519 #. type: Plain text
14520 #: build/C/man3/unlocked_stdio.3:102
14521 msgid ""
14522 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14523 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14524 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14525 msgstr ""
14526 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14527 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14528 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14529
14530 #. type: Plain text
14531 #: build/C/man3/unlocked_stdio.3:113
14532 msgid ""
14533 "Each of these functions has the same behavior as its counterpart without the "
14534 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14535 "locks themselves, and do not test for the presence of locks set by others) "
14536 "and hence are thread-unsafe.  See B<flockfile>(3)."
14537 msgstr ""
14538 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14539 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14540 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14541 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14542 "B<flockfile>(3)  を参照のこと。"
14543
14544 #. type: Plain text
14545 #: build/C/man3/unlocked_stdio.3:120
14546 msgid ""
14547 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14548 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14549 msgstr ""
14550 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14551 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14552
14553 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14554 #.  moved to a compatibility library.
14555 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14556 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14557 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14558 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14559 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14560 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14561 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14562 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14563 #.  ungetc_unlocked, ungetwc_unlocked.
14564 #. type: Plain text
14565 #: build/C/man3/unlocked_stdio.3:136
14566 msgid ""
14567 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14568 "are available in recent glibc.  They should probably not be used."
14569 msgstr ""
14570 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14571 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14572
14573 #. type: Plain text
14574 #: build/C/man3/unlocked_stdio.3:139
14575 msgid "B<flockfile>(3), B<stdio>(3)"
14576 msgstr "B<flockfile>(3), B<stdio>(3)"
14577
14578 #. type: TH
14579 #: build/C/man3/wprintf.3:16
14580 #, no-wrap
14581 msgid "WPRINTF"
14582 msgstr "WPRINTF"
14583
14584 #. type: TH
14585 #: build/C/man3/wprintf.3:16
14586 #, no-wrap
14587 msgid "2011-09-17"
14588 msgstr "2011-09-17"
14589
14590 #. type: Plain text
14591 #: build/C/man3/wprintf.3:20
14592 msgid ""
14593 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14594 "character output conversion"
14595 msgstr ""
14596 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14597 "フォーマットして出力する"
14598
14599 #. type: Plain text
14600 #: build/C/man3/wprintf.3:24
14601 #, no-wrap
14602 msgid ""
14603 "B<#include E<lt>stdio.hE<gt>>\n"
14604 "B<#include E<lt>wchar.hE<gt>>\n"
14605 msgstr ""
14606 "B<#include E<lt>stdio.hE<gt>>\n"
14607 "B<#include E<lt>wchar.hE<gt>>\n"
14608
14609 #. type: Plain text
14610 #: build/C/man3/wprintf.3:29
14611 #, no-wrap
14612 msgid ""
14613 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14614 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14615 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14616 "B<             const wchar_t *>I<format>B<, ...);>\n"
14617 msgstr ""
14618 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14619 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14620 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14621 "B<             const wchar_t *>I<format>B<, ...);>\n"
14622
14623 #. type: Plain text
14624 #: build/C/man3/wprintf.3:34
14625 #, no-wrap
14626 msgid ""
14627 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14628 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14629 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14630 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14631 msgstr ""
14632 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14633 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14634 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14635 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14636
14637 #.  .BR wprintf (),
14638 #.  .BR fwprintf (),
14639 #.  .BR swprintf (),
14640 #.  .BR vwprintf (),
14641 #.  .BR vfwprintf (),
14642 #.  .BR vswprintf ():
14643 #. type: Plain text
14644 #: build/C/man3/wprintf.3:51
14645 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14646 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14647
14648 #. type: Plain text
14649 #: build/C/man3/wprintf.3:53
14650 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14651 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14652
14653 #. type: Plain text
14654 #: build/C/man3/wprintf.3:55
14655 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14656 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14657
14658 #. type: Plain text
14659 #: build/C/man3/wprintf.3:58
14660 msgid "or I<cc\\ -std=c99>"
14661 msgstr "or I<cc\\ -std=c99>"
14662
14663 #. type: Plain text
14664 #: build/C/man3/wprintf.3:69
14665 msgid ""
14666 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14667 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14668 "characters."
14669 msgstr ""
14670 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14671 "版である。これらはワイド文字をフォーマットして出力する。"
14672
14673 #. type: Plain text
14674 #: build/C/man3/wprintf.3:81
14675 msgid ""
14676 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14677 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14678 "more information."
14679 msgstr ""
14680 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14681 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14682 "ること。"
14683
14684 #. type: Plain text
14685 #: build/C/man3/wprintf.3:93
14686 msgid ""
14687 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14688 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14689 "for more information."
14690 msgstr ""
14691 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14692 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14693 "B<fwide>(3)  を参照すること。"
14694
14695 #. type: Plain text
14696 #: build/C/man3/wprintf.3:107
14697 msgid ""
14698 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14699 "output to an array of wide characters.  The programmer must ensure that "
14700 "there is room for at least I<maxlen> wide characters at I<wcs>."
14701 msgstr ""
14702 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14703 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14704 "空きがあることを保証しなければ ならない。"
14705
14706 #. type: Plain text
14707 #: build/C/man3/wprintf.3:118
14708 msgid ""
14709 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14710 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14711 "following differences:"
14712 msgstr ""
14713 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14714 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14715
14716 #. type: TP
14717 #: build/C/man3/wprintf.3:118 build/C/man3/wprintf.3:123
14718 #: build/C/man3/wprintf.3:126
14719 #, no-wrap
14720 msgid "B<\\(bu>"
14721 msgstr "B<\\(bu>"
14722
14723 #. type: Plain text
14724 #: build/C/man3/wprintf.3:123
14725 msgid "The I<format> string is a wide-character string."
14726 msgstr "I<format> がワイド文字列で与えられる。"
14727
14728 #. type: Plain text
14729 #: build/C/man3/wprintf.3:126
14730 msgid "The output consists of wide characters, not bytes."
14731 msgstr "出力がバイトではなくワイド文字で構成される。"
14732
14733 #. type: Plain text
14734 #: build/C/man3/wprintf.3:145
14735 msgid ""
14736 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14737 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14738 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14739 "overflow on Linux.)"
14740 msgstr ""
14741 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14742 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14743 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14744 "も -1 を返さない)。"
14745
14746 #. type: Plain text
14747 #: build/C/man3/wprintf.3:151
14748 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14749 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14750
14751 #. type: Plain text
14752 #: build/C/man3/wprintf.3:165
14753 msgid ""
14754 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14755 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14756 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14757 "character) argument is written."
14758 msgstr ""
14759 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14760 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14761 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14762
14763 #. type: Plain text
14764 #: build/C/man3/wprintf.3:205
14765 #, fuzzy
14766 #| msgid ""
14767 #| "If no B<l> modifier is present: The I<const\\ char\\ *> argument is "
14768 #| "expected to be a pointer to an array of character type (pointer to a "
14769 #| "string) containing a multibyte character sequence beginning in the "
14770 #| "initial shift state.  Characters from the array are converted to wide "
14771 #| "characters (each by a call to the B<mbrtowc>(3)  function with a "
14772 #| "conversion state starting in the initial state before the first byte).  "
14773 #| "The resulting wide characters are written up to (but not including) the "
14774 #| "terminating null wide character.  If a precision is specified, no more "
14775 #| "wide characters than the number specified are written.  Note that the "
14776 #| "precision determines the number of I<wide characters> written, not the "
14777 #| "number of I<bytes> or I<screen positions>.  The array must contain a "
14778 #| "terminating null byte, unless a precision is given and it is so small "
14779 #| "that the number of converted wide characters reaches it before the end of "
14780 #| "the array is reached.  If an B<l> modifier is present: The I<const\\ "
14781 #| "wchar_t\\ *> argument is expected to be a pointer to an array of wide "
14782 #| "characters.  Wide characters from the array are written up to (but not "
14783 #| "including) a terminating null wide character.  If a precision is "
14784 #| "specified, no more than the number specified are written.  The array must "
14785 #| "contain a terminating null wide character, unless a precision is given "
14786 #| "and it is smaller than or equal to the number of wide characters in the "
14787 #| "array."
14788 msgid ""
14789 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14790 "to be a pointer to an array of character type (pointer to a string) "
14791 "containing a multibyte character sequence beginning in the initial shift "
14792 "state.  Characters from the array are converted to wide characters (each by "
14793 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14794 "the initial state before the first byte).  The resulting wide characters are "
14795 "written up to (but not including) the terminating null wide character (L\\(aq"
14796 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
14797 "number specified are written.  Note that the precision determines the number "
14798 "of I<wide characters> written, not the number of I<bytes> or I<screen "
14799 "positions>.  The array must contain a terminating null byte (\\(aq"
14800 "\\e0\\(aq), unless a precision is given and it is so small that the number "
14801 "of converted wide characters reaches it before the end of the array is "
14802 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
14803 "argument is expected to be a pointer to an array of wide characters.  Wide "
14804 "characters from the array are written up to (but not including) a "
14805 "terminating null wide character.  If a precision is specified, no more than "
14806 "the number specified are written.  The array must contain a terminating null "
14807 "wide character, unless a precision is given and it is smaller than or equal "
14808 "to the number of wide characters in the array."
14809 msgstr ""
14810 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14811 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14812 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14813 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14814 "字は終端の ナルワイド文字の手前までが書き込まれる。精度(precision)が指定され"
14815 "た 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込まれ"
14816 "る I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字> の数を指定することに"
14817 "注意すること。 精度がない場合には配列の終端にナル文字を含む必要がある。 精度"
14818 "を指定する場合には、配列の最後に到着する前に変換されたワイド文字の 数がそれに"
14819 "到達するよう、精度は十分に小さな数でなければならない。 もし B<l> 修飾子が存在"
14820 "する場合、 I<const\\ wchar_t\\ *> 引き数はワイド文字の配列へのポインタとみな"
14821 "される。 配列のワイド文字列は終端のナルワイド文字の手間まで出力される。 もし"
14822 "精度が指定された場合には指定された精度以上の文字は出力されない。 精度を指定し"
14823 "ない場合には終端のナルワイド文字を含む必要がある。 精度を指定する場合にはそれ"
14824 "はワイド文字の配列の大きさよりも小さくな ければならない。"
14825
14826 #. type: Plain text
14827 #: build/C/man3/wprintf.3:213
14828 msgid ""
14829 "The functions return the number of wide characters written, excluding the "
14830 "terminating null wide character in case of the functions B<swprintf>()  and "
14831 "B<vswprintf>().  They return -1 when an error occurs."
14832 msgstr ""
14833 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14834 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14835 "場合は -1 を返す。"
14836
14837 #. type: Plain text
14838 #: build/C/man3/wprintf.3:215
14839 msgid "C99."
14840 msgstr "C99."
14841
14842 #. type: Plain text
14843 #: build/C/man3/wprintf.3:223
14844 msgid ""
14845 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14846 "the current locale."
14847 msgstr ""
14848 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14849
14850 #. type: Plain text
14851 #: build/C/man3/wprintf.3:253
14852 msgid ""
14853 "If the I<format> string contains non-ASCII wide characters, the program will "
14854 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
14855 "time is the same as the B<LC_CTYPE> category of the current locale at "
14856 "compile time.  This is because the I<wchar_t> representation is platform- "
14857 "and locale-dependent.  (The glibc represents wide characters using their "
14858 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14859 "the use of C99 universal character names of the form \\eunnnn does not solve "
14860 "this problem.)  Therefore, in internationalized programs, the I<format> "
14861 "string should consist of ASCII wide characters only, or should be "
14862 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14863 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14864 msgstr ""
14865 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14866 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14867 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14868 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14869 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14870 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14871 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14872 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14873 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14874
14875 #.  .BR wscanf (3)
14876 #. type: Plain text
14877 #: build/C/man3/wprintf.3:260
14878 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14879 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14880
14881 #. type: TH
14882 #: build/C/man2/write.2:39
14883 #, no-wrap
14884 msgid "WRITE"
14885 msgstr "WRITE"
14886
14887 #. type: Plain text
14888 #: build/C/man2/write.2:42
14889 msgid "write - write to a file descriptor"
14890 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14891
14892 #. type: Plain text
14893 #: build/C/man2/write.2:46
14894 msgid ""
14895 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14896 msgstr ""
14897 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14898
14899 #. type: Plain text
14900 #: build/C/man2/write.2:54
14901 msgid ""
14902 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14903 "the file referred to by the file descriptor I<fd>."
14904 msgstr ""
14905 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14906 "照するファイルへ、最大 I<count> バイトを書き込む。"
14907
14908 #. type: Plain text
14909 #: build/C/man2/write.2:68
14910 msgid ""
14911 "The number of bytes written may be less than I<count> if, for example, there "
14912 "is insufficient space on the underlying physical medium, or the "
14913 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14914 "call was interrupted by a signal handler after having written less than "
14915 "I<count> bytes.  (See also B<pipe>(7).)"
14916 msgstr ""
14917 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14918 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14919 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14920 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14921 "(7)  も参照のこと。)"
14922
14923 #. type: Plain text
14924 #: build/C/man2/write.2:82
14925 msgid ""
14926 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14927 "example, a regular file)  writing takes place at the current file offset, "
14928 "and the file offset is incremented by the number of bytes actually written.  "
14929 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14930 "to the end of the file before writing.  The adjustment of the file offset "
14931 "and the write operation are performed as an atomic step."
14932 msgstr ""
14933 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14934 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14935 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14936 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14937 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14938 "処理として 実行される。"
14939
14940 #. type: Plain text
14941 #: build/C/man2/write.2:89
14942 msgid ""
14943 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14944 "B<write>()  has returned returns the new data.  Note that not all file "
14945 "systems are POSIX conforming."
14946 msgstr ""
14947 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14948 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14949 "ること。"
14950
14951 #. type: Plain text
14952 #: build/C/man2/write.2:94
14953 msgid ""
14954 "On success, the number of bytes written is returned (zero indicates nothing "
14955 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14956 msgstr ""
14957 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14958 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
14959
14960 #. type: Plain text
14961 #: build/C/man2/write.2:107
14962 msgid ""
14963 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
14964 "return a failure status if one of the errors below is detected.  If no "
14965 "errors are detected, 0 will be returned without causing any other effect.  "
14966 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
14967 "the results are not specified."
14968 msgstr ""
14969 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
14970 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
14971 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
14972 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
14973 "その結果は規定されていない。"
14974
14975 #. type: Plain text
14976 #: build/C/man2/write.2:115
14977 msgid ""
14978 "The file descriptor I<fd> refers to a file other than a socket and has been "
14979 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
14980 msgstr ""
14981 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
14982 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
14983 "する状況にある。"
14984
14985 #.  Actually EAGAIN on Linux
14986 #. type: Plain text
14987 #: build/C/man2/write.2:126
14988 msgid ""
14989 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
14990 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
14991 "error to be returned for this case, and does not require these constants to "
14992 "have the same value, so a portable application should check for both "
14993 "possibilities."
14994 msgstr ""
14995 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
14996 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
14997 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
14998 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
14999 "プリケーションでは、両方の可能性を 確認すべきである。"
15000
15001 #. type: Plain text
15002 #: build/C/man2/write.2:130
15003 msgid "I<fd> is not a valid file descriptor or is not open for writing."
15004 msgstr ""
15005 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
15006 "されていない。"
15007
15008 #. type: TP
15009 #: build/C/man2/write.2:130
15010 #, no-wrap
15011 msgid "B<EDESTADDRREQ>"
15012 msgstr "B<EDESTADDRREQ>"
15013
15014 #. type: Plain text
15015 #: build/C/man2/write.2:135
15016 msgid ""
15017 "I<fd> refers to a datagram socket for which a peer address has not been set "
15018 "using B<connect>(2)."
15019 msgstr ""
15020 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
15021 "グラムソケットを 参照している。"
15022
15023 #. type: Plain text
15024 #: build/C/man2/write.2:141
15025 msgid ""
15026 "The user's quota of disk blocks on the file system containing the file "
15027 "referred to by I<fd> has been exhausted."
15028 msgstr ""
15029 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
15030 "クォータの上限に達している。"
15031
15032 #. type: Plain text
15033 #: build/C/man2/write.2:150
15034 msgid ""
15035 "An attempt was made to write a file that exceeds the implementation-defined "
15036 "maximum file size or the process's file size limit, or to write at a "
15037 "position past the maximum allowed offset."
15038 msgstr ""
15039 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
15040 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
15041 "書き込もうとした。"
15042
15043 #. type: Plain text
15044 #: build/C/man2/write.2:154
15045 msgid ""
15046 "The call was interrupted by a signal before any data was written; see "
15047 "B<signal>(7)."
15048 msgstr ""
15049 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
15050 "(7)  参照。"
15051
15052 #. type: Plain text
15053 #: build/C/man2/write.2:165
15054 msgid ""
15055 "I<fd> is attached to an object which is unsuitable for writing; or the file "
15056 "was opened with the B<O_DIRECT> flag, and either the address specified in "
15057 "I<buf>, the value specified in I<count>, or the current file offset is not "
15058 "suitably aligned."
15059 msgstr ""
15060 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
15061 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
15062 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
15063 "メントが不適切である。"
15064
15065 #. type: Plain text
15066 #: build/C/man2/write.2:168
15067 msgid "A low-level I/O error occurred while modifying the inode."
15068 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
15069
15070 #. type: Plain text
15071 #: build/C/man2/write.2:173
15072 msgid ""
15073 "The device containing the file referred to by I<fd> has no room for the data."
15074 msgstr ""
15075 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
15076
15077 #. type: TP
15078 #: build/C/man2/write.2:173
15079 #, no-wrap
15080 msgid "B<EPIPE>"
15081 msgstr "B<EPIPE>"
15082
15083 #. type: Plain text
15084 #: build/C/man2/write.2:182
15085 msgid ""
15086 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
15087 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
15088 "(Thus, the write return value is seen only if the program catches, blocks or "
15089 "ignores this signal.)"
15090 msgstr ""
15091 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
15092 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
15093 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
15094 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
15095 "write の返り値を参照できる。)"
15096
15097 #. type: Plain text
15098 #: build/C/man2/write.2:185
15099 msgid "Other errors may occur, depending on the object connected to I<fd>."
15100 msgstr ""
15101 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
15102
15103 #. type: Plain text
15104 #: build/C/man2/write.2:194
15105 msgid ""
15106 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
15107 "just before any data is written."
15108 msgstr ""
15109 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
15110 "で B<EINTR> が返る。"
15111
15112 #. type: Plain text
15113 #: build/C/man2/write.2:203
15114 msgid ""
15115 "A successful return from B<write>()  does not make any guarantee that data "
15116 "has been committed to disk.  In fact, on some buggy implementations, it does "
15117 "not even guarantee that space has successfully been reserved for the data.  "
15118 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
15119 "all your data."
15120 msgstr ""
15121 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
15122 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
15123 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
15124 "write した後に B<fsync>(2)  を呼び出すことである。"
15125
15126 #. type: Plain text
15127 #: build/C/man2/write.2:211
15128 msgid ""
15129 "If a B<write>()  is interrupted by a signal handler before any bytes are "
15130 "written, then the call fails with the error B<EINTR>; if it is interrupted "
15131 "after at least one byte has been written, the call succeeds, and returns the "
15132 "number of bytes written."
15133 msgstr ""
15134 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
15135 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
15136 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
15137
15138 #. type: Plain text
15139 #: build/C/man2/write.2:223
15140 msgid ""
15141 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15142 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15143 msgstr ""
15144 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15145 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15146
15147 #~ msgid "2001-12-18"
15148 #~ msgstr "2001-12-18"
15149
15150 #~ msgid "2007-07-26"
15151 #~ msgstr "2007-07-26"
15152
15153 #~ msgid "2006-12-27"
15154 #~ msgstr "2006-12-27"
15155
15156 #~ msgid "1999-07-25"
15157 #~ msgstr "1999-07-25"
15158
15159 #~ msgid "2008-06-14"
15160 #~ msgstr "2008-06-14"
15161
15162 #~ msgid "2010-06-12"
15163 #~ msgstr "2010-06-12"
15164
15165 #~ msgid "2010-02-03"
15166 #~ msgstr "2010-02-03"
15167
15168 #~ msgid "2001-12-16"
15169 #~ msgstr "2001-12-16"
15170
15171 #~ msgid "2008-08-06"
15172 #~ msgstr "2008-08-06"
15173
15174 #~ msgid "2010-09-10"
15175 #~ msgstr "2010-09-10"
15176
15177 #~ msgid ""
15178 #~ "Many file systems and disks were considered to be fast enough that the "
15179 #~ "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, "
15180 #~ "B<O_NONBLOCK> may not be available on files and/or disks."
15181 #~ msgstr ""
15182 #~ "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むく"
15183 #~ "らいに十分に高速であると考えられている。 それでそのようなファイルやディス"
15184 #~ "クには B<O_NONBLOCK> は利用できないかもしれない。"
15185
15186 #~ msgid ""
15187 #~ "The I<local_iov> and I<remote_iov> arguments point to an array of "
15188 #~ "I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
15189 #~ msgstr ""
15190 #~ "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
15191 #~ "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
15192 #~ "されている:"
15193
15194 #~ msgid ""
15195 #~ "Buffers are processed in array order.  This means that B<process_vm_readv>"
15196 #~ "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]"
15197 #~ ">, and so on.  Likewise, I<remote_iov[0]> is completely read before "
15198 #~ "proceeding to I<remote_iov[1]>, and so on."
15199 #~ msgstr ""
15200 #~ "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
15201 #~ "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
15202 #~ "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
15203 #~ "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
15204 #~ "以降も同様である。"