OSDN Git Service

(split) LDP: Translate snapshot
[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-23 23:58+0900\n"
10 "PO-Revision-Date: 2013-07-24 00:19+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/asprintf.3:27
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25
26 #: build/C/man3/ferror.3:44 build/C/man3/fmtmsg.3:13
27 #: build/C/man3/stdio_ext.3:25 build/C/man3/tmpnam.3:27
28 #, no-wrap
29 msgid "2013-06-21"
30 msgstr "2013-06-21"
31
32 #. type: TH
33 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
34 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
35 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
36 #: build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44
37 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
38 #: build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25
39 #: build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26
40 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:52 build/C/man3/wprintf.3:16
41 #, no-wrap
42 msgid "GNU"
43 msgstr "GNU"
44
45 #. type: TH
46 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
47 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
48 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
49 #: build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18
50 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
51 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
52 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
53 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
54 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:27
55 #: build/C/man3/getw.3:25 build/C/man2/link.2:31 build/C/man2/llseek.2:28
56 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:52
57 #: build/C/man3/perror.3:31 build/C/man2/pipe.2:36 build/C/man3/popen.3:40
58 #: build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man2/read.2:35
59 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man3/remove.3:31
60 #: build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52
61 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man3/stdio.3:39
62 #: build/C/man3/stdio_ext.3:25 build/C/man2/symlink.2:32
63 #: build/C/man7/symlink.7:36 build/C/man3/tempnam.3:25
64 #: build/C/man3/tmpfile.3:31 build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:32
65 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
66 #: build/C/man2/write.2:39
67 #, no-wrap
68 msgid "Linux Programmer's Manual"
69 msgstr "Linux Programmer's Manual"
70
71 #. type: SH
72 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
73 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
74 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
75 #: build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19
76 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
77 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
78 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
79 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
80 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28
81 #: build/C/man3/getw.3:26 build/C/man2/link.2:32 build/C/man2/llseek.2:29
82 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:53
83 #: build/C/man3/perror.3:32 build/C/man2/pipe.2:37 build/C/man3/popen.3:41
84 #: build/C/man3/printf.3:35 build/C/man3/puts.3:27 build/C/man2/read.2:36
85 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:32
86 #: build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53
87 #: build/C/man3/setbuf.3:49 build/C/man3/stdin.3:14 build/C/man3/stdio.3:40
88 #: build/C/man3/stdio_ext.3:26 build/C/man2/symlink.2:33
89 #: build/C/man7/symlink.7:37 build/C/man3/tempnam.3:26
90 #: build/C/man3/tmpfile.3:32 build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:33
91 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
92 #: build/C/man2/write.2:40
93 #, no-wrap
94 msgid "NAME"
95 msgstr "名前"
96
97 #. type: Plain text
98 #: build/C/man3/asprintf.3:30
99 msgid "asprintf, vasprintf - print to allocated string"
100 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
101
102 #. type: SH
103 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
104 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
105 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
106 #: build/C/man3/fflush.3:48 build/C/man3/fgetwc.3:21
107 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
108 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
109 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
110 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
111 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:30
112 #: build/C/man3/getw.3:28 build/C/man2/link.2:34 build/C/man2/llseek.2:31
113 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:55
114 #: build/C/man3/perror.3:34 build/C/man2/pipe.2:39 build/C/man3/popen.3:43
115 #: build/C/man3/printf.3:38 build/C/man3/puts.3:29 build/C/man2/read.2:38
116 #: build/C/man2/readlink.2:46 build/C/man2/readv.2:35 build/C/man3/remove.3:34
117 #: build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55
118 #: build/C/man3/setbuf.3:51 build/C/man3/stdin.3:16 build/C/man3/stdio.3:42
119 #: build/C/man3/stdio_ext.3:30 build/C/man2/symlink.2:35
120 #: build/C/man3/tempnam.3:28 build/C/man3/tmpfile.3:34
121 #: build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:35
122 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
123 #: build/C/man2/write.2:42
124 #, no-wrap
125 msgid "SYNOPSIS"
126 msgstr "書式"
127
128 #. type: Plain text
129 #: build/C/man3/asprintf.3:32
130 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
131 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
132
133 #. type: Plain text
134 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
135 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
136 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
137 #: build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:44
138 #: build/C/man3/stdio_ext.3:32
139 msgid "B<#include E<lt>stdio.hE<gt>>"
140 msgstr "B<#include E<lt>stdio.hE<gt>>"
141
142 #. type: Plain text
143 #: build/C/man3/asprintf.3:36
144 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
145 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
146
147 #. type: Plain text
148 #: build/C/man3/asprintf.3:38
149 msgid ""
150 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
151 msgstr ""
152 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
153
154 #. type: SH
155 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
156 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
157 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
158 #: build/C/man3/fflush.3:52 build/C/man3/fgetwc.3:30
159 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
160 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
161 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
162 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
163 #: build/C/man3/fseeko.3:37 build/C/man3/getline.3:58 build/C/man3/gets.3:46
164 #: build/C/man3/getw.3:59 build/C/man2/link.2:38 build/C/man2/llseek.2:43
165 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:66
166 #: build/C/man3/perror.3:55 build/C/man2/pipe.2:51 build/C/man3/popen.3:64
167 #: build/C/man3/printf.3:76 build/C/man3/puts.3:43 build/C/man2/read.2:44
168 #: build/C/man2/readlink.2:63 build/C/man2/readv.2:58 build/C/man3/remove.3:38
169 #: build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87
170 #: build/C/man3/setbuf.3:73 build/C/man3/stdin.3:24 build/C/man3/stdio.3:50
171 #: build/C/man3/stdio_ext.3:54 build/C/man2/symlink.2:52
172 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
173 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:39
174 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:60
175 #: build/C/man2/write.2:46
176 #, no-wrap
177 msgid "DESCRIPTION"
178 msgstr "説明"
179
180 #. type: Plain text
181 #: build/C/man3/asprintf.3:53
182 msgid ""
183 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
184 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
185 "hold the output including the terminating null byte (\\(aq\\e0\\(aq), and "
186 "return a pointer to it via the first argument.  This pointer should be "
187 "passed to B<free>(3)  to release the allocated storage when it is no longer "
188 "needed."
189 msgstr ""
190 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
191 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端の NULL バイト "
192 "(\\(aq\\e0\\(aq) も含めて)  保持するのに十分な大きさのメモリを確保し、 最初の"
193 "引数にその文字列へのポインタを返す。 このポインタは、不要になったら B<free>"
194 "(3)  に渡し、割り当てられた記憶領域を解放すべきである。"
195
196 #. type: SH
197 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
198 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
199 #: build/C/man3/fflush.3:74 build/C/man3/fgetwc.3:55
200 #: build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:176
201 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
202 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
203 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
204 #: build/C/man3/fseeko.3:75 build/C/man3/getline.3:110 build/C/man3/gets.3:111
205 #: build/C/man3/getw.3:73 build/C/man2/link.2:52 build/C/man2/llseek.2:62
206 #: build/C/man2/lseek.2:162 build/C/man2/open.2:477 build/C/man2/pipe.2:92
207 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
208 #: build/C/man2/readlink.2:77 build/C/man2/readv.2:177
209 #: build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40
210 #: build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152
211 #: build/C/man2/symlink.2:84 build/C/man3/tempnam.3:87
212 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:70 build/C/man2/unlink.2:55
213 #: build/C/man3/wprintf.3:205 build/C/man2/write.2:89
214 #, no-wrap
215 msgid "RETURN VALUE"
216 msgstr "返り値"
217
218 #. type: Plain text
219 #: build/C/man3/asprintf.3:61
220 msgid ""
221 "When successful, these functions return the number of bytes printed, just "
222 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
223 "error occurs, these functions will return -1, and the contents of I<strp> is "
224 "undefined."
225 msgstr ""
226 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
227 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
228 "は -1 を返し、 I<strp> の内容は未定義となる。"
229
230 #. type: SH
231 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67
232 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
233 #: build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115
234 #: build/C/man3/fflush.3:93 build/C/man3/fgetwc.3:70
235 #: build/C/man3/flockfile.3:127 build/C/man3/fmemopen.3:195
236 #: build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246
237 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
238 #: build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:168
239 #: build/C/man3/fseeko.3:87 build/C/man3/getline.3:137 build/C/man3/gets.3:138
240 #: build/C/man3/getw.3:80 build/C/man2/link.2:138 build/C/man2/llseek.2:81
241 #: build/C/man2/lseek.2:200 build/C/man2/open.2:629 build/C/man3/perror.3:111
242 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:172 build/C/man3/printf.3:806
243 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:125
244 #: build/C/man2/readv.2:214 build/C/man3/remove.3:70 build/C/man2/rename.2:232
245 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:164
246 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
247 #: build/C/man2/symlink.2:149 build/C/man3/tempnam.3:98
248 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:87
249 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:113
250 #: build/C/man3/wprintf.3:213 build/C/man2/write.2:185
251 #, no-wrap
252 msgid "CONFORMING TO"
253 msgstr "準拠"
254
255 #. type: Plain text
256 #: build/C/man3/asprintf.3:67
257 msgid ""
258 "These functions are GNU extensions, not in C or POSIX.  They are also "
259 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
260 "error."
261 msgstr ""
262 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
263 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
264 "る。"
265
266 #. type: SH
267 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77
268 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
269 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:122
270 #: build/C/man3/fflush.3:108 build/C/man3/fgetwc.3:87
271 #: build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:341
272 #: build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348
273 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
274 #: build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:170
275 #: build/C/man3/fseeko.3:93 build/C/man3/getline.3:171 build/C/man3/gets.3:173
276 #: build/C/man3/getw.3:86 build/C/man2/link.2:187 build/C/man2/llseek.2:87
277 #: build/C/man2/lseek.2:245 build/C/man3/lseek64.3:159 build/C/man2/open.2:901
278 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:201
279 #: build/C/man3/printf.3:1080 build/C/man3/puts.3:112 build/C/man2/read.2:187
280 #: build/C/man2/readlink.2:214 build/C/man2/readv.2:284
281 #: build/C/man3/remove.3:81 build/C/man2/rename.2:245 build/C/man2/rmdir.2:132
282 #: build/C/man3/scanf.3:715 build/C/man3/setbuf.3:200 build/C/man3/stdin.3:154
283 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151
284 #: build/C/man2/symlink.2:164 build/C/man7/symlink.7:471
285 #: build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97
286 #: build/C/man3/tmpnam.3:163 build/C/man2/unlink.2:148
287 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:253
288 #: build/C/man2/write.2:211
289 #, no-wrap
290 msgid "SEE ALSO"
291 msgstr "関連項目"
292
293 #. type: Plain text
294 #: build/C/man3/asprintf.3:71
295 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
296 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
297
298 #. type: SH
299 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79
300 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
301 #: build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:127
302 #: build/C/man3/fflush.3:116 build/C/man3/fgetwc.3:92
303 #: build/C/man3/flockfile.3:137 build/C/man3/fmemopen.3:344
304 #: build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354
305 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
306 #: build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:173
307 #: build/C/man3/fseeko.3:95 build/C/man3/getline.3:178 build/C/man3/gets.3:189
308 #: build/C/man3/getw.3:92 build/C/man2/link.2:197 build/C/man2/llseek.2:90
309 #: build/C/man2/lseek.2:252 build/C/man3/lseek64.3:162 build/C/man2/open.2:923
310 #: build/C/man3/perror.3:144 build/C/man2/pipe.2:197 build/C/man3/popen.3:211
311 #: build/C/man3/printf.3:1089 build/C/man3/puts.3:124 build/C/man2/read.2:200
312 #: build/C/man2/readlink.2:222 build/C/man2/readv.2:288
313 #: build/C/man3/remove.3:92 build/C/man2/rename.2:254 build/C/man2/rmdir.2:141
314 #: build/C/man3/scanf.3:722 build/C/man3/setbuf.3:208 build/C/man3/stdin.3:160
315 #: build/C/man3/stdio.3:257 build/C/man3/stdio_ext.3:154
316 #: build/C/man2/symlink.2:176 build/C/man7/symlink.7:489
317 #: build/C/man3/tempnam.3:173 build/C/man3/tmpfile.3:103
318 #: build/C/man3/tmpnam.3:168 build/C/man2/unlink.2:161
319 #: build/C/man3/unlocked_stdio.3:139 build/C/man3/wprintf.3:260
320 #: build/C/man2/write.2:223
321 #, no-wrap
322 msgid "COLOPHON"
323 msgstr "この文書について"
324
325 #. type: Plain text
326 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:86
327 #: build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115
328 #: build/C/man3/fcloseall.3:75 build/C/man3/ferror.3:134
329 #: build/C/man3/fflush.3:123 build/C/man3/fgetwc.3:99
330 #: build/C/man3/flockfile.3:144 build/C/man3/fmemopen.3:351
331 #: build/C/man3/fmtmsg.3:319 build/C/man3/fopen.3:361
332 #: build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92
333 #: build/C/man3/fputwc.3:96 build/C/man3/fread.3:118 build/C/man3/fseek.3:180
334 #: build/C/man3/fseeko.3:102 build/C/man3/getline.3:185
335 #: build/C/man3/gets.3:196 build/C/man3/getw.3:99 build/C/man2/link.2:204
336 #: build/C/man2/llseek.2:97 build/C/man2/lseek.2:259
337 #: build/C/man3/lseek64.3:169 build/C/man2/open.2:930
338 #: build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:218
339 #: build/C/man3/printf.3:1096 build/C/man3/puts.3:131 build/C/man2/read.2:207
340 #: build/C/man2/readlink.2:229 build/C/man2/readv.2:295
341 #: build/C/man3/remove.3:99 build/C/man2/rename.2:261 build/C/man2/rmdir.2:148
342 #: build/C/man3/scanf.3:729 build/C/man3/setbuf.3:215 build/C/man3/stdin.3:167
343 #: build/C/man3/stdio.3:264 build/C/man3/stdio_ext.3:161
344 #: build/C/man2/symlink.2:183 build/C/man7/symlink.7:496
345 #: build/C/man3/tempnam.3:180 build/C/man3/tmpfile.3:110
346 #: build/C/man3/tmpnam.3:175 build/C/man2/unlink.2:168
347 #: build/C/man3/unlocked_stdio.3:146 build/C/man3/wprintf.3:267
348 #: build/C/man2/write.2:230
349 msgid ""
350 "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
351 "description of the project, and information about reporting bugs, can be "
352 "found at \\%http://www.kernel.org/doc/man-pages/."
353 msgstr ""
354 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.52 の一部\n"
355 "である。プロジェクトの説明とバグ報告に関する情報は\n"
356 "http://www.kernel.org/doc/man-pages/ に書かれている。"
357
358 #. type: TH
359 #: build/C/man3/ctermid.3:26
360 #, no-wrap
361 msgid "CTERMID"
362 msgstr "CTERMID"
363
364 #. type: TH
365 #: build/C/man3/ctermid.3:26
366 #, no-wrap
367 msgid "2013-07-04"
368 msgstr "2013-07-04"
369
370 #. type: Plain text
371 #: build/C/man3/ctermid.3:29
372 msgid "ctermid - get controlling terminal name"
373 msgstr "ctermid - 制御端末名の取得"
374
375 #. type: Plain text
376 #: build/C/man3/ctermid.3:34 build/C/man3/fgetwc.3:24
377 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
378 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
379 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:33
380 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
381 #: build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54 build/C/man3/stdin.3:19
382 #: build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
383 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
384 #, no-wrap
385 msgid "B<#include E<lt>stdio.hE<gt>>\n"
386 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
387
388 #. type: Plain text
389 #: build/C/man3/ctermid.3:36
390 #, no-wrap
391 msgid "B<char *ctermid(char *>I<s>B<);>\n"
392 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
393
394 #. type: Plain text
395 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
396 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
397 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61
398 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man3/perror.3:50
399 #: build/C/man3/popen.3:55 build/C/man3/printf.3:63 build/C/man2/readlink.2:54
400 #: build/C/man2/readv.2:53 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
401 #: build/C/man2/symlink.2:43 build/C/man3/tempnam.3:38
402 #: build/C/man3/unlocked_stdio.3:68 build/C/man3/wprintf.3:39
403 msgid ""
404 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
405 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
406
407 #.  From <unistd.h>: _XOPEN_SOURCE
408 #. type: Plain text
409 #: build/C/man3/ctermid.3:46
410 msgid ""
411 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
412 msgstr ""
413 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
414
415 #. type: Plain text
416 #: build/C/man3/ctermid.3:59
417 msgid ""
418 "B<ctermid>()  returns a string which is the pathname for the current "
419 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
420 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
421 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
422 "the returned pathname."
423 msgstr ""
424 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
425 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
426 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
427 "ス名の最大文字数である。"
428
429 #. type: Plain text
430 #: build/C/man3/ctermid.3:61
431 msgid "The pointer to the pathname."
432 msgstr "パス名へのポインタ。"
433
434 #. type: SH
435 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55
436 #: build/C/man3/ferror.3:106 build/C/man3/fmtmsg.3:225
437 #: build/C/man3/stdio_ext.3:132 build/C/man3/tmpnam.3:77
438 #, no-wrap
439 msgid "ATTRIBUTES"
440 msgstr "属性"
441
442 #. type: SS
443 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
444 #: build/C/man3/ferror.3:107 build/C/man3/fmtmsg.3:226
445 #: build/C/man3/stdio_ext.3:133 build/C/man3/tmpnam.3:78
446 #, no-wrap
447 msgid "Multithreading (see pthreads(7))"
448 msgstr "マルチスレッディング (pthreads(7) 参照)"
449
450 #. type: Plain text
451 #: build/C/man3/ctermid.3:67
452 msgid ""
453 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
454 "safe if called with a NULL parameter."
455 msgstr ""
456
457 #. type: Plain text
458 #: build/C/man3/ctermid.3:69
459 msgid "Svr4, POSIX.1-2001."
460 msgstr "SVr4, POSIX.1-2001."
461
462 #. type: SH
463 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213
464 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82
465 #: build/C/man2/link.2:181 build/C/man2/open.2:890 build/C/man3/popen.3:178
466 #: build/C/man3/printf.3:929 build/C/man3/puts.3:105 build/C/man2/readv.2:258
467 #: build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129
468 #: build/C/man3/scanf.3:646 build/C/man3/setbuf.3:170
469 #: build/C/man3/tempnam.3:158 build/C/man3/tmpnam.3:156
470 #: build/C/man2/unlink.2:145
471 #, no-wrap
472 msgid "BUGS"
473 msgstr "バグ"
474
475 #. type: Plain text
476 #: build/C/man3/ctermid.3:73
477 msgid ""
478 "The path returned may not uniquely identify the controlling terminal; it "
479 "may, for example, be I</dev/tty>."
480 msgstr ""
481 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
482 "ように。"
483
484 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
485 #.  if ctermid() was given an argument; fixed in 2.4.
486 #. type: Plain text
487 #: build/C/man3/ctermid.3:77
488 msgid "It is not assured that the program can open the terminal."
489 msgstr "プログラムが端末をオープンできることは保証されていない。"
490
491 #. type: Plain text
492 #: build/C/man3/ctermid.3:79
493 msgid "B<ttyname>(3)"
494 msgstr "B<ttyname>(3)"
495
496 #. type: TH
497 #: build/C/man3/dprintf.3:26
498 #, no-wrap
499 msgid "DPRINTF"
500 msgstr "DPRINTF"
501
502 #. type: TH
503 #: build/C/man3/dprintf.3:26
504 #, no-wrap
505 msgid "2010-09-15"
506 msgstr "2010-09-15"
507
508 #. type: Plain text
509 #: build/C/man3/dprintf.3:29
510 msgid "dprintf, vdprintf - print to a file descriptor"
511 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
512
513 #. type: Plain text
514 #: build/C/man3/dprintf.3:33
515 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
516 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
517
518 #. type: Plain text
519 #: build/C/man3/dprintf.3:35
520 msgid ""
521 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
522 msgstr ""
523 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
524
525 #. type: Plain text
526 #: build/C/man3/dprintf.3:43
527 msgid "B<dprintf>(), B<vdprintf>():"
528 msgstr "B<dprintf>(), B<vdprintf>():"
529
530 #. type: TP
531 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
532 #: build/C/man3/getline.3:49
533 #, no-wrap
534 msgid "Since glibc 2.10:"
535 msgstr "glibc 2.10 以降:"
536
537 #. type: Plain text
538 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
539 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
540 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
541
542 #. type: TP
543 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
544 #: build/C/man3/getline.3:52
545 #, no-wrap
546 msgid "Before glibc 2.10:"
547 msgstr "glibc 2.10 より前:"
548
549 #. type: Plain text
550 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
551 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
552 msgid "_GNU_SOURCE"
553 msgstr "_GNU_SOURCE"
554
555 #. type: Plain text
556 #: build/C/man3/dprintf.3:69
557 msgid ""
558 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
559 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
560 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
561 msgstr ""
562 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
563 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
564 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
565 "行う。"
566
567 #.  .SH NOTES
568 #.  These functions are GNU extensions, not in C or POSIX.
569 #.  Clearly, the names were badly chosen.
570 #.  Many systems (like MacOS) have incompatible functions called
571 #.  .BR dprintf (),
572 #.  usually some debugging version of
573 #.  .BR printf (3),
574 #.  perhaps with a prototype like
575 #.  .BI "void dprintf(int level, const char *" format ", ...);"
576 #.  where the first argument is a debugging level (and output is to
577 #.  .IR stderr ).
578 #.  Moreover,
579 #.  .BR dprintf ()
580 #.  (or
581 #.  .BR DPRINTF )
582 #.  is also a popular macro name for a debugging printf.
583 #.  So, probably, it is better to avoid this function in programs
584 #.  intended to be portable.
585 #.  A better name would have been
586 #.  .BR fdprintf ().
587 #. type: Plain text
588 #: build/C/man3/dprintf.3:95
589 msgid ""
590 "These functions are GNU extensions that are nowadays specified in "
591 "POSIX.1-2008."
592 msgstr ""
593 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
594 "る。"
595
596 #. type: Plain text
597 #: build/C/man3/dprintf.3:97
598 msgid "B<printf>(3)"
599 msgstr "B<printf>(3)"
600
601 #. type: TH
602 #: build/C/man3/fclose.3:44
603 #, no-wrap
604 msgid "FCLOSE"
605 msgstr "FCLOSE"
606
607 #. type: TH
608 #: build/C/man3/fclose.3:44
609 #, no-wrap
610 msgid "2009-02-23"
611 msgstr "2009-02-23"
612
613 #. type: Plain text
614 #: build/C/man3/fclose.3:47
615 msgid "fclose - close a stream"
616 msgstr "fclose - ストリームを閉じる"
617
618 #. type: Plain text
619 #: build/C/man3/fclose.3:51
620 msgid "B<int fclose(FILE *>I<fp>B<);>"
621 msgstr "B<int fclose(FILE *>I<fp>B<);>"
622
623 #. type: Plain text
624 #: build/C/man3/fclose.3:59
625 msgid ""
626 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
627 "any buffered output data using B<fflush>(3))  and closes the underlying file "
628 "descriptor."
629 msgstr ""
630 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
631 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
632 "対応するファイルディスクリプタをクローズする。"
633
634 #. type: Plain text
635 #: build/C/man3/fclose.3:70
636 msgid ""
637 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
638 "I<errno> is set to indicate the error.  In either case any further access "
639 "(including another call to B<fclose>())  to the stream results in undefined "
640 "behavior."
641 msgstr ""
642 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
643 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
644 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
645 "は 未定義の動作を生じさせる。"
646
647 #. type: SH
648 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
649 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
650 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
651 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:84
652 #: build/C/man3/getline.3:125 build/C/man2/link.2:57 build/C/man2/llseek.2:69
653 #: build/C/man2/lseek.2:170 build/C/man2/open.2:485 build/C/man2/pipe.2:97
654 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:85
655 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96
656 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:89
657 #: build/C/man3/tempnam.3:94 build/C/man3/tmpfile.3:56
658 #: build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
659 #, no-wrap
660 msgid "ERRORS"
661 msgstr "エラー"
662
663 #. type: TP
664 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
665 #: build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:171
666 #: build/C/man2/read.2:114 build/C/man3/scanf.3:553 build/C/man2/write.2:126
667 #, no-wrap
668 msgid "B<EBADF>"
669 msgstr "B<EBADF>"
670
671 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
672 #.   low-level file operations on the same stream. If you do get this error,
673 #.   you must have closed the stream's low-level file descriptor using
674 #.   something like close(fileno(fp)).
675 #. type: Plain text
676 #: build/C/man3/fclose.3:80
677 msgid "The file descriptor underlying I<fp> is not valid."
678 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
679
680 #. type: Plain text
681 #: build/C/man3/fclose.3:90
682 msgid ""
683 "The B<fclose>()  function may also fail and set I<errno> for any of the "
684 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
685 msgstr ""
686 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
687 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
688 "された値に設定される。"
689
690 #. type: Plain text
691 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
692 msgid "C89, C99."
693 msgstr "C89, C99."
694
695 #. type: SH
696 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:99 build/C/man3/fgetwc.3:72
697 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
698 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
699 #: build/C/man3/fseeko.3:89 build/C/man2/link.2:143 build/C/man2/llseek.2:84
700 #: build/C/man2/lseek.2:210 build/C/man2/open.2:655 build/C/man3/perror.3:124
701 #: build/C/man3/printf.3:867 build/C/man2/read.2:175
702 #: build/C/man2/readlink.2:130 build/C/man2/readv.2:226
703 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
704 #: build/C/man2/symlink.2:155 build/C/man3/tempnam.3:103
705 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:92
706 #: build/C/man3/wprintf.3:215 build/C/man2/write.2:194
707 #, no-wrap
708 msgid "NOTES"
709 msgstr "注意"
710
711 #. type: Plain text
712 #: build/C/man3/fclose.3:102
713 msgid ""
714 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
715 "library.  To ensure that the data is physically stored on disk the kernel "
716 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
717 msgstr ""
718 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
719 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
720 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
721 "ればならない。"
722
723 #. type: Plain text
724 #: build/C/man3/fclose.3:108
725 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
726 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
727
728 #. type: TH
729 #: build/C/man3/fcloseall.3:25
730 #, no-wrap
731 msgid "FCLOSEALL"
732 msgstr "FCLOSEALL"
733
734 #. type: Plain text
735 #: build/C/man3/fcloseall.3:28
736 msgid "fcloseall - close all open streams"
737 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
738
739 #. type: Plain text
740 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
741 #, no-wrap
742 msgid ""
743 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
744 "B<#include E<lt>stdio.hE<gt>>\n"
745 msgstr ""
746 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
747 "B<#include E<lt>stdio.hE<gt>>\n"
748
749 #. type: Plain text
750 #: build/C/man3/fcloseall.3:34
751 #, no-wrap
752 msgid "B<int fcloseall(void);>\n"
753 msgstr "B<int fcloseall(void);>\n"
754
755 #. type: Plain text
756 #: build/C/man3/fcloseall.3:43
757 msgid ""
758 "The B<fcloseall>()  function closes all of the calling process's open "
759 "streams.  Buffered output for each stream is written before it is closed (as "
760 "for B<fflush>(3)); buffered input is discarded."
761 msgstr ""
762 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
763 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
764 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
765 "れる。"
766
767 #. type: Plain text
768 #: build/C/man3/fcloseall.3:50
769 msgid ""
770 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
771 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
772
773 #. type: Plain text
774 #: build/C/man3/fcloseall.3:55
775 msgid ""
776 "This function returns 0 if all files were successfully closed; on error, "
777 "B<EOF> is returned."
778 msgstr ""
779 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
780 "B<EOF> を返す。"
781
782 #. type: Plain text
783 #: build/C/man3/fcloseall.3:60
784 msgid ""
785 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
786 "safe."
787 msgstr ""
788 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
789 "はない。"
790
791 #. type: Plain text
792 #: build/C/man3/fcloseall.3:62
793 msgid "This function is a GNU extension."
794 msgstr "この関数は GNU 拡張である。"
795
796 #. type: Plain text
797 #: build/C/man3/fcloseall.3:68
798 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
799 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
800
801 #. type: TH
802 #: build/C/man3/ferror.3:44
803 #, no-wrap
804 msgid "FERROR"
805 msgstr "FERROR"
806
807 #. type: Plain text
808 #: build/C/man3/ferror.3:47
809 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
810 msgstr ""
811 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
812
813 #. type: Plain text
814 #: build/C/man3/ferror.3:51
815 msgid "B<void clearerr(FILE *>I<stream>B<);>"
816 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
817
818 #. type: Plain text
819 #: build/C/man3/ferror.3:53
820 msgid "B<int feof(FILE *>I<stream>B<);>"
821 msgstr "B<int feof(FILE *>I<stream>B<);>"
822
823 #. type: Plain text
824 #: build/C/man3/ferror.3:55
825 msgid "B<int ferror(FILE *>I<stream>B<);>"
826 msgstr "B<int ferror(FILE *>I<stream>B<);>"
827
828 #. type: Plain text
829 #: build/C/man3/ferror.3:57
830 msgid "B<int fileno(FILE *>I<stream>B<);>"
831 msgstr "B<int fileno(FILE *>I<stream>B<);>"
832
833 #. type: Plain text
834 #: build/C/man3/ferror.3:65
835 msgid ""
836 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
837 msgstr ""
838 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
839
840 #. type: Plain text
841 #: build/C/man3/ferror.3:70
842 msgid ""
843 "The function B<clearerr>()  clears the end-of-file and error indicators for "
844 "the stream pointed to by I<stream>."
845 msgstr ""
846 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
847 "子とエラー指示子をクリアする。"
848
849 #. type: Plain text
850 #: build/C/man3/ferror.3:78
851 msgid ""
852 "The function B<feof>()  tests the end-of-file indicator for the stream "
853 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
854 "indicator can be cleared only by the function B<clearerr>()."
855 msgstr ""
856 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
857 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
858 "よってのみクリアすることができる。"
859
860 #. type: Plain text
861 #: build/C/man3/ferror.3:87
862 msgid ""
863 "The function B<ferror>()  tests the error indicator for the stream pointed "
864 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
865 "reset only by the B<clearerr>()  function."
866 msgstr ""
867 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
868 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
869 "()  によってのみリセットすることができる。"
870
871 #. type: Plain text
872 #: build/C/man3/ferror.3:93
873 msgid ""
874 "The function B<fileno>()  examines the argument I<stream> and returns its "
875 "integer descriptor."
876 msgstr ""
877 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
878
879 #. type: Plain text
880 #: build/C/man3/ferror.3:96 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54
881 #: build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
882 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
883 msgstr ""
884 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
885
886 #. type: Plain text
887 #: build/C/man3/ferror.3:106
888 msgid ""
889 "These functions should not fail and do not set the external variable "
890 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
891 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
892 msgstr ""
893 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
894 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
895 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
896
897 #. type: Plain text
898 #: build/C/man3/ferror.3:115
899 msgid ""
900 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
901 "thread-safe."
902 msgstr ""
903 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
904 "る。"
905
906 #. type: Plain text
907 #: build/C/man3/ferror.3:122
908 msgid ""
909 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
910 "C99."
911 msgstr ""
912 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
913
914 #. type: Plain text
915 #: build/C/man3/ferror.3:127
916 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
917 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
918
919 #. type: TH
920 #: build/C/man3/fflush.3:45
921 #, no-wrap
922 msgid "FFLUSH"
923 msgstr "FFLUSH"
924
925 #. type: TH
926 #: build/C/man3/fflush.3:45
927 #, no-wrap
928 msgid "2009-09-06"
929 msgstr "2009-09-06"
930
931 #. type: Plain text
932 #: build/C/man3/fflush.3:48
933 msgid "fflush - flush a stream"
934 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
935
936 #. type: Plain text
937 #: build/C/man3/fflush.3:52
938 msgid "B<int fflush(FILE *>I<stream>B<);>"
939 msgstr "B<int fflush(FILE *>I<stream>B<);>"
940
941 #. type: Plain text
942 #: build/C/man3/fflush.3:63
943 msgid ""
944 "For output streams, B<fflush>()  forces a write of all user-space buffered "
945 "data for the given output or update I<stream> via the stream's underlying "
946 "write function.  For input streams, B<fflush>()  discards any buffered data "
947 "that has been fetched from the underlying file, but has not been consumed by "
948 "the application.  The open status of the stream is unaffected."
949 msgstr ""
950 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
951 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
952 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
953 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
954 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
955 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
956 "い。"
957
958 #. type: Plain text
959 #: build/C/man3/fflush.3:71
960 msgid ""
961 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
962 "streams."
963 msgstr ""
964 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
965 "トリームをフラッシュする。"
966
967 #. type: Plain text
968 #: build/C/man3/fflush.3:74
969 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
970 msgstr ""
971 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
972 "と。"
973
974 #. type: Plain text
975 #: build/C/man3/fflush.3:81
976 msgid ""
977 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
978 "I<errno> is set to indicate the error."
979 msgstr ""
980 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
981 "ラーに対応した値に設定される。"
982
983 #. type: Plain text
984 #: build/C/man3/fflush.3:86
985 msgid "I<Stream> is not an open stream, or is not open for writing."
986 msgstr ""
987 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
988 "ない。"
989
990 #. type: Plain text
991 #: build/C/man3/fflush.3:93
992 msgid ""
993 "The function B<fflush>()  may also fail and set I<errno> for any of the "
994 "errors specified for B<write>(2)."
995 msgstr ""
996 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
997 "ある。 この場合 I<errno> もその値に設定される。"
998
999 #. type: Plain text
1000 #: build/C/man3/fflush.3:95
1001 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1002 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1003
1004 #.  Verified on: Solaris 8.
1005 #. type: Plain text
1006 #: build/C/man3/fflush.3:99
1007 msgid ""
1008 "The standards do not specify the behavior for input streams.  Most other "
1009 "implementations behave the same as Linux."
1010 msgstr ""
1011 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1012 "は Linux と同じ動作をする。"
1013
1014 #. type: Plain text
1015 #: build/C/man3/fflush.3:108
1016 msgid ""
1017 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1018 "library.  To ensure that the data is physically stored on disk the kernel "
1019 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1020 msgstr ""
1021 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1022 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1023 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1024 "B<fsync>(2)  を用いる。"
1025
1026 #. type: Plain text
1027 #: build/C/man3/fflush.3:116
1028 msgid ""
1029 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1030 "(3), B<unlocked_stdio>(3)"
1031 msgstr ""
1032 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1033 "(3), B<unlocked_stdio>(3)"
1034
1035 #. type: TH
1036 #: build/C/man3/fgetwc.3:18
1037 #, no-wrap
1038 msgid "FGETWC"
1039 msgstr "FGETWC"
1040
1041 #. type: TH
1042 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/getline.3:26
1043 #: build/C/man3/popen.3:40 build/C/man3/tempnam.3:25
1044 #, no-wrap
1045 msgid "2013-04-19"
1046 msgstr "2013-04-19"
1047
1048 #. type: Plain text
1049 #: build/C/man3/fgetwc.3:21
1050 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1051 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1052
1053 #. type: Plain text
1054 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1055 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1056 #, no-wrap
1057 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1058 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1059
1060 #. type: Plain text
1061 #: build/C/man3/fgetwc.3:29
1062 #, no-wrap
1063 msgid ""
1064 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1065 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1066 msgstr ""
1067 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1068 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1069
1070 #. type: Plain text
1071 #: build/C/man3/fgetwc.3:44
1072 msgid ""
1073 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1074 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1075 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1076 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1077 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1078 msgstr ""
1079 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1080 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1081 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1082 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1083 "し、 B<WEOF> を返す。"
1084
1085 #. type: Plain text
1086 #: build/C/man3/fgetwc.3:52
1087 msgid ""
1088 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1089 "may be implemented as a macro, and may evaluate its argument more than "
1090 "once.  There is no reason ever to use it."
1091 msgstr ""
1092 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1093 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1094 "ない。この関数を使う理由はもはや存在しない。"
1095
1096 #. type: Plain text
1097 #: build/C/man3/fgetwc.3:64
1098 msgid ""
1099 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1100 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1101 msgstr ""
1102 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1103 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1104
1105 #. type: Plain text
1106 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1107 msgid "Apart from the usual ones, there is"
1108 msgstr "通常のエラーに加えて、以下のエラーがある:"
1109
1110 #. type: TP
1111 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1112 #, no-wrap
1113 msgid "B<EILSEQ>"
1114 msgstr "B<EILSEQ>"
1115
1116 #. type: Plain text
1117 #: build/C/man3/fgetwc.3:70
1118 msgid ""
1119 "The data obtained from the input stream does not form a valid character."
1120 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1121
1122 #. type: Plain text
1123 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1124 msgid "C99, POSIX.1-2001."
1125 msgstr "C99, POSIX.1-2001."
1126
1127 #. type: Plain text
1128 #: build/C/man3/fgetwc.3:79
1129 msgid ""
1130 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1131 "current locale."
1132 msgstr ""
1133 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1134
1135 #. type: Plain text
1136 #: build/C/man3/fgetwc.3:87
1137 msgid ""
1138 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1139 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1140 "sequence from the stream and then convert it to a wide character."
1141 msgstr ""
1142 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1143 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1144 "換すると期待することは適切である。"
1145
1146 #. type: Plain text
1147 #: build/C/man3/fgetwc.3:92
1148 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1149 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1150
1151 #. type: TH
1152 #: build/C/man3/flockfile.3:25
1153 #, no-wrap
1154 msgid "FLOCKFILE"
1155 msgstr "FLOCKFILE"
1156
1157 #. type: TH
1158 #: build/C/man3/flockfile.3:25 build/C/man3/unlocked_stdio.3:25
1159 #, no-wrap
1160 msgid "2008-08-29"
1161 msgstr "2008-08-29"
1162
1163 #. type: Plain text
1164 #: build/C/man3/flockfile.3:28
1165 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1166 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1167
1168 #. type: Plain text
1169 #: build/C/man3/flockfile.3:33
1170 #, no-wrap
1171 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1172 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1173
1174 #. type: Plain text
1175 #: build/C/man3/flockfile.3:35
1176 #, no-wrap
1177 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1178 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1179
1180 #. type: Plain text
1181 #: build/C/man3/flockfile.3:37
1182 #, no-wrap
1183 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1184 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1185
1186 #. type: Plain text
1187 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1188 msgid "All functions shown above:"
1189 msgstr "上記の全ての関数:"
1190
1191 #. type: Plain text
1192 #: build/C/man3/flockfile.3:49
1193 msgid ""
1194 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1195 "|| _POSIX_SOURCE"
1196 msgstr ""
1197 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1198 "|| _POSIX_SOURCE"
1199
1200 #. type: Plain text
1201 #: build/C/man3/flockfile.3:63
1202 msgid ""
1203 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1204 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1205 "thread.  For each library call, these functions wait until the I<FILE> "
1206 "object is no longer locked by a different thread, then lock it, do the "
1207 "requested I/O, and unlock the object again."
1208 msgstr ""
1209 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1210 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1211 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1212 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1213 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1214 "オブジェクトのロックを解除する。"
1215
1216 #. type: Plain text
1217 #: build/C/man3/flockfile.3:69
1218 msgid ""
1219 "(Note: this locking has nothing to do with the file locking done by "
1220 "functions like B<flock>(2)  and B<lockf>(3).)"
1221 msgstr ""
1222 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1223 "全く無関係である。)"
1224
1225 #. type: Plain text
1226 #: build/C/man3/flockfile.3:77
1227 msgid ""
1228 "All this is invisible to the C-programmer, but there may be two reasons to "
1229 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1230 "actions by one thread belongs together, and should not be interrupted by the "
1231 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1232 "should be avoided for greater efficiency."
1233 msgstr ""
1234 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1235 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1236 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1237 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1238 "避ける必要があるということであろう。"
1239
1240 #. type: Plain text
1241 #: build/C/man3/flockfile.3:94
1242 msgid ""
1243 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1244 "series of I/O actions, then unlock.  This prevents other threads from coming "
1245 "in between.  If the reason for doing this was to achieve greater efficiency, "
1246 "one does the I/O with the nonlocking versions of the stdio functions: with "
1247 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1248 "B<putc>(3)."
1249 msgstr ""
1250 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1251 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1252 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1253 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1254 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1255 "B<putc_unlocked>(3)  を使用する。"
1256
1257 #. type: Plain text
1258 #: build/C/man3/flockfile.3:105
1259 msgid ""
1260 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1261 "by a different thread, then makes the current thread owner of "
1262 "I<*filehandle>, and increments the lockcount."
1263 msgstr ""
1264 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1265 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1266 "ロック数を加算する。"
1267
1268 #. type: Plain text
1269 #: build/C/man3/flockfile.3:109
1270 msgid "The B<funlockfile>()  function decrements the lock count."
1271 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1272
1273 #. type: Plain text
1274 #: build/C/man3/flockfile.3:120
1275 msgid ""
1276 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1277 "It does nothing in case some other thread owns I<*filehandle>, and it "
1278 "obtains ownership and increments the lockcount otherwise."
1279 msgstr ""
1280 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1281 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1282 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1283
1284 #. type: Plain text
1285 #: build/C/man3/flockfile.3:125
1286 msgid ""
1287 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1288 "obtained), and nonzero for failure."
1289 msgstr ""
1290 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1291 "の値を返す。"
1292
1293 #. type: Plain text
1294 #: build/C/man3/flockfile.3:127
1295 msgid "None."
1296 msgstr "なし。"
1297
1298 #. type: Plain text
1299 #: build/C/man3/flockfile.3:129 build/C/man3/popen.3:174
1300 msgid "POSIX.1-2001."
1301 msgstr "POSIX.1-2001."
1302
1303 #. type: SH
1304 #: build/C/man3/flockfile.3:129
1305 #, no-wrap
1306 msgid "AVAILABILITY"
1307 msgstr "可用性"
1308
1309 #. type: Plain text
1310 #: build/C/man3/flockfile.3:135
1311 msgid ""
1312 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1313 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1314 msgstr ""
1315 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1316 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1317
1318 #. type: Plain text
1319 #: build/C/man3/flockfile.3:137
1320 msgid "B<unlocked_stdio>(3)"
1321 msgstr "B<unlocked_stdio>(3)"
1322
1323 #. type: TH
1324 #: build/C/man3/fmemopen.3:10
1325 #, no-wrap
1326 msgid "FMEMOPEN"
1327 msgstr "FMEMOPEN"
1328
1329 #. type: TH
1330 #: build/C/man3/fmemopen.3:10
1331 #, no-wrap
1332 msgid "2012-04-28"
1333 msgstr "2012-04-28"
1334
1335 #. type: Plain text
1336 #: build/C/man3/fmemopen.3:13
1337 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1338 msgstr ""
1339 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1340 "する"
1341
1342 #. type: Plain text
1343 #: build/C/man3/fmemopen.3:18
1344 #, no-wrap
1345 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1346 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1347
1348 #. type: Plain text
1349 #: build/C/man3/fmemopen.3:20
1350 #, no-wrap
1351 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1352 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1353
1354 #. type: Plain text
1355 #: build/C/man3/fmemopen.3:24
1356 #, no-wrap
1357 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1358 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1359
1360 #. type: Plain text
1361 #: build/C/man3/fmemopen.3:34
1362 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1363 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1364
1365 #. type: Plain text
1366 #: build/C/man3/fmemopen.3:57
1367 msgid ""
1368 "The B<fmemopen>()  function opens a stream that permits the access specified "
1369 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1370 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1371 "long."
1372 msgstr ""
1373 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1374 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1375 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1376 "I<size> バイトの長さでなければならない。"
1377
1378 #. type: Plain text
1379 #: build/C/man3/fmemopen.3:77
1380 msgid ""
1381 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1382 "an append mode, then the initial file position is set to the location of the "
1383 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1384 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1385 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1386 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1387 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1388 "e., the value specified by the I<size> argument), rather than the current "
1389 "string length."
1390 msgstr ""
1391 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1392 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1393 "最初の NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1394 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1395 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1396 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1397 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1398 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1399 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1400
1401 #. type: Plain text
1402 #: build/C/man3/fmemopen.3:89
1403 msgid ""
1404 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1405 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1406 "there is space.  The caller should ensure that an extra byte is available in "
1407 "the buffer (and that I<size> counts that byte)  to allow for this."
1408 msgstr ""
1409 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1410 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1411 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1412 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1413
1414 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1415 #.  and
1416 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1417 #. type: Plain text
1418 #: build/C/man3/fmemopen.3:107
1419 msgid ""
1420 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1421 "(By default, such errors will be visible only when the I<stdio> buffer is "
1422 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1423 "detect errors at the time of an output operation.  Alternatively, the caller "
1424 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1425 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1426 msgstr ""
1427 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1428 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1429 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1430 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1431 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1432 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1433 "stdio に教える方法がある。)"
1434
1435 #. type: Plain text
1436 #: build/C/man3/fmemopen.3:115
1437 msgid ""
1438 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1439 "not cause read operations to return an end-of-file indication.  A read from "
1440 "the buffer will only indicate end-of-file when the file pointer advances "
1441 "I<size> bytes past the start of the buffer."
1442 msgstr ""
1443 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1444 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1445 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1446 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1447
1448 #. type: Plain text
1449 #: build/C/man3/fmemopen.3:130
1450 msgid ""
1451 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1452 "buffer I<size> bytes long.  This is useful for an application that wants to "
1453 "write data to a temporary buffer and then read it back again.  The buffer is "
1454 "automatically freed when the stream is closed.  Note that the caller has no "
1455 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1456 "see B<open_memstream>()  below)."
1457 msgstr ""
1458 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1459 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1460 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1461 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1462 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1463 "の B<open_memstream>()  も参照)。"
1464
1465 #. type: Plain text
1466 #: build/C/man3/fmemopen.3:141
1467 msgid ""
1468 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1469 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1470 "automatically grows as required.  After closing the stream, the caller "
1471 "should B<free>(3)  this buffer."
1472 msgstr ""
1473 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1474 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1475 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1476 "B<free>(3)  すべきである。"
1477
1478 #. type: Plain text
1479 #: build/C/man3/fmemopen.3:156
1480 msgid ""
1481 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1482 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1483 "respectively, a pointer to the buffer and the current size of the buffer.  "
1484 "These values remain valid only as long as the caller performs no further "
1485 "output on the stream.  If further output is performed, then the stream must "
1486 "again be flushed before trying to access these variables."
1487 msgstr ""
1488 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1489 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1490 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1491 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1492 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1493
1494 #. type: Plain text
1495 #: build/C/man3/fmemopen.3:162
1496 msgid ""
1497 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1498 "included in the size value stored at I<sizeloc>."
1499 msgstr ""
1500 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1501 "されるサイズには「含まれない」。"
1502
1503 #. type: Plain text
1504 #: build/C/man3/fmemopen.3:170
1505 msgid ""
1506 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1507 "(3).  Moving the file position past the end of the data already written "
1508 "fills the intervening space with zeros."
1509 msgstr ""
1510 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1511 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1512 "は 0 で埋められる。"
1513
1514 #. type: Plain text
1515 #: build/C/man3/fmemopen.3:176
1516 msgid ""
1517 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1518 "wide characters instead of bytes."
1519 msgstr ""
1520 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1521 "ド文字に対して操作を行う点が異なる。"
1522
1523 #. type: Plain text
1524 #: build/C/man3/fmemopen.3:188
1525 msgid ""
1526 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1527 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1528 "and I<errno> is set to indicate the error."
1529 msgstr ""
1530 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1531 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1532 "し、 I<errno> にエラーを示す値をセットする。"
1533
1534 #. type: SH
1535 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1536 #: build/C/man3/getline.3:135 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1537 #, no-wrap
1538 msgid "VERSIONS"
1539 msgstr "バージョン"
1540
1541 #. type: Plain text
1542 #: build/C/man3/fmemopen.3:195
1543 msgid ""
1544 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1545 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1546 msgstr ""
1547 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1548 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1549
1550 #. type: Plain text
1551 #: build/C/man3/fmemopen.3:199
1552 msgid ""
1553 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1554 "not widely available on other systems."
1555 msgstr ""
1556 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1557 "のシステムで広く利用可能である。"
1558
1559 #.  http://austingroupbugs.net/view.php?id=396
1560 #. type: Plain text
1561 #: build/C/man3/fmemopen.3:207
1562 msgid ""
1563 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1564 "However, Technical Corrigendum 1 adjusts the standard to allow "
1565 "implementation-specific treatment for this case, thus permitting the glibc "
1566 "treatment of \\(aqb\\(aq."
1567 msgstr ""
1568 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1569 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1570 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1571 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1572
1573 #. type: Plain text
1574 #: build/C/man3/fmemopen.3:213
1575 msgid ""
1576 "There is no file descriptor associated with the file stream returned by "
1577 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1578 "returned stream)."
1579 msgstr ""
1580 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1581 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1582 "とになる)。"
1583
1584 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1585 #. type: Plain text
1586 #: build/C/man3/fmemopen.3:220
1587 msgid ""
1588 "In glibc before version 2.7, seeking past the end of a stream created by "
1589 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1590 "call fails, returning -1."
1591 msgstr ""
1592 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1593 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1594 "B<fseek>(3)  が失敗し -1 が返る。"
1595
1596 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1597 #. type: Plain text
1598 #: build/C/man3/fmemopen.3:231
1599 msgid ""
1600 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1601 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1602 "stream that then returned end of file on the first attempt at reading.  "
1603 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1604 msgstr ""
1605 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1606 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1607 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1608 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1609
1610 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1611 #. type: Plain text
1612 #: build/C/man3/fmemopen.3:239
1613 msgid ""
1614 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1615 "file position to the first null byte, but (if the file offset is reset to a "
1616 "location other than the end of the stream)  does not force subsequent writes "
1617 "to append at the end of the stream."
1618 msgstr ""
1619 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1620 "ファイル位置の初期値は最初の NULL バイトに設定されるが、(ファイル\n"
1621 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1622 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1623
1624 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1625 #. type: Plain text
1626 #: build/C/man3/fmemopen.3:255
1627 msgid ""
1628 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1629 "\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1630 "according to POSIX.1-2008, the initial file position should be set to the "
1631 "next byte after the end of the buffer.  However, in this case the glibc "
1632 "B<fmemopen>()  sets the file position to -1."
1633 msgstr ""
1634 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1635 "I<size> 引き数で指定した範囲の I<buf> 内に NULL バイトがない場合、\n"
1636 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1637 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1638 "この場合ファイル位置は -1 に設定される。"
1639
1640 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1641 #. type: Plain text
1642 #: build/C/man3/fmemopen.3:268
1643 msgid ""
1644 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1645 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1646 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1647 "I<mode> by B<fopen>(3)."
1648 msgstr ""
1649 "B<fmemopen>() でバイナリモードを指定するには、\n"
1650 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1651 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1652 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1653
1654 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1655 #. type: Plain text
1656 #: build/C/man3/fmemopen.3:276
1657 msgid ""
1658 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1659 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1660 msgstr ""
1661 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1662 "ABI (Application Binary Interface) が黙って変更された。\n"
1663 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1664
1665 #. type: SH
1666 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1667 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1668 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:973
1669 #: build/C/man2/readlink.2:157 build/C/man2/readv.2:265
1670 #: build/C/man3/scanf.3:681
1671 #, no-wrap
1672 msgid "EXAMPLE"
1673 msgstr "例"
1674
1675 #. type: Plain text
1676 #: build/C/man3/fmemopen.3:286
1677 msgid ""
1678 "The program below uses B<fmemopen>()  to open an input buffer, and "
1679 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1680 "scans its input string (taken from the program's first command-line "
1681 "argument) reading integers, and writes the squares of these integers to the "
1682 "output buffer.  An example of the output produced by this program is the "
1683 "following:"
1684 msgstr ""
1685 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1686 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1687 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1688 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1689 "ムの実行例は以下のようになる。"
1690
1691 #. type: Plain text
1692 #: build/C/man3/fmemopen.3:291
1693 #, no-wrap
1694 msgid ""
1695 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1696 "size=11; ptr=1 529 1849\n"
1697 msgstr ""
1698 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1699 "size=11; ptr=1 529 1849\n"
1700
1701 #. type: SS
1702 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1703 #, no-wrap
1704 msgid "Program source"
1705 msgstr "プログラムのソース"
1706
1707 #. type: Plain text
1708 #: build/C/man3/fmemopen.3:300
1709 #, no-wrap
1710 msgid ""
1711 "#define _GNU_SOURCE\n"
1712 "#include E<lt>string.hE<gt>\n"
1713 "#include E<lt>stdio.hE<gt>\n"
1714 "#include E<lt>stdlib.hE<gt>\n"
1715 msgstr ""
1716 "#define _GNU_SOURCE\n"
1717 "#include E<lt>string.hE<gt>\n"
1718 "#include E<lt>stdio.hE<gt>\n"
1719 "#include E<lt>stdlib.hE<gt>\n"
1720
1721 #. type: Plain text
1722 #: build/C/man3/fmemopen.3:303
1723 #, no-wrap
1724 msgid ""
1725 "#define handle_error(msg) \\e\n"
1726 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1727 msgstr ""
1728 "#define handle_error(msg) \\e\n"
1729 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1730
1731 #. type: Plain text
1732 #: build/C/man3/fmemopen.3:311
1733 #, no-wrap
1734 msgid ""
1735 "int\n"
1736 "main(int argc, char *argv[])\n"
1737 "{\n"
1738 "    FILE *out, *in;\n"
1739 "    int v, s;\n"
1740 "    size_t size;\n"
1741 "    char *ptr;\n"
1742 msgstr ""
1743 "int\n"
1744 "main(int argc, char *argv[])\n"
1745 "{\n"
1746 "    FILE *out, *in;\n"
1747 "    int v, s;\n"
1748 "    size_t size;\n"
1749 "    char *ptr;\n"
1750
1751 #. type: Plain text
1752 #: build/C/man3/fmemopen.3:316
1753 #, no-wrap
1754 msgid ""
1755 "    if (argc != 2) {\n"
1756 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1757 "\texit(EXIT_FAILURE);\n"
1758 "    }\n"
1759 msgstr ""
1760 "    if (argc != 2) {\n"
1761 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1762 "\texit(EXIT_FAILURE);\n"
1763 "    }\n"
1764
1765 #. type: Plain text
1766 #: build/C/man3/fmemopen.3:320
1767 #, no-wrap
1768 msgid ""
1769 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1770 "    if (in == NULL)\n"
1771 "        handle_error(\"fmemopen\");\n"
1772 msgstr ""
1773 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1774 "    if (in == NULL)\n"
1775 "        handle_error(\"fmemopen\");\n"
1776
1777 #. type: Plain text
1778 #: build/C/man3/fmemopen.3:324
1779 #, no-wrap
1780 msgid ""
1781 "    out = open_memstream(&ptr, &size);\n"
1782 "    if (out == NULL)\n"
1783 "        handle_error(\"open_memstream\");\n"
1784 msgstr ""
1785 "    out = open_memstream(&ptr, &size);\n"
1786 "    if (out == NULL)\n"
1787 "        handle_error(\"open_memstream\");\n"
1788
1789 #. type: Plain text
1790 #: build/C/man3/fmemopen.3:329
1791 #, no-wrap
1792 msgid ""
1793 "    for (;;) {\n"
1794 "        s = fscanf(in, \"%d\", &v);\n"
1795 "        if (s E<lt>= 0)\n"
1796 "            break;\n"
1797 msgstr ""
1798 "    for (;;) {\n"
1799 "        s = fscanf(in, \"%d\", &v);\n"
1800 "        if (s E<lt>= 0)\n"
1801 "            break;\n"
1802
1803 #. type: Plain text
1804 #: build/C/man3/fmemopen.3:340
1805 #, no-wrap
1806 msgid ""
1807 "        s = fprintf(out, \"%d \", v * v);\n"
1808 "        if (s == -1)\n"
1809 "            handle_error(\"fprintf\");\n"
1810 "    }\n"
1811 "    fclose(in);\n"
1812 "    fclose(out);\n"
1813 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1814 "    free(ptr);\n"
1815 "    exit(EXIT_SUCCESS);\n"
1816 "}\n"
1817 msgstr ""
1818 "        s = fprintf(out, \"%d \", v * v);\n"
1819 "        if (s == -1)\n"
1820 "            handle_error(\"fprintf\");\n"
1821 "    }\n"
1822 "    fclose(in);\n"
1823 "    fclose(out);\n"
1824 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1825 "    free(ptr);\n"
1826 "    exit(EXIT_SUCCESS);\n"
1827 "}\n"
1828
1829 #. type: Plain text
1830 #: build/C/man3/fmemopen.3:344
1831 msgid "B<fopen>(3), B<fopencookie>(3)"
1832 msgstr "B<fopen>(3), B<fopencookie>(3)"
1833
1834 #. type: TH
1835 #: build/C/man3/fmtmsg.3:13
1836 #, no-wrap
1837 msgid "FMTMSG"
1838 msgstr "FMTMSG"
1839
1840 #. type: Plain text
1841 #: build/C/man3/fmtmsg.3:16
1842 msgid "fmtmsg - print formatted error messages"
1843 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1844
1845 #. type: Plain text
1846 #: build/C/man3/fmtmsg.3:19
1847 #, no-wrap
1848 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1849 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1850
1851 #. type: Plain text
1852 #: build/C/man3/fmtmsg.3:21
1853 #, no-wrap
1854 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1855 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1856
1857 #. type: Plain text
1858 #: build/C/man3/fmtmsg.3:23
1859 #, no-wrap
1860 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1861 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1862
1863 #. type: Plain text
1864 #: build/C/man3/fmtmsg.3:25
1865 #, no-wrap
1866 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1867 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1868
1869 #. type: Plain text
1870 #: build/C/man3/fmtmsg.3:36
1871 msgid ""
1872 "This function displays a message described by its arguments on the device"
1873 "(s)  specified in the I<classification> argument.  For messages written to "
1874 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1875 msgstr ""
1876 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1877 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1878 "は、 B<MSGVERB> 環境変数に依存する。"
1879
1880 #. type: Plain text
1881 #: build/C/man3/fmtmsg.3:43
1882 msgid ""
1883 "The I<label> argument identifies the source of the message.  The string must "
1884 "consist of two colon separated parts where the first part has not more than "
1885 "10 and the second part not more than 14 characters."
1886 msgstr ""
1887 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1888 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1889 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1890
1891 #. type: Plain text
1892 #: build/C/man3/fmtmsg.3:47
1893 msgid "The I<text> argument describes the condition of the error."
1894 msgstr "I<text> 引き数にはエラー条件を記述する。"
1895
1896 #. type: Plain text
1897 #: build/C/man3/fmtmsg.3:52
1898 msgid ""
1899 "The I<action> argument describes possible steps to recover from the error.  "
1900 "If it is printed, it is prefixed by \"TO FIX: \"."
1901 msgstr ""
1902 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1903 "れが表示される場合、\"TO FIX: \" が前に付く。"
1904
1905 #. type: Plain text
1906 #: build/C/man3/fmtmsg.3:60
1907 msgid ""
1908 "The I<tag> argument is a reference to the online documentation where more "
1909 "information can be found.  It should contain the I<label> value and a unique "
1910 "identification number."
1911 msgstr ""
1912 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1913 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1914
1915 #. type: SS
1916 #: build/C/man3/fmtmsg.3:60
1917 #, no-wrap
1918 msgid "Dummy arguments"
1919 msgstr "ダミー引き数"
1920
1921 #. type: Plain text
1922 #: build/C/man3/fmtmsg.3:79
1923 msgid ""
1924 "Each of the arguments can have a dummy value.  The dummy classification "
1925 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1926 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1927 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1928 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
1929 "synonym for B<NO_SEV>."
1930 msgstr ""
1931 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1932 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1933 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1934 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1935 "((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名"
1936 "である。"
1937
1938 #. type: SS
1939 #: build/C/man3/fmtmsg.3:79
1940 #, no-wrap
1941 msgid "The classification argument"
1942 msgstr "classification 引き数"
1943
1944 #. type: Plain text
1945 #: build/C/man3/fmtmsg.3:83
1946 msgid ""
1947 "The I<classification> argument is the sum of values describing 4 types of "
1948 "information."
1949 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1950
1951 #. type: Plain text
1952 #: build/C/man3/fmtmsg.3:86
1953 msgid "The first value defines the output channel."
1954 msgstr "最初の値は出力チャンネルを定義する。"
1955
1956 #. type: TP
1957 #: build/C/man3/fmtmsg.3:86
1958 #, no-wrap
1959 msgid "B<MM_PRINT>"
1960 msgstr "B<MM_PRINT>"
1961
1962 #. type: Plain text
1963 #: build/C/man3/fmtmsg.3:90
1964 msgid "Output to I<stderr>."
1965 msgstr "I<stderr> に出力する。"
1966
1967 #. type: TP
1968 #: build/C/man3/fmtmsg.3:90
1969 #, no-wrap
1970 msgid "B<MM_CONSOLE>"
1971 msgstr "B<MM_CONSOLE>"
1972
1973 #. type: Plain text
1974 #: build/C/man3/fmtmsg.3:93
1975 msgid "Output to the system console."
1976 msgstr "システムコンソールに出力する。"
1977
1978 #. type: TP
1979 #: build/C/man3/fmtmsg.3:93
1980 #, no-wrap
1981 msgid "B<MM_PRINT | MM_CONSOLE>"
1982 msgstr "B<MM_PRINT | MM_CONSOLE>"
1983
1984 #. type: Plain text
1985 #: build/C/man3/fmtmsg.3:96
1986 msgid "Output to both."
1987 msgstr "両方に出力する。"
1988
1989 #. type: Plain text
1990 #: build/C/man3/fmtmsg.3:98
1991 msgid "The second value is the source of the error:"
1992 msgstr "2 番目の値はエラーの発生源である:"
1993
1994 #. type: TP
1995 #: build/C/man3/fmtmsg.3:98
1996 #, no-wrap
1997 msgid "B<MM_HARD>"
1998 msgstr "B<MM_HARD>"
1999
2000 #. type: Plain text
2001 #: build/C/man3/fmtmsg.3:101
2002 msgid "A hardware error occurred."
2003 msgstr "ハードウェアエラーが起こった。"
2004
2005 #. type: TP
2006 #: build/C/man3/fmtmsg.3:101
2007 #, no-wrap
2008 msgid "B<MM_FIRM>"
2009 msgstr "B<MM_FIRM>"
2010
2011 #. type: Plain text
2012 #: build/C/man3/fmtmsg.3:104
2013 msgid "A firmware error occurred."
2014 msgstr "ファームウェアエラーが起こった。"
2015
2016 #. type: TP
2017 #: build/C/man3/fmtmsg.3:104
2018 #, no-wrap
2019 msgid "B<MM_SOFT>"
2020 msgstr "B<MM_SOFT>"
2021
2022 #. type: Plain text
2023 #: build/C/man3/fmtmsg.3:107
2024 msgid "A software error occurred."
2025 msgstr "ソフトウェアエラーが起こった。"
2026
2027 #. type: Plain text
2028 #: build/C/man3/fmtmsg.3:109
2029 msgid "The third value encodes the detector of the problem:"
2030 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2031
2032 #. type: TP
2033 #: build/C/man3/fmtmsg.3:109
2034 #, no-wrap
2035 msgid "B<MM_APPL>"
2036 msgstr "B<MM_APPL>"
2037
2038 #. type: Plain text
2039 #: build/C/man3/fmtmsg.3:112
2040 msgid "It is detected by an application."
2041 msgstr "アプリケーションによって検知された。"
2042
2043 #. type: TP
2044 #: build/C/man3/fmtmsg.3:112
2045 #, no-wrap
2046 msgid "B<MM_UTIL>"
2047 msgstr "B<MM_UTIL>"
2048
2049 #. type: Plain text
2050 #: build/C/man3/fmtmsg.3:115
2051 msgid "It is detected by a utility."
2052 msgstr "ユーティリティによって検知された。"
2053
2054 #. type: TP
2055 #: build/C/man3/fmtmsg.3:115
2056 #, no-wrap
2057 msgid "B<MM_OPSYS>"
2058 msgstr "B<MM_OPSYS>"
2059
2060 #. type: Plain text
2061 #: build/C/man3/fmtmsg.3:118
2062 msgid "It is detected by the operating system."
2063 msgstr "オペレーティングシステムによって検知された。"
2064
2065 #. type: Plain text
2066 #: build/C/man3/fmtmsg.3:120
2067 msgid "The fourth value shows the severity of the incident:"
2068 msgstr "4 番目の値は問題の重大度を表す:"
2069
2070 #. type: TP
2071 #: build/C/man3/fmtmsg.3:120
2072 #, no-wrap
2073 msgid "B<MM_RECOVER>"
2074 msgstr "B<MM_RECOVER>"
2075
2076 #. type: Plain text
2077 #: build/C/man3/fmtmsg.3:123
2078 msgid "It is a recoverable error."
2079 msgstr "回復可能なエラーである。"
2080
2081 #. type: TP
2082 #: build/C/man3/fmtmsg.3:123
2083 #, no-wrap
2084 msgid "B<MM_NRECOV>"
2085 msgstr "B<MM_NRECOV>"
2086
2087 #. type: Plain text
2088 #: build/C/man3/fmtmsg.3:126
2089 msgid "It is a nonrecoverable error."
2090 msgstr "回復不可能なエラーである。"
2091
2092 #. type: SS
2093 #: build/C/man3/fmtmsg.3:126
2094 #, no-wrap
2095 msgid "The severity argument"
2096 msgstr "severity 引き数"
2097
2098 #. type: Plain text
2099 #: build/C/man3/fmtmsg.3:130
2100 msgid "The I<severity> argument can take one of the following values:"
2101 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2102
2103 #. type: TP
2104 #: build/C/man3/fmtmsg.3:130
2105 #, no-wrap
2106 msgid "B<MM_NOSEV>"
2107 msgstr "B<MM_NOSEV>"
2108
2109 #. type: Plain text
2110 #: build/C/man3/fmtmsg.3:133
2111 msgid "No severity is printed."
2112 msgstr "重大度は表示されない。"
2113
2114 #. type: TP
2115 #: build/C/man3/fmtmsg.3:133
2116 #, no-wrap
2117 msgid "B<MM_HALT>"
2118 msgstr "B<MM_HALT>"
2119
2120 #. type: Plain text
2121 #: build/C/man3/fmtmsg.3:136
2122 msgid "This value is printed as HALT."
2123 msgstr "この値は HALT として表示される。"
2124
2125 #. type: TP
2126 #: build/C/man3/fmtmsg.3:136
2127 #, no-wrap
2128 msgid "B<MM_ERROR>"
2129 msgstr "B<MM_ERROR>"
2130
2131 #. type: Plain text
2132 #: build/C/man3/fmtmsg.3:139
2133 msgid "This value is printed as ERROR."
2134 msgstr "この値は ERROR として表示される。"
2135
2136 #. type: TP
2137 #: build/C/man3/fmtmsg.3:139
2138 #, no-wrap
2139 msgid "B<MM_WARNING>"
2140 msgstr "B<MM_WARNING>"
2141
2142 #. type: Plain text
2143 #: build/C/man3/fmtmsg.3:142
2144 msgid "This value is printed as WARNING."
2145 msgstr "この値は WARNING として表示される。"
2146
2147 #. type: TP
2148 #: build/C/man3/fmtmsg.3:142
2149 #, no-wrap
2150 msgid "B<MM_INFO>"
2151 msgstr "B<MM_INFO>"
2152
2153 #. type: Plain text
2154 #: build/C/man3/fmtmsg.3:145
2155 msgid "This value is printed as INFO."
2156 msgstr "この値は INFO として表示される。"
2157
2158 #. type: Plain text
2159 #: build/C/man3/fmtmsg.3:152
2160 msgid ""
2161 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2162 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2163 "print."
2164 msgstr ""
2165 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2166 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2167
2168 #. type: Plain text
2169 #: build/C/man3/fmtmsg.3:154
2170 msgid "The function can return 4 values:"
2171 msgstr "関数は 4 つの値を返す:"
2172
2173 #. type: TP
2174 #: build/C/man3/fmtmsg.3:154
2175 #, no-wrap
2176 msgid "B<MM_OK>"
2177 msgstr "B<MM_OK>"
2178
2179 #. type: Plain text
2180 #: build/C/man3/fmtmsg.3:157
2181 msgid "Everything went smooth."
2182 msgstr "全てがうまくいった。"
2183
2184 #. type: TP
2185 #: build/C/man3/fmtmsg.3:157
2186 #, no-wrap
2187 msgid "B<MM_NOTOK>"
2188 msgstr "B<MM_NOTOK>"
2189
2190 #. type: Plain text
2191 #: build/C/man3/fmtmsg.3:160
2192 msgid "Complete failure."
2193 msgstr "完全に失敗した。"
2194
2195 #. type: TP
2196 #: build/C/man3/fmtmsg.3:160
2197 #, no-wrap
2198 msgid "B<MM_NOMSG>"
2199 msgstr "B<MM_NOMSG>"
2200
2201 #. type: Plain text
2202 #: build/C/man3/fmtmsg.3:164
2203 msgid "Error writing to I<stderr>."
2204 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2205
2206 #. type: TP
2207 #: build/C/man3/fmtmsg.3:164
2208 #, no-wrap
2209 msgid "B<MM_NOCON>"
2210 msgstr "B<MM_NOCON>"
2211
2212 #. type: Plain text
2213 #: build/C/man3/fmtmsg.3:167
2214 msgid "Error writing to the console."
2215 msgstr "コンソールに書き込むときにエラーが起こった。"
2216
2217 #. type: SH
2218 #: build/C/man3/fmtmsg.3:167
2219 #, no-wrap
2220 msgid "ENVIRONMENT"
2221 msgstr "環境変数"
2222
2223 #. type: Plain text
2224 #: build/C/man3/fmtmsg.3:178
2225 msgid ""
2226 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2227 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2228 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2229 "separated list of valid keywords, then only the parts of the message "
2230 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2231 "\"severity\", \"text\", \"action\" and \"tag\"."
2232 msgstr ""
2233 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2234 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2235 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2236 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2237 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2238
2239 #. type: Plain text
2240 #: build/C/man3/fmtmsg.3:190
2241 msgid ""
2242 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2243 "levels.  By default, only the five severity levels described above are "
2244 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2245 "If the user puts B<SEV_LEVEL> with a format like"
2246 msgstr ""
2247 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2248 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2249 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2250 "B<SEV_LEVEL> を"
2251
2252 #. type: Plain text
2253 #: build/C/man3/fmtmsg.3:193
2254 msgid "SEV_LEVEL=[description[:description[:...]]]"
2255 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2256
2257 #. type: Plain text
2258 #: build/C/man3/fmtmsg.3:198
2259 msgid ""
2260 "in the environment of the process before the first call to B<fmtmsg>(), "
2261 "where each description is of the form"
2262 msgstr ""
2263 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2264 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2265 "指定された printstring を表示する。 各 description は"
2266
2267 #. type: Plain text
2268 #: build/C/man3/fmtmsg.3:201
2269 msgid "severity-keyword,level,printstring"
2270 msgstr "severity-keyword,level,printstring"
2271
2272 #. type: Plain text
2273 #: build/C/man3/fmtmsg.3:208
2274 msgid ""
2275 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2276 "addition to the standard levels 0-4), and use the indicated printstring when "
2277 "such a level occurs."
2278 msgstr "という形式である。"
2279
2280 #. type: Plain text
2281 #: build/C/man3/fmtmsg.3:222
2282 msgid ""
2283 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2284 "present.  The level part is a string representation of a number.  The "
2285 "numeric value must be a number greater than 4.  This value must be used in "
2286 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2287 "possible to overwrite any of the predefined classes.  The printstring is the "
2288 "string printed when a message of this class is processed by B<fmtmsg>()."
2289 msgstr ""
2290 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2291 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2292 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2293 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2294 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2295 "た場合に表示される文字列である。"
2296
2297 #. type: Plain text
2298 #: build/C/man3/fmtmsg.3:225
2299 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2300 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2301
2302 #. type: Plain text
2303 #: build/C/man3/fmtmsg.3:231
2304 msgid ""
2305 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2306 "not protected, so it is not thread-safe."
2307 msgstr ""
2308
2309 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2310 #. type: Plain text
2311 #: build/C/man3/fmtmsg.3:237
2312 msgid ""
2313 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2314 "static variable, so it is thread-safe."
2315 msgstr ""
2316
2317 #. type: Plain text
2318 #: build/C/man3/fmtmsg.3:252
2319 msgid ""
2320 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2321 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2322 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2323 msgstr ""
2324 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2325 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2326 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2327
2328 #. type: Plain text
2329 #: build/C/man3/fmtmsg.3:256
2330 msgid ""
2331 "System V and UnixWare man pages tell us that these functions have been "
2332 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2333 "vlfmt()\", and will be removed later."
2334 msgstr ""
2335 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2336 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2337 "は削除される予定である」と書かれている。"
2338
2339 #. type: Plain text
2340 #: build/C/man3/fmtmsg.3:261
2341 #, no-wrap
2342 msgid ""
2343 "#include E<lt>stdio.hE<gt>\n"
2344 "#include E<lt>stdlib.hE<gt>\n"
2345 "#include E<lt>fmtmsg.hE<gt>\n"
2346 msgstr ""
2347 "#include E<lt>stdio.hE<gt>\n"
2348 "#include E<lt>stdlib.hE<gt>\n"
2349 "#include E<lt>fmtmsg.hE<gt>\n"
2350
2351 #. type: Plain text
2352 #: build/C/man3/fmtmsg.3:267
2353 #, no-wrap
2354 msgid ""
2355 "int\n"
2356 "main(void)\n"
2357 "{\n"
2358 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2359 "    int err;\n"
2360 msgstr ""
2361 "int\n"
2362 "main(void)\n"
2363 "{\n"
2364 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2365 "    int err;\n"
2366
2367 #. type: Plain text
2368 #: build/C/man3/fmtmsg.3:288
2369 #, no-wrap
2370 msgid ""
2371 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2372 "                \"unknown mount option\", \"See mount(8).\",\n"
2373 "                \"util-linux:mount:017\");\n"
2374 "    switch (err) {\n"
2375 "    case MM_OK:\n"
2376 "        break;\n"
2377 "    case MM_NOTOK:\n"
2378 "        printf(\"Nothing printed\\en\");\n"
2379 "        break;\n"
2380 "    case MM_NOMSG:\n"
2381 "        printf(\"Nothing printed to stderr\\en\");\n"
2382 "        break;\n"
2383 "    case MM_NOCON:\n"
2384 "        printf(\"No console output\\en\");\n"
2385 "        break;\n"
2386 "    default:\n"
2387 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2388 "    }\n"
2389 "    exit(EXIT_SUCCESS);\n"
2390 "}\n"
2391 msgstr ""
2392 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2393 "                \"unknown mount option\", \"See mount(8).\",\n"
2394 "                \"util-linux:mount:017\");\n"
2395 "    switch (err) {\n"
2396 "    case MM_OK:\n"
2397 "      break;\n"
2398 "    case MM_NOTOK:\n"
2399 "        printf(\"Nothing printed\\en\");\n"
2400 "        break;\n"
2401 "    case MM_NOMSG:\n"
2402 "        printf(\"Nothing printed to stderr\\en\");\n"
2403 "        break;\n"
2404 "    case MM_NOCON:\n"
2405 "        printf(\"No console output\\en\");\n"
2406 "        break;\n"
2407 "    default:\n"
2408 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2409 "    }\n"
2410 "    exit(EXIT_SUCCESS);\n"
2411 "}\n"
2412
2413 #. type: Plain text
2414 #: build/C/man3/fmtmsg.3:291
2415 msgid "The output should be:"
2416 msgstr "出力は"
2417
2418 #. type: Plain text
2419 #: build/C/man3/fmtmsg.3:295
2420 #, no-wrap
2421 msgid ""
2422 "    util-linux:mount: ERROR: unknown mount option\n"
2423 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2424 msgstr ""
2425 "    util-linux:mount: ERROR: unknown mount option\n"
2426 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2427
2428 #. type: Plain text
2429 #: build/C/man3/fmtmsg.3:298
2430 msgid "and after"
2431 msgstr "のようになり、"
2432
2433 #. type: Plain text
2434 #: build/C/man3/fmtmsg.3:301
2435 #, no-wrap
2436 msgid "    MSGVERB=text:action; export MSGVERB\n"
2437 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2438
2439 #. type: Plain text
2440 #: build/C/man3/fmtmsg.3:304
2441 msgid "the output becomes:"
2442 msgstr "を実行すると、次のようになる。"
2443
2444 #. type: Plain text
2445 #: build/C/man3/fmtmsg.3:308
2446 #, no-wrap
2447 msgid ""
2448 "    unknown mount option\n"
2449 "    TO FIX: See mount(8).\n"
2450 msgstr ""
2451 "    unknown mount option\n"
2452 "    TO FIX: See mount(8).\n"
2453
2454 #. type: Plain text
2455 #: build/C/man3/fmtmsg.3:312
2456 msgid "B<addseverity>(3), B<perror>(3)"
2457 msgstr "B<addseverity>(3), B<perror>(3)"
2458
2459 #. type: TH
2460 #: build/C/man3/fopen.3:44
2461 #, no-wrap
2462 msgid "FOPEN"
2463 msgstr "FOPEN"
2464
2465 #. type: TH
2466 #: build/C/man3/fopen.3:44
2467 #, no-wrap
2468 msgid "2012-04-22"
2469 msgstr "2012-04-22"
2470
2471 #. type: Plain text
2472 #: build/C/man3/fopen.3:47
2473 msgid "fopen, fdopen, freopen - stream open functions"
2474 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2475
2476 #. type: Plain text
2477 #: build/C/man3/fopen.3:52
2478 #, no-wrap
2479 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2480 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2481
2482 #. type: Plain text
2483 #: build/C/man3/fopen.3:54
2484 #, no-wrap
2485 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2486 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2487
2488 #. type: Plain text
2489 #: build/C/man3/fopen.3:56
2490 #, no-wrap
2491 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2492 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2493
2494 #. type: Plain text
2495 #: build/C/man3/fopen.3:65
2496 msgid ""
2497 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2498 msgstr ""
2499 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2500
2501 #. type: Plain text
2502 #: build/C/man3/fopen.3:71
2503 msgid ""
2504 "The B<fopen>()  function opens the file whose name is the string pointed to "
2505 "by I<path> and associates a stream with it."
2506 msgstr ""
2507 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2508 "びつける。"
2509
2510 #. type: Plain text
2511 #: build/C/man3/fopen.3:76
2512 msgid ""
2513 "The argument I<mode> points to a string beginning with one of the following "
2514 "sequences (possibly followed by additional characters, as described below):"
2515 msgstr ""
2516 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2517 "る (以下の述べる、追加の文字が後に続くこともある):"
2518
2519 #. type: TP
2520 #: build/C/man3/fopen.3:76
2521 #, no-wrap
2522 msgid "B<r>"
2523 msgstr "B<r>"
2524
2525 #. type: Plain text
2526 #: build/C/man3/fopen.3:80
2527 msgid ""
2528 "Open text file for reading.  The stream is positioned at the beginning of "
2529 "the file."
2530 msgstr ""
2531 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2532 "る。"
2533
2534 #. type: TP
2535 #: build/C/man3/fopen.3:80
2536 #, no-wrap
2537 msgid "B<r+>"
2538 msgstr "B<r+>"
2539
2540 #. type: Plain text
2541 #: build/C/man3/fopen.3:84
2542 msgid ""
2543 "Open for reading and writing.  The stream is positioned at the beginning of "
2544 "the file."
2545 msgstr ""
2546 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2547 "る。"
2548
2549 #. type: TP
2550 #: build/C/man3/fopen.3:84
2551 #, no-wrap
2552 msgid "B<w>"
2553 msgstr "B<w>"
2554
2555 #. type: Plain text
2556 #: build/C/man3/fopen.3:88
2557 msgid ""
2558 "Truncate file to zero length or create text file for writing.  The stream is "
2559 "positioned at the beginning of the file."
2560 msgstr ""
2561 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2562 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2563 "頭に位置される。"
2564
2565 #. type: TP
2566 #: build/C/man3/fopen.3:88
2567 #, no-wrap
2568 msgid "B<w+>"
2569 msgstr "B<w+>"
2570
2571 #. type: Plain text
2572 #: build/C/man3/fopen.3:94
2573 msgid ""
2574 "Open for reading and writing.  The file is created if it does not exist, "
2575 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2576 "file."
2577 msgstr ""
2578 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2579 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2580 "の先頭に位置される。"
2581
2582 #. type: TP
2583 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2584 #, no-wrap
2585 msgid "B<a>"
2586 msgstr "B<a>"
2587
2588 #. type: Plain text
2589 #: build/C/man3/fopen.3:99
2590 msgid ""
2591 "Open for appending (writing at end of file).  The file is created if it does "
2592 "not exist.  The stream is positioned at the end of the file."
2593 msgstr ""
2594 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2595 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2596
2597 #. type: TP
2598 #: build/C/man3/fopen.3:99
2599 #, no-wrap
2600 msgid "B<a+>"
2601 msgstr "B<a+>"
2602
2603 #. type: Plain text
2604 #: build/C/man3/fopen.3:105
2605 msgid ""
2606 "Open for reading and appending (writing at end of file).  The file is "
2607 "created if it does not exist.  The initial file position for reading is at "
2608 "the beginning of the file, but output is always appended to the end of the "
2609 "file."
2610 msgstr ""
2611 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2612 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2613 "あるが、 書き込みは常にファイルの最後に追加される。"
2614
2615 #. type: Plain text
2616 #: build/C/man3/fopen.3:118
2617 msgid ""
2618 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2619 "character or as a character between the characters in any of the two-"
2620 "character strings described above.  This is strictly for compatibility with "
2621 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2622 "systems, including Linux.  (Other systems may treat text files and binary "
2623 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2624 "O to a binary file and expect that your program may be ported to non-UNIX "
2625 "environments.)"
2626 msgstr ""
2627 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2628 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2629 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2630 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2631 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2632 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2633 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2634 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2635
2636 #. type: Plain text
2637 #: build/C/man3/fopen.3:121
2638 msgid "See NOTES below for details of glibc extensions for I<mode>."
2639 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2640
2641 #. type: Plain text
2642 #: build/C/man3/fopen.3:126
2643 msgid ""
2644 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2645 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2646 "umask value (see B<umask>(2))."
2647 msgstr ""
2648 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2649 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2650 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2651
2652 #. type: Plain text
2653 #: build/C/man3/fopen.3:141
2654 msgid ""
2655 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2656 "that ANSI C requires that a file positioning function intervene between "
2657 "output and input, unless an input operation encounters end-of-file.  (If "
2658 "this condition is not met, then a read is allowed to return the result of "
2659 "writes other than the most recent.)  Therefore it is good practice (and "
2660 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2661 "(3)  operation between write and read operations on such a stream.  This "
2662 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2663 "for its synchronizing side effect."
2664 msgstr ""
2665 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2666 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2667 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2668 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2669 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2670 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2671 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2672 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2673 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2674 "い)。"
2675
2676 #. type: Plain text
2677 #: build/C/man3/fopen.3:146
2678 msgid ""
2679 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2680 "causes all subsequent write operations to this stream to occur at end-of-"
2681 "file, as if preceded the call:"
2682 msgstr ""
2683 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2684 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2685 "かのように) ファイルの末尾で行われる。"
2686
2687 #. type: Plain text
2688 #: build/C/man3/fopen.3:149
2689 #, no-wrap
2690 msgid "    fseek(stream, 0, SEEK_END);\n"
2691 msgstr "    fseek(stream, 0, SEEK_END);\n"
2692
2693 #. type: Plain text
2694 #: build/C/man3/fopen.3:171
2695 msgid ""
2696 "The B<fdopen>()  function associates a stream with the existing file "
2697 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2698 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2699 "file descriptor.  The file position indicator of the new stream is set to "
2700 "that belonging to I<fd>, and the error and end-of-file indicators are "
2701 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2702 "file descriptor is not dup'ed, and will be closed when the stream created by "
2703 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2704 "memory object is undefined."
2705 msgstr ""
2706 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2707 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2708 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2709 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2710 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2711 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2712 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2713 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2714
2715 #. type: Plain text
2716 #: build/C/man3/fopen.3:189
2717 msgid ""
2718 "The B<freopen>()  function opens the file whose name is the string pointed "
2719 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2720 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2721 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2722 "function is to change the file associated with a standard text stream "
2723 "(I<stderr>, I<stdin>, or I<stdout>)."
2724 msgstr ""
2725 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2726 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2727 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2728 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2729 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2730
2731 #. type: Plain text
2732 #: build/C/man3/fopen.3:201
2733 msgid ""
2734 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2735 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2736 "indicate the error."
2737 msgstr ""
2738 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2739 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2740
2741 #. type: TP
2742 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2743 #: build/C/man3/getline.3:126 build/C/man2/llseek.2:77
2744 #: build/C/man2/lseek.2:175 build/C/man2/pipe.2:102 build/C/man2/read.2:126
2745 #: build/C/man2/read.2:137 build/C/man2/readlink.2:95
2746 #: build/C/man2/readlink.2:104 build/C/man2/readv.2:200
2747 #: build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:565
2748 #: build/C/man2/write.2:154
2749 #, no-wrap
2750 msgid "B<EINVAL>"
2751 msgstr "B<EINVAL>"
2752
2753 #. type: Plain text
2754 #: build/C/man3/fopen.3:212
2755 msgid ""
2756 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2757 "invalid."
2758 msgstr ""
2759 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2760
2761 #. type: Plain text
2762 #: build/C/man3/fopen.3:222
2763 msgid ""
2764 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2765 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2766 msgstr ""
2767 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2768 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2769 "する。"
2770
2771 #. type: Plain text
2772 #: build/C/man3/fopen.3:229
2773 msgid ""
2774 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2775 "errors specified for the routine B<open>(2)."
2776 msgstr ""
2777 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2778 "があり、 その時は対応する値に I<errno> をセットする。"
2779
2780 #. type: Plain text
2781 #: build/C/man3/fopen.3:236
2782 msgid ""
2783 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2784 "errors specified for the routine B<fcntl>(2)."
2785 msgstr ""
2786 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2787 "とがあり、 その時は対応する値に I<errno> をセットする。"
2788
2789 #. type: Plain text
2790 #: build/C/man3/fopen.3:246
2791 msgid ""
2792 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2793 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2794 msgstr ""
2795 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2796 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2797 "トする。"
2798
2799 #. type: Plain text
2800 #: build/C/man3/fopen.3:255
2801 msgid ""
2802 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2803 "()  function conforms to POSIX.1-1990."
2804 msgstr ""
2805 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2806 "は POSIX.1-1990 に準拠している。"
2807
2808 #. type: SS
2809 #: build/C/man3/fopen.3:256
2810 #, no-wrap
2811 msgid "Glibc notes"
2812 msgstr "glibc での注意"
2813
2814 #. type: Plain text
2815 #: build/C/man3/fopen.3:259
2816 msgid ""
2817 "The GNU C library allows the following extensions for the string specified "
2818 "in I<mode>:"
2819 msgstr ""
2820 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2821 "いる:"
2822
2823 #. type: TP
2824 #: build/C/man3/fopen.3:259
2825 #, no-wrap
2826 msgid "B<c> (since glibc 2.3.3)"
2827 msgstr "B<c> (glibc 2.3.3 以降)"
2828
2829 #. type: Plain text
2830 #: build/C/man3/fopen.3:266
2831 msgid ""
2832 "Do not make the open operation, or subsequent read and write operations, "
2833 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2834 msgstr ""
2835 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2836 "(cancellation points) を作成しない。\n"
2837 "このフラグは B<fdopen>() では無視される。"
2838
2839 #. type: TP
2840 #: build/C/man3/fopen.3:266
2841 #, no-wrap
2842 msgid "B<e> (since glibc 2.7)"
2843 msgstr "B<e> (glibc 2.7 以降)"
2844
2845 #. type: Plain text
2846 #: build/C/man3/fopen.3:276
2847 msgid ""
2848 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2849 "information.  This flag is ignored for B<fdopen>()."
2850 msgstr ""
2851 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2852 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2853
2854 #. type: TP
2855 #: build/C/man3/fopen.3:276
2856 #, no-wrap
2857 msgid "B<m> (since glibc 2.3)"
2858 msgstr "B<m> (glibc 2.3 以降)"
2859
2860 #.  As at glibc 2.4:
2861 #. type: Plain text
2862 #: build/C/man3/fopen.3:288
2863 msgid ""
2864 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2865 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
2866 "for a file opened for reading."
2867 msgstr ""
2868 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2869 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2870 "オープンするファイルについてだけである。"
2871
2872 #. type: TP
2873 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2874 #, no-wrap
2875 msgid "B<x>"
2876 msgstr "B<x>"
2877
2878 #.  Since glibc 2.0?
2879 #.  FIXME C11 specifies this flag
2880 #. type: Plain text
2881 #: build/C/man3/fopen.3:305
2882 msgid ""
2883 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2884 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2885 "This flag is ignored for B<fdopen>()."
2886 msgstr ""
2887 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2888 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2889 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2890
2891 #. type: Plain text
2892 #: build/C/man3/fopen.3:313
2893 msgid ""
2894 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2895 "the following syntax in I<mode>:"
2896 msgstr ""
2897 "上記の文字に加えて、\n"
2898 "B<fopen>() と B<freopen>() では I<mode> に\n"
2899 "以下の書式を 指定することができる。"
2900
2901 #. type: Plain text
2902 #: build/C/man3/fopen.3:315
2903 msgid "B< ,ccs=>I<string>"
2904 msgstr "B< ,ccs=>I<string>"
2905
2906 #. type: Plain text
2907 #: build/C/man3/fopen.3:331
2908 msgid ""
2909 "The given I<string> is taken as the name of a coded character set and the "
2910 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2911 "functions convert I/O to and from the character set I<string>.  If the B<,"
2912 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2913 "stream is determined by the first file operation.  If that operation is a "
2914 "wide-character operation, the stream is marked wide-oriented, and functions "
2915 "to convert to the coded character set are loaded."
2916 msgstr ""
2917 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2918 "ストリームではワイド文字のストリームとして扱われる。\n"
2919 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2920 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2921 "ストリームをワイド文字のストリームとして扱うかは\n"
2922 "最初のファイル操作時に決定される。\n"
2923 "最初のファイル操作がワイド文字操作であった場合は、\n"
2924 "そのストリームはワイド文字のストリームとして扱われ、\n"
2925 "符号化文字集合との変換を行う関数が読み込まれる。"
2926
2927 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2928 #. type: Plain text
2929 #: build/C/man3/fopen.3:348
2930 msgid ""
2931 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2932 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
2933 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2934 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2935 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2936 "B<fdopen>()  parses at most 5 characters in I<mode>."
2937 msgstr ""
2938 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2939 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2940 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2941 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2942 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2943 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2944
2945 #. type: Plain text
2946 #: build/C/man3/fopen.3:354
2947 msgid ""
2948 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2949 msgstr ""
2950 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2951
2952 #. type: TH
2953 #: build/C/man3/fopencookie.3:26
2954 #, no-wrap
2955 msgid "FOPENCOOKIE"
2956 msgstr "FOPENCOOKIE"
2957
2958 #. type: TH
2959 #: build/C/man3/fopencookie.3:26
2960 #, no-wrap
2961 msgid "2013-03-17"
2962 msgstr "2013-03-17"
2963
2964 #. type: TH
2965 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31
2966 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
2967 #: build/C/man2/open.2:52 build/C/man2/pipe.2:36 build/C/man2/read.2:35
2968 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32
2969 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13
2970 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
2971 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
2972 #, no-wrap
2973 msgid "Linux"
2974 msgstr "Linux"
2975
2976 #. type: Plain text
2977 #: build/C/man3/fopencookie.3:29
2978 msgid "fopencookie - opening a custom stream"
2979 msgstr ""
2980
2981 #. type: Plain text
2982 #: build/C/man3/fopencookie.3:36
2983 #, no-wrap
2984 msgid ""
2985 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2986 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2987 msgstr ""
2988 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2989 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2990
2991 #. type: Plain text
2992 #: build/C/man3/fopencookie.3:49
2993 msgid ""
2994 "The B<fopencookie>()  function allows the programmer to create a custom "
2995 "implementation for a standard I/O stream.  This implementation can store the "
2996 "stream's data at a location of its own choosing; for example, B<fopencookie>"
2997 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
2998 "to data that is stored in a buffer in memory."
2999 msgstr ""
3000
3001 #. type: Plain text
3002 #: build/C/man3/fopencookie.3:51
3003 msgid "In order to create a custom stream the programmer must:"
3004 msgstr ""
3005
3006 #. type: IP
3007 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3008 #: build/C/man3/fopencookie.3:65 build/C/man3/scanf.3:633
3009 #: build/C/man3/scanf.3:638 build/C/man3/scanf.3:644
3010 #: build/C/man7/symlink.7:249 build/C/man7/symlink.7:259
3011 #: build/C/man7/symlink.7:289 build/C/man7/symlink.7:349
3012 #: build/C/man7/symlink.7:378 build/C/man7/symlink.7:407
3013 #: build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
3014 #, no-wrap
3015 msgid "*"
3016 msgstr "*"
3017
3018 #. type: Plain text
3019 #: build/C/man3/fopencookie.3:54
3020 msgid ""
3021 "Implement four \"hook\" functions that are used internally by the standard I/"
3022 "O library when performing I/O on the stream."
3023 msgstr ""
3024
3025 #. type: Plain text
3026 #: build/C/man3/fopencookie.3:65
3027 msgid ""
3028 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3029 "information (e.g., where to store data) used by the aforementioned hook "
3030 "functions.  The standard I/O package knows nothing about the contents of "
3031 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3032 "()), but automatically supplies the cookie as the first argument when "
3033 "calling the hook functions."
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man3/fopencookie.3:70
3038 msgid ""
3039 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3040 "hook functions with that stream."
3041 msgstr ""
3042
3043 #. type: Plain text
3044 #: build/C/man3/fopencookie.3:78
3045 msgid ""
3046 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3047 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3048 "operate on that stream."
3049 msgstr ""
3050
3051 #. type: Plain text
3052 #: build/C/man3/fopencookie.3:85
3053 msgid ""
3054 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3055 "to be associated with the new stream.  This pointer is supplied as the first "
3056 "argument when the standard I/O library invokes any of the hook functions "
3057 "described below."
3058 msgstr ""
3059
3060 #. type: Plain text
3061 #: build/C/man3/fopencookie.3:101
3062 msgid ""
3063 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3064 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3065 "See B<fopen>(3)  for details."
3066 msgstr ""
3067
3068 #. type: Plain text
3069 #: build/C/man3/fopencookie.3:107
3070 msgid ""
3071 "The I<io_funcs> argument is a structure that contains four fields pointing "
3072 "to the programmer-defined hook functions that are used to implement this "
3073 "stream.  The structure is defined as follows"
3074 msgstr ""
3075
3076 #. type: Plain text
3077 #: build/C/man3/fopencookie.3:116
3078 #, no-wrap
3079 msgid ""
3080 "typedef struct {\n"
3081 "    cookie_read_function_t  *read;\n"
3082 "    cookie_write_function_t *write;\n"
3083 "    cookie_seek_function_t  *seek;\n"
3084 "    cookie_close_function_t *close;\n"
3085 "} cookie_io_functions_t;\n"
3086 msgstr ""
3087 "typedef struct {\n"
3088 "    cookie_read_function_t  *read;\n"
3089 "    cookie_write_function_t *write;\n"
3090 "    cookie_seek_function_t  *seek;\n"
3091 "    cookie_close_function_t *close;\n"
3092 "} cookie_io_functions_t;\n"
3093
3094 #. type: Plain text
3095 #: build/C/man3/fopencookie.3:120
3096 msgid "The four fields are as follows:"
3097 msgstr ""
3098
3099 #. type: TP
3100 #: build/C/man3/fopencookie.3:120
3101 #, no-wrap
3102 msgid "I<cookie_read_function_t *read>"
3103 msgstr "I<cookie_read_function_t *read>"
3104
3105 #. type: Plain text
3106 #: build/C/man3/fopencookie.3:124
3107 msgid ""
3108 "This function implements read operations for the stream.  When called, it "
3109 "receives three arguments:"
3110 msgstr ""
3111
3112 #. type: Plain text
3113 #: build/C/man3/fopencookie.3:126
3114 #, no-wrap
3115 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3116 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3117
3118 #. type: Plain text
3119 #: build/C/man3/fopencookie.3:141
3120 msgid ""
3121 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3122 "input data can be placed and the size of that buffer.  As its function "
3123 "result, the I<read> function should return the number of bytes copied into "
3124 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3125 "update the stream offset appropriately."
3126 msgstr ""
3127
3128 #. type: Plain text
3129 #: build/C/man3/fopencookie.3:146
3130 msgid ""
3131 "If I<*read> is a NULL pointer, then reads from the custom stream always "
3132 "return end of file."
3133 msgstr ""
3134
3135 #. type: TP
3136 #: build/C/man3/fopencookie.3:146
3137 #, no-wrap
3138 msgid "I<cookie_write_function_t *write>"
3139 msgstr "I<cookie_write_function_t *write>"
3140
3141 #. type: Plain text
3142 #: build/C/man3/fopencookie.3:150
3143 msgid ""
3144 "This function implements write operations for the stream.  When called, it "
3145 "receives three arguments:"
3146 msgstr ""
3147
3148 #. type: Plain text
3149 #: build/C/man3/fopencookie.3:152
3150 #, no-wrap
3151 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3152 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3153
3154 #. type: Plain text
3155 #: build/C/man3/fopencookie.3:168
3156 msgid ""
3157 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3158 "output to the stream and the size of that buffer.  As its function result, "
3159 "the I<write> function should return the number of bytes copied from I<buf>, "
3160 "or 0 on error.  (The function must not return a negative value.)  The "
3161 "I<write> function should update the stream offset appropriately."
3162 msgstr ""
3163
3164 #. type: Plain text
3165 #: build/C/man3/fopencookie.3:173
3166 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3167 msgstr ""
3168
3169 #. type: TP
3170 #: build/C/man3/fopencookie.3:173
3171 #, no-wrap
3172 msgid "I<cookie_seek_function_t *seek>"
3173 msgstr "I<cookie_seek_function_t *seek>"
3174
3175 #. type: Plain text
3176 #: build/C/man3/fopencookie.3:177
3177 msgid ""
3178 "This function implements seek operations on the stream.  When called, it "
3179 "receives three arguments:"
3180 msgstr ""
3181
3182 #. type: Plain text
3183 #: build/C/man3/fopencookie.3:179
3184 #, no-wrap
3185 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3186 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3187
3188 #. type: Plain text
3189 #: build/C/man3/fopencookie.3:185
3190 msgid ""
3191 "The I<*offset> argument specifies the new file offset depending on which of "
3192 "the following three values is supplied in I<whence>:"
3193 msgstr ""
3194
3195 #. type: TP
3196 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3197 #, no-wrap
3198 msgid "B<SEEK_SET>"
3199 msgstr "B<SEEK_SET>"
3200
3201 #. type: Plain text
3202 #: build/C/man3/fopencookie.3:191
3203 msgid ""
3204 "The stream offset should be set I<*offset> bytes from the start of the "
3205 "stream."
3206 msgstr ""
3207
3208 #. type: TP
3209 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3210 #, no-wrap
3211 msgid "B<SEEK_CUR>"
3212 msgstr "B<SEEK_CUR>"
3213
3214 #. type: Plain text
3215 #: build/C/man3/fopencookie.3:195
3216 msgid "I<*offset> should be added to the current stream offset."
3217 msgstr ""
3218
3219 #. type: TP
3220 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3221 #, no-wrap
3222 msgid "B<SEEK_END>"
3223 msgstr "B<SEEK_END>"
3224
3225 #. type: Plain text
3226 #: build/C/man3/fopencookie.3:199
3227 msgid ""
3228 "The stream offset should be set to the size of the stream plus I<*offset>."
3229 msgstr ""
3230
3231 #. type: Plain text
3232 #: build/C/man3/fopencookie.3:206
3233 msgid ""
3234 "Before returning, the I<seek> function should update I<*offset> to indicate "
3235 "the new stream offset."
3236 msgstr ""
3237
3238 #. type: Plain text
3239 #: build/C/man3/fopencookie.3:210
3240 msgid ""
3241 "As its function result, the I<seek> function should return 0 on success, and "
3242 "-1 on error."
3243 msgstr ""
3244
3245 #. type: Plain text
3246 #: build/C/man3/fopencookie.3:215
3247 msgid ""
3248 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3249 "operations on the stream."
3250 msgstr ""
3251
3252 #. type: TP
3253 #: build/C/man3/fopencookie.3:215
3254 #, no-wrap
3255 msgid "I<cookie_close_function_t *close>"
3256 msgstr "I<cookie_close_function_t *close>"
3257
3258 #. type: Plain text
3259 #: build/C/man3/fopencookie.3:221
3260 msgid ""
3261 "This function closes the stream.  The hook function can do things such as "
3262 "freeing buffers allocated for the stream.  When called, it receives one "
3263 "argument:"
3264 msgstr ""
3265
3266 #. type: Plain text
3267 #: build/C/man3/fopencookie.3:223
3268 #, no-wrap
3269 msgid "    int close(void *cookie);\n"
3270 msgstr "    int close(void *cookie);\n"
3271
3272 #. type: Plain text
3273 #: build/C/man3/fopencookie.3:228
3274 msgid ""
3275 "The I<cookie> argument is the cookie that the programmer supplied when "
3276 "calling B<fopencookie>()."
3277 msgstr ""
3278
3279 #. type: Plain text
3280 #: build/C/man3/fopencookie.3:234
3281 msgid ""
3282 "As its function result, the I<close> function should return 0 on success, "
3283 "and B<EOF> on error."
3284 msgstr ""
3285
3286 #. type: Plain text
3287 #: build/C/man3/fopencookie.3:238
3288 msgid ""
3289 "If I<*close> is NULL, then no special action is performed when the stream is "
3290 "closed."
3291 msgstr ""
3292
3293 #.  .SH ERRORS
3294 #.  It's not clear if errno ever gets set...
3295 #. type: Plain text
3296 #: build/C/man3/fopencookie.3:245
3297 msgid ""
3298 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3299 "NULL is returned."
3300 msgstr ""
3301
3302 #. type: Plain text
3303 #: build/C/man3/fopencookie.3:247
3304 msgid "This function is a nonstandard GNU extension."
3305 msgstr ""
3306
3307 #. type: Plain text
3308 #: build/C/man3/fopencookie.3:256
3309 msgid ""
3310 "The program below implements a custom stream whose functionality is similar "
3311 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3312 "stream whose data is stored in a memory buffer.  The program writes its "
3313 "command-line arguments to the stream, and then seeks through the stream "
3314 "reading two out of every five characters and writing them to standard "
3315 "output.  The following shell session demonstrates the use of the program:"
3316 msgstr ""
3317
3318 #. type: Plain text
3319 #: build/C/man3/fopencookie.3:264
3320 #, no-wrap
3321 msgid ""
3322 "$B< ./a.out \\(aqhello world\\(aq>\n"
3323 "/he/\n"
3324 "/ w/\n"
3325 "/d/\n"
3326 "Reached end of file\n"
3327 msgstr ""
3328 "$B< ./a.out \\(aqhello world\\(aq>\n"
3329 "/he/\n"
3330 "/ w/\n"
3331 "/d/\n"
3332 "Reached end of file\n"
3333
3334 #. type: Plain text
3335 #: build/C/man3/fopencookie.3:271
3336 msgid ""
3337 "Note that a more general version of the program below could be improved to "
3338 "more robustly handle various error situations (e.g., opening a stream with a "
3339 "cookie that already has an open stream; closing a stream that has already "
3340 "been closed)."
3341 msgstr ""
3342
3343 #. type: Plain text
3344 #: build/C/man3/fopencookie.3:280
3345 #, no-wrap
3346 msgid ""
3347 "#define _GNU_SOURCE\n"
3348 "#include E<lt>sys/types.hE<gt>\n"
3349 "#include E<lt>stdio.hE<gt>\n"
3350 "#include E<lt>stdlib.hE<gt>\n"
3351 "#include E<lt>unistd.hE<gt>\n"
3352 "#include E<lt>string.hE<gt>\n"
3353 msgstr ""
3354 "#define _GNU_SOURCE\n"
3355 "#include E<lt>sys/types.hE<gt>\n"
3356 "#include E<lt>stdio.hE<gt>\n"
3357 "#include E<lt>stdlib.hE<gt>\n"
3358 "#include E<lt>unistd.hE<gt>\n"
3359 "#include E<lt>string.hE<gt>\n"
3360
3361 #. type: Plain text
3362 #: build/C/man3/fopencookie.3:282
3363 #, no-wrap
3364 msgid "#define INIT_BUF_SIZE 4\n"
3365 msgstr "#define INIT_BUF_SIZE 4\n"
3366
3367 #. type: Plain text
3368 #: build/C/man3/fopencookie.3:289
3369 #, no-wrap
3370 msgid ""
3371 "struct memfile_cookie {\n"
3372 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3373 "    size_t  allocated;  /* Size of buf */\n"
3374 "    size_t  endpos;     /* Number of characters in buf */\n"
3375 "    off_t   offset;     /* Current file offset in buf */\n"
3376 "};\n"
3377 msgstr ""
3378 "struct memfile_cookie {\n"
3379 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3380 "    size_t  allocated;  /* Size of buf */\n"
3381 "    size_t  endpos;     /* Number of characters in buf */\n"
3382 "    off_t   offset;     /* Current file offset in buf */\n"
3383 "};\n"
3384
3385 #. type: Plain text
3386 #: build/C/man3/fopencookie.3:295
3387 #, no-wrap
3388 msgid ""
3389 "ssize_t\n"
3390 "memfile_write(void *c, const char *buf, size_t size)\n"
3391 "{\n"
3392 "    char *new_buff;\n"
3393 "    struct memfile_cookie *cookie = c;\n"
3394 msgstr ""
3395 "ssize_t\n"
3396 "memfile_write(void *c, const char *buf, size_t size)\n"
3397 "{\n"
3398 "    char *new_buff;\n"
3399 "    struct memfile_cookie *cookie = c;\n"
3400
3401 #. type: Plain text
3402 #: build/C/man3/fopencookie.3:297
3403 #, no-wrap
3404 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3405 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3406
3407 #. type: Plain text
3408 #: build/C/man3/fopencookie.3:307
3409 #, no-wrap
3410 msgid ""
3411 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3412 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3413 "        if (new_buff == NULL) {\n"
3414 "            return -1;\n"
3415 "        } else {\n"
3416 "            cookie-E<gt>allocated *= 2;\n"
3417 "            cookie-E<gt>buf = new_buff;\n"
3418 "        }\n"
3419 "    }\n"
3420 msgstr ""
3421 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3422 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3423 "        if (new_buff == NULL) {\n"
3424 "            return -1;\n"
3425 "        } else {\n"
3426 "            cookie-E<gt>allocated *= 2;\n"
3427 "            cookie-E<gt>buf = new_buff;\n"
3428 "        }\n"
3429 "    }\n"
3430
3431 #. type: Plain text
3432 #: build/C/man3/fopencookie.3:309
3433 #, no-wrap
3434 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3435 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3436
3437 #. type: Plain text
3438 #: build/C/man3/fopencookie.3:313
3439 #, no-wrap
3440 msgid ""
3441 "    cookie-E<gt>offset += size;\n"
3442 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3443 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3444 msgstr ""
3445 "    cookie-E<gt>offset += size;\n"
3446 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3447 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3448
3449 #. type: Plain text
3450 #: build/C/man3/fopencookie.3:316
3451 #, no-wrap
3452 msgid ""
3453 "    return size;\n"
3454 "}\n"
3455 msgstr ""
3456 "    return size;\n"
3457 "}\n"
3458
3459 #. type: Plain text
3460 #: build/C/man3/fopencookie.3:322
3461 #, no-wrap
3462 msgid ""
3463 "ssize_t\n"
3464 "memfile_read(void *c, char *buf, size_t size)\n"
3465 "{\n"
3466 "    ssize_t xbytes;\n"
3467 "    struct memfile_cookie *cookie = c;\n"
3468 msgstr ""
3469 "ssize_t\n"
3470 "memfile_read(void *c, char *buf, size_t size)\n"
3471 "{\n"
3472 "    ssize_t xbytes;\n"
3473 "    struct memfile_cookie *cookie = c;\n"
3474
3475 #. type: Plain text
3476 #: build/C/man3/fopencookie.3:324
3477 #, no-wrap
3478 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3479 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3480
3481 #. type: Plain text
3482 #: build/C/man3/fopencookie.3:330
3483 #, no-wrap
3484 msgid ""
3485 "    xbytes = size;\n"
3486 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3487 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3488 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3489 "       xbytes = 0;\n"
3490 msgstr ""
3491 "    xbytes = size;\n"
3492 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3493 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3494 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3495 "       xbytes = 0;\n"
3496
3497 #. type: Plain text
3498 #: build/C/man3/fopencookie.3:332
3499 #, no-wrap
3500 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3501 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3502
3503 #. type: Plain text
3504 #: build/C/man3/fopencookie.3:336
3505 #, no-wrap
3506 msgid ""
3507 "    cookie-E<gt>offset += xbytes;\n"
3508 "    return xbytes;\n"
3509 "}\n"
3510 msgstr ""
3511 "    cookie-E<gt>offset += xbytes;\n"
3512 "    return xbytes;\n"
3513 "}\n"
3514
3515 #. type: Plain text
3516 #: build/C/man3/fopencookie.3:342
3517 #, no-wrap
3518 msgid ""
3519 "int\n"
3520 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3521 "{\n"
3522 "    off64_t new_offset;\n"
3523 "    struct memfile_cookie *cookie = c;\n"
3524 msgstr ""
3525 "int\n"
3526 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3527 "{\n"
3528 "    off64_t new_offset;\n"
3529 "    struct memfile_cookie *cookie = c;\n"
3530
3531 #. type: Plain text
3532 #: build/C/man3/fopencookie.3:351
3533 #, no-wrap
3534 msgid ""
3535 "    if (whence == SEEK_SET)\n"
3536 "        new_offset = *offset;\n"
3537 "    else if (whence == SEEK_END)\n"
3538 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3539 "    else if (whence == SEEK_CUR)\n"
3540 "        new_offset = cookie-E<gt>offset + *offset;\n"
3541 "    else\n"
3542 "        return -1;\n"
3543 msgstr ""
3544 "    if (whence == SEEK_SET)\n"
3545 "        new_offset = *offset;\n"
3546 "    else if (whence == SEEK_END)\n"
3547 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3548 "    else if (whence == SEEK_CUR)\n"
3549 "        new_offset = cookie-E<gt>offset + *offset;\n"
3550 "    else\n"
3551 "        return -1;\n"
3552
3553 #. type: Plain text
3554 #: build/C/man3/fopencookie.3:354
3555 #, no-wrap
3556 msgid ""
3557 "    if (new_offset E<lt> 0)\n"
3558 "        return -1;\n"
3559 msgstr ""
3560 "    if (new_offset E<lt> 0)\n"
3561 "        return -1;\n"
3562
3563 #. type: Plain text
3564 #: build/C/man3/fopencookie.3:359
3565 #, no-wrap
3566 msgid ""
3567 "    cookie-E<gt>offset = new_offset;\n"
3568 "    *offset = new_offset;\n"
3569 "    return 0;\n"
3570 "}\n"
3571 msgstr ""
3572 "    cookie-E<gt>offset = new_offset;\n"
3573 "    *offset = new_offset;\n"
3574 "    return 0;\n"
3575 "}\n"
3576
3577 #. type: Plain text
3578 #: build/C/man3/fopencookie.3:364
3579 #, no-wrap
3580 msgid ""
3581 "int\n"
3582 "memfile_close(void *c)\n"
3583 "{\n"
3584 "    struct memfile_cookie *cookie = c;\n"
3585 msgstr ""
3586 "int\n"
3587 "memfile_close(void *c)\n"
3588 "{\n"
3589 "    struct memfile_cookie *cookie = c;\n"
3590
3591 #. type: Plain text
3592 #: build/C/man3/fopencookie.3:368
3593 #, no-wrap
3594 msgid ""
3595 "    free(cookie-E<gt>buf);\n"
3596 "    cookie-E<gt>allocated = 0;\n"
3597 "    cookie-E<gt>buf = NULL;\n"
3598 msgstr ""
3599 "    free(cookie-E<gt>buf);\n"
3600 "    cookie-E<gt>allocated = 0;\n"
3601 "    cookie-E<gt>buf = NULL;\n"
3602
3603 #. type: Plain text
3604 #: build/C/man3/fopencookie.3:371
3605 #, no-wrap
3606 msgid ""
3607 "    return 0;\n"
3608 "}\n"
3609 msgstr ""
3610 "    return 0;\n"
3611 "}\n"
3612
3613 #. type: Plain text
3614 #: build/C/man3/fopencookie.3:387
3615 #, no-wrap
3616 msgid ""
3617 "int\n"
3618 "main(int argc, char *argv[])\n"
3619 "{\n"
3620 "    cookie_io_functions_t  memfile_func = {\n"
3621 "        .read  = memfile_read,\n"
3622 "        .write = memfile_write,\n"
3623 "        .seek  = memfile_seek,\n"
3624 "        .close = memfile_close\n"
3625 "    };\n"
3626 "    FILE *fp;\n"
3627 "    struct memfile_cookie mycookie;\n"
3628 "    ssize_t nread;\n"
3629 "    long p;\n"
3630 "    int j;\n"
3631 "    char buf[1000];\n"
3632 msgstr ""
3633 "int\n"
3634 "main(int argc, char *argv[])\n"
3635 "{\n"
3636 "    cookie_io_functions_t  memfile_func = {\n"
3637 "        .read  = memfile_read,\n"
3638 "        .write = memfile_write,\n"
3639 "        .seek  = memfile_seek,\n"
3640 "        .close = memfile_close\n"
3641 "    };\n"
3642 "    FILE *fp;\n"
3643 "    struct memfile_cookie mycookie;\n"
3644 "    ssize_t nread;\n"
3645 "    long p;\n"
3646 "    int j;\n"
3647 "    char buf[1000];\n"
3648
3649 #. type: Plain text
3650 #: build/C/man3/fopencookie.3:389
3651 #, no-wrap
3652 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3653 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3654
3655 #. type: Plain text
3656 #: build/C/man3/fopencookie.3:395
3657 #, no-wrap
3658 msgid ""
3659 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3660 "    if (mycookie.buf == NULL) {\n"
3661 "        perror(\"malloc\");\n"
3662 "        exit(EXIT_FAILURE);\n"
3663 "    }\n"
3664 msgstr ""
3665 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3666 "    if (mycookie.buf == NULL) {\n"
3667 "        perror(\"malloc\");\n"
3668 "        exit(EXIT_FAILURE);\n"
3669 "    }\n"
3670
3671 #. type: Plain text
3672 #: build/C/man3/fopencookie.3:399
3673 #, no-wrap
3674 msgid ""
3675 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3676 "    mycookie.offset = 0;\n"
3677 "    mycookie.endpos = 0;\n"
3678 msgstr ""
3679 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3680 "    mycookie.offset = 0;\n"
3681 "    mycookie.endpos = 0;\n"
3682
3683 #. type: Plain text
3684 #: build/C/man3/fopencookie.3:405
3685 #, no-wrap
3686 msgid ""
3687 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3688 "    if (fp == NULL) {\n"
3689 "        perror(\"fopencookie\");\n"
3690 "        exit(EXIT_FAILURE);\n"
3691 "    }\n"
3692 msgstr ""
3693 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3694 "    if (fp == NULL) {\n"
3695 "        perror(\"fopencookie\");\n"
3696 "        exit(EXIT_FAILURE);\n"
3697 "    }\n"
3698
3699 #. type: Plain text
3700 #: build/C/man3/fopencookie.3:407
3701 #, no-wrap
3702 msgid "    /* Write command-line arguments to our file */\n"
3703 msgstr "    /* Write command-line arguments to our file */\n"
3704
3705 #. type: Plain text
3706 #: build/C/man3/fopencookie.3:413
3707 #, no-wrap
3708 msgid ""
3709 "    for (j = 1; j E<lt> argc; j++)\n"
3710 "        if (fputs(argv[j], fp) == EOF) {\n"
3711 "            perror(\"fputs\");\n"
3712 "            exit(EXIT_FAILURE);\n"
3713 "        }\n"
3714 msgstr ""
3715 "    for (j = 1; j E<lt> argc; j++)\n"
3716 "        if (fputs(argv[j], fp) == EOF) {\n"
3717 "            perror(\"fputs\");\n"
3718 "            exit(EXIT_FAILURE);\n"
3719 "        }\n"
3720
3721 #. type: Plain text
3722 #: build/C/man3/fopencookie.3:415
3723 #, no-wrap
3724 msgid "    /* Read two bytes out of every five, until EOF */\n"
3725 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3726
3727 #. type: Plain text
3728 #: build/C/man3/fopencookie.3:430
3729 #, no-wrap
3730 msgid ""
3731 "    for (p = 0; ; p += 5) {\n"
3732 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3733 "            perror(\"fseek\");\n"
3734 "            exit(EXIT_FAILURE);\n"
3735 "        }\n"
3736 "        nread = fread(buf, 1, 2, fp);\n"
3737 "        if (nread == -1) {\n"
3738 "            perror(\"fread\");\n"
3739 "            exit(EXIT_FAILURE);\n"
3740 "        }\n"
3741 "        if (nread == 0) {\n"
3742 "            printf(\"Reached end of file\\en\");\n"
3743 "            break;\n"
3744 "        }\n"
3745 msgstr ""
3746 "    for (p = 0; ; p += 5) {\n"
3747 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3748 "            perror(\"fseek\");\n"
3749 "            exit(EXIT_FAILURE);\n"
3750 "        }\n"
3751 "        nread = fread(buf, 1, 2, fp);\n"
3752 "        if (nread == -1) {\n"
3753 "            perror(\"fread\");\n"
3754 "            exit(EXIT_FAILURE);\n"
3755 "        }\n"
3756 "        if (nread == 0) {\n"
3757 "            printf(\"Reached end of file\\en\");\n"
3758 "            break;\n"
3759 "        }\n"
3760
3761 #. type: Plain text
3762 #: build/C/man3/fopencookie.3:433
3763 #, no-wrap
3764 msgid ""
3765 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3766 "    }\n"
3767 msgstr ""
3768 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3769 "    }\n"
3770
3771 #. type: Plain text
3772 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
3773 #, no-wrap
3774 msgid ""
3775 "    exit(EXIT_SUCCESS);\n"
3776 "}\n"
3777 msgstr ""
3778 "    exit(EXIT_SUCCESS);\n"
3779 "}\n"
3780
3781 #. type: Plain text
3782 #: build/C/man3/fopencookie.3:442
3783 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3784 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3785
3786 #. type: TH
3787 #: build/C/man3/fpurge.3:25
3788 #, no-wrap
3789 msgid "FPURGE"
3790 msgstr "FPURGE"
3791
3792 #. type: TH
3793 #: build/C/man3/fpurge.3:25
3794 #, no-wrap
3795 msgid "2001-12-15"
3796 msgstr "2001-12-15"
3797
3798 #. type: Plain text
3799 #: build/C/man3/fpurge.3:28
3800 msgid "fpurge, __fpurge - purge a stream"
3801 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3802
3803 #. type: Plain text
3804 #: build/C/man3/fpurge.3:32
3805 #, no-wrap
3806 msgid ""
3807 "/* unsupported */\n"
3808 "B<#include E<lt>stdio.hE<gt>>\n"
3809 msgstr ""
3810 "/* unsupported */\n"
3811 "B<#include E<lt>stdio.hE<gt>>\n"
3812
3813 #. type: Plain text
3814 #: build/C/man3/fpurge.3:34
3815 #, no-wrap
3816 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3817 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3818
3819 #. type: Plain text
3820 #: build/C/man3/fpurge.3:37
3821 #, no-wrap
3822 msgid ""
3823 "/* supported */\n"
3824 "B<#include E<lt>stdio.hE<gt>>\n"
3825 msgstr ""
3826 "/* supported */\n"
3827 "B<#include E<lt>stdio.hE<gt>>\n"
3828
3829 #. type: Plain text
3830 #: build/C/man3/fpurge.3:39
3831 #, no-wrap
3832 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3833 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3834
3835 #. type: Plain text
3836 #: build/C/man3/fpurge.3:41
3837 #, no-wrap
3838 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3839 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3840
3841 #. type: Plain text
3842 #: build/C/man3/fpurge.3:54
3843 msgid ""
3844 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3845 "output streams this discards any unwritten output.  For input streams this "
3846 "discards any input read from the underlying object but not yet obtained via "
3847 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3848 "B<fflush>(3)."
3849 msgstr ""
3850 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3851 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3852 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3853 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3854 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3855
3856 #. type: Plain text
3857 #: build/C/man3/fpurge.3:58
3858 msgid ""
3859 "The function B<__fpurge>()  does precisely the same, but without returning a "
3860 "value."
3861 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3862
3863 #. type: Plain text
3864 #: build/C/man3/fpurge.3:65
3865 msgid ""
3866 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3867 "and sets I<errno> appropriately."
3868 msgstr ""
3869 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3870 "を適切な値に設定する。"
3871
3872 #. type: Plain text
3873 #: build/C/man3/fpurge.3:70
3874 msgid "I<stream> is not an open stream."
3875 msgstr "I<stream> がオープンされていない。"
3876
3877 #. type: Plain text
3878 #: build/C/man3/fpurge.3:78
3879 msgid ""
3880 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3881 "was introduced in 4.4BSD and is not available under Linux.  The function "
3882 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3883 "later."
3884 msgstr ""
3885 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3886 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3887 "され、glibc 2.1.95 以降には存在している。"
3888
3889 #. type: Plain text
3890 #: build/C/man3/fpurge.3:80
3891 msgid "Usually it is a mistake to want to discard input buffers."
3892 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3893
3894 #.  .BR fclean (3),
3895 #. type: Plain text
3896 #: build/C/man3/fpurge.3:85
3897 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3898 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3899
3900 #. type: TH
3901 #: build/C/man3/fputwc.3:16
3902 #, no-wrap
3903 msgid "FPUTWC"
3904 msgstr "FPUTWC"
3905
3906 #. type: Plain text
3907 #: build/C/man3/fputwc.3:19
3908 msgid "fputwc, putwc - write a wide character to a FILE stream"
3909 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3910
3911 #. type: Plain text
3912 #: build/C/man3/fputwc.3:27
3913 #, no-wrap
3914 msgid ""
3915 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3916 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3917 msgstr ""
3918 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3919 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3920
3921 #. type: Plain text
3922 #: build/C/man3/fputwc.3:43
3923 msgid ""
3924 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3925 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3926 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3927 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3928 "it returns I<wc>."
3929 msgstr ""
3930 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3931 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3932 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3933 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3934 "関数は I<wc> を返す。"
3935
3936 #. type: Plain text
3937 #: build/C/man3/fputwc.3:51
3938 msgid ""
3939 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3940 "may be implemented as a macro, and may evaluate its argument more than "
3941 "once.  There is no reason ever to use it."
3942 msgstr ""
3943 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3944 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3945 "ない。この関数を使う理由はもはや存在しない。"
3946
3947 #. type: Plain text
3948 #: build/C/man3/fputwc.3:63
3949 msgid ""
3950 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3951 "indicate an error.  In the event of an error, I<errno> is set to indicate "
3952 "the cause."
3953 msgstr ""
3954 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3955 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
3956
3957 #. type: Plain text
3958 #: build/C/man3/fputwc.3:68
3959 msgid "Conversion of I<wc> to the stream's encoding fails."
3960 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3961
3962 #. type: Plain text
3963 #: build/C/man3/fputwc.3:77
3964 msgid ""
3965 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3966 "current locale."
3967 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
3968
3969 #. type: Plain text
3970 #: build/C/man3/fputwc.3:85
3971 msgid ""
3972 "In the absence of additional information passed to the B<fopen>(3)  call, it "
3973 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
3974 "sequence corresponding to the wide character I<wc>."
3975 msgstr ""
3976 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
3977 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
3978 "よい。"
3979
3980 #. type: Plain text
3981 #: build/C/man3/fputwc.3:89
3982 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3983 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3984
3985 #. type: TH
3986 #: build/C/man3/fread.3:45
3987 #, no-wrap
3988 msgid "FREAD"
3989 msgstr "FREAD"
3990
3991 #. type: TH
3992 #: build/C/man3/fread.3:45
3993 #, no-wrap
3994 msgid "2012-03-30"
3995 msgstr "2012-03-30"
3996
3997 #. type: Plain text
3998 #: build/C/man3/fread.3:48
3999 msgid "fread, fwrite - binary stream input/output"
4000 msgstr "fread, fwrite - バイナリストリームの入出力"
4001
4002 #. type: Plain text
4003 #: build/C/man3/fread.3:54
4004 #, no-wrap
4005 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4006 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4007
4008 #. type: Plain text
4009 #: build/C/man3/fread.3:57
4010 #, no-wrap
4011 msgid ""
4012 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4013 "B<              FILE *>I<stream>B<);>\n"
4014 msgstr ""
4015 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4016 "B<              FILE *>I<stream>B<);>\n"
4017
4018 #. type: Plain text
4019 #: build/C/man3/fread.3:69
4020 msgid ""
4021 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4022 "long, from the stream pointed to by I<stream>, storing them at the location "
4023 "given by I<ptr>."
4024 msgstr ""
4025 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4026 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4027 "I<size> バイトの長さを持つ。"
4028
4029 #. type: Plain text
4030 #: build/C/man3/fread.3:80
4031 msgid ""
4032 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4033 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4034 "location given by I<ptr>."
4035 msgstr ""
4036 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4037 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4038 "バイトの長さを持つ。"
4039
4040 #. type: Plain text
4041 #: build/C/man3/fread.3:96
4042 msgid ""
4043 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4044 "or written.  This number equals the number of bytes transferred only when "
4045 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4046 "return value is a short item count (or zero)."
4047 msgstr ""
4048 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4049 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4050 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4051 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4052
4053 #. type: Plain text
4054 #: build/C/man3/fread.3:103
4055 msgid ""
4056 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4057 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4058 msgstr ""
4059 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4060 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4061 "らない。"
4062
4063 #. type: Plain text
4064 #: build/C/man3/fread.3:105
4065 msgid "C89, POSIX.1-2001."
4066 msgstr "C89, POSIX.1-2001."
4067
4068 #. type: Plain text
4069 #: build/C/man3/fread.3:111
4070 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4071 msgstr ""
4072 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4073
4074 #. type: TH
4075 #: build/C/man3/fseek.3:42
4076 #, no-wrap
4077 msgid "FSEEK"
4078 msgstr "FSEEK"
4079
4080 #. type: TH
4081 #: build/C/man3/fseek.3:42
4082 #, no-wrap
4083 msgid "1993-11-29"
4084 msgstr "1993-11-29"
4085
4086 #. type: Plain text
4087 #: build/C/man3/fseek.3:45
4088 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4089 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4090
4091 #. type: Plain text
4092 #: build/C/man3/fseek.3:49
4093 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4094 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4095
4096 #. type: Plain text
4097 #: build/C/man3/fseek.3:51
4098 msgid "B<long ftell(FILE *>I<stream>B<);>"
4099 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4100
4101 #. type: Plain text
4102 #: build/C/man3/fseek.3:53
4103 msgid "B<void rewind(FILE *>I<stream>B<);>"
4104 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4105
4106 #. type: Plain text
4107 #: build/C/man3/fseek.3:55
4108 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4109 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4110
4111 #. type: Plain text
4112 #: build/C/man3/fseek.3:57
4113 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4114 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4115
4116 #. type: Plain text
4117 #: build/C/man3/fseek.3:81
4118 msgid ""
4119 "The B<fseek>()  function sets the file position indicator for the stream "
4120 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4121 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4122 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4123 "relative to the start of the file, the current position indicator, or end-of-"
4124 "file, respectively.  A successful call to the B<fseek>()  function clears "
4125 "the end-of-file indicator for the stream and undoes any effects of the "
4126 "B<ungetc>(3)  function on the same stream."
4127 msgstr ""
4128 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4129 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4130 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4131 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4132 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4133 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4134 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4135 "かったことになる。"
4136
4137 #. type: Plain text
4138 #: build/C/man3/fseek.3:87
4139 msgid ""
4140 "The B<ftell>()  function obtains the current value of the file position "
4141 "indicator for the stream pointed to by I<stream>."
4142 msgstr ""
4143 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4144 "置表示子 の現時点での値を与える。"
4145
4146 #. type: Plain text
4147 #: build/C/man3/fseek.3:94
4148 msgid ""
4149 "The B<rewind>()  function sets the file position indicator for the stream "
4150 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4151 msgstr ""
4152 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4153 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4154
4155 #. type: Plain text
4156 #: build/C/man3/fseek.3:97
4157 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4158 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4159
4160 #. type: Plain text
4161 #: build/C/man3/fseek.3:101
4162 msgid ""
4163 "except that the error indicator for the stream is also cleared (see "
4164 "B<clearerr>(3))."
4165 msgstr ""
4166 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4167 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4168
4169 #. type: Plain text
4170 #: build/C/man3/fseek.3:121
4171 msgid ""
4172 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4173 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4174 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4175 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4176 "I<fpos_t> object may be a complex object and these routines may be the only "
4177 "way to portably reposition a text stream."
4178 msgstr ""
4179 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4180 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4181 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4182 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4183 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4184 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4185 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4186
4187 #. type: Plain text
4188 #: build/C/man3/fseek.3:136
4189 msgid ""
4190 "The B<rewind>()  function returns no value.  Upon successful completion, "
4191 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4192 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4193 "indicate the error."
4194 msgstr ""
4195 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4196 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4197 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4198
4199 #. type: Plain text
4200 #: build/C/man3/fseek.3:142
4201 msgid "The I<stream> specified is not a seekable stream."
4202 msgstr "指定した I<stream> がシークできない。"
4203
4204 #. type: Plain text
4205 #: build/C/man3/fseek.3:153
4206 msgid ""
4207 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4208 "B<SEEK_CUR>."
4209 msgstr ""
4210 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4211 "B<SEEK_CUR> 以外の値であった。"
4212
4213 #. type: Plain text
4214 #: build/C/man3/fseek.3:168
4215 msgid ""
4216 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4217 "also fail and set I<errno> for any of the errors specified for the routines "
4218 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4219 msgstr ""
4220 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4221 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4222 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4223
4224 #. type: Plain text
4225 #: build/C/man3/fseek.3:173
4226 msgid "B<lseek>(2), B<fseeko>(3)"
4227 msgstr "B<lseek>(2), B<fseeko>(3)"
4228
4229 #. type: TH
4230 #: build/C/man3/fseeko.3:25
4231 #, no-wrap
4232 msgid "FSEEKO"
4233 msgstr "FSEEKO"
4234
4235 #. type: TH
4236 #: build/C/man3/fseeko.3:25
4237 #, no-wrap
4238 msgid "2001-11-05"
4239 msgstr "2001-11-05"
4240
4241 #. type: Plain text
4242 #: build/C/man3/fseeko.3:28
4243 msgid "fseeko, ftello - seek to or report file position"
4244 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4245
4246 #. type: Plain text
4247 #: build/C/man3/fseeko.3:33
4248 #, no-wrap
4249 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4250 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4251
4252 #. type: Plain text
4253 #: build/C/man3/fseeko.3:36
4254 #, no-wrap
4255 msgid ""
4256 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4257 "\n"
4258 msgstr ""
4259 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4260 "\n"
4261
4262 #. type: Plain text
4263 #: build/C/man3/fseeko.3:58
4264 msgid ""
4265 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4266 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4267 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4268 "I<off_t> instead of I<long>."
4269 msgstr ""
4270 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4271 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4272 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4273 "I<off_t> になっている。"
4274
4275 #. type: Plain text
4276 #: build/C/man3/fseeko.3:65
4277 msgid ""
4278 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4279 "compilation with"
4280 msgstr ""
4281 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4282
4283 #. type: Plain text
4284 #: build/C/man3/fseeko.3:69 build/C/man3/lseek64.3:81
4285 #, no-wrap
4286 msgid "#define _FILE_OFFSET_BITS 64\n"
4287 msgstr "#define _FILE_OFFSET_BITS 64\n"
4288
4289 #. type: Plain text
4290 #: build/C/man3/fseeko.3:75
4291 msgid "will turn I<off_t> into a 64-bit type."
4292 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4293
4294 #. type: Plain text
4295 #: build/C/man3/fseeko.3:84
4296 msgid ""
4297 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4298 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4299 "indicate the error."
4300 msgstr ""
4301 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4302 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4303
4304 #. type: Plain text
4305 #: build/C/man3/fseeko.3:87
4306 msgid "See the ERRORS in B<fseek>(3)."
4307 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4308
4309 #. type: Plain text
4310 #: build/C/man3/fseeko.3:89
4311 msgid "SUSv2, POSIX.1-2001."
4312 msgstr "SUSv2, POSIX.1-2001."
4313
4314 #. type: Plain text
4315 #: build/C/man3/fseeko.3:93
4316 msgid ""
4317 "These functions are found on System V-like systems.  They are not present in "
4318 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4319 msgstr ""
4320 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4321 "かったが、 glibc 2.1 から使えるようになった。"
4322
4323 #. type: Plain text
4324 #: build/C/man3/fseeko.3:95
4325 msgid "B<fseek>(3)"
4326 msgstr "B<fseek>(3)"
4327
4328 #. type: TH
4329 #: build/C/man3/getline.3:26
4330 #, no-wrap
4331 msgid "GETLINE"
4332 msgstr "GETLINE"
4333
4334 #. type: Plain text
4335 #: build/C/man3/getline.3:29
4336 msgid "getline, getdelim - delimited string input"
4337 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4338
4339 #. type: Plain text
4340 #: build/C/man3/getline.3:34
4341 #, no-wrap
4342 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4343 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4344
4345 #. type: Plain text
4346 #: build/C/man3/getline.3:37
4347 #, no-wrap
4348 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4349 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4350
4351 #. type: Plain text
4352 #: build/C/man3/getline.3:47
4353 msgid "B<getline>(), B<getdelim>():"
4354 msgstr "B<getline>(), B<getdelim>():"
4355
4356 #. type: Plain text
4357 #: build/C/man3/getline.3:52
4358 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4359 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4360
4361 #. type: Plain text
4362 #: build/C/man3/getline.3:65
4363 msgid ""
4364 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4365 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4366 "terminated and includes the newline character, if one was found."
4367 msgstr ""
4368 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4369 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4370 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4371
4372 #. type: Plain text
4373 #: build/C/man3/getline.3:75
4374 msgid ""
4375 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4376 "storing the line, which should be freed by the user program.  (In this case, "
4377 "the value in I<*n> is ignored.)"
4378 msgstr ""
4379 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4380 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4381 "合、 I<*n> の値は無視される)。"
4382
4383 #. type: Plain text
4384 #: build/C/man3/getline.3:93
4385 msgid ""
4386 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4387 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4388 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4389 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4390 msgstr ""
4391 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4392 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4393 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4394 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4395 "I<*n> を更新する。"
4396
4397 #. type: Plain text
4398 #: build/C/man3/getline.3:99
4399 msgid ""
4400 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4401 "to reflect the buffer address and allocated size respectively."
4402 msgstr ""
4403 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4404 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4405
4406 #. type: Plain text
4407 #: build/C/man3/getline.3:110
4408 msgid ""
4409 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4410 "than newline can be specified as the I<delimiter> argument.  As with "
4411 "B<getline>(), a delimiter character is not added if one was not present in "
4412 "the input before end of file was reached."
4413 msgstr ""
4414 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4415 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4416 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4417 "ファに追加しない。"
4418
4419 #. type: Plain text
4420 #: build/C/man3/getline.3:119
4421 msgid ""
4422 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4423 "read, including the delimiter character, but not including the terminating "
4424 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4425 "bytes in the line read."
4426 msgstr ""
4427 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4428 "字数には区切り文字は含まれるが、終端に使う NULL バイト (\\(aq\\e0\\(aq) は含"
4429 "まれない。 この値によって、読み込んだ行に含まれる NULL バイトを操作することが"
4430 "できる。"
4431
4432 #. type: Plain text
4433 #: build/C/man3/getline.3:125
4434 msgid ""
4435 "Both functions return -1 on failure to read a line (including end-of-file "
4436 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4437 msgstr ""
4438 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4439 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4440 "を示す値が設定される。"
4441
4442 #. type: Plain text
4443 #: build/C/man3/getline.3:135
4444 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4445 msgstr ""
4446 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4447 "I<stream> が有効でない)。"
4448
4449 #. type: Plain text
4450 #: build/C/man3/getline.3:137
4451 msgid "These functions are available since libc 4.6.27."
4452 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4453
4454 #. type: Plain text
4455 #: build/C/man3/getline.3:144
4456 msgid ""
4457 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4458 "were standardized in POSIX.1-2008."
4459 msgstr ""
4460 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4461 "POSIX.1-2008 で標準化された。"
4462
4463 #. type: Plain text
4464 #: build/C/man3/getline.3:149
4465 #, no-wrap
4466 msgid ""
4467 "#define _GNU_SOURCE\n"
4468 "#include E<lt>stdio.hE<gt>\n"
4469 "#include E<lt>stdlib.hE<gt>\n"
4470 msgstr ""
4471 "#define _GNU_SOURCE\n"
4472 "#include E<lt>stdio.hE<gt>\n"
4473 "#include E<lt>stdlib.hE<gt>\n"
4474
4475 #. type: Plain text
4476 #: build/C/man3/getline.3:157
4477 #, no-wrap
4478 msgid ""
4479 "int\n"
4480 "main(void)\n"
4481 "{\n"
4482 "    FILE *fp;\n"
4483 "    char *line = NULL;\n"
4484 "    size_t len = 0;\n"
4485 "    ssize_t read;\n"
4486 msgstr ""
4487 "int\n"
4488 "main(void)\n"
4489 "{\n"
4490 "    FILE *fp;\n"
4491 "    char *line = NULL;\n"
4492 "    size_t len = 0;\n"
4493 "    ssize_t read;\n"
4494
4495 #. type: Plain text
4496 #: build/C/man3/getline.3:161
4497 #, no-wrap
4498 msgid ""
4499 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4500 "    if (fp == NULL)\n"
4501 "        exit(EXIT_FAILURE);\n"
4502 msgstr ""
4503 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4504 "    if (fp == NULL)\n"
4505 "        exit(EXIT_FAILURE);\n"
4506
4507 #. type: Plain text
4508 #: build/C/man3/getline.3:166
4509 #, no-wrap
4510 msgid ""
4511 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4512 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4513 "        printf(\"%s\", line);\n"
4514 "    }\n"
4515 msgstr ""
4516 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4517 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4518 "        printf(\"%s\", line);\n"
4519 "    }\n"
4520
4521 #. type: Plain text
4522 #: build/C/man3/getline.3:170
4523 #, no-wrap
4524 msgid ""
4525 "    free(line);\n"
4526 "    exit(EXIT_SUCCESS);\n"
4527 "}\n"
4528 msgstr ""
4529 "    free(line);\n"
4530 "    exit(EXIT_SUCCESS);\n"
4531 "}\n"
4532
4533 #. type: Plain text
4534 #: build/C/man3/getline.3:178
4535 msgid ""
4536 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4537 msgstr ""
4538 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4539
4540 #. type: TH
4541 #: build/C/man3/gets.3:27
4542 #, no-wrap
4543 msgid "GETS"
4544 msgstr "GETS"
4545
4546 #. type: TH
4547 #: build/C/man3/gets.3:27
4548 #, no-wrap
4549 msgid "2012-01-18"
4550 msgstr "2012-01-18"
4551
4552 #. type: Plain text
4553 #: build/C/man3/gets.3:30
4554 msgid ""
4555 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4556 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4557
4558 #. type: Plain text
4559 #: build/C/man3/gets.3:35
4560 #, no-wrap
4561 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4562 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4563
4564 #. type: Plain text
4565 #: build/C/man3/gets.3:37
4566 #, no-wrap
4567 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4568 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4569
4570 #. type: Plain text
4571 #: build/C/man3/gets.3:39
4572 #, no-wrap
4573 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4574 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4575
4576 #. type: Plain text
4577 #: build/C/man3/gets.3:41
4578 #, no-wrap
4579 msgid "B<int getchar(void);>\n"
4580 msgstr "B<int getchar(void);>\n"
4581
4582 #. type: Plain text
4583 #: build/C/man3/gets.3:43
4584 #, no-wrap
4585 msgid "B<char *gets(char *>I<s>B<);>\n"
4586 msgstr "B<char *gets(char *>I<s>B<);>\n"
4587
4588 #. type: Plain text
4589 #: build/C/man3/gets.3:45
4590 #, no-wrap
4591 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4592 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4593
4594 #. type: Plain text
4595 #: build/C/man3/gets.3:57
4596 msgid ""
4597 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4598 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4599 msgstr ""
4600 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4601 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4602 "す。"
4603
4604 #. type: Plain text
4605 #: build/C/man3/gets.3:64
4606 msgid ""
4607 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4608 "a macro which evaluates I<stream> more than once."
4609 msgstr ""
4610 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4611 "実装されているかもしれない。"
4612
4613 #. type: Plain text
4614 #: build/C/man3/gets.3:68
4615 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4616 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4617
4618 #. type: Plain text
4619 #: build/C/man3/gets.3:78
4620 msgid ""
4621 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4622 "until either a terminating newline or B<EOF>, which it replaces with a null "
4623 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4624 "below)."
4625 msgstr ""
4626 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4627 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4628 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4629 "記の「バグ」を参照)。"
4630
4631 #. type: Plain text
4632 #: build/C/man3/gets.3:92
4633 msgid ""
4634 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4635 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4636 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4637 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4638 "in the buffer."
4639 msgstr ""
4640 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4641 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4642 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4643 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4644
4645 #. type: Plain text
4646 #: build/C/man3/gets.3:103
4647 msgid ""
4648 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4649 "it is available for subsequent read operations.  Pushed-back characters will "
4650 "be returned in reverse order; only one pushback is guaranteed."
4651 msgstr ""
4652 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4653 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4654 "しとして保証されているのは、一文字だけである。"
4655
4656 #. type: Plain text
4657 #: build/C/man3/gets.3:108
4658 msgid ""
4659 "Calls to the functions described here can be mixed with each other and with "
4660 "calls to other input functions from the I<stdio> library for the same input "
4661 "stream."
4662 msgstr ""
4663 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4664 "互いに混ぜて使うことができる。"
4665
4666 #. type: Plain text
4667 #: build/C/man3/gets.3:123
4668 msgid ""
4669 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4670 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4671 msgstr ""
4672 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4673 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4674 "す。"
4675
4676 #. type: Plain text
4677 #: build/C/man3/gets.3:131
4678 msgid ""
4679 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4680 "end of file occurs while no characters have been read."
4681 msgstr ""
4682 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4683 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4684
4685 #. type: Plain text
4686 #: build/C/man3/gets.3:138
4687 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4688 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4689
4690 #. type: Plain text
4691 #: build/C/man3/gets.3:140
4692 msgid "C89, C99, POSIX.1-2001."
4693 msgstr "C89, C99, POSIX.1-2001."
4694
4695 #. type: Plain text
4696 #: build/C/man3/gets.3:152
4697 msgid ""
4698 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4699 "C11 removes the specification of B<gets>()  from the C language, and since "
4700 "version 2.16, glibc header files don't expose the function declaration if "
4701 "the B<_ISOC11_SOURCE> feature test macro is defined."
4702 msgstr ""
4703 "LSB は B<gets>() を非推奨としている。\n"
4704 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4705 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4706 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4707 "た\n"
4708 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4709
4710 #. type: Plain text
4711 #: build/C/man3/gets.3:166
4712 msgid ""
4713 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4714 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4715 "()  will continue to store characters past the end of the buffer, it is "
4716 "extremely dangerous to use.  It has been used to break computer security.  "
4717 "Use B<fgets>()  instead."
4718 msgstr ""
4719 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4720 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4721 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4722 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4723 "と。"
4724
4725 #. type: Plain text
4726 #: build/C/man3/gets.3:173
4727 msgid ""
4728 "It is not advisable to mix calls to input functions from the I<stdio> "
4729 "library with low-level calls to B<read>(2)  for the file descriptor "
4730 "associated with the input stream; the results will be undefined and very "
4731 "probably not what you want."
4732 msgstr ""
4733 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4734 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4735 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4736
4737 #. type: Plain text
4738 #: build/C/man3/gets.3:189
4739 msgid ""
4740 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4741 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4742 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4743 msgstr ""
4744 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4745 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4746 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4747 "B<feature_test_macros>(7)"
4748
4749 #. type: TH
4750 #: build/C/man3/getw.3:25
4751 #, no-wrap
4752 msgid "GETW"
4753 msgstr "GETW"
4754
4755 #. type: TH
4756 #: build/C/man3/getw.3:25
4757 #, no-wrap
4758 msgid "2010-09-26"
4759 msgstr "2010-09-26"
4760
4761 #. type: Plain text
4762 #: build/C/man3/getw.3:28
4763 msgid "getw, putw - input and output of words (ints)"
4764 msgstr "getw, putw - ワード(int)の入出力"
4765
4766 #. type: Plain text
4767 #: build/C/man3/getw.3:33
4768 #, no-wrap
4769 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4770 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4771
4772 #. type: Plain text
4773 #: build/C/man3/getw.3:35
4774 #, no-wrap
4775 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4776 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4777
4778 #. type: Plain text
4779 #: build/C/man3/getw.3:44
4780 msgid "B<getw>(), B<putw>():"
4781 msgstr "B<getw>(), B<putw>():"
4782
4783 #. type: TP
4784 #: build/C/man3/getw.3:47
4785 #, no-wrap
4786 msgid "Since glibc 2.3.3:"
4787 msgstr "glibc 2.3.3 以降:"
4788
4789 #. type: Plain text
4790 #: build/C/man3/getw.3:50
4791 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4792 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4793
4794 #. type: Plain text
4795 #: build/C/man3/getw.3:53
4796 #, no-wrap
4797 msgid ""
4798 "(_XOPEN_SOURCE &&\n"
4799 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4800 msgstr ""
4801 "(_XOPEN_SOURCE &&\n"
4802 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4803
4804 #. type: TP
4805 #: build/C/man3/getw.3:53
4806 #, no-wrap
4807 msgid "Before glibc 2.3.3:"
4808 msgstr "glibc 2.3.3 より前:"
4809
4810 #. type: Plain text
4811 #: build/C/man3/getw.3:56
4812 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4813 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4814
4815 #. type: Plain text
4816 #: build/C/man3/getw.3:66
4817 msgid ""
4818 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4819 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4820 msgstr ""
4821 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4822 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4823 "ことを勧める。"
4824
4825 #. type: Plain text
4826 #: build/C/man3/getw.3:73
4827 msgid ""
4828 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4829 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4830 "instead."
4831 msgstr ""
4832 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4833 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4834 "使用することを勧める。"
4835
4836 #. type: Plain text
4837 #: build/C/man3/getw.3:80
4838 msgid ""
4839 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4840 "error, they return B<EOF>."
4841 msgstr ""
4842 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4843 "が発生した場合、これらの関数は B<EOF> を返す。"
4844
4845 #. type: Plain text
4846 #: build/C/man3/getw.3:82
4847 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4848 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4849
4850 #. type: Plain text
4851 #: build/C/man3/getw.3:86
4852 msgid ""
4853 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4854 "can be used to distinguish between the two cases."
4855 msgstr ""
4856 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4857 "(3)  を用いると、この二つの場合を区別することが出来る。"
4858
4859 #. type: Plain text
4860 #: build/C/man3/getw.3:92
4861 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4862 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4863
4864 #. type: TH
4865 #: build/C/man2/link.2:31
4866 #, no-wrap
4867 msgid "LINK"
4868 msgstr "LINK"
4869
4870 #. type: TH
4871 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32
4872 #: build/C/man2/write.2:39
4873 #, no-wrap
4874 msgid "2013-01-27"
4875 msgstr "2013-01-27"
4876
4877 #. type: Plain text
4878 #: build/C/man2/link.2:34
4879 msgid "link - make a new name for a file"
4880 msgstr "link - ファイルの新しい名前を作成する"
4881
4882 #. type: Plain text
4883 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34
4884 #: build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35
4885 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4886 msgid "B<#include E<lt>unistd.hE<gt>>"
4887 msgstr "B<#include E<lt>unistd.hE<gt>>"
4888
4889 #. type: Plain text
4890 #: build/C/man2/link.2:38
4891 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4892 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4893
4894 #. type: Plain text
4895 #: build/C/man2/link.2:41
4896 msgid ""
4897 "B<link>()  creates a new link (also known as a hard link) to an existing "
4898 "file."
4899 msgstr ""
4900 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4901 "link) ともいう) を作成する。"
4902
4903 #. type: Plain text
4904 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4905 msgid "If I<newpath> exists it will I<not> be overwritten."
4906 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4907
4908 #. type: Plain text
4909 #: build/C/man2/link.2:52
4910 msgid ""
4911 "This new name may be used exactly as the old one for any operation; both "
4912 "names refer to the same file (and so have the same permissions and "
4913 "ownership) and it is impossible to tell which name was the \"original\"."
4914 msgstr ""
4915 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4916 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4917 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4918
4919 #. type: Plain text
4920 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4921 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4922 #: build/C/man2/unlink.2:60
4923 msgid ""
4924 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4925 "appropriately."
4926 msgstr ""
4927 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4928 "定される。"
4929
4930 #. type: TP
4931 #: build/C/man2/link.2:58 build/C/man2/open.2:486 build/C/man2/readlink.2:86
4932 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4933 #: build/C/man3/tmpfile.3:57 build/C/man2/unlink.2:61
4934 #, no-wrap
4935 msgid "B<EACCES>"
4936 msgstr "B<EACCES>"
4937
4938 #. type: Plain text
4939 #: build/C/man2/link.2:69
4940 msgid ""
4941 "Write access to the directory containing I<newpath> is denied, or search "
4942 "permission is denied for one of the directories in the path prefix of "
4943 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4944 msgstr ""
4945 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4946 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4947 "(B<path_resolution>(7)  を参照)。"
4948
4949 #. type: TP
4950 #: build/C/man2/link.2:69 build/C/man2/open.2:495 build/C/man2/rename.2:133
4951 #: build/C/man2/symlink.2:99 build/C/man2/write.2:135
4952 #, no-wrap
4953 msgid "B<EDQUOT>"
4954 msgstr "B<EDQUOT>"
4955
4956 #. type: Plain text
4957 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
4958 msgid "The user's quota of disk blocks on the file system has been exhausted."
4959 msgstr ""
4960 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
4961
4962 #. type: TP
4963 #: build/C/man2/link.2:72 build/C/man2/open.2:501 build/C/man2/symlink.2:104
4964 #: build/C/man3/tmpfile.3:60
4965 #, no-wrap
4966 msgid "B<EEXIST>"
4967 msgstr "B<EEXIST>"
4968
4969 #. type: Plain text
4970 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
4971 msgid "I<newpath> already exists."
4972 msgstr "I<newpath> が既に存在する。"
4973
4974 #. type: TP
4975 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:507
4976 #: build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91
4977 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:64
4978 #: build/C/man2/symlink.2:108 build/C/man2/unlink.2:80
4979 #: build/C/man2/write.2:141
4980 #, no-wrap
4981 msgid "B<EFAULT>"
4982 msgstr "B<EFAULT>"
4983
4984 #. type: Plain text
4985 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
4986 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
4987 msgstr ""
4988 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
4989
4990 #. type: TP
4991 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107
4992 #: build/C/man2/symlink.2:111 build/C/man2/unlink.2:84
4993 #: build/C/man2/write.2:165
4994 #, no-wrap
4995 msgid "B<EIO>"
4996 msgstr "B<EIO>"
4997
4998 #. type: Plain text
4999 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
5000 msgid "An I/O error occurred."
5001 msgstr "I/O エラーが発生した。"
5002
5003 #. type: TP
5004 #: build/C/man2/link.2:82 build/C/man2/open.2:531 build/C/man2/readlink.2:110
5005 #: build/C/man2/rename.2:149 build/C/man2/rmdir.2:73
5006 #: build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
5007 #, no-wrap
5008 msgid "B<ELOOP>"
5009 msgstr "B<ELOOP>"
5010
5011 #. type: Plain text
5012 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5013 msgid ""
5014 "Too many symbolic links were encountered in resolving I<oldpath> or "
5015 "I<newpath>."
5016 msgstr ""
5017 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5018 "る。"
5019
5020 #. type: TP
5021 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5022 #, no-wrap
5023 msgid "B<EMLINK>"
5024 msgstr "B<EMLINK>"
5025
5026 #. type: Plain text
5027 #: build/C/man2/link.2:91
5028 msgid ""
5029 "The file referred to by I<oldpath> already has the maximum number of links "
5030 "to it."
5031 msgstr ""
5032 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5033
5034 #. type: TP
5035 #: build/C/man2/link.2:91 build/C/man2/open.2:541 build/C/man2/readlink.2:113
5036 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:77
5037 #: build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
5038 #, no-wrap
5039 msgid "B<ENAMETOOLONG>"
5040 msgstr "B<ENAMETOOLONG>"
5041
5042 #. type: Plain text
5043 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
5044 msgid "I<oldpath> or I<newpath> was too long."
5045 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5046
5047 #. type: TP
5048 #: build/C/man2/link.2:94 build/C/man2/open.2:555 build/C/man2/readlink.2:116
5049 #: build/C/man2/rename.2:163 build/C/man2/rmdir.2:80
5050 #: build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
5051 #, no-wrap
5052 msgid "B<ENOENT>"
5053 msgstr "B<ENOENT>"
5054
5055 #. type: Plain text
5056 #: build/C/man2/link.2:99
5057 msgid ""
5058 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5059 "dangling symbolic link."
5060 msgstr ""
5061 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5062 "(dangling)シンボリックリンクである。"
5063
5064 #. type: TP
5065 #: build/C/man2/link.2:99 build/C/man2/open.2:562 build/C/man2/readlink.2:119
5066 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5067 #: build/C/man2/symlink.2:128 build/C/man3/tempnam.3:95
5068 #: build/C/man2/unlink.2:106
5069 #, no-wrap
5070 msgid "B<ENOMEM>"
5071 msgstr "B<ENOMEM>"
5072
5073 #. type: Plain text
5074 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/readlink.2:122
5075 #: build/C/man2/rename.2:179 build/C/man2/rmdir.2:88
5076 #: build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
5077 msgid "Insufficient kernel memory was available."
5078 msgstr "十分なカーネルメモリーがない。"
5079
5080 #. type: TP
5081 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/rename.2:179
5082 #: build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:72
5083 #: build/C/man2/write.2:168
5084 #, no-wrap
5085 msgid "B<ENOSPC>"
5086 msgstr "B<ENOSPC>"
5087
5088 #. type: Plain text
5089 #: build/C/man2/link.2:106 build/C/man2/rename.2:183
5090 #: build/C/man2/symlink.2:135
5091 msgid "The device containing the file has no room for the new directory entry."
5092 msgstr ""
5093 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5094 "空きがない。"
5095
5096 #. type: TP
5097 #: build/C/man2/link.2:106 build/C/man2/open.2:571 build/C/man2/readlink.2:122
5098 #: build/C/man2/rename.2:183 build/C/man2/rmdir.2:88
5099 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
5100 #, no-wrap
5101 msgid "B<ENOTDIR>"
5102 msgstr "B<ENOTDIR>"
5103
5104 #. type: Plain text
5105 #: build/C/man2/link.2:111
5106 msgid ""
5107 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5108 "a directory."
5109 msgstr ""
5110 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5111 "い。"
5112
5113 #. type: TP
5114 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:604
5115 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5116 #: build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
5117 #, no-wrap
5118 msgid "B<EPERM>"
5119 msgstr "B<EPERM>"
5120
5121 #. type: Plain text
5122 #: build/C/man2/link.2:115
5123 msgid "I<oldpath> is a directory."
5124 msgstr "I<oldpath> がディレクトリである。"
5125
5126 #. type: Plain text
5127 #: build/C/man2/link.2:120
5128 msgid ""
5129 "The file system containing I<oldpath> and I<newpath> does not support the "
5130 "creation of hard links."
5131 msgstr ""
5132 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5133 "していない。"
5134
5135 #. type: TP
5136 #: build/C/man2/link.2:120
5137 #, no-wrap
5138 msgid "B<EPERM> (since Linux 3.6)"
5139 msgstr "B<EPERM> (Linux 3.6 以降)"
5140
5141 #. type: Plain text
5142 #: build/C/man2/link.2:127
5143 msgid ""
5144 "The caller does not have permission to create a hard link to this file (see "
5145 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
5146 msgstr ""
5147 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5148 "の I</proc/sys/fs/protected_hardlink> の説明を参照)。"
5149
5150 #. type: TP
5151 #: build/C/man2/link.2:127 build/C/man2/open.2:612 build/C/man2/rename.2:221
5152 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145
5153 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:137
5154 #, no-wrap
5155 msgid "B<EROFS>"
5156 msgstr "B<EROFS>"
5157
5158 #. type: Plain text
5159 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5160 msgid "The file is on a read-only file system."
5161 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5162
5163 #. type: TP
5164 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5165 #, no-wrap
5166 msgid "B<EXDEV>"
5167 msgstr "B<EXDEV>"
5168
5169 #. type: Plain text
5170 #: build/C/man2/link.2:138
5171 msgid ""
5172 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
5173 "permits a file system to be mounted at multiple points, but B<link>()  does "
5174 "not work across different mount points, even if the same file system is "
5175 "mounted on both.)"
5176 msgstr ""
5177 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5178 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5179 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5180 "のマウント位置を跨いでは動作しない。)"
5181
5182 #.  SVr4 documents additional ENOLINK and
5183 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5184 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5185 #. type: Plain text
5186 #: build/C/man2/link.2:143
5187 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5188 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5189
5190 #. type: Plain text
5191 #: build/C/man2/link.2:150
5192 msgid ""
5193 "Hard links, as created by B<link>(), cannot span file systems.  Use "
5194 "B<symlink>(2)  if this is required."
5195 msgstr ""
5196 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5197 "このような場合は B<symlink>(2)  を使用すること。"
5198
5199 #.  more precisely: since kernel 1.3.56
5200 #.  For example, the default Solaris compilation environment
5201 #.  behaves like Linux, and contributors to a March 2005
5202 #.  thread in the Austin mailing list reported that some
5203 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5204 #. type: Plain text
5205 #: build/C/man2/link.2:181
5206 msgid ""
5207 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5208 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5209 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5210 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5211 "the same file that I<oldpath> refers to).  Some other implementations behave "
5212 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5213 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5214 "dereferenced if it is a symbolic link.  For precise control over the "
5215 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5216 msgstr ""
5217 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5218 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5219 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5220 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5221 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5222 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5223 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5224 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5225 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5226 "は B<linkat>(2)  を参照のこと。"
5227
5228 #. type: Plain text
5229 #: build/C/man2/link.2:187
5230 msgid ""
5231 "On NFS file systems, the return code may be wrong in case the NFS server "
5232 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5233 "to find out if the link got created."
5234 msgstr ""
5235 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5236 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5237 "ためには B<stat>(2)  を使用すること。"
5238
5239 #. type: Plain text
5240 #: build/C/man2/link.2:197
5241 msgid ""
5242 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5243 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5244 msgstr ""
5245 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5246 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5247
5248 #. type: TH
5249 #: build/C/man2/llseek.2:28
5250 #, no-wrap
5251 msgid "LLSEEK"
5252 msgstr "LLSEEK"
5253
5254 #. type: TH
5255 #: build/C/man2/llseek.2:28
5256 #, no-wrap
5257 msgid "2012-07-13"
5258 msgstr "2012-07-13"
5259
5260 #. type: Plain text
5261 #: build/C/man2/llseek.2:31
5262 msgid "_llseek - reposition read/write file offset"
5263 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5264
5265 #. type: Plain text
5266 #: build/C/man2/llseek.2:35
5267 #, no-wrap
5268 msgid ""
5269 "B<#include E<lt>sys/types.hE<gt>>\n"
5270 "B<#include E<lt>unistd.hE<gt>>\n"
5271 msgstr ""
5272 "B<#include E<lt>sys/types.hE<gt>>\n"
5273 "B<#include E<lt>unistd.hE<gt>>\n"
5274
5275 #. type: Plain text
5276 #: build/C/man2/llseek.2:39
5277 #, no-wrap
5278 msgid ""
5279 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5280 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5281 "B<            unsigned int >I<whence>B<);>\n"
5282 msgstr ""
5283 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5284 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5285 "B<            unsigned int >I<whence>B<);>\n"
5286
5287 #. type: Plain text
5288 #: build/C/man2/llseek.2:43
5289 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5290 msgstr ""
5291 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5292 "を参照。"
5293
5294 #. type: Plain text
5295 #: build/C/man2/llseek.2:62
5296 msgid ""
5297 "The B<_llseek>()  function repositions the offset of the open file "
5298 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5299 "offset_low> bytes relative to the beginning of the file, the current "
5300 "position in the file, or the end of the file, depending on whether I<whence> "
5301 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5302 "resulting file position in the argument I<result>."
5303 msgstr ""
5304 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5305 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5306 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5307 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5308 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5309 "のファイル位置を I<result> 引き数に返す。"
5310
5311 #. type: Plain text
5312 #: build/C/man2/llseek.2:69
5313 msgid ""
5314 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5315 "-1 is returned and I<errno> is set to indicate the error."
5316 msgstr ""
5317 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5318 "エラーを示す I<errno> が設定される。"
5319
5320 #. type: Plain text
5321 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:175
5322 msgid "I<fd> is not an open file descriptor."
5323 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5324
5325 #. type: Plain text
5326 #: build/C/man2/llseek.2:77
5327 msgid "Problem with copying results to user space."
5328 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5329
5330 #. type: Plain text
5331 #: build/C/man2/llseek.2:81
5332 msgid "I<whence> is invalid."
5333 msgstr "I<whence> が不正である。"
5334
5335 #. type: Plain text
5336 #: build/C/man2/llseek.2:84
5337 msgid ""
5338 "This function is Linux-specific, and should not be used in programs intended "
5339 "to be portable."
5340 msgstr ""
5341 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5342
5343 #. type: Plain text
5344 #: build/C/man2/llseek.2:87
5345 msgid ""
5346 "Glibc does not provide a wrapper for this system call; call it using "
5347 "B<syscall>(2)."
5348 msgstr ""
5349 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5350 "(2)  を使って呼び出すこと。"
5351
5352 #. type: Plain text
5353 #: build/C/man2/llseek.2:90
5354 msgid "B<lseek>(2), B<lseek64>(3)"
5355 msgstr "B<lseek>(2), B<lseek64>(3)"
5356
5357 #. type: TH
5358 #: build/C/man2/lseek.2:47
5359 #, no-wrap
5360 msgid "LSEEK"
5361 msgstr "LSEEK"
5362
5363 #. type: TH
5364 #: build/C/man2/lseek.2:47
5365 #, no-wrap
5366 msgid "2013-03-27"
5367 msgstr "2013-03-27"
5368
5369 #. type: Plain text
5370 #: build/C/man2/lseek.2:50
5371 msgid "lseek - reposition read/write file offset"
5372 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5373
5374 #. type: Plain text
5375 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5376 msgid "B<#include E<lt>sys/types.hE<gt>>"
5377 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5378
5379 #. type: Plain text
5380 #: build/C/man2/lseek.2:56
5381 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5382 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5383
5384 #. type: Plain text
5385 #: build/C/man2/lseek.2:67
5386 msgid ""
5387 "The B<lseek>()  function repositions the offset of the open file associated "
5388 "with the file descriptor I<fd> to the argument I<offset> according to the "
5389 "directive I<whence> as follows:"
5390 msgstr ""
5391 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5392 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5393 "へ以下のように変更する:"
5394
5395 #. type: Plain text
5396 #: build/C/man2/lseek.2:72
5397 msgid "The offset is set to I<offset> bytes."
5398 msgstr "オフセットは I<offset> バイトに設定される。"
5399
5400 #. type: Plain text
5401 #: build/C/man2/lseek.2:77
5402 msgid "The offset is set to its current location plus I<offset> bytes."
5403 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5404
5405 #. type: Plain text
5406 #: build/C/man2/lseek.2:82
5407 msgid "The offset is set to the size of the file plus I<offset> bytes."
5408 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5409
5410 #. type: Plain text
5411 #: build/C/man2/lseek.2:90
5412 msgid ""
5413 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5414 "the file (but this does not change the size of the file).  If data is later "
5415 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5416 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5417 "gap."
5418 msgstr ""
5419 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5420 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5421 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5422 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5423 "される。"
5424
5425 #. type: SS
5426 #: build/C/man2/lseek.2:90
5427 #, no-wrap
5428 msgid "Seeking file data and holes"
5429 msgstr "ファイルのデータとホールの探索"
5430
5431 #. type: Plain text
5432 #: build/C/man2/lseek.2:93
5433 msgid ""
5434 "Since version 3.1, Linux supports the following additional values for "
5435 "I<whence>:"
5436 msgstr ""
5437 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5438
5439 #. type: TP
5440 #: build/C/man2/lseek.2:93
5441 #, no-wrap
5442 msgid "B<SEEK_DATA>"
5443 msgstr "B<SEEK_DATA>"
5444
5445 #. type: Plain text
5446 #: build/C/man2/lseek.2:104
5447 msgid ""
5448 "Adjust the file offset to the next location in the file greater than or "
5449 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5450 "file offset is set to I<offset>."
5451 msgstr ""
5452 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5453 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5454 "定される。"
5455
5456 #. type: TP
5457 #: build/C/man2/lseek.2:104
5458 #, no-wrap
5459 msgid "B<SEEK_HOLE>"
5460 msgstr "B<SEEK_HOLE>"
5461
5462 #. type: Plain text
5463 #: build/C/man2/lseek.2:118
5464 msgid ""
5465 "Adjust the file offset to the next hole in the file greater than or equal to "
5466 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5467 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5468 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5469 "hole at the end of any file)."
5470 msgstr ""
5471 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5472 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5473 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5474 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5475 "だ)。"
5476
5477 #. type: Plain text
5478 #: build/C/man2/lseek.2:124
5479 msgid ""
5480 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5481 "end of the file."
5482 msgstr ""
5483 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5484 "B<lseek>() は失敗する。"
5485
5486 #. type: Plain text
5487 #: build/C/man2/lseek.2:130
5488 msgid ""
5489 "These operations allow applications to map holes in a sparsely allocated "
5490 "file.  This can be useful for applications such as file backup tools, which "
5491 "can save space when creating backups and preserve holes, if they have a "
5492 "mechanism for discovering holes."
5493 msgstr ""
5494 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5495 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5496 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5497 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5498 "約し、ホールを保持することができる。"
5499
5500 #.  https://lkml.org/lkml/2011/4/22/79
5501 #.  http://lwn.net/Articles/440255/
5502 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5503 #. type: Plain text
5504 #: build/C/man2/lseek.2:153
5505 msgid ""
5506 "For the purposes of these operations, a hole is a sequence of zeros that "
5507 "(normally) has not been allocated in the underlying file storage.  However, "
5508 "a file system is not obliged to report holes, so these operations are not a "
5509 "guaranteed mechanism for mapping the storage space actually allocated to a "
5510 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5511 "the underlying storage may not be reported as a hole.)  In the simplest "
5512 "implementation, a file system can support the operations by making "
5513 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5514 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5515 "by I<offset> is a hole, it can be considered to consist of data that is a "
5516 "sequence of zeros)."
5517 msgstr ""
5518 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5519 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5520 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5521 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5522 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5523 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5524 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5525 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5526 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5527 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5528 "ということである)。"
5529
5530 #. type: Plain text
5531 #: build/C/man2/lseek.2:162
5532 msgid ""
5533 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5534 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5535 msgstr ""
5536 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5537 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5538
5539 #. type: Plain text
5540 #: build/C/man2/lseek.2:170
5541 msgid ""
5542 "Upon successful completion, B<lseek>()  returns the resulting offset "
5543 "location as measured in bytes from the beginning of the file.  On error, the "
5544 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5545 msgstr ""
5546 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5547 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5548 "される。"
5549
5550 #.  Some systems may allow negative offsets for character devices
5551 #.  and/or for remote file systems.
5552 #. type: Plain text
5553 #: build/C/man2/lseek.2:183
5554 msgid ""
5555 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5556 "beyond the end of a seekable device."
5557 msgstr ""
5558 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5559 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5560
5561 #. type: TP
5562 #: build/C/man2/lseek.2:183 build/C/man2/open.2:584
5563 #, no-wrap
5564 msgid "B<EOVERFLOW>"
5565 msgstr "B<EOVERFLOW>"
5566
5567 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5568 #. type: Plain text
5569 #: build/C/man2/lseek.2:188
5570 msgid "The resulting file offset cannot be represented in an I<off_t>."
5571 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5572
5573 #. type: TP
5574 #: build/C/man2/lseek.2:188
5575 #, no-wrap
5576 msgid "B<ESPIPE>"
5577 msgstr "B<ESPIPE>"
5578
5579 #. type: Plain text
5580 #: build/C/man2/lseek.2:192
5581 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5582 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5583
5584 #. type: TP
5585 #: build/C/man2/lseek.2:192 build/C/man2/open.2:578
5586 #, no-wrap
5587 msgid "B<ENXIO>"
5588 msgstr "B<ENXIO>"
5589
5590 #. type: Plain text
5591 #: build/C/man2/lseek.2:200
5592 msgid ""
5593 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5594 "beyond the end of the file."
5595 msgstr ""
5596 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5597 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5598
5599 #.  SVr4 documents additional error
5600 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5601 #. type: Plain text
5602 #: build/C/man2/lseek.2:202 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
5603 #: build/C/man2/symlink.2:155 build/C/man2/unlink.2:145
5604 #: build/C/man2/write.2:189
5605 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5606 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5607
5608 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5609 #. type: Plain text
5610 #: build/C/man2/lseek.2:210
5611 msgid ""
5612 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5613 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5614 "next POSIX revision (Issue 8)."
5615 msgstr ""
5616 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
5617 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
5618 "る。"
5619
5620 #. type: Plain text
5621 #: build/C/man2/lseek.2:214
5622 msgid ""
5623 "Some devices are incapable of seeking and POSIX does not specify which "
5624 "devices must support B<lseek>()."
5625 msgstr ""
5626 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5627 "に対応すべきかは規定していない。"
5628
5629 #.  Other systems return the number of written characters,
5630 #.  using SEEK_SET to set the counter. (Of written characters.)
5631 #. type: Plain text
5632 #: build/C/man2/lseek.2:221
5633 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
5634 msgstr ""
5635 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
5636 "る。"
5637
5638 #. type: Plain text
5639 #: build/C/man2/lseek.2:224
5640 msgid ""
5641 "When converting old code, substitute values for I<whence> with the following "
5642 "macros:"
5643 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5644
5645 #. type: tbl table
5646 #: build/C/man2/lseek.2:227
5647 #, no-wrap
5648 msgid "old\tnew\n"
5649 msgstr "old \tnew\n"
5650
5651 #. type: tbl table
5652 #: build/C/man2/lseek.2:228
5653 #, no-wrap
5654 msgid "0\tSEEK_SET\n"
5655 msgstr "0\tSEEK_SET\n"
5656
5657 #. type: tbl table
5658 #: build/C/man2/lseek.2:229
5659 #, no-wrap
5660 msgid "1\tSEEK_CUR\n"
5661 msgstr "1\tSEEK_CUR\n"
5662
5663 #. type: tbl table
5664 #: build/C/man2/lseek.2:230
5665 #, no-wrap
5666 msgid "2\tSEEK_END\n"
5667 msgstr "2\tSEEK_END\n"
5668
5669 #. type: tbl table
5670 #: build/C/man2/lseek.2:231
5671 #, no-wrap
5672 msgid "L_SET\tSEEK_SET\n"
5673 msgstr "L_SET\tSEEK_SET\n"
5674
5675 #. type: tbl table
5676 #: build/C/man2/lseek.2:232
5677 #, no-wrap
5678 msgid "L_INCR\tSEEK_CUR\n"
5679 msgstr "L_INCR\tSEEK_CUR\n"
5680
5681 #. type: tbl table
5682 #: build/C/man2/lseek.2:233
5683 #, no-wrap
5684 msgid "L_XTND\tSEEK_END\n"
5685 msgstr "L_XTND\tSEEK_END\n"
5686
5687 #. type: Plain text
5688 #: build/C/man2/lseek.2:245
5689 msgid ""
5690 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5691 "current file position pointer, so seeking on such files may be subject to "
5692 "race conditions."
5693 msgstr ""
5694 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5695 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5696 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5697
5698 #. type: Plain text
5699 #: build/C/man2/lseek.2:252
5700 msgid ""
5701 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5702 "B<posix_fallocate>(3)"
5703 msgstr ""
5704 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5705 "B<posix_fallocate>(3)"
5706
5707 #. type: TH
5708 #: build/C/man3/lseek64.3:25
5709 #, no-wrap
5710 msgid "LSEEK64"
5711 msgstr "LSEEK64"
5712
5713 #. type: TH
5714 #: build/C/man3/lseek64.3:25
5715 #, no-wrap
5716 msgid "2004-12-11"
5717 msgstr "2004-12-11"
5718
5719 #. type: Plain text
5720 #: build/C/man3/lseek64.3:28
5721 msgid "lseek64 - reposition 64-bit read/write file offset"
5722 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5723
5724 #. type: Plain text
5725 #: build/C/man3/lseek64.3:30
5726 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5727 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5728
5729 #. type: Plain text
5730 #: build/C/man3/lseek64.3:36
5731 msgid ""
5732 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5733 msgstr ""
5734 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5735
5736 #. type: Plain text
5737 #: build/C/man3/lseek64.3:53
5738 msgid ""
5739 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5740 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5741 "start, current position, or end of the file, when I<whence> has the value "
5742 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5743 msgstr ""
5744 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5745 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5746 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5747 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5748
5749 #. type: Plain text
5750 #: build/C/man3/lseek64.3:56
5751 msgid "For more details, return value, and errors, see B<lseek>(2)."
5752 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5753
5754 #. type: Plain text
5755 #: build/C/man3/lseek64.3:63
5756 msgid ""
5757 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5758 "the raw system call B<_llseek>(2)."
5759 msgstr ""
5760 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5761 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5762
5763 #. type: SS
5764 #: build/C/man3/lseek64.3:63
5765 #, no-wrap
5766 msgid "lseek"
5767 msgstr "lseek"
5768
5769 #. type: Plain text
5770 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
5771 #: build/C/man3/lseek64.3:116
5772 msgid "Prototype:"
5773 msgstr "プロトタイプ:"
5774
5775 #. type: Plain text
5776 #: build/C/man3/lseek64.3:69
5777 #, no-wrap
5778 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5779 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5780
5781 #. type: Plain text
5782 #: build/C/man3/lseek64.3:77
5783 msgid ""
5784 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5785 "architectures, unless one compiles with"
5786 msgstr ""
5787 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5788 "ビット符号付き型である。 ただし、"
5789
5790 #. type: Plain text
5791 #: build/C/man3/lseek64.3:85
5792 msgid "in which case it is a 64-bit signed type."
5793 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5794
5795 #. type: SS
5796 #: build/C/man3/lseek64.3:85
5797 #, no-wrap
5798 msgid "lseek64"
5799 msgstr "lseek64"
5800
5801 #. type: Plain text
5802 #: build/C/man3/lseek64.3:91
5803 #, no-wrap
5804 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5805 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5806
5807 #. type: Plain text
5808 #: build/C/man3/lseek64.3:102
5809 msgid ""
5810 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5811 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5812 "when one compiles with"
5813 msgstr ""
5814 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5815 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5816 "ルした場合にのみ使用可能である。"
5817
5818 #. type: Plain text
5819 #: build/C/man3/lseek64.3:106
5820 #, no-wrap
5821 msgid "#define _LARGEFILE64_SOURCE\n"
5822 msgstr "#define _LARGEFILE64_SOURCE\n"
5823
5824 #.  in glibc 2.0.94, not in 2.0.6
5825 #. type: Plain text
5826 #: build/C/man3/lseek64.3:114
5827 msgid ""
5828 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5829 "be an alias for B<llseek>()."
5830 msgstr ""
5831 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5832 "アスとして定義されている。"
5833
5834 #. type: SS
5835 #: build/C/man3/lseek64.3:114
5836 #, no-wrap
5837 msgid "llseek"
5838 msgstr "llseek"
5839
5840 #. type: Plain text
5841 #: build/C/man3/lseek64.3:120
5842 #, no-wrap
5843 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5844 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5845
5846 #.  in libc 5.0.9, not in 4.7.6
5847 #. type: Plain text
5848 #: build/C/man3/lseek64.3:139
5849 msgid ""
5850 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5851 "()  is available in libc5 and glibc and works without special defines.  Its "
5852 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5853 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5854 "should add the above prototype, or something equivalent, to their own "
5855 "source.  When users complained about data loss caused by a miscompilation of "
5856 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5857 msgstr ""
5858 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5859 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5860 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5861 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5862 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5863 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5864 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5865
5866 #. type: Plain text
5867 #: build/C/man3/lseek64.3:142
5868 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5869 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5870
5871 #. type: Plain text
5872 #: build/C/man3/lseek64.3:146
5873 msgid ""
5874 "This makes this function unusable if one desires a warning-free compilation."
5875 msgstr ""
5876 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5877
5878 #. type: SS
5879 #: build/C/man3/lseek64.3:146
5880 #, no-wrap
5881 msgid "_llseek"
5882 msgstr "_llseek"
5883
5884 #. type: Plain text
5885 #: build/C/man3/lseek64.3:149
5886 msgid ""
5887 "All the above functions are implemented in terms of this system call.  The "
5888 "prototype is:"
5889 msgstr ""
5890 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5891 "下の通り:"
5892
5893 #. type: Plain text
5894 #: build/C/man3/lseek64.3:154
5895 #, no-wrap
5896 msgid ""
5897 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5898 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5899 msgstr ""
5900 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5901 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5902
5903 #. type: Plain text
5904 #: build/C/man3/lseek64.3:159
5905 msgid "For more details, see B<llseek>(2)."
5906 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5907
5908 #. type: Plain text
5909 #: build/C/man3/lseek64.3:162
5910 msgid "B<llseek>(2), B<lseek>(2)"
5911 msgstr "B<llseek>(2), B<lseek>(2)"
5912
5913 #. type: TH
5914 #: build/C/man2/open.2:52
5915 #, no-wrap
5916 msgid "OPEN"
5917 msgstr "OPEN"
5918
5919 #. type: TH
5920 #: build/C/man2/open.2:52
5921 #, no-wrap
5922 msgid "2013-02-18"
5923 msgstr "2013-02-18"
5924
5925 #. type: Plain text
5926 #: build/C/man2/open.2:55
5927 msgid "open, creat - open and possibly create a file or device"
5928 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5929
5930 #. type: Plain text
5931 #: build/C/man2/open.2:60
5932 #, no-wrap
5933 msgid ""
5934 "B<#include E<lt>sys/types.hE<gt>>\n"
5935 "B<#include E<lt>sys/stat.hE<gt>>\n"
5936 "B<#include E<lt>fcntl.hE<gt>>\n"
5937 msgstr ""
5938 "B<#include E<lt>sys/types.hE<gt>>\n"
5939 "B<#include E<lt>sys/stat.hE<gt>>\n"
5940 "B<#include E<lt>fcntl.hE<gt>>\n"
5941
5942 #. type: Plain text
5943 #: build/C/man2/open.2:63
5944 #, no-wrap
5945 msgid ""
5946 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5947 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5948 msgstr ""
5949 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5950 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5951
5952 #. type: Plain text
5953 #: build/C/man2/open.2:65
5954 #, no-wrap
5955 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5956 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5957
5958 #. type: Plain text
5959 #: build/C/man2/open.2:76
5960 msgid ""
5961 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
5962 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
5963 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
5964 "by a successful call will be the lowest-numbered file descriptor not "
5965 "currently open for the process."
5966 msgstr ""
5967 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
5968 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
5969 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
5970 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
5971 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
5972 "のものとなる。"
5973
5974 #. type: Plain text
5975 #: build/C/man2/open.2:88
5976 msgid ""
5977 "By default, the new file descriptor is set to remain open across an B<execve>"
5978 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
5979 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
5980 "to change this default).  The file offset is set to the beginning of the "
5981 "file (see B<lseek>(2))."
5982 msgstr ""
5983 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
5984 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
5985 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
5986 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
5987 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
5988
5989 #. type: Plain text
5990 #: build/C/man2/open.2:107
5991 msgid ""
5992 "A call to B<open>()  creates a new I<open file description>, an entry in the "
5993 "system-wide table of open files.  This entry records the file offset and the "
5994 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
5995 "file descriptor is a reference to one of these entries; this reference is "
5996 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
5997 "different file.  The new open file description is initially not shared with "
5998 "any other process, but sharing may arise via B<fork>(2)."
5999 msgstr ""
6000 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6001 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6002 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6003 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6004 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6005 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6006 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6007 "が、 B<fork>(2)  で共有が起こる場合がある。"
6008
6009 #. type: Plain text
6010 #: build/C/man2/open.2:115
6011 msgid ""
6012 "The argument I<flags> must include one of the following I<access modes>: "
6013 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6014 "only, write-only, or read/write, respectively."
6015 msgstr ""
6016 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6017 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6018 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6019
6020 #.  SUSv4 divides the flags into:
6021 #.  * Access mode
6022 #.  * File creation
6023 #.  * File status
6024 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6025 #.  though it's not clear what the difference between "other" and
6026 #.  "File creation" flags is.  I raised an Aardvark to see if this
6027 #.  can be clarified in SUSv4; 10 Oct 2008.
6028 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6029 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6030 #.  are also categorized" as file status flags.
6031 #. type: Plain text
6032 #: build/C/man2/open.2:153
6033 msgid ""
6034 "In addition, zero or more file creation flags and file status flags can be "
6035 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6036 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6037 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
6038 "remaining flags listed below.  The distinction between these two groups of "
6039 "flags is that the file status flags can be retrieved and (in some cases)  "
6040 "modified using B<fcntl>(2).  The full list of file creation flags and file "
6041 "status flags is as follows:"
6042 msgstr ""
6043 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6044 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6045 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6046 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TRUNC>, "
6047 "B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち上記以外の残"
6048 "りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は B<fcntl>"
6049 "(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点にあ"
6050 "る。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
6051
6052 #. type: TP
6053 #: build/C/man2/open.2:153
6054 #, no-wrap
6055 msgid "B<O_APPEND>"
6056 msgstr "B<O_APPEND>"
6057
6058 #.  For more background, see
6059 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6060 #.  http://nfs.sourceforge.net/
6061 #. type: Plain text
6062 #: build/C/man2/open.2:170
6063 msgid ""
6064 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6065 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6066 "may lead to corrupted files on NFS file systems if more than one process "
6067 "appends data to a file at once.  This is because NFS does not support "
6068 "appending to a file, so the client kernel has to simulate it, which can't be "
6069 "done without a race condition."
6070 msgstr ""
6071 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6072 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6073 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6074 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6075 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6076 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6077 "とはできないからである。"
6078
6079 #. type: TP
6080 #: build/C/man2/open.2:170
6081 #, no-wrap
6082 msgid "B<O_ASYNC>"
6083 msgstr "B<O_ASYNC>"
6084
6085 #. type: Plain text
6086 #: build/C/man2/open.2:183
6087 msgid ""
6088 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6089 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6090 "this file descriptor.  This feature is available only for terminals, "
6091 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6092 "B<fcntl>(2)  for further details."
6093 msgstr ""
6094 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6095 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6096 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6097 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6098 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
6099
6100 #. type: TP
6101 #: build/C/man2/open.2:183
6102 #, no-wrap
6103 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
6104 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6105
6106 #.  This flag fixes only one form of the race condition;
6107 #.  The race can also occur with, for example, descriptors
6108 #.  returned by accept(), pipe(), etc.
6109 #. type: Plain text
6110 #: build/C/man2/open.2:208
6111 msgid ""
6112 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6113 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6114 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
6115 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
6116 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
6117 "race conditions where one thread opens a file descriptor at the same time as "
6118 "another thread does a B<fork>(2)  plus B<execve>(2)."
6119 msgstr ""
6120 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6121 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
6122 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
6123 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
6124 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
6125 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
6126 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
6127 "はないからである。"
6128
6129 #. type: TP
6130 #: build/C/man2/open.2:208
6131 #, no-wrap
6132 msgid "B<O_CREAT>"
6133 msgstr "B<O_CREAT>"
6134
6135 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6136 #.  XFS (since 2.6.14).
6137 #. type: Plain text
6138 #: build/C/man2/open.2:224
6139 msgid ""
6140 "If the file does not exist it will be created.  The owner (user ID) of the "
6141 "file is set to the effective user ID of the process.  The group ownership "
6142 "(group ID) is set either to the effective group ID of the process or to the "
6143 "group ID of the parent directory (depending on file system type and mount "
6144 "options, and the mode of the parent directory, see the mount options "
6145 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6146 msgstr ""
6147 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6148 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6149 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6150 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6151 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6152 "I<bsdgroups> と I<sysvgroups> を参照)。"
6153
6154 #. type: Plain text
6155 #: build/C/man2/open.2:247
6156 msgid ""
6157 "I<mode> specifies the permissions to use in case a new file is created.  "
6158 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
6159 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
6160 "permissions are modified by the process's I<umask> in the usual way: The "
6161 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
6162 "mode applies only to future accesses of the newly created file; the B<open>"
6163 "()  call that creates a read-only file may well return a read/write file "
6164 "descriptor."
6165 msgstr ""
6166 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6167 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
6168 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
6169 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
6170 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
6171 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
6172 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
6173 "可能なファイルディスクリプタを返すことがありうる。"
6174
6175 #. type: Plain text
6176 #: build/C/man2/open.2:250
6177 msgid "The following symbolic constants are provided for I<mode>:"
6178 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6179
6180 #. type: TP
6181 #: build/C/man2/open.2:250
6182 #, no-wrap
6183 msgid "B<S_IRWXU>"
6184 msgstr "B<S_IRWXU>"
6185
6186 #. type: Plain text
6187 #: build/C/man2/open.2:253
6188 msgid "00700 user (file owner) has read, write and execute permission"
6189 msgstr ""
6190 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6191
6192 #. type: TP
6193 #: build/C/man2/open.2:253
6194 #, no-wrap
6195 msgid "B<S_IRUSR>"
6196 msgstr "B<S_IRUSR>"
6197
6198 #. type: Plain text
6199 #: build/C/man2/open.2:256
6200 msgid "00400 user has read permission"
6201 msgstr "00400 ユーザーに読み込みの許可がある。"
6202
6203 #. type: TP
6204 #: build/C/man2/open.2:256
6205 #, no-wrap
6206 msgid "B<S_IWUSR>"
6207 msgstr "B<S_IWUSR>"
6208
6209 #. type: Plain text
6210 #: build/C/man2/open.2:259
6211 msgid "00200 user has write permission"
6212 msgstr "00200 ユーザーに書き込みの許可がある。"
6213
6214 #. type: TP
6215 #: build/C/man2/open.2:259
6216 #, no-wrap
6217 msgid "B<S_IXUSR>"
6218 msgstr "B<S_IXUSR>"
6219
6220 #. type: Plain text
6221 #: build/C/man2/open.2:262
6222 msgid "00100 user has execute permission"
6223 msgstr "00100 ユーザーに実行の許可がある。"
6224
6225 #. type: TP
6226 #: build/C/man2/open.2:262
6227 #, no-wrap
6228 msgid "B<S_IRWXG>"
6229 msgstr "B<S_IRWXG>"
6230
6231 #. type: Plain text
6232 #: build/C/man2/open.2:265
6233 msgid "00070 group has read, write and execute permission"
6234 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6235
6236 #. type: TP
6237 #: build/C/man2/open.2:265
6238 #, no-wrap
6239 msgid "B<S_IRGRP>"
6240 msgstr "B<S_IRGRP>"
6241
6242 #. type: Plain text
6243 #: build/C/man2/open.2:268
6244 msgid "00040 group has read permission"
6245 msgstr "00040 グループに読み込みの許可がある。"
6246
6247 #. type: TP
6248 #: build/C/man2/open.2:268
6249 #, no-wrap
6250 msgid "B<S_IWGRP>"
6251 msgstr "B<S_IWGRP>"
6252
6253 #. type: Plain text
6254 #: build/C/man2/open.2:271
6255 msgid "00020 group has write permission"
6256 msgstr "00020 グループに書き込みの許可がある。"
6257
6258 #. type: TP
6259 #: build/C/man2/open.2:271
6260 #, no-wrap
6261 msgid "B<S_IXGRP>"
6262 msgstr "B<S_IXGRP>"
6263
6264 #. type: Plain text
6265 #: build/C/man2/open.2:274
6266 msgid "00010 group has execute permission"
6267 msgstr "00010 グループに実行の許可がある。"
6268
6269 #. type: TP
6270 #: build/C/man2/open.2:274
6271 #, no-wrap
6272 msgid "B<S_IRWXO>"
6273 msgstr "B<S_IRWXO>"
6274
6275 #. type: Plain text
6276 #: build/C/man2/open.2:277
6277 msgid "00007 others have read, write and execute permission"
6278 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6279
6280 #. type: TP
6281 #: build/C/man2/open.2:277
6282 #, no-wrap
6283 msgid "B<S_IROTH>"
6284 msgstr "B<S_IROTH>"
6285
6286 #. type: Plain text
6287 #: build/C/man2/open.2:280
6288 msgid "00004 others have read permission"
6289 msgstr "00004 他人に読み込みの許可がある。"
6290
6291 #. type: TP
6292 #: build/C/man2/open.2:280
6293 #, no-wrap
6294 msgid "B<S_IWOTH>"
6295 msgstr "B<S_IWOTH>"
6296
6297 #. type: Plain text
6298 #: build/C/man2/open.2:283
6299 msgid "00002 others have write permission"
6300 msgstr "00002 他人に書き込みの許可がある。"
6301
6302 #. type: TP
6303 #: build/C/man2/open.2:283
6304 #, no-wrap
6305 msgid "B<S_IXOTH>"
6306 msgstr "B<S_IXOTH>"
6307
6308 #. type: Plain text
6309 #: build/C/man2/open.2:286
6310 msgid "00001 others have execute permission"
6311 msgstr "00001 他人に実行の許可がある。"
6312
6313 #. type: TP
6314 #: build/C/man2/open.2:287
6315 #, no-wrap
6316 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6317 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6318
6319 #. type: Plain text
6320 #: build/C/man2/open.2:304
6321 msgid ""
6322 "Try to minimize cache effects of the I/O to and from this file.  In general "
6323 "this will degrade performance, but it is useful in special situations, such "
6324 "as when applications do their own caching.  File I/O is done directly to/"
6325 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6326 "transfer data synchronously, but does not give the guarantees of the "
6327 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6328 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6329 "B<O_DIRECT>.  See NOTES below for further discussion."
6330 msgstr ""
6331 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6332 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6333 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6334 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6335 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6336 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6337 "使用しなければならない。下記の「注意」の節の議論も参照。"
6338
6339 #. type: Plain text
6340 #: build/C/man2/open.2:308
6341 msgid ""
6342 "A semantically similar (but deprecated) interface for block devices is "
6343 "described in B<raw>(8)."
6344 msgstr ""
6345 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6346 "れている (但し、このインタフェースは非推奨である)。"
6347
6348 #. type: TP
6349 #: build/C/man2/open.2:308
6350 #, no-wrap
6351 msgid "B<O_DIRECTORY>"
6352 msgstr "B<O_DIRECTORY>"
6353
6354 #.  But see the following and its replies:
6355 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6356 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6357 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6358 #. type: Plain text
6359 #: build/C/man2/open.2:322
6360 msgid ""
6361 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6362 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6363 "service problems if B<opendir>(3)  is called on a FIFO or tape device, but "
6364 "should not be used outside of the implementation of B<opendir>(3)."
6365 msgstr ""
6366 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6367 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6368 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6369 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6370
6371 #. type: TP
6372 #: build/C/man2/open.2:322
6373 #, no-wrap
6374 msgid "B<O_EXCL>"
6375 msgstr "B<O_EXCL>"
6376
6377 #. type: Plain text
6378 #: build/C/man2/open.2:332
6379 msgid ""
6380 "Ensure that this call creates the file: if this flag is specified in "
6381 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6382 "will fail."
6383 msgstr ""
6384 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6385 "と\n"
6386 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6387 "敗\n"
6388 "する。"
6389
6390 #.  POSIX.1-2001 explicitly requires this behavior.
6391 #. type: Plain text
6392 #: build/C/man2/open.2:340
6393 msgid ""
6394 "When these two flags are specified, symbolic links are not followed: if "
6395 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6396 "the symbolic link points to."
6397 msgstr ""
6398 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6399 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6400 "かに関わらず B<open>()  は失敗する。"
6401
6402 #. type: Plain text
6403 #: build/C/man2/open.2:356
6404 msgid ""
6405 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6406 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6407 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6408 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6409 "the error B<EBUSY>."
6410 msgstr ""
6411 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6412 "B<O_EXCL> の動作は規定されていない。\n"
6413 "これには一つ例外があり、Linux 2.6 以降では、\n"
6414 "I<pathname> がブロックデバイスを参照している場合、\n"
6415 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6416 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6417 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6418
6419 #. type: Plain text
6420 #: build/C/man2/open.2:378
6421 msgid ""
6422 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6423 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6424 "programs that rely on it for performing locking tasks will contain a race "
6425 "condition.  Portable programs that want to perform atomic file locking using "
6426 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6427 "create a unique file on the same file system (e.g., incorporating hostname "
6428 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6429 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6430 "unique file to check if its link count has increased to 2, in which case the "
6431 "lock is also successful."
6432 msgstr ""
6433 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6434 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6435 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6436 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6437 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6438 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6439 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6440 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6441 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6442 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6443 "じくロックに成功しているということである。"
6444
6445 #. type: TP
6446 #: build/C/man2/open.2:378
6447 #, no-wrap
6448 msgid "B<O_LARGEFILE>"
6449 msgstr "B<O_LARGEFILE>"
6450
6451 #. type: Plain text
6452 #: build/C/man2/open.2:400
6453 msgid ""
6454 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6455 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6456 "macro must be defined (before including I<any> header files)  in order to "
6457 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6458 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6459 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6460 msgstr ""
6461 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6462 "ファ\n"
6463 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6464 "イ\n"
6465 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6466 "ば\n"
6467 "ならない。\n"
6468 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6469 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6470 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6471
6472 #. type: TP
6473 #: build/C/man2/open.2:400
6474 #, no-wrap
6475 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6476 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6477
6478 #.  The O_NOATIME flag also affects the treatment of st_atime
6479 #.  by mmap() and readdir(2), MTK, Dec 04.
6480 #. type: Plain text
6481 #: build/C/man2/open.2:413
6482 msgid ""
6483 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6484 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6485 "programs, where its use can significantly reduce the amount of disk "
6486 "activity.  This flag may not be effective on all file systems.  One example "
6487 "is NFS, where the server maintains the access time."
6488 msgstr ""
6489 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6490 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
6491 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
6492 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6493 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6494
6495 #. type: TP
6496 #: build/C/man2/open.2:413
6497 #, no-wrap
6498 msgid "B<O_NOCTTY>"
6499 msgstr "B<O_NOCTTY>"
6500
6501 #. type: Plain text
6502 #: build/C/man2/open.2:421
6503 msgid ""
6504 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
6505 "become the process's controlling terminal even if the process does not have "
6506 "one."
6507 msgstr ""
6508 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6509 "る\n"
6510 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6511 "ル\n"
6512 "は制御端末にはならない。"
6513
6514 #. type: TP
6515 #: build/C/man2/open.2:421
6516 #, no-wrap
6517 msgid "B<O_NOFOLLOW>"
6518 msgstr "B<O_NOFOLLOW>"
6519
6520 #.  The headers from glibc 2.0.100 and later include a
6521 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6522 #.  used\fP.
6523 #. type: Plain text
6524 #: build/C/man2/open.2:430
6525 msgid ""
6526 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6527 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6528 "earlier components of the pathname will still be followed."
6529 msgstr ""
6530 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6531 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6532 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6533 "が シンボリックリンクである場合には、それが指す先が参照される。"
6534
6535 #. type: TP
6536 #: build/C/man2/open.2:430
6537 #, no-wrap
6538 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6539 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6540
6541 #. type: Plain text
6542 #: build/C/man2/open.2:443
6543 msgid ""
6544 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6545 "()  nor any subsequent operations on the file descriptor which is returned "
6546 "will cause the calling process to wait.  For the handling of FIFOs (named "
6547 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6548 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6549 "see B<fcntl>(2)."
6550 msgstr ""
6551 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6552 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6553 "出\n"
6554 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6555 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6556 "イ\n"
6557 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6558 "議論は、 B<fcntl>(2) を参照すること。"
6559
6560 #. type: TP
6561 #: build/C/man2/open.2:443
6562 #, no-wrap
6563 msgid "B<O_SYNC>"
6564 msgstr "B<O_SYNC>"
6565
6566 #. type: Plain text
6567 #: build/C/man2/open.2:451
6568 msgid ""
6569 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6570 "file descriptor will block the calling process until the data has been "
6571 "physically written to the underlying hardware.  I<But see NOTES below>."
6572 msgstr ""
6573 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6574 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6575 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6576 "「注意」の章も参照。>"
6577
6578 #. type: TP
6579 #: build/C/man2/open.2:451
6580 #, no-wrap
6581 msgid "B<O_TRUNC>"
6582 msgstr "B<O_TRUNC>"
6583
6584 #. type: Plain text
6585 #: build/C/man2/open.2:465
6586 msgid ""
6587 "If the file already exists and is a regular file and the open mode allows "
6588 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6589 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6590 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6591 msgstr ""
6592 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6593 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6594 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6595 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6596 "ある。"
6597
6598 #. type: Plain text
6599 #: build/C/man2/open.2:469
6600 msgid ""
6601 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6602 "file has been opened."
6603 msgstr ""
6604 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6605 "用して変更することができる。"
6606
6607 #. type: Plain text
6608 #: build/C/man2/open.2:477
6609 msgid ""
6610 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6611 "O_WRONLY|O_TRUNC>."
6612 msgstr ""
6613 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6614 "を行うのと等価である。"
6615
6616 #. type: Plain text
6617 #: build/C/man2/open.2:485
6618 msgid ""
6619 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6620 "occurred (in which case, I<errno> is set appropriately)."
6621 msgstr ""
6622 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6623 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6624
6625 #. type: Plain text
6626 #: build/C/man2/open.2:495
6627 msgid ""
6628 "The requested access to the file is not allowed, or search permission is "
6629 "denied for one of the directories in the path prefix of I<pathname>, or the "
6630 "file did not exist yet and write access to the parent directory is not "
6631 "allowed.  (See also B<path_resolution>(7).)"
6632 msgstr ""
6633 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6634 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6635 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6636 "すること。)"
6637
6638 #. type: Plain text
6639 #: build/C/man2/open.2:501
6640 msgid ""
6641 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
6642 "of disk blocks or inodes on the file system has been exhausted."
6643 msgstr ""
6644 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
6645 "inode がそのファイルシステムのユーザクォータに達していた。"
6646
6647 #. type: Plain text
6648 #: build/C/man2/open.2:507
6649 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6650 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6651
6652 #. type: Plain text
6653 #: build/C/man2/open.2:511 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6654 msgid "I<pathname> points outside your accessible address space."
6655 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6656
6657 #. type: TP
6658 #: build/C/man2/open.2:511 build/C/man2/write.2:145
6659 #, no-wrap
6660 msgid "B<EFBIG>"
6661 msgstr "B<EFBIG>"
6662
6663 #. type: Plain text
6664 #: build/C/man2/open.2:515
6665 msgid "See B<EOVERFLOW>."
6666 msgstr "B<EOVERFLOW> 参照。"
6667
6668 #. type: TP
6669 #: build/C/man2/open.2:515 build/C/man2/read.2:122 build/C/man3/scanf.3:561
6670 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
6671 #, no-wrap
6672 msgid "B<EINTR>"
6673 msgstr "B<EINTR>"
6674
6675 #. type: Plain text
6676 #: build/C/man2/open.2:522
6677 msgid ""
6678 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6679 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6680 "(7)."
6681 msgstr ""
6682 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6683 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6684 "B<signal>(7)  参照。"
6685
6686 #. type: TP
6687 #: build/C/man2/open.2:522 build/C/man2/read.2:158 build/C/man2/rename.2:143
6688 #: build/C/man2/unlink.2:87
6689 #, no-wrap
6690 msgid "B<EISDIR>"
6691 msgstr "B<EISDIR>"
6692
6693 #. type: Plain text
6694 #: build/C/man2/open.2:531
6695 msgid ""
6696 "I<pathname> refers to a directory and the access requested involved writing "
6697 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6698 msgstr ""
6699 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6700 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6701
6702 #. type: Plain text
6703 #: build/C/man2/open.2:538
6704 msgid ""
6705 "Too many symbolic links were encountered in resolving I<pathname>, or "
6706 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6707 msgstr ""
6708 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6709 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6710
6711 #. type: TP
6712 #: build/C/man2/open.2:538 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:66
6713 #, no-wrap
6714 msgid "B<EMFILE>"
6715 msgstr "B<EMFILE>"
6716
6717 #. type: Plain text
6718 #: build/C/man2/open.2:541
6719 msgid "The process already has the maximum number of files open."
6720 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6721
6722 #. type: Plain text
6723 #: build/C/man2/open.2:545 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6724 msgid "I<pathname> was too long."
6725 msgstr "I<pathname> が長過ぎる。"
6726
6727 #. type: TP
6728 #: build/C/man2/open.2:545 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:69
6729 #, no-wrap
6730 msgid "B<ENFILE>"
6731 msgstr "B<ENFILE>"
6732
6733 #. type: Plain text
6734 #: build/C/man2/open.2:548 build/C/man2/pipe.2:113
6735 msgid "The system limit on the total number of open files has been reached."
6736 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6737
6738 #. type: TP
6739 #: build/C/man2/open.2:548
6740 #, no-wrap
6741 msgid "B<ENODEV>"
6742 msgstr "B<ENODEV>"
6743
6744 #. type: Plain text
6745 #: build/C/man2/open.2:555
6746 msgid ""
6747 "I<pathname> refers to a device special file and no corresponding device "
6748 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6749 "returned.)"
6750 msgstr ""
6751 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6752 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6753 "るべきである)"
6754
6755 #. type: Plain text
6756 #: build/C/man2/open.2:562
6757 msgid ""
6758 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6759 "component in I<pathname> does not exist or is a dangling symbolic link."
6760 msgstr ""
6761 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6762 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6763 "ンクである。"
6764
6765 #. type: Plain text
6766 #: build/C/man2/open.2:571
6767 msgid ""
6768 "I<pathname> was to be created but the device containing I<pathname> has no "
6769 "room for the new file."
6770 msgstr ""
6771 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6772 "ファイルのための空き容量がない。"
6773
6774 #. type: Plain text
6775 #: build/C/man2/open.2:578
6776 msgid ""
6777 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6778 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6779 msgstr ""
6780 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6781 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6782
6783 #. type: Plain text
6784 #: build/C/man2/open.2:584
6785 msgid ""
6786 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6787 "has the file open for reading.  Or, the file is a device special file and no "
6788 "corresponding device exists."
6789 msgstr ""
6790 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6791 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6792 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6793
6794 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6795 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6796 #.  Reported 2006-10-03
6797 #. type: Plain text
6798 #: build/C/man2/open.2:604
6799 msgid ""
6800 "I<pathname> refers to a regular file that is too large to be opened.  The "
6801 "usual scenario here is that an application compiled on a 32-bit platform "
6802 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6803 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6804 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6805 "B<EFBIG> for this case."
6806 msgstr ""
6807 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6808 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6809 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6810 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6811 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6812 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6813 "いた。"
6814
6815 #.  Strictly speaking, it's the file system UID... (MTK)
6816 #. type: Plain text
6817 #: build/C/man2/open.2:612
6818 msgid ""
6819 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6820 "did not match the owner of the file and the caller was not privileged "
6821 "(B<CAP_FOWNER>)."
6822 msgstr ""
6823 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6824 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6825
6826 #. type: Plain text
6827 #: build/C/man2/open.2:617
6828 msgid ""
6829 "I<pathname> refers to a file on a read-only file system and write access was "
6830 "requested."
6831 msgstr ""
6832 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6833 "込みアクセスが要求された。"
6834
6835 #. type: TP
6836 #: build/C/man2/open.2:617
6837 #, no-wrap
6838 msgid "B<ETXTBSY>"
6839 msgstr "B<ETXTBSY>"
6840
6841 #. type: Plain text
6842 #: build/C/man2/open.2:622
6843 msgid ""
6844 "I<pathname> refers to an executable image which is currently being executed "
6845 "and write access was requested."
6846 msgstr ""
6847 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6848
6849 #. type: TP
6850 #: build/C/man2/open.2:622
6851 #, no-wrap
6852 msgid "B<EWOULDBLOCK>"
6853 msgstr "B<EWOULDBLOCK>"
6854
6855 #. type: Plain text
6856 #: build/C/man2/open.2:629
6857 msgid ""
6858 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6859 "the file (see B<fcntl>(2))."
6860 msgstr ""
6861 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6862 "ていた (B<fcntl>(2)  参照)。"
6863
6864 #. type: Plain text
6865 #: build/C/man2/open.2:642
6866 msgid ""
6867 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
6868 "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
6869 "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
6870 "definitions."
6871 msgstr ""
6872 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
6873 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
6874 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
6875 "定義する必要があるかもしれない。"
6876
6877 #. type: Plain text
6878 #: build/C/man2/open.2:647
6879 msgid ""
6880 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
6881 "POSIX.1-2008."
6882 msgstr ""
6883 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
6884 "定されている。"
6885
6886 #. type: Plain text
6887 #: build/C/man2/open.2:655
6888 msgid ""
6889 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
6890 "(before including I<any> header files)  to get its definition."
6891 msgstr ""
6892 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
6893 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
6894 "なければならない。"
6895
6896 #. type: Plain text
6897 #: build/C/man2/open.2:663
6898 msgid ""
6899 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
6900 "does not necessarily have the intention to read or write.  This is typically "
6901 "used to open devices in order to get a file descriptor for use with B<ioctl>"
6902 "(2)."
6903 msgstr ""
6904 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
6905 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
6906 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
6907 "られる。"
6908
6909 #.  See for example util-linux's disk-utils/setfdprm.c
6910 #.  For some background on access mode 3, see
6911 #.  http://thread.gmane.org/gmane.linux.kernel/653123
6912 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
6913 #.  LKML, 12 Mar 2008
6914 #. type: Plain text
6915 #: build/C/man2/open.2:692
6916 msgid ""
6917 "Unlike the other values that can be specified in I<flags>, the I<access "
6918 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
6919 "individual bits.  Rather, they define the low order two bits of I<flags>, "
6920 "and are defined respectively as 0, 1, and 2.  In other words, the "
6921 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
6922 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
6923 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
6924 "and write permission on the file and return a descriptor that can't be used "
6925 "for reading or writing.  This nonstandard access mode is used by some Linux "
6926 "drivers to return a descriptor that is to be used only for device-specific "
6927 "B<ioctl>(2)  operations."
6928 msgstr ""
6929 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
6930 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
6931 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
6932 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
6933 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
6934 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
6935 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
6936 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
6937 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、デバイ"
6938 "ス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使われてい"
6939 "る。"
6940
6941 #.  Linux 2.0, 2.5: truncate
6942 #.  Solaris 5.7, 5.8: truncate
6943 #.  Irix 6.5: truncate
6944 #.  Tru64 5.1B: truncate
6945 #.  HP-UX 11.22: truncate
6946 #.  FreeBSD 4.7: truncate
6947 #. type: Plain text
6948 #: build/C/man2/open.2:703
6949 msgid ""
6950 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
6951 "implementations.  On many systems the file is actually truncated."
6952 msgstr ""
6953 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
6954 "くのシステムではファイルは実際に切り詰められる。"
6955
6956 #. type: Plain text
6957 #: build/C/man2/open.2:707
6958 msgid ""
6959 "There are many infelicities in the protocol underlying NFS, affecting "
6960 "amongst others B<O_SYNC> and B<O_NDELAY>."
6961 msgstr ""
6962 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
6963 "B<O_NDELAY> に影響する。"
6964
6965 #. type: Plain text
6966 #: build/C/man2/open.2:729
6967 msgid ""
6968 "POSIX provides for three different variants of synchronized I/O, "
6969 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
6970 "(2.6.31), Linux implements only B<O_SYNC>, but glibc maps B<O_DSYNC> and "
6971 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
6972 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
6973 "require all metadata updates of a write to be on disk on returning to user "
6974 "space, but only the B<O_DSYNC> semantics, which require only actual file "
6975 "data and metadata necessary to retrieve it to be on disk by the time the "
6976 "system call returns."
6977 msgstr ""
6978 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
6979 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
6980 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
6981 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
6982 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
6983 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
6984 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
6985 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
6986 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
6987 "ていればよい。"
6988
6989 #. type: Plain text
6990 #: build/C/man2/open.2:737
6991 msgid ""
6992 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
6993 "create them; use B<mknod>(2)  instead."
6994 msgstr ""
6995 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
6996 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
6997 "用する。"
6998
6999 #. type: Plain text
7000 #: build/C/man2/open.2:750
7001 msgid ""
7002 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
7003 "descriptor but, for example, B<read>(2)  requests are denied with "
7004 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
7005 "permissions, but UID mapping is performed by the server upon read and write "
7006 "requests."
7007 msgstr ""
7008 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
7009 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
7010 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7011 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7012 "る。"
7013
7014 #. type: Plain text
7015 #: build/C/man2/open.2:769
7016 msgid ""
7017 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7018 "fields (respectively, time of last access, time of last status change, and "
7019 "time of last modification; see B<stat>(2))  are set to the current time, and "
7020 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7021 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7022 "st_ctime and st_mtime fields are set to the current time."
7023 msgstr ""
7024 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7025 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7026 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7027 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7028 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7029 "I<st_mtime> フィールドが現在時刻に設定される。"
7030
7031 #. type: SS
7032 #: build/C/man2/open.2:769
7033 #, no-wrap
7034 msgid "O_DIRECT"
7035 msgstr "O_DIRECT"
7036
7037 #. type: Plain text
7038 #: build/C/man2/open.2:786
7039 msgid ""
7040 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7041 "address of user-space buffers and the file offset of I/Os.  In Linux "
7042 "alignment restrictions vary by file system and kernel version and might be "
7043 "absent entirely.  However there is currently no file system-independent "
7044 "interface for an application to discover these restrictions for a given file "
7045 "or file system.  Some file systems provide their own interfaces for doing "
7046 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
7047 msgstr ""
7048 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
7049 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
7050 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
7051 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
7052 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
7053 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
7054 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
7055 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
7056
7057 #. type: Plain text
7058 #: build/C/man2/open.2:791
7059 msgid ""
7060 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
7061 "the file offset must all be multiples of the logical block size of the file "
7062 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
7063 msgstr ""
7064 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
7065 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
7066 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
7067
7068 #. type: Plain text
7069 #: build/C/man2/open.2:825
7070 msgid ""
7071 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7072 "system call, if the memory buffer is a private mapping (i.e., any mapping "
7073 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
7074 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7075 "whether submitted via an asynchronous I/O interface or from another thread "
7076 "in the process, should be completed before B<fork>(2)  is called.  Failure "
7077 "to do so can result in data corruption and undefined behavior in parent and "
7078 "child processes.  This restriction does not apply when the memory buffer for "
7079 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
7080 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
7081 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
7082 "will not be available to the child after B<fork>(2)."
7083 msgstr ""
7084 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
7085 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
7086 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
7087 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
7088 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
7089 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
7090 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
7091 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
7092 "動作が起こる可能性がある。\n"
7093 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
7094 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
7095 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
7096 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
7097 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
7098 "のである)。"
7099
7100 #. type: Plain text
7101 #: build/C/man2/open.2:835
7102 msgid ""
7103 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
7104 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
7105 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
7106 "flag of the same name, but without alignment restrictions."
7107 msgstr ""
7108 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
7109 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
7110 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
7111 "ラグを導入したが、アラインメントの制限はない。"
7112
7113 #. type: Plain text
7114 #: build/C/man2/open.2:844
7115 msgid ""
7116 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
7117 "Linux kernels simply ignore this flag.  Some file systems may not implement "
7118 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
7119 msgstr ""
7120 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
7121 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
7122 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
7123 "と B<open>()  は B<EINVAL> で失敗する。"
7124
7125 #. type: Plain text
7126 #: build/C/man2/open.2:855
7127 msgid ""
7128 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
7129 "file, and especially to overlapping byte regions in the same file.  Even "
7130 "when the file system correctly handles the coherency issues in this "
7131 "situation, overall I/O throughput is likely to be slower than using either "
7132 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
7133 "with direct I/O to the same files."
7134 msgstr ""
7135 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
7136 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
7137 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
7138 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
7139 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
7140 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
7141
7142 #. type: Plain text
7143 #: build/C/man2/open.2:877
7144 msgid ""
7145 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
7146 "Older kernels, or kernels configured in certain ways, may not support this "
7147 "combination.  The NFS protocol does not support passing the flag to the "
7148 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
7149 "the server may still cache the I/O.  The client asks the server to make the "
7150 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
7151 "servers will perform poorly under these circumstances, especially if the I/O "
7152 "size is small.  Some servers may also be configured to lie to clients about "
7153 "the I/O having reached stable storage; this will avoid the performance "
7154 "penalty at some risk to data integrity in the event of server power "
7155 "failure.  The Linux NFS client places no alignment restrictions on "
7156 "B<O_DIRECT> I/O."
7157 msgstr ""
7158 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
7159 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
7160 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
7161 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
7162 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
7163 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
7164 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
7165 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
7166 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
7167 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
7168 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
7169 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
7170
7171 #. type: Plain text
7172 #: build/C/man2/open.2:884
7173 msgid ""
7174 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
7175 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
7176 "as a performance option which is disabled by default."
7177 msgstr ""
7178 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
7179 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
7180 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
7181
7182 #. type: Plain text
7183 #: build/C/man2/open.2:889
7184 msgid ""
7185 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
7186 "interface is just stupid, and was probably designed by a deranged monkey on "
7187 "some serious mind-controlling substances.\"\\(emLinus"
7188 msgstr ""
7189 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
7190 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
7191 "な」 \\(em Linus"
7192
7193 #.  FIXME . Check bugzilla report on open(O_ASYNC)
7194 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
7195 #. type: Plain text
7196 #: build/C/man2/open.2:901
7197 msgid ""
7198 "Currently, it is not possible to enable signal-driven I/O by specifying "
7199 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
7200 msgstr ""
7201 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
7202 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
7203 "すること。"
7204
7205 #. type: Plain text
7206 #: build/C/man2/open.2:923
7207 msgid ""
7208 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7209 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7210 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7211 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7212 msgstr ""
7213 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7214 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7215 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7216 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7217
7218 #. type: TH
7219 #: build/C/man3/perror.3:31
7220 #, no-wrap
7221 msgid "PERROR"
7222 msgstr "PERROR"
7223
7224 #. type: TH
7225 #: build/C/man3/perror.3:31
7226 #, no-wrap
7227 msgid "2012-04-17"
7228 msgstr "2012-04-17"
7229
7230 #. type: Plain text
7231 #: build/C/man3/perror.3:34
7232 msgid "perror - print a system error message"
7233 msgstr "perror - システムエラーメッセージを出力する"
7234
7235 #. type: Plain text
7236 #: build/C/man3/perror.3:38
7237 msgid "B<void perror(const char *>I<s>B<);>"
7238 msgstr "B<void perror(const char *>I<s>B<);>"
7239
7240 #. type: Plain text
7241 #: build/C/man3/perror.3:40
7242 msgid "B<#include E<lt>errno.hE<gt>>"
7243 msgstr "B<#include E<lt>errno.hE<gt>>"
7244
7245 #. type: Plain text
7246 #: build/C/man3/perror.3:42
7247 msgid "B<const char *>I<sys_errlist>B<[];>"
7248 msgstr "B<const char *>I<sys_errlist>B<[];>"
7249
7250 #. type: Plain text
7251 #: build/C/man3/perror.3:44
7252 msgid "B<int >I<sys_nerr>B<;>"
7253 msgstr "B<int >I<sys_nerr>B<;>"
7254
7255 #. type: Plain text
7256 #: build/C/man3/perror.3:46
7257 msgid "B<int >I<errno>B<;>"
7258 msgstr "B<int >I<errno>B<;>"
7259
7260 #. type: Plain text
7261 #: build/C/man3/perror.3:55
7262 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7263 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7264
7265 #. type: Plain text
7266 #: build/C/man3/perror.3:68
7267 msgid ""
7268 "The routine B<perror>()  produces a message on the standard error output, "
7269 "describing the last error encountered during a call to a system or library "
7270 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7271 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7272 "blank.  Then the message and a new-line."
7273 msgstr ""
7274 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7275 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7276 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7277 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7278 "メッセージと改行が出力される。"
7279
7280 #. type: Plain text
7281 #: build/C/man3/perror.3:76
7282 msgid ""
7283 "To be of most use, the argument string should include the name of the "
7284 "function that incurred the error.  The error number is taken from the "
7285 "external variable I<errno>, which is set when errors occur but not cleared "
7286 "when successful calls are made."
7287 msgstr ""
7288 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7289 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7290 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7291
7292 #. type: Plain text
7293 #: build/C/man3/perror.3:90
7294 msgid ""
7295 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7296 "obtain the error message without the newline.  The largest message number "
7297 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7298 "this list because new error values may not have been added to I<sys_errlist>"
7299 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7300 msgstr ""
7301 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7302 "の\n"
7303 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7304 "ジ\n"
7305 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7306 "と。\n"
7307 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7308 "る。\n"
7309 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7310
7311 #. type: Plain text
7312 #: build/C/man3/perror.3:111
7313 msgid ""
7314 "When a system call fails, it usually returns -1 and sets the variable "
7315 "I<errno> to a value describing what went wrong.  (These values can be found "
7316 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7317 "B<perror>()  serves to translate this error code into human-readable form.  "
7318 "Note that I<errno> is undefined after a successful library call: this call "
7319 "may well change this variable, even though it succeeds, for example because "
7320 "it internally used some other library function that failed.  Thus, if a "
7321 "failing call is not immediately followed by a call to B<perror>(), the value "
7322 "of I<errno> should be saved."
7323 msgstr ""
7324 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7325 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7326 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7327 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7328 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7329 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7330 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7331 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7332 "い。"
7333
7334 #. type: Plain text
7335 #: build/C/man3/perror.3:124
7336 msgid ""
7337 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7338 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7339 "I<sys_errlist> conform to BSD."
7340 msgstr ""
7341 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7342 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7343 "に準拠している。"
7344
7345 #.  and only when _BSD_SOURCE is defined.
7346 #.  When
7347 #.  .B _GNU_SOURCE
7348 #.  is defined, the symbols
7349 #.  .I _sys_nerr
7350 #.  and
7351 #.  .I _sys_errlist
7352 #.  are provided.
7353 #. type: Plain text
7354 #: build/C/man3/perror.3:139
7355 msgid ""
7356 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7357 "I<E<lt>stdio.hE<gt>>."
7358 msgstr ""
7359 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7360 "I<E<lt>stdio.hE<gt>> に含まれている。"
7361
7362 #. type: Plain text
7363 #: build/C/man3/perror.3:144
7364 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7365 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7366
7367 #. type: TH
7368 #: build/C/man2/pipe.2:36
7369 #, no-wrap
7370 msgid "PIPE"
7371 msgstr "PIPE"
7372
7373 #. type: TH
7374 #: build/C/man2/pipe.2:36
7375 #, no-wrap
7376 msgid "2012-02-14"
7377 msgstr "2012-02-14"
7378
7379 #. type: Plain text
7380 #: build/C/man2/pipe.2:39
7381 msgid "pipe, pipe2 - create pipe"
7382 msgstr "pipe, pipe2 - パイプを生成する"
7383
7384 #. type: Plain text
7385 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7386 #, no-wrap
7387 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7388 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7389
7390 #. type: Plain text
7391 #: build/C/man2/pipe.2:44
7392 #, no-wrap
7393 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7394 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7395
7396 #. type: Plain text
7397 #: build/C/man2/pipe.2:48
7398 #, no-wrap
7399 msgid ""
7400 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7401 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7402 "B<#include E<lt>unistd.hE<gt>>\n"
7403 msgstr ""
7404 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7405 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7406 "B<#include E<lt>unistd.hE<gt>>\n"
7407
7408 #. type: Plain text
7409 #: build/C/man2/pipe.2:50
7410 #, no-wrap
7411 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7412 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7413
7414 #. type: Plain text
7415 #: build/C/man2/pipe.2:66
7416 msgid ""
7417 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7418 "for interprocess communication.  The array I<pipefd> is used to return two "
7419 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7420 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7421 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7422 "until it is read from the read end of the pipe.  For further details, see "
7423 "B<pipe>(7)."
7424 msgstr ""
7425 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7426 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7427 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7428 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7429 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7430 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7431
7432 #. type: Plain text
7433 #: build/C/man2/pipe.2:76
7434 msgid ""
7435 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7436 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7437 msgstr ""
7438 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7439 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7440 "きる。"
7441
7442 #. type: TP
7443 #: build/C/man2/pipe.2:76
7444 #, no-wrap
7445 msgid "B<O_NONBLOCK>"
7446 msgstr "B<O_NONBLOCK>"
7447
7448 #. type: Plain text
7449 #: build/C/man2/pipe.2:84
7450 msgid ""
7451 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7452 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7453 "the same result."
7454 msgstr ""
7455 "新しく生成される二つのオープンファイル記述 (open file description) の "
7456 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7457 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7458 "なる。"
7459
7460 #. type: TP
7461 #: build/C/man2/pipe.2:84
7462 #, no-wrap
7463 msgid "B<O_CLOEXEC>"
7464 msgstr "B<O_CLOEXEC>"
7465
7466 #. type: Plain text
7467 #: build/C/man2/pipe.2:92
7468 msgid ""
7469 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7470 "descriptors.  See the description of the same flag in B<open>(2)  for "
7471 "reasons why this may be useful."
7472 msgstr ""
7473 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7474 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7475 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7476
7477 #. type: Plain text
7478 #: build/C/man2/pipe.2:102
7479 msgid "I<pipefd> is not valid."
7480 msgstr "I<pipefd> が無効な値である。"
7481
7482 #. type: Plain text
7483 #: build/C/man2/pipe.2:107
7484 msgid "(B<pipe2>())  Invalid value in I<flags>."
7485 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7486
7487 #. type: Plain text
7488 #: build/C/man2/pipe.2:110
7489 msgid "Too many file descriptors are in use by the process."
7490 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7491
7492 #. type: Plain text
7493 #: build/C/man2/pipe.2:118
7494 msgid ""
7495 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7496 "starting with version 2.9."
7497 msgstr ""
7498 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7499 "はバージョン 2.9 以降で利用できる。"
7500
7501 #. type: Plain text
7502 #: build/C/man2/pipe.2:121
7503 msgid "B<pipe>(): POSIX.1-2001."
7504 msgstr "B<pipe>(): POSIX.1-2001."
7505
7506 #. type: Plain text
7507 #: build/C/man2/pipe.2:124
7508 msgid "B<pipe2>()  is Linux-specific."
7509 msgstr "B<pipe2>()  は Linux 固有である。"
7510
7511 #.  fork.2 refers to this example program.
7512 #. type: Plain text
7513 #: build/C/man2/pipe.2:140
7514 msgid ""
7515 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7516 "process; the child inherits a duplicate set of file descriptors that refer "
7517 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7518 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7519 "the string contained in the program's command-line argument to the pipe, and "
7520 "the child reads this string a byte at a time from the pipe and echoes it on "
7521 "standard output."
7522 msgstr ""
7523 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7524 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7525 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7526 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7527 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7528 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7529
7530 #. type: Plain text
7531 #: build/C/man2/pipe.2:147
7532 #, no-wrap
7533 msgid ""
7534 "#include E<lt>sys/wait.hE<gt>\n"
7535 "#include E<lt>stdio.hE<gt>\n"
7536 "#include E<lt>stdlib.hE<gt>\n"
7537 "#include E<lt>unistd.hE<gt>\n"
7538 "#include E<lt>string.hE<gt>\n"
7539 msgstr ""
7540 "#include E<lt>sys/wait.hE<gt>\n"
7541 "#include E<lt>stdio.hE<gt>\n"
7542 "#include E<lt>stdlib.hE<gt>\n"
7543 "#include E<lt>unistd.hE<gt>\n"
7544 "#include E<lt>string.hE<gt>\n"
7545
7546 #. type: Plain text
7547 #: build/C/man2/pipe.2:154
7548 #, no-wrap
7549 msgid ""
7550 "int\n"
7551 "main(int argc, char *argv[])\n"
7552 "{\n"
7553 "    int pipefd[2];\n"
7554 "    pid_t cpid;\n"
7555 "    char buf;\n"
7556 msgstr ""
7557 "int\n"
7558 "main(int argc, char *argv[])\n"
7559 "{\n"
7560 "    int pipefd[2];\n"
7561 "    pid_t cpid;\n"
7562 "    char buf;\n"
7563
7564 #. type: Plain text
7565 #: build/C/man2/pipe.2:159
7566 #, no-wrap
7567 msgid ""
7568 "    if (argc != 2) {\n"
7569 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7570 "\texit(EXIT_FAILURE);\n"
7571 "    }\n"
7572 msgstr ""
7573 "    if (argc != 2) {\n"
7574 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7575 "\texit(EXIT_FAILURE);\n"
7576 "    }\n"
7577
7578 #. type: Plain text
7579 #: build/C/man2/pipe.2:164
7580 #, no-wrap
7581 msgid ""
7582 "    if (pipe(pipefd) == -1) {\n"
7583 "        perror(\"pipe\");\n"
7584 "        exit(EXIT_FAILURE);\n"
7585 "    }\n"
7586 msgstr ""
7587 "    if (pipe(pipefd) == -1) {\n"
7588 "        perror(\"pipe\");\n"
7589 "        exit(EXIT_FAILURE);\n"
7590 "    }\n"
7591
7592 #. type: Plain text
7593 #: build/C/man2/pipe.2:170
7594 #, no-wrap
7595 msgid ""
7596 "    cpid = fork();\n"
7597 "    if (cpid == -1) {\n"
7598 "        perror(\"fork\");\n"
7599 "        exit(EXIT_FAILURE);\n"
7600 "    }\n"
7601 msgstr ""
7602 "    cpid = fork();\n"
7603 "    if (cpid == -1) {\n"
7604 "        perror(\"fork\");\n"
7605 "        exit(EXIT_FAILURE);\n"
7606 "    }\n"
7607
7608 #. type: Plain text
7609 #: build/C/man2/pipe.2:173
7610 #, no-wrap
7611 msgid ""
7612 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7613 "        close(pipefd[1]);          /* Close unused write end */\n"
7614 msgstr ""
7615 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7616 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7617
7618 #. type: Plain text
7619 #: build/C/man2/pipe.2:176
7620 #, no-wrap
7621 msgid ""
7622 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7623 "            write(STDOUT_FILENO, &buf, 1);\n"
7624 msgstr ""
7625 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7626 "            write(STDOUT_FILENO, &buf, 1);\n"
7627
7628 #. type: Plain text
7629 #: build/C/man2/pipe.2:180
7630 #, no-wrap
7631 msgid ""
7632 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7633 "        close(pipefd[0]);\n"
7634 "        _exit(EXIT_SUCCESS);\n"
7635 msgstr ""
7636 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7637 "        close(pipefd[0]);\n"
7638 "        _exit(EXIT_SUCCESS);\n"
7639
7640 #. type: Plain text
7641 #: build/C/man2/pipe.2:189
7642 #, no-wrap
7643 msgid ""
7644 "    } else {            /* Parent writes argv[1] to pipe */\n"
7645 "        close(pipefd[0]);          /* Close unused read end */\n"
7646 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7647 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7648 "        wait(NULL);                /* Wait for child */\n"
7649 "        exit(EXIT_SUCCESS);\n"
7650 "    }\n"
7651 "}\n"
7652 msgstr ""
7653 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7654 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7655 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7656 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7657 "        wait(NULL);                /* 子プロセスを待つ */\n"
7658 "        exit(EXIT_SUCCESS);\n"
7659 "    }\n"
7660 "}\n"
7661
7662 #. type: Plain text
7663 #: build/C/man2/pipe.2:197
7664 msgid ""
7665 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7666 "(7)"
7667 msgstr ""
7668 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7669 "(7)"
7670
7671 #. type: TH
7672 #: build/C/man3/popen.3:40
7673 #, no-wrap
7674 msgid "POPEN"
7675 msgstr "POPEN"
7676
7677 #. type: Plain text
7678 #: build/C/man3/popen.3:43
7679 msgid "popen, pclose - pipe stream to or from a process"
7680 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7681
7682 #. type: Plain text
7683 #: build/C/man3/popen.3:48
7684 #, no-wrap
7685 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7686 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7687
7688 #. type: Plain text
7689 #: build/C/man3/popen.3:50
7690 #, no-wrap
7691 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7692 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7693
7694 #. type: Plain text
7695 #: build/C/man3/popen.3:60
7696 msgid "B<popen>(), B<pclose>():"
7697 msgstr "B<popen>(), B<pclose>():"
7698
7699 #. type: Plain text
7700 #: build/C/man3/popen.3:62
7701 msgid ""
7702 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7703 msgstr ""
7704 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7705
7706 #. type: Plain text
7707 #: build/C/man3/popen.3:73
7708 msgid ""
7709 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7710 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7711 "I<type> argument may specify only reading or writing, not both; the "
7712 "resulting stream is correspondingly read-only or write-only."
7713 msgstr ""
7714 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7715 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7716 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7717 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7718 "たは 書き込み専用のいずれかとなる。"
7719
7720 #. type: Plain text
7721 #: build/C/man3/popen.3:97
7722 msgid ""
7723 "The I<command> argument is a pointer to a null-terminated string containing "
7724 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7725 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7726 "argument is a pointer to a null-terminated string which must contain either "
7727 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7728 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7729 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7730 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7731 "B<open>(2)  for reasons why this may be useful."
7732 msgstr ""
7733 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7734 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7735 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7736 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7737 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7738 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7739 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7740 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7741 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7742
7743 #. type: Plain text
7744 #: build/C/man3/popen.3:113
7745 msgid ""
7746 "The return value from B<popen>()  is a normal standard I/O stream in all "
7747 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7748 "(3).  Writing to such a stream writes to the standard input of the command; "
7749 "the command's standard output is the same as that of the process that called "
7750 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7751 "reading from a \"popened\" stream reads the command's standard output, and "
7752 "the command's standard input is the same as that of the process that called "
7753 "B<popen>()."
7754 msgstr ""
7755 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7756 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7757 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7758 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7759 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7760 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7761 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7762 "セスの標準入力と同一である。"
7763
7764 #. type: Plain text
7765 #: build/C/man3/popen.3:117
7766 msgid "Note that output B<popen>()  streams are fully buffered by default."
7767 msgstr ""
7768 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7769 "に注意しよう。"
7770
7771 #. type: Plain text
7772 #: build/C/man3/popen.3:123
7773 msgid ""
7774 "The B<pclose>()  function waits for the associated process to terminate and "
7775 "returns the exit status of the command as returned by B<wait4>(2)."
7776 msgstr ""
7777 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7778 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7779
7780 #. type: Plain text
7781 #: build/C/man3/popen.3:131
7782 msgid ""
7783 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7784 "calls fail, or if it cannot allocate memory."
7785 msgstr ""
7786 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7787 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7788
7789 #.  These conditions actually give undefined results, so I commented
7790 #.  them out.
7791 #.  .I stream
7792 #.  is not associated with a "popen()ed" command, if
7793 #. .I stream
7794 #.  already "pclose()d", or if
7795 #. type: Plain text
7796 #: build/C/man3/popen.3:146
7797 msgid ""
7798 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7799 "some other error is detected.  In the event of an error, these functions set "
7800 "I<errnro> to indicate the cause of the error."
7801 msgstr ""
7802 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7803 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
7804 "る。"
7805
7806 #. type: Plain text
7807 #: build/C/man3/popen.3:165
7808 msgid ""
7809 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7810 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7811 "appropriately.  If the I<type> argument is invalid, and this condition is "
7812 "detected, I<errno> is set to B<EINVAL>."
7813 msgstr ""
7814 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7815 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7816 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7817 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7818
7819 #. type: Plain text
7820 #: build/C/man3/popen.3:172
7821 msgid ""
7822 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7823 msgstr ""
7824 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7825 "B<ECHILD> にセットされる。"
7826
7827 #. type: Plain text
7828 #: build/C/man3/popen.3:178
7829 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7830 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7831
7832 #. type: Plain text
7833 #: build/C/man3/popen.3:191
7834 msgid ""
7835 "Since the standard input of a command opened for reading shares its seek "
7836 "offset with the process that called B<popen>(), if the original process has "
7837 "done a buffered read, the command's input position may not be as expected.  "
7838 "Similarly, the output from a command opened for writing may become "
7839 "intermingled with that of the original process.  The latter can be avoided "
7840 "by calling B<fflush>(3)  before B<popen>()."
7841 msgstr ""
7842 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7843 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7844 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7845 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7846 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7847 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7848
7849 #.  .SH HISTORY
7850 #.  A
7851 #.  .BR popen ()
7852 #.  and a
7853 #.  .BR pclose ()
7854 #.  function appeared in Version 7 AT&T UNIX.
7855 #. type: Plain text
7856 #: build/C/man3/popen.3:201
7857 msgid ""
7858 "Failure to execute the shell is indistinguishable from the shell's failure "
7859 "to execute command, or an immediate exit of the command.  The only hint is "
7860 "an exit status of 127."
7861 msgstr ""
7862 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
7863 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
7864 "なることである。"
7865
7866 #. type: Plain text
7867 #: build/C/man3/popen.3:211
7868 msgid ""
7869 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7870 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7871 msgstr ""
7872 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7873 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7874
7875 #. type: TH
7876 #: build/C/man3/printf.3:34
7877 #, no-wrap
7878 msgid "PRINTF"
7879 msgstr "PRINTF"
7880
7881 #. type: TH
7882 #: build/C/man3/printf.3:34
7883 #, no-wrap
7884 msgid "2013-03-05"
7885 msgstr "2013-03-05"
7886
7887 #. type: Plain text
7888 #: build/C/man3/printf.3:38
7889 msgid ""
7890 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7891 "formatted output conversion"
7892 msgstr ""
7893 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7894 "指定された書式に変換して出力を行う"
7895
7896 #. type: Plain text
7897 #: build/C/man3/printf.3:42
7898 msgid "B<int printf(const char *>I<format>B<, ...);>"
7899 msgstr "B<int printf(const char *>I<format>B<, ...);>"
7900
7901 #. type: Plain text
7902 #: build/C/man3/printf.3:44
7903 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7904 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7905
7906 #. type: Plain text
7907 #: build/C/man3/printf.3:46
7908 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7909 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7910
7911 #. type: Plain text
7912 #: build/C/man3/printf.3:48
7913 msgid ""
7914 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7915 "*>I<format>B<, ...);>"
7916 msgstr ""
7917 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7918 "*>I<format>B<, ...);>"
7919
7920 #. type: Plain text
7921 #: build/C/man3/printf.3:50
7922 msgid "B<#include E<lt>stdarg.hE<gt>>"
7923 msgstr "B<#include E<lt>stdarg.hE<gt>>"
7924
7925 #. type: Plain text
7926 #: build/C/man3/printf.3:52
7927 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7928 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7929
7930 #. type: Plain text
7931 #: build/C/man3/printf.3:54
7932 msgid ""
7933 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7934 ">I<ap>B<);>"
7935 msgstr ""
7936 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7937 ">I<ap>B<);>"
7938
7939 #. type: Plain text
7940 #: build/C/man3/printf.3:56
7941 msgid ""
7942 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7943 msgstr ""
7944 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7945
7946 #. type: Plain text
7947 #: build/C/man3/printf.3:59
7948 msgid ""
7949 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7950 "*>I<format>B<, va_list >I<ap>B<);>"
7951 msgstr ""
7952 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7953 "*>I<format>B<, va_list >I<ap>B<);>"
7954
7955 #. type: Plain text
7956 #: build/C/man3/printf.3:68
7957 msgid "B<snprintf>(), B<vsnprintf>():"
7958 msgstr "B<snprintf>(), B<vsnprintf>():"
7959
7960 #. type: Plain text
7961 #: build/C/man3/printf.3:71
7962 msgid ""
7963 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7964 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7965 msgstr ""
7966 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7967 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7968
7969 #. type: Plain text
7970 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
7971 msgid "or I<cc -std=c99>"
7972 msgstr "or I<cc -std=c99>"
7973
7974 #. type: Plain text
7975 #: build/C/man3/printf.3:101
7976 msgid ""
7977 "The functions in the B<printf>()  family produce output according to a "
7978 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
7979 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
7980 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
7981 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
7982 "string I<str>."
7983 msgstr ""
7984 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
7985 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
7986 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
7987 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
7988 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
7989
7990 #. type: Plain text
7991 #: build/C/man3/printf.3:110
7992 msgid ""
7993 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
7994 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
7995 msgstr ""
7996 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
7997 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
7998
7999 #. type: Plain text
8000 #: build/C/man3/printf.3:134
8001 msgid ""
8002 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
8003 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
8004 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
8005 "instead of a variable number of arguments.  These functions do not call the "
8006 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
8007 "I<ap> is undefined after the call.  See B<stdarg>(3)."
8008 msgstr ""
8009 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
8010 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
8011 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
8012 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
8013 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
8014 "(3)  を参照のこと。"
8015
8016 #. type: Plain text
8017 #: build/C/man3/printf.3:141
8018 msgid ""
8019 "These eight functions write the output under the control of a I<format> "
8020 "string that specifies how subsequent arguments (or arguments accessed via "
8021 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
8022 "output."
8023 msgstr ""
8024 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
8025 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
8026 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
8027
8028 #. type: Plain text
8029 #: build/C/man3/printf.3:152
8030 msgid ""
8031 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
8032 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
8033 "copying to take place between objects that overlap (e.g., if the target "
8034 "string array and one of the supplied input arguments refer to the same "
8035 "buffer).  See NOTES."
8036 msgstr ""
8037 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8038 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
8039 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
8040 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
8041 "照。"
8042
8043 #. type: SS
8044 #: build/C/man3/printf.3:152
8045 #, no-wrap
8046 msgid "Return value"
8047 msgstr "Return Values"
8048
8049 #. type: Plain text
8050 #: build/C/man3/printf.3:155
8051 msgid ""
8052 "Upon successful return, these functions return the number of characters "
8053 "printed (excluding the null byte used to end output to strings)."
8054 msgstr ""
8055 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
8056 "用する NULL バイトは数に含まれない)。"
8057
8058 #. type: Plain text
8059 #: build/C/man3/printf.3:171
8060 msgid ""
8061 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
8062 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
8063 "the output was truncated due to this limit then the return value is the "
8064 "number of characters (excluding the terminating null byte)  which would have "
8065 "been written to the final string if enough space had been available.  Thus, "
8066 "a return value of I<size> or more means that the output was truncated.  (See "
8067 "also below under NOTES.)"
8068 msgstr ""
8069 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
8070 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
8071 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
8072 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
8073 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
8074 "する (後述の注意も参照のこと)。"
8075
8076 #. type: Plain text
8077 #: build/C/man3/printf.3:173
8078 msgid "If an output error is encountered, a negative value is returned."
8079 msgstr "エラーが発生した場合は、負の数を返す。"
8080
8081 #. type: SS
8082 #: build/C/man3/printf.3:173
8083 #, no-wrap
8084 msgid "Format of the format string"
8085 msgstr "フォーマット文字列のフォーマット"
8086
8087 #. type: Plain text
8088 #: build/C/man3/printf.3:195
8089 msgid ""
8090 "The format string is a character string, beginning and ending in its initial "
8091 "shift state, if any.  The format string is composed of zero or more "
8092 "directives: ordinary characters (not B<%>), which are copied unchanged to "
8093 "the output stream; and conversion specifications, each of which results in "
8094 "fetching zero or more subsequent arguments.  Each conversion specification "
8095 "is introduced by the character B<%>, and ends with a I<conversion "
8096 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
8097 "an optional minimum I<field width>, an optional I<precision> and an optional "
8098 "I<length modifier>."
8099 msgstr ""
8100 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
8101 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
8102 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
8103 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
8104 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
8105 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
8106 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
8107 "子> を (この順序で) 置くことができる。"
8108
8109 #. type: Plain text
8110 #: build/C/man3/printf.3:208
8111 msgid ""
8112 "The arguments must correspond properly (after type promotion) with the "
8113 "conversion specifier.  By default, the arguments are used in the order "
8114 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
8115 "next argument (and it is an error if insufficiently many arguments are "
8116 "given).  One can also specify explicitly which argument is taken, at each "
8117 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
8118 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
8119 "denotes the position in the argument list of the desired argument, indexed "
8120 "starting from 1.  Thus,"
8121 msgstr ""
8122 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
8123 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
8124 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
8125 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
8126 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
8127 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
8128 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
8129
8130 #. type: Plain text
8131 #: build/C/man3/printf.3:212
8132 #, no-wrap
8133 msgid "printf(\"%*d\", width, num);\n"
8134 msgstr "printf(\"%*d\", width, num);\n"
8135
8136 #. type: Plain text
8137 #: build/C/man3/printf.3:216
8138 msgid "and"
8139 msgstr "と"
8140
8141 #. type: Plain text
8142 #: build/C/man3/printf.3:220
8143 #, no-wrap
8144 msgid "printf(\"%2$*1$d\", width, num);\n"
8145 msgstr "printf(\"%2$*1$d\", width, num);\n"
8146
8147 #. type: Plain text
8148 #: build/C/man3/printf.3:236
8149 msgid ""
8150 "are equivalent.  The second style allows repeated references to the same "
8151 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
8152 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
8153 "\\(aq is used, it must be used throughout for all conversions taking an "
8154 "argument and all width and precision arguments, but it may be mixed with \"%%"
8155 "\" formats which do not consume an argument.  There may be no gaps in the "
8156 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
8157 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
8158 "format string."
8159 msgstr ""
8160 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
8161 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
8162 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
8163 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
8164 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
8165 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
8166 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
8167
8168 #. type: Plain text
8169 #: build/C/man3/printf.3:246
8170 msgid ""
8171 "For some numeric conversions a radix character (\"decimal point\") or "
8172 "thousands' grouping character is used.  The actual character used depends on "
8173 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
8174 "radix character, and does not have a grouping character.  Thus,"
8175 msgstr ""
8176 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
8177 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
8178 "\\(aq を用い、 区切り文字は使わない。 従って、"
8179
8180 #. type: Plain text
8181 #: build/C/man3/printf.3:250
8182 #, no-wrap
8183 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
8184 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
8185
8186 #. type: Plain text
8187 #: build/C/man3/printf.3:255
8188 msgid ""
8189 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
8190 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
8191 msgstr ""
8192 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
8193 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
8194
8195 #. type: SS
8196 #: build/C/man3/printf.3:255
8197 #, no-wrap
8198 msgid "The flag characters"
8199 msgstr "フラグ文字"
8200
8201 #. type: Plain text
8202 #: build/C/man3/printf.3:257
8203 msgid "The character % is followed by zero or more of the following flags:"
8204 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
8205
8206 #. type: TP
8207 #: build/C/man3/printf.3:257
8208 #, no-wrap
8209 msgid "B<#>"
8210 msgstr "B<#>"
8211
8212 #. type: Plain text
8213 #: build/C/man3/printf.3:291
8214 msgid ""
8215 "The value should be converted to an \"alternate form\".  For B<o> "
8216 "conversions, the first character of the output string is made zero (by "
8217 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
8218 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
8219 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
8220 "conversions, the result will always contain a decimal point, even if no "
8221 "digits follow it (normally, a decimal point appears in the results of those "
8222 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
8223 "trailing zeros are not removed from the result as they would otherwise be.  "
8224 "For other conversions, the result is undefined."
8225 msgstr ""
8226 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
8227 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
8228 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
8229 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
8230 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
8231 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
8232 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
8233 "変換では、結果は未定義である。"
8234
8235 #. type: TP
8236 #: build/C/man3/printf.3:291
8237 #, no-wrap
8238 msgid "B<\\&0>"
8239 msgstr "B<\\&0>"
8240
8241 #. type: Plain text
8242 #: build/C/man3/printf.3:331
8243 msgid ""
8244 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8245 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8246 "converted value is padded on the left with zeros rather than blanks.  If the "
8247 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8248 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8249 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8250 "is undefined."
8251 msgstr ""
8252 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8253 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8254 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8255 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8256 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8257 "である。"
8258
8259 #. type: TP
8260 #: build/C/man3/printf.3:331
8261 #, no-wrap
8262 msgid "B<->"
8263 msgstr "B<->"
8264
8265 #. type: Plain text
8266 #: build/C/man3/printf.3:344
8267 msgid ""
8268 "The converted value is to be left adjusted on the field boundary.  (The "
8269 "default is right justification.)  Except for B<n> conversions, the converted "
8270 "value is padded on the right with blanks, rather than on the left with "
8271 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8272 msgstr ""
8273 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8274 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8275 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8276
8277 #. type: TP
8278 #: build/C/man3/printf.3:344
8279 #, no-wrap
8280 msgid "B<\\(aq \\(aq>"
8281 msgstr "B<' '>"
8282
8283 #. type: Plain text
8284 #: build/C/man3/printf.3:348
8285 msgid ""
8286 "(a space) A blank should be left before a positive number (or empty string) "
8287 "produced by a signed conversion."
8288 msgstr ""
8289 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8290 "列) が置かれる。"
8291
8292 #. type: TP
8293 #: build/C/man3/printf.3:348
8294 #, no-wrap
8295 msgid "B<+>"
8296 msgstr "B<+>"
8297
8298 #. type: Plain text
8299 #: build/C/man3/printf.3:356
8300 msgid ""
8301 "A sign (+ or -) should always be placed before a number produced by a signed "
8302 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8303 "overrides a space if both are used."
8304 msgstr ""
8305 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8306 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8307 "が使われている場合には、 B<+> が優先される。"
8308
8309 #. type: Plain text
8310 #: build/C/man3/printf.3:359
8311 msgid ""
8312 "The five flag characters above are defined in the C standard.  The SUSv2 "
8313 "specifies one further flag character."
8314 msgstr ""
8315 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8316 "グ文字が規定されている。"
8317
8318 #. type: TP
8319 #: build/C/man3/printf.3:359
8320 #, no-wrap
8321 msgid "B<\\(aq>"
8322 msgstr "B<\\(aq>"
8323
8324 #. type: Plain text
8325 #: build/C/man3/printf.3:376
8326 msgid ""
8327 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8328 "output is to be grouped with thousands' grouping characters if the locale "
8329 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8330 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8331 "\\(aqF>."
8332 msgstr ""
8333 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8334 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8335 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8336 "\\(aqF は SUSv2 には含まれていない。"
8337
8338 #. type: Plain text
8339 #: build/C/man3/printf.3:378
8340 msgid "glibc 2.2 adds one further flag character."
8341 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8342
8343 #. type: TP
8344 #: build/C/man3/printf.3:378
8345 #, no-wrap
8346 msgid "B<I>"
8347 msgstr "B<I>"
8348
8349 #.  outdigits keyword in locale file
8350 #. type: Plain text
8351 #: build/C/man3/printf.3:388
8352 msgid ""
8353 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8354 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8355 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8356 msgstr ""
8357 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8358 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8359 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8360
8361 #. type: SS
8362 #: build/C/man3/printf.3:388
8363 #, no-wrap
8364 msgid "The field width"
8365 msgstr "フィールド幅"
8366
8367 #. type: Plain text
8368 #: build/C/man3/printf.3:404
8369 msgid ""
8370 "An optional decimal digit string (with nonzero first digit) specifying a "
8371 "minimum field width.  If the converted value has fewer characters than the "
8372 "field width, it will be padded with spaces on the left (or right, if the "
8373 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8374 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8375 "the field width is given in the next argument, or in the I<m>-th argument, "
8376 "respectively, which must be of type I<int>.  A negative field width is taken "
8377 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8378 "nonexistent or small field width cause truncation of a field; if the result "
8379 "of a conversion is wider than the field width, the field is expanded to "
8380 "contain the conversion result."
8381 msgstr ""
8382 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8383 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8384 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8385 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8386 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8387 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8388 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8389 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8390 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8391 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8392
8393 #. type: SS
8394 #: build/C/man3/printf.3:404
8395 #, no-wrap
8396 msgid "The precision"
8397 msgstr "精度"
8398
8399 #. type: Plain text
8400 #: build/C/man3/printf.3:440
8401 msgid ""
8402 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8403 "optional decimal digit string.  Instead of a decimal digit string one may "
8404 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8405 "precision is given in the next argument, or in the m-th argument, "
8406 "respectively, which must be of type I<int>.  If the precision is given as "
8407 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8408 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8409 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8410 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8411 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8412 "the maximum number of characters to be printed from a string for B<s> and "
8413 "B<S> conversions."
8414 msgstr ""
8415 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8416 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8417 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8418 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8419 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8420 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8421 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8422 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8423 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8424 "る最大文字数を指定する。"
8425
8426 #. type: SS
8427 #: build/C/man3/printf.3:440
8428 #, no-wrap
8429 msgid "The length modifier"
8430 msgstr "長さ修飾子"
8431
8432 #. type: Plain text
8433 #: build/C/man3/printf.3:450
8434 msgid ""
8435 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8436 "B<X> conversion."
8437 msgstr ""
8438 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8439
8440 #. type: TP
8441 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:294
8442 #, no-wrap
8443 msgid "B<hh>"
8444 msgstr "B<hh>"
8445
8446 #. type: Plain text
8447 #: build/C/man3/printf.3:461
8448 msgid ""
8449 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8450 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8451 "I<signed char> argument."
8452 msgstr ""
8453 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8454 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8455
8456 #. type: TP
8457 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:284
8458 #, no-wrap
8459 msgid "B<h>"
8460 msgstr "B<h>"
8461
8462 #. type: Plain text
8463 #: build/C/man3/printf.3:472
8464 msgid ""
8465 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8466 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8467 "to a I<short int> argument."
8468 msgstr ""
8469 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8470 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8471
8472 #. type: TP
8473 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:311
8474 #, no-wrap
8475 msgid "B<l>"
8476 msgstr "B<l>"
8477
8478 #. type: Plain text
8479 #: build/C/man3/printf.3:491
8480 msgid ""
8481 "(ell) A following integer conversion corresponds to a I<long int> or "
8482 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8483 "a pointer to a I<long int> argument, or a following B<c> conversion "
8484 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8485 "corresponds to a pointer to I<wchar_t> argument."
8486 msgstr ""
8487 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8488 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8489 "変換では I<wchar_t> へのポインタであることを示す。"
8490
8491 #. type: TP
8492 #: build/C/man3/printf.3:491
8493 #, no-wrap
8494 msgid "B<ll>"
8495 msgstr "B<ll> (エルエル)"
8496
8497 #. type: Plain text
8498 #: build/C/man3/printf.3:503
8499 msgid ""
8500 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8501 "or I<unsigned long long int> argument, or a following B<n> conversion "
8502 "corresponds to a pointer to a I<long long int> argument."
8503 msgstr ""
8504 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8505 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8506
8507 #. type: TP
8508 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:338
8509 #, no-wrap
8510 msgid "B<L>"
8511 msgstr "B<L>"
8512
8513 #. type: Plain text
8514 #: build/C/man3/printf.3:519
8515 msgid ""
8516 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8517 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8518 "not.)"
8519 msgstr ""
8520 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8521 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8522 "認められていない。)"
8523
8524 #. type: TP
8525 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:354
8526 #, no-wrap
8527 msgid "B<q>"
8528 msgstr "B<q>"
8529
8530 #. type: Plain text
8531 #: build/C/man3/printf.3:525
8532 msgid ""
8533 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8534 "B<ll>."
8535 msgstr ""
8536 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8537 "意味である。"
8538
8539 #. type: TP
8540 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:302
8541 #, no-wrap
8542 msgid "B<j>"
8543 msgstr "B<j>"
8544
8545 #. type: Plain text
8546 #: build/C/man3/printf.3:532
8547 msgid ""
8548 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8549 "argument."
8550 msgstr ""
8551 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8552
8553 #. type: TP
8554 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:366
8555 #, no-wrap
8556 msgid "B<z>"
8557 msgstr "B<z>"
8558
8559 #. type: Plain text
8560 #: build/C/man3/printf.3:543
8561 msgid ""
8562 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8563 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8564 msgstr ""
8565 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8566 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8567
8568 #. type: TP
8569 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:359
8570 #, no-wrap
8571 msgid "B<t>"
8572 msgstr "B<t>"
8573
8574 #. type: Plain text
8575 #: build/C/man3/printf.3:548
8576 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8577 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8578
8579 #. type: Plain text
8580 #: build/C/man3/printf.3:577
8581 msgid ""
8582 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
8583 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8584 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8585 msgstr ""
8586 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8587 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8588 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8589
8590 #. type: SS
8591 #: build/C/man3/printf.3:577
8592 #, no-wrap
8593 msgid "The conversion specifier"
8594 msgstr "変換指定子"
8595
8596 #. type: Plain text
8597 #: build/C/man3/printf.3:580
8598 msgid ""
8599 "A character that specifies the type of conversion to be applied.  The "
8600 "conversion specifiers and their meanings are:"
8601 msgstr ""
8602 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8603
8604 #. type: TP
8605 #: build/C/man3/printf.3:580
8606 #, no-wrap
8607 msgid "B<d>, B<i>"
8608 msgstr "B<d>, B<i>"
8609
8610 #. type: Plain text
8611 #: build/C/man3/printf.3:590
8612 msgid ""
8613 "The I<int> argument is converted to signed decimal notation.  The precision, "
8614 "if any, gives the minimum number of digits that must appear; if the "
8615 "converted value requires fewer digits, it is padded on the left with zeros.  "
8616 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8617 "the output is empty."
8618 msgstr ""
8619 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8620 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8621 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8622 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8623
8624 #. type: TP
8625 #: build/C/man3/printf.3:590
8626 #, no-wrap
8627 msgid "B<o>, B<u>, B<x>, B<X>"
8628 msgstr "B<o>, B<u>, B<x>, B<X>"
8629
8630 #. type: Plain text
8631 #: build/C/man3/printf.3:617
8632 msgid ""
8633 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8634 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8635 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8636 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8637 "of digits that must appear; if the converted value requires fewer digits, it "
8638 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8639 "printed with an explicit precision 0, the output is empty."
8640 msgstr ""
8641 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8642 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8643 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8644 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8645 "られる。"
8646
8647 #. type: TP
8648 #: build/C/man3/printf.3:617
8649 #, no-wrap
8650 msgid "B<e>, B<E>"
8651 msgstr "B<e>, B<E>"
8652
8653 #. type: Plain text
8654 #: build/C/man3/printf.3:636
8655 msgid ""
8656 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
8657 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
8658 "and the number of digits after it is equal to the precision; if the "
8659 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
8660 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
8661 "than B<e>)  to introduce the exponent.  The exponent always contains at "
8662 "least two digits; if the value is zero, the exponent is 00."
8663 msgstr ""
8664 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
8665 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
8666 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
8667 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
8668 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
8669 "指数の値が 0 の場合には、00 と表示される。"
8670
8671 #. type: TP
8672 #: build/C/man3/printf.3:636
8673 #, no-wrap
8674 msgid "B<f>, B<F>"
8675 msgstr "B<f>, B<F>"
8676
8677 #. type: Plain text
8678 #: build/C/man3/printf.3:647
8679 msgid ""
8680 "The I<double> argument is rounded and converted to decimal notation in the "
8681 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8682 "character is equal to the precision specification.  If the precision is "
8683 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8684 "point character appears.  If a decimal point appears, at least one digit "
8685 "appears before it."
8686 msgstr ""
8687 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8688 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8689 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8690 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8691
8692 #. type: Plain text
8693 #: build/C/man3/printf.3:658
8694 msgid ""
8695 "(The SUSv2 does not know about B<F> and says that character string "
8696 "representations for infinity and NaN may be made available.  The C99 "
8697 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8698 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8699 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8700 msgstr ""
8701 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8702 "行ってもよいことになっている。\n"
8703 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8704 "し、\n"
8705 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8706 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8707
8708 #. type: TP
8709 #: build/C/man3/printf.3:658
8710 #, no-wrap
8711 msgid "B<g>, B<G>"
8712 msgstr "B<g>, B<G>"
8713
8714 #. type: Plain text
8715 #: build/C/man3/printf.3:683
8716 msgid ""
8717 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8718 "for B<G> conversions).  The precision specifies the number of significant "
8719 "digits.  If the precision is missing, 6 digits are given; if the precision "
8720 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8721 "conversion is less than -4 or greater than or equal to the precision.  "
8722 "Trailing zeros are removed from the fractional part of the result; a decimal "
8723 "point appears only if it is followed by at least one digit."
8724 msgstr ""
8725 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8726 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8727 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8728 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8729 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8730 "一つある場合にだけである。"
8731
8732 #. type: TP
8733 #: build/C/man3/printf.3:683
8734 #, no-wrap
8735 msgid "B<a>, B<A>"
8736 msgstr "B<a>, B<A>"
8737
8738 #. type: Plain text
8739 #: build/C/man3/printf.3:707
8740 msgid ""
8741 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8742 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8743 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
8744 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8745 "digit before the decimal point, and the number of digits after it is equal "
8746 "to the precision.  The default precision suffices for an exact "
8747 "representation of the value if an exact representation in base 2 exists and "
8748 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8749 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8750 "and nonzero but otherwise unspecified for normalized numbers."
8751 msgstr ""
8752 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
8753 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8754 "16 進表記に変換する。\n"
8755 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8756 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8757 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8758 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8759 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8760 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8761 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8762
8763 #. type: TP
8764 #: build/C/man3/printf.3:707 build/C/man3/scanf.3:459
8765 #: build/C/man3/wprintf.3:151
8766 #, no-wrap
8767 msgid "B<c>"
8768 msgstr "B<c>"
8769
8770 #. type: Plain text
8771 #: build/C/man3/printf.3:725
8772 msgid ""
8773 "If no B<l> modifier is present, the I<int> argument is converted to an "
8774 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8775 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8776 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8777 "conversion state starting in the initial state, and the resulting multibyte "
8778 "string is written."
8779 msgstr ""
8780 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8781 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8782 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8783 "換し、 変換されたマルチバイト文字列を出力する。"
8784
8785 #. type: TP
8786 #: build/C/man3/printf.3:725 build/C/man3/scanf.3:451
8787 #: build/C/man3/wprintf.3:165
8788 #, no-wrap
8789 msgid "B<s>"
8790 msgstr "B<s>"
8791
8792 #. type: Plain text
8793 #: build/C/man3/printf.3:740
8794 msgid ""
8795 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
8796 "to be a pointer to an array of character type (pointer to a string).  "
8797 "Characters from the array are written up to (but not including) a "
8798 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8799 "than the number specified are written.  If a precision is given, no null "
8800 "byte need be present; if the precision is not specified, or is greater than "
8801 "the size of the array, the array must contain a terminating null byte."
8802 msgstr ""
8803 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
8804 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8805 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8806 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8807 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8808 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8809 "なければならない。"
8810
8811 #. type: Plain text
8812 #: build/C/man3/printf.3:767
8813 msgid ""
8814 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
8815 "expected to be a pointer to an array of wide characters.  Wide characters "
8816 "from the array are converted to multibyte characters (each by a call to the "
8817 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
8818 "state before the first wide character), up to and including a terminating "
8819 "null wide character.  The resulting multibyte characters are written up to "
8820 "(but not including) the terminating null byte.  If a precision is specified, "
8821 "no more bytes than the number specified are written, but no partial "
8822 "multibyte characters are written.  Note that the precision determines the "
8823 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
8824 "positions>.  The array must contain a terminating null wide character, "
8825 "unless a precision is given and it is so small that the number of bytes "
8826 "written exceeds it before the end of the array is reached."
8827 msgstr ""
8828 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
8829 "字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字"
8830 "毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド"
8831 "文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8832 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8833 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8834 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8835 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8836 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8837 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8838 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8839 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8840 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8841 "い。"
8842
8843 #. type: TP
8844 #: build/C/man3/printf.3:767
8845 #, no-wrap
8846 msgid "B<C>"
8847 msgstr "B<C>"
8848
8849 #. type: Plain text
8850 #: build/C/man3/printf.3:773
8851 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8852 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8853
8854 #. type: TP
8855 #: build/C/man3/printf.3:773
8856 #, no-wrap
8857 msgid "B<S>"
8858 msgstr "B<S>"
8859
8860 #. type: Plain text
8861 #: build/C/man3/printf.3:779
8862 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
8863 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
8864
8865 #. type: TP
8866 #: build/C/man3/printf.3:779 build/C/man3/scanf.3:502
8867 #, no-wrap
8868 msgid "B<p>"
8869 msgstr "B<p>"
8870
8871 #. type: Plain text
8872 #: build/C/man3/printf.3:787
8873 msgid ""
8874 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
8875 "or B<%#lx>)."
8876 msgstr ""
8877 "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
8878
8879 #. type: TP
8880 #: build/C/man3/printf.3:787 build/C/man3/scanf.3:510
8881 #, no-wrap
8882 msgid "B<n>"
8883 msgstr "B<n>"
8884
8885 #. type: Plain text
8886 #: build/C/man3/printf.3:794
8887 msgid ""
8888 "The number of characters written so far is stored into the integer indicated "
8889 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
8890 msgstr ""
8891 "これまでに出力された文字数を I<int\\ *> (または類似の型) のポインタ引き数が指"
8892 "す整数に保存する。 引き数の変換は行われない。"
8893
8894 #. type: TP
8895 #: build/C/man3/printf.3:794
8896 #, no-wrap
8897 msgid "B<m>"
8898 msgstr "B<m>"
8899
8900 #. type: Plain text
8901 #: build/C/man3/printf.3:800
8902 msgid ""
8903 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
8904 "required."
8905 msgstr ""
8906 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
8907
8908 #. type: TP
8909 #: build/C/man3/printf.3:800 build/C/man3/scanf.3:377
8910 #, no-wrap
8911 msgid "B<%>"
8912 msgstr "B<%>"
8913
8914 #. type: Plain text
8915 #: build/C/man3/printf.3:806
8916 msgid ""
8917 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
8918 "conversion specification is \\(aq%%\\(aq."
8919 msgstr ""
8920 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
8921 "%\" となる。"
8922
8923 #. type: Plain text
8924 #: build/C/man3/printf.3:821
8925 msgid ""
8926 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8927 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
8928 "B<vsnprintf>()  functions conform to C99."
8929 msgstr ""
8930 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8931 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
8932 "B<vsnprintf>()  は C99 に準拠している。"
8933
8934 #. type: Plain text
8935 #: build/C/man3/printf.3:834
8936 msgid ""
8937 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
8938 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
8939 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
8940 "this case, and gives the return value (as always)  as the number of "
8941 "characters that would have been written in case the output string has been "
8942 "large enough."
8943 msgstr ""
8944 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
8945 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
8946 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
8947 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
8948 "出力されるであろう文字数を返す。"
8949
8950 #. type: Plain text
8951 #: build/C/man3/printf.3:848
8952 msgid ""
8953 "Linux libc4 knows about the five C standard flags.  It knows about the "
8954 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
8955 "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 "
8956 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
8957 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
8958 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
8959 "dependent radix character, no thousands' separator, no NaN or infinity, no "
8960 "\"%m$\" and \"*m$\"."
8961 msgstr ""
8962 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
8963 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
8964 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
8965 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
8966 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
8967 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
8968 "えない。"
8969
8970 #. type: Plain text
8971 #: build/C/man3/printf.3:859
8972 msgid ""
8973 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
8974 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
8975 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
8976 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
8977 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
8978 "outputs I<strerror(errno)>."
8979 msgstr ""
8980 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
8981 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
8982 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
8983 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
8984 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
8985 "ある。"
8986
8987 #. type: Plain text
8988 #: build/C/man3/printf.3:861
8989 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
8990 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
8991
8992 #. type: Plain text
8993 #: build/C/man3/printf.3:864
8994 msgid ""
8995 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
8996 "characters B<a> and B<A>."
8997 msgstr ""
8998 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
8999 "加された。"
9000
9001 #. type: Plain text
9002 #: build/C/man3/printf.3:867
9003 msgid ""
9004 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
9005 "flag character B<I>."
9006 msgstr ""
9007 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
9008 "追加された。"
9009
9010 #. type: Plain text
9011 #: build/C/man3/printf.3:869
9012 msgid "Some programs imprudently rely on code such as the following"
9013 msgstr ""
9014 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
9015 "ラムがある。"
9016
9017 #. type: Plain text
9018 #: build/C/man3/printf.3:871
9019 #, no-wrap
9020 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
9021 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
9022
9023 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
9024 #. type: Plain text
9025 #: build/C/man3/printf.3:887
9026 msgid ""
9027 "to append text to I<buf>.  However, the standards explicitly note that the "
9028 "results are undefined if source and destination buffers overlap when calling "
9029 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
9030 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
9031 "such as the above will B<not> produce the expected results."
9032 msgstr ""
9033 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
9034 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
9035 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
9036 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
9037 "結果が得られ「ない」ことがある。"
9038
9039 #.  .SH HISTORY
9040 #.  UNIX V7 defines the three routines
9041 #.  .BR printf (),
9042 #.  .BR fprintf (),
9043 #.  .BR sprintf (),
9044 #.  and has the flag \-, the width or precision *, the length modifier l,
9045 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
9046 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
9047 #.  #, + and <space> and no longer mentions D,O,U,X.
9048 #.  2.11BSD has
9049 #.  .BR vprintf (),
9050 #.  .BR vfprintf (),
9051 #.  .BR vsprintf (),
9052 #.  and warns not to use D,O,U,X.
9053 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
9054 #.  and the conversions n, p, E, G, X (with current meaning)
9055 #.  and deprecates D,O,U.
9056 #.  4.4BSD introduces the functions
9057 #.  .BR snprintf ()
9058 #.  and
9059 #.  .BR vsnprintf (),
9060 #.  and the length modifier q.
9061 #.  FreeBSD also has functions
9062 #.  .BR asprintf ()
9063 #.  and
9064 #.  .BR vasprintf (),
9065 #.  that allocate a buffer large enough for
9066 #.  .BR sprintf ().
9067 #.  In glibc there are functions
9068 #.  .BR dprintf ()
9069 #.  and
9070 #.  .BR vdprintf ()
9071 #.  that print to a file descriptor instead of a stream.
9072 #. type: Plain text
9073 #: build/C/man3/printf.3:929
9074 msgid ""
9075 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
9076 "conforms to the C99 standard, that is, behaves as described above, since "
9077 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
9078 "was truncated."
9079 msgstr ""
9080 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
9081 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
9082 "切り詰められた場合は -1 を返す。"
9083
9084 #. type: Plain text
9085 #: build/C/man3/printf.3:946
9086 msgid ""
9087 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
9088 "callers must be careful not to overflow the actual space; this is often "
9089 "impossible to assure.  Note that the length of the strings produced is "
9090 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
9091 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
9092 msgstr ""
9093 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
9094 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
9095 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
9096 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
9097 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
9098
9099 #. type: Plain text
9100 #: build/C/man3/printf.3:959
9101 msgid ""
9102 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
9103 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
9104 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
9105 "libc4 leads to serious security problems."
9106 msgstr ""
9107 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
9108 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
9109 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
9110 "深刻なセキュリティ問題を引き起こすことがある。"
9111
9112 #.  .PP
9113 #.  Some floating-point conversions under early libc4
9114 #.  caused memory leaks.
9115 #. type: Plain text
9116 #: build/C/man3/printf.3:973
9117 msgid ""
9118 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
9119 "contain a % character.  If I<foo> comes from untrusted user input, it may "
9120 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
9121 "a security hole."
9122 msgstr ""
9123 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
9124 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
9125 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
9126 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
9127 "ルを作ることになるかもしれない。"
9128
9129 #. type: Plain text
9130 #: build/C/man3/printf.3:977
9131 msgid "To print I<Pi> to five decimal places:"
9132 msgstr "I<Pi> を 5 桁で出力する。"
9133
9134 #. type: Plain text
9135 #: build/C/man3/printf.3:983
9136 #, no-wrap
9137 msgid ""
9138 "#include E<lt>math.hE<gt>\n"
9139 "#include E<lt>stdio.hE<gt>\n"
9140 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9141 msgstr ""
9142 "#include E<lt>math.hE<gt>\n"
9143 "#include E<lt>stdio.hE<gt>\n"
9144 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9145
9146 #. type: Plain text
9147 #: build/C/man3/printf.3:992
9148 msgid ""
9149 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
9150 "I<weekday> and I<month> are pointers to strings:"
9151 msgstr ""
9152 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
9153 "I<month> は文字列へのポインタである)"
9154
9155 #. type: Plain text
9156 #: build/C/man3/printf.3:998
9157 #, no-wrap
9158 msgid ""
9159 "#include E<lt>stdio.hE<gt>\n"
9160 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9161 "        weekday, month, day, hour, min);\n"
9162 msgstr ""
9163 "#include E<lt>stdio.hE<gt>\n"
9164 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9165 "\tweekday, month, day, hour, min);\n"
9166
9167 #. type: Plain text
9168 #: build/C/man3/printf.3:1004
9169 msgid ""
9170 "Many countries use the day-month-year order.  Hence, an internationalized "
9171 "version must be able to print the arguments in an order specified by the "
9172 "format:"
9173 msgstr ""
9174 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
9175 "順番で 引き数を表示できなければならない。"
9176
9177 #. type: Plain text
9178 #: build/C/man3/printf.3:1010
9179 #, no-wrap
9180 msgid ""
9181 "#include E<lt>stdio.hE<gt>\n"
9182 "fprintf(stdout, format,\n"
9183 "        weekday, month, day, hour, min);\n"
9184 msgstr ""
9185 "#include E<lt>stdio.hE<gt>\n"
9186 "fprintf(stdout, format,\n"
9187 "\tweekday, month, day, hour, min);\n"
9188
9189 #. type: Plain text
9190 #: build/C/man3/printf.3:1017
9191 msgid ""
9192 "where I<format> depends on locale, and may permute the arguments.  With the "
9193 "value:"
9194 msgstr ""
9195 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
9196 "I<format> が"
9197
9198 #. type: Plain text
9199 #: build/C/man3/printf.3:1021
9200 #, no-wrap
9201 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9202 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9203
9204 #. type: Plain text
9205 #: build/C/man3/printf.3:1025
9206 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
9207 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
9208
9209 #. type: Plain text
9210 #: build/C/man3/printf.3:1028
9211 msgid ""
9212 "To allocate a sufficiently large string and print into it (code correct for "
9213 "both glibc 2.0 and glibc 2.1):"
9214 msgstr ""
9215 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
9216 "と glibc 2.1 の両方で正しく動作するコード):"
9217
9218 #. type: Plain text
9219 #: build/C/man3/printf.3:1031
9220 msgid ""
9221 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
9222 "error instead of being handled gracefully."
9223 msgstr ""
9224 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
9225 "理されず、エラーとして扱われる。"
9226
9227 #. type: Plain text
9228 #: build/C/man3/printf.3:1036
9229 #, no-wrap
9230 msgid ""
9231 "#include E<lt>stdio.hE<gt>\n"
9232 "#include E<lt>stdlib.hE<gt>\n"
9233 "#include E<lt>stdarg.hE<gt>\n"
9234 msgstr ""
9235 "#include E<lt>stdio.hE<gt>\n"
9236 "#include E<lt>stdlib.hE<gt>\n"
9237 "#include E<lt>stdarg.hE<gt>\n"
9238
9239 #. type: Plain text
9240 #: build/C/man3/printf.3:1044
9241 #, no-wrap
9242 msgid ""
9243 "char *\n"
9244 "make_message(const char *fmt, ...)\n"
9245 "{\n"
9246 "    int n;\n"
9247 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9248 "    char *p, *np;\n"
9249 "    va_list ap;\n"
9250 msgstr ""
9251 "char *\n"
9252 "make_message(const char *fmt, ...)\n"
9253 "{\n"
9254 "    int n;\n"
9255 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9256 "    char *p, *np;\n"
9257 "    va_list ap;\n"
9258
9259 #. type: Plain text
9260 #: build/C/man3/printf.3:1047
9261 #, no-wrap
9262 msgid ""
9263 "    if ((p = malloc(size)) == NULL)\n"
9264 "        return NULL;\n"
9265 msgstr ""
9266 "    if ((p = malloc(size)) == NULL)\n"
9267 "        return NULL;\n"
9268
9269 #. type: Plain text
9270 #: build/C/man3/printf.3:1049
9271 #, no-wrap
9272 msgid "    while (1) {\n"
9273 msgstr "    while (1) {\n"
9274
9275 #. type: Plain text
9276 #: build/C/man3/printf.3:1051
9277 #, no-wrap
9278 msgid "        /* Try to print in the allocated space */\n"
9279 msgstr "        /* Try to print in the allocated space */\n"
9280
9281 #. type: Plain text
9282 #: build/C/man3/printf.3:1055
9283 #, no-wrap
9284 msgid ""
9285 "        va_start(ap, fmt);\n"
9286 "        n = vsnprintf(p, size, fmt, ap);\n"
9287 "        va_end(ap);\n"
9288 msgstr ""
9289 "        va_start(ap, fmt);\n"
9290 "        n = vsnprintf(p, size, fmt, ap);\n"
9291 "        va_end(ap);\n"
9292
9293 #. type: Plain text
9294 #: build/C/man3/printf.3:1057
9295 #, no-wrap
9296 msgid "        /* Check error code */\n"
9297 msgstr "        /* Check error code */\n"
9298
9299 #. type: Plain text
9300 #: build/C/man3/printf.3:1060
9301 #, no-wrap
9302 msgid ""
9303 "        if (n E<lt> 0)\n"
9304 "            return NULL;\n"
9305 msgstr ""
9306 "        if (n E<lt> 0)\n"
9307 "            return NULL;\n"
9308
9309 #. type: Plain text
9310 #: build/C/man3/printf.3:1062
9311 #, no-wrap
9312 msgid "        /* If that worked, return the string */\n"
9313 msgstr "        /* If that worked, return the string */\n"
9314
9315 #. type: Plain text
9316 #: build/C/man3/printf.3:1065
9317 #, no-wrap
9318 msgid ""
9319 "        if (n E<lt> size)\n"
9320 "            return p;\n"
9321 msgstr ""
9322 "        if (n E<lt> size)\n"
9323 "            return p;\n"
9324
9325 #. type: Plain text
9326 #: build/C/man3/printf.3:1067
9327 #, no-wrap
9328 msgid "        /* Else try again with more space */\n"
9329 msgstr "        /* Else try again with more space */\n"
9330
9331 #. type: Plain text
9332 #: build/C/man3/printf.3:1069
9333 #, no-wrap
9334 msgid "        size = n + 1;       /* Precisely what is needed */\n"
9335 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
9336
9337 #. type: Plain text
9338 #: build/C/man3/printf.3:1079
9339 #, no-wrap
9340 msgid ""
9341 "        if ((np = realloc (p, size)) == NULL) {\n"
9342 "            free(p);\n"
9343 "            return NULL;\n"
9344 "        } else {\n"
9345 "            p = np;\n"
9346 "        }\n"
9347 "    }\n"
9348 "}\n"
9349 msgstr ""
9350 "        if ((np = realloc (p, size)) == NULL) {\n"
9351 "            free(p);\n"
9352 "            return NULL;\n"
9353 "        } else {\n"
9354 "            p = np;\n"
9355 "        }\n"
9356 "    }\n"
9357 "}\n"
9358
9359 #. type: Plain text
9360 #: build/C/man3/printf.3:1089
9361 msgid ""
9362 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9363 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9364 msgstr ""
9365 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9366 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9367
9368 #. type: TH
9369 #: build/C/man3/puts.3:26
9370 #, no-wrap
9371 msgid "PUTS"
9372 msgstr "PUTS"
9373
9374 #. type: TH
9375 #: build/C/man3/puts.3:26
9376 #, no-wrap
9377 msgid "2011-09-28"
9378 msgstr "2011-09-28"
9379
9380 #. type: Plain text
9381 #: build/C/man3/puts.3:29
9382 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9383 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9384
9385 #. type: Plain text
9386 #: build/C/man3/puts.3:34
9387 #, no-wrap
9388 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9389 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9390
9391 #. type: Plain text
9392 #: build/C/man3/puts.3:36
9393 #, no-wrap
9394 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9395 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9396
9397 #. type: Plain text
9398 #: build/C/man3/puts.3:38
9399 #, no-wrap
9400 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9401 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9402
9403 #. type: Plain text
9404 #: build/C/man3/puts.3:40
9405 #, no-wrap
9406 msgid "B<int putchar(int >I<c>B<);>\n"
9407 msgstr "B<int putchar(int >I<c>B<);>\n"
9408
9409 #. type: Plain text
9410 #: build/C/man3/puts.3:42
9411 #, no-wrap
9412 msgid "B<int puts(const char *>I<s>B<);>\n"
9413 msgstr "B<int puts(const char *>I<s>B<);>\n"
9414
9415 #. type: Plain text
9416 #: build/C/man3/puts.3:51
9417 msgid ""
9418 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9419 "I<stream>."
9420 msgstr ""
9421 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9422 "に書き込む。"
9423
9424 #. type: Plain text
9425 #: build/C/man3/puts.3:58
9426 msgid ""
9427 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9428 "null byte (\\(aq\\e0\\(aq)."
9429 msgstr ""
9430 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9431 "ト (\\(aq\\e0\\(aq) は出力しない。"
9432
9433 #. type: Plain text
9434 #: build/C/man3/puts.3:65
9435 msgid ""
9436 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9437 "a macro which evaluates I<stream> more than once."
9438 msgstr ""
9439 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9440 "れないという点を除き、 B<fputc>()  と同じである。"
9441
9442 #. type: Plain text
9443 #: build/C/man3/puts.3:69
9444 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9445 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9446
9447 #. type: Plain text
9448 #: build/C/man3/puts.3:76
9449 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9450 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9451
9452 #. type: Plain text
9453 #: build/C/man3/puts.3:81
9454 msgid ""
9455 "Calls to the functions described here can be mixed with each other and with "
9456 "calls to other output functions from the I<stdio> library for the same "
9457 "output stream."
9458 msgstr ""
9459 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9460 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9461 "る。"
9462
9463 #. type: Plain text
9464 #: build/C/man3/puts.3:96
9465 msgid ""
9466 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9467 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9468 msgstr ""
9469 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9470 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9471
9472 #. type: Plain text
9473 #: build/C/man3/puts.3:103
9474 msgid ""
9475 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9476 "on error."
9477 msgstr ""
9478 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9479 "は B<EOF> を返す。"
9480
9481 #. type: Plain text
9482 #: build/C/man3/puts.3:112
9483 msgid ""
9484 "It is not advisable to mix calls to output functions from the I<stdio> "
9485 "library with low-level calls to B<write>(2)  for the file descriptor "
9486 "associated with the same output stream; the results will be undefined and "
9487 "very probably not what you want."
9488 msgstr ""
9489 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9490 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9491 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9492 "性が高い。"
9493
9494 #. type: Plain text
9495 #: build/C/man3/puts.3:124
9496 msgid ""
9497 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9498 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9499 "(3)"
9500 msgstr ""
9501 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9502 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9503 "(3)"
9504
9505 #. type: TH
9506 #: build/C/man2/read.2:35
9507 #, no-wrap
9508 msgid "READ"
9509 msgstr "READ"
9510
9511 #. type: TH
9512 #: build/C/man2/read.2:35
9513 #, no-wrap
9514 msgid "2013-02-12"
9515 msgstr "2013-02-12"
9516
9517 #. type: Plain text
9518 #: build/C/man2/read.2:38
9519 msgid "read - read from a file descriptor"
9520 msgstr "read - ファイルディスクリプタから読み込む"
9521
9522 #. type: Plain text
9523 #: build/C/man2/read.2:43
9524 #, no-wrap
9525 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9526 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9527
9528 #. type: Plain text
9529 #: build/C/man2/read.2:52
9530 msgid ""
9531 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9532 "into the buffer starting at I<buf>."
9533 msgstr ""
9534 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9535 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9536
9537 #. type: Plain text
9538 #: build/C/man2/read.2:60
9539 msgid ""
9540 "On files that support seeking, the read operation commences at the current "
9541 "file offset, and the file offset is incremented by the number of bytes "
9542 "read.  If the current file offset is at or past the end of file, no bytes "
9543 "are read, and B<read>()  returns zero."
9544 msgstr ""
9545 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
9546 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
9547 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
9548 "0 を返す。"
9549
9550 #. type: Plain text
9551 #: build/C/man2/read.2:75
9552 msgid ""
9553 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
9554 "In the absence of any errors, or if B<read>()  does not check for errors, a "
9555 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
9556 msgstr ""
9557 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
9558 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
9559 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
9560
9561 #. type: Plain text
9562 #: build/C/man2/read.2:81
9563 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9564 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
9565
9566 #. type: Plain text
9567 #: build/C/man2/read.2:95
9568 msgid ""
9569 "On success, the number of bytes read is returned (zero indicates end of "
9570 "file), and the file position is advanced by this number.  It is not an error "
9571 "if this number is smaller than the number of bytes requested; this may "
9572 "happen for example because fewer bytes are actually available right now "
9573 "(maybe because we were close to end-of-file, or because we are reading from "
9574 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9575 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9576 "this case it is left unspecified whether the file position (if any) changes."
9577 msgstr ""
9578 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9579 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9580 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9581 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9582 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9583 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9584 "の場合はファイル位置が変更されるかどうかは 不定である。"
9585
9586 #. type: TP
9587 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
9588 #, no-wrap
9589 msgid "B<EAGAIN>"
9590 msgstr "B<EAGAIN>"
9591
9592 #. type: Plain text
9593 #: build/C/man2/read.2:103
9594 msgid ""
9595 "The file descriptor I<fd> refers to a file other than a socket and has been "
9596 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9597 msgstr ""
9598 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9599 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9600 "する状況にある。"
9601
9602 #. type: TP
9603 #: build/C/man2/read.2:103 build/C/man2/write.2:115
9604 #, no-wrap
9605 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9606 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9607
9608 #.  Actually EAGAIN on Linux
9609 #. type: Plain text
9610 #: build/C/man2/read.2:114
9611 msgid ""
9612 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9613 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9614 "to be returned for this case, and does not require these constants to have "
9615 "the same value, so a portable application should check for both "
9616 "possibilities."
9617 msgstr ""
9618 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9619 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9620 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9621 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9622 "プリケーションでは、両方の可能性を 確認すべきである。"
9623
9624 #. type: Plain text
9625 #: build/C/man2/read.2:118
9626 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9627 msgstr ""
9628 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9629 "(open) されていない。"
9630
9631 #. type: Plain text
9632 #: build/C/man2/read.2:122 build/C/man2/write.2:145
9633 msgid "I<buf> is outside your accessible address space."
9634 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9635
9636 #. type: Plain text
9637 #: build/C/man2/read.2:126
9638 msgid ""
9639 "The call was interrupted by a signal before any data was read; see B<signal>"
9640 "(7)."
9641 msgstr ""
9642 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9643
9644 #. type: Plain text
9645 #: build/C/man2/read.2:137
9646 msgid ""
9647 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9648 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9649 "I<buf>, the value specified in I<count>, or the current file offset is not "
9650 "suitably aligned."
9651 msgstr ""
9652 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9653 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9654 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9655 "ンメントが不適切である。"
9656
9657 #. type: Plain text
9658 #: build/C/man2/read.2:147
9659 msgid ""
9660 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9661 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9662 "information."
9663 msgstr ""
9664 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9665 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9666 "こと。"
9667
9668 #. type: Plain text
9669 #: build/C/man2/read.2:158
9670 msgid ""
9671 "I/O error.  This will happen for example when the process is in a background "
9672 "process group, tries to read from its controlling terminal, and either it is "
9673 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9674 "also occur when there is a low-level I/O error while reading from a disk or "
9675 "tape."
9676 msgstr ""
9677 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
9678 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9679 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9680 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9681 "た場合にも起こる。"
9682
9683 #. type: Plain text
9684 #: build/C/man2/read.2:162
9685 msgid "I<fd> refers to a directory."
9686 msgstr "I<fd> がディレクトリを参照している。"
9687
9688 #. type: Plain text
9689 #: build/C/man2/read.2:173
9690 msgid ""
9691 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9692 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9693 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9694 "read."
9695 msgstr ""
9696 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9697 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9698 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9699 "数を返してもよい。"
9700
9701 #. type: Plain text
9702 #: build/C/man2/read.2:187
9703 msgid ""
9704 "On NFS file systems, reading small amounts of data will update the timestamp "
9705 "only the first time, subsequent calls may not do so.  This is caused by "
9706 "client side attribute caching, because most if not all NFS clients leave "
9707 "st_atime (last file access time)  updates to the server and client side "
9708 "reads satisfied from the client's cache will not cause st_atime updates on "
9709 "the server as there are no server side reads.  UNIX semantics can be "
9710 "obtained by disabling client side attribute caching, but in most situations "
9711 "this will substantially increase server load and decrease performance."
9712 msgstr ""
9713 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9714 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9715 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9716 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9717 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9718 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9719 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9720 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9721
9722 #. type: Plain text
9723 #: build/C/man2/read.2:200
9724 msgid ""
9725 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9726 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9727 "B<fread>(3)"
9728 msgstr ""
9729 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9730 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9731 "B<fread>(3)"
9732
9733 #. type: TH
9734 #: build/C/man2/readlink.2:43
9735 #, no-wrap
9736 msgid "READLINK"
9737 msgstr "READLINK"
9738
9739 #. type: TH
9740 #: build/C/man2/readlink.2:43
9741 #, no-wrap
9742 msgid "2011-09-20"
9743 msgstr "2011-09-20"
9744
9745 #. type: Plain text
9746 #: build/C/man2/readlink.2:46
9747 msgid "readlink - read value of a symbolic link"
9748 msgstr "readlink - シンボリックリンクの値を読む"
9749
9750 #. type: Plain text
9751 #: build/C/man2/readlink.2:50
9752 msgid ""
9753 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9754 ">I<bufsiz>B<);>"
9755 msgstr ""
9756 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9757 ">I<bufsiz>B<);>"
9758
9759 #. type: Plain text
9760 #: build/C/man2/readlink.2:58
9761 msgid "B<readlink>():"
9762 msgstr "B<readlink>():"
9763
9764 #. type: Plain text
9765 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
9766 msgid ""
9767 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9768 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9769 msgstr ""
9770 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9771 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9772
9773 #. type: Plain text
9774 #: build/C/man2/readlink.2:77
9775 msgid ""
9776 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9777 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9778 "null byte to I<buf>.  It will truncate the contents (to a length of "
9779 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9780 "contents."
9781 msgstr ""
9782 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9783 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9784 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9785 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9786
9787 #. type: Plain text
9788 #: build/C/man2/readlink.2:85
9789 msgid ""
9790 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9791 "error, -1 is returned and I<errno> is set to indicate the error."
9792 msgstr ""
9793 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9794 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9795
9796 #. type: Plain text
9797 #: build/C/man2/readlink.2:91
9798 msgid ""
9799 "Search permission is denied for a component of the path prefix.  (See also "
9800 "B<path_resolution>(7).)"
9801 msgstr ""
9802 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9803 "参照すること)。"
9804
9805 #. type: Plain text
9806 #: build/C/man2/readlink.2:95
9807 msgid "I<buf> extends outside the process's allocated address space."
9808 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9809
9810 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9811 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9812 #.  and this error can also occur if bufsiz < 0.
9813 #.  See: http://thread.gmane.org/gmane.linux.man/380
9814 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9815 #. type: Plain text
9816 #: build/C/man2/readlink.2:104
9817 msgid "I<bufsiz> is not positive."
9818 msgstr "I<bufsiz> が正でない。"
9819
9820 #. type: Plain text
9821 #: build/C/man2/readlink.2:107
9822 msgid "The named file is not a symbolic link."
9823 msgstr "指定したファイルがシンボリックリンクでない。"
9824
9825 #. type: Plain text
9826 #: build/C/man2/readlink.2:110
9827 msgid "An I/O error occurred while reading from the file system."
9828 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9829
9830 #. type: Plain text
9831 #: build/C/man2/readlink.2:113
9832 msgid "Too many symbolic links were encountered in translating the pathname."
9833 msgstr "パス名にシンボリックリンクが多すぎる。"
9834
9835 #. type: Plain text
9836 #: build/C/man2/readlink.2:116
9837 msgid "A pathname, or a component of a pathname, was too long."
9838 msgstr "パス名かパス名の一部分が長過ぎる。"
9839
9840 #. type: Plain text
9841 #: build/C/man2/readlink.2:119
9842 msgid "The named file does not exist."
9843 msgstr "その名前のファイルが存在しない。"
9844
9845 #. type: Plain text
9846 #: build/C/man2/readlink.2:125
9847 msgid "A component of the path prefix is not a directory."
9848 msgstr "パスのディレクトリ部分がディレクトリでない。"
9849
9850 #. type: Plain text
9851 #: build/C/man2/readlink.2:130
9852 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9853 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9854
9855 #. type: Plain text
9856 #: build/C/man2/readlink.2:138
9857 msgid ""
9858 "In versions of glibc up to and including glibc 2.4, the return type of "
9859 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
9860 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
9861 msgstr ""
9862 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
9863 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
9864 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
9865
9866 #. type: Plain text
9867 #: build/C/man2/readlink.2:157
9868 msgid ""
9869 "Using a statically sized buffer might not provide enough room for the "
9870 "symbolic link contents.  The required size for the buffer can be obtained "
9871 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
9872 "link.  However, the number of bytes written by B<readlink>()  should be "
9873 "checked to make sure that the size of the symbolic link did not increase "
9874 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
9875 "also addresses a common portability problem when using I<PATH_MAX> for the "
9876 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
9877 "the system does not have such limit."
9878 msgstr ""
9879 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
9880 "格納するのに十分な領域がない場合がある。\n"
9881 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
9882 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
9883 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
9884 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
9885 "の間で増えていないことを確認すべきである。\n"
9886 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
9887 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
9888 "問題を解決することができる。なぜなら、POSIX では、\n"
9889 "システムがそのような上限値を定義していない場合には、\n"
9890 "I<PATH_MAX> が定義されることが保証されていないからである。"
9891
9892 #. type: Plain text
9893 #: build/C/man2/readlink.2:163
9894 msgid ""
9895 "The following program allocates the buffer needed by B<readlink>()  "
9896 "dynamically from the information provided by B<lstat>(), making sure there's "
9897 "no race condition between the calls."
9898 msgstr ""
9899 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
9900 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
9901 "また、両方の呼び出し間で競合条件がないことを保証している。"
9902
9903 #. type: Plain text
9904 #: build/C/man2/readlink.2:170
9905 #, no-wrap
9906 msgid ""
9907 "#include E<lt>sys/types.hE<gt>\n"
9908 "#include E<lt>sys/stat.hE<gt>\n"
9909 "#include E<lt>stdio.hE<gt>\n"
9910 "#include E<lt>stdlib.hE<gt>\n"
9911 "#include E<lt>unistd.hE<gt>\n"
9912 msgstr ""
9913 "#include E<lt>sys/types.hE<gt>\n"
9914 "#include E<lt>sys/stat.hE<gt>\n"
9915 "#include E<lt>stdio.hE<gt>\n"
9916 "#include E<lt>stdlib.hE<gt>\n"
9917 "#include E<lt>unistd.hE<gt>\n"
9918
9919 #. type: Plain text
9920 #: build/C/man2/readlink.2:177
9921 #, no-wrap
9922 msgid ""
9923 "int\n"
9924 "main(int argc, char *argv[])\n"
9925 "{\n"
9926 "    struct stat sb;\n"
9927 "    char *linkname;\n"
9928 "    ssize_t r;\n"
9929 msgstr ""
9930 "int\n"
9931 "main(int argc, char *argv[])\n"
9932 "{\n"
9933 "    struct stat sb;\n"
9934 "    char *linkname;\n"
9935 "    ssize_t r;\n"
9936
9937 #. type: Plain text
9938 #: build/C/man2/readlink.2:182
9939 #, no-wrap
9940 msgid ""
9941 "    if (argc != 2) {\n"
9942 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9943 "        exit(EXIT_FAILURE);\n"
9944 "    }\n"
9945 msgstr ""
9946 "    if (argc != 2) {\n"
9947 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9948 "        exit(EXIT_FAILURE);\n"
9949 "    }\n"
9950
9951 #. type: Plain text
9952 #: build/C/man2/readlink.2:187
9953 #, no-wrap
9954 msgid ""
9955 "    if (lstat(argv[1], &sb) == -1) {\n"
9956 "        perror(\"lstat\");\n"
9957 "        exit(EXIT_FAILURE);\n"
9958 "    }\n"
9959 msgstr ""
9960 "    if (lstat(argv[1], &sb) == -1) {\n"
9961 "        perror(\"lstat\");\n"
9962 "        exit(EXIT_FAILURE);\n"
9963 "    }\n"
9964
9965 #. type: Plain text
9966 #: build/C/man2/readlink.2:193
9967 #, no-wrap
9968 msgid ""
9969 "    linkname = malloc(sb.st_size + 1);\n"
9970 "    if (linkname == NULL) {\n"
9971 "        fprintf(stderr, \"insufficient memory\\en\");\n"
9972 "        exit(EXIT_FAILURE);\n"
9973 "    }\n"
9974 msgstr ""
9975 "    linkname = malloc(sb.st_size + 1);\n"
9976 "    if (linkname == NULL) {\n"
9977 "        fprintf(stderr, \"insufficient memory\\en\");\n"
9978 "        exit(EXIT_FAILURE);\n"
9979 "    }\n"
9980
9981 #. type: Plain text
9982 #: build/C/man2/readlink.2:195
9983 #, no-wrap
9984 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
9985 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
9986
9987 #. type: Plain text
9988 #: build/C/man2/readlink.2:200
9989 #, no-wrap
9990 msgid ""
9991 "    if (r E<lt> 0) {\n"
9992 "        perror(\"lstat\");\n"
9993 "        exit(EXIT_FAILURE);\n"
9994 "    }\n"
9995 msgstr ""
9996 "    if (r E<lt> 0) {\n"
9997 "        perror(\"lstat\");\n"
9998 "        exit(EXIT_FAILURE);\n"
9999 "    }\n"
10000
10001 #. type: Plain text
10002 #: build/C/man2/readlink.2:206
10003 #, no-wrap
10004 msgid ""
10005 "    if (r E<gt> sb.st_size) {\n"
10006 "        fprintf(stderr, \"symlink increased in size \"\n"
10007 "                        \"between lstat() and readlink()\\en\");\n"
10008 "        exit(EXIT_FAILURE);\n"
10009 "    }\n"
10010 msgstr ""
10011 "    if (r E<gt> sb.st_size) {\n"
10012 "        fprintf(stderr, \"symlink increased in size \"\n"
10013 "                        \"between lstat() and readlink()\\en\");\n"
10014 "        exit(EXIT_FAILURE);\n"
10015 "    }\n"
10016
10017 #. type: Plain text
10018 #: build/C/man2/readlink.2:208
10019 #, no-wrap
10020 msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10021 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10022
10023 #. type: Plain text
10024 #: build/C/man2/readlink.2:210
10025 #, no-wrap
10026 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10027 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10028
10029 #. type: Plain text
10030 #: build/C/man2/readlink.2:222
10031 msgid ""
10032 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
10033 "B<path_resolution>(7), B<symlink>(7)"
10034 msgstr ""
10035 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
10036 "B<path_resolution>(7), B<symlink>(7)"
10037
10038 #. type: TH
10039 #: build/C/man2/readv.2:32
10040 #, no-wrap
10041 msgid "READV"
10042 msgstr "READV"
10043
10044 #. type: TH
10045 #: build/C/man2/readv.2:32
10046 #, no-wrap
10047 msgid "2010-11-17"
10048 msgstr "2010-11-17"
10049
10050 #. type: Plain text
10051 #: build/C/man2/readv.2:35
10052 msgid ""
10053 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
10054 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
10055
10056 #. type: Plain text
10057 #: build/C/man2/readv.2:38
10058 #, no-wrap
10059 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
10060 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
10061
10062 #. type: Plain text
10063 #: build/C/man2/readv.2:40
10064 #, no-wrap
10065 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10066 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10067
10068 #. type: Plain text
10069 #: build/C/man2/readv.2:42
10070 #, no-wrap
10071 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10072 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10073
10074 #. type: Plain text
10075 #: build/C/man2/readv.2:45
10076 #, no-wrap
10077 msgid ""
10078 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10079 "B<               off_t >I<offset>B<);>\n"
10080 msgstr ""
10081 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10082 "B<               off_t >I<offset>B<);>\n"
10083
10084 #. type: Plain text
10085 #: build/C/man2/readv.2:48
10086 #, no-wrap
10087 msgid ""
10088 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10089 "B<                off_t >I<offset>B<);>\n"
10090 msgstr ""
10091 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10092 "B<                off_t >I<offset>B<);>\n"
10093
10094 #. type: Plain text
10095 #: build/C/man2/readv.2:58
10096 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10097 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10098
10099 #. type: Plain text
10100 #: build/C/man2/readv.2:68
10101 msgid ""
10102 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
10103 "with the file descriptor I<fd> into the buffers described by I<iov> "
10104 "(\"scatter input\")."
10105 msgstr ""
10106 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
10107 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
10108 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
10109
10110 #. type: Plain text
10111 #: build/C/man2/readv.2:78
10112 msgid ""
10113 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
10114 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
10115 "\")."
10116 msgstr ""
10117 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
10118 "I<iovcnt>\n"
10119 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
10120 "ら\n"
10121 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
10122
10123 #. type: Plain text
10124 #: build/C/man2/readv.2:87
10125 msgid ""
10126 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
10127 "I<E<lt>sys/uio.hE<gt>> as:"
10128 msgstr ""
10129 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
10130 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10131
10132 #. type: Plain text
10133 #: build/C/man2/readv.2:95
10134 #, no-wrap
10135 msgid ""
10136 "struct iovec {\n"
10137 "    void  *iov_base;    /* Starting address */\n"
10138 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10139 "};\n"
10140 msgstr ""
10141 "struct iovec {\n"
10142 "    void  *iov_base;    /* Starting address */\n"
10143 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10144 "};\n"
10145
10146 #. type: Plain text
10147 #: build/C/man2/readv.2:103
10148 msgid ""
10149 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
10150 "buffers are filled."
10151 msgstr ""
10152 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
10153 "B<read>(2) と全く同様の動作を行う。"
10154
10155 #. type: Plain text
10156 #: build/C/man2/readv.2:109
10157 msgid ""
10158 "The B<writev>()  system call works just like B<write>(2)  except that "
10159 "multiple buffers are written out."
10160 msgstr ""
10161 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
10162 "B<write>(2) と全く同様の動作を行う。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/readv.2:128
10166 msgid ""
10167 "Buffers are processed in array order.  This means that B<readv>()  "
10168 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
10169 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
10170 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
10171 "[0] before proceeding to I<iov>[1], and so on."
10172 msgstr ""
10173 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
10174 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
10175 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
10176 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
10177
10178 #. type: Plain text
10179 #: build/C/man2/readv.2:146
10180 msgid ""
10181 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
10182 "data written by B<writev>()  is written as a single block that is not "
10183 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
10184 "for an exception); analogously, B<readv>()  is guaranteed to read a "
10185 "contiguous block of data from the file, regardless of read operations "
10186 "performed in other threads or processes that have file descriptors referring "
10187 "to the same open file description (see B<open>(2))."
10188 msgstr ""
10189 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
10190 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
10191 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
10192 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
10193 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
10194 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
10195 "作の影響を受けることはない。"
10196
10197 #. type: SS
10198 #: build/C/man2/readv.2:146
10199 #, no-wrap
10200 msgid "preadv() and pwritev()"
10201 msgstr "preadv() と pwritev()"
10202
10203 #. type: Plain text
10204 #: build/C/man2/readv.2:159
10205 msgid ""
10206 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
10207 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
10208 "argument, I<offset>, which specifies the file offset at which the input "
10209 "operation is to be performed."
10210 msgstr ""
10211 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
10212 "組み合わせたものである。\n"
10213 "B<readv>() と同じ処理を実行するが、\n"
10214 "4 番目の引き数 I<offset> が追加されており、\n"
10215 "この引き数は入力操作を行うファイルオフセットを指定する。"
10216
10217 #. type: Plain text
10218 #: build/C/man2/readv.2:172
10219 msgid ""
10220 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
10221 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
10222 "argument, I<offset>, which specifies the file offset at which the output "
10223 "operation is to be performed."
10224 msgstr ""
10225 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
10226 "組み合わせたものである。\n"
10227 "B<writev>() と同じ処理を実行するが、\n"
10228 "4 番目の引き数 I<offset> が追加されており、\n"
10229 "この引き数は出力操作を行うファイルオフセットを指定する。"
10230
10231 #. type: Plain text
10232 #: build/C/man2/readv.2:177
10233 msgid ""
10234 "The file offset is not changed by these system calls.  The file referred to "
10235 "by I<fd> must be capable of seeking."
10236 msgstr ""
10237 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
10238 "I<fd> が参照するファイルは seek 可能でなければならない。"
10239
10240 #. type: Plain text
10241 #: build/C/man2/readv.2:188
10242 msgid ""
10243 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
10244 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
10245 "error, -1 is returned, and I<errno> is set appropriately."
10246 msgstr ""
10247 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
10248 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
10249 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
10250
10251 #. type: Plain text
10252 #: build/C/man2/readv.2:200
10253 msgid ""
10254 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
10255 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
10256 "(2).  Additionally, the following error is defined:"
10257 msgstr ""
10258 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
10259 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
10260 "る。\n"
10261 "また、追加で以下のエラーが定義されている:"
10262
10263 #. type: Plain text
10264 #: build/C/man2/readv.2:209
10265 msgid ""
10266 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
10267 "vector count I<iovcnt> is less than zero or greater than the permitted "
10268 "maximum."
10269 msgstr ""
10270 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
10271 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
10272
10273 #. type: Plain text
10274 #: build/C/man2/readv.2:214
10275 msgid ""
10276 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10277 "support was added in glibc 2.10."
10278 msgstr ""
10279 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10280 "ライブラリによるサポートは glibc 2.10 で追加された。"
10281
10282 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10283 #.  (Says release.libc.)
10284 #. type: Plain text
10285 #: build/C/man2/readv.2:222
10286 msgid ""
10287 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10288 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10289 "I<iovcnt> argument, and I<int> as the return type."
10290 msgstr ""
10291 "B<readv>(), B<writev>(): \n"
10292 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10293 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10294 "返り値の型として I<int> を使用していた。"
10295
10296 #. type: Plain text
10297 #: build/C/man2/readv.2:226
10298 msgid ""
10299 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10300 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10301
10302 #. type: SS
10303 #: build/C/man2/readv.2:227
10304 #, no-wrap
10305 msgid "Linux notes"
10306 msgstr "Linux での注意"
10307
10308 #. type: Plain text
10309 #: build/C/man2/readv.2:258
10310 msgid ""
10311 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10312 "items that can be passed in I<iov>.  An implementation can advertise its "
10313 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10314 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10315 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10316 "glibc wrapper functions do some extra work if they detect that the "
10317 "underlying kernel system call failed because this limit was exceeded.  In "
10318 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10319 "large enough for all of the items specified by I<iov>, passes that buffer in "
10320 "a call to B<read>(2), copies data from the buffer to the locations specified "
10321 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10322 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10323 "using a temporary buffer and a call to B<write>(2)."
10324 msgstr ""
10325 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10326 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10327 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10328 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10329 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10330 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10331 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10332 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10333 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10334 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10335 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10336 "(2)  を呼び出す。"
10337
10338 #. type: Plain text
10339 #: build/C/man2/readv.2:265
10340 msgid ""
10341 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10342 "operate on file descriptors, with the functions from the stdio library; the "
10343 "results will be undefined and probably not what you want."
10344 msgstr ""
10345 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10346 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10347 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10348 "得られないだろう。"
10349
10350 #. type: Plain text
10351 #: build/C/man2/readv.2:268
10352 msgid "The following code sample demonstrates the use of B<writev>():"
10353 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10354
10355 #. type: Plain text
10356 #: build/C/man2/readv.2:275
10357 #, no-wrap
10358 msgid ""
10359 "char *str0 = \"hello \";\n"
10360 "char *str1 = \"world\\en\";\n"
10361 "struct iovec iov[2];\n"
10362 "ssize_t nwritten;\n"
10363 msgstr ""
10364 "char *str0 = \"hello \";\n"
10365 "char *str1 = \"world\\en\";\n"
10366 "struct iovec iov[2];\n"
10367 "ssize_t nwritten;\n"
10368
10369 #. type: Plain text
10370 #: build/C/man2/readv.2:280
10371 #, no-wrap
10372 msgid ""
10373 "iov[0].iov_base = str0;\n"
10374 "iov[0].iov_len = strlen(str0);\n"
10375 "iov[1].iov_base = str1;\n"
10376 "iov[1].iov_len = strlen(str1);\n"
10377 msgstr ""
10378 "iov[0].iov_base = str0;\n"
10379 "iov[0].iov_len = strlen(str0);\n"
10380 "iov[1].iov_base = str1;\n"
10381 "iov[1].iov_len = strlen(str1);\n"
10382
10383 #. type: Plain text
10384 #: build/C/man2/readv.2:282
10385 #, no-wrap
10386 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10387 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10388
10389 #. type: Plain text
10390 #: build/C/man2/readv.2:288
10391 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10392 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10393
10394 #. type: TH
10395 #: build/C/man3/remove.3:31
10396 #, no-wrap
10397 msgid "REMOVE"
10398 msgstr "REMOVE"
10399
10400 #. type: TH
10401 #: build/C/man3/remove.3:31
10402 #, no-wrap
10403 msgid "2008-12-03"
10404 msgstr "2008-12-03"
10405
10406 #. type: Plain text
10407 #: build/C/man3/remove.3:34
10408 msgid "remove - remove a file or directory"
10409 msgstr "remove - ファイルやディレクトリを削除する"
10410
10411 #. type: Plain text
10412 #: build/C/man3/remove.3:38
10413 msgid "B<int remove(const char *>I<pathname>B<);>"
10414 msgstr "B<int remove(const char *>I<pathname>B<);>"
10415
10416 #. type: Plain text
10417 #: build/C/man3/remove.3:46
10418 msgid ""
10419 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10420 "for files, and B<rmdir>(2)  for directories."
10421 msgstr ""
10422 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10423 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10424
10425 #. type: Plain text
10426 #: build/C/man3/remove.3:50
10427 msgid ""
10428 "If the removed name was the last link to a file and no processes have the "
10429 "file open, the file is deleted and the space it was using is made available "
10430 "for reuse."
10431 msgstr ""
10432 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10433 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10434 "ことができるようになる。"
10435
10436 #. type: Plain text
10437 #: build/C/man3/remove.3:55
10438 msgid ""
10439 "If the name was the last link to a file, but any processes still have the "
10440 "file open, the file will remain in existence until the last file descriptor "
10441 "referring to it is closed."
10442 msgstr ""
10443 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10444 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10445 "でファイルは存在し続ける。"
10446
10447 #. type: Plain text
10448 #: build/C/man3/remove.3:57
10449 msgid "If the name referred to a symbolic link, the link is removed."
10450 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10451
10452 #. type: Plain text
10453 #: build/C/man3/remove.3:60
10454 msgid ""
10455 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10456 "processes which have the object open may continue to use it."
10457 msgstr ""
10458 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10459 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10460
10461 #. type: Plain text
10462 #: build/C/man3/remove.3:70
10463 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10464 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10465
10466 #. type: Plain text
10467 #: build/C/man3/remove.3:72
10468 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10469 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10470
10471 #. type: Plain text
10472 #: build/C/man3/remove.3:78
10473 msgid ""
10474 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10475 "hence would not remove directories)."
10476 msgstr ""
10477 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10478 "(従ってディレクトリを削除できなかった)。"
10479
10480 #. type: Plain text
10481 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10482 msgid ""
10483 "Infelicities in the protocol underlying NFS can cause the unexpected "
10484 "disappearance of files which are still being used."
10485 msgstr ""
10486 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10487 "うことがありえる。"
10488
10489 #. type: Plain text
10490 #: build/C/man3/remove.3:92
10491 msgid ""
10492 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10493 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10494 msgstr ""
10495 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10496 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10497
10498 #. type: TH
10499 #: build/C/man2/rename.2:32
10500 #, no-wrap
10501 msgid "RENAME"
10502 msgstr "RENAME"
10503
10504 #. type: Plain text
10505 #: build/C/man2/rename.2:35
10506 msgid "rename - change the name or location of a file"
10507 msgstr "rename - ファイルの名前や位置を変更する"
10508
10509 #. type: Plain text
10510 #: build/C/man2/rename.2:39
10511 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10512 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10513
10514 #. type: Plain text
10515 #: build/C/man2/rename.2:48
10516 msgid ""
10517 "B<rename>()  renames a file, moving it between directories if required.  Any "
10518 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10519 "Open file descriptors for I<oldpath> are also unaffected."
10520 msgstr ""
10521 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10522 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10523 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10524 "リプタにも影響はない。"
10525
10526 #. type: Plain text
10527 #: build/C/man2/rename.2:56
10528 msgid ""
10529 "If I<newpath> already exists it will be atomically replaced (subject to a "
10530 "few conditions; see ERRORS below), so that there is no point at which "
10531 "another process attempting to access I<newpath> will find it missing."
10532 msgstr ""
10533 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10534 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10535 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10536 "とはない (訳註: 常にアクセス可能である)。"
10537
10538 #. type: Plain text
10539 #: build/C/man2/rename.2:64
10540 msgid ""
10541 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10542 "file, then B<rename>()  does nothing, and returns a success status."
10543 msgstr ""
10544 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10545 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10546
10547 #. type: Plain text
10548 #: build/C/man2/rename.2:72
10549 msgid ""
10550 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10551 "guarantees to leave an instance of I<newpath> in place."
10552 msgstr ""
10553 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10554 "I<newpath> の実体を元のまま残すことを保証する。"
10555
10556 #. type: Plain text
10557 #: build/C/man2/rename.2:78
10558 msgid ""
10559 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10560 "not exist, or it must specify an empty directory."
10561 msgstr ""
10562 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10563 "存在しないか、空のディレクトリでなければならない。"
10564
10565 #. type: Plain text
10566 #: build/C/man2/rename.2:85
10567 msgid ""
10568 "However, when overwriting there will probably be a window in which both "
10569 "I<oldpath> and I<newpath> refer to the file being renamed."
10570 msgstr ""
10571 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10572 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10573
10574 #. type: Plain text
10575 #: build/C/man2/rename.2:91
10576 msgid ""
10577 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10578 "refers to a symbolic link the link will be overwritten."
10579 msgstr ""
10580 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10581 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10582 "は、リンクが上書きされる。"
10583
10584 #. type: Plain text
10585 #: build/C/man2/rename.2:116
10586 msgid ""
10587 "Write permission is denied for the directory containing I<oldpath> or "
10588 "I<newpath>, or, search permission is denied for one of the directories in "
10589 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10590 "and does not allow write permission (needed to update the I<..> entry).  "
10591 "(See also B<path_resolution>(7).)"
10592 msgstr ""
10593 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10594 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10595 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10596 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10597
10598 #. type: TP
10599 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10600 #, no-wrap
10601 msgid "B<EBUSY>"
10602 msgstr "B<EBUSY>"
10603
10604 #. type: Plain text
10605 #: build/C/man2/rename.2:133
10606 msgid ""
10607 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10608 "use by some process (perhaps as current working directory, or as root "
10609 "directory, or because it was open for reading) or is in use by the system "
10610 "(for example as mount point), while the system considers this an error.  "
10611 "(Note that there is no requirement to return B<EBUSY> in such cases"
10612 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10613 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10614 "situations.)"
10615 msgstr ""
10616 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10617 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10618 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10619 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10620 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10621 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10622 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10623 "B<EBUSY> を返すことが許されている。)"
10624
10625 #. type: Plain text
10626 #: build/C/man2/rename.2:143
10627 msgid ""
10628 "The new pathname contained a path prefix of the old, or, more generally, an "
10629 "attempt was made to make a directory a subdirectory of itself."
10630 msgstr ""
10631 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10632 "ディレクトリに 変更しようとした場合がほとんどである。"
10633
10634 #. type: Plain text
10635 #: build/C/man2/rename.2:149
10636 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10637 msgstr ""
10638 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10639 "い。"
10640
10641 #. type: Plain text
10642 #: build/C/man2/rename.2:160
10643 msgid ""
10644 "I<oldpath> already has the maximum number of links to it, or it was a "
10645 "directory and the directory containing I<newpath> has the maximum number of "
10646 "links."
10647 msgstr ""
10648 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10649 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10650
10651 #. type: Plain text
10652 #: build/C/man2/rename.2:176
10653 msgid ""
10654 "The link named by I<oldpath> does not exist; or, a directory component in "
10655 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10656 msgstr ""
10657 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10658 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10659
10660 #. type: Plain text
10661 #: build/C/man2/rename.2:193
10662 msgid ""
10663 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10664 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10665 "not a directory."
10666 msgstr ""
10667 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10668 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10669 "トリでない。"
10670
10671 #. type: TP
10672 #: build/C/man2/rename.2:193
10673 #, no-wrap
10674 msgid "B<ENOTEMPTY> or B<EEXIST>"
10675 msgstr "B<ENOTEMPTY  または  EEXIST>"
10676
10677 #. type: Plain text
10678 #: build/C/man2/rename.2:197
10679 msgid ""
10680 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10681 "\" and \"..\"."
10682 msgstr ""
10683 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10684 "でいる。"
10685
10686 #. type: TP
10687 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
10688 #, no-wrap
10689 msgid "B<EPERM> or B<EACCES>"
10690 msgstr "B<EPERM> または B<EACCES>"
10691
10692 #. type: Plain text
10693 #: build/C/man2/rename.2:221
10694 msgid ""
10695 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10696 "the process's effective user ID is neither the user ID of the file to be "
10697 "deleted nor that of the directory containing it, and the process is not "
10698 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10699 "I<newpath> is an existing file and the directory containing it has the "
10700 "sticky bit set and the process's effective user ID is neither the user ID of "
10701 "the file to be replaced nor that of the directory containing it, and the "
10702 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10703 "capability); or the file system containing I<pathname> does not support "
10704 "renaming of the type requested."
10705 msgstr ""
10706 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10707 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10708 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10709 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10710 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10711 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10712 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10713 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10714 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10715 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10716
10717 #. type: Plain text
10718 #: build/C/man2/rename.2:232
10719 msgid ""
10720 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10721 "permits a file system to be mounted at multiple points, but B<rename>()  "
10722 "does not work across different mount points, even if the same file system is "
10723 "mounted on both.)"
10724 msgstr ""
10725 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10726 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10727 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10728 "別々のマウント位置を跨いでは動作しない。)"
10729
10730 #. type: Plain text
10731 #: build/C/man2/rename.2:234
10732 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10733 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10734
10735 #. type: Plain text
10736 #: build/C/man2/rename.2:245
10737 msgid ""
10738 "On NFS file systems, you can not assume that if the operation failed the "
10739 "file was not renamed.  If the server does the rename operation and then "
10740 "crashes, the retransmitted RPC which will be processed when the server is up "
10741 "again causes a failure.  The application is expected to deal with this.  See "
10742 "B<link>(2)  for a similar problem."
10743 msgstr ""
10744 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10745 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10746 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10747 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10748 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10749
10750 #. type: Plain text
10751 #: build/C/man2/rename.2:254
10752 msgid ""
10753 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10754 "(2), B<path_resolution>(7), B<symlink>(7)"
10755 msgstr ""
10756 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10757 "(2), B<path_resolution>(7), B<symlink>(7)"
10758
10759 #. type: TH
10760 #: build/C/man2/rmdir.2:30
10761 #, no-wrap
10762 msgid "RMDIR"
10763 msgstr "RMDIR"
10764
10765 #. type: TH
10766 #: build/C/man2/rmdir.2:30
10767 #, no-wrap
10768 msgid "2008-05-08"
10769 msgstr "2008-05-08"
10770
10771 #. type: Plain text
10772 #: build/C/man2/rmdir.2:33
10773 msgid "rmdir - delete a directory"
10774 msgstr "rmdir - ディレクトリを削除する"
10775
10776 #. type: Plain text
10777 #: build/C/man2/rmdir.2:37
10778 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10779 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10780
10781 #. type: Plain text
10782 #: build/C/man2/rmdir.2:40
10783 msgid "B<rmdir>()  deletes a directory, which must be empty."
10784 msgstr ""
10785 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10786 "ない。"
10787
10788 #. type: Plain text
10789 #: build/C/man2/rmdir.2:55
10790 msgid ""
10791 "Write access to the directory containing I<pathname> was not allowed, or one "
10792 "of the directories in the path prefix of I<pathname> did not allow search "
10793 "permission.  (See also B<path_resolution>(7)."
10794 msgstr ""
10795 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10796 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10797 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10798 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10799 "と)"
10800
10801 #. type: Plain text
10802 #: build/C/man2/rmdir.2:64
10803 msgid ""
10804 "I<pathname> is currently in use by the system or some process that prevents "
10805 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10806 "point or is the root directory of the calling process."
10807 msgstr ""
10808 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10809 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10810 "たプロセスのルートディレクトリであることを意味する。"
10811
10812 #. type: Plain text
10813 #: build/C/man2/rmdir.2:73
10814 msgid "I<pathname> has I<.> as last component."
10815 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10816
10817 #. type: Plain text
10818 #: build/C/man2/rmdir.2:77
10819 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10820 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10821
10822 #. type: Plain text
10823 #: build/C/man2/rmdir.2:85
10824 msgid ""
10825 "A directory component in I<pathname> does not exist or is a dangling "
10826 "symbolic link."
10827 msgstr ""
10828 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10829 "リックリンク (symbolic link) である。"
10830
10831 #. type: Plain text
10832 #: build/C/man2/rmdir.2:94
10833 msgid ""
10834 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10835 "fact, a directory."
10836 msgstr ""
10837 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10838 "クトリでない。"
10839
10840 #. type: TP
10841 #: build/C/man2/rmdir.2:94
10842 #, no-wrap
10843 msgid "B<ENOTEMPTY>"
10844 msgstr "B<ENOTEMPTY>"
10845
10846 #. type: Plain text
10847 #: build/C/man2/rmdir.2:107
10848 msgid ""
10849 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10850 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10851 "condition."
10852 msgstr ""
10853 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
10854 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
10855 "で B<EEXIST> を返すことを認めている。"
10856
10857 #. type: Plain text
10858 #: build/C/man2/rmdir.2:118
10859 msgid ""
10860 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
10861 "and the process's effective user ID is neither the user ID of the file to be "
10862 "deleted nor that of the directory containing it, and the process is not "
10863 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
10864 msgstr ""
10865 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
10866 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
10867 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
10868 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
10869
10870 #. type: Plain text
10871 #: build/C/man2/rmdir.2:123
10872 msgid ""
10873 "The file system containing I<pathname> does not support the removal of "
10874 "directories."
10875 msgstr ""
10876 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
10877 "ない。"
10878
10879 #. type: Plain text
10880 #: build/C/man2/rmdir.2:127
10881 msgid "I<pathname> refers to a directory on a read-only file system."
10882 msgstr ""
10883 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
10884
10885 #. type: Plain text
10886 #: build/C/man2/rmdir.2:132
10887 msgid ""
10888 "Infelicities in the protocol underlying NFS can cause the unexpected "
10889 "disappearance of directories which are still being used."
10890 msgstr ""
10891 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
10892 "する現象が引き起こされることがある。"
10893
10894 #. type: Plain text
10895 #: build/C/man2/rmdir.2:141
10896 msgid ""
10897 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10898 "B<unlink>(2), B<unlinkat>(2)"
10899 msgstr ""
10900 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10901 "B<unlink>(2), B<unlinkat>(2)"
10902
10903 #. type: TH
10904 #: build/C/man3/scanf.3:52
10905 #, no-wrap
10906 msgid "SCANF"
10907 msgstr "SCANF"
10908
10909 #. type: TH
10910 #: build/C/man3/scanf.3:52
10911 #, no-wrap
10912 msgid "2013-01-30"
10913 msgstr "2013-01-30"
10914
10915 #. type: Plain text
10916 #: build/C/man3/scanf.3:55
10917 msgid ""
10918 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
10919 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
10920
10921 #. type: Plain text
10922 #: build/C/man3/scanf.3:62
10923 #, no-wrap
10924 msgid ""
10925 "B<int scanf(const char *>I<format>B<, ...);>\n"
10926 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10927 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10928 msgstr ""
10929 "B<int scanf(const char *>I<format>B<, ...);>\n"
10930 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10931 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10932
10933 #. type: Plain text
10934 #: build/C/man3/scanf.3:64
10935 #, no-wrap
10936 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
10937 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
10938
10939 #. type: Plain text
10940 #: build/C/man3/scanf.3:68
10941 #, no-wrap
10942 msgid ""
10943 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10944 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10945 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10946 msgstr ""
10947 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10948 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10949 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10950
10951 #. type: Plain text
10952 #: build/C/man3/scanf.3:79
10953 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10954 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10955
10956 #. type: Plain text
10957 #: build/C/man3/scanf.3:82
10958 msgid ""
10959 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
10960 "200112L;"
10961 msgstr ""
10962 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
10963 "200112L;"
10964
10965 #. type: Plain text
10966 #: build/C/man3/scanf.3:104
10967 msgid ""
10968 "The B<scanf>()  family of functions scans input according to I<format> as "
10969 "described below.  This format may contain I<conversion specifications>; the "
10970 "results from such conversions, if any, are stored in the locations pointed "
10971 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
10972 "argument must be of a type that is appropriate for the value returned by the "
10973 "corresponding conversion specification."
10974 msgstr ""
10975 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
10976 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
10977 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
10978 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
10979 "は、対応する変換指定が返す値に 適合していなければならない。"
10980
10981 #. type: Plain text
10982 #: build/C/man3/scanf.3:115
10983 msgid ""
10984 "If the number of conversion specifications in I<format> exceeds the number "
10985 "of I<pointer> arguments, the results are undefined.  If the number of "
10986 "I<pointer> arguments exceeds the number of conversion specifications, then "
10987 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
10988 msgstr ""
10989 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
10990 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
10991 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
10992
10993 #. type: Plain text
10994 #: build/C/man3/scanf.3:127
10995 msgid ""
10996 "The B<scanf>()  function reads input from the standard input stream "
10997 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
10998 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
10999 msgstr ""
11000 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
11001 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
11002 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
11003
11004 #. type: Plain text
11005 #: build/C/man3/scanf.3:145
11006 msgid ""
11007 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
11008 "from the stream pointer I<stream> using a variable argument list of pointers "
11009 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
11010 "from the standard input and the B<vsscanf>()  function scans it from a "
11011 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
11012 "functions respectively."
11013 msgstr ""
11014 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
11015 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
11016 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
11017 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
11018 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
11019
11020 #. type: Plain text
11021 #: build/C/man3/scanf.3:159
11022 msgid ""
11023 "The I<format> string consists of a sequence of I<directives> which describe "
11024 "how to process the sequence of input characters.  If processing of a "
11025 "directive fails, no further input is read, and B<scanf>()  returns.  A "
11026 "\"failure\" can be either of the following: I<input failure>, meaning that "
11027 "input characters were unavailable, or I<matching failure>, meaning that the "
11028 "input was inappropriate (see below)."
11029 msgstr ""
11030 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
11031 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
11032 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
11033 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
11034 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
11035 "であったこと (下記参照) を意味する。"
11036
11037 #. type: Plain text
11038 #: build/C/man3/scanf.3:161
11039 msgid "A directive is one of the following:"
11040 msgstr "命令は以下のいずれかである:"
11041
11042 #. type: TP
11043 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
11044 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
11045 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
11046 #, no-wrap
11047 msgid "\\(bu"
11048 msgstr "\\(bu"
11049
11050 #. type: Plain text
11051 #: build/C/man3/scanf.3:167
11052 msgid ""
11053 "A sequence of white-space characters (space, tab, newline, etc.; see "
11054 "B<isspace>(3)).  This directive matches any amount of white space, including "
11055 "none, in the input."
11056 msgstr ""
11057 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
11058 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
11059 "致する)。"
11060
11061 #. type: Plain text
11062 #: build/C/man3/scanf.3:171
11063 msgid ""
11064 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
11065 "This character must exactly match the next character of input."
11066 msgstr ""
11067 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
11068 "の次の文字に正確に一致しなければならない。"
11069
11070 #. type: Plain text
11071 #: build/C/man3/scanf.3:182
11072 msgid ""
11073 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
11074 "character.  A sequence of characters from the input is converted according "
11075 "to this specification, and the result is placed in the corresponding "
11076 "I<pointer> argument.  If the next item of input does not match the "
11077 "conversion specification, the conversion fails\\(emthis is a I<matching "
11078 "failure>."
11079 msgstr ""
11080 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
11081 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
11082 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
11083 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
11084
11085 #. type: Plain text
11086 #: build/C/man3/scanf.3:190
11087 msgid ""
11088 "Each I<conversion specification> in I<format> begins with either the "
11089 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
11090 "for the distinction) followed by:"
11091 msgstr ""
11092 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
11093 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
11094
11095 #. type: Plain text
11096 #: build/C/man3/scanf.3:201
11097 msgid ""
11098 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
11099 "input as directed by the conversion specification, but discards the input.  "
11100 "No corresponding I<pointer> argument is required, and this specification is "
11101 "not included in the count of successful assignments returned by B<scanf>()."
11102 msgstr ""
11103 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
11104 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
11105 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
11106
11107 #. type: Plain text
11108 #: build/C/man3/scanf.3:220
11109 msgid ""
11110 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
11111 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11112 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11113 "buffer of sufficient size, and assigns the address of this buffer to the "
11114 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
11115 "*> variable (this variable does not need to be initialized before the "
11116 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
11117 "longer required."
11118 msgstr ""
11119 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
11120 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
11121 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
11122 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
11123 "は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に"
11124 "初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファ"
11125 "を B<free>(3) すべきである。"
11126
11127 #. type: Plain text
11128 #: build/C/man3/scanf.3:232
11129 msgid ""
11130 "An optional decimal integer which specifies the I<maximum field width>.  "
11131 "Reading of characters stops either when this maximum is reached or when a "
11132 "nonmatching character is found, whichever happens first.  Most conversions "
11133 "discard initial white space characters (the exceptions are noted below), and "
11134 "these discarded characters don't count toward the maximum field width.  "
11135 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
11136 "mark the end of the input; the maximum field width does not include this "
11137 "terminator."
11138 msgstr ""
11139 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
11140 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
11141 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
11142 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
11143 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
11144 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
11145
11146 #. type: Plain text
11147 #: build/C/man3/scanf.3:246
11148 msgid ""
11149 "An optional I<type modifier character>.  For example, the B<l> type modifier "
11150 "is used with integer conversions such as B<%d> to specify that the "
11151 "corresponding I<pointer> argument refers to a I<long int> rather than a "
11152 "pointer to an I<int>."
11153 msgstr ""
11154 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
11155 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
11156 "I<int> ではなく I<long int> を参照していることを指定できる。"
11157
11158 #. type: Plain text
11159 #: build/C/man3/scanf.3:251
11160 msgid ""
11161 "A I<conversion specifier> that specifies the type of input conversion to be "
11162 "performed."
11163 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
11164
11165 #. type: Plain text
11166 #: build/C/man3/scanf.3:280
11167 msgid ""
11168 "The conversion specifications in I<format> are of two forms, either "
11169 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
11170 "forms should not be mixed in the same I<format> string, except that a string "
11171 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
11172 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
11173 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
11174 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
11175 "specifies that the converted input should be placed in the location referred "
11176 "to by the I<n>-th I<pointer> argument following I<format>."
11177 msgstr ""
11178 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
11179 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
11180 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
11181 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
11182 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
11183 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
11184 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
11185 "I<pointer> 引き数が参照する場所に格納することを指定する。"
11186
11187 #. type: SS
11188 #: build/C/man3/scanf.3:280
11189 #, no-wrap
11190 msgid "Conversions"
11191 msgstr "変換"
11192
11193 #. type: Plain text
11194 #: build/C/man3/scanf.3:284
11195 msgid ""
11196 "The following I<type modifier characters> can appear in a conversion "
11197 "specification:"
11198 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
11199
11200 #. type: Plain text
11201 #: build/C/man3/scanf.3:294
11202 msgid ""
11203 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
11204 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
11205 "I<unsigned short int> (rather than I<int>)."
11206 msgstr ""
11207 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
11208 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
11209 "あることを示す。"
11210
11211 #. type: Plain text
11212 #: build/C/man3/scanf.3:302
11213 msgid ""
11214 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
11215 "I<unsigned char>."
11216 msgstr ""
11217 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
11218 "タであることを示す。"
11219
11220 #. type: Plain text
11221 #: build/C/man3/scanf.3:311
11222 msgid ""
11223 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
11224 "I<uintmax_t>.  This modifier was introduced in C99."
11225 msgstr ""
11226 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
11227 "ることを示す。 この修飾子は C99 で導入された。"
11228
11229 #.  This use of l was introduced in Amendment 1 to ISO C90.
11230 #. type: Plain text
11231 #: build/C/man3/scanf.3:338
11232 msgid ""
11233 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
11234 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
11235 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
11236 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
11237 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
11238 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
11239 "as a pointer to a wide character or wide-character string respectively."
11240 msgstr ""
11241 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
11242 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
11243 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
11244 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
11245 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
11246 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
11247 "ンタであると みなされる。"
11248
11249 #.  MTK, Jul 05: The following is no longer true for modern
11250 #.  ANSI C (i.e., C99):
11251 #.  (Note that long long is not an
11252 #.  ANSI C
11253 #.  type. Any program using this will not be portable to all
11254 #.  architectures).
11255 #. type: Plain text
11256 #: build/C/man3/scanf.3:354
11257 msgid ""
11258 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
11259 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
11260 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
11261 msgstr ""
11262 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
11263 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
11264 "I<long long> へのポインタであることのいずれかであることを示す。"
11265
11266 #. type: Plain text
11267 #: build/C/man3/scanf.3:359
11268 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
11269 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
11270
11271 #. type: Plain text
11272 #: build/C/man3/scanf.3:366
11273 msgid ""
11274 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11275 "modifier was introduced in C99."
11276 msgstr ""
11277 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11278 "この修飾子は C99 で導入された。"
11279
11280 #. type: Plain text
11281 #: build/C/man3/scanf.3:373
11282 msgid ""
11283 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11284 "modifier was introduced in C99."
11285 msgstr ""
11286 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11287 "修飾子は C99 で導入された。"
11288
11289 #. type: Plain text
11290 #: build/C/man3/scanf.3:377
11291 msgid "The following I<conversion specifiers> are available:"
11292 msgstr "以下の I<「変換指定子」> が利用可能である。"
11293
11294 #. type: Plain text
11295 #: build/C/man3/scanf.3:386
11296 msgid ""
11297 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11298 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11299 "initial white space characters are discarded), and assignment does not occur."
11300 msgstr ""
11301 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11302 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11303 "る)、 変数への代入は生じない。"
11304
11305 #. type: TP
11306 #: build/C/man3/scanf.3:386
11307 #, no-wrap
11308 msgid "B<d>"
11309 msgstr "B<d>"
11310
11311 #. type: Plain text
11312 #: build/C/man3/scanf.3:391
11313 msgid ""
11314 "Matches an optionally signed decimal integer; the next pointer must be a "
11315 "pointer to I<int>."
11316 msgstr ""
11317 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11318 "ばならない。"
11319
11320 #. type: TP
11321 #: build/C/man3/scanf.3:391
11322 #, no-wrap
11323 msgid "B<D>"
11324 msgstr "B<D>"
11325
11326 #. type: Plain text
11327 #: build/C/man3/scanf.3:400
11328 msgid ""
11329 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11330 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11331 "causing old programs to fail mysteriously.)"
11332 msgstr ""
11333 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11334 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11335 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11336
11337 #. type: TP
11338 #: build/C/man3/scanf.3:400
11339 #, no-wrap
11340 msgid "B<i>"
11341 msgstr "B<i>"
11342
11343 #. type: Plain text
11344 #: build/C/man3/scanf.3:412
11345 msgid ""
11346 "Matches an optionally signed integer; the next pointer must be a pointer to "
11347 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11348 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11349 "that correspond to the base are used."
11350 msgstr ""
11351 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11352 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11353 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11354 "される文字は、これらの基数に対応しているものだけである。"
11355
11356 #. type: TP
11357 #: build/C/man3/scanf.3:412
11358 #, no-wrap
11359 msgid "B<o>"
11360 msgstr "B<o>"
11361
11362 #. type: Plain text
11363 #: build/C/man3/scanf.3:416
11364 msgid ""
11365 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11366 "I<unsigned int>."
11367 msgstr ""
11368 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11369 "らない。"
11370
11371 #. type: TP
11372 #: build/C/man3/scanf.3:416
11373 #, no-wrap
11374 msgid "B<u>"
11375 msgstr "B<u>"
11376
11377 #. type: Plain text
11378 #: build/C/man3/scanf.3:421
11379 msgid ""
11380 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11381 "I<unsigned int>."
11382 msgstr ""
11383 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11384 "でなければならない。"
11385
11386 #. type: Plain text
11387 #: build/C/man3/scanf.3:426
11388 msgid ""
11389 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11390 "to I<unsigned int>."
11391 msgstr ""
11392 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11393 "タでなければならない。"
11394
11395 #. type: TP
11396 #: build/C/man3/scanf.3:426
11397 #, no-wrap
11398 msgid "B<X>"
11399 msgstr "B<X>"
11400
11401 #. type: Plain text
11402 #: build/C/man3/scanf.3:430
11403 msgid "Equivalent to B<x>."
11404 msgstr "B<x> と同一である。"
11405
11406 #. type: TP
11407 #: build/C/man3/scanf.3:430
11408 #, no-wrap
11409 msgid "B<f>"
11410 msgstr "B<f>"
11411
11412 #. type: Plain text
11413 #: build/C/man3/scanf.3:435
11414 msgid ""
11415 "Matches an optionally signed floating-point number; the next pointer must be "
11416 "a pointer to I<float>."
11417 msgstr ""
11418 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11419 "ればならない。"
11420
11421 #. type: TP
11422 #: build/C/man3/scanf.3:435
11423 #, no-wrap
11424 msgid "B<e>"
11425 msgstr "B<e>"
11426
11427 #. type: Plain text
11428 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
11429 msgid "Equivalent to B<f>."
11430 msgstr "B<f> と同一である。"
11431
11432 #. type: TP
11433 #: build/C/man3/scanf.3:439
11434 #, no-wrap
11435 msgid "B<g>"
11436 msgstr "B<g>"
11437
11438 #. type: TP
11439 #: build/C/man3/scanf.3:443
11440 #, no-wrap
11441 msgid "B<E>"
11442 msgstr "B<E>"
11443
11444 #. type: Plain text
11445 #: build/C/man3/scanf.3:451
11446 msgid "(C99) Equivalent to B<f>."
11447 msgstr "(C99)  B<f> と同一である。"
11448
11449 #. type: Plain text
11450 #: build/C/man3/scanf.3:459
11451 msgid ""
11452 "Matches a sequence of non-white-space characters; the next pointer must be a "
11453 "pointer to character array that is long enough to hold the input sequence "
11454 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11455 "automatically.  The input string stops at white space or at the maximum "
11456 "field width, whichever occurs first."
11457 msgstr ""
11458 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11459 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11460 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11461 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11462 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11463
11464 #. type: Plain text
11465 #: build/C/man3/scanf.3:469
11466 msgid ""
11467 "Matches a sequence of characters whose length is specified by the I<maximum "
11468 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11469 "there must be enough room for all the characters (no terminating null byte "
11470 "is added).  The usual skip of leading white space is suppressed.  To skip "
11471 "white space first, use an explicit space in the format."
11472 msgstr ""
11473 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11474 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11475 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11476 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11477 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11478
11479 #. type: TP
11480 #: build/C/man3/scanf.3:469
11481 #, no-wrap
11482 msgid "B<\\&[>"
11483 msgstr "B<\\&[>"
11484
11485 #. type: Plain text
11486 #: build/C/man3/scanf.3:502
11487 msgid ""
11488 "Matches a nonempty sequence of characters from the specified set of accepted "
11489 "characters; the next pointer must be a pointer to I<char>, and there must be "
11490 "enough room for all the characters in the string, plus a terminating null "
11491 "byte.  The usual skip of leading white space is suppressed.  The string is "
11492 "to be made up of characters in (or not in) a particular set; the set is "
11493 "defined by the characters between the open bracket B<[> character and a "
11494 "close bracket B<]> character.  The set I<excludes> those characters if the "
11495 "first character after the open bracket is a circumflex (B<^>).  To include a "
11496 "close bracket in the set, make it the first character after the open bracket "
11497 "or the circumflex; any other position will end the set.  The hyphen "
11498 "character B<-> is also special; when placed between two other characters, it "
11499 "adds all intervening characters to the set.  To include a hyphen, make it "
11500 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11501 "> means the set \"everything except close bracket, zero through nine, and "
11502 "hyphen\".  The string ends with the appearance of a character not in the "
11503 "(or, with a circumflex, in) set or when the field width runs out."
11504 msgstr ""
11505 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11506 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11507 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11508 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11509 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11510 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11511 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11512 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11513 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11514 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11515 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11516 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11517 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11518 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11519 "文字の 出現または確保された領域が使い切られた時に終了する。"
11520
11521 #. type: Plain text
11522 #: build/C/man3/scanf.3:510
11523 msgid ""
11524 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11525 "pointer must be a pointer to a pointer to I<void>."
11526 msgstr ""
11527 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11528 "タは I<void> へのポインタへのポインタでなければならない。"
11529
11530 #. type: Plain text
11531 #: build/C/man3/scanf.3:530
11532 msgid ""
11533 "Nothing is expected; instead, the number of characters consumed thus far "
11534 "from the input is stored through the next pointer, which must be a pointer "
11535 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11536 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11537 "of a B<%n> directive does not increment the assignment count returned at the "
11538 "completion of execution\" but the Corrigendum seems to contradict this.  "
11539 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11540 "conversions on the return value."
11541 msgstr ""
11542 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11543 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11544 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11545 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11546 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11547 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11548 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11549
11550 #. type: Plain text
11551 #: build/C/man3/scanf.3:535
11552 msgid ""
11553 "These functions return the number of input items successfully matched and "
11554 "assigned, which can be fewer than provided for, or even zero in the event of "
11555 "an early matching failure."
11556 msgstr ""
11557 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11558 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11559 "ることもある。"
11560
11561 #. type: Plain text
11562 #: build/C/man3/scanf.3:547
11563 msgid ""
11564 "The value B<EOF> is returned if the end of input is reached before either "
11565 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11566 "also returned if a read error occurs, in which case the error indicator for "
11567 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11568 "error."
11569 msgstr ""
11570 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11571 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11572 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11573 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11574
11575 #. type: Plain text
11576 #: build/C/man3/scanf.3:553
11577 msgid ""
11578 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11579 "operation would block."
11580 msgstr ""
11581 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11582 "込み操作は停止 (block) することになる。"
11583
11584 #. type: Plain text
11585 #: build/C/man3/scanf.3:558
11586 msgid ""
11587 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11588 msgstr ""
11589 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11590 "ンされていない。"
11591
11592 #. type: Plain text
11593 #: build/C/man3/scanf.3:561
11594 msgid "Input byte sequence does not form a valid character."
11595 msgstr "入力されたバイト列が有効な文字を構成していない。"
11596
11597 #. type: Plain text
11598 #: build/C/man3/scanf.3:565
11599 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11600 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11601
11602 #. type: Plain text
11603 #: build/C/man3/scanf.3:570
11604 msgid "Not enough arguments; or I<format> is NULL."
11605 msgstr "引き数が十分でない。または I<format> が NULL である。"
11606
11607 #. type: Plain text
11608 #: build/C/man3/scanf.3:573
11609 msgid "Out of memory."
11610 msgstr "メモリ不足。"
11611
11612 #. type: TP
11613 #: build/C/man3/scanf.3:573
11614 #, no-wrap
11615 msgid "B<ERANGE>"
11616 msgstr "B<ERANGE>"
11617
11618 #. type: Plain text
11619 #: build/C/man3/scanf.3:577
11620 msgid ""
11621 "The result of an integer conversion would exceed the size that can be stored "
11622 "in the corresponding integer type."
11623 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11624
11625 #. type: Plain text
11626 #: build/C/man3/scanf.3:587
11627 msgid ""
11628 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11629 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11630 msgstr ""
11631 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11632 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11633
11634 #. type: Plain text
11635 #: build/C/man3/scanf.3:597
11636 msgid ""
11637 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11638 "the usage of B<L> in integer conversions is the GNU notation."
11639 msgstr ""
11640 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11641 "B<ll> または B<L> の使用は GNU での拡張である。"
11642
11643 #. type: Plain text
11644 #: build/C/man3/scanf.3:608
11645 msgid ""
11646 "The Linux version of these functions is based on the I<GNU> I<libio> "
11647 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11648 "(glibc-1.08)> for a more concise description."
11649 msgstr ""
11650 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11651 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11652
11653 #. type: Plain text
11654 #: build/C/man3/scanf.3:614
11655 msgid ""
11656 "The GNU C library supported the dynamic allocation conversion specifier (as "
11657 "a nonstandard extension) via the B<a> character.  This feature seems to be "
11658 "present at least as far back as glibc 2.0."
11659 msgstr ""
11660 "GNU C ライブラリ (glibc) では、 B<a> 文字による動的割り当て変換指定子 "
11661 "(dynamic allocation conversion specifier) を (非標準の拡張として) サポートし"
11662 "ている。この機能は少なくとも glibc 2.0 以降で存在しているようである。"
11663
11664 #. type: Plain text
11665 #: build/C/man3/scanf.3:624
11666 msgid ""
11667 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
11668 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
11669 "the B<a> is interpreted as a specifier for floating-point numbers (see "
11670 "above)."
11671 msgstr ""
11672 "この修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
11673 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない。この場"
11674 "合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11675
11676 #. type: Plain text
11677 #: build/C/man3/scanf.3:633
11678 msgid ""
11679 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11680 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11681 "advantages:"
11682 msgstr ""
11683 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11684 "ている。 B<m> 修飾子は以下の利点がある。"
11685
11686 #. type: Plain text
11687 #: build/C/man3/scanf.3:638
11688 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11689 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11690
11691 #. type: Plain text
11692 #: build/C/man3/scanf.3:644
11693 msgid ""
11694 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11695 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11696 msgstr ""
11697 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11698 "std=c99> などの影響も避けられる)。"
11699
11700 #. type: Plain text
11701 #: build/C/man3/scanf.3:646
11702 msgid "It is specified in the POSIX.1-2008 standard."
11703 msgstr "POSIX.1-2008 標準で規定されている。"
11704
11705 #. type: Plain text
11706 #: build/C/man3/scanf.3:659
11707 msgid ""
11708 "All functions are fully C89 conformant, but provide the additional "
11709 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11710 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11711 "the behavior of specifiers defined in C89."
11712 msgstr ""
11713 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11714 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11715 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11716 "れない。"
11717
11718 #. type: Plain text
11719 #: build/C/man3/scanf.3:675
11720 msgid ""
11721 "Some combinations of the type modifiers and conversion specifiers defined by "
11722 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
11723 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11724 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11725 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11726 "B<u>, B<x>, and B<X> conversions or B<ll>."
11727 msgstr ""
11728 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
11729 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
11730 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
11731 "他のアーキテクチャでも同様になっているとは限らない。\n"
11732 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
11733 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
11734 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11735
11736 #. type: Plain text
11737 #: build/C/man3/scanf.3:681
11738 msgid ""
11739 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11740 "conversions equivalently to B<L>."
11741 msgstr ""
11742 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11743 "動小数の変換に使用される。"
11744
11745 #. type: Plain text
11746 #: build/C/man3/scanf.3:691
11747 msgid ""
11748 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
11749 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
11750 "the returned string, as in the following example:"
11751 msgstr ""
11752 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
11753 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
11754 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
11755
11756 #. type: Plain text
11757 #: build/C/man3/scanf.3:696
11758 #, no-wrap
11759 msgid ""
11760 "char *p;\n"
11761 "int n;\n"
11762 msgstr ""
11763 "char *p;\n"
11764 "int n;\n"
11765
11766 #. type: Plain text
11767 #: build/C/man3/scanf.3:707
11768 #, no-wrap
11769 msgid ""
11770 "errno = 0;\n"
11771 "n = scanf(\"%m[a-z]\", &p);\n"
11772 "if (n == 1) {\n"
11773 "    printf(\"read: %s\\en\", p);\n"
11774 "    free(p);\n"
11775 "} else if (errno != 0) {\n"
11776 "    perror(\"scanf\");\n"
11777 "} else {\n"
11778 "    fprintf(stderr, \"No matching characters\\en\");\n"
11779 "}\n"
11780 msgstr ""
11781 "errno = 0;\n"
11782 "n = scanf(\"%m[a-z]\", &p);\n"
11783 "if (n == 1) {\n"
11784 "    printf(\"read: %s\\en\", p);\n"
11785 "    free(p);\n"
11786 "} else if (errno != 0) {\n"
11787 "    perror(\"scanf\");\n"
11788 "} else {\n"
11789 "    fprintf(stderr, \"No matching characters\\en\");\n"
11790 "}\n"
11791
11792 #. type: Plain text
11793 #: build/C/man3/scanf.3:715
11794 msgid ""
11795 "As shown in the above example, it is necessary to call B<free>(3)  only if "
11796 "the B<scanf>()  call successfully read a string."
11797 msgstr ""
11798 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11799 "B<free>(3)  を呼び出す必要がある。"
11800
11801 #. type: Plain text
11802 #: build/C/man3/scanf.3:722
11803 msgid ""
11804 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11805 "B<strtoul>(3)"
11806 msgstr ""
11807 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11808 "B<strtoul>(3),"
11809
11810 #. type: TH
11811 #: build/C/man3/setbuf.3:48
11812 #, no-wrap
11813 msgid "SETBUF"
11814 msgstr "SETBUF"
11815
11816 #. type: TH
11817 #: build/C/man3/setbuf.3:48
11818 #, no-wrap
11819 msgid "2012-08-03"
11820 msgstr "2012-08-03"
11821
11822 #. type: Plain text
11823 #: build/C/man3/setbuf.3:51
11824 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11825 msgstr ""
11826 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11827
11828 #. type: Plain text
11829 #: build/C/man3/setbuf.3:56
11830 #, no-wrap
11831 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11832 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11833
11834 #. type: Plain text
11835 #: build/C/man3/setbuf.3:58
11836 #, no-wrap
11837 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11838 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11839
11840 #. type: Plain text
11841 #: build/C/man3/setbuf.3:60
11842 #, no-wrap
11843 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11844 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11845
11846 #. type: Plain text
11847 #: build/C/man3/setbuf.3:63
11848 #, no-wrap
11849 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11850 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11851
11852 #. type: Plain text
11853 #: build/C/man3/setbuf.3:73
11854 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11855 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11856
11857 #. type: Plain text
11858 #: build/C/man3/setbuf.3:96
11859 msgid ""
11860 "The three types of buffering available are unbuffered, block buffered, and "
11861 "line buffered.  When an output stream is unbuffered, information appears on "
11862 "the destination file or terminal as soon as written; when it is block "
11863 "buffered many characters are saved up and written as a block; when it is "
11864 "line buffered characters are saved up until a newline is output or input is "
11865 "read from any stream attached to a terminal device (typically I<stdin>).  "
11866 "The function B<fflush>(3)  may be used to force the block out early.  (See "
11867 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
11868 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
11869 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
11870 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
11871 "by default."
11872 msgstr ""
11873 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
11874 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
11875 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
11876 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
11877 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
11878 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
11879 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
11880 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
11881 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
11882 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
11883 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
11884 "unbuffered である。"
11885
11886 #. type: Plain text
11887 #: build/C/man3/setbuf.3:103
11888 msgid ""
11889 "The B<setvbuf>()  function may be used on any open stream to change its "
11890 "buffer.  The I<mode> argument must be one of the following three macros:"
11891 msgstr ""
11892 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
11893 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
11894
11895 #. type: TP
11896 #: build/C/man3/setbuf.3:104
11897 #, no-wrap
11898 msgid "B<_IONBF>"
11899 msgstr "B<_IONBF>"
11900
11901 #. type: Plain text
11902 #: build/C/man3/setbuf.3:107
11903 msgid "unbuffered"
11904 msgstr "unbuffered"
11905
11906 #. type: TP
11907 #: build/C/man3/setbuf.3:107
11908 #, no-wrap
11909 msgid "B<_IOLBF>"
11910 msgstr "B<_IOLBF>"
11911
11912 #. type: Plain text
11913 #: build/C/man3/setbuf.3:110
11914 msgid "line buffered"
11915 msgstr "line buffered"
11916
11917 #. type: TP
11918 #: build/C/man3/setbuf.3:110
11919 #, no-wrap
11920 msgid "B<_IOFBF>"
11921 msgstr "B<_IOFBF>"
11922
11923 #. type: Plain text
11924 #: build/C/man3/setbuf.3:113
11925 msgid "fully buffered"
11926 msgstr "fully buffered"
11927
11928 #. type: Plain text
11929 #: build/C/man3/setbuf.3:129
11930 msgid ""
11931 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
11932 "least I<size> bytes long; this buffer will be used instead of the current "
11933 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
11934 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
11935 "()  function may be used only after opening a stream and before any other "
11936 "operations have been performed on it."
11937 msgstr ""
11938 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
11939 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
11940 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
11941 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
11942 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
11943
11944 #. type: Plain text
11945 #: build/C/man3/setbuf.3:135
11946 msgid ""
11947 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
11948 "().  The B<setbuf>()  function is exactly equivalent to the call"
11949 msgstr ""
11950 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
11951 "B<setbuf>()  関数は、"
11952
11953 #. type: Plain text
11954 #: build/C/man3/setbuf.3:138
11955 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
11956 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
11957
11958 #. type: Plain text
11959 #: build/C/man3/setbuf.3:148
11960 msgid ""
11961 "The B<setbuffer>()  function is the same, except that the size of the buffer "
11962 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
11963 "The B<setlinebuf>()  function is exactly equivalent to the call:"
11964 msgstr ""
11965 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
11966 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
11967 "は以下と同じである。"
11968
11969 #. type: Plain text
11970 #: build/C/man3/setbuf.3:151
11971 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
11972 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
11973
11974 #. type: Plain text
11975 #: build/C/man3/setbuf.3:162
11976 msgid ""
11977 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
11978 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
11979 "I<errno> on failure."
11980 msgstr ""
11981 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
11982 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
11983 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
11984
11985 #. type: Plain text
11986 #: build/C/man3/setbuf.3:164
11987 msgid "The other functions do not return a value."
11988 msgstr "その他の関数は値を返さない。"
11989
11990 #. type: Plain text
11991 #: build/C/man3/setbuf.3:170
11992 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
11993 msgstr ""
11994 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
11995
11996 #. type: Plain text
11997 #: build/C/man3/setbuf.3:180
11998 msgid ""
11999 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
12000 "versions of BSD before 4.2BSD, and are available under Linux since libc "
12001 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
12002 "buffer size and should be avoided."
12003 msgstr ""
12004 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
12005 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
12006 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
12007 "ズを使用するので、これも使うべきでない。"
12008
12009 #. type: Plain text
12010 #: build/C/man3/setbuf.3:187
12011 msgid ""
12012 "You must make sure that the space that I<buf> points to still exists by the "
12013 "time I<stream> is closed, which also happens at program termination.  For "
12014 "example, the following is invalid:"
12015 msgstr ""
12016 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
12017 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
12018 "な使い方は許されない:"
12019
12020 #. type: Plain text
12021 #: build/C/man3/setbuf.3:190
12022 #, no-wrap
12023 msgid "#include E<lt>stdio.hE<gt>\n"
12024 msgstr "#include E<lt>stdio.hE<gt>\n"
12025
12026 #. type: Plain text
12027 #: build/C/man3/setbuf.3:199
12028 #, no-wrap
12029 msgid ""
12030 "int\n"
12031 "main(void)\n"
12032 "{\n"
12033 "    char buf[BUFSIZ];\n"
12034 "    setbuf(stdin, buf);\n"
12035 "    printf(\"Hello, world!\\en\");\n"
12036 "    return 0;\n"
12037 "}\n"
12038 msgstr ""
12039 "int\n"
12040 "main(void)\n"
12041 "{\n"
12042 "    char buf[BUFSIZ];\n"
12043 "    setbuf(stdin, buf);\n"
12044 "    printf(\"Hello, world!\\en\");\n"
12045 "    return 0;\n"
12046 "}\n"
12047
12048 #. type: Plain text
12049 #: build/C/man3/setbuf.3:208
12050 msgid ""
12051 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12052 "(3), B<puts>(3)"
12053 msgstr ""
12054 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12055 "(3), B<puts>(3)"
12056
12057 #. type: TH
12058 #: build/C/man3/stdin.3:13
12059 #, no-wrap
12060 msgid "STDIN"
12061 msgstr "STDIN"
12062
12063 #. type: TH
12064 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
12065 #, no-wrap
12066 msgid "2008-07-14"
12067 msgstr "2008-07-14"
12068
12069 #. type: Plain text
12070 #: build/C/man3/stdin.3:16
12071 msgid "stdin, stdout, stderr - standard I/O streams"
12072 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
12073
12074 #. type: Plain text
12075 #: build/C/man3/stdin.3:23
12076 #, no-wrap
12077 msgid ""
12078 "B<extern FILE *>I<stdin>B<;>\n"
12079 "B<extern FILE *>I<stdout>B<;>\n"
12080 "B<extern FILE *>I<stderr>B<;>\n"
12081 msgstr ""
12082 "B<extern FILE *>I<stdin>B<;>\n"
12083 "B<extern FILE *>I<stdout>B<;>\n"
12084 "B<extern FILE *>I<stderr>B<;>\n"
12085
12086 #. type: Plain text
12087 #: build/C/man3/stdin.3:35
12088 msgid ""
12089 "Under normal circumstances every UNIX program has three streams opened for "
12090 "it when it starts up, one for input, one for output, and one for printing "
12091 "diagnostic or error messages.  These are typically attached to the user's "
12092 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
12093 "depending on what the parent process chose to set up.  (See also the "
12094 "\"Redirection\" section of B<sh>(1).)"
12095 msgstr ""
12096 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
12097 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
12098 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
12099 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
12100 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
12101
12102 #. type: Plain text
12103 #: build/C/man3/stdin.3:45
12104 msgid ""
12105 "The input stream is referred to as \"standard input\"; the output stream is "
12106 "referred to as \"standard output\"; and the error stream is referred to as "
12107 "\"standard error\".  These terms are abbreviated to form the symbols used to "
12108 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
12109 msgstr ""
12110 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
12111 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
12112 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
12113 "I<stdout>, I<stderr> である。"
12114
12115 #. type: Plain text
12116 #: build/C/man3/stdin.3:54
12117 msgid ""
12118 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
12119 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
12120 msgstr ""
12121 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
12122 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
12123
12124 #. type: Plain text
12125 #: build/C/man3/stdin.3:63
12126 msgid ""
12127 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
12128 "same underlying files may also be accessed using the raw UNIX file "
12129 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
12130 msgstr ""
12131 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
12132 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
12133 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
12134 "る。"
12135
12136 #. type: Plain text
12137 #: build/C/man3/stdin.3:82
12138 msgid ""
12139 "On program startup, the integer file descriptors associated with the streams "
12140 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
12141 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
12142 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
12143 "(3)  to one of these streams can change the file descriptor number "
12144 "associated with the stream.)"
12145 msgstr ""
12146 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
12147 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
12148 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
12149 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
12150 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
12151 "たファイルディスクリプタ の番号を変更することができる。)"
12152
12153 #. type: Plain text
12154 #: build/C/man3/stdin.3:95
12155 msgid ""
12156 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
12157 "unexpected results and should generally be avoided.  (For the masochistic "
12158 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
12159 "is supposed to work.)  A general rule is that file descriptors are handled "
12160 "in the kernel, while stdio is just a library.  This means for example, that "
12161 "after an B<exec>(3), the child inherits all open file descriptors, but all "
12162 "old streams have become inaccessible."
12163 msgstr ""
12164 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
12165 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
12166 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
12167 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
12168 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
12169 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
12170 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
12171
12172 #. type: Plain text
12173 #: build/C/man3/stdin.3:113
12174 msgid ""
12175 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
12176 "macros, assigning to them is nonportable.  The standard streams can be made "
12177 "to refer to different files with help of the library function B<freopen>(3), "
12178 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
12179 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
12180 "by normal program termination."
12181 msgstr ""
12182 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
12183 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
12184 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
12185 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
12186 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
12187 "グラムの正常終了によってクローズされる。"
12188
12189 #. type: Plain text
12190 #: build/C/man3/stdin.3:122
12191 msgid ""
12192 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
12193 "standard also stipulates that these three streams shall be open at program "
12194 "startup."
12195 msgstr ""
12196 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
12197 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
12198 "とが規定されている。"
12199
12200 #. type: Plain text
12201 #: build/C/man3/stdin.3:154
12202 msgid ""
12203 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
12204 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
12205 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
12206 "unexpected results, especially with debugging output.  The buffering mode of "
12207 "the standard streams (or any other stream)  can be changed using the "
12208 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
12209 "associated with a terminal, there may also be input buffering in the "
12210 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
12211 "terminal input is line buffered in the kernel.)  This kernel input handling "
12212 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
12213 "B<termios>(3)."
12214 msgstr ""
12215 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
12216 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
12217 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
12218 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
12219 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
12220 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
12221 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
12222 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
12223 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
12224 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
12225 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
12226 "B<termios>(3)  も参照すること。"
12227
12228 #. type: Plain text
12229 #: build/C/man3/stdin.3:160
12230 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12231 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12232
12233 #. type: TH
12234 #: build/C/man3/stdio.3:39
12235 #, no-wrap
12236 msgid "STDIO"
12237 msgstr "STDIO"
12238
12239 #. type: TH
12240 #: build/C/man3/stdio.3:39
12241 #, no-wrap
12242 msgid "2001-12-26"
12243 msgstr "2001-12-26"
12244
12245 #. type: Plain text
12246 #: build/C/man3/stdio.3:42
12247 msgid "stdio - standard input/output library functions"
12248 msgstr "stdio - 標準入出力ライブラリ関数"
12249
12250 #. type: Plain text
12251 #: build/C/man3/stdio.3:46
12252 msgid "B<FILE *>I<stdin>B<;>"
12253 msgstr "B<FILE *>I<stdin>B<;>"
12254
12255 #. type: Plain text
12256 #: build/C/man3/stdio.3:48
12257 msgid "B<FILE *>I<stdout>B<;>"
12258 msgstr "B<FILE *>I<stdout>B<;>"
12259
12260 #. type: Plain text
12261 #: build/C/man3/stdio.3:50
12262 msgid "B<FILE *>I<stderr>B<;>"
12263 msgstr "B<FILE *>I<stderr>B<;>"
12264
12265 #. type: Plain text
12266 #: build/C/man3/stdio.3:57
12267 msgid ""
12268 "The standard I/O library provides a simple and efficient buffered stream I/O "
12269 "interface.  Input and output is mapped into logical data streams and the "
12270 "physical I/O characteristics are concealed.  The functions and macros are "
12271 "listed below; more information is available from the individual man pages."
12272 msgstr ""
12273 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
12274 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
12275 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12276 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12277
12278 #. type: Plain text
12279 #: build/C/man3/stdio.3:80
12280 msgid ""
12281 "A stream is associated with an external file (which may be a physical "
12282 "device) by I<opening> a file, which may involve creating a new file.  "
12283 "Creating an existing file causes its former contents to be discarded.  If a "
12284 "file can support positioning requests (such as a disk file, as opposed to a "
12285 "terminal) then a I<file position indicator> associated with the stream is "
12286 "positioned at the start of the file (byte zero), unless the file is opened "
12287 "with append mode.  If append mode is used, it is unspecified whether the "
12288 "position indicator will be placed at the start or the end of the file.  The "
12289 "position indicator is maintained by subsequent reads, writes and positioning "
12290 "requests.  All input occurs as if the characters were read by successive "
12291 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12292 "characters were written by successive calls to the B<fputc>(3)  function."
12293 msgstr ""
12294 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12295 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12296 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12297 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12298 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12299 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12300 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12301 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12302 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12303 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12304 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12305 "字を書き込んだかのように行われる。"
12306
12307 #. type: Plain text
12308 #: build/C/man3/stdio.3:90
12309 msgid ""
12310 "A file is disassociated from a stream by I<closing> the file.  Output "
12311 "streams are flushed (any unwritten buffer contents are transferred to the "
12312 "host environment) before the stream is disassociated from the file.  The "
12313 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12314 "closed (garbage)."
12315 msgstr ""
12316 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12317 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12318 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12319 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12320 "確定になる (ゴミになってしまう)。"
12321
12322 #. type: Plain text
12323 #: build/C/man3/stdio.3:103
12324 msgid ""
12325 "A file may be subsequently reopened, by the same or another program "
12326 "execution, and its contents reclaimed or modified (if it can be repositioned "
12327 "at the start).  If the main function returns to its original caller, or the "
12328 "B<exit>(3)  function is called, all open files are closed (hence all output "
12329 "streams are flushed) before program termination.  Other methods of program "
12330 "termination, such as B<abort>(3)  do not bother about closing files properly."
12331 msgstr ""
12332 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12333 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12334 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12335 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12336 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12337 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12338 "保証はない。"
12339
12340 #. type: Plain text
12341 #: build/C/man3/stdio.3:119
12342 msgid ""
12343 "At program startup, three text streams are predefined and need not be opened "
12344 "explicitly: I<standard input> (for reading conventional input), I<standard "
12345 "output> (for writing conventional input), and I<standard error> (for writing "
12346 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12347 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12348 "the standard input and output streams are fully buffered if and only if the "
12349 "streams do not refer to an interactive device."
12350 msgstr ""
12351 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12352 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12353 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12354 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12355 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12356 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12357 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12358 "スを参照していなければ、 完全にバッファリングされている。"
12359
12360 #. type: Plain text
12361 #: build/C/man3/stdio.3:129
12362 msgid ""
12363 "Output streams that refer to terminal devices are always line buffered by "
12364 "default; pending output to such streams is written automatically whenever an "
12365 "input stream that refers to a terminal device is read.  In cases where a "
12366 "large amount of computation is done after printing part of a line on an "
12367 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12368 "going off and computing so that the output will appear."
12369 msgstr ""
12370 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12371 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12372 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12373 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12374 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12375 "必要がある。"
12376
12377 #. type: Plain text
12378 #: build/C/man3/stdio.3:143
12379 msgid ""
12380 "The I<stdio> library is a part of the library B<libc> and routines are "
12381 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12382 "SYNOPSIS sections of the following manual pages indicate which include files "
12383 "are to be used, what the compiler declaration for the function looks like "
12384 "and which external variables are of interest."
12385 msgstr ""
12386 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12387 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12388 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12389 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12390 "数が関係するのかが示されている。"
12391
12392 #.  Not on Linux: .BR fropen ,
12393 #.  Not on Linux: .BR fwopen ,
12394 #. type: Plain text
12395 #: build/C/man3/stdio.3:183
12396 msgid ""
12397 "The following are defined as macros; these names may not be reused without "
12398 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12399 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12400 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12401 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12402 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12403 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12404 "and B<putchar> exist and will be used if the macros definitions are "
12405 "explicitly removed."
12406 msgstr ""
12407 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12408 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12409 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12410 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12411 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12412 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12413 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12414 "示的に消去されている場合には、 これらを使用することになるだろう。"
12415
12416 #. type: SS
12417 #: build/C/man3/stdio.3:183
12418 #, no-wrap
12419 msgid "List of functions"
12420 msgstr "関数のリスト"
12421
12422 #. type: tbl table
12423 #: build/C/man3/stdio.3:188
12424 #, no-wrap
12425 msgid "Function\tDescription\n"
12426 msgstr "関数\t説明\n"
12427
12428 #. type: tbl table
12429 #: build/C/man3/stdio.3:189
12430 #, no-wrap
12431 msgid "_\n"
12432 msgstr "_\n"
12433
12434 #. type: tbl table
12435 #: build/C/man3/stdio.3:190
12436 #, no-wrap
12437 msgid "clearerr\tcheck and reset stream status\n"
12438 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12439
12440 #. type: tbl table
12441 #: build/C/man3/stdio.3:191
12442 #, no-wrap
12443 msgid "fclose\tclose a stream\n"
12444 msgstr "fclose\tストリームをクローズする\n"
12445
12446 #. type: tbl table
12447 #: build/C/man3/stdio.3:192
12448 #, no-wrap
12449 msgid "fdopen\tstream open functions\n"
12450 msgstr "fdopen\tストリームをオープンする\n"
12451
12452 #. type: tbl table
12453 #: build/C/man3/stdio.3:193
12454 #, no-wrap
12455 msgid "feof\tcheck and reset stream status\n"
12456 msgstr "feof\tストリームの状態の確認とリセット\n"
12457
12458 #. type: tbl table
12459 #: build/C/man3/stdio.3:194
12460 #, no-wrap
12461 msgid "ferror\tcheck and reset stream status\n"
12462 msgstr "ferror\tストリームの状態の確認とリセット\n"
12463
12464 #. type: tbl table
12465 #: build/C/man3/stdio.3:195
12466 #, no-wrap
12467 msgid "fflush\tflush a stream\n"
12468 msgstr "fflush\tストリームをフラッシュする\n"
12469
12470 #. type: tbl table
12471 #: build/C/man3/stdio.3:196
12472 #, no-wrap
12473 msgid "fgetc\tget next character or word from input stream\n"
12474 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12475
12476 #. type: tbl table
12477 #: build/C/man3/stdio.3:197
12478 #, no-wrap
12479 msgid "fgetpos\treposition a stream\n"
12480 msgstr "fgetpos\tストリームの位置を取得する\n"
12481
12482 #. type: tbl table
12483 #: build/C/man3/stdio.3:198
12484 #, no-wrap
12485 msgid "fgets\tget a line from a stream\n"
12486 msgstr "fgets\tストリームから行を取得する\n"
12487
12488 #. type: tbl table
12489 #: build/C/man3/stdio.3:199
12490 #, no-wrap
12491 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12492 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12493
12494 #. type: tbl table
12495 #: build/C/man3/stdio.3:200
12496 #, no-wrap
12497 msgid "fopen\tstream open functions\n"
12498 msgstr "fopen\tストリームをオープンする\n"
12499
12500 #. type: tbl table
12501 #: build/C/man3/stdio.3:201
12502 #, no-wrap
12503 msgid "fprintf\tformatted output conversion\n"
12504 msgstr "fprintf\t書式付き出力変換\n"
12505
12506 #. type: tbl table
12507 #: build/C/man3/stdio.3:202
12508 #, no-wrap
12509 msgid "fpurge\tflush a stream\n"
12510 msgstr "fpurge\tストリームをフラッシュする\n"
12511
12512 #. type: tbl table
12513 #: build/C/man3/stdio.3:203
12514 #, no-wrap
12515 msgid "fputc\toutput a character or word to a stream\n"
12516 msgstr "fputc\t文字または語をストリームに出力する\n"
12517
12518 #. type: tbl table
12519 #: build/C/man3/stdio.3:204
12520 #, no-wrap
12521 msgid "fputs\toutput a line to a stream\n"
12522 msgstr "fputs\t行をストリームに出力する\n"
12523
12524 #. type: tbl table
12525 #: build/C/man3/stdio.3:205
12526 #, no-wrap
12527 msgid "fread\tbinary stream input/output\n"
12528 msgstr "fread\tバイナリーストリーム入出力\n"
12529
12530 #. type: tbl table
12531 #: build/C/man3/stdio.3:206
12532 #, no-wrap
12533 msgid "freopen\tstream open functions\n"
12534 msgstr "freopen\tストリームをオープンする\n"
12535
12536 #. type: tbl table
12537 #: build/C/man3/stdio.3:207
12538 #, no-wrap
12539 msgid "fscanf\tinput format conversion\n"
12540 msgstr "fscanf\t書式付き入力変換\n"
12541
12542 #. type: tbl table
12543 #: build/C/man3/stdio.3:208
12544 #, no-wrap
12545 msgid "fseek\treposition a stream\n"
12546 msgstr "fseek\tストリームの位置指示子を移動する\n"
12547
12548 #. type: tbl table
12549 #: build/C/man3/stdio.3:209
12550 #, no-wrap
12551 msgid "fsetpos\treposition a stream\n"
12552 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12553
12554 #. type: tbl table
12555 #: build/C/man3/stdio.3:210
12556 #, no-wrap
12557 msgid "ftell\treposition a stream\n"
12558 msgstr "ftell\tストリームの位置を取得する\n"
12559
12560 #. type: tbl table
12561 #: build/C/man3/stdio.3:211
12562 #, no-wrap
12563 msgid "fwrite\tbinary stream input/output\n"
12564 msgstr "fwrite\tバイナリーストリーム入出力\n"
12565
12566 #. type: tbl table
12567 #: build/C/man3/stdio.3:212
12568 #, no-wrap
12569 msgid "getc\tget next character or word from input stream\n"
12570 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12571
12572 #. type: tbl table
12573 #: build/C/man3/stdio.3:213
12574 #, no-wrap
12575 msgid "getchar\tget next character or word from input stream\n"
12576 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12577
12578 #. type: tbl table
12579 #: build/C/man3/stdio.3:214
12580 #, no-wrap
12581 msgid "gets\tget a line from a stream\n"
12582 msgstr "gets\t行を入力ストリームから取得する\n"
12583
12584 #. type: tbl table
12585 #: build/C/man3/stdio.3:215
12586 #, no-wrap
12587 msgid "getw\tget next character or word from input stream\n"
12588 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12589
12590 #. type: tbl table
12591 #: build/C/man3/stdio.3:216
12592 #, no-wrap
12593 msgid "mktemp\tmake temporary filename (unique)\n"
12594 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12595
12596 #. type: tbl table
12597 #: build/C/man3/stdio.3:217
12598 #, no-wrap
12599 msgid "perror\tsystem error messages\n"
12600 msgstr "perror\tシステムエラーメッセージ\n"
12601
12602 #. type: tbl table
12603 #: build/C/man3/stdio.3:218
12604 #, no-wrap
12605 msgid "printf\tformatted output conversion\n"
12606 msgstr "printf\t書式付き出力変換\n"
12607
12608 #. type: tbl table
12609 #: build/C/man3/stdio.3:219
12610 #, no-wrap
12611 msgid "putc\toutput a character or word to a stream\n"
12612 msgstr "putc\t文字または語をストリームに出力する\n"
12613
12614 #. type: tbl table
12615 #: build/C/man3/stdio.3:220
12616 #, no-wrap
12617 msgid "putchar\toutput a character or word to a stream\n"
12618 msgstr "putchar\t文字または語をストリームに出力する\n"
12619
12620 #. type: tbl table
12621 #: build/C/man3/stdio.3:221
12622 #, no-wrap
12623 msgid "puts\toutput a line to a stream\n"
12624 msgstr "puts\t行をストリームに出力する\n"
12625
12626 #. type: tbl table
12627 #: build/C/man3/stdio.3:222
12628 #, no-wrap
12629 msgid "putw\toutput a character or word to a stream\n"
12630 msgstr "putw\t文字または語をストリームに出力する\n"
12631
12632 #. type: tbl table
12633 #: build/C/man3/stdio.3:223
12634 #, no-wrap
12635 msgid "remove\tremove directory entry\n"
12636 msgstr "remove\tディレクトリエントリを削除する\n"
12637
12638 #. type: tbl table
12639 #: build/C/man3/stdio.3:224
12640 #, no-wrap
12641 msgid "rewind\treposition a stream\n"
12642 msgstr "rewind\tストリームの位置指示子を移動する\n"
12643
12644 #. type: tbl table
12645 #: build/C/man3/stdio.3:225
12646 #, no-wrap
12647 msgid "scanf\tinput format conversion\n"
12648 msgstr "scanf\t書式付き入力変換\n"
12649
12650 #. type: tbl table
12651 #: build/C/man3/stdio.3:226
12652 #, no-wrap
12653 msgid "setbuf\tstream buffering operations\n"
12654 msgstr "setbuf\tストリームのバッファリングの操作\n"
12655
12656 #. type: tbl table
12657 #: build/C/man3/stdio.3:227
12658 #, no-wrap
12659 msgid "setbuffer\tstream buffering operations\n"
12660 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12661
12662 #. type: tbl table
12663 #: build/C/man3/stdio.3:228
12664 #, no-wrap
12665 msgid "setlinebuf\tstream buffering operations\n"
12666 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12667
12668 #. type: tbl table
12669 #: build/C/man3/stdio.3:229
12670 #, no-wrap
12671 msgid "setvbuf\tstream buffering operations\n"
12672 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12673
12674 #. type: tbl table
12675 #: build/C/man3/stdio.3:230
12676 #, no-wrap
12677 msgid "sprintf\tformatted output conversion\n"
12678 msgstr "sprintf\t書式付き出力変換\n"
12679
12680 #. type: tbl table
12681 #: build/C/man3/stdio.3:231
12682 #, no-wrap
12683 msgid "sscanf\tinput format conversion\n"
12684 msgstr "sscanf\t書式付き入力変換\n"
12685
12686 #. type: tbl table
12687 #: build/C/man3/stdio.3:232
12688 #, no-wrap
12689 msgid "strerror\tsystem error messages\n"
12690 msgstr "strerror\tシステムエラーメッセージ\n"
12691
12692 #. type: tbl table
12693 #: build/C/man3/stdio.3:233
12694 #, no-wrap
12695 msgid "sys_errlist\tsystem error messages\n"
12696 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12697
12698 #. type: tbl table
12699 #: build/C/man3/stdio.3:234
12700 #, no-wrap
12701 msgid "sys_nerr\tsystem error messages\n"
12702 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12703
12704 #. type: tbl table
12705 #: build/C/man3/stdio.3:235
12706 #, no-wrap
12707 msgid "tempnam\ttemporary file routines\n"
12708 msgstr "tempnam\tテンポラリファイルの操作\n"
12709
12710 #. type: tbl table
12711 #: build/C/man3/stdio.3:236
12712 #, no-wrap
12713 msgid "tmpfile\ttemporary file routines\n"
12714 msgstr "tmpfile\tテンポラリファイルの操作\n"
12715
12716 #. type: tbl table
12717 #: build/C/man3/stdio.3:237
12718 #, no-wrap
12719 msgid "tmpnam\ttemporary file routines\n"
12720 msgstr "tmpnam\tテンポラリファイルの操作\n"
12721
12722 #. type: tbl table
12723 #: build/C/man3/stdio.3:238
12724 #, no-wrap
12725 msgid "ungetc\tun-get character from input stream\n"
12726 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12727
12728 #. type: tbl table
12729 #: build/C/man3/stdio.3:239
12730 #, no-wrap
12731 msgid "vfprintf\tformatted output conversion\n"
12732 msgstr "vfprintf\t書式付き出力変換\n"
12733
12734 #. type: tbl table
12735 #: build/C/man3/stdio.3:240
12736 #, no-wrap
12737 msgid "vfscanf\tinput format conversion\n"
12738 msgstr "vfscanf\t書式付き入力変換\n"
12739
12740 #. type: tbl table
12741 #: build/C/man3/stdio.3:241
12742 #, no-wrap
12743 msgid "vprintf\tformatted output conversion\n"
12744 msgstr "vprintf\t書式付き出力変換\n"
12745
12746 #. type: tbl table
12747 #: build/C/man3/stdio.3:242
12748 #, no-wrap
12749 msgid "vscanf\tinput format conversion\n"
12750 msgstr "vscanf\t書式付き入力変換\n"
12751
12752 #. type: tbl table
12753 #: build/C/man3/stdio.3:243
12754 #, no-wrap
12755 msgid "vsprintf\tformatted output conversion\n"
12756 msgstr "vsprintf\t書式付き出力変換\n"
12757
12758 #. type: tbl table
12759 #: build/C/man3/stdio.3:244
12760 #, no-wrap
12761 msgid "vsscanf\tinput format conversion\n"
12762 msgstr "vsscanf\t書式付き入力変換\n"
12763
12764 #. type: Plain text
12765 #: build/C/man3/stdio.3:250
12766 msgid "The I<stdio> library conforms to C89."
12767 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12768
12769 #. type: Plain text
12770 #: build/C/man3/stdio.3:257
12771 msgid ""
12772 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12773 "B<unlocked_stdio>(3)"
12774 msgstr ""
12775 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12776 "B<unlocked_stdio>(3)"
12777
12778 #. type: TH
12779 #: build/C/man3/stdio_ext.3:25
12780 #, no-wrap
12781 msgid "STDIO_EXT"
12782 msgstr "STDIO_EXT"
12783
12784 #. type: Plain text
12785 #: build/C/man3/stdio_ext.3:30
12786 msgid ""
12787 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12788 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12789 "structure"
12790 msgstr ""
12791 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12792 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12793 "へのインタフェース"
12794
12795 #. type: Plain text
12796 #: build/C/man3/stdio_ext.3:34
12797 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12798 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12799
12800 #. type: Plain text
12801 #: build/C/man3/stdio_ext.3:36
12802 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12803 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12804
12805 #. type: Plain text
12806 #: build/C/man3/stdio_ext.3:38
12807 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12808 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12809
12810 #. type: Plain text
12811 #: build/C/man3/stdio_ext.3:40
12812 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12813 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12814
12815 #. type: Plain text
12816 #: build/C/man3/stdio_ext.3:42
12817 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12818 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12819
12820 #. type: Plain text
12821 #: build/C/man3/stdio_ext.3:44
12822 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12823 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12824
12825 #. type: Plain text
12826 #: build/C/man3/stdio_ext.3:46
12827 msgid "B<int __freading(FILE *>I<stream>B<);>"
12828 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12829
12830 #. type: Plain text
12831 #: build/C/man3/stdio_ext.3:48
12832 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12833 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12834
12835 #. type: Plain text
12836 #: build/C/man3/stdio_ext.3:50
12837 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12838 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12839
12840 #. type: Plain text
12841 #: build/C/man3/stdio_ext.3:52
12842 msgid "B<void _flushlbf(void);>"
12843 msgstr "B<void _flushlbf(void);>"
12844
12845 #. type: Plain text
12846 #: build/C/man3/stdio_ext.3:54
12847 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12848 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12849
12850 #. type: Plain text
12851 #: build/C/man3/stdio_ext.3:59
12852 msgid ""
12853 "Solaris introduced routines to allow portable access to the internals of the "
12854 "I<FILE> structure, and glibc also implemented these."
12855 msgstr ""
12856 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
12857 "が導入されており、これらは glibc でも実装されている。"
12858
12859 #. type: Plain text
12860 #: build/C/man3/stdio_ext.3:64
12861 msgid ""
12862 "The B<__fbufsize>()  function returns the size of the buffer currently used "
12863 "by the given stream."
12864 msgstr ""
12865 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
12866 "す。"
12867
12868 #. type: Plain text
12869 #: build/C/man3/stdio_ext.3:71
12870 msgid ""
12871 "The B<__fpending>()  function returns the number of bytes in the output "
12872 "buffer.  For wide-oriented streams the unit is wide characters.  This "
12873 "function is undefined on buffers in reading mode, or opened read-only."
12874 msgstr ""
12875 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
12876 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
12877 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
12878 "は未定義である。"
12879
12880 #. type: Plain text
12881 #: build/C/man3/stdio_ext.3:76
12882 msgid ""
12883 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
12884 "buffered, and zero otherwise."
12885 msgstr ""
12886 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
12887 "場合は 0 を返す。"
12888
12889 #. type: Plain text
12890 #: build/C/man3/stdio_ext.3:81
12891 msgid ""
12892 "The B<__freadable>()  function returns a nonzero value if the stream allows "
12893 "reading, and zero otherwise."
12894 msgstr ""
12895 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
12896 "外の場合は 0 を返す。"
12897
12898 #. type: Plain text
12899 #: build/C/man3/stdio_ext.3:86
12900 msgid ""
12901 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
12902 "writing, and zero otherwise."
12903 msgstr ""
12904 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
12905 "外の場合は 0 を返す。"
12906
12907 #. type: Plain text
12908 #: build/C/man3/stdio_ext.3:92
12909 msgid ""
12910 "The B<__freading>()  function returns a nonzero value if the stream is read-"
12911 "only, or if the last operation on the stream was a read operation, and zero "
12912 "otherwise."
12913 msgstr ""
12914 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
12915 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
12916 "を返す。"
12917
12918 #. type: Plain text
12919 #: build/C/man3/stdio_ext.3:98
12920 msgid ""
12921 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
12922 "only (or append-only), or if the last operation on the stream was a write "
12923 "operation, and zero otherwise."
12924 msgstr ""
12925 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
12926 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
12927 "し、 それ以外の場合は 0 を返す。"
12928
12929 #. type: Plain text
12930 #: build/C/man3/stdio_ext.3:106
12931 msgid ""
12932 "The B<__fsetlocking>()  function can be used to select the desired type of "
12933 "locking on the stream.  It returns the current type.  The I<type> argument "
12934 "can take the following three values:"
12935 msgstr ""
12936 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
12937 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
12938 "ることができる :"
12939
12940 #. type: TP
12941 #: build/C/man3/stdio_ext.3:106
12942 #, no-wrap
12943 msgid "B<FSETLOCKING_INTERNAL>"
12944 msgstr "B<FSETLOCKING_INTERNAL>"
12945
12946 #. type: Plain text
12947 #: build/C/man3/stdio_ext.3:111
12948 msgid ""
12949 "Perform implicit locking around every operation on the given stream (except "
12950 "for the *_unlocked ones).  This is the default."
12951 msgstr ""
12952 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
12953 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
12954 "である)。 これがデフォルトのロック形式である。"
12955
12956 #. type: TP
12957 #: build/C/man3/stdio_ext.3:111
12958 #, no-wrap
12959 msgid "B<FSETLOCKING_BYCALLER>"
12960 msgstr "B<FSETLOCKING_BYCALLER>"
12961
12962 #. type: Plain text
12963 #: build/C/man3/stdio_ext.3:118
12964 msgid ""
12965 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
12966 "case there is more than one thread), and the stdio routines will not do "
12967 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
12968 msgstr ""
12969 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
12970 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
12971 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
12972 "理を行わない。"
12973
12974 #. type: TP
12975 #: build/C/man3/stdio_ext.3:118
12976 #, no-wrap
12977 msgid "B<FSETLOCKING_QUERY>"
12978 msgstr "B<FSETLOCKING_QUERY>"
12979
12980 #. type: Plain text
12981 #: build/C/man3/stdio_ext.3:122
12982 msgid "Don't change the type of locking.  (Only return it.)"
12983 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
12984
12985 #. type: Plain text
12986 #: build/C/man3/stdio_ext.3:128
12987 msgid ""
12988 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
12989 "so that output to a terminal is forced out, say before reading keyboard "
12990 "input.)"
12991 msgstr ""
12992 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
12993 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
12994 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
12995 "いだろう)"
12996
12997 #. type: Plain text
12998 #: build/C/man3/stdio_ext.3:132
12999 msgid ""
13000 "The B<__fpurge>()  function discards the contents of the stream's buffer."
13001 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
13002
13003 #. type: Plain text
13004 #: build/C/man3/stdio_ext.3:141
13005 msgid ""
13006 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
13007 "functions do not lock the stream, so they are not thread-safe."
13008 msgstr ""
13009
13010 #. type: Plain text
13011 #: build/C/man3/stdio_ext.3:151
13012 msgid ""
13013 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13014 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
13015 msgstr ""
13016
13017 #. type: Plain text
13018 #: build/C/man3/stdio_ext.3:154
13019 msgid "B<flockfile>(3), B<fpurge>(3)"
13020 msgstr "B<flockfile>(3), B<fpurge>(3)"
13021
13022 #. type: TH
13023 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
13024 #, no-wrap
13025 msgid "SYMLINK"
13026 msgstr "SYMLINK"
13027
13028 #. type: Plain text
13029 #: build/C/man2/symlink.2:35
13030 msgid "symlink - make a new name for a file"
13031 msgstr "symlink - ファイルに新しい名前を付ける"
13032
13033 #. type: Plain text
13034 #: build/C/man2/symlink.2:39
13035 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13036 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13037
13038 #. type: Plain text
13039 #: build/C/man2/symlink.2:47
13040 msgid "B<symlink>():"
13041 msgstr "B<symlink>():"
13042
13043 #. type: Plain text
13044 #: build/C/man2/symlink.2:58
13045 msgid ""
13046 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
13047 "string I<oldpath>."
13048 msgstr ""
13049 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
13050 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
13051
13052 #. type: Plain text
13053 #: build/C/man2/symlink.2:62
13054 msgid ""
13055 "Symbolic links are interpreted at run time as if the contents of the link "
13056 "had been substituted into the path being followed to find a file or "
13057 "directory."
13058 msgstr ""
13059 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
13060 "スを辿ることで、 ファイルやディレクトリに到達する。"
13061
13062 #. type: Plain text
13063 #: build/C/man2/symlink.2:67
13064 msgid ""
13065 "Symbolic links may contain I<..> path components, which (if used at the "
13066 "start of the link) refer to the parent directories of that in which the link "
13067 "resides."
13068 msgstr ""
13069 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
13070 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
13071 "される。"
13072
13073 #. type: Plain text
13074 #: build/C/man2/symlink.2:71
13075 msgid ""
13076 "A symbolic link (also known as a soft link) may point to an existing file or "
13077 "to a nonexistent one; the latter case is known as a dangling link."
13078 msgstr ""
13079 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
13080 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
13081 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
13082
13083 #. type: Plain text
13084 #: build/C/man2/symlink.2:78
13085 msgid ""
13086 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
13087 "when following the link, but is checked when removal or renaming of the link "
13088 "is requested and the link is in a directory with the sticky bit "
13089 "(B<S_ISVTX>)  set."
13090 msgstr ""
13091 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
13092 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
13093 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
13094 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
13095
13096 #. type: Plain text
13097 #: build/C/man2/symlink.2:99
13098 msgid ""
13099 "Write access to the directory containing I<newpath> is denied, or one of the "
13100 "directories in the path prefix of I<newpath> did not allow search "
13101 "permission.  (See also B<path_resolution>(7).)"
13102 msgstr ""
13103 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
13104 "含まれているディレクトリのどれかに検索許可が与えられていない "
13105 "(B<path_resolution>(7)  も参照すること)。"
13106
13107 #. type: Plain text
13108 #: build/C/man2/symlink.2:104
13109 msgid ""
13110 "The user's quota of resources on the file system has been exhausted.  The "
13111 "resources could be inodes or disk blocks, depending on the file system "
13112 "implementation."
13113 msgstr ""
13114 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
13115 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
13116 "依存である。"
13117
13118 #. type: Plain text
13119 #: build/C/man2/symlink.2:118
13120 msgid "Too many symbolic links were encountered in resolving I<newpath>."
13121 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13122
13123 #. type: Plain text
13124 #: build/C/man2/symlink.2:128
13125 msgid ""
13126 "A directory component in I<newpath> does not exist or is a dangling symbolic "
13127 "link, or I<oldpath> is the empty string."
13128 msgstr ""
13129 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
13130 "I<oldpath> が空文字列である。"
13131
13132 #. type: Plain text
13133 #: build/C/man2/symlink.2:140
13134 msgid ""
13135 "A component used as a directory in I<newpath> is not, in fact, a directory."
13136 msgstr ""
13137 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
13138
13139 #. type: Plain text
13140 #: build/C/man2/symlink.2:145
13141 msgid ""
13142 "The file system containing I<newpath> does not support the creation of "
13143 "symbolic links."
13144 msgstr ""
13145 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
13146 "作成をサポートしていない。"
13147
13148 #. type: Plain text
13149 #: build/C/man2/symlink.2:149
13150 msgid "I<newpath> is on a read-only file system."
13151 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
13152
13153 #. type: Plain text
13154 #: build/C/man2/symlink.2:159
13155 msgid "No checking of I<oldpath> is done."
13156 msgstr "I<oldpath> についてのチェックは行なわれない。"
13157
13158 #. type: Plain text
13159 #: build/C/man2/symlink.2:164
13160 msgid ""
13161 "Deleting the name referred to by a symlink will actually delete the file "
13162 "(unless it also has other hard links).  If this behavior is not desired, use "
13163 "B<link>(2)."
13164 msgstr ""
13165 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
13166 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
13167 "場合は、 B<link>(2)  を使用すること。"
13168
13169 #. type: Plain text
13170 #: build/C/man2/symlink.2:176
13171 msgid ""
13172 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13173 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13174 "B<symlink>(7)"
13175 msgstr ""
13176 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13177 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13178 "B<symlink>(7)"
13179
13180 #. type: TH
13181 #: build/C/man7/symlink.7:36
13182 #, no-wrap
13183 msgid "2008-06-18"
13184 msgstr "2008-06-18"
13185
13186 #. type: Plain text
13187 #: build/C/man7/symlink.7:39
13188 msgid "symlink - symbolic link handling"
13189 msgstr ""
13190
13191 #. type: SH
13192 #: build/C/man7/symlink.7:39
13193 #, no-wrap
13194 msgid "SYMBOLIC LINK HANDLING"
13195 msgstr ""
13196
13197 #. type: Plain text
13198 #: build/C/man7/symlink.7:43
13199 msgid ""
13200 "Symbolic links are files that act as pointers to other files.  To understand "
13201 "their behavior, you must first understand how hard links work."
13202 msgstr ""
13203
13204 #. type: Plain text
13205 #: build/C/man7/symlink.7:59
13206 msgid ""
13207 "A hard link to a file is indistinguishable from the original file because it "
13208 "is a reference to the object underlying the original filename.  (To be "
13209 "precise: each of the hard links to a file is a reference to the same I<i-"
13210 "node number>, where an i-node number is an index into the i-node table, "
13211 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
13212 "Changes to a file are independent of the name used to reference the file.  "
13213 "Hard links may not refer to directories (to prevent the possibility of loops "
13214 "within the file system tree, which would confuse many programs)  and may not "
13215 "refer to files on different file systems (because i-node numbers are not "
13216 "unique across file systems)."
13217 msgstr ""
13218
13219 #. type: Plain text
13220 #: build/C/man7/symlink.7:66
13221 msgid ""
13222 "A symbolic link is a special type of file whose contents are a string that "
13223 "is the pathname another file, the file to which the link refers.  In other "
13224 "words, a symbolic link is a pointer to another name, and not to an "
13225 "underlying object.  For this reason, symbolic links may refer to directories "
13226 "and may cross file system boundaries."
13227 msgstr ""
13228
13229 #. type: Plain text
13230 #: build/C/man7/symlink.7:72
13231 msgid ""
13232 "There is no requirement that the pathname referred to by a symbolic link "
13233 "should exist.  A symbolic link that refers to a pathname that does not exist "
13234 "is said to be a I<dangling link>."
13235 msgstr ""
13236
13237 #. type: Plain text
13238 #: build/C/man7/symlink.7:84
13239 msgid ""
13240 "Because a symbolic link and its referenced object coexist in the file system "
13241 "name space, confusion can arise in distinguishing between the link itself "
13242 "and the referenced object.  On historical systems, commands and system calls "
13243 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
13244 "Rules for a more uniform approach, as they are implemented on Linux and "
13245 "other systems, are outlined here.  It is important that site-local "
13246 "applications also conform to these rules, so that the user interface can be "
13247 "as consistent as possible."
13248 msgstr ""
13249
13250 #. type: SS
13251 #: build/C/man7/symlink.7:84
13252 #, no-wrap
13253 msgid "Symbolic link ownership, permissions, and timestamps"
13254 msgstr ""
13255
13256 #. type: Plain text
13257 #: build/C/man7/symlink.7:92
13258 msgid ""
13259 "The owner and group of an existing symbolic link can be changed using "
13260 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
13261 "is when the link is being removed or renamed in a directory that has the "
13262 "sticky bit set (see B<stat>(2))."
13263 msgstr ""
13264
13265 #. type: Plain text
13266 #: build/C/man7/symlink.7:98
13267 msgid ""
13268 "The last access and last modification timestamps of a symbolic link can be "
13269 "changed using B<utimensat>(2)  or B<lutimes>(3)."
13270 msgstr ""
13271
13272 #.  Linux does not currently implement an lchmod(2).
13273 #.  The
13274 #.  4.4BSD
13275 #.  system differs from historical
13276 #.  4BSD
13277 #.  systems in that the system call
13278 #.  .BR chown (2)
13279 #.  has been changed to follow symbolic links.
13280 #.  The
13281 #.  .BR lchown (2)
13282 #.  system call was added later when the limitations of the new
13283 #.  .BR chown (2)
13284 #.  became apparent.
13285 #. type: Plain text
13286 #: build/C/man7/symlink.7:117
13287 msgid ""
13288 "On Linux, the permissions of a symbolic link are not used in any operations; "
13289 "the permissions are always 0777 (read, write, and execute for all user "
13290 "categories), and can't be changed."
13291 msgstr ""
13292
13293 #. type: SS
13294 #: build/C/man7/symlink.7:117
13295 #, no-wrap
13296 msgid "Handling of symbolic links by system calls and commands"
13297 msgstr ""
13298
13299 #. type: Plain text
13300 #: build/C/man7/symlink.7:132
13301 msgid ""
13302 "Symbolic links are handled either by operating on the link itself, or by "
13303 "operating on the object referred to by the link.  In the latter case, an "
13304 "application or system call is said to I<follow> the link.  Symbolic links "
13305 "may refer to other symbolic links, in which case the links are dereferenced "
13306 "until an object that is not a symbolic link is found, a symbolic link that "
13307 "refers to a file which does not exist is found, or a loop is detected.  "
13308 "(Loop detection is done by placing an upper limit on the number of links "
13309 "that may be followed, and an error results if this limit is exceeded.)"
13310 msgstr ""
13311
13312 #. type: Plain text
13313 #: build/C/man7/symlink.7:135
13314 msgid ""
13315 "There are three separate areas that need to be discussed.  They are as "
13316 "follows:"
13317 msgstr ""
13318
13319 #. type: IP
13320 #: build/C/man7/symlink.7:135
13321 #, no-wrap
13322 msgid "1."
13323 msgstr "1."
13324
13325 #. type: Plain text
13326 #: build/C/man7/symlink.7:137
13327 msgid "Symbolic links used as filename arguments for system calls."
13328 msgstr ""
13329
13330 #. type: IP
13331 #: build/C/man7/symlink.7:137
13332 #, no-wrap
13333 msgid "2."
13334 msgstr "2."
13335
13336 #. type: Plain text
13337 #: build/C/man7/symlink.7:140
13338 msgid ""
13339 "Symbolic links specified as command-line arguments to utilities that are not "
13340 "traversing a file tree."
13341 msgstr ""
13342
13343 #. type: IP
13344 #: build/C/man7/symlink.7:140
13345 #, no-wrap
13346 msgid "3."
13347 msgstr "3."
13348
13349 #. type: Plain text
13350 #: build/C/man7/symlink.7:144
13351 msgid ""
13352 "Symbolic links encountered by utilities that are traversing a file tree "
13353 "(either specified on the command line or encountered as part of the file "
13354 "hierarchy walk)."
13355 msgstr ""
13356
13357 #. type: SS
13358 #: build/C/man7/symlink.7:144
13359 #, no-wrap
13360 msgid "System calls"
13361 msgstr ""
13362
13363 #. type: Plain text
13364 #: build/C/man7/symlink.7:147
13365 msgid ""
13366 "The first area is symbolic links used as filename arguments for system calls."
13367 msgstr ""
13368
13369 #. type: Plain text
13370 #: build/C/man7/symlink.7:157
13371 msgid ""
13372 "Except as noted below, all system calls follow symbolic links.  For example, "
13373 "if there were a symbolic link I<slink> which pointed to a file named "
13374 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13375 "descriptor referring to the file I<afile>."
13376 msgstr ""
13377
13378 #.  Maybe one day: .BR fchownat (2)
13379 #. type: Plain text
13380 #: build/C/man7/symlink.7:207
13381 msgid ""
13382 "Various system calls do not follow links, and operate on the symbolic link "
13383 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13384 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13385 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13386 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13387 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13388 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13389 "(2), that library function also does not follow symbolic links.  When "
13390 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13391 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13392 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13393 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13394 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13395 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13396 "to allow either behavior in an implementation."
13397 msgstr ""
13398
13399 #. type: SS
13400 #: build/C/man7/symlink.7:207
13401 #, no-wrap
13402 msgid "Commands not traversing a file tree"
13403 msgstr ""
13404
13405 #. type: Plain text
13406 #: build/C/man7/symlink.7:210
13407 msgid ""
13408 "The second area is symbolic links, specified as command-line filename "
13409 "arguments, to commands which are not traversing a file tree."
13410 msgstr ""
13411
13412 #. type: Plain text
13413 #: build/C/man7/symlink.7:221
13414 msgid ""
13415 "Except as noted below, commands follow symbolic links named as command-line "
13416 "arguments.  For example, if there were a symbolic link I<slink> which "
13417 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13418 "contents of the file I<afile>."
13419 msgstr ""
13420
13421 #. type: Plain text
13422 #: build/C/man7/symlink.7:229
13423 msgid ""
13424 "It is important to realize that this rule includes commands which may "
13425 "optionally traverse file trees, e.g., the command I<chown file> is included "
13426 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13427 "traversal, is not.  (The latter is described in the third area, below.)"
13428 msgstr ""
13429
13430 #. type: Plain text
13431 #: build/C/man7/symlink.7:247
13432 msgid ""
13433 "If it is explicitly intended that the command operate on the symbolic link "
13434 "instead of following the symbolic link, e.g., it is desired that I<chown "
13435 "slink> change the ownership of the file that I<slink> is, whether it is a "
13436 "symbolic link or not, the I<-h> option should be used.  In the above "
13437 "example, I<chown root slink> would change the ownership of the file referred "
13438 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13439 "I<slink> itself."
13440 msgstr ""
13441
13442 #. type: Plain text
13443 #: build/C/man7/symlink.7:249
13444 msgid "There are some exceptions to this rule:"
13445 msgstr ""
13446
13447 #. type: Plain text
13448 #: build/C/man7/symlink.7:259
13449 msgid ""
13450 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13451 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13452 "the symbolic link references a file via a relative path, moving it to "
13453 "another directory may very well cause it to stop working, since the path may "
13454 "no longer be correct.)"
13455 msgstr ""
13456
13457 #. type: Plain text
13458 #: build/C/man7/symlink.7:289
13459 msgid ""
13460 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13461 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13462 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13463 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13464 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13465 "the only command where the I<-H> and I<-L> options affect its behavior even "
13466 "though it is not doing a walk of a file tree.)"
13467 msgstr ""
13468
13469 #. The 4.4BSD system differs from historical 4BSD systems in that the
13470 #. .BR chown (1)
13471 #. and
13472 #. .BR chgrp (1)
13473 #. commands follow symbolic links specified on the command line.
13474 #. type: Plain text
13475 #: build/C/man7/symlink.7:307
13476 msgid ""
13477 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13478 "command does not follow symbolic links named as argument by default.  The "
13479 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13480 "L> option is specified."
13481 msgstr ""
13482
13483 #. type: SS
13484 #: build/C/man7/symlink.7:307
13485 #, no-wrap
13486 msgid "Commands traversing a file tree"
13487 msgstr ""
13488
13489 #. type: Plain text
13490 #: build/C/man7/symlink.7:320
13491 msgid ""
13492 "The following commands either optionally or always traverse file trees: "
13493 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13494 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13495 msgstr ""
13496
13497 #. type: Plain text
13498 #: build/C/man7/symlink.7:324
13499 msgid ""
13500 "It is important to realize that the following rules apply equally to "
13501 "symbolic links encountered during the file tree traversal and symbolic links "
13502 "listed as command-line arguments."
13503 msgstr ""
13504
13505 #. type: Plain text
13506 #: build/C/man7/symlink.7:329
13507 msgid ""
13508 "The I<first rule> applies to symbolic links that reference files other than "
13509 "directories.  Operations that apply to symbolic links are performed on the "
13510 "links themselves, but otherwise the links are ignored."
13511 msgstr ""
13512
13513 #. type: Plain text
13514 #: build/C/man7/symlink.7:341
13515 msgid ""
13516 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13517 "symbolic links encountered in the tree traversal of I<directory>, because "
13518 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13519 "referred to by I<slink>."
13520 msgstr ""
13521
13522 #. type: Plain text
13523 #: build/C/man7/symlink.7:346
13524 msgid ""
13525 "The I<second rule> applies to symbolic links that refer to directories.  "
13526 "Symbolic links that refer to directories are never followed by default.  "
13527 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13528 "\" walk (where symbolic links the refer to directories are followed)."
13529 msgstr ""
13530
13531 #. type: Plain text
13532 #: build/C/man7/symlink.7:349
13533 msgid ""
13534 "Certain conventions are (should be) followed as consistently as possible by "
13535 "commands that perform file tree walks:"
13536 msgstr ""
13537
13538 #. type: Plain text
13539 #: build/C/man7/symlink.7:362
13540 msgid ""
13541 "A command can be made to follow any symbolic links named on the command "
13542 "line, regardless of the type of file they reference, by specifying the I<-H> "
13543 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13544 "name space look like the logical name space.  (Note, for commands that do "
13545 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13546 "R> flag is not also specified.)"
13547 msgstr ""
13548
13549 #. type: Plain text
13550 #: build/C/man7/symlink.7:378
13551 msgid ""
13552 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13553 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13554 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13555 "symbolic links specified on the command line to be dereferenced for the "
13556 "purposes of both the action to be performed and the tree walk, and it is as "
13557 "if the user had specified the name of the file to which the symbolic link "
13558 "pointed."
13559 msgstr ""
13560
13561 #. type: Plain text
13562 #: build/C/man7/symlink.7:392
13563 msgid ""
13564 "A command can be made to follow any symbolic links named on the command "
13565 "line, as well as any symbolic links encountered during the traversal, "
13566 "regardless of the type of file they reference, by specifying the I<-L> (for "
13567 "\"logical\") flag.  This flag is intended to make the entire name space look "
13568 "like the logical name space.  (Note, for commands that do not always do file "
13569 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13570 "also specified.)"
13571 msgstr ""
13572
13573 #. type: Plain text
13574 #: build/C/man7/symlink.7:407
13575 msgid ""
13576 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13577 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13578 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13579 "references.  In addition, if any symbolic links are encountered in any file "
13580 "tree that B<chown> traverses, they will be treated in the same fashion as "
13581 "I<slink>."
13582 msgstr ""
13583
13584 #. type: Plain text
13585 #: build/C/man7/symlink.7:414
13586 msgid ""
13587 "A command can be made to provide the default behavior by specifying the I<-"
13588 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13589 "space look like the physical name space."
13590 msgstr ""
13591
13592 #. type: Plain text
13593 #: build/C/man7/symlink.7:432
13594 msgid ""
13595 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13596 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13597 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13598 "once; the last one specified determines the command's behavior.  This is "
13599 "intended to permit you to alias commands to behave one way or the other, and "
13600 "then override that behavior on the command line."
13601 msgstr ""
13602
13603 #. type: Plain text
13604 #: build/C/man7/symlink.7:438
13605 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13606 msgstr ""
13607
13608 #. type: Plain text
13609 #: build/C/man7/symlink.7:451
13610 msgid ""
13611 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13612 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13613 "command does not support the I<-H>, I<-L>, or I<-P> options."
13614 msgstr ""
13615
13616 #. type: Plain text
13617 #: build/C/man7/symlink.7:471
13618 msgid ""
13619 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13620 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13621 "options, B<ls>(1)  will follow symbolic links specified on the command "
13622 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13623 "regardless of their type, whether specified on the command line or "
13624 "encountered in the tree walk."
13625 msgstr ""
13626
13627 #. type: Plain text
13628 #: build/C/man7/symlink.7:489
13629 msgid ""
13630 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13631 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13632 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13633 "B<path_resolution>(7)"
13634 msgstr ""
13635 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13636 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13637 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13638 "B<lutimes>(3), B<path_resolution>(7)"
13639
13640 #. type: TH
13641 #: build/C/man3/tempnam.3:25
13642 #, no-wrap
13643 msgid "TEMPNAM"
13644 msgstr "TEMPNAM"
13645
13646 #. type: Plain text
13647 #: build/C/man3/tempnam.3:28
13648 msgid "tempnam - create a name for a temporary file"
13649 msgstr "tempnam - テンポラリファイルの名前を作成する"
13650
13651 #. type: Plain text
13652 #: build/C/man3/tempnam.3:33
13653 #, no-wrap
13654 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13655 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13656
13657 #. type: Plain text
13658 #: build/C/man3/tempnam.3:42
13659 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13660 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13661
13662 #. type: Plain text
13663 #: build/C/man3/tempnam.3:56
13664 msgid ""
13665 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13666 "filename, and such that a file with this name did not exist when B<tempnam>"
13667 "()  checked.  The filename suffix of the pathname generated will start with "
13668 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13669 "directory prefix part of the pathname generated is required to be "
13670 "\"appropriate\" (often that at least implies writable)."
13671 msgstr ""
13672 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13673 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13674 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13675 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13676 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13677 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13678
13679 #. type: Plain text
13680 #: build/C/man3/tempnam.3:59
13681 msgid ""
13682 "Attempts to find an appropriate directory go through the following steps:"
13683 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13684
13685 #. type: TP
13686 #: build/C/man3/tempnam.3:59
13687 #, no-wrap
13688 msgid "a)"
13689 msgstr "a)"
13690
13691 #. type: Plain text
13692 #: build/C/man3/tempnam.3:65
13693 msgid ""
13694 "In case the environment variable B<TMPDIR> exists and contains the name of "
13695 "an appropriate directory, that is used."
13696 msgstr ""
13697 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13698 "ら、それを用いる。"
13699
13700 #. type: TP
13701 #: build/C/man3/tempnam.3:65
13702 #, no-wrap
13703 msgid "b)"
13704 msgstr "b)"
13705
13706 #. type: Plain text
13707 #: build/C/man3/tempnam.3:70
13708 msgid ""
13709 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13710 msgstr ""
13711 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13712 "る。"
13713
13714 #. type: TP
13715 #: build/C/man3/tempnam.3:70
13716 #, no-wrap
13717 msgid "c)"
13718 msgstr "c)"
13719
13720 #. type: Plain text
13721 #: build/C/man3/tempnam.3:77
13722 msgid ""
13723 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13724 "appropriate."
13725 msgstr ""
13726 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13727 "なら、それを用いる。"
13728
13729 #. type: TP
13730 #: build/C/man3/tempnam.3:77
13731 #, no-wrap
13732 msgid "d)"
13733 msgstr "d)"
13734
13735 #. type: Plain text
13736 #: build/C/man3/tempnam.3:80
13737 msgid "Finally an implementation-defined directory may be used."
13738 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13739
13740 #. type: Plain text
13741 #: build/C/man3/tempnam.3:87
13742 msgid ""
13743 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13744 "hence should be freed by B<free>(3)."
13745 msgstr ""
13746 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13747 "B<free>(3)  で解放すべきである。"
13748
13749 #. type: Plain text
13750 #: build/C/man3/tempnam.3:94
13751 msgid ""
13752 "On succes, the B<tempnam>()  function returns a pointer to a unique "
13753 "temporary filename.  It returns NULL if a unique name cannot be generated, "
13754 "with I<errno> set to indicate the cause of the error."
13755 msgstr ""
13756 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返"
13757 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
13758 "値を設定する。"
13759
13760 #. type: Plain text
13761 #: build/C/man3/tempnam.3:98
13762 msgid "Allocation of storage failed."
13763 msgstr "保存領域の割り当てに失敗した。"
13764
13765 #. type: Plain text
13766 #: build/C/man3/tempnam.3:103
13767 msgid ""
13768 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13769 msgstr ""
13770 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13771 "る。"
13772
13773 #. type: Plain text
13774 #: build/C/man3/tempnam.3:122
13775 msgid ""
13776 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13777 "nevertheless possible that between the time that B<tempnam>()  returns a "
13778 "pathname, and the time that the program opens it, another program might "
13779 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13780 "This can lead to security holes.  To avoid such possibilities, use the "
13781 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13782 "B<mkstemp>(3)  or B<tmpfile>(3)."
13783 msgstr ""
13784 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13785 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13786 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13787 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13788 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13789 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13790 "B<tmpfile>(3)  を使うことである。"
13791
13792 #. type: Plain text
13793 #: build/C/man3/tempnam.3:130
13794 msgid ""
13795 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13796 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13797 "tmp> (and this is what glibc does)."
13798 msgstr ""
13799 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13800 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13801 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13802
13803 #. type: Plain text
13804 #: build/C/man3/tempnam.3:135
13805 msgid ""
13806 "Because it dynamically allocates memory used to return the pathname, "
13807 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13808 msgstr ""
13809 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13810 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13811
13812 #. type: Plain text
13813 #: build/C/man3/tempnam.3:148
13814 msgid ""
13815 "The B<tempnam>()  function generates a different string each time it is "
13816 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13817 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13818 msgstr ""
13819 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13820 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13821 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13822
13823 #. type: Plain text
13824 #: build/C/man3/tempnam.3:152
13825 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13826 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13827
13828 #. type: Plain text
13829 #: build/C/man3/tempnam.3:158
13830 msgid ""
13831 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13832 "upon failure to find a unique name."
13833 msgstr ""
13834 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13835 "ラー B<EEXIST> で失敗する。"
13836
13837 #. type: Plain text
13838 #: build/C/man3/tempnam.3:161
13839 msgid ""
13840 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13841 "accessibility of a directory is determined."
13842 msgstr ""
13843 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13844 "度のアクセス権限が必要なのかは指定されていない。"
13845
13846 #. type: Plain text
13847 #: build/C/man3/tempnam.3:168 build/C/man3/tmpnam.3:163
13848 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
13849 msgstr ""
13850 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
13851 "を使うこと。"
13852
13853 #. type: Plain text
13854 #: build/C/man3/tempnam.3:173
13855 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13856 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13857
13858 #. type: TH
13859 #: build/C/man3/tmpfile.3:31
13860 #, no-wrap
13861 msgid "TMPFILE"
13862 msgstr "TMPFILE"
13863
13864 #. type: Plain text
13865 #: build/C/man3/tmpfile.3:34
13866 msgid "tmpfile - create a temporary file"
13867 msgstr "tmpfile - テンポラリファイルを作成する"
13868
13869 #. type: Plain text
13870 #: build/C/man3/tmpfile.3:39
13871 #, no-wrap
13872 msgid "B<FILE *tmpfile(void);>\n"
13873 msgstr "B<FILE *tmpfile(void);>\n"
13874
13875 #. type: Plain text
13876 #: build/C/man3/tmpfile.3:47
13877 msgid ""
13878 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
13879 "write (w+b) mode.  The file will be automatically deleted when it is closed "
13880 "or the program terminates."
13881 msgstr ""
13882 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
13883 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
13884 "自動的に削除される。"
13885
13886 #. type: Plain text
13887 #: build/C/man3/tmpfile.3:56
13888 msgid ""
13889 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
13890 "filename cannot be generated or the unique file cannot be opened.  In the "
13891 "latter case, I<errno> is set to indicate the error."
13892 msgstr ""
13893 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
13894 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
13895 "I<errno> を設定する。"
13896
13897 #. type: Plain text
13898 #: build/C/man3/tmpfile.3:60
13899 msgid "Search permission denied for directory in file's path prefix."
13900 msgstr ""
13901 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
13902
13903 #. type: Plain text
13904 #: build/C/man3/tmpfile.3:63
13905 msgid "Unable to generate a unique filename."
13906 msgstr "ユニークなファイル名が作成できなかった。"
13907
13908 #. type: Plain text
13909 #: build/C/man3/tmpfile.3:66
13910 msgid "The call was interrupted by a signal."
13911 msgstr "呼び出しがシグナルによって中断された。"
13912
13913 #. type: Plain text
13914 #: build/C/man3/tmpfile.3:69
13915 msgid "Too many file descriptors in use by the process."
13916 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
13917
13918 #. type: Plain text
13919 #: build/C/man3/tmpfile.3:72
13920 msgid "Too many files open in the system."
13921 msgstr "システム全体でオープン可能なファイル数を超過した。"
13922
13923 #. type: Plain text
13924 #: build/C/man3/tmpfile.3:75
13925 msgid "There was no room in the directory to add the new filename."
13926 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
13927
13928 #. type: Plain text
13929 #: build/C/man3/tmpfile.3:78
13930 msgid "Read-only file system."
13931 msgstr "読みだし専用ファイルシステムである。"
13932
13933 #. type: Plain text
13934 #: build/C/man3/tmpfile.3:80
13935 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
13936 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
13937
13938 #. type: Plain text
13939 #: build/C/man3/tmpfile.3:86
13940 msgid ""
13941 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
13942 "stream cannot be opened."
13943 msgstr ""
13944 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
13945 "メッセージが書き出される、と規定されている。"
13946
13947 #. type: Plain text
13948 #: build/C/man3/tmpfile.3:97
13949 msgid ""
13950 "The standard does not specify the directory that B<tmpfile>()  will use.  "
13951 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
13952 "and if that fails the directory I</tmp>."
13953 msgstr ""
13954 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
13955 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
13956 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
13957
13958 #. type: Plain text
13959 #: build/C/man3/tmpfile.3:103
13960 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
13961 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
13962
13963 #. type: TH
13964 #: build/C/man3/tmpnam.3:27
13965 #, no-wrap
13966 msgid "TMPNAM"
13967 msgstr "TMPNAM"
13968
13969 #. type: Plain text
13970 #: build/C/man3/tmpnam.3:30
13971 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
13972 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
13973
13974 #. type: Plain text
13975 #: build/C/man3/tmpnam.3:35
13976 #, no-wrap
13977 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
13978 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
13979
13980 #. type: Plain text
13981 #: build/C/man3/tmpnam.3:58
13982 msgid ""
13983 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
13984 "filename, and such that a file with this name did not exist at some point in "
13985 "time, so that naive programmers may think it a suitable name for a temporary "
13986 "file.  If the argument I<s> is NULL this name is generated in an internal "
13987 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
13988 "I<s> is not NULL, the name is copied to the character array (of length at "
13989 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
13990 "case of success."
13991 msgstr ""
13992 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
13993 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
13994 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
13995 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
13996 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
13997 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
13998 "ピーされ、 成功した場合は I<s> が返される。"
13999
14000 #. type: Plain text
14001 #: build/C/man3/tmpnam.3:70
14002 msgid ""
14003 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
14004 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
14005 "the B<TMP_MAX> mentioned below.)"
14006 msgstr ""
14007 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
14008 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
14009 "hE<gt>> で定義されている。)"
14010
14011 #. type: Plain text
14012 #: build/C/man3/tmpnam.3:75
14013 msgid ""
14014 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
14015 "or NULL if a unique name cannot be generated."
14016 msgstr ""
14017 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
14018 "が作成できなかった場合は NULL を返す。"
14019
14020 #. type: Plain text
14021 #: build/C/man3/tmpnam.3:77
14022 msgid "No errors are defined."
14023 msgstr "エラーは定義されていない。"
14024
14025 #. type: Plain text
14026 #: build/C/man3/tmpnam.3:83
14027 msgid ""
14028 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
14029 "safe if called with a NULL parameter."
14030 msgstr ""
14031
14032 #. type: Plain text
14033 #: build/C/man3/tmpnam.3:87
14034 msgid "The B<tmpnam_r>()  function is thread-safe."
14035 msgstr ""
14036
14037 #. type: Plain text
14038 #: build/C/man3/tmpnam.3:92
14039 msgid ""
14040 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
14041 "obsolete."
14042 msgstr ""
14043 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
14044 "定としている。"
14045
14046 #. type: Plain text
14047 #: build/C/man3/tmpnam.3:103
14048 msgid ""
14049 "The B<tmpnam>()  function generates a different string each time it is "
14050 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
14051 "the behavior is implementation defined."
14052 msgstr ""
14053 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
14054 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
14055
14056 #. type: Plain text
14057 #: build/C/man3/tmpnam.3:122
14058 msgid ""
14059 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
14060 "nevertheless possible that between the time that B<tmpnam>()  returns a "
14061 "pathname, and the time that the program opens it, another program might "
14062 "create that pathname using B<open>(2), or create it as a symbolic link.  "
14063 "This can lead to security holes.  To avoid such possibilities, use the "
14064 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
14065 "B<mkstemp>(3)  or B<tmpfile>(3)."
14066 msgstr ""
14067 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
14068 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
14069 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
14070 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
14071 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
14072 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
14073 "B<tmpfile>(3)  を使うことである。"
14074
14075 #. type: Plain text
14076 #: build/C/man3/tmpnam.3:130
14077 msgid ""
14078 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
14079 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
14080 "defined."
14081 msgstr ""
14082 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
14083 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
14084 "NULL 引き数で呼び出してはならない。"
14085
14086 #. type: Plain text
14087 #: build/C/man3/tmpnam.3:134
14088 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
14089 msgstr ""
14090 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
14091 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
14092 "扱いしている。"
14093
14094 #. type: Plain text
14095 #: build/C/man3/tmpnam.3:142
14096 #, no-wrap
14097 msgid ""
14098 "char *\n"
14099 "tmpnam_r(char *s)\n"
14100 "{\n"
14101 "    return s ? tmpnam(s) : NULL;\n"
14102 "}\n"
14103 msgstr ""
14104 "char *\n"
14105 "tmpnam_r(char *s)\n"
14106 "{\n"
14107 "    return s ? tmpnam(s) : NULL;\n"
14108 "}\n"
14109
14110 #. type: Plain text
14111 #: build/C/man3/tmpnam.3:156
14112 msgid ""
14113 "apparently as a warning not to use NULL.  A few systems implement it.  To "
14114 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
14115 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
14116 msgstr ""
14117 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
14118 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
14119 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
14120 "がある。"
14121
14122 #. type: Plain text
14123 #: build/C/man3/tmpnam.3:168
14124 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14125 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14126
14127 #. type: TH
14128 #: build/C/man2/unlink.2:32
14129 #, no-wrap
14130 msgid "UNLINK"
14131 msgstr "UNLINK"
14132
14133 #. type: TH
14134 #: build/C/man2/unlink.2:32
14135 #, no-wrap
14136 msgid "2011-09-15"
14137 msgstr "2011-09-15"
14138
14139 #. type: Plain text
14140 #: build/C/man2/unlink.2:35
14141 msgid "unlink - delete a name and possibly the file it refers to"
14142 msgstr ""
14143 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
14144
14145 #. type: Plain text
14146 #: build/C/man2/unlink.2:39
14147 msgid "B<int unlink(const char *>I<pathname>B<);>"
14148 msgstr "B<int unlink(const char *>I<pathname>B<);>"
14149
14150 #. type: Plain text
14151 #: build/C/man2/unlink.2:45
14152 msgid ""
14153 "B<unlink>()  deletes a name from the file system.  If that name was the last "
14154 "link to a file and no processes have the file open the file is deleted and "
14155 "the space it was using is made available for reuse."
14156 msgstr ""
14157 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
14158 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
14159 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
14160 "は再利用が可能になる。"
14161
14162 #. type: Plain text
14163 #: build/C/man2/unlink.2:49
14164 msgid ""
14165 "If the name was the last link to a file but any processes still have the "
14166 "file open the file will remain in existence until the last file descriptor "
14167 "referring to it is closed."
14168 msgstr ""
14169 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
14170 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
14171 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
14172 "ける。"
14173
14174 #. type: Plain text
14175 #: build/C/man2/unlink.2:51
14176 msgid "If the name referred to a symbolic link the link is removed."
14177 msgstr ""
14178 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
14179 "削除される。"
14180
14181 #. type: Plain text
14182 #: build/C/man2/unlink.2:55
14183 msgid ""
14184 "If the name referred to a socket, fifo or device the name for it is removed "
14185 "but processes which have the object open may continue to use it."
14186 msgstr ""
14187 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
14188 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
14189 "とができる。"
14190
14191 #. type: Plain text
14192 #: build/C/man2/unlink.2:71
14193 msgid ""
14194 "Write access to the directory containing I<pathname> is not allowed for the "
14195 "process's effective UID, or one of the directories in I<pathname> did not "
14196 "allow search permission.  (See also B<path_resolution>(7).)"
14197 msgstr ""
14198 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
14199 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
14200 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
14201 "と)。"
14202
14203 #. type: Plain text
14204 #: build/C/man2/unlink.2:80
14205 msgid ""
14206 "The file I<pathname> cannot be unlinked because it is being used by the "
14207 "system or another process; for example, it is a mount point or the NFS "
14208 "client software created it to represent an active but otherwise nameless "
14209 "inode (\"NFS silly renamed\")."
14210 msgstr ""
14211 "システムか別のプロセスがそのファイルを使用中のため、\n"
14212 "ファイル I<pathname> を unlink できない。\n"
14213 "例えば、そのファイルがマウントポイントの場合や、\n"
14214 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
14215 "名前なし inode (nameless inode) であることを示すために作成した\n"
14216 "場合 (\"NFS silly renamed\") などがある。"
14217
14218 #. type: Plain text
14219 #: build/C/man2/unlink.2:92
14220 msgid ""
14221 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
14222 "Linux since 2.1.132.)"
14223 msgstr ""
14224 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
14225 "で、Linux 2.1.132 以降で返される。)"
14226
14227 #. type: Plain text
14228 #: build/C/man2/unlink.2:96
14229 msgid "Too many symbolic links were encountered in translating I<pathname>."
14230 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
14231
14232 #. type: Plain text
14233 #: build/C/man2/unlink.2:106
14234 msgid ""
14235 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14236 "I<pathname> is empty."
14237 msgstr ""
14238 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
14239 "I<pathname> が空である。"
14240
14241 #. type: Plain text
14242 #: build/C/man2/unlink.2:114
14243 msgid ""
14244 "A component used as a directory in I<pathname> is not, in fact, a directory."
14245 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14246
14247 #. type: Plain text
14248 #: build/C/man2/unlink.2:123
14249 msgid ""
14250 "The system does not allow unlinking of directories, or unlinking of "
14251 "directories requires privileges that the calling process doesn't have.  "
14252 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14253 "B<EISDIR> for this case.)"
14254 msgstr ""
14255 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14256 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14257 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14258 "合には Linux は B<EISDIR> を返す。)"
14259
14260 #. type: TP
14261 #: build/C/man2/unlink.2:123
14262 #, no-wrap
14263 msgid "B<EPERM> (Linux only)"
14264 msgstr "B<EPERM> (Linux のみ)"
14265
14266 #. type: Plain text
14267 #: build/C/man2/unlink.2:126
14268 msgid "The file system does not allow unlinking of files."
14269 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14270
14271 #. type: Plain text
14272 #: build/C/man2/unlink.2:137
14273 msgid ""
14274 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14275 "and the process's effective UID is neither the UID of the file to be deleted "
14276 "nor that of the directory containing it, and the process is not privileged "
14277 "(Linux: does not have the B<CAP_FOWNER> capability)."
14278 msgstr ""
14279 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14280 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14281 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14282 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14283
14284 #. type: Plain text
14285 #: build/C/man2/unlink.2:141
14286 msgid "I<pathname> refers to a file on a read-only file system."
14287 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14288
14289 #. type: Plain text
14290 #: build/C/man2/unlink.2:161
14291 msgid ""
14292 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14293 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14294 "(7), B<symlink>(7)"
14295 msgstr ""
14296 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14297 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14298 "(7), B<symlink>(7)"
14299
14300 #. type: TH
14301 #: build/C/man3/unlocked_stdio.3:25
14302 #, no-wrap
14303 msgid "UNLOCKED_STDIO"
14304 msgstr "UNLOCKED_STDIO"
14305
14306 #. type: Plain text
14307 #: build/C/man3/unlocked_stdio.3:29
14308 msgid ""
14309 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14310 "nonlocking stdio functions"
14311 msgstr ""
14312 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14313 "わずに標準入出力を行う関数群"
14314
14315 #. type: Plain text
14316 #: build/C/man3/unlocked_stdio.3:37
14317 #, no-wrap
14318 msgid ""
14319 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14320 "B<int getchar_unlocked(void);>\n"
14321 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14322 "B<int putchar_unlocked(int >I<c>B<);>\n"
14323 msgstr ""
14324 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14325 "B<int getchar_unlocked(void);>\n"
14326 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14327 "B<int putchar_unlocked(int >I<c>B<);>\n"
14328
14329 #. type: Plain text
14330 #: build/C/man3/unlocked_stdio.3:49
14331 #, no-wrap
14332 msgid ""
14333 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14334 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14335 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14336 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14337 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14338 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14339 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14340 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14341 "B<                      FILE *>I<stream>B<);>\n"
14342 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14343 "B<                      FILE *>I<stream>B<);>\n"
14344 msgstr ""
14345 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14346 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14347 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14348 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14349 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14350 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14351 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14352 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14353 "B<                      FILE *>I<stream>B<);>\n"
14354 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14355 "B<                      FILE *>I<stream>B<);>\n"
14356
14357 #. type: Plain text
14358 #: build/C/man3/unlocked_stdio.3:52
14359 #, no-wrap
14360 msgid ""
14361 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14362 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14363 msgstr ""
14364 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14365 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14366
14367 #. type: Plain text
14368 #: build/C/man3/unlocked_stdio.3:63
14369 #, no-wrap
14370 msgid ""
14371 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14372 "B<wint_t getwchar_unlocked(void);>\n"
14373 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14374 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14375 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14376 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14377 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14378 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14379 msgstr ""
14380 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14381 "B<wint_t getwchar_unlocked(void);>\n"
14382 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14383 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14384 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14385 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14386 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14387 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14388
14389 #. type: Plain text
14390 #: build/C/man3/unlocked_stdio.3:75
14391 msgid ""
14392 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14393 "B<putchar_unlocked>():"
14394 msgstr ""
14395 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14396 "B<putchar_unlocked>():"
14397
14398 #. type: Plain text
14399 #: build/C/man3/unlocked_stdio.3:78
14400 msgid ""
14401 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14402 "_BSD_SOURCE || _SVID_SOURCE"
14403 msgstr ""
14404 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14405 "_BSD_SOURCE || _SVID_SOURCE"
14406
14407 #. type: Plain text
14408 #: build/C/man3/unlocked_stdio.3:89
14409 msgid ""
14410 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14411 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14412 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14413 msgstr ""
14414 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14415 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14416 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14417
14418 #. type: Plain text
14419 #: build/C/man3/unlocked_stdio.3:91
14420 msgid "_BSD_SOURCE || _SVID_SOURCE"
14421 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14422
14423 #. type: Plain text
14424 #: build/C/man3/unlocked_stdio.3:102
14425 msgid ""
14426 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14427 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14428 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14429 msgstr ""
14430 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14431 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14432 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14433
14434 #. type: Plain text
14435 #: build/C/man3/unlocked_stdio.3:113
14436 msgid ""
14437 "Each of these functions has the same behavior as its counterpart without the "
14438 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14439 "locks themselves, and do not test for the presence of locks set by others) "
14440 "and hence are thread-unsafe.  See B<flockfile>(3)."
14441 msgstr ""
14442 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14443 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14444 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14445 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14446 "B<flockfile>(3)  を参照のこと。"
14447
14448 #. type: Plain text
14449 #: build/C/man3/unlocked_stdio.3:120
14450 msgid ""
14451 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14452 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14453 msgstr ""
14454 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14455 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14456
14457 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14458 #.  moved to a compatibility library.
14459 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14460 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14461 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14462 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14463 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14464 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14465 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14466 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14467 #.  ungetc_unlocked, ungetwc_unlocked.
14468 #. type: Plain text
14469 #: build/C/man3/unlocked_stdio.3:136
14470 msgid ""
14471 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14472 "are available in recent glibc.  They should probably not be used."
14473 msgstr ""
14474 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14475 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14476
14477 #. type: Plain text
14478 #: build/C/man3/unlocked_stdio.3:139
14479 msgid "B<flockfile>(3), B<stdio>(3)"
14480 msgstr "B<flockfile>(3), B<stdio>(3)"
14481
14482 #. type: TH
14483 #: build/C/man3/wprintf.3:16
14484 #, no-wrap
14485 msgid "WPRINTF"
14486 msgstr "WPRINTF"
14487
14488 #. type: TH
14489 #: build/C/man3/wprintf.3:16
14490 #, no-wrap
14491 msgid "2011-09-17"
14492 msgstr "2011-09-17"
14493
14494 #. type: Plain text
14495 #: build/C/man3/wprintf.3:20
14496 msgid ""
14497 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14498 "character output conversion"
14499 msgstr ""
14500 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14501 "フォーマットして出力する"
14502
14503 #. type: Plain text
14504 #: build/C/man3/wprintf.3:24
14505 #, no-wrap
14506 msgid ""
14507 "B<#include E<lt>stdio.hE<gt>>\n"
14508 "B<#include E<lt>wchar.hE<gt>>\n"
14509 msgstr ""
14510 "B<#include E<lt>stdio.hE<gt>>\n"
14511 "B<#include E<lt>wchar.hE<gt>>\n"
14512
14513 #. type: Plain text
14514 #: build/C/man3/wprintf.3:29
14515 #, no-wrap
14516 msgid ""
14517 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14518 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14519 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14520 "B<             const wchar_t *>I<format>B<, ...);>\n"
14521 msgstr ""
14522 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14523 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14524 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14525 "B<             const wchar_t *>I<format>B<, ...);>\n"
14526
14527 #. type: Plain text
14528 #: build/C/man3/wprintf.3:34
14529 #, no-wrap
14530 msgid ""
14531 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14532 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14533 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14534 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14535 msgstr ""
14536 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14537 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14538 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14539 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14540
14541 #.  .BR wprintf (),
14542 #.  .BR fwprintf (),
14543 #.  .BR swprintf (),
14544 #.  .BR vwprintf (),
14545 #.  .BR vfwprintf (),
14546 #.  .BR vswprintf ():
14547 #. type: Plain text
14548 #: build/C/man3/wprintf.3:51
14549 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14550 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14551
14552 #. type: Plain text
14553 #: build/C/man3/wprintf.3:53
14554 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14555 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14556
14557 #. type: Plain text
14558 #: build/C/man3/wprintf.3:55
14559 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14560 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14561
14562 #. type: Plain text
14563 #: build/C/man3/wprintf.3:58
14564 msgid "or I<cc\\ -std=c99>"
14565 msgstr "or I<cc\\ -std=c99>"
14566
14567 #. type: Plain text
14568 #: build/C/man3/wprintf.3:69
14569 msgid ""
14570 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14571 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14572 "characters."
14573 msgstr ""
14574 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14575 "版である。これらはワイド文字をフォーマットして出力する。"
14576
14577 #. type: Plain text
14578 #: build/C/man3/wprintf.3:81
14579 msgid ""
14580 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14581 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14582 "more information."
14583 msgstr ""
14584 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14585 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14586 "ること。"
14587
14588 #. type: Plain text
14589 #: build/C/man3/wprintf.3:93
14590 msgid ""
14591 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14592 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14593 "for more information."
14594 msgstr ""
14595 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14596 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14597 "B<fwide>(3)  を参照すること。"
14598
14599 #. type: Plain text
14600 #: build/C/man3/wprintf.3:107
14601 msgid ""
14602 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14603 "output to an array of wide characters.  The programmer must ensure that "
14604 "there is room for at least I<maxlen> wide characters at I<wcs>."
14605 msgstr ""
14606 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14607 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14608 "空きがあることを保証しなければ ならない。"
14609
14610 #. type: Plain text
14611 #: build/C/man3/wprintf.3:118
14612 msgid ""
14613 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14614 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14615 "following differences:"
14616 msgstr ""
14617 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14618 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14619
14620 #. type: TP
14621 #: build/C/man3/wprintf.3:118 build/C/man3/wprintf.3:123
14622 #: build/C/man3/wprintf.3:126
14623 #, no-wrap
14624 msgid "B<\\(bu>"
14625 msgstr "B<\\(bu>"
14626
14627 #. type: Plain text
14628 #: build/C/man3/wprintf.3:123
14629 msgid "The I<format> string is a wide-character string."
14630 msgstr "I<format> がワイド文字列で与えられる。"
14631
14632 #. type: Plain text
14633 #: build/C/man3/wprintf.3:126
14634 msgid "The output consists of wide characters, not bytes."
14635 msgstr "出力がバイトではなくワイド文字で構成される。"
14636
14637 #. type: Plain text
14638 #: build/C/man3/wprintf.3:145
14639 msgid ""
14640 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14641 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14642 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14643 "overflow on Linux.)"
14644 msgstr ""
14645 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14646 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14647 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14648 "も -1 を返さない)。"
14649
14650 #. type: Plain text
14651 #: build/C/man3/wprintf.3:151
14652 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14653 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14654
14655 #. type: Plain text
14656 #: build/C/man3/wprintf.3:165
14657 msgid ""
14658 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14659 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14660 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14661 "character) argument is written."
14662 msgstr ""
14663 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14664 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14665 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14666
14667 #. type: Plain text
14668 #: build/C/man3/wprintf.3:205
14669 msgid ""
14670 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14671 "to be a pointer to an array of character type (pointer to a string) "
14672 "containing a multibyte character sequence beginning in the initial shift "
14673 "state.  Characters from the array are converted to wide characters (each by "
14674 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14675 "the initial state before the first byte).  The resulting wide characters are "
14676 "written up to (but not including) the terminating null wide character (L\\(aq"
14677 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
14678 "number specified are written.  Note that the precision determines the number "
14679 "of I<wide characters> written, not the number of I<bytes> or I<screen "
14680 "positions>.  The array must contain a terminating null byte (\\(aq"
14681 "\\e0\\(aq), unless a precision is given and it is so small that the number "
14682 "of converted wide characters reaches it before the end of the array is "
14683 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
14684 "argument is expected to be a pointer to an array of wide characters.  Wide "
14685 "characters from the array are written up to (but not including) a "
14686 "terminating null wide character.  If a precision is specified, no more than "
14687 "the number specified are written.  The array must contain a terminating null "
14688 "wide character, unless a precision is given and it is smaller than or equal "
14689 "to the number of wide characters in the array."
14690 msgstr ""
14691 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14692 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14693 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14694 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14695 "字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度"
14696 "(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれな"
14697 "い。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字"
14698 "> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
14699 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
14700 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
14701 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
14702 "引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端の"
14703 "ナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精"
14704 "度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含"
14705 "む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さ"
14706 "くな ければならない。"
14707
14708 #. type: Plain text
14709 #: build/C/man3/wprintf.3:213
14710 msgid ""
14711 "The functions return the number of wide characters written, excluding the "
14712 "terminating null wide character in case of the functions B<swprintf>()  and "
14713 "B<vswprintf>().  They return -1 when an error occurs."
14714 msgstr ""
14715 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14716 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14717 "場合は -1 を返す。"
14718
14719 #. type: Plain text
14720 #: build/C/man3/wprintf.3:215
14721 msgid "C99."
14722 msgstr "C99."
14723
14724 #. type: Plain text
14725 #: build/C/man3/wprintf.3:223
14726 msgid ""
14727 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14728 "the current locale."
14729 msgstr ""
14730 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14731
14732 #. type: Plain text
14733 #: build/C/man3/wprintf.3:253
14734 msgid ""
14735 "If the I<format> string contains non-ASCII wide characters, the program will "
14736 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
14737 "time is the same as the B<LC_CTYPE> category of the current locale at "
14738 "compile time.  This is because the I<wchar_t> representation is platform- "
14739 "and locale-dependent.  (The glibc represents wide characters using their "
14740 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14741 "the use of C99 universal character names of the form \\eunnnn does not solve "
14742 "this problem.)  Therefore, in internationalized programs, the I<format> "
14743 "string should consist of ASCII wide characters only, or should be "
14744 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14745 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14746 msgstr ""
14747 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14748 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14749 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14750 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14751 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14752 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14753 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14754 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14755 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14756
14757 #.  .BR wscanf (3)
14758 #. type: Plain text
14759 #: build/C/man3/wprintf.3:260
14760 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14761 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14762
14763 #. type: TH
14764 #: build/C/man2/write.2:39
14765 #, no-wrap
14766 msgid "WRITE"
14767 msgstr "WRITE"
14768
14769 #. type: Plain text
14770 #: build/C/man2/write.2:42
14771 msgid "write - write to a file descriptor"
14772 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14773
14774 #. type: Plain text
14775 #: build/C/man2/write.2:46
14776 msgid ""
14777 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14778 msgstr ""
14779 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14780
14781 #. type: Plain text
14782 #: build/C/man2/write.2:54
14783 msgid ""
14784 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14785 "the file referred to by the file descriptor I<fd>."
14786 msgstr ""
14787 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14788 "照するファイルへ、最大 I<count> バイトを書き込む。"
14789
14790 #. type: Plain text
14791 #: build/C/man2/write.2:68
14792 msgid ""
14793 "The number of bytes written may be less than I<count> if, for example, there "
14794 "is insufficient space on the underlying physical medium, or the "
14795 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14796 "call was interrupted by a signal handler after having written less than "
14797 "I<count> bytes.  (See also B<pipe>(7).)"
14798 msgstr ""
14799 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14800 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14801 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14802 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14803 "(7)  も参照のこと。)"
14804
14805 #. type: Plain text
14806 #: build/C/man2/write.2:82
14807 msgid ""
14808 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14809 "example, a regular file)  writing takes place at the current file offset, "
14810 "and the file offset is incremented by the number of bytes actually written.  "
14811 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14812 "to the end of the file before writing.  The adjustment of the file offset "
14813 "and the write operation are performed as an atomic step."
14814 msgstr ""
14815 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14816 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14817 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14818 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14819 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14820 "処理として 実行される。"
14821
14822 #. type: Plain text
14823 #: build/C/man2/write.2:89
14824 msgid ""
14825 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14826 "B<write>()  has returned returns the new data.  Note that not all file "
14827 "systems are POSIX conforming."
14828 msgstr ""
14829 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14830 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14831 "ること。"
14832
14833 #. type: Plain text
14834 #: build/C/man2/write.2:94
14835 msgid ""
14836 "On success, the number of bytes written is returned (zero indicates nothing "
14837 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14838 msgstr ""
14839 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14840 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
14841
14842 #. type: Plain text
14843 #: build/C/man2/write.2:107
14844 msgid ""
14845 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
14846 "return a failure status if one of the errors below is detected.  If no "
14847 "errors are detected, 0 will be returned without causing any other effect.  "
14848 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
14849 "the results are not specified."
14850 msgstr ""
14851 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
14852 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
14853 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
14854 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
14855 "その結果は規定されていない。"
14856
14857 #. type: Plain text
14858 #: build/C/man2/write.2:115
14859 msgid ""
14860 "The file descriptor I<fd> refers to a file other than a socket and has been "
14861 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
14862 msgstr ""
14863 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
14864 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
14865 "する状況にある。"
14866
14867 #.  Actually EAGAIN on Linux
14868 #. type: Plain text
14869 #: build/C/man2/write.2:126
14870 msgid ""
14871 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
14872 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
14873 "error to be returned for this case, and does not require these constants to "
14874 "have the same value, so a portable application should check for both "
14875 "possibilities."
14876 msgstr ""
14877 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
14878 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
14879 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
14880 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
14881 "プリケーションでは、両方の可能性を 確認すべきである。"
14882
14883 #. type: Plain text
14884 #: build/C/man2/write.2:130
14885 msgid "I<fd> is not a valid file descriptor or is not open for writing."
14886 msgstr ""
14887 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
14888 "されていない。"
14889
14890 #. type: TP
14891 #: build/C/man2/write.2:130
14892 #, no-wrap
14893 msgid "B<EDESTADDRREQ>"
14894 msgstr "B<EDESTADDRREQ>"
14895
14896 #. type: Plain text
14897 #: build/C/man2/write.2:135
14898 msgid ""
14899 "I<fd> refers to a datagram socket for which a peer address has not been set "
14900 "using B<connect>(2)."
14901 msgstr ""
14902 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
14903 "グラムソケットを 参照している。"
14904
14905 #. type: Plain text
14906 #: build/C/man2/write.2:141
14907 msgid ""
14908 "The user's quota of disk blocks on the file system containing the file "
14909 "referred to by I<fd> has been exhausted."
14910 msgstr ""
14911 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
14912 "クォータの上限に達している。"
14913
14914 #. type: Plain text
14915 #: build/C/man2/write.2:150
14916 msgid ""
14917 "An attempt was made to write a file that exceeds the implementation-defined "
14918 "maximum file size or the process's file size limit, or to write at a "
14919 "position past the maximum allowed offset."
14920 msgstr ""
14921 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
14922 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
14923 "書き込もうとした。"
14924
14925 #. type: Plain text
14926 #: build/C/man2/write.2:154
14927 msgid ""
14928 "The call was interrupted by a signal before any data was written; see "
14929 "B<signal>(7)."
14930 msgstr ""
14931 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
14932 "(7)  参照。"
14933
14934 #. type: Plain text
14935 #: build/C/man2/write.2:165
14936 msgid ""
14937 "I<fd> is attached to an object which is unsuitable for writing; or the file "
14938 "was opened with the B<O_DIRECT> flag, and either the address specified in "
14939 "I<buf>, the value specified in I<count>, or the current file offset is not "
14940 "suitably aligned."
14941 msgstr ""
14942 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
14943 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
14944 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
14945 "メントが不適切である。"
14946
14947 #. type: Plain text
14948 #: build/C/man2/write.2:168
14949 msgid "A low-level I/O error occurred while modifying the inode."
14950 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
14951
14952 #. type: Plain text
14953 #: build/C/man2/write.2:173
14954 msgid ""
14955 "The device containing the file referred to by I<fd> has no room for the data."
14956 msgstr ""
14957 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
14958
14959 #. type: TP
14960 #: build/C/man2/write.2:173
14961 #, no-wrap
14962 msgid "B<EPIPE>"
14963 msgstr "B<EPIPE>"
14964
14965 #. type: Plain text
14966 #: build/C/man2/write.2:182
14967 msgid ""
14968 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
14969 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
14970 "(Thus, the write return value is seen only if the program catches, blocks or "
14971 "ignores this signal.)"
14972 msgstr ""
14973 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
14974 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
14975 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
14976 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
14977 "write の返り値を参照できる。)"
14978
14979 #. type: Plain text
14980 #: build/C/man2/write.2:185
14981 msgid "Other errors may occur, depending on the object connected to I<fd>."
14982 msgstr ""
14983 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
14984
14985 #. type: Plain text
14986 #: build/C/man2/write.2:194
14987 msgid ""
14988 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
14989 "just before any data is written."
14990 msgstr ""
14991 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
14992 "で B<EINTR> が返る。"
14993
14994 #. type: Plain text
14995 #: build/C/man2/write.2:203
14996 msgid ""
14997 "A successful return from B<write>()  does not make any guarantee that data "
14998 "has been committed to disk.  In fact, on some buggy implementations, it does "
14999 "not even guarantee that space has successfully been reserved for the data.  "
15000 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
15001 "all your data."
15002 msgstr ""
15003 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
15004 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
15005 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
15006 "write した後に B<fsync>(2)  を呼び出すことである。"
15007
15008 #. type: Plain text
15009 #: build/C/man2/write.2:211
15010 msgid ""
15011 "If a B<write>()  is interrupted by a signal handler before any bytes are "
15012 "written, then the call fails with the error B<EINTR>; if it is interrupted "
15013 "after at least one byte has been written, the call succeeds, and returns the "
15014 "number of bytes written."
15015 msgstr ""
15016 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
15017 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
15018 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
15019
15020 #. type: Plain text
15021 #: build/C/man2/write.2:223
15022 msgid ""
15023 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15024 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15025 msgstr ""
15026 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15027 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15028
15029 #~ msgid "2001-12-18"
15030 #~ msgstr "2001-12-18"
15031
15032 #~ msgid "2007-07-26"
15033 #~ msgstr "2007-07-26"
15034
15035 #~ msgid "2006-12-27"
15036 #~ msgstr "2006-12-27"
15037
15038 #~ msgid "1999-07-25"
15039 #~ msgstr "1999-07-25"
15040
15041 #~ msgid "2008-06-14"
15042 #~ msgstr "2008-06-14"
15043
15044 #~ msgid "2010-06-12"
15045 #~ msgstr "2010-06-12"
15046
15047 #~ msgid "2010-02-03"
15048 #~ msgstr "2010-02-03"
15049
15050 #~ msgid "2001-12-16"
15051 #~ msgstr "2001-12-16"
15052
15053 #~ msgid "2008-08-06"
15054 #~ msgstr "2008-08-06"
15055
15056 #~ msgid "2010-09-10"
15057 #~ msgstr "2010-09-10"
15058
15059 #~ msgid ""
15060 #~ "Many file systems and disks were considered to be fast enough that the "
15061 #~ "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, "
15062 #~ "B<O_NONBLOCK> may not be available on files and/or disks."
15063 #~ msgstr ""
15064 #~ "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むく"
15065 #~ "らいに十分に高速であると考えられている。 それでそのようなファイルやディス"
15066 #~ "クには B<O_NONBLOCK> は利用できないかもしれない。"
15067
15068 #~ msgid ""
15069 #~ "The I<local_iov> and I<remote_iov> arguments point to an array of "
15070 #~ "I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
15071 #~ msgstr ""
15072 #~ "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
15073 #~ "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
15074 #~ "されている:"
15075
15076 #~ msgid ""
15077 #~ "Buffers are processed in array order.  This means that B<process_vm_readv>"
15078 #~ "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]"
15079 #~ ">, and so on.  Likewise, I<remote_iov[0]> is completely read before "
15080 #~ "proceeding to I<remote_iov[1]>, and so on."
15081 #~ msgstr ""
15082 #~ "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
15083 #~ "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
15084 #~ "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
15085 #~ "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
15086 #~ "以降も同様である。"