OSDN Git Service

fa80a7eee8c60ffc4a70bd7e2c3edf7cb215eda0
[linuxjm/LDP_man-pages.git] / po4a / stdio / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-08-15 19:32+0900\n"
10 "PO-Revision-Date: 2013-08-15 20:20+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/asprintf.3:27
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25
26 #: build/C/man3/ferror.3:44 build/C/man3/fmtmsg.3:13
27 #: build/C/man3/stdio_ext.3:25 build/C/man3/tmpnam.3:27
28 #, no-wrap
29 msgid "2013-06-21"
30 msgstr "2013-06-21"
31
32 #. type: TH
33 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
34 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
35 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
36 #: build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44
37 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
38 #: build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25
39 #: build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26
40 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:52 build/C/man3/wprintf.3:16
41 #, no-wrap
42 msgid "GNU"
43 msgstr "GNU"
44
45 #. type: TH
46 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
47 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
48 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
49 #: build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18
50 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
51 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
52 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
53 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
54 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:27
55 #: build/C/man3/getw.3:25 build/C/man2/link.2:31 build/C/man2/llseek.2:28
56 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:51
57 #: build/C/man3/perror.3:31 build/C/man2/pipe.2:36 build/C/man3/popen.3:40
58 #: build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man2/read.2:35
59 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man3/remove.3:31
60 #: build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52
61 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man3/stdio.3:39
62 #: build/C/man3/stdio_ext.3:25 build/C/man2/symlink.2:32
63 #: build/C/man7/symlink.7:36 build/C/man3/tempnam.3:25
64 #: build/C/man3/tmpfile.3:31 build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:32
65 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
66 #: build/C/man2/write.2:39
67 #, no-wrap
68 msgid "Linux Programmer's Manual"
69 msgstr "Linux Programmer's Manual"
70
71 #. type: SH
72 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
73 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
74 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
75 #: build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19
76 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
77 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
78 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
79 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
80 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28
81 #: build/C/man3/getw.3:26 build/C/man2/link.2:32 build/C/man2/llseek.2:29
82 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:52
83 #: build/C/man3/perror.3:32 build/C/man2/pipe.2:37 build/C/man3/popen.3:41
84 #: build/C/man3/printf.3:35 build/C/man3/puts.3:27 build/C/man2/read.2:36
85 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:32
86 #: build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53
87 #: build/C/man3/setbuf.3:49 build/C/man3/stdin.3:14 build/C/man3/stdio.3:40
88 #: build/C/man3/stdio_ext.3:26 build/C/man2/symlink.2:33
89 #: build/C/man7/symlink.7:37 build/C/man3/tempnam.3:26
90 #: build/C/man3/tmpfile.3:32 build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:33
91 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
92 #: build/C/man2/write.2:40
93 #, no-wrap
94 msgid "NAME"
95 msgstr "名前"
96
97 #. type: Plain text
98 #: build/C/man3/asprintf.3:30
99 msgid "asprintf, vasprintf - print to allocated string"
100 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
101
102 #. type: SH
103 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
104 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
105 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
106 #: build/C/man3/fflush.3:48 build/C/man3/fgetwc.3:21
107 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
108 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
109 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
110 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
111 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:30
112 #: build/C/man3/getw.3:28 build/C/man2/link.2:34 build/C/man2/llseek.2:31
113 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:54
114 #: build/C/man3/perror.3:34 build/C/man2/pipe.2:39 build/C/man3/popen.3:43
115 #: build/C/man3/printf.3:38 build/C/man3/puts.3:29 build/C/man2/read.2:38
116 #: build/C/man2/readlink.2:46 build/C/man2/readv.2:35 build/C/man3/remove.3:34
117 #: build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55
118 #: build/C/man3/setbuf.3:51 build/C/man3/stdin.3:16 build/C/man3/stdio.3:42
119 #: build/C/man3/stdio_ext.3:30 build/C/man2/symlink.2:35
120 #: build/C/man3/tempnam.3:28 build/C/man3/tmpfile.3:34
121 #: build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:35
122 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
123 #: build/C/man2/write.2:42
124 #, no-wrap
125 msgid "SYNOPSIS"
126 msgstr "書式"
127
128 #. type: Plain text
129 #: build/C/man3/asprintf.3:32
130 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
131 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
132
133 #. type: Plain text
134 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
135 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
136 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
137 #: build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:44
138 #: build/C/man3/stdio_ext.3:32
139 msgid "B<#include E<lt>stdio.hE<gt>>"
140 msgstr "B<#include E<lt>stdio.hE<gt>>"
141
142 #. type: Plain text
143 #: build/C/man3/asprintf.3:36
144 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
145 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
146
147 #. type: Plain text
148 #: build/C/man3/asprintf.3:38
149 msgid ""
150 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
151 msgstr ""
152 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
153
154 #. type: SH
155 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
156 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
157 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
158 #: build/C/man3/fflush.3:52 build/C/man3/fgetwc.3:30
159 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
160 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
161 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
162 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
163 #: build/C/man3/fseeko.3:37 build/C/man3/getline.3:58 build/C/man3/gets.3:46
164 #: build/C/man3/getw.3:59 build/C/man2/link.2:38 build/C/man2/llseek.2:43
165 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:65
166 #: build/C/man3/perror.3:55 build/C/man2/pipe.2:51 build/C/man3/popen.3:64
167 #: build/C/man3/printf.3:76 build/C/man3/puts.3:43 build/C/man2/read.2:44
168 #: build/C/man2/readlink.2:63 build/C/man2/readv.2:58 build/C/man3/remove.3:38
169 #: build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87
170 #: build/C/man3/setbuf.3:73 build/C/man3/stdin.3:24 build/C/man3/stdio.3:50
171 #: build/C/man3/stdio_ext.3:54 build/C/man2/symlink.2:52
172 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
173 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:39
174 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:60
175 #: build/C/man2/write.2:46
176 #, no-wrap
177 msgid "DESCRIPTION"
178 msgstr "説明"
179
180 #. type: Plain text
181 #: build/C/man3/asprintf.3:53
182 msgid ""
183 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
184 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
185 "hold the output including the terminating null byte (\\(aq\\e0\\(aq), and "
186 "return a pointer to it via the first argument.  This pointer should be "
187 "passed to B<free>(3)  to release the allocated storage when it is no longer "
188 "needed."
189 msgstr ""
190 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
191 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端の NULL バイト "
192 "(\\(aq\\e0\\(aq) も含めて)  保持するのに十分な大きさのメモリを確保し、 最初の"
193 "引数にその文字列へのポインタを返す。 このポインタは、不要になったら B<free>"
194 "(3)  に渡し、割り当てられた記憶領域を解放すべきである。"
195
196 #. type: SH
197 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
198 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
199 #: build/C/man3/fflush.3:74 build/C/man3/fgetwc.3:55
200 #: build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:176
201 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
202 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
203 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
204 #: build/C/man3/fseeko.3:75 build/C/man3/getline.3:110 build/C/man3/gets.3:111
205 #: build/C/man3/getw.3:73 build/C/man2/link.2:52 build/C/man2/llseek.2:62
206 #: build/C/man2/lseek.2:162 build/C/man2/open.2:567 build/C/man2/pipe.2:92
207 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
208 #: build/C/man2/readlink.2:77 build/C/man2/readv.2:177
209 #: build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40
210 #: build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152
211 #: build/C/man2/symlink.2:84 build/C/man3/tempnam.3:87
212 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:70 build/C/man2/unlink.2:55
213 #: build/C/man3/wprintf.3:205 build/C/man2/write.2:89
214 #, no-wrap
215 msgid "RETURN VALUE"
216 msgstr "返り値"
217
218 #. type: Plain text
219 #: build/C/man3/asprintf.3:61
220 msgid ""
221 "When successful, these functions return the number of bytes printed, just "
222 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
223 "error occurs, these functions will return -1, and the contents of I<strp> is "
224 "undefined."
225 msgstr ""
226 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
227 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
228 "は -1 を返し、 I<strp> の内容は未定義となる。"
229
230 #. type: SH
231 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67
232 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
233 #: build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115
234 #: build/C/man3/fflush.3:98 build/C/man3/fgetwc.3:70
235 #: build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:195
236 #: build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246
237 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
238 #: build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:168
239 #: build/C/man3/fseeko.3:87 build/C/man3/getline.3:137 build/C/man3/gets.3:138
240 #: build/C/man3/getw.3:80 build/C/man2/link.2:138 build/C/man2/llseek.2:81
241 #: build/C/man2/lseek.2:200 build/C/man2/open.2:719 build/C/man3/perror.3:111
242 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:172 build/C/man3/printf.3:806
243 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:125
244 #: build/C/man2/readv.2:214 build/C/man3/remove.3:70 build/C/man2/rename.2:232
245 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:164
246 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
247 #: build/C/man2/symlink.2:149 build/C/man3/tempnam.3:98
248 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:87
249 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:113
250 #: build/C/man3/wprintf.3:213 build/C/man2/write.2:185
251 #, no-wrap
252 msgid "CONFORMING TO"
253 msgstr "準拠"
254
255 #. type: Plain text
256 #: build/C/man3/asprintf.3:67
257 msgid ""
258 "These functions are GNU extensions, not in C or POSIX.  They are also "
259 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
260 "error."
261 msgstr ""
262 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
263 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
264 "る。"
265
266 #. type: SH
267 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77
268 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
269 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:122
270 #: build/C/man3/fflush.3:113 build/C/man3/fgetwc.3:87
271 #: build/C/man3/flockfile.3:143 build/C/man3/fmemopen.3:341
272 #: build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348
273 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
274 #: build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:170
275 #: build/C/man3/fseeko.3:93 build/C/man3/getline.3:171 build/C/man3/gets.3:173
276 #: build/C/man3/getw.3:86 build/C/man2/link.2:187 build/C/man2/llseek.2:87
277 #: build/C/man2/lseek.2:245 build/C/man3/lseek64.3:159 build/C/man2/open.2:992
278 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:201
279 #: build/C/man3/printf.3:1080 build/C/man3/puts.3:112 build/C/man2/read.2:187
280 #: build/C/man2/readlink.2:214 build/C/man2/readv.2:284
281 #: build/C/man3/remove.3:81 build/C/man2/rename.2:245 build/C/man2/rmdir.2:132
282 #: build/C/man3/scanf.3:715 build/C/man3/setbuf.3:200 build/C/man3/stdin.3:154
283 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151
284 #: build/C/man2/symlink.2:164 build/C/man7/symlink.7:471
285 #: build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97
286 #: build/C/man3/tmpnam.3:163 build/C/man2/unlink.2:148
287 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:253
288 #: build/C/man2/write.2:211
289 #, no-wrap
290 msgid "SEE ALSO"
291 msgstr "関連項目"
292
293 #. type: Plain text
294 #: build/C/man3/asprintf.3:71
295 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
296 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
297
298 #. type: SH
299 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79
300 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
301 #: build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:127
302 #: build/C/man3/fflush.3:121 build/C/man3/fgetwc.3:92
303 #: build/C/man3/flockfile.3:145 build/C/man3/fmemopen.3:344
304 #: build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354
305 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
306 #: build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:173
307 #: build/C/man3/fseeko.3:95 build/C/man3/getline.3:178 build/C/man3/gets.3:189
308 #: build/C/man3/getw.3:92 build/C/man2/link.2:197 build/C/man2/llseek.2:90
309 #: build/C/man2/lseek.2:252 build/C/man3/lseek64.3:162
310 #: build/C/man2/open.2:1014 build/C/man3/perror.3:144 build/C/man2/pipe.2:197
311 #: build/C/man3/popen.3:211 build/C/man3/printf.3:1089 build/C/man3/puts.3:124
312 #: build/C/man2/read.2:200 build/C/man2/readlink.2:222
313 #: build/C/man2/readv.2:288 build/C/man3/remove.3:92 build/C/man2/rename.2:254
314 #: build/C/man2/rmdir.2:141 build/C/man3/scanf.3:722 build/C/man3/setbuf.3:208
315 #: build/C/man3/stdin.3:160 build/C/man3/stdio.3:257
316 #: build/C/man3/stdio_ext.3:154 build/C/man2/symlink.2:176
317 #: build/C/man7/symlink.7:489 build/C/man3/tempnam.3:173
318 #: build/C/man3/tmpfile.3:103 build/C/man3/tmpnam.3:168
319 #: build/C/man2/unlink.2:161 build/C/man3/unlocked_stdio.3:139
320 #: build/C/man3/wprintf.3:260 build/C/man2/write.2:223
321 #, no-wrap
322 msgid "COLOPHON"
323 msgstr "この文書について"
324
325 #. type: Plain text
326 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:86
327 #: build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115
328 #: build/C/man3/fcloseall.3:75 build/C/man3/ferror.3:134
329 #: build/C/man3/fflush.3:128 build/C/man3/fgetwc.3:99
330 #: build/C/man3/flockfile.3:152 build/C/man3/fmemopen.3:351
331 #: build/C/man3/fmtmsg.3:319 build/C/man3/fopen.3:361
332 #: build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92
333 #: build/C/man3/fputwc.3:96 build/C/man3/fread.3:118 build/C/man3/fseek.3:180
334 #: build/C/man3/fseeko.3:102 build/C/man3/getline.3:185
335 #: build/C/man3/gets.3:196 build/C/man3/getw.3:99 build/C/man2/link.2:204
336 #: build/C/man2/llseek.2:97 build/C/man2/lseek.2:259
337 #: build/C/man3/lseek64.3:169 build/C/man2/open.2:1021
338 #: build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:218
339 #: build/C/man3/printf.3:1096 build/C/man3/puts.3:131 build/C/man2/read.2:207
340 #: build/C/man2/readlink.2:229 build/C/man2/readv.2:295
341 #: build/C/man3/remove.3:99 build/C/man2/rename.2:261 build/C/man2/rmdir.2:148
342 #: build/C/man3/scanf.3:729 build/C/man3/setbuf.3:215 build/C/man3/stdin.3:167
343 #: build/C/man3/stdio.3:264 build/C/man3/stdio_ext.3:161
344 #: build/C/man2/symlink.2:183 build/C/man7/symlink.7:496
345 #: build/C/man3/tempnam.3:180 build/C/man3/tmpfile.3:110
346 #: build/C/man3/tmpnam.3:175 build/C/man2/unlink.2:168
347 #: build/C/man3/unlocked_stdio.3:146 build/C/man3/wprintf.3:267
348 #: build/C/man2/write.2:230
349 msgid ""
350 "This page is part of release 3.53 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.53 の一部\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/fflush.3:93
437 #: build/C/man3/flockfile.3:127 build/C/man3/fmtmsg.3:225
438 #: build/C/man3/stdio_ext.3:132 build/C/man3/tmpnam.3:77
439 #, no-wrap
440 msgid "ATTRIBUTES"
441 msgstr "属性"
442
443 #. type: SS
444 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
445 #: build/C/man3/ferror.3:107 build/C/man3/fflush.3:94
446 #: build/C/man3/flockfile.3:128 build/C/man3/fmtmsg.3:226
447 #: build/C/man3/stdio_ext.3:133 build/C/man3/tmpnam.3:78
448 #, no-wrap
449 msgid "Multithreading (see pthreads(7))"
450 msgstr "マルチスレッディング (pthreads(7) 参照)"
451
452 #. type: Plain text
453 #: build/C/man3/ctermid.3:67
454 msgid ""
455 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
456 "safe if called with a NULL parameter."
457 msgstr ""
458 "B<ctermid>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
459 "れた場合はスレッドセーフではない。"
460
461 #. type: Plain text
462 #: build/C/man3/ctermid.3:69
463 msgid "Svr4, POSIX.1-2001."
464 msgstr "SVr4, POSIX.1-2001."
465
466 #. type: SH
467 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213
468 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82
469 #: build/C/man2/link.2:181 build/C/man2/open.2:981 build/C/man3/popen.3:178
470 #: build/C/man3/printf.3:929 build/C/man3/puts.3:105 build/C/man2/readv.2:258
471 #: build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129
472 #: build/C/man3/scanf.3:646 build/C/man3/setbuf.3:170
473 #: build/C/man3/tempnam.3:158 build/C/man3/tmpnam.3:156
474 #: build/C/man2/unlink.2:145
475 #, no-wrap
476 msgid "BUGS"
477 msgstr "バグ"
478
479 #. type: Plain text
480 #: build/C/man3/ctermid.3:73
481 msgid ""
482 "The path returned may not uniquely identify the controlling terminal; it "
483 "may, for example, be I</dev/tty>."
484 msgstr ""
485 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
486 "ように。"
487
488 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
489 #.  if ctermid() was given an argument; fixed in 2.4.
490 #. type: Plain text
491 #: build/C/man3/ctermid.3:77
492 msgid "It is not assured that the program can open the terminal."
493 msgstr "プログラムが端末をオープンできることは保証されていない。"
494
495 #. type: Plain text
496 #: build/C/man3/ctermid.3:79
497 msgid "B<ttyname>(3)"
498 msgstr "B<ttyname>(3)"
499
500 #. type: TH
501 #: build/C/man3/dprintf.3:26
502 #, no-wrap
503 msgid "DPRINTF"
504 msgstr "DPRINTF"
505
506 #. type: TH
507 #: build/C/man3/dprintf.3:26
508 #, no-wrap
509 msgid "2010-09-15"
510 msgstr "2010-09-15"
511
512 #. type: Plain text
513 #: build/C/man3/dprintf.3:29
514 msgid "dprintf, vdprintf - print to a file descriptor"
515 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
516
517 #. type: Plain text
518 #: build/C/man3/dprintf.3:33
519 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
520 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
521
522 #. type: Plain text
523 #: build/C/man3/dprintf.3:35
524 msgid ""
525 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
526 msgstr ""
527 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
528
529 #. type: Plain text
530 #: build/C/man3/dprintf.3:43
531 msgid "B<dprintf>(), B<vdprintf>():"
532 msgstr "B<dprintf>(), B<vdprintf>():"
533
534 #. type: TP
535 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
536 #: build/C/man3/getline.3:49
537 #, no-wrap
538 msgid "Since glibc 2.10:"
539 msgstr "glibc 2.10 以降:"
540
541 #. type: Plain text
542 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
543 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
544 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
545
546 #. type: TP
547 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
548 #: build/C/man3/getline.3:52
549 #, no-wrap
550 msgid "Before glibc 2.10:"
551 msgstr "glibc 2.10 より前:"
552
553 #. type: Plain text
554 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
555 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
556 msgid "_GNU_SOURCE"
557 msgstr "_GNU_SOURCE"
558
559 #. type: Plain text
560 #: build/C/man3/dprintf.3:69
561 msgid ""
562 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
563 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
564 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
565 msgstr ""
566 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
567 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
568 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
569 "行う。"
570
571 #.  .SH NOTES
572 #.  These functions are GNU extensions, not in C or POSIX.
573 #.  Clearly, the names were badly chosen.
574 #.  Many systems (like MacOS) have incompatible functions called
575 #.  .BR dprintf (),
576 #.  usually some debugging version of
577 #.  .BR printf (3),
578 #.  perhaps with a prototype like
579 #.  .BI "void dprintf(int level, const char *" format ", ...);"
580 #.  where the first argument is a debugging level (and output is to
581 #.  .IR stderr ).
582 #.  Moreover,
583 #.  .BR dprintf ()
584 #.  (or
585 #.  .BR DPRINTF )
586 #.  is also a popular macro name for a debugging printf.
587 #.  So, probably, it is better to avoid this function in programs
588 #.  intended to be portable.
589 #.  A better name would have been
590 #.  .BR fdprintf ().
591 #. type: Plain text
592 #: build/C/man3/dprintf.3:95
593 msgid ""
594 "These functions are GNU extensions that are nowadays specified in "
595 "POSIX.1-2008."
596 msgstr ""
597 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
598 "る。"
599
600 #. type: Plain text
601 #: build/C/man3/dprintf.3:97
602 msgid "B<printf>(3)"
603 msgstr "B<printf>(3)"
604
605 #. type: TH
606 #: build/C/man3/fclose.3:44
607 #, no-wrap
608 msgid "FCLOSE"
609 msgstr "FCLOSE"
610
611 #. type: TH
612 #: build/C/man3/fclose.3:44
613 #, no-wrap
614 msgid "2009-02-23"
615 msgstr "2009-02-23"
616
617 #. type: Plain text
618 #: build/C/man3/fclose.3:47
619 msgid "fclose - close a stream"
620 msgstr "fclose - ストリームを閉じる"
621
622 #. type: Plain text
623 #: build/C/man3/fclose.3:51
624 msgid "B<int fclose(FILE *>I<fp>B<);>"
625 msgstr "B<int fclose(FILE *>I<fp>B<);>"
626
627 #. type: Plain text
628 #: build/C/man3/fclose.3:59
629 msgid ""
630 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
631 "any buffered output data using B<fflush>(3))  and closes the underlying file "
632 "descriptor."
633 msgstr ""
634 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
635 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
636 "対応するファイルディスクリプタをクローズする。"
637
638 #. type: Plain text
639 #: build/C/man3/fclose.3:70
640 msgid ""
641 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
642 "I<errno> is set to indicate the error.  In either case any further access "
643 "(including another call to B<fclose>())  to the stream results in undefined "
644 "behavior."
645 msgstr ""
646 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
647 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
648 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
649 "は 未定義の動作を生じさせる。"
650
651 #. type: SH
652 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
653 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
654 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
655 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:84
656 #: build/C/man3/getline.3:125 build/C/man2/link.2:57 build/C/man2/llseek.2:69
657 #: build/C/man2/lseek.2:170 build/C/man2/open.2:575 build/C/man2/pipe.2:97
658 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:85
659 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96
660 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:89
661 #: build/C/man3/tempnam.3:94 build/C/man3/tmpfile.3:56
662 #: build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
663 #, no-wrap
664 msgid "ERRORS"
665 msgstr "エラー"
666
667 #. type: TP
668 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
669 #: build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:171
670 #: build/C/man2/read.2:114 build/C/man3/scanf.3:553 build/C/man2/write.2:126
671 #, no-wrap
672 msgid "B<EBADF>"
673 msgstr "B<EBADF>"
674
675 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
676 #.   low-level file operations on the same stream. If you do get this error,
677 #.   you must have closed the stream's low-level file descriptor using
678 #.   something like close(fileno(fp)).
679 #. type: Plain text
680 #: build/C/man3/fclose.3:80
681 msgid "The file descriptor underlying I<fp> is not valid."
682 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
683
684 #. type: Plain text
685 #: build/C/man3/fclose.3:90
686 msgid ""
687 "The B<fclose>()  function may also fail and set I<errno> for any of the "
688 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
689 msgstr ""
690 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
691 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
692 "された値に設定される。"
693
694 #. type: Plain text
695 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
696 msgid "C89, C99."
697 msgstr "C89, C99."
698
699 #. type: SH
700 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
701 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
702 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
703 #: build/C/man3/fseeko.3:89 build/C/man2/link.2:143 build/C/man2/llseek.2:84
704 #: build/C/man2/lseek.2:210 build/C/man2/open.2:746 build/C/man3/perror.3:124
705 #: build/C/man3/printf.3:867 build/C/man2/read.2:175
706 #: build/C/man2/readlink.2:130 build/C/man2/readv.2:226
707 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
708 #: build/C/man2/symlink.2:155 build/C/man3/tempnam.3:103
709 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:92
710 #: build/C/man3/wprintf.3:215 build/C/man2/write.2:194
711 #, no-wrap
712 msgid "NOTES"
713 msgstr "注意"
714
715 #. type: Plain text
716 #: build/C/man3/fclose.3:102
717 msgid ""
718 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
719 "library.  To ensure that the data is physically stored on disk the kernel "
720 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
721 msgstr ""
722 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
723 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
724 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
725 "ればならない。"
726
727 #. type: Plain text
728 #: build/C/man3/fclose.3:108
729 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
730 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
731
732 #. type: TH
733 #: build/C/man3/fcloseall.3:25
734 #, no-wrap
735 msgid "FCLOSEALL"
736 msgstr "FCLOSEALL"
737
738 #. type: Plain text
739 #: build/C/man3/fcloseall.3:28
740 msgid "fcloseall - close all open streams"
741 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
742
743 #. type: Plain text
744 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
745 #, no-wrap
746 msgid ""
747 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
748 "B<#include E<lt>stdio.hE<gt>>\n"
749 msgstr ""
750 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
751 "B<#include E<lt>stdio.hE<gt>>\n"
752
753 #. type: Plain text
754 #: build/C/man3/fcloseall.3:34
755 #, no-wrap
756 msgid "B<int fcloseall(void);>\n"
757 msgstr "B<int fcloseall(void);>\n"
758
759 #. type: Plain text
760 #: build/C/man3/fcloseall.3:43
761 msgid ""
762 "The B<fcloseall>()  function closes all of the calling process's open "
763 "streams.  Buffered output for each stream is written before it is closed (as "
764 "for B<fflush>(3)); buffered input is discarded."
765 msgstr ""
766 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
767 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
768 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
769 "れる。"
770
771 #. type: Plain text
772 #: build/C/man3/fcloseall.3:50
773 msgid ""
774 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
775 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
776
777 #. type: Plain text
778 #: build/C/man3/fcloseall.3:55
779 msgid ""
780 "This function returns 0 if all files were successfully closed; on error, "
781 "B<EOF> is returned."
782 msgstr ""
783 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
784 "B<EOF> を返す。"
785
786 #. type: Plain text
787 #: build/C/man3/fcloseall.3:60
788 msgid ""
789 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
790 "safe."
791 msgstr ""
792 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
793 "はない。"
794
795 #. type: Plain text
796 #: build/C/man3/fcloseall.3:62
797 msgid "This function is a GNU extension."
798 msgstr "この関数は GNU 拡張である。"
799
800 #. type: Plain text
801 #: build/C/man3/fcloseall.3:68
802 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
803 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
804
805 #. type: TH
806 #: build/C/man3/ferror.3:44
807 #, no-wrap
808 msgid "FERROR"
809 msgstr "FERROR"
810
811 #. type: Plain text
812 #: build/C/man3/ferror.3:47
813 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
814 msgstr ""
815 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
816
817 #. type: Plain text
818 #: build/C/man3/ferror.3:51
819 msgid "B<void clearerr(FILE *>I<stream>B<);>"
820 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
821
822 #. type: Plain text
823 #: build/C/man3/ferror.3:53
824 msgid "B<int feof(FILE *>I<stream>B<);>"
825 msgstr "B<int feof(FILE *>I<stream>B<);>"
826
827 #. type: Plain text
828 #: build/C/man3/ferror.3:55
829 msgid "B<int ferror(FILE *>I<stream>B<);>"
830 msgstr "B<int ferror(FILE *>I<stream>B<);>"
831
832 #. type: Plain text
833 #: build/C/man3/ferror.3:57
834 msgid "B<int fileno(FILE *>I<stream>B<);>"
835 msgstr "B<int fileno(FILE *>I<stream>B<);>"
836
837 #. type: Plain text
838 #: build/C/man3/ferror.3:65
839 msgid ""
840 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
841 msgstr ""
842 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
843
844 #. type: Plain text
845 #: build/C/man3/ferror.3:70
846 msgid ""
847 "The function B<clearerr>()  clears the end-of-file and error indicators for "
848 "the stream pointed to by I<stream>."
849 msgstr ""
850 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
851 "子とエラー指示子をクリアする。"
852
853 #. type: Plain text
854 #: build/C/man3/ferror.3:78
855 msgid ""
856 "The function B<feof>()  tests the end-of-file indicator for the stream "
857 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
858 "indicator can be cleared only by the function B<clearerr>()."
859 msgstr ""
860 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
861 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
862 "よってのみクリアすることができる。"
863
864 #. type: Plain text
865 #: build/C/man3/ferror.3:87
866 msgid ""
867 "The function B<ferror>()  tests the error indicator for the stream pointed "
868 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
869 "reset only by the B<clearerr>()  function."
870 msgstr ""
871 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
872 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
873 "()  によってのみリセットすることができる。"
874
875 #. type: Plain text
876 #: build/C/man3/ferror.3:93
877 msgid ""
878 "The function B<fileno>()  examines the argument I<stream> and returns its "
879 "integer descriptor."
880 msgstr ""
881 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
882
883 #. type: Plain text
884 #: build/C/man3/ferror.3:96 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54
885 #: build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
886 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
887 msgstr ""
888 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
889
890 #. type: Plain text
891 #: build/C/man3/ferror.3:106
892 msgid ""
893 "These functions should not fail and do not set the external variable "
894 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
895 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
896 msgstr ""
897 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
898 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
899 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
900
901 #. type: Plain text
902 #: build/C/man3/ferror.3:115
903 msgid ""
904 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
905 "thread-safe."
906 msgstr ""
907 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
908 "る。"
909
910 #. type: Plain text
911 #: build/C/man3/ferror.3:122
912 msgid ""
913 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
914 "C99."
915 msgstr ""
916 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
917
918 #. type: Plain text
919 #: build/C/man3/ferror.3:127
920 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
921 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
922
923 #. type: TH
924 #: build/C/man3/fflush.3:45
925 #, no-wrap
926 msgid "FFLUSH"
927 msgstr "FFLUSH"
928
929 #. type: TH
930 #: build/C/man3/fflush.3:45
931 #, fuzzy, no-wrap
932 #| msgid "2013-07-04"
933 msgid "2013-07-15"
934 msgstr "2013-07-04"
935
936 #. type: Plain text
937 #: build/C/man3/fflush.3:48
938 msgid "fflush - flush a stream"
939 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
940
941 #. type: Plain text
942 #: build/C/man3/fflush.3:52
943 msgid "B<int fflush(FILE *>I<stream>B<);>"
944 msgstr "B<int fflush(FILE *>I<stream>B<);>"
945
946 #. type: Plain text
947 #: build/C/man3/fflush.3:63
948 msgid ""
949 "For output streams, B<fflush>()  forces a write of all user-space buffered "
950 "data for the given output or update I<stream> via the stream's underlying "
951 "write function.  For input streams, B<fflush>()  discards any buffered data "
952 "that has been fetched from the underlying file, but has not been consumed by "
953 "the application.  The open status of the stream is unaffected."
954 msgstr ""
955 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
956 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
957 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
958 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
959 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
960 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
961 "い。"
962
963 #. type: Plain text
964 #: build/C/man3/fflush.3:71
965 msgid ""
966 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
967 "streams."
968 msgstr ""
969 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
970 "トリームをフラッシュする。"
971
972 #. type: Plain text
973 #: build/C/man3/fflush.3:74
974 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
975 msgstr ""
976 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
977 "と。"
978
979 #. type: Plain text
980 #: build/C/man3/fflush.3:81
981 msgid ""
982 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
983 "I<errno> is set to indicate the error."
984 msgstr ""
985 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
986 "ラーに対応した値に設定される。"
987
988 #. type: Plain text
989 #: build/C/man3/fflush.3:86
990 msgid "I<Stream> is not an open stream, or is not open for writing."
991 msgstr ""
992 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
993 "ない。"
994
995 #. type: Plain text
996 #: build/C/man3/fflush.3:93
997 msgid ""
998 "The function B<fflush>()  may also fail and set I<errno> for any of the "
999 "errors specified for B<write>(2)."
1000 msgstr ""
1001 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1002 "ある。 この場合 I<errno> もその値に設定される。"
1003
1004 #. type: Plain text
1005 #: build/C/man3/fflush.3:98
1006 #, fuzzy
1007 #| msgid "The B<tmpnam_r>()  function is thread-safe."
1008 msgid "The B<fflush>()  function is thread-safe."
1009 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
1010
1011 #. type: Plain text
1012 #: build/C/man3/fflush.3:100
1013 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1014 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1015
1016 #.  Verified on: Solaris 8.
1017 #. type: Plain text
1018 #: build/C/man3/fflush.3:104
1019 msgid ""
1020 "The standards do not specify the behavior for input streams.  Most other "
1021 "implementations behave the same as Linux."
1022 msgstr ""
1023 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1024 "は Linux と同じ動作をする。"
1025
1026 #. type: Plain text
1027 #: build/C/man3/fflush.3:113
1028 msgid ""
1029 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1030 "library.  To ensure that the data is physically stored on disk the kernel "
1031 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1032 msgstr ""
1033 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1034 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1035 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1036 "B<fsync>(2)  を用いる。"
1037
1038 #. type: Plain text
1039 #: build/C/man3/fflush.3:121
1040 msgid ""
1041 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1042 "(3), B<unlocked_stdio>(3)"
1043 msgstr ""
1044 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1045 "(3), B<unlocked_stdio>(3)"
1046
1047 #. type: TH
1048 #: build/C/man3/fgetwc.3:18
1049 #, no-wrap
1050 msgid "FGETWC"
1051 msgstr "FGETWC"
1052
1053 #. type: TH
1054 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/getline.3:26
1055 #: build/C/man3/popen.3:40 build/C/man3/tempnam.3:25
1056 #, no-wrap
1057 msgid "2013-04-19"
1058 msgstr "2013-04-19"
1059
1060 #. type: Plain text
1061 #: build/C/man3/fgetwc.3:21
1062 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1063 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1064
1065 #. type: Plain text
1066 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1067 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1068 #, no-wrap
1069 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1070 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1071
1072 #. type: Plain text
1073 #: build/C/man3/fgetwc.3:29
1074 #, no-wrap
1075 msgid ""
1076 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1077 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1078 msgstr ""
1079 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1080 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1081
1082 #. type: Plain text
1083 #: build/C/man3/fgetwc.3:44
1084 msgid ""
1085 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1086 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1087 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1088 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1089 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1090 msgstr ""
1091 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1092 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1093 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1094 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1095 "し、 B<WEOF> を返す。"
1096
1097 #. type: Plain text
1098 #: build/C/man3/fgetwc.3:52
1099 msgid ""
1100 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1101 "may be implemented as a macro, and may evaluate its argument more than "
1102 "once.  There is no reason ever to use it."
1103 msgstr ""
1104 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1105 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1106 "ない。この関数を使う理由はもはや存在しない。"
1107
1108 #. type: Plain text
1109 #: build/C/man3/fgetwc.3:64
1110 msgid ""
1111 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1112 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1113 msgstr ""
1114 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1115 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1116
1117 #. type: Plain text
1118 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1119 msgid "Apart from the usual ones, there is"
1120 msgstr "通常のエラーに加えて、以下のエラーがある:"
1121
1122 #. type: TP
1123 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1124 #, no-wrap
1125 msgid "B<EILSEQ>"
1126 msgstr "B<EILSEQ>"
1127
1128 #. type: Plain text
1129 #: build/C/man3/fgetwc.3:70
1130 msgid ""
1131 "The data obtained from the input stream does not form a valid character."
1132 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1133
1134 #. type: Plain text
1135 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1136 msgid "C99, POSIX.1-2001."
1137 msgstr "C99, POSIX.1-2001."
1138
1139 #. type: Plain text
1140 #: build/C/man3/fgetwc.3:79
1141 msgid ""
1142 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1143 "current locale."
1144 msgstr ""
1145 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1146
1147 #. type: Plain text
1148 #: build/C/man3/fgetwc.3:87
1149 msgid ""
1150 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1151 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1152 "sequence from the stream and then convert it to a wide character."
1153 msgstr ""
1154 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1155 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1156 "換すると期待することは適切である。"
1157
1158 #. type: Plain text
1159 #: build/C/man3/fgetwc.3:92
1160 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1161 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1162
1163 #. type: TH
1164 #: build/C/man3/flockfile.3:25
1165 #, no-wrap
1166 msgid "FLOCKFILE"
1167 msgstr "FLOCKFILE"
1168
1169 #. type: TH
1170 #: build/C/man3/flockfile.3:25
1171 #, fuzzy, no-wrap
1172 #| msgid "2013-07-04"
1173 msgid "2013-07-23"
1174 msgstr "2013-07-04"
1175
1176 #. type: Plain text
1177 #: build/C/man3/flockfile.3:28
1178 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1179 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1180
1181 #. type: Plain text
1182 #: build/C/man3/flockfile.3:33
1183 #, no-wrap
1184 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1185 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1186
1187 #. type: Plain text
1188 #: build/C/man3/flockfile.3:35
1189 #, no-wrap
1190 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1191 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1192
1193 #. type: Plain text
1194 #: build/C/man3/flockfile.3:37
1195 #, no-wrap
1196 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1197 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1198
1199 #. type: Plain text
1200 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1201 msgid "All functions shown above:"
1202 msgstr "上記の全ての関数:"
1203
1204 #. type: Plain text
1205 #: build/C/man3/flockfile.3:49
1206 msgid ""
1207 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1208 "|| _POSIX_SOURCE"
1209 msgstr ""
1210 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1211 "|| _POSIX_SOURCE"
1212
1213 #. type: Plain text
1214 #: build/C/man3/flockfile.3:63
1215 msgid ""
1216 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1217 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1218 "thread.  For each library call, these functions wait until the I<FILE> "
1219 "object is no longer locked by a different thread, then lock it, do the "
1220 "requested I/O, and unlock the object again."
1221 msgstr ""
1222 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1223 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1224 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1225 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1226 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1227 "オブジェクトのロックを解除する。"
1228
1229 #. type: Plain text
1230 #: build/C/man3/flockfile.3:69
1231 msgid ""
1232 "(Note: this locking has nothing to do with the file locking done by "
1233 "functions like B<flock>(2)  and B<lockf>(3).)"
1234 msgstr ""
1235 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1236 "全く無関係である。)"
1237
1238 #. type: Plain text
1239 #: build/C/man3/flockfile.3:77
1240 msgid ""
1241 "All this is invisible to the C-programmer, but there may be two reasons to "
1242 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1243 "actions by one thread belongs together, and should not be interrupted by the "
1244 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1245 "should be avoided for greater efficiency."
1246 msgstr ""
1247 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1248 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1249 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1250 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1251 "避ける必要があるということであろう。"
1252
1253 #. type: Plain text
1254 #: build/C/man3/flockfile.3:94
1255 msgid ""
1256 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1257 "series of I/O actions, then unlock.  This prevents other threads from coming "
1258 "in between.  If the reason for doing this was to achieve greater efficiency, "
1259 "one does the I/O with the nonlocking versions of the stdio functions: with "
1260 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1261 "B<putc>(3)."
1262 msgstr ""
1263 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1264 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1265 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1266 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1267 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1268 "B<putc_unlocked>(3)  を使用する。"
1269
1270 #. type: Plain text
1271 #: build/C/man3/flockfile.3:105
1272 msgid ""
1273 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1274 "by a different thread, then makes the current thread owner of "
1275 "I<*filehandle>, and increments the lockcount."
1276 msgstr ""
1277 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1278 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1279 "ロック数を加算する。"
1280
1281 #. type: Plain text
1282 #: build/C/man3/flockfile.3:109
1283 msgid "The B<funlockfile>()  function decrements the lock count."
1284 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1285
1286 #. type: Plain text
1287 #: build/C/man3/flockfile.3:120
1288 msgid ""
1289 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1290 "It does nothing in case some other thread owns I<*filehandle>, and it "
1291 "obtains ownership and increments the lockcount otherwise."
1292 msgstr ""
1293 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1294 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1295 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1296
1297 #. type: Plain text
1298 #: build/C/man3/flockfile.3:125
1299 msgid ""
1300 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1301 "obtained), and nonzero for failure."
1302 msgstr ""
1303 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1304 "の値を返す。"
1305
1306 #. type: Plain text
1307 #: build/C/man3/flockfile.3:127
1308 msgid "None."
1309 msgstr "なし。"
1310
1311 #. type: Plain text
1312 #: build/C/man3/flockfile.3:135
1313 #, fuzzy
1314 #| msgid ""
1315 #| "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
1316 #| "thread-safe."
1317 msgid ""
1318 "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are "
1319 "thread-safe."
1320 msgstr ""
1321 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
1322 "る。"
1323
1324 #. type: Plain text
1325 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1326 msgid "POSIX.1-2001."
1327 msgstr "POSIX.1-2001."
1328
1329 #. type: SH
1330 #: build/C/man3/flockfile.3:137
1331 #, no-wrap
1332 msgid "AVAILABILITY"
1333 msgstr "可用性"
1334
1335 #. type: Plain text
1336 #: build/C/man3/flockfile.3:143
1337 msgid ""
1338 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1339 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1340 msgstr ""
1341 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1342 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1343
1344 #. type: Plain text
1345 #: build/C/man3/flockfile.3:145
1346 msgid "B<unlocked_stdio>(3)"
1347 msgstr "B<unlocked_stdio>(3)"
1348
1349 #. type: TH
1350 #: build/C/man3/fmemopen.3:10
1351 #, no-wrap
1352 msgid "FMEMOPEN"
1353 msgstr "FMEMOPEN"
1354
1355 #. type: TH
1356 #: build/C/man3/fmemopen.3:10
1357 #, no-wrap
1358 msgid "2012-04-28"
1359 msgstr "2012-04-28"
1360
1361 #. type: Plain text
1362 #: build/C/man3/fmemopen.3:13
1363 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1364 msgstr ""
1365 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1366 "する"
1367
1368 #. type: Plain text
1369 #: build/C/man3/fmemopen.3:18
1370 #, no-wrap
1371 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1372 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1373
1374 #. type: Plain text
1375 #: build/C/man3/fmemopen.3:20
1376 #, no-wrap
1377 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1378 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1379
1380 #. type: Plain text
1381 #: build/C/man3/fmemopen.3:24
1382 #, no-wrap
1383 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1384 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1385
1386 #. type: Plain text
1387 #: build/C/man3/fmemopen.3:34
1388 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1389 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1390
1391 #. type: Plain text
1392 #: build/C/man3/fmemopen.3:57
1393 msgid ""
1394 "The B<fmemopen>()  function opens a stream that permits the access specified "
1395 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1396 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1397 "long."
1398 msgstr ""
1399 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1400 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1401 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1402 "I<size> バイトの長さでなければならない。"
1403
1404 #. type: Plain text
1405 #: build/C/man3/fmemopen.3:77
1406 msgid ""
1407 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1408 "an append mode, then the initial file position is set to the location of the "
1409 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1410 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1411 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1412 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1413 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1414 "e., the value specified by the I<size> argument), rather than the current "
1415 "string length."
1416 msgstr ""
1417 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1418 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1419 "最初の NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1420 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1421 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1422 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1423 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1424 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1425 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1426
1427 #. type: Plain text
1428 #: build/C/man3/fmemopen.3:89
1429 msgid ""
1430 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1431 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1432 "there is space.  The caller should ensure that an extra byte is available in "
1433 "the buffer (and that I<size> counts that byte)  to allow for this."
1434 msgstr ""
1435 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1436 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1437 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1438 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1439
1440 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1441 #.  and
1442 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1443 #. type: Plain text
1444 #: build/C/man3/fmemopen.3:107
1445 msgid ""
1446 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1447 "(By default, such errors will be visible only when the I<stdio> buffer is "
1448 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1449 "detect errors at the time of an output operation.  Alternatively, the caller "
1450 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1451 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1452 msgstr ""
1453 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1454 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1455 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1456 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1457 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1458 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1459 "stdio に教える方法がある。)"
1460
1461 #. type: Plain text
1462 #: build/C/man3/fmemopen.3:115
1463 msgid ""
1464 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1465 "not cause read operations to return an end-of-file indication.  A read from "
1466 "the buffer will only indicate end-of-file when the file pointer advances "
1467 "I<size> bytes past the start of the buffer."
1468 msgstr ""
1469 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1470 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1471 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1472 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1473
1474 #. type: Plain text
1475 #: build/C/man3/fmemopen.3:130
1476 msgid ""
1477 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1478 "buffer I<size> bytes long.  This is useful for an application that wants to "
1479 "write data to a temporary buffer and then read it back again.  The buffer is "
1480 "automatically freed when the stream is closed.  Note that the caller has no "
1481 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1482 "see B<open_memstream>()  below)."
1483 msgstr ""
1484 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1485 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1486 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1487 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1488 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1489 "の B<open_memstream>()  も参照)。"
1490
1491 #. type: Plain text
1492 #: build/C/man3/fmemopen.3:141
1493 msgid ""
1494 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1495 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1496 "automatically grows as required.  After closing the stream, the caller "
1497 "should B<free>(3)  this buffer."
1498 msgstr ""
1499 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1500 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1501 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1502 "B<free>(3)  すべきである。"
1503
1504 #. type: Plain text
1505 #: build/C/man3/fmemopen.3:156
1506 msgid ""
1507 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1508 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1509 "respectively, a pointer to the buffer and the current size of the buffer.  "
1510 "These values remain valid only as long as the caller performs no further "
1511 "output on the stream.  If further output is performed, then the stream must "
1512 "again be flushed before trying to access these variables."
1513 msgstr ""
1514 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1515 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1516 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1517 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1518 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1519
1520 #. type: Plain text
1521 #: build/C/man3/fmemopen.3:162
1522 msgid ""
1523 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1524 "included in the size value stored at I<sizeloc>."
1525 msgstr ""
1526 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1527 "されるサイズには「含まれない」。"
1528
1529 #. type: Plain text
1530 #: build/C/man3/fmemopen.3:170
1531 msgid ""
1532 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1533 "(3).  Moving the file position past the end of the data already written "
1534 "fills the intervening space with zeros."
1535 msgstr ""
1536 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1537 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1538 "は 0 で埋められる。"
1539
1540 #. type: Plain text
1541 #: build/C/man3/fmemopen.3:176
1542 msgid ""
1543 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1544 "wide characters instead of bytes."
1545 msgstr ""
1546 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1547 "ド文字に対して操作を行う点が異なる。"
1548
1549 #. type: Plain text
1550 #: build/C/man3/fmemopen.3:188
1551 msgid ""
1552 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1553 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1554 "and I<errno> is set to indicate the error."
1555 msgstr ""
1556 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1557 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1558 "し、 I<errno> にエラーを示す値をセットする。"
1559
1560 #. type: SH
1561 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1562 #: build/C/man3/getline.3:135 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1563 #, no-wrap
1564 msgid "VERSIONS"
1565 msgstr "バージョン"
1566
1567 #. type: Plain text
1568 #: build/C/man3/fmemopen.3:195
1569 msgid ""
1570 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1571 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1572 msgstr ""
1573 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1574 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1575
1576 #. type: Plain text
1577 #: build/C/man3/fmemopen.3:199
1578 msgid ""
1579 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1580 "not widely available on other systems."
1581 msgstr ""
1582 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1583 "のシステムで広く利用可能である。"
1584
1585 #.  http://austingroupbugs.net/view.php?id=396
1586 #. type: Plain text
1587 #: build/C/man3/fmemopen.3:207
1588 msgid ""
1589 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1590 "However, Technical Corrigendum 1 adjusts the standard to allow "
1591 "implementation-specific treatment for this case, thus permitting the glibc "
1592 "treatment of \\(aqb\\(aq."
1593 msgstr ""
1594 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1595 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1596 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1597 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1598
1599 #. type: Plain text
1600 #: build/C/man3/fmemopen.3:213
1601 msgid ""
1602 "There is no file descriptor associated with the file stream returned by "
1603 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1604 "returned stream)."
1605 msgstr ""
1606 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1607 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1608 "とになる)。"
1609
1610 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1611 #. type: Plain text
1612 #: build/C/man3/fmemopen.3:220
1613 msgid ""
1614 "In glibc before version 2.7, seeking past the end of a stream created by "
1615 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1616 "call fails, returning -1."
1617 msgstr ""
1618 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1619 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1620 "B<fseek>(3)  が失敗し -1 が返る。"
1621
1622 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1623 #. type: Plain text
1624 #: build/C/man3/fmemopen.3:231
1625 msgid ""
1626 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1627 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1628 "stream that then returned end of file on the first attempt at reading.  "
1629 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1630 msgstr ""
1631 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1632 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1633 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1634 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1635
1636 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1637 #. type: Plain text
1638 #: build/C/man3/fmemopen.3:239
1639 msgid ""
1640 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1641 "file position to the first null byte, but (if the file offset is reset to a "
1642 "location other than the end of the stream)  does not force subsequent writes "
1643 "to append at the end of the stream."
1644 msgstr ""
1645 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1646 "ファイル位置の初期値は最初の NULL バイトに設定されるが、(ファイル\n"
1647 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1648 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1649
1650 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1651 #. type: Plain text
1652 #: build/C/man3/fmemopen.3:255
1653 msgid ""
1654 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1655 "\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1656 "according to POSIX.1-2008, the initial file position should be set to the "
1657 "next byte after the end of the buffer.  However, in this case the glibc "
1658 "B<fmemopen>()  sets the file position to -1."
1659 msgstr ""
1660 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1661 "I<size> 引き数で指定した範囲の I<buf> 内に NULL バイトがない場合、\n"
1662 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1663 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1664 "この場合ファイル位置は -1 に設定される。"
1665
1666 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1667 #. type: Plain text
1668 #: build/C/man3/fmemopen.3:268
1669 msgid ""
1670 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1671 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1672 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1673 "I<mode> by B<fopen>(3)."
1674 msgstr ""
1675 "B<fmemopen>() でバイナリモードを指定するには、\n"
1676 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1677 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1678 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1679
1680 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1681 #. type: Plain text
1682 #: build/C/man3/fmemopen.3:276
1683 msgid ""
1684 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1685 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1686 msgstr ""
1687 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1688 "ABI (Application Binary Interface) が黙って変更された。\n"
1689 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1690
1691 #. type: SH
1692 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1693 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1694 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:973
1695 #: build/C/man2/readlink.2:157 build/C/man2/readv.2:265
1696 #: build/C/man3/scanf.3:681
1697 #, no-wrap
1698 msgid "EXAMPLE"
1699 msgstr "例"
1700
1701 #. type: Plain text
1702 #: build/C/man3/fmemopen.3:286
1703 msgid ""
1704 "The program below uses B<fmemopen>()  to open an input buffer, and "
1705 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1706 "scans its input string (taken from the program's first command-line "
1707 "argument) reading integers, and writes the squares of these integers to the "
1708 "output buffer.  An example of the output produced by this program is the "
1709 "following:"
1710 msgstr ""
1711 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1712 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1713 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1714 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1715 "ムの実行例は以下のようになる。"
1716
1717 #. type: Plain text
1718 #: build/C/man3/fmemopen.3:291
1719 #, no-wrap
1720 msgid ""
1721 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1722 "size=11; ptr=1 529 1849\n"
1723 msgstr ""
1724 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1725 "size=11; ptr=1 529 1849\n"
1726
1727 #. type: SS
1728 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1729 #, no-wrap
1730 msgid "Program source"
1731 msgstr "プログラムのソース"
1732
1733 #. type: Plain text
1734 #: build/C/man3/fmemopen.3:300
1735 #, no-wrap
1736 msgid ""
1737 "#define _GNU_SOURCE\n"
1738 "#include E<lt>string.hE<gt>\n"
1739 "#include E<lt>stdio.hE<gt>\n"
1740 "#include E<lt>stdlib.hE<gt>\n"
1741 msgstr ""
1742 "#define _GNU_SOURCE\n"
1743 "#include E<lt>string.hE<gt>\n"
1744 "#include E<lt>stdio.hE<gt>\n"
1745 "#include E<lt>stdlib.hE<gt>\n"
1746
1747 #. type: Plain text
1748 #: build/C/man3/fmemopen.3:303
1749 #, no-wrap
1750 msgid ""
1751 "#define handle_error(msg) \\e\n"
1752 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1753 msgstr ""
1754 "#define handle_error(msg) \\e\n"
1755 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1756
1757 #. type: Plain text
1758 #: build/C/man3/fmemopen.3:311
1759 #, no-wrap
1760 msgid ""
1761 "int\n"
1762 "main(int argc, char *argv[])\n"
1763 "{\n"
1764 "    FILE *out, *in;\n"
1765 "    int v, s;\n"
1766 "    size_t size;\n"
1767 "    char *ptr;\n"
1768 msgstr ""
1769 "int\n"
1770 "main(int argc, char *argv[])\n"
1771 "{\n"
1772 "    FILE *out, *in;\n"
1773 "    int v, s;\n"
1774 "    size_t size;\n"
1775 "    char *ptr;\n"
1776
1777 #. type: Plain text
1778 #: build/C/man3/fmemopen.3:316
1779 #, no-wrap
1780 msgid ""
1781 "    if (argc != 2) {\n"
1782 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1783 "\texit(EXIT_FAILURE);\n"
1784 "    }\n"
1785 msgstr ""
1786 "    if (argc != 2) {\n"
1787 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1788 "\texit(EXIT_FAILURE);\n"
1789 "    }\n"
1790
1791 #. type: Plain text
1792 #: build/C/man3/fmemopen.3:320
1793 #, no-wrap
1794 msgid ""
1795 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1796 "    if (in == NULL)\n"
1797 "        handle_error(\"fmemopen\");\n"
1798 msgstr ""
1799 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1800 "    if (in == NULL)\n"
1801 "        handle_error(\"fmemopen\");\n"
1802
1803 #. type: Plain text
1804 #: build/C/man3/fmemopen.3:324
1805 #, no-wrap
1806 msgid ""
1807 "    out = open_memstream(&ptr, &size);\n"
1808 "    if (out == NULL)\n"
1809 "        handle_error(\"open_memstream\");\n"
1810 msgstr ""
1811 "    out = open_memstream(&ptr, &size);\n"
1812 "    if (out == NULL)\n"
1813 "        handle_error(\"open_memstream\");\n"
1814
1815 #. type: Plain text
1816 #: build/C/man3/fmemopen.3:329
1817 #, no-wrap
1818 msgid ""
1819 "    for (;;) {\n"
1820 "        s = fscanf(in, \"%d\", &v);\n"
1821 "        if (s E<lt>= 0)\n"
1822 "            break;\n"
1823 msgstr ""
1824 "    for (;;) {\n"
1825 "        s = fscanf(in, \"%d\", &v);\n"
1826 "        if (s E<lt>= 0)\n"
1827 "            break;\n"
1828
1829 #. type: Plain text
1830 #: build/C/man3/fmemopen.3:340
1831 #, no-wrap
1832 msgid ""
1833 "        s = fprintf(out, \"%d \", v * v);\n"
1834 "        if (s == -1)\n"
1835 "            handle_error(\"fprintf\");\n"
1836 "    }\n"
1837 "    fclose(in);\n"
1838 "    fclose(out);\n"
1839 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1840 "    free(ptr);\n"
1841 "    exit(EXIT_SUCCESS);\n"
1842 "}\n"
1843 msgstr ""
1844 "        s = fprintf(out, \"%d \", v * v);\n"
1845 "        if (s == -1)\n"
1846 "            handle_error(\"fprintf\");\n"
1847 "    }\n"
1848 "    fclose(in);\n"
1849 "    fclose(out);\n"
1850 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1851 "    free(ptr);\n"
1852 "    exit(EXIT_SUCCESS);\n"
1853 "}\n"
1854
1855 #. type: Plain text
1856 #: build/C/man3/fmemopen.3:344
1857 msgid "B<fopen>(3), B<fopencookie>(3)"
1858 msgstr "B<fopen>(3), B<fopencookie>(3)"
1859
1860 #. type: TH
1861 #: build/C/man3/fmtmsg.3:13
1862 #, no-wrap
1863 msgid "FMTMSG"
1864 msgstr "FMTMSG"
1865
1866 #. type: Plain text
1867 #: build/C/man3/fmtmsg.3:16
1868 msgid "fmtmsg - print formatted error messages"
1869 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1870
1871 #. type: Plain text
1872 #: build/C/man3/fmtmsg.3:19
1873 #, no-wrap
1874 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1875 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1876
1877 #. type: Plain text
1878 #: build/C/man3/fmtmsg.3:21
1879 #, no-wrap
1880 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1881 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1882
1883 #. type: Plain text
1884 #: build/C/man3/fmtmsg.3:23
1885 #, no-wrap
1886 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1887 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1888
1889 #. type: Plain text
1890 #: build/C/man3/fmtmsg.3:25
1891 #, no-wrap
1892 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1893 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1894
1895 #. type: Plain text
1896 #: build/C/man3/fmtmsg.3:36
1897 msgid ""
1898 "This function displays a message described by its arguments on the device"
1899 "(s)  specified in the I<classification> argument.  For messages written to "
1900 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1901 msgstr ""
1902 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1903 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1904 "は、 B<MSGVERB> 環境変数に依存する。"
1905
1906 #. type: Plain text
1907 #: build/C/man3/fmtmsg.3:43
1908 msgid ""
1909 "The I<label> argument identifies the source of the message.  The string must "
1910 "consist of two colon separated parts where the first part has not more than "
1911 "10 and the second part not more than 14 characters."
1912 msgstr ""
1913 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1914 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1915 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1916
1917 #. type: Plain text
1918 #: build/C/man3/fmtmsg.3:47
1919 msgid "The I<text> argument describes the condition of the error."
1920 msgstr "I<text> 引き数にはエラー条件を記述する。"
1921
1922 #. type: Plain text
1923 #: build/C/man3/fmtmsg.3:52
1924 msgid ""
1925 "The I<action> argument describes possible steps to recover from the error.  "
1926 "If it is printed, it is prefixed by \"TO FIX: \"."
1927 msgstr ""
1928 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1929 "れが表示される場合、\"TO FIX: \" が前に付く。"
1930
1931 #. type: Plain text
1932 #: build/C/man3/fmtmsg.3:60
1933 msgid ""
1934 "The I<tag> argument is a reference to the online documentation where more "
1935 "information can be found.  It should contain the I<label> value and a unique "
1936 "identification number."
1937 msgstr ""
1938 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1939 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1940
1941 #. type: SS
1942 #: build/C/man3/fmtmsg.3:60
1943 #, no-wrap
1944 msgid "Dummy arguments"
1945 msgstr "ダミー引き数"
1946
1947 #. type: Plain text
1948 #: build/C/man3/fmtmsg.3:79
1949 msgid ""
1950 "Each of the arguments can have a dummy value.  The dummy classification "
1951 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1952 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1953 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1954 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
1955 "synonym for B<NO_SEV>."
1956 msgstr ""
1957 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1958 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1959 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1960 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1961 "((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名"
1962 "である。"
1963
1964 #. type: SS
1965 #: build/C/man3/fmtmsg.3:79
1966 #, no-wrap
1967 msgid "The classification argument"
1968 msgstr "classification 引き数"
1969
1970 #. type: Plain text
1971 #: build/C/man3/fmtmsg.3:83
1972 msgid ""
1973 "The I<classification> argument is the sum of values describing 4 types of "
1974 "information."
1975 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1976
1977 #. type: Plain text
1978 #: build/C/man3/fmtmsg.3:86
1979 msgid "The first value defines the output channel."
1980 msgstr "最初の値は出力チャンネルを定義する。"
1981
1982 #. type: TP
1983 #: build/C/man3/fmtmsg.3:86
1984 #, no-wrap
1985 msgid "B<MM_PRINT>"
1986 msgstr "B<MM_PRINT>"
1987
1988 #. type: Plain text
1989 #: build/C/man3/fmtmsg.3:90
1990 msgid "Output to I<stderr>."
1991 msgstr "I<stderr> に出力する。"
1992
1993 #. type: TP
1994 #: build/C/man3/fmtmsg.3:90
1995 #, no-wrap
1996 msgid "B<MM_CONSOLE>"
1997 msgstr "B<MM_CONSOLE>"
1998
1999 #. type: Plain text
2000 #: build/C/man3/fmtmsg.3:93
2001 msgid "Output to the system console."
2002 msgstr "システムコンソールに出力する。"
2003
2004 #. type: TP
2005 #: build/C/man3/fmtmsg.3:93
2006 #, no-wrap
2007 msgid "B<MM_PRINT | MM_CONSOLE>"
2008 msgstr "B<MM_PRINT | MM_CONSOLE>"
2009
2010 #. type: Plain text
2011 #: build/C/man3/fmtmsg.3:96
2012 msgid "Output to both."
2013 msgstr "両方に出力する。"
2014
2015 #. type: Plain text
2016 #: build/C/man3/fmtmsg.3:98
2017 msgid "The second value is the source of the error:"
2018 msgstr "2 番目の値はエラーの発生源である:"
2019
2020 #. type: TP
2021 #: build/C/man3/fmtmsg.3:98
2022 #, no-wrap
2023 msgid "B<MM_HARD>"
2024 msgstr "B<MM_HARD>"
2025
2026 #. type: Plain text
2027 #: build/C/man3/fmtmsg.3:101
2028 msgid "A hardware error occurred."
2029 msgstr "ハードウェアエラーが起こった。"
2030
2031 #. type: TP
2032 #: build/C/man3/fmtmsg.3:101
2033 #, no-wrap
2034 msgid "B<MM_FIRM>"
2035 msgstr "B<MM_FIRM>"
2036
2037 #. type: Plain text
2038 #: build/C/man3/fmtmsg.3:104
2039 msgid "A firmware error occurred."
2040 msgstr "ファームウェアエラーが起こった。"
2041
2042 #. type: TP
2043 #: build/C/man3/fmtmsg.3:104
2044 #, no-wrap
2045 msgid "B<MM_SOFT>"
2046 msgstr "B<MM_SOFT>"
2047
2048 #. type: Plain text
2049 #: build/C/man3/fmtmsg.3:107
2050 msgid "A software error occurred."
2051 msgstr "ソフトウェアエラーが起こった。"
2052
2053 #. type: Plain text
2054 #: build/C/man3/fmtmsg.3:109
2055 msgid "The third value encodes the detector of the problem:"
2056 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2057
2058 #. type: TP
2059 #: build/C/man3/fmtmsg.3:109
2060 #, no-wrap
2061 msgid "B<MM_APPL>"
2062 msgstr "B<MM_APPL>"
2063
2064 #. type: Plain text
2065 #: build/C/man3/fmtmsg.3:112
2066 msgid "It is detected by an application."
2067 msgstr "アプリケーションによって検知された。"
2068
2069 #. type: TP
2070 #: build/C/man3/fmtmsg.3:112
2071 #, no-wrap
2072 msgid "B<MM_UTIL>"
2073 msgstr "B<MM_UTIL>"
2074
2075 #. type: Plain text
2076 #: build/C/man3/fmtmsg.3:115
2077 msgid "It is detected by a utility."
2078 msgstr "ユーティリティによって検知された。"
2079
2080 #. type: TP
2081 #: build/C/man3/fmtmsg.3:115
2082 #, no-wrap
2083 msgid "B<MM_OPSYS>"
2084 msgstr "B<MM_OPSYS>"
2085
2086 #. type: Plain text
2087 #: build/C/man3/fmtmsg.3:118
2088 msgid "It is detected by the operating system."
2089 msgstr "オペレーティングシステムによって検知された。"
2090
2091 #. type: Plain text
2092 #: build/C/man3/fmtmsg.3:120
2093 msgid "The fourth value shows the severity of the incident:"
2094 msgstr "4 番目の値は問題の重大度を表す:"
2095
2096 #. type: TP
2097 #: build/C/man3/fmtmsg.3:120
2098 #, no-wrap
2099 msgid "B<MM_RECOVER>"
2100 msgstr "B<MM_RECOVER>"
2101
2102 #. type: Plain text
2103 #: build/C/man3/fmtmsg.3:123
2104 msgid "It is a recoverable error."
2105 msgstr "回復可能なエラーである。"
2106
2107 #. type: TP
2108 #: build/C/man3/fmtmsg.3:123
2109 #, no-wrap
2110 msgid "B<MM_NRECOV>"
2111 msgstr "B<MM_NRECOV>"
2112
2113 #. type: Plain text
2114 #: build/C/man3/fmtmsg.3:126
2115 msgid "It is a nonrecoverable error."
2116 msgstr "回復不可能なエラーである。"
2117
2118 #. type: SS
2119 #: build/C/man3/fmtmsg.3:126
2120 #, no-wrap
2121 msgid "The severity argument"
2122 msgstr "severity 引き数"
2123
2124 #. type: Plain text
2125 #: build/C/man3/fmtmsg.3:130
2126 msgid "The I<severity> argument can take one of the following values:"
2127 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2128
2129 #. type: TP
2130 #: build/C/man3/fmtmsg.3:130
2131 #, no-wrap
2132 msgid "B<MM_NOSEV>"
2133 msgstr "B<MM_NOSEV>"
2134
2135 #. type: Plain text
2136 #: build/C/man3/fmtmsg.3:133
2137 msgid "No severity is printed."
2138 msgstr "重大度は表示されない。"
2139
2140 #. type: TP
2141 #: build/C/man3/fmtmsg.3:133
2142 #, no-wrap
2143 msgid "B<MM_HALT>"
2144 msgstr "B<MM_HALT>"
2145
2146 #. type: Plain text
2147 #: build/C/man3/fmtmsg.3:136
2148 msgid "This value is printed as HALT."
2149 msgstr "この値は HALT として表示される。"
2150
2151 #. type: TP
2152 #: build/C/man3/fmtmsg.3:136
2153 #, no-wrap
2154 msgid "B<MM_ERROR>"
2155 msgstr "B<MM_ERROR>"
2156
2157 #. type: Plain text
2158 #: build/C/man3/fmtmsg.3:139
2159 msgid "This value is printed as ERROR."
2160 msgstr "この値は ERROR として表示される。"
2161
2162 #. type: TP
2163 #: build/C/man3/fmtmsg.3:139
2164 #, no-wrap
2165 msgid "B<MM_WARNING>"
2166 msgstr "B<MM_WARNING>"
2167
2168 #. type: Plain text
2169 #: build/C/man3/fmtmsg.3:142
2170 msgid "This value is printed as WARNING."
2171 msgstr "この値は WARNING として表示される。"
2172
2173 #. type: TP
2174 #: build/C/man3/fmtmsg.3:142
2175 #, no-wrap
2176 msgid "B<MM_INFO>"
2177 msgstr "B<MM_INFO>"
2178
2179 #. type: Plain text
2180 #: build/C/man3/fmtmsg.3:145
2181 msgid "This value is printed as INFO."
2182 msgstr "この値は INFO として表示される。"
2183
2184 #. type: Plain text
2185 #: build/C/man3/fmtmsg.3:152
2186 msgid ""
2187 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2188 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2189 "print."
2190 msgstr ""
2191 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2192 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2193
2194 #. type: Plain text
2195 #: build/C/man3/fmtmsg.3:154
2196 msgid "The function can return 4 values:"
2197 msgstr "関数は 4 つの値を返す:"
2198
2199 #. type: TP
2200 #: build/C/man3/fmtmsg.3:154
2201 #, no-wrap
2202 msgid "B<MM_OK>"
2203 msgstr "B<MM_OK>"
2204
2205 #. type: Plain text
2206 #: build/C/man3/fmtmsg.3:157
2207 msgid "Everything went smooth."
2208 msgstr "全てがうまくいった。"
2209
2210 #. type: TP
2211 #: build/C/man3/fmtmsg.3:157
2212 #, no-wrap
2213 msgid "B<MM_NOTOK>"
2214 msgstr "B<MM_NOTOK>"
2215
2216 #. type: Plain text
2217 #: build/C/man3/fmtmsg.3:160
2218 msgid "Complete failure."
2219 msgstr "完全に失敗した。"
2220
2221 #. type: TP
2222 #: build/C/man3/fmtmsg.3:160
2223 #, no-wrap
2224 msgid "B<MM_NOMSG>"
2225 msgstr "B<MM_NOMSG>"
2226
2227 #. type: Plain text
2228 #: build/C/man3/fmtmsg.3:164
2229 msgid "Error writing to I<stderr>."
2230 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2231
2232 #. type: TP
2233 #: build/C/man3/fmtmsg.3:164
2234 #, no-wrap
2235 msgid "B<MM_NOCON>"
2236 msgstr "B<MM_NOCON>"
2237
2238 #. type: Plain text
2239 #: build/C/man3/fmtmsg.3:167
2240 msgid "Error writing to the console."
2241 msgstr "コンソールに書き込むときにエラーが起こった。"
2242
2243 #. type: SH
2244 #: build/C/man3/fmtmsg.3:167
2245 #, no-wrap
2246 msgid "ENVIRONMENT"
2247 msgstr "環境変数"
2248
2249 #. type: Plain text
2250 #: build/C/man3/fmtmsg.3:178
2251 msgid ""
2252 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2253 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2254 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2255 "separated list of valid keywords, then only the parts of the message "
2256 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2257 "\"severity\", \"text\", \"action\" and \"tag\"."
2258 msgstr ""
2259 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2260 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2261 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2262 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2263 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2264
2265 #. type: Plain text
2266 #: build/C/man3/fmtmsg.3:190
2267 msgid ""
2268 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2269 "levels.  By default, only the five severity levels described above are "
2270 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2271 "If the user puts B<SEV_LEVEL> with a format like"
2272 msgstr ""
2273 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2274 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2275 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2276 "B<SEV_LEVEL> を"
2277
2278 #. type: Plain text
2279 #: build/C/man3/fmtmsg.3:193
2280 msgid "SEV_LEVEL=[description[:description[:...]]]"
2281 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2282
2283 #. type: Plain text
2284 #: build/C/man3/fmtmsg.3:198
2285 msgid ""
2286 "in the environment of the process before the first call to B<fmtmsg>(), "
2287 "where each description is of the form"
2288 msgstr ""
2289 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2290 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2291 "指定された printstring を表示する。 各 description は"
2292
2293 #. type: Plain text
2294 #: build/C/man3/fmtmsg.3:201
2295 msgid "severity-keyword,level,printstring"
2296 msgstr "severity-keyword,level,printstring"
2297
2298 #. type: Plain text
2299 #: build/C/man3/fmtmsg.3:208
2300 msgid ""
2301 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2302 "addition to the standard levels 0-4), and use the indicated printstring when "
2303 "such a level occurs."
2304 msgstr "という形式である。"
2305
2306 #. type: Plain text
2307 #: build/C/man3/fmtmsg.3:222
2308 msgid ""
2309 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2310 "present.  The level part is a string representation of a number.  The "
2311 "numeric value must be a number greater than 4.  This value must be used in "
2312 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2313 "possible to overwrite any of the predefined classes.  The printstring is the "
2314 "string printed when a message of this class is processed by B<fmtmsg>()."
2315 msgstr ""
2316 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2317 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2318 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2319 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2320 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2321 "た場合に表示される文字列である。"
2322
2323 #. type: Plain text
2324 #: build/C/man3/fmtmsg.3:225
2325 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2326 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2327
2328 #. type: Plain text
2329 #: build/C/man3/fmtmsg.3:231
2330 msgid ""
2331 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2332 "not protected, so it is not thread-safe."
2333 msgstr ""
2334 "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的"
2335 "な変数を使うため、 スレッドセーフではない。"
2336
2337 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2338 #. type: Plain text
2339 #: build/C/man3/fmtmsg.3:237
2340 msgid ""
2341 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2342 "static variable, so it is thread-safe."
2343 msgstr ""
2344 "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護してお"
2345 "り、 スレッドセーフである。"
2346
2347 #. type: Plain text
2348 #: build/C/man3/fmtmsg.3:252
2349 msgid ""
2350 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2351 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2352 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2353 msgstr ""
2354 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2355 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2356 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2357
2358 #. type: Plain text
2359 #: build/C/man3/fmtmsg.3:256
2360 msgid ""
2361 "System V and UnixWare man pages tell us that these functions have been "
2362 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2363 "vlfmt()\", and will be removed later."
2364 msgstr ""
2365 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2366 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2367 "は削除される予定である」と書かれている。"
2368
2369 #. type: Plain text
2370 #: build/C/man3/fmtmsg.3:261
2371 #, no-wrap
2372 msgid ""
2373 "#include E<lt>stdio.hE<gt>\n"
2374 "#include E<lt>stdlib.hE<gt>\n"
2375 "#include E<lt>fmtmsg.hE<gt>\n"
2376 msgstr ""
2377 "#include E<lt>stdio.hE<gt>\n"
2378 "#include E<lt>stdlib.hE<gt>\n"
2379 "#include E<lt>fmtmsg.hE<gt>\n"
2380
2381 #. type: Plain text
2382 #: build/C/man3/fmtmsg.3:267
2383 #, no-wrap
2384 msgid ""
2385 "int\n"
2386 "main(void)\n"
2387 "{\n"
2388 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2389 "    int err;\n"
2390 msgstr ""
2391 "int\n"
2392 "main(void)\n"
2393 "{\n"
2394 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2395 "    int err;\n"
2396
2397 #. type: Plain text
2398 #: build/C/man3/fmtmsg.3:288
2399 #, no-wrap
2400 msgid ""
2401 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2402 "                \"unknown mount option\", \"See mount(8).\",\n"
2403 "                \"util-linux:mount:017\");\n"
2404 "    switch (err) {\n"
2405 "    case MM_OK:\n"
2406 "        break;\n"
2407 "    case MM_NOTOK:\n"
2408 "        printf(\"Nothing printed\\en\");\n"
2409 "        break;\n"
2410 "    case MM_NOMSG:\n"
2411 "        printf(\"Nothing printed to stderr\\en\");\n"
2412 "        break;\n"
2413 "    case MM_NOCON:\n"
2414 "        printf(\"No console output\\en\");\n"
2415 "        break;\n"
2416 "    default:\n"
2417 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2418 "    }\n"
2419 "    exit(EXIT_SUCCESS);\n"
2420 "}\n"
2421 msgstr ""
2422 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2423 "                \"unknown mount option\", \"See mount(8).\",\n"
2424 "                \"util-linux:mount:017\");\n"
2425 "    switch (err) {\n"
2426 "    case MM_OK:\n"
2427 "      break;\n"
2428 "    case MM_NOTOK:\n"
2429 "        printf(\"Nothing printed\\en\");\n"
2430 "        break;\n"
2431 "    case MM_NOMSG:\n"
2432 "        printf(\"Nothing printed to stderr\\en\");\n"
2433 "        break;\n"
2434 "    case MM_NOCON:\n"
2435 "        printf(\"No console output\\en\");\n"
2436 "        break;\n"
2437 "    default:\n"
2438 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2439 "    }\n"
2440 "    exit(EXIT_SUCCESS);\n"
2441 "}\n"
2442
2443 #. type: Plain text
2444 #: build/C/man3/fmtmsg.3:291
2445 msgid "The output should be:"
2446 msgstr "出力は"
2447
2448 #. type: Plain text
2449 #: build/C/man3/fmtmsg.3:295
2450 #, no-wrap
2451 msgid ""
2452 "    util-linux:mount: ERROR: unknown mount option\n"
2453 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2454 msgstr ""
2455 "    util-linux:mount: ERROR: unknown mount option\n"
2456 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2457
2458 #. type: Plain text
2459 #: build/C/man3/fmtmsg.3:298
2460 msgid "and after"
2461 msgstr "のようになり、"
2462
2463 #. type: Plain text
2464 #: build/C/man3/fmtmsg.3:301
2465 #, no-wrap
2466 msgid "    MSGVERB=text:action; export MSGVERB\n"
2467 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2468
2469 #. type: Plain text
2470 #: build/C/man3/fmtmsg.3:304
2471 msgid "the output becomes:"
2472 msgstr "を実行すると、次のようになる。"
2473
2474 #. type: Plain text
2475 #: build/C/man3/fmtmsg.3:308
2476 #, no-wrap
2477 msgid ""
2478 "    unknown mount option\n"
2479 "    TO FIX: See mount(8).\n"
2480 msgstr ""
2481 "    unknown mount option\n"
2482 "    TO FIX: See mount(8).\n"
2483
2484 #. type: Plain text
2485 #: build/C/man3/fmtmsg.3:312
2486 msgid "B<addseverity>(3), B<perror>(3)"
2487 msgstr "B<addseverity>(3), B<perror>(3)"
2488
2489 #. type: TH
2490 #: build/C/man3/fopen.3:44
2491 #, no-wrap
2492 msgid "FOPEN"
2493 msgstr "FOPEN"
2494
2495 #. type: TH
2496 #: build/C/man3/fopen.3:44
2497 #, no-wrap
2498 msgid "2012-04-22"
2499 msgstr "2012-04-22"
2500
2501 #. type: Plain text
2502 #: build/C/man3/fopen.3:47
2503 msgid "fopen, fdopen, freopen - stream open functions"
2504 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2505
2506 #. type: Plain text
2507 #: build/C/man3/fopen.3:52
2508 #, no-wrap
2509 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2510 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2511
2512 #. type: Plain text
2513 #: build/C/man3/fopen.3:54
2514 #, no-wrap
2515 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2516 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2517
2518 #. type: Plain text
2519 #: build/C/man3/fopen.3:56
2520 #, no-wrap
2521 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2522 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2523
2524 #. type: Plain text
2525 #: build/C/man3/fopen.3:65
2526 msgid ""
2527 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2528 msgstr ""
2529 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2530
2531 #. type: Plain text
2532 #: build/C/man3/fopen.3:71
2533 msgid ""
2534 "The B<fopen>()  function opens the file whose name is the string pointed to "
2535 "by I<path> and associates a stream with it."
2536 msgstr ""
2537 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2538 "びつける。"
2539
2540 #. type: Plain text
2541 #: build/C/man3/fopen.3:76
2542 msgid ""
2543 "The argument I<mode> points to a string beginning with one of the following "
2544 "sequences (possibly followed by additional characters, as described below):"
2545 msgstr ""
2546 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2547 "る (以下の述べる、追加の文字が後に続くこともある):"
2548
2549 #. type: TP
2550 #: build/C/man3/fopen.3:76
2551 #, no-wrap
2552 msgid "B<r>"
2553 msgstr "B<r>"
2554
2555 #. type: Plain text
2556 #: build/C/man3/fopen.3:80
2557 msgid ""
2558 "Open text file for reading.  The stream is positioned at the beginning of "
2559 "the file."
2560 msgstr ""
2561 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2562 "る。"
2563
2564 #. type: TP
2565 #: build/C/man3/fopen.3:80
2566 #, no-wrap
2567 msgid "B<r+>"
2568 msgstr "B<r+>"
2569
2570 #. type: Plain text
2571 #: build/C/man3/fopen.3:84
2572 msgid ""
2573 "Open for reading and writing.  The stream is positioned at the beginning of "
2574 "the file."
2575 msgstr ""
2576 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2577 "る。"
2578
2579 #. type: TP
2580 #: build/C/man3/fopen.3:84
2581 #, no-wrap
2582 msgid "B<w>"
2583 msgstr "B<w>"
2584
2585 #. type: Plain text
2586 #: build/C/man3/fopen.3:88
2587 msgid ""
2588 "Truncate file to zero length or create text file for writing.  The stream is "
2589 "positioned at the beginning of the file."
2590 msgstr ""
2591 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2592 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2593 "頭に位置される。"
2594
2595 #. type: TP
2596 #: build/C/man3/fopen.3:88
2597 #, no-wrap
2598 msgid "B<w+>"
2599 msgstr "B<w+>"
2600
2601 #. type: Plain text
2602 #: build/C/man3/fopen.3:94
2603 msgid ""
2604 "Open for reading and writing.  The file is created if it does not exist, "
2605 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2606 "file."
2607 msgstr ""
2608 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2609 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2610 "の先頭に位置される。"
2611
2612 #. type: TP
2613 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2614 #, no-wrap
2615 msgid "B<a>"
2616 msgstr "B<a>"
2617
2618 #. type: Plain text
2619 #: build/C/man3/fopen.3:99
2620 msgid ""
2621 "Open for appending (writing at end of file).  The file is created if it does "
2622 "not exist.  The stream is positioned at the end of the file."
2623 msgstr ""
2624 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2625 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2626
2627 #. type: TP
2628 #: build/C/man3/fopen.3:99
2629 #, no-wrap
2630 msgid "B<a+>"
2631 msgstr "B<a+>"
2632
2633 #. type: Plain text
2634 #: build/C/man3/fopen.3:105
2635 msgid ""
2636 "Open for reading and appending (writing at end of file).  The file is "
2637 "created if it does not exist.  The initial file position for reading is at "
2638 "the beginning of the file, but output is always appended to the end of the "
2639 "file."
2640 msgstr ""
2641 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2642 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2643 "あるが、 書き込みは常にファイルの最後に追加される。"
2644
2645 #. type: Plain text
2646 #: build/C/man3/fopen.3:118
2647 msgid ""
2648 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2649 "character or as a character between the characters in any of the two-"
2650 "character strings described above.  This is strictly for compatibility with "
2651 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2652 "systems, including Linux.  (Other systems may treat text files and binary "
2653 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2654 "O to a binary file and expect that your program may be ported to non-UNIX "
2655 "environments.)"
2656 msgstr ""
2657 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2658 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2659 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2660 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2661 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2662 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2663 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2664 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2665
2666 #. type: Plain text
2667 #: build/C/man3/fopen.3:121
2668 msgid "See NOTES below for details of glibc extensions for I<mode>."
2669 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2670
2671 #. type: Plain text
2672 #: build/C/man3/fopen.3:126
2673 msgid ""
2674 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2675 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2676 "umask value (see B<umask>(2))."
2677 msgstr ""
2678 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2679 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2680 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2681
2682 #. type: Plain text
2683 #: build/C/man3/fopen.3:141
2684 msgid ""
2685 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2686 "that ANSI C requires that a file positioning function intervene between "
2687 "output and input, unless an input operation encounters end-of-file.  (If "
2688 "this condition is not met, then a read is allowed to return the result of "
2689 "writes other than the most recent.)  Therefore it is good practice (and "
2690 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2691 "(3)  operation between write and read operations on such a stream.  This "
2692 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2693 "for its synchronizing side effect."
2694 msgstr ""
2695 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2696 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2697 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2698 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2699 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2700 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2701 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2702 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2703 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2704 "い)。"
2705
2706 #. type: Plain text
2707 #: build/C/man3/fopen.3:146
2708 msgid ""
2709 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2710 "causes all subsequent write operations to this stream to occur at end-of-"
2711 "file, as if preceded the call:"
2712 msgstr ""
2713 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2714 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2715 "かのように) ファイルの末尾で行われる。"
2716
2717 #. type: Plain text
2718 #: build/C/man3/fopen.3:149
2719 #, no-wrap
2720 msgid "    fseek(stream, 0, SEEK_END);\n"
2721 msgstr "    fseek(stream, 0, SEEK_END);\n"
2722
2723 #. type: Plain text
2724 #: build/C/man3/fopen.3:171
2725 msgid ""
2726 "The B<fdopen>()  function associates a stream with the existing file "
2727 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2728 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2729 "file descriptor.  The file position indicator of the new stream is set to "
2730 "that belonging to I<fd>, and the error and end-of-file indicators are "
2731 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2732 "file descriptor is not dup'ed, and will be closed when the stream created by "
2733 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2734 "memory object is undefined."
2735 msgstr ""
2736 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2737 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2738 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2739 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2740 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2741 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2742 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2743 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2744
2745 #. type: Plain text
2746 #: build/C/man3/fopen.3:189
2747 msgid ""
2748 "The B<freopen>()  function opens the file whose name is the string pointed "
2749 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2750 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2751 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2752 "function is to change the file associated with a standard text stream "
2753 "(I<stderr>, I<stdin>, or I<stdout>)."
2754 msgstr ""
2755 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2756 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2757 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2758 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2759 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2760
2761 #. type: Plain text
2762 #: build/C/man3/fopen.3:201
2763 msgid ""
2764 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2765 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2766 "indicate the error."
2767 msgstr ""
2768 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2769 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2770
2771 #. type: TP
2772 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2773 #: build/C/man3/getline.3:126 build/C/man2/llseek.2:77
2774 #: build/C/man2/lseek.2:175 build/C/man2/pipe.2:102 build/C/man2/read.2:126
2775 #: build/C/man2/read.2:137 build/C/man2/readlink.2:95
2776 #: build/C/man2/readlink.2:104 build/C/man2/readv.2:200
2777 #: build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:565
2778 #: build/C/man2/write.2:154
2779 #, no-wrap
2780 msgid "B<EINVAL>"
2781 msgstr "B<EINVAL>"
2782
2783 #. type: Plain text
2784 #: build/C/man3/fopen.3:212
2785 msgid ""
2786 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2787 "invalid."
2788 msgstr ""
2789 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2790
2791 #. type: Plain text
2792 #: build/C/man3/fopen.3:222
2793 msgid ""
2794 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2795 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2796 msgstr ""
2797 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2798 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2799 "する。"
2800
2801 #. type: Plain text
2802 #: build/C/man3/fopen.3:229
2803 msgid ""
2804 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2805 "errors specified for the routine B<open>(2)."
2806 msgstr ""
2807 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2808 "があり、 その時は対応する値に I<errno> をセットする。"
2809
2810 #. type: Plain text
2811 #: build/C/man3/fopen.3:236
2812 msgid ""
2813 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2814 "errors specified for the routine B<fcntl>(2)."
2815 msgstr ""
2816 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2817 "とがあり、 その時は対応する値に I<errno> をセットする。"
2818
2819 #. type: Plain text
2820 #: build/C/man3/fopen.3:246
2821 msgid ""
2822 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2823 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2824 msgstr ""
2825 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2826 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2827 "トする。"
2828
2829 #. type: Plain text
2830 #: build/C/man3/fopen.3:255
2831 msgid ""
2832 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2833 "()  function conforms to POSIX.1-1990."
2834 msgstr ""
2835 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2836 "は POSIX.1-1990 に準拠している。"
2837
2838 #. type: SS
2839 #: build/C/man3/fopen.3:256
2840 #, no-wrap
2841 msgid "Glibc notes"
2842 msgstr "glibc での注意"
2843
2844 #. type: Plain text
2845 #: build/C/man3/fopen.3:259
2846 msgid ""
2847 "The GNU C library allows the following extensions for the string specified "
2848 "in I<mode>:"
2849 msgstr ""
2850 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2851 "いる:"
2852
2853 #. type: TP
2854 #: build/C/man3/fopen.3:259
2855 #, no-wrap
2856 msgid "B<c> (since glibc 2.3.3)"
2857 msgstr "B<c> (glibc 2.3.3 以降)"
2858
2859 #. type: Plain text
2860 #: build/C/man3/fopen.3:266
2861 msgid ""
2862 "Do not make the open operation, or subsequent read and write operations, "
2863 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2864 msgstr ""
2865 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2866 "(cancellation points) を作成しない。\n"
2867 "このフラグは B<fdopen>() では無視される。"
2868
2869 #. type: TP
2870 #: build/C/man3/fopen.3:266
2871 #, no-wrap
2872 msgid "B<e> (since glibc 2.7)"
2873 msgstr "B<e> (glibc 2.7 以降)"
2874
2875 #. type: Plain text
2876 #: build/C/man3/fopen.3:276
2877 msgid ""
2878 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2879 "information.  This flag is ignored for B<fdopen>()."
2880 msgstr ""
2881 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2882 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2883
2884 #. type: TP
2885 #: build/C/man3/fopen.3:276
2886 #, no-wrap
2887 msgid "B<m> (since glibc 2.3)"
2888 msgstr "B<m> (glibc 2.3 以降)"
2889
2890 #.  As at glibc 2.4:
2891 #. type: Plain text
2892 #: build/C/man3/fopen.3:288
2893 msgid ""
2894 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2895 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
2896 "for a file opened for reading."
2897 msgstr ""
2898 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2899 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2900 "オープンするファイルについてだけである。"
2901
2902 #. type: TP
2903 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2904 #, no-wrap
2905 msgid "B<x>"
2906 msgstr "B<x>"
2907
2908 #.  Since glibc 2.0?
2909 #.  FIXME C11 specifies this flag
2910 #. type: Plain text
2911 #: build/C/man3/fopen.3:305
2912 msgid ""
2913 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2914 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2915 "This flag is ignored for B<fdopen>()."
2916 msgstr ""
2917 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2918 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2919 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2920
2921 #. type: Plain text
2922 #: build/C/man3/fopen.3:313
2923 msgid ""
2924 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2925 "the following syntax in I<mode>:"
2926 msgstr ""
2927 "上記の文字に加えて、\n"
2928 "B<fopen>() と B<freopen>() では I<mode> に\n"
2929 "以下の書式を 指定することができる。"
2930
2931 #. type: Plain text
2932 #: build/C/man3/fopen.3:315
2933 msgid "B< ,ccs=>I<string>"
2934 msgstr "B< ,ccs=>I<string>"
2935
2936 #. type: Plain text
2937 #: build/C/man3/fopen.3:331
2938 msgid ""
2939 "The given I<string> is taken as the name of a coded character set and the "
2940 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2941 "functions convert I/O to and from the character set I<string>.  If the B<,"
2942 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2943 "stream is determined by the first file operation.  If that operation is a "
2944 "wide-character operation, the stream is marked wide-oriented, and functions "
2945 "to convert to the coded character set are loaded."
2946 msgstr ""
2947 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2948 "ストリームではワイド文字のストリームとして扱われる。\n"
2949 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2950 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2951 "ストリームをワイド文字のストリームとして扱うかは\n"
2952 "最初のファイル操作時に決定される。\n"
2953 "最初のファイル操作がワイド文字操作であった場合は、\n"
2954 "そのストリームはワイド文字のストリームとして扱われ、\n"
2955 "符号化文字集合との変換を行う関数が読み込まれる。"
2956
2957 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2958 #. type: Plain text
2959 #: build/C/man3/fopen.3:348
2960 msgid ""
2961 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2962 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
2963 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2964 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2965 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2966 "B<fdopen>()  parses at most 5 characters in I<mode>."
2967 msgstr ""
2968 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2969 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2970 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2971 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2972 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2973 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2974
2975 #. type: Plain text
2976 #: build/C/man3/fopen.3:354
2977 msgid ""
2978 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2979 msgstr ""
2980 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2981
2982 #. type: TH
2983 #: build/C/man3/fopencookie.3:26
2984 #, no-wrap
2985 msgid "FOPENCOOKIE"
2986 msgstr "FOPENCOOKIE"
2987
2988 #. type: TH
2989 #: build/C/man3/fopencookie.3:26
2990 #, no-wrap
2991 msgid "2013-03-17"
2992 msgstr "2013-03-17"
2993
2994 #. type: TH
2995 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31
2996 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
2997 #: build/C/man2/open.2:51 build/C/man2/pipe.2:36 build/C/man2/read.2:35
2998 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32
2999 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13
3000 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
3001 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
3002 #, no-wrap
3003 msgid "Linux"
3004 msgstr "Linux"
3005
3006 #. type: Plain text
3007 #: build/C/man3/fopencookie.3:29
3008 msgid "fopencookie - opening a custom stream"
3009 msgstr ""
3010
3011 #. type: Plain text
3012 #: build/C/man3/fopencookie.3:36
3013 #, no-wrap
3014 msgid ""
3015 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3016 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3017 msgstr ""
3018 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3019 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3020
3021 #. type: Plain text
3022 #: build/C/man3/fopencookie.3:49
3023 msgid ""
3024 "The B<fopencookie>()  function allows the programmer to create a custom "
3025 "implementation for a standard I/O stream.  This implementation can store the "
3026 "stream's data at a location of its own choosing; for example, B<fopencookie>"
3027 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
3028 "to data that is stored in a buffer in memory."
3029 msgstr ""
3030
3031 #. type: Plain text
3032 #: build/C/man3/fopencookie.3:51
3033 msgid "In order to create a custom stream the programmer must:"
3034 msgstr ""
3035
3036 #. type: IP
3037 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3038 #: build/C/man3/fopencookie.3:65 build/C/man2/open.2:469
3039 #: build/C/man2/open.2:477 build/C/man2/open.2:483 build/C/man2/open.2:489
3040 #: build/C/man2/open.2:496 build/C/man2/open.2:502 build/C/man3/scanf.3:633
3041 #: build/C/man3/scanf.3:638 build/C/man3/scanf.3:644
3042 #: build/C/man7/symlink.7:249 build/C/man7/symlink.7:259
3043 #: build/C/man7/symlink.7:289 build/C/man7/symlink.7:349
3044 #: build/C/man7/symlink.7:378 build/C/man7/symlink.7:407
3045 #: build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
3046 #, no-wrap
3047 msgid "*"
3048 msgstr "*"
3049
3050 #. type: Plain text
3051 #: build/C/man3/fopencookie.3:54
3052 msgid ""
3053 "Implement four \"hook\" functions that are used internally by the standard I/"
3054 "O library when performing I/O on the stream."
3055 msgstr ""
3056
3057 #. type: Plain text
3058 #: build/C/man3/fopencookie.3:65
3059 msgid ""
3060 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3061 "information (e.g., where to store data) used by the aforementioned hook "
3062 "functions.  The standard I/O package knows nothing about the contents of "
3063 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3064 "()), but automatically supplies the cookie as the first argument when "
3065 "calling the hook functions."
3066 msgstr ""
3067
3068 #. type: Plain text
3069 #: build/C/man3/fopencookie.3:70
3070 msgid ""
3071 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3072 "hook functions with that stream."
3073 msgstr ""
3074
3075 #. type: Plain text
3076 #: build/C/man3/fopencookie.3:78
3077 msgid ""
3078 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3079 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3080 "operate on that stream."
3081 msgstr ""
3082
3083 #. type: Plain text
3084 #: build/C/man3/fopencookie.3:85
3085 msgid ""
3086 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3087 "to be associated with the new stream.  This pointer is supplied as the first "
3088 "argument when the standard I/O library invokes any of the hook functions "
3089 "described below."
3090 msgstr ""
3091
3092 #. type: Plain text
3093 #: build/C/man3/fopencookie.3:101
3094 msgid ""
3095 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3096 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3097 "See B<fopen>(3)  for details."
3098 msgstr ""
3099
3100 #. type: Plain text
3101 #: build/C/man3/fopencookie.3:107
3102 msgid ""
3103 "The I<io_funcs> argument is a structure that contains four fields pointing "
3104 "to the programmer-defined hook functions that are used to implement this "
3105 "stream.  The structure is defined as follows"
3106 msgstr ""
3107
3108 #. type: Plain text
3109 #: build/C/man3/fopencookie.3:116
3110 #, no-wrap
3111 msgid ""
3112 "typedef struct {\n"
3113 "    cookie_read_function_t  *read;\n"
3114 "    cookie_write_function_t *write;\n"
3115 "    cookie_seek_function_t  *seek;\n"
3116 "    cookie_close_function_t *close;\n"
3117 "} cookie_io_functions_t;\n"
3118 msgstr ""
3119 "typedef struct {\n"
3120 "    cookie_read_function_t  *read;\n"
3121 "    cookie_write_function_t *write;\n"
3122 "    cookie_seek_function_t  *seek;\n"
3123 "    cookie_close_function_t *close;\n"
3124 "} cookie_io_functions_t;\n"
3125
3126 #. type: Plain text
3127 #: build/C/man3/fopencookie.3:120
3128 msgid "The four fields are as follows:"
3129 msgstr ""
3130
3131 #. type: TP
3132 #: build/C/man3/fopencookie.3:120
3133 #, no-wrap
3134 msgid "I<cookie_read_function_t *read>"
3135 msgstr "I<cookie_read_function_t *read>"
3136
3137 #. type: Plain text
3138 #: build/C/man3/fopencookie.3:124
3139 msgid ""
3140 "This function implements read operations for the stream.  When called, it "
3141 "receives three arguments:"
3142 msgstr ""
3143
3144 #. type: Plain text
3145 #: build/C/man3/fopencookie.3:126
3146 #, no-wrap
3147 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3148 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3149
3150 #. type: Plain text
3151 #: build/C/man3/fopencookie.3:141
3152 msgid ""
3153 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3154 "input data can be placed and the size of that buffer.  As its function "
3155 "result, the I<read> function should return the number of bytes copied into "
3156 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3157 "update the stream offset appropriately."
3158 msgstr ""
3159
3160 #. type: Plain text
3161 #: build/C/man3/fopencookie.3:146
3162 msgid ""
3163 "If I<*read> is a NULL pointer, then reads from the custom stream always "
3164 "return end of file."
3165 msgstr ""
3166
3167 #. type: TP
3168 #: build/C/man3/fopencookie.3:146
3169 #, no-wrap
3170 msgid "I<cookie_write_function_t *write>"
3171 msgstr "I<cookie_write_function_t *write>"
3172
3173 #. type: Plain text
3174 #: build/C/man3/fopencookie.3:150
3175 msgid ""
3176 "This function implements write operations for the stream.  When called, it "
3177 "receives three arguments:"
3178 msgstr ""
3179
3180 #. type: Plain text
3181 #: build/C/man3/fopencookie.3:152
3182 #, no-wrap
3183 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3184 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3185
3186 #. type: Plain text
3187 #: build/C/man3/fopencookie.3:168
3188 msgid ""
3189 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3190 "output to the stream and the size of that buffer.  As its function result, "
3191 "the I<write> function should return the number of bytes copied from I<buf>, "
3192 "or 0 on error.  (The function must not return a negative value.)  The "
3193 "I<write> function should update the stream offset appropriately."
3194 msgstr ""
3195
3196 #. type: Plain text
3197 #: build/C/man3/fopencookie.3:173
3198 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3199 msgstr ""
3200
3201 #. type: TP
3202 #: build/C/man3/fopencookie.3:173
3203 #, no-wrap
3204 msgid "I<cookie_seek_function_t *seek>"
3205 msgstr "I<cookie_seek_function_t *seek>"
3206
3207 #. type: Plain text
3208 #: build/C/man3/fopencookie.3:177
3209 msgid ""
3210 "This function implements seek operations on the stream.  When called, it "
3211 "receives three arguments:"
3212 msgstr ""
3213
3214 #. type: Plain text
3215 #: build/C/man3/fopencookie.3:179
3216 #, no-wrap
3217 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3218 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3219
3220 #. type: Plain text
3221 #: build/C/man3/fopencookie.3:185
3222 msgid ""
3223 "The I<*offset> argument specifies the new file offset depending on which of "
3224 "the following three values is supplied in I<whence>:"
3225 msgstr ""
3226
3227 #. type: TP
3228 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3229 #, no-wrap
3230 msgid "B<SEEK_SET>"
3231 msgstr "B<SEEK_SET>"
3232
3233 #. type: Plain text
3234 #: build/C/man3/fopencookie.3:191
3235 msgid ""
3236 "The stream offset should be set I<*offset> bytes from the start of the "
3237 "stream."
3238 msgstr ""
3239
3240 #. type: TP
3241 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3242 #, no-wrap
3243 msgid "B<SEEK_CUR>"
3244 msgstr "B<SEEK_CUR>"
3245
3246 #. type: Plain text
3247 #: build/C/man3/fopencookie.3:195
3248 msgid "I<*offset> should be added to the current stream offset."
3249 msgstr ""
3250
3251 #. type: TP
3252 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3253 #, no-wrap
3254 msgid "B<SEEK_END>"
3255 msgstr "B<SEEK_END>"
3256
3257 #. type: Plain text
3258 #: build/C/man3/fopencookie.3:199
3259 msgid ""
3260 "The stream offset should be set to the size of the stream plus I<*offset>."
3261 msgstr ""
3262
3263 #. type: Plain text
3264 #: build/C/man3/fopencookie.3:206
3265 msgid ""
3266 "Before returning, the I<seek> function should update I<*offset> to indicate "
3267 "the new stream offset."
3268 msgstr ""
3269
3270 #. type: Plain text
3271 #: build/C/man3/fopencookie.3:210
3272 msgid ""
3273 "As its function result, the I<seek> function should return 0 on success, and "
3274 "-1 on error."
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man3/fopencookie.3:215
3279 msgid ""
3280 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3281 "operations on the stream."
3282 msgstr ""
3283
3284 #. type: TP
3285 #: build/C/man3/fopencookie.3:215
3286 #, no-wrap
3287 msgid "I<cookie_close_function_t *close>"
3288 msgstr "I<cookie_close_function_t *close>"
3289
3290 #. type: Plain text
3291 #: build/C/man3/fopencookie.3:221
3292 msgid ""
3293 "This function closes the stream.  The hook function can do things such as "
3294 "freeing buffers allocated for the stream.  When called, it receives one "
3295 "argument:"
3296 msgstr ""
3297
3298 #. type: Plain text
3299 #: build/C/man3/fopencookie.3:223
3300 #, no-wrap
3301 msgid "    int close(void *cookie);\n"
3302 msgstr "    int close(void *cookie);\n"
3303
3304 #. type: Plain text
3305 #: build/C/man3/fopencookie.3:228
3306 msgid ""
3307 "The I<cookie> argument is the cookie that the programmer supplied when "
3308 "calling B<fopencookie>()."
3309 msgstr ""
3310
3311 #. type: Plain text
3312 #: build/C/man3/fopencookie.3:234
3313 msgid ""
3314 "As its function result, the I<close> function should return 0 on success, "
3315 "and B<EOF> on error."
3316 msgstr ""
3317
3318 #. type: Plain text
3319 #: build/C/man3/fopencookie.3:238
3320 msgid ""
3321 "If I<*close> is NULL, then no special action is performed when the stream is "
3322 "closed."
3323 msgstr ""
3324
3325 #.  .SH ERRORS
3326 #.  It's not clear if errno ever gets set...
3327 #. type: Plain text
3328 #: build/C/man3/fopencookie.3:245
3329 msgid ""
3330 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3331 "NULL is returned."
3332 msgstr ""
3333
3334 #. type: Plain text
3335 #: build/C/man3/fopencookie.3:247
3336 msgid "This function is a nonstandard GNU extension."
3337 msgstr ""
3338
3339 #. type: Plain text
3340 #: build/C/man3/fopencookie.3:256
3341 msgid ""
3342 "The program below implements a custom stream whose functionality is similar "
3343 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3344 "stream whose data is stored in a memory buffer.  The program writes its "
3345 "command-line arguments to the stream, and then seeks through the stream "
3346 "reading two out of every five characters and writing them to standard "
3347 "output.  The following shell session demonstrates the use of the program:"
3348 msgstr ""
3349
3350 #. type: Plain text
3351 #: build/C/man3/fopencookie.3:264
3352 #, no-wrap
3353 msgid ""
3354 "$B< ./a.out \\(aqhello world\\(aq>\n"
3355 "/he/\n"
3356 "/ w/\n"
3357 "/d/\n"
3358 "Reached end of file\n"
3359 msgstr ""
3360 "$B< ./a.out \\(aqhello world\\(aq>\n"
3361 "/he/\n"
3362 "/ w/\n"
3363 "/d/\n"
3364 "Reached end of file\n"
3365
3366 #. type: Plain text
3367 #: build/C/man3/fopencookie.3:271
3368 msgid ""
3369 "Note that a more general version of the program below could be improved to "
3370 "more robustly handle various error situations (e.g., opening a stream with a "
3371 "cookie that already has an open stream; closing a stream that has already "
3372 "been closed)."
3373 msgstr ""
3374
3375 #. type: Plain text
3376 #: build/C/man3/fopencookie.3:280
3377 #, no-wrap
3378 msgid ""
3379 "#define _GNU_SOURCE\n"
3380 "#include E<lt>sys/types.hE<gt>\n"
3381 "#include E<lt>stdio.hE<gt>\n"
3382 "#include E<lt>stdlib.hE<gt>\n"
3383 "#include E<lt>unistd.hE<gt>\n"
3384 "#include E<lt>string.hE<gt>\n"
3385 msgstr ""
3386 "#define _GNU_SOURCE\n"
3387 "#include E<lt>sys/types.hE<gt>\n"
3388 "#include E<lt>stdio.hE<gt>\n"
3389 "#include E<lt>stdlib.hE<gt>\n"
3390 "#include E<lt>unistd.hE<gt>\n"
3391 "#include E<lt>string.hE<gt>\n"
3392
3393 #. type: Plain text
3394 #: build/C/man3/fopencookie.3:282
3395 #, no-wrap
3396 msgid "#define INIT_BUF_SIZE 4\n"
3397 msgstr "#define INIT_BUF_SIZE 4\n"
3398
3399 #. type: Plain text
3400 #: build/C/man3/fopencookie.3:289
3401 #, no-wrap
3402 msgid ""
3403 "struct memfile_cookie {\n"
3404 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3405 "    size_t  allocated;  /* Size of buf */\n"
3406 "    size_t  endpos;     /* Number of characters in buf */\n"
3407 "    off_t   offset;     /* Current file offset in buf */\n"
3408 "};\n"
3409 msgstr ""
3410 "struct memfile_cookie {\n"
3411 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3412 "    size_t  allocated;  /* Size of buf */\n"
3413 "    size_t  endpos;     /* Number of characters in buf */\n"
3414 "    off_t   offset;     /* Current file offset in buf */\n"
3415 "};\n"
3416
3417 #. type: Plain text
3418 #: build/C/man3/fopencookie.3:295
3419 #, no-wrap
3420 msgid ""
3421 "ssize_t\n"
3422 "memfile_write(void *c, const char *buf, size_t size)\n"
3423 "{\n"
3424 "    char *new_buff;\n"
3425 "    struct memfile_cookie *cookie = c;\n"
3426 msgstr ""
3427 "ssize_t\n"
3428 "memfile_write(void *c, const char *buf, size_t size)\n"
3429 "{\n"
3430 "    char *new_buff;\n"
3431 "    struct memfile_cookie *cookie = c;\n"
3432
3433 #. type: Plain text
3434 #: build/C/man3/fopencookie.3:297
3435 #, no-wrap
3436 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3437 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3438
3439 #. type: Plain text
3440 #: build/C/man3/fopencookie.3:307
3441 #, no-wrap
3442 msgid ""
3443 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3444 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3445 "        if (new_buff == NULL) {\n"
3446 "            return -1;\n"
3447 "        } else {\n"
3448 "            cookie-E<gt>allocated *= 2;\n"
3449 "            cookie-E<gt>buf = new_buff;\n"
3450 "        }\n"
3451 "    }\n"
3452 msgstr ""
3453 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3454 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3455 "        if (new_buff == NULL) {\n"
3456 "            return -1;\n"
3457 "        } else {\n"
3458 "            cookie-E<gt>allocated *= 2;\n"
3459 "            cookie-E<gt>buf = new_buff;\n"
3460 "        }\n"
3461 "    }\n"
3462
3463 #. type: Plain text
3464 #: build/C/man3/fopencookie.3:309
3465 #, no-wrap
3466 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3467 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3468
3469 #. type: Plain text
3470 #: build/C/man3/fopencookie.3:313
3471 #, no-wrap
3472 msgid ""
3473 "    cookie-E<gt>offset += size;\n"
3474 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3475 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3476 msgstr ""
3477 "    cookie-E<gt>offset += size;\n"
3478 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3479 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3480
3481 #. type: Plain text
3482 #: build/C/man3/fopencookie.3:316
3483 #, no-wrap
3484 msgid ""
3485 "    return size;\n"
3486 "}\n"
3487 msgstr ""
3488 "    return size;\n"
3489 "}\n"
3490
3491 #. type: Plain text
3492 #: build/C/man3/fopencookie.3:322
3493 #, no-wrap
3494 msgid ""
3495 "ssize_t\n"
3496 "memfile_read(void *c, char *buf, size_t size)\n"
3497 "{\n"
3498 "    ssize_t xbytes;\n"
3499 "    struct memfile_cookie *cookie = c;\n"
3500 msgstr ""
3501 "ssize_t\n"
3502 "memfile_read(void *c, char *buf, size_t size)\n"
3503 "{\n"
3504 "    ssize_t xbytes;\n"
3505 "    struct memfile_cookie *cookie = c;\n"
3506
3507 #. type: Plain text
3508 #: build/C/man3/fopencookie.3:324
3509 #, no-wrap
3510 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3511 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3512
3513 #. type: Plain text
3514 #: build/C/man3/fopencookie.3:330
3515 #, no-wrap
3516 msgid ""
3517 "    xbytes = size;\n"
3518 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3519 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3520 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3521 "       xbytes = 0;\n"
3522 msgstr ""
3523 "    xbytes = size;\n"
3524 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3525 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3526 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3527 "       xbytes = 0;\n"
3528
3529 #. type: Plain text
3530 #: build/C/man3/fopencookie.3:332
3531 #, no-wrap
3532 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3533 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3534
3535 #. type: Plain text
3536 #: build/C/man3/fopencookie.3:336
3537 #, no-wrap
3538 msgid ""
3539 "    cookie-E<gt>offset += xbytes;\n"
3540 "    return xbytes;\n"
3541 "}\n"
3542 msgstr ""
3543 "    cookie-E<gt>offset += xbytes;\n"
3544 "    return xbytes;\n"
3545 "}\n"
3546
3547 #. type: Plain text
3548 #: build/C/man3/fopencookie.3:342
3549 #, no-wrap
3550 msgid ""
3551 "int\n"
3552 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3553 "{\n"
3554 "    off64_t new_offset;\n"
3555 "    struct memfile_cookie *cookie = c;\n"
3556 msgstr ""
3557 "int\n"
3558 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3559 "{\n"
3560 "    off64_t new_offset;\n"
3561 "    struct memfile_cookie *cookie = c;\n"
3562
3563 #. type: Plain text
3564 #: build/C/man3/fopencookie.3:351
3565 #, no-wrap
3566 msgid ""
3567 "    if (whence == SEEK_SET)\n"
3568 "        new_offset = *offset;\n"
3569 "    else if (whence == SEEK_END)\n"
3570 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3571 "    else if (whence == SEEK_CUR)\n"
3572 "        new_offset = cookie-E<gt>offset + *offset;\n"
3573 "    else\n"
3574 "        return -1;\n"
3575 msgstr ""
3576 "    if (whence == SEEK_SET)\n"
3577 "        new_offset = *offset;\n"
3578 "    else if (whence == SEEK_END)\n"
3579 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3580 "    else if (whence == SEEK_CUR)\n"
3581 "        new_offset = cookie-E<gt>offset + *offset;\n"
3582 "    else\n"
3583 "        return -1;\n"
3584
3585 #. type: Plain text
3586 #: build/C/man3/fopencookie.3:354
3587 #, no-wrap
3588 msgid ""
3589 "    if (new_offset E<lt> 0)\n"
3590 "        return -1;\n"
3591 msgstr ""
3592 "    if (new_offset E<lt> 0)\n"
3593 "        return -1;\n"
3594
3595 #. type: Plain text
3596 #: build/C/man3/fopencookie.3:359
3597 #, no-wrap
3598 msgid ""
3599 "    cookie-E<gt>offset = new_offset;\n"
3600 "    *offset = new_offset;\n"
3601 "    return 0;\n"
3602 "}\n"
3603 msgstr ""
3604 "    cookie-E<gt>offset = new_offset;\n"
3605 "    *offset = new_offset;\n"
3606 "    return 0;\n"
3607 "}\n"
3608
3609 #. type: Plain text
3610 #: build/C/man3/fopencookie.3:364
3611 #, no-wrap
3612 msgid ""
3613 "int\n"
3614 "memfile_close(void *c)\n"
3615 "{\n"
3616 "    struct memfile_cookie *cookie = c;\n"
3617 msgstr ""
3618 "int\n"
3619 "memfile_close(void *c)\n"
3620 "{\n"
3621 "    struct memfile_cookie *cookie = c;\n"
3622
3623 #. type: Plain text
3624 #: build/C/man3/fopencookie.3:368
3625 #, no-wrap
3626 msgid ""
3627 "    free(cookie-E<gt>buf);\n"
3628 "    cookie-E<gt>allocated = 0;\n"
3629 "    cookie-E<gt>buf = NULL;\n"
3630 msgstr ""
3631 "    free(cookie-E<gt>buf);\n"
3632 "    cookie-E<gt>allocated = 0;\n"
3633 "    cookie-E<gt>buf = NULL;\n"
3634
3635 #. type: Plain text
3636 #: build/C/man3/fopencookie.3:371
3637 #, no-wrap
3638 msgid ""
3639 "    return 0;\n"
3640 "}\n"
3641 msgstr ""
3642 "    return 0;\n"
3643 "}\n"
3644
3645 #. type: Plain text
3646 #: build/C/man3/fopencookie.3:387
3647 #, no-wrap
3648 msgid ""
3649 "int\n"
3650 "main(int argc, char *argv[])\n"
3651 "{\n"
3652 "    cookie_io_functions_t  memfile_func = {\n"
3653 "        .read  = memfile_read,\n"
3654 "        .write = memfile_write,\n"
3655 "        .seek  = memfile_seek,\n"
3656 "        .close = memfile_close\n"
3657 "    };\n"
3658 "    FILE *fp;\n"
3659 "    struct memfile_cookie mycookie;\n"
3660 "    ssize_t nread;\n"
3661 "    long p;\n"
3662 "    int j;\n"
3663 "    char buf[1000];\n"
3664 msgstr ""
3665 "int\n"
3666 "main(int argc, char *argv[])\n"
3667 "{\n"
3668 "    cookie_io_functions_t  memfile_func = {\n"
3669 "        .read  = memfile_read,\n"
3670 "        .write = memfile_write,\n"
3671 "        .seek  = memfile_seek,\n"
3672 "        .close = memfile_close\n"
3673 "    };\n"
3674 "    FILE *fp;\n"
3675 "    struct memfile_cookie mycookie;\n"
3676 "    ssize_t nread;\n"
3677 "    long p;\n"
3678 "    int j;\n"
3679 "    char buf[1000];\n"
3680
3681 #. type: Plain text
3682 #: build/C/man3/fopencookie.3:389
3683 #, no-wrap
3684 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3685 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3686
3687 #. type: Plain text
3688 #: build/C/man3/fopencookie.3:395
3689 #, no-wrap
3690 msgid ""
3691 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3692 "    if (mycookie.buf == NULL) {\n"
3693 "        perror(\"malloc\");\n"
3694 "        exit(EXIT_FAILURE);\n"
3695 "    }\n"
3696 msgstr ""
3697 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3698 "    if (mycookie.buf == NULL) {\n"
3699 "        perror(\"malloc\");\n"
3700 "        exit(EXIT_FAILURE);\n"
3701 "    }\n"
3702
3703 #. type: Plain text
3704 #: build/C/man3/fopencookie.3:399
3705 #, no-wrap
3706 msgid ""
3707 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3708 "    mycookie.offset = 0;\n"
3709 "    mycookie.endpos = 0;\n"
3710 msgstr ""
3711 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3712 "    mycookie.offset = 0;\n"
3713 "    mycookie.endpos = 0;\n"
3714
3715 #. type: Plain text
3716 #: build/C/man3/fopencookie.3:405
3717 #, no-wrap
3718 msgid ""
3719 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3720 "    if (fp == NULL) {\n"
3721 "        perror(\"fopencookie\");\n"
3722 "        exit(EXIT_FAILURE);\n"
3723 "    }\n"
3724 msgstr ""
3725 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3726 "    if (fp == NULL) {\n"
3727 "        perror(\"fopencookie\");\n"
3728 "        exit(EXIT_FAILURE);\n"
3729 "    }\n"
3730
3731 #. type: Plain text
3732 #: build/C/man3/fopencookie.3:407
3733 #, no-wrap
3734 msgid "    /* Write command-line arguments to our file */\n"
3735 msgstr "    /* Write command-line arguments to our file */\n"
3736
3737 #. type: Plain text
3738 #: build/C/man3/fopencookie.3:413
3739 #, no-wrap
3740 msgid ""
3741 "    for (j = 1; j E<lt> argc; j++)\n"
3742 "        if (fputs(argv[j], fp) == EOF) {\n"
3743 "            perror(\"fputs\");\n"
3744 "            exit(EXIT_FAILURE);\n"
3745 "        }\n"
3746 msgstr ""
3747 "    for (j = 1; j E<lt> argc; j++)\n"
3748 "        if (fputs(argv[j], fp) == EOF) {\n"
3749 "            perror(\"fputs\");\n"
3750 "            exit(EXIT_FAILURE);\n"
3751 "        }\n"
3752
3753 #. type: Plain text
3754 #: build/C/man3/fopencookie.3:415
3755 #, no-wrap
3756 msgid "    /* Read two bytes out of every five, until EOF */\n"
3757 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3758
3759 #. type: Plain text
3760 #: build/C/man3/fopencookie.3:430
3761 #, no-wrap
3762 msgid ""
3763 "    for (p = 0; ; p += 5) {\n"
3764 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3765 "            perror(\"fseek\");\n"
3766 "            exit(EXIT_FAILURE);\n"
3767 "        }\n"
3768 "        nread = fread(buf, 1, 2, fp);\n"
3769 "        if (nread == -1) {\n"
3770 "            perror(\"fread\");\n"
3771 "            exit(EXIT_FAILURE);\n"
3772 "        }\n"
3773 "        if (nread == 0) {\n"
3774 "            printf(\"Reached end of file\\en\");\n"
3775 "            break;\n"
3776 "        }\n"
3777 msgstr ""
3778 "    for (p = 0; ; p += 5) {\n"
3779 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3780 "            perror(\"fseek\");\n"
3781 "            exit(EXIT_FAILURE);\n"
3782 "        }\n"
3783 "        nread = fread(buf, 1, 2, fp);\n"
3784 "        if (nread == -1) {\n"
3785 "            perror(\"fread\");\n"
3786 "            exit(EXIT_FAILURE);\n"
3787 "        }\n"
3788 "        if (nread == 0) {\n"
3789 "            printf(\"Reached end of file\\en\");\n"
3790 "            break;\n"
3791 "        }\n"
3792
3793 #. type: Plain text
3794 #: build/C/man3/fopencookie.3:433
3795 #, no-wrap
3796 msgid ""
3797 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3798 "    }\n"
3799 msgstr ""
3800 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3801 "    }\n"
3802
3803 #. type: Plain text
3804 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
3805 #, no-wrap
3806 msgid ""
3807 "    exit(EXIT_SUCCESS);\n"
3808 "}\n"
3809 msgstr ""
3810 "    exit(EXIT_SUCCESS);\n"
3811 "}\n"
3812
3813 #. type: Plain text
3814 #: build/C/man3/fopencookie.3:442
3815 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3816 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3817
3818 #. type: TH
3819 #: build/C/man3/fpurge.3:25
3820 #, no-wrap
3821 msgid "FPURGE"
3822 msgstr "FPURGE"
3823
3824 #. type: TH
3825 #: build/C/man3/fpurge.3:25
3826 #, no-wrap
3827 msgid "2001-12-15"
3828 msgstr "2001-12-15"
3829
3830 #. type: Plain text
3831 #: build/C/man3/fpurge.3:28
3832 msgid "fpurge, __fpurge - purge a stream"
3833 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3834
3835 #. type: Plain text
3836 #: build/C/man3/fpurge.3:32
3837 #, no-wrap
3838 msgid ""
3839 "/* unsupported */\n"
3840 "B<#include E<lt>stdio.hE<gt>>\n"
3841 msgstr ""
3842 "/* unsupported */\n"
3843 "B<#include E<lt>stdio.hE<gt>>\n"
3844
3845 #. type: Plain text
3846 #: build/C/man3/fpurge.3:34
3847 #, no-wrap
3848 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3849 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3850
3851 #. type: Plain text
3852 #: build/C/man3/fpurge.3:37
3853 #, no-wrap
3854 msgid ""
3855 "/* supported */\n"
3856 "B<#include E<lt>stdio.hE<gt>>\n"
3857 msgstr ""
3858 "/* supported */\n"
3859 "B<#include E<lt>stdio.hE<gt>>\n"
3860
3861 #. type: Plain text
3862 #: build/C/man3/fpurge.3:39
3863 #, no-wrap
3864 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3865 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3866
3867 #. type: Plain text
3868 #: build/C/man3/fpurge.3:41
3869 #, no-wrap
3870 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3871 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3872
3873 #. type: Plain text
3874 #: build/C/man3/fpurge.3:54
3875 msgid ""
3876 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3877 "output streams this discards any unwritten output.  For input streams this "
3878 "discards any input read from the underlying object but not yet obtained via "
3879 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3880 "B<fflush>(3)."
3881 msgstr ""
3882 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3883 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3884 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3885 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3886 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3887
3888 #. type: Plain text
3889 #: build/C/man3/fpurge.3:58
3890 msgid ""
3891 "The function B<__fpurge>()  does precisely the same, but without returning a "
3892 "value."
3893 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3894
3895 #. type: Plain text
3896 #: build/C/man3/fpurge.3:65
3897 msgid ""
3898 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3899 "and sets I<errno> appropriately."
3900 msgstr ""
3901 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3902 "を適切な値に設定する。"
3903
3904 #. type: Plain text
3905 #: build/C/man3/fpurge.3:70
3906 msgid "I<stream> is not an open stream."
3907 msgstr "I<stream> がオープンされていない。"
3908
3909 #. type: Plain text
3910 #: build/C/man3/fpurge.3:78
3911 msgid ""
3912 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3913 "was introduced in 4.4BSD and is not available under Linux.  The function "
3914 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3915 "later."
3916 msgstr ""
3917 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3918 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3919 "され、glibc 2.1.95 以降には存在している。"
3920
3921 #. type: Plain text
3922 #: build/C/man3/fpurge.3:80
3923 msgid "Usually it is a mistake to want to discard input buffers."
3924 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3925
3926 #.  .BR fclean (3),
3927 #. type: Plain text
3928 #: build/C/man3/fpurge.3:85
3929 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3930 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3931
3932 #. type: TH
3933 #: build/C/man3/fputwc.3:16
3934 #, no-wrap
3935 msgid "FPUTWC"
3936 msgstr "FPUTWC"
3937
3938 #. type: Plain text
3939 #: build/C/man3/fputwc.3:19
3940 msgid "fputwc, putwc - write a wide character to a FILE stream"
3941 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3942
3943 #. type: Plain text
3944 #: build/C/man3/fputwc.3:27
3945 #, no-wrap
3946 msgid ""
3947 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3948 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3949 msgstr ""
3950 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3951 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3952
3953 #. type: Plain text
3954 #: build/C/man3/fputwc.3:43
3955 msgid ""
3956 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3957 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3958 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3959 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3960 "it returns I<wc>."
3961 msgstr ""
3962 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3963 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3964 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3965 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3966 "関数は I<wc> を返す。"
3967
3968 #. type: Plain text
3969 #: build/C/man3/fputwc.3:51
3970 msgid ""
3971 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3972 "may be implemented as a macro, and may evaluate its argument more than "
3973 "once.  There is no reason ever to use it."
3974 msgstr ""
3975 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3976 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3977 "ない。この関数を使う理由はもはや存在しない。"
3978
3979 #. type: Plain text
3980 #: build/C/man3/fputwc.3:63
3981 msgid ""
3982 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3983 "indicate an error.  In the event of an error, I<errno> is set to indicate "
3984 "the cause."
3985 msgstr ""
3986 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3987 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
3988
3989 #. type: Plain text
3990 #: build/C/man3/fputwc.3:68
3991 msgid "Conversion of I<wc> to the stream's encoding fails."
3992 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3993
3994 #. type: Plain text
3995 #: build/C/man3/fputwc.3:77
3996 msgid ""
3997 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3998 "current locale."
3999 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
4000
4001 #. type: Plain text
4002 #: build/C/man3/fputwc.3:85
4003 msgid ""
4004 "In the absence of additional information passed to the B<fopen>(3)  call, it "
4005 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4006 "sequence corresponding to the wide character I<wc>."
4007 msgstr ""
4008 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4009 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4010 "よい。"
4011
4012 #. type: Plain text
4013 #: build/C/man3/fputwc.3:89
4014 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4015 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4016
4017 #. type: TH
4018 #: build/C/man3/fread.3:45
4019 #, no-wrap
4020 msgid "FREAD"
4021 msgstr "FREAD"
4022
4023 #. type: TH
4024 #: build/C/man3/fread.3:45
4025 #, no-wrap
4026 msgid "2012-03-30"
4027 msgstr "2012-03-30"
4028
4029 #. type: Plain text
4030 #: build/C/man3/fread.3:48
4031 msgid "fread, fwrite - binary stream input/output"
4032 msgstr "fread, fwrite - バイナリストリームの入出力"
4033
4034 #. type: Plain text
4035 #: build/C/man3/fread.3:54
4036 #, no-wrap
4037 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4038 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4039
4040 #. type: Plain text
4041 #: build/C/man3/fread.3:57
4042 #, no-wrap
4043 msgid ""
4044 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4045 "B<              FILE *>I<stream>B<);>\n"
4046 msgstr ""
4047 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4048 "B<              FILE *>I<stream>B<);>\n"
4049
4050 #. type: Plain text
4051 #: build/C/man3/fread.3:69
4052 msgid ""
4053 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4054 "long, from the stream pointed to by I<stream>, storing them at the location "
4055 "given by I<ptr>."
4056 msgstr ""
4057 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4058 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4059 "I<size> バイトの長さを持つ。"
4060
4061 #. type: Plain text
4062 #: build/C/man3/fread.3:80
4063 msgid ""
4064 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4065 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4066 "location given by I<ptr>."
4067 msgstr ""
4068 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4069 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4070 "バイトの長さを持つ。"
4071
4072 #. type: Plain text
4073 #: build/C/man3/fread.3:96
4074 msgid ""
4075 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4076 "or written.  This number equals the number of bytes transferred only when "
4077 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4078 "return value is a short item count (or zero)."
4079 msgstr ""
4080 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4081 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4082 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4083 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4084
4085 #. type: Plain text
4086 #: build/C/man3/fread.3:103
4087 msgid ""
4088 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4089 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4090 msgstr ""
4091 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4092 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4093 "らない。"
4094
4095 #. type: Plain text
4096 #: build/C/man3/fread.3:105
4097 msgid "C89, POSIX.1-2001."
4098 msgstr "C89, POSIX.1-2001."
4099
4100 #. type: Plain text
4101 #: build/C/man3/fread.3:111
4102 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4103 msgstr ""
4104 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4105
4106 #. type: TH
4107 #: build/C/man3/fseek.3:42
4108 #, no-wrap
4109 msgid "FSEEK"
4110 msgstr "FSEEK"
4111
4112 #. type: TH
4113 #: build/C/man3/fseek.3:42
4114 #, no-wrap
4115 msgid "1993-11-29"
4116 msgstr "1993-11-29"
4117
4118 #. type: Plain text
4119 #: build/C/man3/fseek.3:45
4120 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4121 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4122
4123 #. type: Plain text
4124 #: build/C/man3/fseek.3:49
4125 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4126 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4127
4128 #. type: Plain text
4129 #: build/C/man3/fseek.3:51
4130 msgid "B<long ftell(FILE *>I<stream>B<);>"
4131 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4132
4133 #. type: Plain text
4134 #: build/C/man3/fseek.3:53
4135 msgid "B<void rewind(FILE *>I<stream>B<);>"
4136 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4137
4138 #. type: Plain text
4139 #: build/C/man3/fseek.3:55
4140 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4141 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4142
4143 #. type: Plain text
4144 #: build/C/man3/fseek.3:57
4145 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4146 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4147
4148 #. type: Plain text
4149 #: build/C/man3/fseek.3:81
4150 msgid ""
4151 "The B<fseek>()  function sets the file position indicator for the stream "
4152 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4153 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4154 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4155 "relative to the start of the file, the current position indicator, or end-of-"
4156 "file, respectively.  A successful call to the B<fseek>()  function clears "
4157 "the end-of-file indicator for the stream and undoes any effects of the "
4158 "B<ungetc>(3)  function on the same stream."
4159 msgstr ""
4160 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4161 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4162 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4163 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4164 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4165 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4166 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4167 "かったことになる。"
4168
4169 #. type: Plain text
4170 #: build/C/man3/fseek.3:87
4171 msgid ""
4172 "The B<ftell>()  function obtains the current value of the file position "
4173 "indicator for the stream pointed to by I<stream>."
4174 msgstr ""
4175 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4176 "置表示子 の現時点での値を与える。"
4177
4178 #. type: Plain text
4179 #: build/C/man3/fseek.3:94
4180 msgid ""
4181 "The B<rewind>()  function sets the file position indicator for the stream "
4182 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4183 msgstr ""
4184 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4185 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4186
4187 #. type: Plain text
4188 #: build/C/man3/fseek.3:97
4189 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4190 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4191
4192 #. type: Plain text
4193 #: build/C/man3/fseek.3:101
4194 msgid ""
4195 "except that the error indicator for the stream is also cleared (see "
4196 "B<clearerr>(3))."
4197 msgstr ""
4198 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4199 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4200
4201 #. type: Plain text
4202 #: build/C/man3/fseek.3:121
4203 msgid ""
4204 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4205 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4206 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4207 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4208 "I<fpos_t> object may be a complex object and these routines may be the only "
4209 "way to portably reposition a text stream."
4210 msgstr ""
4211 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4212 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4213 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4214 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4215 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4216 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4217 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4218
4219 #. type: Plain text
4220 #: build/C/man3/fseek.3:136
4221 msgid ""
4222 "The B<rewind>()  function returns no value.  Upon successful completion, "
4223 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4224 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4225 "indicate the error."
4226 msgstr ""
4227 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4228 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4229 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4230
4231 #. type: Plain text
4232 #: build/C/man3/fseek.3:142
4233 msgid "The I<stream> specified is not a seekable stream."
4234 msgstr "指定した I<stream> がシークできない。"
4235
4236 #. type: Plain text
4237 #: build/C/man3/fseek.3:153
4238 msgid ""
4239 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4240 "B<SEEK_CUR>."
4241 msgstr ""
4242 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4243 "B<SEEK_CUR> 以外の値であった。"
4244
4245 #. type: Plain text
4246 #: build/C/man3/fseek.3:168
4247 msgid ""
4248 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4249 "also fail and set I<errno> for any of the errors specified for the routines "
4250 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4251 msgstr ""
4252 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4253 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4254 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4255
4256 #. type: Plain text
4257 #: build/C/man3/fseek.3:173
4258 msgid "B<lseek>(2), B<fseeko>(3)"
4259 msgstr "B<lseek>(2), B<fseeko>(3)"
4260
4261 #. type: TH
4262 #: build/C/man3/fseeko.3:25
4263 #, no-wrap
4264 msgid "FSEEKO"
4265 msgstr "FSEEKO"
4266
4267 #. type: TH
4268 #: build/C/man3/fseeko.3:25
4269 #, no-wrap
4270 msgid "2001-11-05"
4271 msgstr "2001-11-05"
4272
4273 #. type: Plain text
4274 #: build/C/man3/fseeko.3:28
4275 msgid "fseeko, ftello - seek to or report file position"
4276 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4277
4278 #. type: Plain text
4279 #: build/C/man3/fseeko.3:33
4280 #, no-wrap
4281 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4282 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4283
4284 #. type: Plain text
4285 #: build/C/man3/fseeko.3:36
4286 #, no-wrap
4287 msgid ""
4288 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4289 "\n"
4290 msgstr ""
4291 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4292 "\n"
4293
4294 #. type: Plain text
4295 #: build/C/man3/fseeko.3:58
4296 msgid ""
4297 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4298 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4299 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4300 "I<off_t> instead of I<long>."
4301 msgstr ""
4302 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4303 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4304 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4305 "I<off_t> になっている。"
4306
4307 #. type: Plain text
4308 #: build/C/man3/fseeko.3:65
4309 msgid ""
4310 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4311 "compilation with"
4312 msgstr ""
4313 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4314
4315 #. type: Plain text
4316 #: build/C/man3/fseeko.3:69 build/C/man3/lseek64.3:81
4317 #, no-wrap
4318 msgid "#define _FILE_OFFSET_BITS 64\n"
4319 msgstr "#define _FILE_OFFSET_BITS 64\n"
4320
4321 #. type: Plain text
4322 #: build/C/man3/fseeko.3:75
4323 msgid "will turn I<off_t> into a 64-bit type."
4324 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4325
4326 #. type: Plain text
4327 #: build/C/man3/fseeko.3:84
4328 msgid ""
4329 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4330 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4331 "indicate the error."
4332 msgstr ""
4333 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4334 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4335
4336 #. type: Plain text
4337 #: build/C/man3/fseeko.3:87
4338 msgid "See the ERRORS in B<fseek>(3)."
4339 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4340
4341 #. type: Plain text
4342 #: build/C/man3/fseeko.3:89
4343 msgid "SUSv2, POSIX.1-2001."
4344 msgstr "SUSv2, POSIX.1-2001."
4345
4346 #. type: Plain text
4347 #: build/C/man3/fseeko.3:93
4348 msgid ""
4349 "These functions are found on System V-like systems.  They are not present in "
4350 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4351 msgstr ""
4352 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4353 "かったが、 glibc 2.1 から使えるようになった。"
4354
4355 #. type: Plain text
4356 #: build/C/man3/fseeko.3:95
4357 msgid "B<fseek>(3)"
4358 msgstr "B<fseek>(3)"
4359
4360 #. type: TH
4361 #: build/C/man3/getline.3:26
4362 #, no-wrap
4363 msgid "GETLINE"
4364 msgstr "GETLINE"
4365
4366 #. type: Plain text
4367 #: build/C/man3/getline.3:29
4368 msgid "getline, getdelim - delimited string input"
4369 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4370
4371 #. type: Plain text
4372 #: build/C/man3/getline.3:34
4373 #, no-wrap
4374 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4375 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4376
4377 #. type: Plain text
4378 #: build/C/man3/getline.3:37
4379 #, no-wrap
4380 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4381 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4382
4383 #. type: Plain text
4384 #: build/C/man3/getline.3:47
4385 msgid "B<getline>(), B<getdelim>():"
4386 msgstr "B<getline>(), B<getdelim>():"
4387
4388 #. type: Plain text
4389 #: build/C/man3/getline.3:52
4390 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4391 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4392
4393 #. type: Plain text
4394 #: build/C/man3/getline.3:65
4395 msgid ""
4396 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4397 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4398 "terminated and includes the newline character, if one was found."
4399 msgstr ""
4400 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4401 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4402 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4403
4404 #. type: Plain text
4405 #: build/C/man3/getline.3:75
4406 msgid ""
4407 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4408 "storing the line, which should be freed by the user program.  (In this case, "
4409 "the value in I<*n> is ignored.)"
4410 msgstr ""
4411 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4412 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4413 "合、 I<*n> の値は無視される)。"
4414
4415 #. type: Plain text
4416 #: build/C/man3/getline.3:93
4417 msgid ""
4418 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4419 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4420 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4421 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4422 msgstr ""
4423 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4424 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4425 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4426 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4427 "I<*n> を更新する。"
4428
4429 #. type: Plain text
4430 #: build/C/man3/getline.3:99
4431 msgid ""
4432 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4433 "to reflect the buffer address and allocated size respectively."
4434 msgstr ""
4435 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4436 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4437
4438 #. type: Plain text
4439 #: build/C/man3/getline.3:110
4440 msgid ""
4441 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4442 "than newline can be specified as the I<delimiter> argument.  As with "
4443 "B<getline>(), a delimiter character is not added if one was not present in "
4444 "the input before end of file was reached."
4445 msgstr ""
4446 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4447 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4448 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4449 "ファに追加しない。"
4450
4451 #. type: Plain text
4452 #: build/C/man3/getline.3:119
4453 msgid ""
4454 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4455 "read, including the delimiter character, but not including the terminating "
4456 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4457 "bytes in the line read."
4458 msgstr ""
4459 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4460 "字数には区切り文字は含まれるが、終端に使う NULL バイト (\\(aq\\e0\\(aq) は含"
4461 "まれない。 この値によって、読み込んだ行に含まれる NULL バイトを操作することが"
4462 "できる。"
4463
4464 #. type: Plain text
4465 #: build/C/man3/getline.3:125
4466 msgid ""
4467 "Both functions return -1 on failure to read a line (including end-of-file "
4468 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4469 msgstr ""
4470 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4471 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4472 "を示す値が設定される。"
4473
4474 #. type: Plain text
4475 #: build/C/man3/getline.3:135
4476 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4477 msgstr ""
4478 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4479 "I<stream> が有効でない)。"
4480
4481 #. type: Plain text
4482 #: build/C/man3/getline.3:137
4483 msgid "These functions are available since libc 4.6.27."
4484 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4485
4486 #. type: Plain text
4487 #: build/C/man3/getline.3:144
4488 msgid ""
4489 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4490 "were standardized in POSIX.1-2008."
4491 msgstr ""
4492 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4493 "POSIX.1-2008 で標準化された。"
4494
4495 #. type: Plain text
4496 #: build/C/man3/getline.3:149
4497 #, no-wrap
4498 msgid ""
4499 "#define _GNU_SOURCE\n"
4500 "#include E<lt>stdio.hE<gt>\n"
4501 "#include E<lt>stdlib.hE<gt>\n"
4502 msgstr ""
4503 "#define _GNU_SOURCE\n"
4504 "#include E<lt>stdio.hE<gt>\n"
4505 "#include E<lt>stdlib.hE<gt>\n"
4506
4507 #. type: Plain text
4508 #: build/C/man3/getline.3:157
4509 #, no-wrap
4510 msgid ""
4511 "int\n"
4512 "main(void)\n"
4513 "{\n"
4514 "    FILE *fp;\n"
4515 "    char *line = NULL;\n"
4516 "    size_t len = 0;\n"
4517 "    ssize_t read;\n"
4518 msgstr ""
4519 "int\n"
4520 "main(void)\n"
4521 "{\n"
4522 "    FILE *fp;\n"
4523 "    char *line = NULL;\n"
4524 "    size_t len = 0;\n"
4525 "    ssize_t read;\n"
4526
4527 #. type: Plain text
4528 #: build/C/man3/getline.3:161
4529 #, no-wrap
4530 msgid ""
4531 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4532 "    if (fp == NULL)\n"
4533 "        exit(EXIT_FAILURE);\n"
4534 msgstr ""
4535 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4536 "    if (fp == NULL)\n"
4537 "        exit(EXIT_FAILURE);\n"
4538
4539 #. type: Plain text
4540 #: build/C/man3/getline.3:166
4541 #, no-wrap
4542 msgid ""
4543 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4544 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4545 "        printf(\"%s\", line);\n"
4546 "    }\n"
4547 msgstr ""
4548 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4549 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4550 "        printf(\"%s\", line);\n"
4551 "    }\n"
4552
4553 #. type: Plain text
4554 #: build/C/man3/getline.3:170
4555 #, no-wrap
4556 msgid ""
4557 "    free(line);\n"
4558 "    exit(EXIT_SUCCESS);\n"
4559 "}\n"
4560 msgstr ""
4561 "    free(line);\n"
4562 "    exit(EXIT_SUCCESS);\n"
4563 "}\n"
4564
4565 #. type: Plain text
4566 #: build/C/man3/getline.3:178
4567 msgid ""
4568 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4569 msgstr ""
4570 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4571
4572 #. type: TH
4573 #: build/C/man3/gets.3:27
4574 #, no-wrap
4575 msgid "GETS"
4576 msgstr "GETS"
4577
4578 #. type: TH
4579 #: build/C/man3/gets.3:27
4580 #, no-wrap
4581 msgid "2012-01-18"
4582 msgstr "2012-01-18"
4583
4584 #. type: Plain text
4585 #: build/C/man3/gets.3:30
4586 msgid ""
4587 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4588 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4589
4590 #. type: Plain text
4591 #: build/C/man3/gets.3:35
4592 #, no-wrap
4593 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4594 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4595
4596 #. type: Plain text
4597 #: build/C/man3/gets.3:37
4598 #, no-wrap
4599 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4600 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4601
4602 #. type: Plain text
4603 #: build/C/man3/gets.3:39
4604 #, no-wrap
4605 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4606 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4607
4608 #. type: Plain text
4609 #: build/C/man3/gets.3:41
4610 #, no-wrap
4611 msgid "B<int getchar(void);>\n"
4612 msgstr "B<int getchar(void);>\n"
4613
4614 #. type: Plain text
4615 #: build/C/man3/gets.3:43
4616 #, no-wrap
4617 msgid "B<char *gets(char *>I<s>B<);>\n"
4618 msgstr "B<char *gets(char *>I<s>B<);>\n"
4619
4620 #. type: Plain text
4621 #: build/C/man3/gets.3:45
4622 #, no-wrap
4623 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4624 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4625
4626 #. type: Plain text
4627 #: build/C/man3/gets.3:57
4628 msgid ""
4629 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4630 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4631 msgstr ""
4632 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4633 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4634 "す。"
4635
4636 #. type: Plain text
4637 #: build/C/man3/gets.3:64
4638 msgid ""
4639 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4640 "a macro which evaluates I<stream> more than once."
4641 msgstr ""
4642 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4643 "実装されているかもしれない。"
4644
4645 #. type: Plain text
4646 #: build/C/man3/gets.3:68
4647 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4648 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4649
4650 #. type: Plain text
4651 #: build/C/man3/gets.3:78
4652 msgid ""
4653 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4654 "until either a terminating newline or B<EOF>, which it replaces with a null "
4655 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4656 "below)."
4657 msgstr ""
4658 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4659 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4660 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4661 "記の「バグ」を参照)。"
4662
4663 #. type: Plain text
4664 #: build/C/man3/gets.3:92
4665 msgid ""
4666 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4667 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4668 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4669 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4670 "in the buffer."
4671 msgstr ""
4672 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4673 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4674 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4675 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4676
4677 #. type: Plain text
4678 #: build/C/man3/gets.3:103
4679 msgid ""
4680 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4681 "it is available for subsequent read operations.  Pushed-back characters will "
4682 "be returned in reverse order; only one pushback is guaranteed."
4683 msgstr ""
4684 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4685 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4686 "しとして保証されているのは、一文字だけである。"
4687
4688 #. type: Plain text
4689 #: build/C/man3/gets.3:108
4690 msgid ""
4691 "Calls to the functions described here can be mixed with each other and with "
4692 "calls to other input functions from the I<stdio> library for the same input "
4693 "stream."
4694 msgstr ""
4695 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4696 "互いに混ぜて使うことができる。"
4697
4698 #. type: Plain text
4699 #: build/C/man3/gets.3:123
4700 msgid ""
4701 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4702 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4703 msgstr ""
4704 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4705 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4706 "す。"
4707
4708 #. type: Plain text
4709 #: build/C/man3/gets.3:131
4710 msgid ""
4711 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4712 "end of file occurs while no characters have been read."
4713 msgstr ""
4714 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4715 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4716
4717 #. type: Plain text
4718 #: build/C/man3/gets.3:138
4719 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4720 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4721
4722 #. type: Plain text
4723 #: build/C/man3/gets.3:140
4724 msgid "C89, C99, POSIX.1-2001."
4725 msgstr "C89, C99, POSIX.1-2001."
4726
4727 #. type: Plain text
4728 #: build/C/man3/gets.3:152
4729 msgid ""
4730 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4731 "C11 removes the specification of B<gets>()  from the C language, and since "
4732 "version 2.16, glibc header files don't expose the function declaration if "
4733 "the B<_ISOC11_SOURCE> feature test macro is defined."
4734 msgstr ""
4735 "LSB は B<gets>() を非推奨としている。\n"
4736 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4737 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4738 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4739 "た\n"
4740 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4741
4742 #. type: Plain text
4743 #: build/C/man3/gets.3:166
4744 msgid ""
4745 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4746 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4747 "()  will continue to store characters past the end of the buffer, it is "
4748 "extremely dangerous to use.  It has been used to break computer security.  "
4749 "Use B<fgets>()  instead."
4750 msgstr ""
4751 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4752 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4753 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4754 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4755 "と。"
4756
4757 #. type: Plain text
4758 #: build/C/man3/gets.3:173
4759 msgid ""
4760 "It is not advisable to mix calls to input functions from the I<stdio> "
4761 "library with low-level calls to B<read>(2)  for the file descriptor "
4762 "associated with the input stream; the results will be undefined and very "
4763 "probably not what you want."
4764 msgstr ""
4765 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4766 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4767 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4768
4769 #. type: Plain text
4770 #: build/C/man3/gets.3:189
4771 msgid ""
4772 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4773 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4774 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4775 msgstr ""
4776 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4777 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4778 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4779 "B<feature_test_macros>(7)"
4780
4781 #. type: TH
4782 #: build/C/man3/getw.3:25
4783 #, no-wrap
4784 msgid "GETW"
4785 msgstr "GETW"
4786
4787 #. type: TH
4788 #: build/C/man3/getw.3:25
4789 #, no-wrap
4790 msgid "2010-09-26"
4791 msgstr "2010-09-26"
4792
4793 #. type: Plain text
4794 #: build/C/man3/getw.3:28
4795 msgid "getw, putw - input and output of words (ints)"
4796 msgstr "getw, putw - ワード(int)の入出力"
4797
4798 #. type: Plain text
4799 #: build/C/man3/getw.3:33
4800 #, no-wrap
4801 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4802 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4803
4804 #. type: Plain text
4805 #: build/C/man3/getw.3:35
4806 #, no-wrap
4807 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4808 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4809
4810 #. type: Plain text
4811 #: build/C/man3/getw.3:44
4812 msgid "B<getw>(), B<putw>():"
4813 msgstr "B<getw>(), B<putw>():"
4814
4815 #. type: TP
4816 #: build/C/man3/getw.3:47
4817 #, no-wrap
4818 msgid "Since glibc 2.3.3:"
4819 msgstr "glibc 2.3.3 以降:"
4820
4821 #. type: Plain text
4822 #: build/C/man3/getw.3:50
4823 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4824 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4825
4826 #. type: Plain text
4827 #: build/C/man3/getw.3:53
4828 #, no-wrap
4829 msgid ""
4830 "(_XOPEN_SOURCE &&\n"
4831 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4832 msgstr ""
4833 "(_XOPEN_SOURCE &&\n"
4834 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4835
4836 #. type: TP
4837 #: build/C/man3/getw.3:53
4838 #, no-wrap
4839 msgid "Before glibc 2.3.3:"
4840 msgstr "glibc 2.3.3 より前:"
4841
4842 #. type: Plain text
4843 #: build/C/man3/getw.3:56
4844 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4845 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4846
4847 #. type: Plain text
4848 #: build/C/man3/getw.3:66
4849 msgid ""
4850 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4851 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4852 msgstr ""
4853 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4854 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4855 "ことを勧める。"
4856
4857 #. type: Plain text
4858 #: build/C/man3/getw.3:73
4859 msgid ""
4860 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4861 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4862 "instead."
4863 msgstr ""
4864 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4865 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4866 "使用することを勧める。"
4867
4868 #. type: Plain text
4869 #: build/C/man3/getw.3:80
4870 msgid ""
4871 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4872 "error, they return B<EOF>."
4873 msgstr ""
4874 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4875 "が発生した場合、これらの関数は B<EOF> を返す。"
4876
4877 #. type: Plain text
4878 #: build/C/man3/getw.3:82
4879 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4880 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4881
4882 #. type: Plain text
4883 #: build/C/man3/getw.3:86
4884 msgid ""
4885 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4886 "can be used to distinguish between the two cases."
4887 msgstr ""
4888 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4889 "(3)  を用いると、この二つの場合を区別することが出来る。"
4890
4891 #. type: Plain text
4892 #: build/C/man3/getw.3:92
4893 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4894 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4895
4896 #. type: TH
4897 #: build/C/man2/link.2:31
4898 #, no-wrap
4899 msgid "LINK"
4900 msgstr "LINK"
4901
4902 #. type: TH
4903 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32
4904 #: build/C/man2/write.2:39
4905 #, no-wrap
4906 msgid "2013-01-27"
4907 msgstr "2013-01-27"
4908
4909 #. type: Plain text
4910 #: build/C/man2/link.2:34
4911 msgid "link - make a new name for a file"
4912 msgstr "link - ファイルの新しい名前を作成する"
4913
4914 #. type: Plain text
4915 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34
4916 #: build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35
4917 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4918 msgid "B<#include E<lt>unistd.hE<gt>>"
4919 msgstr "B<#include E<lt>unistd.hE<gt>>"
4920
4921 #. type: Plain text
4922 #: build/C/man2/link.2:38
4923 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4924 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4925
4926 #. type: Plain text
4927 #: build/C/man2/link.2:41
4928 msgid ""
4929 "B<link>()  creates a new link (also known as a hard link) to an existing "
4930 "file."
4931 msgstr ""
4932 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4933 "link) ともいう) を作成する。"
4934
4935 #. type: Plain text
4936 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4937 msgid "If I<newpath> exists it will I<not> be overwritten."
4938 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4939
4940 #. type: Plain text
4941 #: build/C/man2/link.2:52
4942 msgid ""
4943 "This new name may be used exactly as the old one for any operation; both "
4944 "names refer to the same file (and so have the same permissions and "
4945 "ownership) and it is impossible to tell which name was the \"original\"."
4946 msgstr ""
4947 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4948 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4949 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4950
4951 #. type: Plain text
4952 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4953 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4954 #: build/C/man2/unlink.2:60
4955 msgid ""
4956 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4957 "appropriately."
4958 msgstr ""
4959 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4960 "定される。"
4961
4962 #. type: TP
4963 #: build/C/man2/link.2:58 build/C/man2/open.2:576 build/C/man2/readlink.2:86
4964 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4965 #: build/C/man3/tmpfile.3:57 build/C/man2/unlink.2:61
4966 #, no-wrap
4967 msgid "B<EACCES>"
4968 msgstr "B<EACCES>"
4969
4970 #. type: Plain text
4971 #: build/C/man2/link.2:69
4972 msgid ""
4973 "Write access to the directory containing I<newpath> is denied, or search "
4974 "permission is denied for one of the directories in the path prefix of "
4975 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4976 msgstr ""
4977 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4978 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4979 "(B<path_resolution>(7)  を参照)。"
4980
4981 #. type: TP
4982 #: build/C/man2/link.2:69 build/C/man2/open.2:585 build/C/man2/rename.2:133
4983 #: build/C/man2/symlink.2:99 build/C/man2/write.2:135
4984 #, no-wrap
4985 msgid "B<EDQUOT>"
4986 msgstr "B<EDQUOT>"
4987
4988 #. type: Plain text
4989 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
4990 msgid "The user's quota of disk blocks on the file system has been exhausted."
4991 msgstr ""
4992 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
4993
4994 #. type: TP
4995 #: build/C/man2/link.2:72 build/C/man2/open.2:591 build/C/man2/symlink.2:104
4996 #: build/C/man3/tmpfile.3:60
4997 #, no-wrap
4998 msgid "B<EEXIST>"
4999 msgstr "B<EEXIST>"
5000
5001 #. type: Plain text
5002 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
5003 msgid "I<newpath> already exists."
5004 msgstr "I<newpath> が既に存在する。"
5005
5006 #. type: TP
5007 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:597
5008 #: build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91
5009 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:64
5010 #: build/C/man2/symlink.2:108 build/C/man2/unlink.2:80
5011 #: build/C/man2/write.2:141
5012 #, no-wrap
5013 msgid "B<EFAULT>"
5014 msgstr "B<EFAULT>"
5015
5016 #. type: Plain text
5017 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
5018 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5019 msgstr ""
5020 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5021
5022 #. type: TP
5023 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107
5024 #: build/C/man2/symlink.2:111 build/C/man2/unlink.2:84
5025 #: build/C/man2/write.2:165
5026 #, no-wrap
5027 msgid "B<EIO>"
5028 msgstr "B<EIO>"
5029
5030 #. type: Plain text
5031 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
5032 msgid "An I/O error occurred."
5033 msgstr "I/O エラーが発生した。"
5034
5035 #. type: TP
5036 #: build/C/man2/link.2:82 build/C/man2/open.2:621 build/C/man2/readlink.2:110
5037 #: build/C/man2/rename.2:149 build/C/man2/rmdir.2:73
5038 #: build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
5039 #, no-wrap
5040 msgid "B<ELOOP>"
5041 msgstr "B<ELOOP>"
5042
5043 #. type: Plain text
5044 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5045 msgid ""
5046 "Too many symbolic links were encountered in resolving I<oldpath> or "
5047 "I<newpath>."
5048 msgstr ""
5049 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5050 "る。"
5051
5052 #. type: TP
5053 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5054 #, no-wrap
5055 msgid "B<EMLINK>"
5056 msgstr "B<EMLINK>"
5057
5058 #. type: Plain text
5059 #: build/C/man2/link.2:91
5060 msgid ""
5061 "The file referred to by I<oldpath> already has the maximum number of links "
5062 "to it."
5063 msgstr ""
5064 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5065
5066 #. type: TP
5067 #: build/C/man2/link.2:91 build/C/man2/open.2:631 build/C/man2/readlink.2:113
5068 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:77
5069 #: build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
5070 #, no-wrap
5071 msgid "B<ENAMETOOLONG>"
5072 msgstr "B<ENAMETOOLONG>"
5073
5074 #. type: Plain text
5075 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
5076 msgid "I<oldpath> or I<newpath> was too long."
5077 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5078
5079 #. type: TP
5080 #: build/C/man2/link.2:94 build/C/man2/open.2:645 build/C/man2/readlink.2:116
5081 #: build/C/man2/rename.2:163 build/C/man2/rmdir.2:80
5082 #: build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
5083 #, no-wrap
5084 msgid "B<ENOENT>"
5085 msgstr "B<ENOENT>"
5086
5087 #. type: Plain text
5088 #: build/C/man2/link.2:99
5089 msgid ""
5090 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5091 "dangling symbolic link."
5092 msgstr ""
5093 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5094 "(dangling)シンボリックリンクである。"
5095
5096 #. type: TP
5097 #: build/C/man2/link.2:99 build/C/man2/open.2:652 build/C/man2/readlink.2:119
5098 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5099 #: build/C/man2/symlink.2:128 build/C/man3/tempnam.3:95
5100 #: build/C/man2/unlink.2:106
5101 #, no-wrap
5102 msgid "B<ENOMEM>"
5103 msgstr "B<ENOMEM>"
5104
5105 #. type: Plain text
5106 #: build/C/man2/link.2:102 build/C/man2/open.2:655 build/C/man2/readlink.2:122
5107 #: build/C/man2/rename.2:179 build/C/man2/rmdir.2:88
5108 #: build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
5109 msgid "Insufficient kernel memory was available."
5110 msgstr "十分なカーネルメモリーがない。"
5111
5112 #. type: TP
5113 #: build/C/man2/link.2:102 build/C/man2/open.2:655 build/C/man2/rename.2:179
5114 #: build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:72
5115 #: build/C/man2/write.2:168
5116 #, no-wrap
5117 msgid "B<ENOSPC>"
5118 msgstr "B<ENOSPC>"
5119
5120 #. type: Plain text
5121 #: build/C/man2/link.2:106 build/C/man2/rename.2:183
5122 #: build/C/man2/symlink.2:135
5123 msgid "The device containing the file has no room for the new directory entry."
5124 msgstr ""
5125 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5126 "空きがない。"
5127
5128 #. type: TP
5129 #: build/C/man2/link.2:106 build/C/man2/open.2:661 build/C/man2/readlink.2:122
5130 #: build/C/man2/rename.2:183 build/C/man2/rmdir.2:88
5131 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
5132 #, no-wrap
5133 msgid "B<ENOTDIR>"
5134 msgstr "B<ENOTDIR>"
5135
5136 #. type: Plain text
5137 #: build/C/man2/link.2:111
5138 msgid ""
5139 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5140 "a directory."
5141 msgstr ""
5142 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5143 "い。"
5144
5145 #. type: TP
5146 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:694
5147 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5148 #: build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
5149 #, no-wrap
5150 msgid "B<EPERM>"
5151 msgstr "B<EPERM>"
5152
5153 #. type: Plain text
5154 #: build/C/man2/link.2:115
5155 msgid "I<oldpath> is a directory."
5156 msgstr "I<oldpath> がディレクトリである。"
5157
5158 #. type: Plain text
5159 #: build/C/man2/link.2:120
5160 msgid ""
5161 "The file system containing I<oldpath> and I<newpath> does not support the "
5162 "creation of hard links."
5163 msgstr ""
5164 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5165 "していない。"
5166
5167 #. type: TP
5168 #: build/C/man2/link.2:120
5169 #, no-wrap
5170 msgid "B<EPERM> (since Linux 3.6)"
5171 msgstr "B<EPERM> (Linux 3.6 以降)"
5172
5173 #. type: Plain text
5174 #: build/C/man2/link.2:127
5175 msgid ""
5176 "The caller does not have permission to create a hard link to this file (see "
5177 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
5178 msgstr ""
5179 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5180 "の I</proc/sys/fs/protected_hardlink> の説明を参照)。"
5181
5182 #. type: TP
5183 #: build/C/man2/link.2:127 build/C/man2/open.2:702 build/C/man2/rename.2:221
5184 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145
5185 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:137
5186 #, no-wrap
5187 msgid "B<EROFS>"
5188 msgstr "B<EROFS>"
5189
5190 #. type: Plain text
5191 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5192 msgid "The file is on a read-only file system."
5193 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5194
5195 #. type: TP
5196 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5197 #, no-wrap
5198 msgid "B<EXDEV>"
5199 msgstr "B<EXDEV>"
5200
5201 #. type: Plain text
5202 #: build/C/man2/link.2:138
5203 msgid ""
5204 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
5205 "permits a file system to be mounted at multiple points, but B<link>()  does "
5206 "not work across different mount points, even if the same file system is "
5207 "mounted on both.)"
5208 msgstr ""
5209 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5210 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5211 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5212 "のマウント位置を跨いでは動作しない。)"
5213
5214 #.  SVr4 documents additional ENOLINK and
5215 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5216 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5217 #. type: Plain text
5218 #: build/C/man2/link.2:143
5219 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5220 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5221
5222 #. type: Plain text
5223 #: build/C/man2/link.2:150
5224 msgid ""
5225 "Hard links, as created by B<link>(), cannot span file systems.  Use "
5226 "B<symlink>(2)  if this is required."
5227 msgstr ""
5228 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5229 "このような場合は B<symlink>(2)  を使用すること。"
5230
5231 #.  more precisely: since kernel 1.3.56
5232 #.  For example, the default Solaris compilation environment
5233 #.  behaves like Linux, and contributors to a March 2005
5234 #.  thread in the Austin mailing list reported that some
5235 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5236 #. type: Plain text
5237 #: build/C/man2/link.2:181
5238 msgid ""
5239 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5240 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5241 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5242 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5243 "the same file that I<oldpath> refers to).  Some other implementations behave "
5244 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5245 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5246 "dereferenced if it is a symbolic link.  For precise control over the "
5247 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5248 msgstr ""
5249 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5250 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5251 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5252 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5253 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5254 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5255 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5256 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5257 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5258 "は B<linkat>(2)  を参照のこと。"
5259
5260 #. type: Plain text
5261 #: build/C/man2/link.2:187
5262 msgid ""
5263 "On NFS file systems, the return code may be wrong in case the NFS server "
5264 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5265 "to find out if the link got created."
5266 msgstr ""
5267 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5268 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5269 "ためには B<stat>(2)  を使用すること。"
5270
5271 #. type: Plain text
5272 #: build/C/man2/link.2:197
5273 msgid ""
5274 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5275 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5276 msgstr ""
5277 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5278 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5279
5280 #. type: TH
5281 #: build/C/man2/llseek.2:28
5282 #, no-wrap
5283 msgid "LLSEEK"
5284 msgstr "LLSEEK"
5285
5286 #. type: TH
5287 #: build/C/man2/llseek.2:28
5288 #, no-wrap
5289 msgid "2012-07-13"
5290 msgstr "2012-07-13"
5291
5292 #. type: Plain text
5293 #: build/C/man2/llseek.2:31
5294 msgid "_llseek - reposition read/write file offset"
5295 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5296
5297 #. type: Plain text
5298 #: build/C/man2/llseek.2:35
5299 #, no-wrap
5300 msgid ""
5301 "B<#include E<lt>sys/types.hE<gt>>\n"
5302 "B<#include E<lt>unistd.hE<gt>>\n"
5303 msgstr ""
5304 "B<#include E<lt>sys/types.hE<gt>>\n"
5305 "B<#include E<lt>unistd.hE<gt>>\n"
5306
5307 #. type: Plain text
5308 #: build/C/man2/llseek.2:39
5309 #, no-wrap
5310 msgid ""
5311 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5312 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5313 "B<            unsigned int >I<whence>B<);>\n"
5314 msgstr ""
5315 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5316 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5317 "B<            unsigned int >I<whence>B<);>\n"
5318
5319 #. type: Plain text
5320 #: build/C/man2/llseek.2:43
5321 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5322 msgstr ""
5323 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5324 "を参照。"
5325
5326 #. type: Plain text
5327 #: build/C/man2/llseek.2:62
5328 msgid ""
5329 "The B<_llseek>()  function repositions the offset of the open file "
5330 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5331 "offset_low> bytes relative to the beginning of the file, the current "
5332 "position in the file, or the end of the file, depending on whether I<whence> "
5333 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5334 "resulting file position in the argument I<result>."
5335 msgstr ""
5336 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5337 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5338 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5339 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5340 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5341 "のファイル位置を I<result> 引き数に返す。"
5342
5343 #. type: Plain text
5344 #: build/C/man2/llseek.2:69
5345 msgid ""
5346 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5347 "-1 is returned and I<errno> is set to indicate the error."
5348 msgstr ""
5349 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5350 "エラーを示す I<errno> が設定される。"
5351
5352 #. type: Plain text
5353 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:175
5354 msgid "I<fd> is not an open file descriptor."
5355 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5356
5357 #. type: Plain text
5358 #: build/C/man2/llseek.2:77
5359 msgid "Problem with copying results to user space."
5360 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5361
5362 #. type: Plain text
5363 #: build/C/man2/llseek.2:81
5364 msgid "I<whence> is invalid."
5365 msgstr "I<whence> が不正である。"
5366
5367 #. type: Plain text
5368 #: build/C/man2/llseek.2:84
5369 msgid ""
5370 "This function is Linux-specific, and should not be used in programs intended "
5371 "to be portable."
5372 msgstr ""
5373 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5374
5375 #. type: Plain text
5376 #: build/C/man2/llseek.2:87
5377 msgid ""
5378 "Glibc does not provide a wrapper for this system call; call it using "
5379 "B<syscall>(2)."
5380 msgstr ""
5381 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5382 "(2)  を使って呼び出すこと。"
5383
5384 #. type: Plain text
5385 #: build/C/man2/llseek.2:90
5386 msgid "B<lseek>(2), B<lseek64>(3)"
5387 msgstr "B<lseek>(2), B<lseek64>(3)"
5388
5389 #. type: TH
5390 #: build/C/man2/lseek.2:47
5391 #, no-wrap
5392 msgid "LSEEK"
5393 msgstr "LSEEK"
5394
5395 #. type: TH
5396 #: build/C/man2/lseek.2:47
5397 #, no-wrap
5398 msgid "2013-03-27"
5399 msgstr "2013-03-27"
5400
5401 #. type: Plain text
5402 #: build/C/man2/lseek.2:50
5403 msgid "lseek - reposition read/write file offset"
5404 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5405
5406 #. type: Plain text
5407 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5408 msgid "B<#include E<lt>sys/types.hE<gt>>"
5409 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5410
5411 #. type: Plain text
5412 #: build/C/man2/lseek.2:56
5413 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5414 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5415
5416 #. type: Plain text
5417 #: build/C/man2/lseek.2:67
5418 msgid ""
5419 "The B<lseek>()  function repositions the offset of the open file associated "
5420 "with the file descriptor I<fd> to the argument I<offset> according to the "
5421 "directive I<whence> as follows:"
5422 msgstr ""
5423 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5424 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5425 "へ以下のように変更する:"
5426
5427 #. type: Plain text
5428 #: build/C/man2/lseek.2:72
5429 msgid "The offset is set to I<offset> bytes."
5430 msgstr "オフセットは I<offset> バイトに設定される。"
5431
5432 #. type: Plain text
5433 #: build/C/man2/lseek.2:77
5434 msgid "The offset is set to its current location plus I<offset> bytes."
5435 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5436
5437 #. type: Plain text
5438 #: build/C/man2/lseek.2:82
5439 msgid "The offset is set to the size of the file plus I<offset> bytes."
5440 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5441
5442 #. type: Plain text
5443 #: build/C/man2/lseek.2:90
5444 msgid ""
5445 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5446 "the file (but this does not change the size of the file).  If data is later "
5447 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5448 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5449 "gap."
5450 msgstr ""
5451 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5452 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5453 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5454 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5455 "される。"
5456
5457 #. type: SS
5458 #: build/C/man2/lseek.2:90
5459 #, no-wrap
5460 msgid "Seeking file data and holes"
5461 msgstr "ファイルのデータとホールの探索"
5462
5463 #. type: Plain text
5464 #: build/C/man2/lseek.2:93
5465 msgid ""
5466 "Since version 3.1, Linux supports the following additional values for "
5467 "I<whence>:"
5468 msgstr ""
5469 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5470
5471 #. type: TP
5472 #: build/C/man2/lseek.2:93
5473 #, no-wrap
5474 msgid "B<SEEK_DATA>"
5475 msgstr "B<SEEK_DATA>"
5476
5477 #. type: Plain text
5478 #: build/C/man2/lseek.2:104
5479 msgid ""
5480 "Adjust the file offset to the next location in the file greater than or "
5481 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5482 "file offset is set to I<offset>."
5483 msgstr ""
5484 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5485 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5486 "定される。"
5487
5488 #. type: TP
5489 #: build/C/man2/lseek.2:104
5490 #, no-wrap
5491 msgid "B<SEEK_HOLE>"
5492 msgstr "B<SEEK_HOLE>"
5493
5494 #. type: Plain text
5495 #: build/C/man2/lseek.2:118
5496 msgid ""
5497 "Adjust the file offset to the next hole in the file greater than or equal to "
5498 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5499 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5500 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5501 "hole at the end of any file)."
5502 msgstr ""
5503 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5504 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5505 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5506 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5507 "だ)。"
5508
5509 #. type: Plain text
5510 #: build/C/man2/lseek.2:124
5511 msgid ""
5512 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5513 "end of the file."
5514 msgstr ""
5515 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5516 "B<lseek>() は失敗する。"
5517
5518 #. type: Plain text
5519 #: build/C/man2/lseek.2:130
5520 msgid ""
5521 "These operations allow applications to map holes in a sparsely allocated "
5522 "file.  This can be useful for applications such as file backup tools, which "
5523 "can save space when creating backups and preserve holes, if they have a "
5524 "mechanism for discovering holes."
5525 msgstr ""
5526 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5527 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5528 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5529 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5530 "約し、ホールを保持することができる。"
5531
5532 #.  https://lkml.org/lkml/2011/4/22/79
5533 #.  http://lwn.net/Articles/440255/
5534 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5535 #. type: Plain text
5536 #: build/C/man2/lseek.2:153
5537 msgid ""
5538 "For the purposes of these operations, a hole is a sequence of zeros that "
5539 "(normally) has not been allocated in the underlying file storage.  However, "
5540 "a file system is not obliged to report holes, so these operations are not a "
5541 "guaranteed mechanism for mapping the storage space actually allocated to a "
5542 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5543 "the underlying storage may not be reported as a hole.)  In the simplest "
5544 "implementation, a file system can support the operations by making "
5545 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5546 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5547 "by I<offset> is a hole, it can be considered to consist of data that is a "
5548 "sequence of zeros)."
5549 msgstr ""
5550 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5551 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5552 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5553 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5554 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5555 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5556 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5557 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5558 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5559 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5560 "ということである)。"
5561
5562 #. type: Plain text
5563 #: build/C/man2/lseek.2:162
5564 msgid ""
5565 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5566 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5567 msgstr ""
5568 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5569 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5570
5571 #. type: Plain text
5572 #: build/C/man2/lseek.2:170
5573 msgid ""
5574 "Upon successful completion, B<lseek>()  returns the resulting offset "
5575 "location as measured in bytes from the beginning of the file.  On error, the "
5576 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5577 msgstr ""
5578 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5579 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5580 "される。"
5581
5582 #.  Some systems may allow negative offsets for character devices
5583 #.  and/or for remote file systems.
5584 #. type: Plain text
5585 #: build/C/man2/lseek.2:183
5586 msgid ""
5587 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5588 "beyond the end of a seekable device."
5589 msgstr ""
5590 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5591 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5592
5593 #. type: TP
5594 #: build/C/man2/lseek.2:183 build/C/man2/open.2:674
5595 #, no-wrap
5596 msgid "B<EOVERFLOW>"
5597 msgstr "B<EOVERFLOW>"
5598
5599 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5600 #. type: Plain text
5601 #: build/C/man2/lseek.2:188
5602 msgid "The resulting file offset cannot be represented in an I<off_t>."
5603 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5604
5605 #. type: TP
5606 #: build/C/man2/lseek.2:188
5607 #, no-wrap
5608 msgid "B<ESPIPE>"
5609 msgstr "B<ESPIPE>"
5610
5611 #. type: Plain text
5612 #: build/C/man2/lseek.2:192
5613 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5614 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5615
5616 #. type: TP
5617 #: build/C/man2/lseek.2:192 build/C/man2/open.2:668
5618 #, no-wrap
5619 msgid "B<ENXIO>"
5620 msgstr "B<ENXIO>"
5621
5622 #. type: Plain text
5623 #: build/C/man2/lseek.2:200
5624 msgid ""
5625 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5626 "beyond the end of the file."
5627 msgstr ""
5628 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5629 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5630
5631 #.  SVr4 documents additional error
5632 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5633 #. type: Plain text
5634 #: build/C/man2/lseek.2:202 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
5635 #: build/C/man2/symlink.2:155 build/C/man2/unlink.2:145
5636 #: build/C/man2/write.2:189
5637 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5638 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5639
5640 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5641 #. type: Plain text
5642 #: build/C/man2/lseek.2:210
5643 msgid ""
5644 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5645 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5646 "next POSIX revision (Issue 8)."
5647 msgstr ""
5648 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
5649 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
5650 "る。"
5651
5652 #. type: Plain text
5653 #: build/C/man2/lseek.2:214
5654 msgid ""
5655 "Some devices are incapable of seeking and POSIX does not specify which "
5656 "devices must support B<lseek>()."
5657 msgstr ""
5658 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5659 "に対応すべきかは規定していない。"
5660
5661 #.  Other systems return the number of written characters,
5662 #.  using SEEK_SET to set the counter. (Of written characters.)
5663 #. type: Plain text
5664 #: build/C/man2/lseek.2:221
5665 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
5666 msgstr ""
5667 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
5668 "る。"
5669
5670 #. type: Plain text
5671 #: build/C/man2/lseek.2:224
5672 msgid ""
5673 "When converting old code, substitute values for I<whence> with the following "
5674 "macros:"
5675 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5676
5677 #. type: tbl table
5678 #: build/C/man2/lseek.2:227
5679 #, no-wrap
5680 msgid "old\tnew\n"
5681 msgstr "old \tnew\n"
5682
5683 #. type: tbl table
5684 #: build/C/man2/lseek.2:228
5685 #, no-wrap
5686 msgid "0\tSEEK_SET\n"
5687 msgstr "0\tSEEK_SET\n"
5688
5689 #. type: tbl table
5690 #: build/C/man2/lseek.2:229
5691 #, no-wrap
5692 msgid "1\tSEEK_CUR\n"
5693 msgstr "1\tSEEK_CUR\n"
5694
5695 #. type: tbl table
5696 #: build/C/man2/lseek.2:230
5697 #, no-wrap
5698 msgid "2\tSEEK_END\n"
5699 msgstr "2\tSEEK_END\n"
5700
5701 #. type: tbl table
5702 #: build/C/man2/lseek.2:231
5703 #, no-wrap
5704 msgid "L_SET\tSEEK_SET\n"
5705 msgstr "L_SET\tSEEK_SET\n"
5706
5707 #. type: tbl table
5708 #: build/C/man2/lseek.2:232
5709 #, no-wrap
5710 msgid "L_INCR\tSEEK_CUR\n"
5711 msgstr "L_INCR\tSEEK_CUR\n"
5712
5713 #. type: tbl table
5714 #: build/C/man2/lseek.2:233
5715 #, no-wrap
5716 msgid "L_XTND\tSEEK_END\n"
5717 msgstr "L_XTND\tSEEK_END\n"
5718
5719 #. type: Plain text
5720 #: build/C/man2/lseek.2:245
5721 msgid ""
5722 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5723 "current file position pointer, so seeking on such files may be subject to "
5724 "race conditions."
5725 msgstr ""
5726 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5727 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5728 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5729
5730 #. type: Plain text
5731 #: build/C/man2/lseek.2:252
5732 msgid ""
5733 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5734 "B<posix_fallocate>(3)"
5735 msgstr ""
5736 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5737 "B<posix_fallocate>(3)"
5738
5739 #. type: TH
5740 #: build/C/man3/lseek64.3:25
5741 #, no-wrap
5742 msgid "LSEEK64"
5743 msgstr "LSEEK64"
5744
5745 #. type: TH
5746 #: build/C/man3/lseek64.3:25
5747 #, no-wrap
5748 msgid "2004-12-11"
5749 msgstr "2004-12-11"
5750
5751 #. type: Plain text
5752 #: build/C/man3/lseek64.3:28
5753 msgid "lseek64 - reposition 64-bit read/write file offset"
5754 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5755
5756 #. type: Plain text
5757 #: build/C/man3/lseek64.3:30
5758 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5759 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5760
5761 #. type: Plain text
5762 #: build/C/man3/lseek64.3:36
5763 msgid ""
5764 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5765 msgstr ""
5766 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5767
5768 #. type: Plain text
5769 #: build/C/man3/lseek64.3:53
5770 msgid ""
5771 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5772 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5773 "start, current position, or end of the file, when I<whence> has the value "
5774 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5775 msgstr ""
5776 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5777 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5778 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5779 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5780
5781 #. type: Plain text
5782 #: build/C/man3/lseek64.3:56
5783 msgid "For more details, return value, and errors, see B<lseek>(2)."
5784 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5785
5786 #. type: Plain text
5787 #: build/C/man3/lseek64.3:63
5788 msgid ""
5789 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5790 "the raw system call B<_llseek>(2)."
5791 msgstr ""
5792 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5793 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5794
5795 #. type: SS
5796 #: build/C/man3/lseek64.3:63
5797 #, no-wrap
5798 msgid "lseek"
5799 msgstr "lseek"
5800
5801 #. type: Plain text
5802 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
5803 #: build/C/man3/lseek64.3:116
5804 msgid "Prototype:"
5805 msgstr "プロトタイプ:"
5806
5807 #. type: Plain text
5808 #: build/C/man3/lseek64.3:69
5809 #, no-wrap
5810 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5811 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5812
5813 #. type: Plain text
5814 #: build/C/man3/lseek64.3:77
5815 msgid ""
5816 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5817 "architectures, unless one compiles with"
5818 msgstr ""
5819 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5820 "ビット符号付き型である。 ただし、"
5821
5822 #. type: Plain text
5823 #: build/C/man3/lseek64.3:85
5824 msgid "in which case it is a 64-bit signed type."
5825 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5826
5827 #. type: SS
5828 #: build/C/man3/lseek64.3:85
5829 #, no-wrap
5830 msgid "lseek64"
5831 msgstr "lseek64"
5832
5833 #. type: Plain text
5834 #: build/C/man3/lseek64.3:91
5835 #, no-wrap
5836 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5837 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5838
5839 #. type: Plain text
5840 #: build/C/man3/lseek64.3:102
5841 msgid ""
5842 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5843 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5844 "when one compiles with"
5845 msgstr ""
5846 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5847 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5848 "ルした場合にのみ使用可能である。"
5849
5850 #. type: Plain text
5851 #: build/C/man3/lseek64.3:106
5852 #, no-wrap
5853 msgid "#define _LARGEFILE64_SOURCE\n"
5854 msgstr "#define _LARGEFILE64_SOURCE\n"
5855
5856 #.  in glibc 2.0.94, not in 2.0.6
5857 #. type: Plain text
5858 #: build/C/man3/lseek64.3:114
5859 msgid ""
5860 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5861 "be an alias for B<llseek>()."
5862 msgstr ""
5863 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5864 "アスとして定義されている。"
5865
5866 #. type: SS
5867 #: build/C/man3/lseek64.3:114
5868 #, no-wrap
5869 msgid "llseek"
5870 msgstr "llseek"
5871
5872 #. type: Plain text
5873 #: build/C/man3/lseek64.3:120
5874 #, no-wrap
5875 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5876 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5877
5878 #.  in libc 5.0.9, not in 4.7.6
5879 #. type: Plain text
5880 #: build/C/man3/lseek64.3:139
5881 msgid ""
5882 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5883 "()  is available in libc5 and glibc and works without special defines.  Its "
5884 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5885 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5886 "should add the above prototype, or something equivalent, to their own "
5887 "source.  When users complained about data loss caused by a miscompilation of "
5888 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5889 msgstr ""
5890 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5891 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5892 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5893 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5894 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5895 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5896 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5897
5898 #. type: Plain text
5899 #: build/C/man3/lseek64.3:142
5900 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5901 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5902
5903 #. type: Plain text
5904 #: build/C/man3/lseek64.3:146
5905 msgid ""
5906 "This makes this function unusable if one desires a warning-free compilation."
5907 msgstr ""
5908 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5909
5910 #. type: SS
5911 #: build/C/man3/lseek64.3:146
5912 #, no-wrap
5913 msgid "_llseek"
5914 msgstr "_llseek"
5915
5916 #. type: Plain text
5917 #: build/C/man3/lseek64.3:149
5918 msgid ""
5919 "All the above functions are implemented in terms of this system call.  The "
5920 "prototype is:"
5921 msgstr ""
5922 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5923 "下の通り:"
5924
5925 #. type: Plain text
5926 #: build/C/man3/lseek64.3:154
5927 #, no-wrap
5928 msgid ""
5929 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5930 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5931 msgstr ""
5932 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5933 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5934
5935 #. type: Plain text
5936 #: build/C/man3/lseek64.3:159
5937 msgid "For more details, see B<llseek>(2)."
5938 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5939
5940 #. type: Plain text
5941 #: build/C/man3/lseek64.3:162
5942 msgid "B<llseek>(2), B<lseek>(2)"
5943 msgstr "B<llseek>(2), B<lseek>(2)"
5944
5945 #. type: TH
5946 #: build/C/man2/open.2:51
5947 #, no-wrap
5948 msgid "OPEN"
5949 msgstr "OPEN"
5950
5951 #. type: TH
5952 #: build/C/man2/open.2:51
5953 #, fuzzy, no-wrap
5954 #| msgid "2013-06-21"
5955 msgid "2013-07-21"
5956 msgstr "2013-06-21"
5957
5958 #. type: Plain text
5959 #: build/C/man2/open.2:54
5960 msgid "open, creat - open and possibly create a file or device"
5961 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5962
5963 #. type: Plain text
5964 #: build/C/man2/open.2:59
5965 #, no-wrap
5966 msgid ""
5967 "B<#include E<lt>sys/types.hE<gt>>\n"
5968 "B<#include E<lt>sys/stat.hE<gt>>\n"
5969 "B<#include E<lt>fcntl.hE<gt>>\n"
5970 msgstr ""
5971 "B<#include E<lt>sys/types.hE<gt>>\n"
5972 "B<#include E<lt>sys/stat.hE<gt>>\n"
5973 "B<#include E<lt>fcntl.hE<gt>>\n"
5974
5975 #. type: Plain text
5976 #: build/C/man2/open.2:62
5977 #, no-wrap
5978 msgid ""
5979 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5980 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5981 msgstr ""
5982 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5983 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5984
5985 #. type: Plain text
5986 #: build/C/man2/open.2:64
5987 #, no-wrap
5988 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5989 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5990
5991 #. type: Plain text
5992 #: build/C/man2/open.2:75
5993 msgid ""
5994 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
5995 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
5996 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
5997 "by a successful call will be the lowest-numbered file descriptor not "
5998 "currently open for the process."
5999 msgstr ""
6000 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
6001 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
6002 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6003 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
6004 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
6005 "のものとなる。"
6006
6007 #. type: Plain text
6008 #: build/C/man2/open.2:87
6009 msgid ""
6010 "By default, the new file descriptor is set to remain open across an B<execve>"
6011 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
6012 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
6013 "to change this default).  The file offset is set to the beginning of the "
6014 "file (see B<lseek>(2))."
6015 msgstr ""
6016 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
6017 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6018 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
6019 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
6020 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6021
6022 #. type: Plain text
6023 #: build/C/man2/open.2:106
6024 msgid ""
6025 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6026 "system-wide table of open files.  This entry records the file offset and the "
6027 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
6028 "file descriptor is a reference to one of these entries; this reference is "
6029 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
6030 "different file.  The new open file description is initially not shared with "
6031 "any other process, but sharing may arise via B<fork>(2)."
6032 msgstr ""
6033 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6034 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6035 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6036 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6037 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6038 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6039 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6040 "が、 B<fork>(2)  で共有が起こる場合がある。"
6041
6042 #. type: Plain text
6043 #: build/C/man2/open.2:114
6044 msgid ""
6045 "The argument I<flags> must include one of the following I<access modes>: "
6046 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6047 "only, write-only, or read/write, respectively."
6048 msgstr ""
6049 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6050 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6051 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6052
6053 #.  SUSv4 divides the flags into:
6054 #.  * Access mode
6055 #.  * File creation
6056 #.  * File status
6057 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6058 #.  though it's not clear what the difference between "other" and
6059 #.  "File creation" flags is.  I raised an Aardvark to see if this
6060 #.  can be clarified in SUSv4; 10 Oct 2008.
6061 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6062 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6063 #.  are also categorized" as file status flags.
6064 #. type: Plain text
6065 #: build/C/man2/open.2:152
6066 msgid ""
6067 "In addition, zero or more file creation flags and file status flags can be "
6068 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6069 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6070 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
6071 "remaining flags listed below.  The distinction between these two groups of "
6072 "flags is that the file status flags can be retrieved and (in some cases)  "
6073 "modified using B<fcntl>(2).  The full list of file creation flags and file "
6074 "status flags is as follows:"
6075 msgstr ""
6076 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6077 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6078 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6079 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TRUNC>, "
6080 "B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち上記以外の残"
6081 "りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は B<fcntl>"
6082 "(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点にあ"
6083 "る。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
6084
6085 #. type: TP
6086 #: build/C/man2/open.2:152
6087 #, no-wrap
6088 msgid "B<O_APPEND>"
6089 msgstr "B<O_APPEND>"
6090
6091 #.  For more background, see
6092 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6093 #.  http://nfs.sourceforge.net/
6094 #. type: Plain text
6095 #: build/C/man2/open.2:169
6096 msgid ""
6097 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6098 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6099 "may lead to corrupted files on NFS file systems if more than one process "
6100 "appends data to a file at once.  This is because NFS does not support "
6101 "appending to a file, so the client kernel has to simulate it, which can't be "
6102 "done without a race condition."
6103 msgstr ""
6104 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6105 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6106 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6107 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6108 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6109 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6110 "とはできないからである。"
6111
6112 #. type: TP
6113 #: build/C/man2/open.2:169
6114 #, no-wrap
6115 msgid "B<O_ASYNC>"
6116 msgstr "B<O_ASYNC>"
6117
6118 #. type: Plain text
6119 #: build/C/man2/open.2:182
6120 msgid ""
6121 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6122 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6123 "this file descriptor.  This feature is available only for terminals, "
6124 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6125 "B<fcntl>(2)  for further details."
6126 msgstr ""
6127 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6128 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6129 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6130 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6131 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
6132
6133 #. type: TP
6134 #: build/C/man2/open.2:182
6135 #, no-wrap
6136 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
6137 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6138
6139 #.  This flag fixes only one form of the race condition;
6140 #.  The race can also occur with, for example, descriptors
6141 #.  returned by accept(), pipe(), etc.
6142 #. type: Plain text
6143 #: build/C/man2/open.2:207
6144 msgid ""
6145 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6146 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6147 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
6148 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
6149 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
6150 "race conditions where one thread opens a file descriptor at the same time as "
6151 "another thread does a B<fork>(2)  plus B<execve>(2)."
6152 msgstr ""
6153 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6154 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
6155 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
6156 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
6157 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
6158 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
6159 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
6160 "はないからである。"
6161
6162 #. type: TP
6163 #: build/C/man2/open.2:207
6164 #, no-wrap
6165 msgid "B<O_CREAT>"
6166 msgstr "B<O_CREAT>"
6167
6168 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6169 #.  XFS (since 2.6.14).
6170 #. type: Plain text
6171 #: build/C/man2/open.2:223
6172 msgid ""
6173 "If the file does not exist it will be created.  The owner (user ID) of the "
6174 "file is set to the effective user ID of the process.  The group ownership "
6175 "(group ID) is set either to the effective group ID of the process or to the "
6176 "group ID of the parent directory (depending on file system type and mount "
6177 "options, and the mode of the parent directory, see the mount options "
6178 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6179 msgstr ""
6180 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6181 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6182 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6183 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6184 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6185 "I<bsdgroups> と I<sysvgroups> を参照)。"
6186
6187 #. type: Plain text
6188 #: build/C/man2/open.2:246
6189 msgid ""
6190 "I<mode> specifies the permissions to use in case a new file is created.  "
6191 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
6192 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
6193 "permissions are modified by the process's I<umask> in the usual way: The "
6194 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
6195 "mode applies only to future accesses of the newly created file; the B<open>"
6196 "()  call that creates a read-only file may well return a read/write file "
6197 "descriptor."
6198 msgstr ""
6199 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6200 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
6201 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
6202 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
6203 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
6204 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
6205 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
6206 "可能なファイルディスクリプタを返すことがありうる。"
6207
6208 #. type: Plain text
6209 #: build/C/man2/open.2:249
6210 msgid "The following symbolic constants are provided for I<mode>:"
6211 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6212
6213 #. type: TP
6214 #: build/C/man2/open.2:249
6215 #, no-wrap
6216 msgid "B<S_IRWXU>"
6217 msgstr "B<S_IRWXU>"
6218
6219 #. type: Plain text
6220 #: build/C/man2/open.2:252
6221 msgid "00700 user (file owner) has read, write and execute permission"
6222 msgstr ""
6223 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6224
6225 #. type: TP
6226 #: build/C/man2/open.2:252
6227 #, no-wrap
6228 msgid "B<S_IRUSR>"
6229 msgstr "B<S_IRUSR>"
6230
6231 #. type: Plain text
6232 #: build/C/man2/open.2:255
6233 msgid "00400 user has read permission"
6234 msgstr "00400 ユーザーに読み込みの許可がある。"
6235
6236 #. type: TP
6237 #: build/C/man2/open.2:255
6238 #, no-wrap
6239 msgid "B<S_IWUSR>"
6240 msgstr "B<S_IWUSR>"
6241
6242 #. type: Plain text
6243 #: build/C/man2/open.2:258
6244 msgid "00200 user has write permission"
6245 msgstr "00200 ユーザーに書き込みの許可がある。"
6246
6247 #. type: TP
6248 #: build/C/man2/open.2:258
6249 #, no-wrap
6250 msgid "B<S_IXUSR>"
6251 msgstr "B<S_IXUSR>"
6252
6253 #. type: Plain text
6254 #: build/C/man2/open.2:261
6255 msgid "00100 user has execute permission"
6256 msgstr "00100 ユーザーに実行の許可がある。"
6257
6258 #. type: TP
6259 #: build/C/man2/open.2:261
6260 #, no-wrap
6261 msgid "B<S_IRWXG>"
6262 msgstr "B<S_IRWXG>"
6263
6264 #. type: Plain text
6265 #: build/C/man2/open.2:264
6266 msgid "00070 group has read, write and execute permission"
6267 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6268
6269 #. type: TP
6270 #: build/C/man2/open.2:264
6271 #, no-wrap
6272 msgid "B<S_IRGRP>"
6273 msgstr "B<S_IRGRP>"
6274
6275 #. type: Plain text
6276 #: build/C/man2/open.2:267
6277 msgid "00040 group has read permission"
6278 msgstr "00040 グループに読み込みの許可がある。"
6279
6280 #. type: TP
6281 #: build/C/man2/open.2:267
6282 #, no-wrap
6283 msgid "B<S_IWGRP>"
6284 msgstr "B<S_IWGRP>"
6285
6286 #. type: Plain text
6287 #: build/C/man2/open.2:270
6288 msgid "00020 group has write permission"
6289 msgstr "00020 グループに書き込みの許可がある。"
6290
6291 #. type: TP
6292 #: build/C/man2/open.2:270
6293 #, no-wrap
6294 msgid "B<S_IXGRP>"
6295 msgstr "B<S_IXGRP>"
6296
6297 #. type: Plain text
6298 #: build/C/man2/open.2:273
6299 msgid "00010 group has execute permission"
6300 msgstr "00010 グループに実行の許可がある。"
6301
6302 #. type: TP
6303 #: build/C/man2/open.2:273
6304 #, no-wrap
6305 msgid "B<S_IRWXO>"
6306 msgstr "B<S_IRWXO>"
6307
6308 #. type: Plain text
6309 #: build/C/man2/open.2:276
6310 msgid "00007 others have read, write and execute permission"
6311 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6312
6313 #. type: TP
6314 #: build/C/man2/open.2:276
6315 #, no-wrap
6316 msgid "B<S_IROTH>"
6317 msgstr "B<S_IROTH>"
6318
6319 #. type: Plain text
6320 #: build/C/man2/open.2:279
6321 msgid "00004 others have read permission"
6322 msgstr "00004 他人に読み込みの許可がある。"
6323
6324 #. type: TP
6325 #: build/C/man2/open.2:279
6326 #, no-wrap
6327 msgid "B<S_IWOTH>"
6328 msgstr "B<S_IWOTH>"
6329
6330 #. type: Plain text
6331 #: build/C/man2/open.2:282
6332 msgid "00002 others have write permission"
6333 msgstr "00002 他人に書き込みの許可がある。"
6334
6335 #. type: TP
6336 #: build/C/man2/open.2:282
6337 #, no-wrap
6338 msgid "B<S_IXOTH>"
6339 msgstr "B<S_IXOTH>"
6340
6341 #. type: Plain text
6342 #: build/C/man2/open.2:285
6343 msgid "00001 others have execute permission"
6344 msgstr "00001 他人に実行の許可がある。"
6345
6346 #. type: TP
6347 #: build/C/man2/open.2:286
6348 #, no-wrap
6349 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6350 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6351
6352 #. type: Plain text
6353 #: build/C/man2/open.2:303
6354 msgid ""
6355 "Try to minimize cache effects of the I/O to and from this file.  In general "
6356 "this will degrade performance, but it is useful in special situations, such "
6357 "as when applications do their own caching.  File I/O is done directly to/"
6358 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6359 "transfer data synchronously, but does not give the guarantees of the "
6360 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6361 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6362 "B<O_DIRECT>.  See NOTES below for further discussion."
6363 msgstr ""
6364 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6365 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6366 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6367 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6368 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6369 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6370 "使用しなければならない。下記の「注意」の節の議論も参照。"
6371
6372 #. type: Plain text
6373 #: build/C/man2/open.2:307
6374 msgid ""
6375 "A semantically similar (but deprecated) interface for block devices is "
6376 "described in B<raw>(8)."
6377 msgstr ""
6378 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6379 "れている (但し、このインタフェースは非推奨である)。"
6380
6381 #. type: TP
6382 #: build/C/man2/open.2:307
6383 #, no-wrap
6384 msgid "B<O_DIRECTORY>"
6385 msgstr "B<O_DIRECTORY>"
6386
6387 #.  But see the following and its replies:
6388 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6389 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6390 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6391 #. type: Plain text
6392 #: build/C/man2/open.2:319
6393 #, fuzzy
6394 #| msgid ""
6395 #| "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6396 #| "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-"
6397 #| "of-service problems if B<opendir>(3)  is called on a FIFO or tape device, "
6398 #| "but should not be used outside of the implementation of B<opendir>(3)."
6399 msgid ""
6400 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6401 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6402 "service problems if B<opendir>(3)  is called on a FIFO or tape device."
6403 msgstr ""
6404 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6405 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6406 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6407 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6408
6409 #. type: TP
6410 #: build/C/man2/open.2:319
6411 #, no-wrap
6412 msgid "B<O_EXCL>"
6413 msgstr "B<O_EXCL>"
6414
6415 #. type: Plain text
6416 #: build/C/man2/open.2:329
6417 msgid ""
6418 "Ensure that this call creates the file: if this flag is specified in "
6419 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6420 "will fail."
6421 msgstr ""
6422 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6423 "と\n"
6424 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6425 "敗\n"
6426 "する。"
6427
6428 #.  POSIX.1-2001 explicitly requires this behavior.
6429 #. type: Plain text
6430 #: build/C/man2/open.2:337
6431 msgid ""
6432 "When these two flags are specified, symbolic links are not followed: if "
6433 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6434 "the symbolic link points to."
6435 msgstr ""
6436 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6437 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6438 "かに関わらず B<open>()  は失敗する。"
6439
6440 #. type: Plain text
6441 #: build/C/man2/open.2:353
6442 msgid ""
6443 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6444 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6445 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6446 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6447 "the error B<EBUSY>."
6448 msgstr ""
6449 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6450 "B<O_EXCL> の動作は規定されていない。\n"
6451 "これには一つ例外があり、Linux 2.6 以降では、\n"
6452 "I<pathname> がブロックデバイスを参照している場合、\n"
6453 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6454 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6455 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6456
6457 #. type: Plain text
6458 #: build/C/man2/open.2:375
6459 msgid ""
6460 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6461 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6462 "programs that rely on it for performing locking tasks will contain a race "
6463 "condition.  Portable programs that want to perform atomic file locking using "
6464 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6465 "create a unique file on the same file system (e.g., incorporating hostname "
6466 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6467 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6468 "unique file to check if its link count has increased to 2, in which case the "
6469 "lock is also successful."
6470 msgstr ""
6471 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6472 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6473 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6474 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6475 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6476 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6477 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6478 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6479 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6480 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6481 "じくロックに成功しているということである。"
6482
6483 #. type: TP
6484 #: build/C/man2/open.2:375
6485 #, no-wrap
6486 msgid "B<O_LARGEFILE>"
6487 msgstr "B<O_LARGEFILE>"
6488
6489 #. type: Plain text
6490 #: build/C/man2/open.2:397
6491 msgid ""
6492 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6493 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6494 "macro must be defined (before including I<any> header files)  in order to "
6495 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6496 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6497 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6498 msgstr ""
6499 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6500 "ファ\n"
6501 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6502 "イ\n"
6503 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6504 "ば\n"
6505 "ならない。\n"
6506 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6507 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6508 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6509
6510 #. type: TP
6511 #: build/C/man2/open.2:397
6512 #, no-wrap
6513 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6514 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6515
6516 #.  The O_NOATIME flag also affects the treatment of st_atime
6517 #.  by mmap() and readdir(2), MTK, Dec 04.
6518 #. type: Plain text
6519 #: build/C/man2/open.2:410
6520 msgid ""
6521 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6522 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6523 "programs, where its use can significantly reduce the amount of disk "
6524 "activity.  This flag may not be effective on all file systems.  One example "
6525 "is NFS, where the server maintains the access time."
6526 msgstr ""
6527 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6528 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
6529 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
6530 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6531 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6532
6533 #. type: TP
6534 #: build/C/man2/open.2:410
6535 #, no-wrap
6536 msgid "B<O_NOCTTY>"
6537 msgstr "B<O_NOCTTY>"
6538
6539 #. type: Plain text
6540 #: build/C/man2/open.2:418
6541 msgid ""
6542 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
6543 "become the process's controlling terminal even if the process does not have "
6544 "one."
6545 msgstr ""
6546 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6547 "る\n"
6548 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6549 "ル\n"
6550 "は制御端末にはならない。"
6551
6552 #. type: TP
6553 #: build/C/man2/open.2:418
6554 #, no-wrap
6555 msgid "B<O_NOFOLLOW>"
6556 msgstr "B<O_NOFOLLOW>"
6557
6558 #.  The headers from glibc 2.0.100 and later include a
6559 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6560 #.  used\fP.
6561 #. type: Plain text
6562 #: build/C/man2/open.2:430
6563 #, fuzzy
6564 #| msgid ""
6565 #| "If I<pathname> is a symbolic link, then the open fails.  This is a "
6566 #| "FreeBSD extension, which was added to Linux in version 2.1.126.  Symbolic "
6567 #| "links in earlier components of the pathname will still be followed."
6568 msgid ""
6569 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6570 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6571 "earlier components of the pathname will still be followed.  See also "
6572 "B<O_NOPATH> below."
6573 msgstr ""
6574 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6575 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6576 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6577 "が シンボリックリンクである場合には、それが指す先が参照される。"
6578
6579 #. type: TP
6580 #: build/C/man2/open.2:430
6581 #, no-wrap
6582 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6583 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6584
6585 #. type: Plain text
6586 #: build/C/man2/open.2:443
6587 msgid ""
6588 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6589 "()  nor any subsequent operations on the file descriptor which is returned "
6590 "will cause the calling process to wait.  For the handling of FIFOs (named "
6591 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6592 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6593 "see B<fcntl>(2)."
6594 msgstr ""
6595 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6596 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6597 "出\n"
6598 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6599 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6600 "イ\n"
6601 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6602 "議論は、 B<fcntl>(2) を参照すること。"
6603
6604 #. type: TP
6605 #: build/C/man2/open.2:443
6606 #, fuzzy, no-wrap
6607 #| msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6608 msgid "B<O_PATH> (since Linux 2.6.39)"
6609 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6610
6611 #
6612 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
6613 #.  commit 326be7b484843988afe57566b627fb7a70beac56
6614 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
6615 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
6616 #.      Subject: Re: [PATCH] open(2): document O_PATH
6617 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
6618 #. type: Plain text
6619 #: build/C/man2/open.2:464
6620 msgid ""
6621 "Obtain a file descriptor that can be used for two purposes: to indicate a "
6622 "location in the file-system tree and to perform operations that act purely "
6623 "at the file descriptor level.  The file itself is not opened, and other file "
6624 "operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), "
6625 "B<fgetxattr>(2))  fail with the error B<EBADF>."
6626 msgstr ""
6627
6628 #. type: Plain text
6629 #: build/C/man2/open.2:468
6630 msgid ""
6631 "The following operations I<can> be performed on the resulting file "
6632 "descriptor:"
6633 msgstr ""
6634
6635 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
6636 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
6637 #. type: Plain text
6638 #: build/C/man2/open.2:477
6639 msgid ""
6640 "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
6641 msgstr ""
6642
6643 #. type: Plain text
6644 #: build/C/man2/open.2:483
6645 msgid ""
6646 "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
6647 msgstr ""
6648
6649 #. type: Plain text
6650 #: build/C/man2/open.2:489
6651 msgid ""
6652 "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and "
6653 "B<F_SETFD>)."
6654 msgstr ""
6655
6656 #. type: Plain text
6657 #: build/C/man2/open.2:495
6658 msgid ""
6659 "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> "
6660 "operation: the returned flags will include the bit B<O_PATH>."
6661 msgstr ""
6662
6663 #. type: Plain text
6664 #: build/C/man2/open.2:502
6665 msgid ""
6666 "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
6667 "the other \"*at()\" system calls."
6668 msgstr ""
6669
6670 #. type: Plain text
6671 #: build/C/man2/open.2:508
6672 msgid ""
6673 "Passing the file descriptor to another process via a UNIX domain socket (see "
6674 "B<SCM_RIGHTS> in B<unix>(7))."
6675 msgstr ""
6676
6677 #. type: Plain text
6678 #: build/C/man2/open.2:519
6679 msgid ""
6680 "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_DIRECTORY> "
6681 "and B<O_NOFOLLOW> are ignored."
6682 msgstr ""
6683
6684 #. type: Plain text
6685 #: build/C/man2/open.2:533
6686 msgid ""
6687 "If the B<O_NOFOLLOW> flag is also specified, then the call returns a file "
6688 "descriptor referring to the symbolic link.  This file descriptor can be used "
6689 "as the I<dirfd> argument in calls to B<fchownat>(2), B<fstatat>(2), B<linkat>"
6690 "(2), and B<readlinkat>(2)  with an empty pathname to have the calls operate "
6691 "on the symbolic link."
6692 msgstr ""
6693
6694 #. type: TP
6695 #: build/C/man2/open.2:533
6696 #, no-wrap
6697 msgid "B<O_SYNC>"
6698 msgstr "B<O_SYNC>"
6699
6700 #. type: Plain text
6701 #: build/C/man2/open.2:541
6702 msgid ""
6703 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6704 "file descriptor will block the calling process until the data has been "
6705 "physically written to the underlying hardware.  I<But see NOTES below>."
6706 msgstr ""
6707 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6708 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6709 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6710 "「注意」の章も参照。>"
6711
6712 #. type: TP
6713 #: build/C/man2/open.2:541
6714 #, no-wrap
6715 msgid "B<O_TRUNC>"
6716 msgstr "B<O_TRUNC>"
6717
6718 #. type: Plain text
6719 #: build/C/man2/open.2:555
6720 msgid ""
6721 "If the file already exists and is a regular file and the open mode allows "
6722 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6723 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6724 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6725 msgstr ""
6726 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6727 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6728 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6729 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6730 "ある。"
6731
6732 #. type: Plain text
6733 #: build/C/man2/open.2:559
6734 msgid ""
6735 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6736 "file has been opened."
6737 msgstr ""
6738 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6739 "用して変更することができる。"
6740
6741 #. type: Plain text
6742 #: build/C/man2/open.2:567
6743 msgid ""
6744 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6745 "O_WRONLY|O_TRUNC>."
6746 msgstr ""
6747 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6748 "を行うのと等価である。"
6749
6750 #. type: Plain text
6751 #: build/C/man2/open.2:575
6752 msgid ""
6753 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6754 "occurred (in which case, I<errno> is set appropriately)."
6755 msgstr ""
6756 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6757 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6758
6759 #. type: Plain text
6760 #: build/C/man2/open.2:585
6761 msgid ""
6762 "The requested access to the file is not allowed, or search permission is "
6763 "denied for one of the directories in the path prefix of I<pathname>, or the "
6764 "file did not exist yet and write access to the parent directory is not "
6765 "allowed.  (See also B<path_resolution>(7).)"
6766 msgstr ""
6767 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6768 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6769 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6770 "すること。)"
6771
6772 #. type: Plain text
6773 #: build/C/man2/open.2:591
6774 msgid ""
6775 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
6776 "of disk blocks or inodes on the file system has been exhausted."
6777 msgstr ""
6778 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
6779 "inode がそのファイルシステムのユーザクォータに達していた。"
6780
6781 #. type: Plain text
6782 #: build/C/man2/open.2:597
6783 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6784 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6785
6786 #. type: Plain text
6787 #: build/C/man2/open.2:601 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6788 msgid "I<pathname> points outside your accessible address space."
6789 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6790
6791 #. type: TP
6792 #: build/C/man2/open.2:601 build/C/man2/write.2:145
6793 #, no-wrap
6794 msgid "B<EFBIG>"
6795 msgstr "B<EFBIG>"
6796
6797 #. type: Plain text
6798 #: build/C/man2/open.2:605
6799 msgid "See B<EOVERFLOW>."
6800 msgstr "B<EOVERFLOW> 参照。"
6801
6802 #. type: TP
6803 #: build/C/man2/open.2:605 build/C/man2/read.2:122 build/C/man3/scanf.3:561
6804 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
6805 #, no-wrap
6806 msgid "B<EINTR>"
6807 msgstr "B<EINTR>"
6808
6809 #. type: Plain text
6810 #: build/C/man2/open.2:612
6811 msgid ""
6812 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6813 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6814 "(7)."
6815 msgstr ""
6816 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6817 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6818 "B<signal>(7)  参照。"
6819
6820 #. type: TP
6821 #: build/C/man2/open.2:612 build/C/man2/read.2:158 build/C/man2/rename.2:143
6822 #: build/C/man2/unlink.2:87
6823 #, no-wrap
6824 msgid "B<EISDIR>"
6825 msgstr "B<EISDIR>"
6826
6827 #. type: Plain text
6828 #: build/C/man2/open.2:621
6829 msgid ""
6830 "I<pathname> refers to a directory and the access requested involved writing "
6831 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6832 msgstr ""
6833 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6834 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6835
6836 #. type: Plain text
6837 #: build/C/man2/open.2:628
6838 msgid ""
6839 "Too many symbolic links were encountered in resolving I<pathname>, or "
6840 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6841 msgstr ""
6842 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6843 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6844
6845 #. type: TP
6846 #: build/C/man2/open.2:628 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:66
6847 #, no-wrap
6848 msgid "B<EMFILE>"
6849 msgstr "B<EMFILE>"
6850
6851 #. type: Plain text
6852 #: build/C/man2/open.2:631
6853 msgid "The process already has the maximum number of files open."
6854 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6855
6856 #. type: Plain text
6857 #: build/C/man2/open.2:635 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6858 msgid "I<pathname> was too long."
6859 msgstr "I<pathname> が長過ぎる。"
6860
6861 #. type: TP
6862 #: build/C/man2/open.2:635 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:69
6863 #, no-wrap
6864 msgid "B<ENFILE>"
6865 msgstr "B<ENFILE>"
6866
6867 #. type: Plain text
6868 #: build/C/man2/open.2:638 build/C/man2/pipe.2:113
6869 msgid "The system limit on the total number of open files has been reached."
6870 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6871
6872 #. type: TP
6873 #: build/C/man2/open.2:638
6874 #, no-wrap
6875 msgid "B<ENODEV>"
6876 msgstr "B<ENODEV>"
6877
6878 #. type: Plain text
6879 #: build/C/man2/open.2:645
6880 msgid ""
6881 "I<pathname> refers to a device special file and no corresponding device "
6882 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6883 "returned.)"
6884 msgstr ""
6885 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6886 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6887 "るべきである)"
6888
6889 #. type: Plain text
6890 #: build/C/man2/open.2:652
6891 msgid ""
6892 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6893 "component in I<pathname> does not exist or is a dangling symbolic link."
6894 msgstr ""
6895 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6896 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6897 "ンクである。"
6898
6899 #. type: Plain text
6900 #: build/C/man2/open.2:661
6901 msgid ""
6902 "I<pathname> was to be created but the device containing I<pathname> has no "
6903 "room for the new file."
6904 msgstr ""
6905 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6906 "ファイルのための空き容量がない。"
6907
6908 #. type: Plain text
6909 #: build/C/man2/open.2:668
6910 msgid ""
6911 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6912 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6913 msgstr ""
6914 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6915 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6916
6917 #. type: Plain text
6918 #: build/C/man2/open.2:674
6919 msgid ""
6920 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6921 "has the file open for reading.  Or, the file is a device special file and no "
6922 "corresponding device exists."
6923 msgstr ""
6924 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6925 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6926 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6927
6928 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6929 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6930 #.  Reported 2006-10-03
6931 #. type: Plain text
6932 #: build/C/man2/open.2:694
6933 msgid ""
6934 "I<pathname> refers to a regular file that is too large to be opened.  The "
6935 "usual scenario here is that an application compiled on a 32-bit platform "
6936 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6937 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6938 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6939 "B<EFBIG> for this case."
6940 msgstr ""
6941 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6942 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6943 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6944 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6945 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6946 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6947 "いた。"
6948
6949 #.  Strictly speaking, it's the file system UID... (MTK)
6950 #. type: Plain text
6951 #: build/C/man2/open.2:702
6952 msgid ""
6953 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6954 "did not match the owner of the file and the caller was not privileged "
6955 "(B<CAP_FOWNER>)."
6956 msgstr ""
6957 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6958 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6959
6960 #. type: Plain text
6961 #: build/C/man2/open.2:707
6962 msgid ""
6963 "I<pathname> refers to a file on a read-only file system and write access was "
6964 "requested."
6965 msgstr ""
6966 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6967 "込みアクセスが要求された。"
6968
6969 #. type: TP
6970 #: build/C/man2/open.2:707
6971 #, no-wrap
6972 msgid "B<ETXTBSY>"
6973 msgstr "B<ETXTBSY>"
6974
6975 #. type: Plain text
6976 #: build/C/man2/open.2:712
6977 msgid ""
6978 "I<pathname> refers to an executable image which is currently being executed "
6979 "and write access was requested."
6980 msgstr ""
6981 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6982
6983 #. type: TP
6984 #: build/C/man2/open.2:712
6985 #, no-wrap
6986 msgid "B<EWOULDBLOCK>"
6987 msgstr "B<EWOULDBLOCK>"
6988
6989 #. type: Plain text
6990 #: build/C/man2/open.2:719
6991 msgid ""
6992 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6993 "the file (see B<fcntl>(2))."
6994 msgstr ""
6995 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6996 "ていた (B<fcntl>(2)  参照)。"
6997
6998 #. type: Plain text
6999 #: build/C/man2/open.2:733
7000 #, fuzzy
7001 #| msgid ""
7002 #| "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
7003 #| "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
7004 #| "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
7005 #| "definitions."
7006 msgid ""
7007 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, "
7008 "B<O_NOFOLLOW>, and B<O_PATH> flags are Linux-specific, and one may need to "
7009 "define B<_GNU_SOURCE> (before including I<any> header files)  to obtain "
7010 "their definitions."
7011 msgstr ""
7012 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
7013 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
7014 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
7015 "定義する必要があるかもしれない。"
7016
7017 #. type: Plain text
7018 #: build/C/man2/open.2:738
7019 msgid ""
7020 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
7021 "POSIX.1-2008."
7022 msgstr ""
7023 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
7024 "定されている。"
7025
7026 #. type: Plain text
7027 #: build/C/man2/open.2:746
7028 msgid ""
7029 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
7030 "(before including I<any> header files)  to get its definition."
7031 msgstr ""
7032 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
7033 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
7034 "なければならない。"
7035
7036 #. type: Plain text
7037 #: build/C/man2/open.2:754
7038 msgid ""
7039 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
7040 "does not necessarily have the intention to read or write.  This is typically "
7041 "used to open devices in order to get a file descriptor for use with B<ioctl>"
7042 "(2)."
7043 msgstr ""
7044 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
7045 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
7046 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
7047 "られる。"
7048
7049 #.  See for example util-linux's disk-utils/setfdprm.c
7050 #.  For some background on access mode 3, see
7051 #.  http://thread.gmane.org/gmane.linux.kernel/653123
7052 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
7053 #.  LKML, 12 Mar 2008
7054 #. type: Plain text
7055 #: build/C/man2/open.2:783
7056 msgid ""
7057 "Unlike the other values that can be specified in I<flags>, the I<access "
7058 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
7059 "individual bits.  Rather, they define the low order two bits of I<flags>, "
7060 "and are defined respectively as 0, 1, and 2.  In other words, the "
7061 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
7062 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
7063 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
7064 "and write permission on the file and return a descriptor that can't be used "
7065 "for reading or writing.  This nonstandard access mode is used by some Linux "
7066 "drivers to return a descriptor that is to be used only for device-specific "
7067 "B<ioctl>(2)  operations."
7068 msgstr ""
7069 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
7070 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
7071 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
7072 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
7073 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
7074 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
7075 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
7076 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
7077 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、デバイ"
7078 "ス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使われてい"
7079 "る。"
7080
7081 #.  Linux 2.0, 2.5: truncate
7082 #.  Solaris 5.7, 5.8: truncate
7083 #.  Irix 6.5: truncate
7084 #.  Tru64 5.1B: truncate
7085 #.  HP-UX 11.22: truncate
7086 #.  FreeBSD 4.7: truncate
7087 #. type: Plain text
7088 #: build/C/man2/open.2:794
7089 msgid ""
7090 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
7091 "implementations.  On many systems the file is actually truncated."
7092 msgstr ""
7093 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
7094 "くのシステムではファイルは実際に切り詰められる。"
7095
7096 #. type: Plain text
7097 #: build/C/man2/open.2:798
7098 msgid ""
7099 "There are many infelicities in the protocol underlying NFS, affecting "
7100 "amongst others B<O_SYNC> and B<O_NDELAY>."
7101 msgstr ""
7102 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
7103 "B<O_NDELAY> に影響する。"
7104
7105 #. type: Plain text
7106 #: build/C/man2/open.2:820
7107 msgid ""
7108 "POSIX provides for three different variants of synchronized I/O, "
7109 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
7110 "(2.6.31), Linux implements only B<O_SYNC>, but glibc maps B<O_DSYNC> and "
7111 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
7112 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
7113 "require all metadata updates of a write to be on disk on returning to user "
7114 "space, but only the B<O_DSYNC> semantics, which require only actual file "
7115 "data and metadata necessary to retrieve it to be on disk by the time the "
7116 "system call returns."
7117 msgstr ""
7118 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
7119 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
7120 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
7121 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
7122 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
7123 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
7124 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
7125 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
7126 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
7127 "ていればよい。"
7128
7129 #. type: Plain text
7130 #: build/C/man2/open.2:828
7131 msgid ""
7132 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7133 "create them; use B<mknod>(2)  instead."
7134 msgstr ""
7135 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7136 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7137 "用する。"
7138
7139 #. type: Plain text
7140 #: build/C/man2/open.2:841
7141 msgid ""
7142 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
7143 "descriptor but, for example, B<read>(2)  requests are denied with "
7144 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
7145 "permissions, but UID mapping is performed by the server upon read and write "
7146 "requests."
7147 msgstr ""
7148 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
7149 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
7150 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7151 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7152 "る。"
7153
7154 #. type: Plain text
7155 #: build/C/man2/open.2:860
7156 msgid ""
7157 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7158 "fields (respectively, time of last access, time of last status change, and "
7159 "time of last modification; see B<stat>(2))  are set to the current time, and "
7160 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7161 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7162 "st_ctime and st_mtime fields are set to the current time."
7163 msgstr ""
7164 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7165 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7166 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7167 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7168 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7169 "I<st_mtime> フィールドが現在時刻に設定される。"
7170
7171 #. type: SS
7172 #: build/C/man2/open.2:860
7173 #, no-wrap
7174 msgid "O_DIRECT"
7175 msgstr "O_DIRECT"
7176
7177 #. type: Plain text
7178 #: build/C/man2/open.2:877
7179 msgid ""
7180 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7181 "address of user-space buffers and the file offset of I/Os.  In Linux "
7182 "alignment restrictions vary by file system and kernel version and might be "
7183 "absent entirely.  However there is currently no file system-independent "
7184 "interface for an application to discover these restrictions for a given file "
7185 "or file system.  Some file systems provide their own interfaces for doing "
7186 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
7187 msgstr ""
7188 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
7189 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
7190 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
7191 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
7192 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
7193 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
7194 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
7195 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
7196
7197 #. type: Plain text
7198 #: build/C/man2/open.2:882
7199 msgid ""
7200 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
7201 "the file offset must all be multiples of the logical block size of the file "
7202 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
7203 msgstr ""
7204 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
7205 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
7206 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
7207
7208 #. type: Plain text
7209 #: build/C/man2/open.2:916
7210 msgid ""
7211 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7212 "system call, if the memory buffer is a private mapping (i.e., any mapping "
7213 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
7214 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7215 "whether submitted via an asynchronous I/O interface or from another thread "
7216 "in the process, should be completed before B<fork>(2)  is called.  Failure "
7217 "to do so can result in data corruption and undefined behavior in parent and "
7218 "child processes.  This restriction does not apply when the memory buffer for "
7219 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
7220 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
7221 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
7222 "will not be available to the child after B<fork>(2)."
7223 msgstr ""
7224 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
7225 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
7226 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
7227 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
7228 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
7229 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
7230 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
7231 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
7232 "動作が起こる可能性がある。\n"
7233 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
7234 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
7235 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
7236 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
7237 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
7238 "のである)。"
7239
7240 #. type: Plain text
7241 #: build/C/man2/open.2:926
7242 msgid ""
7243 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
7244 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
7245 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
7246 "flag of the same name, but without alignment restrictions."
7247 msgstr ""
7248 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
7249 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
7250 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
7251 "ラグを導入したが、アラインメントの制限はない。"
7252
7253 #. type: Plain text
7254 #: build/C/man2/open.2:935
7255 msgid ""
7256 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
7257 "Linux kernels simply ignore this flag.  Some file systems may not implement "
7258 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
7259 msgstr ""
7260 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
7261 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
7262 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
7263 "と B<open>()  は B<EINVAL> で失敗する。"
7264
7265 #. type: Plain text
7266 #: build/C/man2/open.2:946
7267 msgid ""
7268 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
7269 "file, and especially to overlapping byte regions in the same file.  Even "
7270 "when the file system correctly handles the coherency issues in this "
7271 "situation, overall I/O throughput is likely to be slower than using either "
7272 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
7273 "with direct I/O to the same files."
7274 msgstr ""
7275 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
7276 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
7277 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
7278 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
7279 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
7280 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
7281
7282 #. type: Plain text
7283 #: build/C/man2/open.2:968
7284 msgid ""
7285 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
7286 "Older kernels, or kernels configured in certain ways, may not support this "
7287 "combination.  The NFS protocol does not support passing the flag to the "
7288 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
7289 "the server may still cache the I/O.  The client asks the server to make the "
7290 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
7291 "servers will perform poorly under these circumstances, especially if the I/O "
7292 "size is small.  Some servers may also be configured to lie to clients about "
7293 "the I/O having reached stable storage; this will avoid the performance "
7294 "penalty at some risk to data integrity in the event of server power "
7295 "failure.  The Linux NFS client places no alignment restrictions on "
7296 "B<O_DIRECT> I/O."
7297 msgstr ""
7298 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
7299 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
7300 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
7301 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
7302 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
7303 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
7304 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
7305 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
7306 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
7307 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
7308 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
7309 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
7310
7311 #. type: Plain text
7312 #: build/C/man2/open.2:975
7313 msgid ""
7314 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
7315 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
7316 "as a performance option which is disabled by default."
7317 msgstr ""
7318 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
7319 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
7320 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
7321
7322 #. type: Plain text
7323 #: build/C/man2/open.2:980
7324 msgid ""
7325 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
7326 "interface is just stupid, and was probably designed by a deranged monkey on "
7327 "some serious mind-controlling substances.\"\\(emLinus"
7328 msgstr ""
7329 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
7330 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
7331 "な」 \\(em Linus"
7332
7333 #.  FIXME . Check bugzilla report on open(O_ASYNC)
7334 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
7335 #. type: Plain text
7336 #: build/C/man2/open.2:992
7337 msgid ""
7338 "Currently, it is not possible to enable signal-driven I/O by specifying "
7339 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
7340 msgstr ""
7341 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
7342 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
7343 "すること。"
7344
7345 #. type: Plain text
7346 #: build/C/man2/open.2:1014
7347 msgid ""
7348 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7349 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7350 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7351 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7352 msgstr ""
7353 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7354 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7355 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7356 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7357
7358 #. type: TH
7359 #: build/C/man3/perror.3:31
7360 #, no-wrap
7361 msgid "PERROR"
7362 msgstr "PERROR"
7363
7364 #. type: TH
7365 #: build/C/man3/perror.3:31
7366 #, no-wrap
7367 msgid "2012-04-17"
7368 msgstr "2012-04-17"
7369
7370 #. type: Plain text
7371 #: build/C/man3/perror.3:34
7372 msgid "perror - print a system error message"
7373 msgstr "perror - システムエラーメッセージを出力する"
7374
7375 #. type: Plain text
7376 #: build/C/man3/perror.3:38
7377 msgid "B<void perror(const char *>I<s>B<);>"
7378 msgstr "B<void perror(const char *>I<s>B<);>"
7379
7380 #. type: Plain text
7381 #: build/C/man3/perror.3:40
7382 msgid "B<#include E<lt>errno.hE<gt>>"
7383 msgstr "B<#include E<lt>errno.hE<gt>>"
7384
7385 #. type: Plain text
7386 #: build/C/man3/perror.3:42
7387 msgid "B<const char *>I<sys_errlist>B<[];>"
7388 msgstr "B<const char *>I<sys_errlist>B<[];>"
7389
7390 #. type: Plain text
7391 #: build/C/man3/perror.3:44
7392 msgid "B<int >I<sys_nerr>B<;>"
7393 msgstr "B<int >I<sys_nerr>B<;>"
7394
7395 #. type: Plain text
7396 #: build/C/man3/perror.3:46
7397 msgid "B<int >I<errno>B<;>"
7398 msgstr "B<int >I<errno>B<;>"
7399
7400 #. type: Plain text
7401 #: build/C/man3/perror.3:55
7402 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7403 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7404
7405 #. type: Plain text
7406 #: build/C/man3/perror.3:68
7407 msgid ""
7408 "The routine B<perror>()  produces a message on the standard error output, "
7409 "describing the last error encountered during a call to a system or library "
7410 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7411 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7412 "blank.  Then the message and a new-line."
7413 msgstr ""
7414 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7415 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7416 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7417 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7418 "メッセージと改行が出力される。"
7419
7420 #. type: Plain text
7421 #: build/C/man3/perror.3:76
7422 msgid ""
7423 "To be of most use, the argument string should include the name of the "
7424 "function that incurred the error.  The error number is taken from the "
7425 "external variable I<errno>, which is set when errors occur but not cleared "
7426 "when successful calls are made."
7427 msgstr ""
7428 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7429 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7430 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7431
7432 #. type: Plain text
7433 #: build/C/man3/perror.3:90
7434 msgid ""
7435 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7436 "obtain the error message without the newline.  The largest message number "
7437 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7438 "this list because new error values may not have been added to I<sys_errlist>"
7439 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7440 msgstr ""
7441 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7442 "の\n"
7443 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7444 "ジ\n"
7445 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7446 "と。\n"
7447 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7448 "る。\n"
7449 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7450
7451 #. type: Plain text
7452 #: build/C/man3/perror.3:111
7453 msgid ""
7454 "When a system call fails, it usually returns -1 and sets the variable "
7455 "I<errno> to a value describing what went wrong.  (These values can be found "
7456 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7457 "B<perror>()  serves to translate this error code into human-readable form.  "
7458 "Note that I<errno> is undefined after a successful library call: this call "
7459 "may well change this variable, even though it succeeds, for example because "
7460 "it internally used some other library function that failed.  Thus, if a "
7461 "failing call is not immediately followed by a call to B<perror>(), the value "
7462 "of I<errno> should be saved."
7463 msgstr ""
7464 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7465 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7466 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7467 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7468 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7469 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7470 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7471 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7472 "い。"
7473
7474 #. type: Plain text
7475 #: build/C/man3/perror.3:124
7476 msgid ""
7477 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7478 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7479 "I<sys_errlist> conform to BSD."
7480 msgstr ""
7481 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7482 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7483 "に準拠している。"
7484
7485 #.  and only when _BSD_SOURCE is defined.
7486 #.  When
7487 #.  .B _GNU_SOURCE
7488 #.  is defined, the symbols
7489 #.  .I _sys_nerr
7490 #.  and
7491 #.  .I _sys_errlist
7492 #.  are provided.
7493 #. type: Plain text
7494 #: build/C/man3/perror.3:139
7495 msgid ""
7496 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7497 "I<E<lt>stdio.hE<gt>>."
7498 msgstr ""
7499 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7500 "I<E<lt>stdio.hE<gt>> に含まれている。"
7501
7502 #. type: Plain text
7503 #: build/C/man3/perror.3:144
7504 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7505 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7506
7507 #. type: TH
7508 #: build/C/man2/pipe.2:36
7509 #, no-wrap
7510 msgid "PIPE"
7511 msgstr "PIPE"
7512
7513 #. type: TH
7514 #: build/C/man2/pipe.2:36
7515 #, no-wrap
7516 msgid "2012-02-14"
7517 msgstr "2012-02-14"
7518
7519 #. type: Plain text
7520 #: build/C/man2/pipe.2:39
7521 msgid "pipe, pipe2 - create pipe"
7522 msgstr "pipe, pipe2 - パイプを生成する"
7523
7524 #. type: Plain text
7525 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7526 #, no-wrap
7527 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7528 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7529
7530 #. type: Plain text
7531 #: build/C/man2/pipe.2:44
7532 #, no-wrap
7533 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7534 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7535
7536 #. type: Plain text
7537 #: build/C/man2/pipe.2:48
7538 #, no-wrap
7539 msgid ""
7540 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7541 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7542 "B<#include E<lt>unistd.hE<gt>>\n"
7543 msgstr ""
7544 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7545 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7546 "B<#include E<lt>unistd.hE<gt>>\n"
7547
7548 #. type: Plain text
7549 #: build/C/man2/pipe.2:50
7550 #, no-wrap
7551 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7552 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7553
7554 #. type: Plain text
7555 #: build/C/man2/pipe.2:66
7556 msgid ""
7557 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7558 "for interprocess communication.  The array I<pipefd> is used to return two "
7559 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7560 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7561 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7562 "until it is read from the read end of the pipe.  For further details, see "
7563 "B<pipe>(7)."
7564 msgstr ""
7565 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7566 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7567 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7568 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7569 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7570 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7571
7572 #. type: Plain text
7573 #: build/C/man2/pipe.2:76
7574 msgid ""
7575 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7576 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7577 msgstr ""
7578 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7579 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7580 "きる。"
7581
7582 #. type: TP
7583 #: build/C/man2/pipe.2:76
7584 #, no-wrap
7585 msgid "B<O_NONBLOCK>"
7586 msgstr "B<O_NONBLOCK>"
7587
7588 #. type: Plain text
7589 #: build/C/man2/pipe.2:84
7590 msgid ""
7591 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7592 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7593 "the same result."
7594 msgstr ""
7595 "新しく生成される二つのオープンファイル記述 (open file description) の "
7596 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7597 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7598 "なる。"
7599
7600 #. type: TP
7601 #: build/C/man2/pipe.2:84
7602 #, no-wrap
7603 msgid "B<O_CLOEXEC>"
7604 msgstr "B<O_CLOEXEC>"
7605
7606 #. type: Plain text
7607 #: build/C/man2/pipe.2:92
7608 msgid ""
7609 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7610 "descriptors.  See the description of the same flag in B<open>(2)  for "
7611 "reasons why this may be useful."
7612 msgstr ""
7613 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7614 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7615 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7616
7617 #. type: Plain text
7618 #: build/C/man2/pipe.2:102
7619 msgid "I<pipefd> is not valid."
7620 msgstr "I<pipefd> が無効な値である。"
7621
7622 #. type: Plain text
7623 #: build/C/man2/pipe.2:107
7624 msgid "(B<pipe2>())  Invalid value in I<flags>."
7625 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7626
7627 #. type: Plain text
7628 #: build/C/man2/pipe.2:110
7629 msgid "Too many file descriptors are in use by the process."
7630 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7631
7632 #. type: Plain text
7633 #: build/C/man2/pipe.2:118
7634 msgid ""
7635 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7636 "starting with version 2.9."
7637 msgstr ""
7638 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7639 "はバージョン 2.9 以降で利用できる。"
7640
7641 #. type: Plain text
7642 #: build/C/man2/pipe.2:121
7643 msgid "B<pipe>(): POSIX.1-2001."
7644 msgstr "B<pipe>(): POSIX.1-2001."
7645
7646 #. type: Plain text
7647 #: build/C/man2/pipe.2:124
7648 msgid "B<pipe2>()  is Linux-specific."
7649 msgstr "B<pipe2>()  は Linux 固有である。"
7650
7651 #.  fork.2 refers to this example program.
7652 #. type: Plain text
7653 #: build/C/man2/pipe.2:140
7654 msgid ""
7655 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7656 "process; the child inherits a duplicate set of file descriptors that refer "
7657 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7658 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7659 "the string contained in the program's command-line argument to the pipe, and "
7660 "the child reads this string a byte at a time from the pipe and echoes it on "
7661 "standard output."
7662 msgstr ""
7663 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7664 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7665 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7666 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7667 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7668 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7669
7670 #. type: Plain text
7671 #: build/C/man2/pipe.2:147
7672 #, no-wrap
7673 msgid ""
7674 "#include E<lt>sys/wait.hE<gt>\n"
7675 "#include E<lt>stdio.hE<gt>\n"
7676 "#include E<lt>stdlib.hE<gt>\n"
7677 "#include E<lt>unistd.hE<gt>\n"
7678 "#include E<lt>string.hE<gt>\n"
7679 msgstr ""
7680 "#include E<lt>sys/wait.hE<gt>\n"
7681 "#include E<lt>stdio.hE<gt>\n"
7682 "#include E<lt>stdlib.hE<gt>\n"
7683 "#include E<lt>unistd.hE<gt>\n"
7684 "#include E<lt>string.hE<gt>\n"
7685
7686 #. type: Plain text
7687 #: build/C/man2/pipe.2:154
7688 #, no-wrap
7689 msgid ""
7690 "int\n"
7691 "main(int argc, char *argv[])\n"
7692 "{\n"
7693 "    int pipefd[2];\n"
7694 "    pid_t cpid;\n"
7695 "    char buf;\n"
7696 msgstr ""
7697 "int\n"
7698 "main(int argc, char *argv[])\n"
7699 "{\n"
7700 "    int pipefd[2];\n"
7701 "    pid_t cpid;\n"
7702 "    char buf;\n"
7703
7704 #. type: Plain text
7705 #: build/C/man2/pipe.2:159
7706 #, no-wrap
7707 msgid ""
7708 "    if (argc != 2) {\n"
7709 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7710 "\texit(EXIT_FAILURE);\n"
7711 "    }\n"
7712 msgstr ""
7713 "    if (argc != 2) {\n"
7714 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7715 "\texit(EXIT_FAILURE);\n"
7716 "    }\n"
7717
7718 #. type: Plain text
7719 #: build/C/man2/pipe.2:164
7720 #, no-wrap
7721 msgid ""
7722 "    if (pipe(pipefd) == -1) {\n"
7723 "        perror(\"pipe\");\n"
7724 "        exit(EXIT_FAILURE);\n"
7725 "    }\n"
7726 msgstr ""
7727 "    if (pipe(pipefd) == -1) {\n"
7728 "        perror(\"pipe\");\n"
7729 "        exit(EXIT_FAILURE);\n"
7730 "    }\n"
7731
7732 #. type: Plain text
7733 #: build/C/man2/pipe.2:170
7734 #, no-wrap
7735 msgid ""
7736 "    cpid = fork();\n"
7737 "    if (cpid == -1) {\n"
7738 "        perror(\"fork\");\n"
7739 "        exit(EXIT_FAILURE);\n"
7740 "    }\n"
7741 msgstr ""
7742 "    cpid = fork();\n"
7743 "    if (cpid == -1) {\n"
7744 "        perror(\"fork\");\n"
7745 "        exit(EXIT_FAILURE);\n"
7746 "    }\n"
7747
7748 #. type: Plain text
7749 #: build/C/man2/pipe.2:173
7750 #, no-wrap
7751 msgid ""
7752 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7753 "        close(pipefd[1]);          /* Close unused write end */\n"
7754 msgstr ""
7755 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7756 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7757
7758 #. type: Plain text
7759 #: build/C/man2/pipe.2:176
7760 #, no-wrap
7761 msgid ""
7762 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7763 "            write(STDOUT_FILENO, &buf, 1);\n"
7764 msgstr ""
7765 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7766 "            write(STDOUT_FILENO, &buf, 1);\n"
7767
7768 #. type: Plain text
7769 #: build/C/man2/pipe.2:180
7770 #, no-wrap
7771 msgid ""
7772 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7773 "        close(pipefd[0]);\n"
7774 "        _exit(EXIT_SUCCESS);\n"
7775 msgstr ""
7776 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7777 "        close(pipefd[0]);\n"
7778 "        _exit(EXIT_SUCCESS);\n"
7779
7780 #. type: Plain text
7781 #: build/C/man2/pipe.2:189
7782 #, no-wrap
7783 msgid ""
7784 "    } else {            /* Parent writes argv[1] to pipe */\n"
7785 "        close(pipefd[0]);          /* Close unused read end */\n"
7786 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7787 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7788 "        wait(NULL);                /* Wait for child */\n"
7789 "        exit(EXIT_SUCCESS);\n"
7790 "    }\n"
7791 "}\n"
7792 msgstr ""
7793 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7794 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7795 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7796 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7797 "        wait(NULL);                /* 子プロセスを待つ */\n"
7798 "        exit(EXIT_SUCCESS);\n"
7799 "    }\n"
7800 "}\n"
7801
7802 #. type: Plain text
7803 #: build/C/man2/pipe.2:197
7804 msgid ""
7805 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7806 "(7)"
7807 msgstr ""
7808 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7809 "(7)"
7810
7811 #. type: TH
7812 #: build/C/man3/popen.3:40
7813 #, no-wrap
7814 msgid "POPEN"
7815 msgstr "POPEN"
7816
7817 #. type: Plain text
7818 #: build/C/man3/popen.3:43
7819 msgid "popen, pclose - pipe stream to or from a process"
7820 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7821
7822 #. type: Plain text
7823 #: build/C/man3/popen.3:48
7824 #, no-wrap
7825 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7826 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7827
7828 #. type: Plain text
7829 #: build/C/man3/popen.3:50
7830 #, no-wrap
7831 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7832 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7833
7834 #. type: Plain text
7835 #: build/C/man3/popen.3:60
7836 msgid "B<popen>(), B<pclose>():"
7837 msgstr "B<popen>(), B<pclose>():"
7838
7839 #. type: Plain text
7840 #: build/C/man3/popen.3:62
7841 msgid ""
7842 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7843 msgstr ""
7844 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7845
7846 #. type: Plain text
7847 #: build/C/man3/popen.3:73
7848 msgid ""
7849 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7850 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7851 "I<type> argument may specify only reading or writing, not both; the "
7852 "resulting stream is correspondingly read-only or write-only."
7853 msgstr ""
7854 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7855 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7856 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7857 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7858 "たは 書き込み専用のいずれかとなる。"
7859
7860 #. type: Plain text
7861 #: build/C/man3/popen.3:97
7862 msgid ""
7863 "The I<command> argument is a pointer to a null-terminated string containing "
7864 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7865 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7866 "argument is a pointer to a null-terminated string which must contain either "
7867 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7868 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7869 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7870 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7871 "B<open>(2)  for reasons why this may be useful."
7872 msgstr ""
7873 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7874 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7875 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7876 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7877 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7878 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7879 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7880 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7881 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7882
7883 #. type: Plain text
7884 #: build/C/man3/popen.3:113
7885 msgid ""
7886 "The return value from B<popen>()  is a normal standard I/O stream in all "
7887 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7888 "(3).  Writing to such a stream writes to the standard input of the command; "
7889 "the command's standard output is the same as that of the process that called "
7890 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7891 "reading from a \"popened\" stream reads the command's standard output, and "
7892 "the command's standard input is the same as that of the process that called "
7893 "B<popen>()."
7894 msgstr ""
7895 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7896 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7897 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7898 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7899 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7900 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7901 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7902 "セスの標準入力と同一である。"
7903
7904 #. type: Plain text
7905 #: build/C/man3/popen.3:117
7906 msgid "Note that output B<popen>()  streams are fully buffered by default."
7907 msgstr ""
7908 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7909 "に注意しよう。"
7910
7911 #. type: Plain text
7912 #: build/C/man3/popen.3:123
7913 msgid ""
7914 "The B<pclose>()  function waits for the associated process to terminate and "
7915 "returns the exit status of the command as returned by B<wait4>(2)."
7916 msgstr ""
7917 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7918 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7919
7920 #. type: Plain text
7921 #: build/C/man3/popen.3:131
7922 msgid ""
7923 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7924 "calls fail, or if it cannot allocate memory."
7925 msgstr ""
7926 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7927 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7928
7929 #.  These conditions actually give undefined results, so I commented
7930 #.  them out.
7931 #.  .I stream
7932 #.  is not associated with a "popen()ed" command, if
7933 #. .I stream
7934 #.  already "pclose()d", or if
7935 #. type: Plain text
7936 #: build/C/man3/popen.3:146
7937 msgid ""
7938 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7939 "some other error is detected.  In the event of an error, these functions set "
7940 "I<errnro> to indicate the cause of the error."
7941 msgstr ""
7942 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7943 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
7944 "る。"
7945
7946 #. type: Plain text
7947 #: build/C/man3/popen.3:165
7948 msgid ""
7949 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7950 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7951 "appropriately.  If the I<type> argument is invalid, and this condition is "
7952 "detected, I<errno> is set to B<EINVAL>."
7953 msgstr ""
7954 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7955 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7956 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7957 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7958
7959 #. type: Plain text
7960 #: build/C/man3/popen.3:172
7961 msgid ""
7962 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7963 msgstr ""
7964 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7965 "B<ECHILD> にセットされる。"
7966
7967 #. type: Plain text
7968 #: build/C/man3/popen.3:178
7969 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7970 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7971
7972 #. type: Plain text
7973 #: build/C/man3/popen.3:191
7974 msgid ""
7975 "Since the standard input of a command opened for reading shares its seek "
7976 "offset with the process that called B<popen>(), if the original process has "
7977 "done a buffered read, the command's input position may not be as expected.  "
7978 "Similarly, the output from a command opened for writing may become "
7979 "intermingled with that of the original process.  The latter can be avoided "
7980 "by calling B<fflush>(3)  before B<popen>()."
7981 msgstr ""
7982 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7983 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7984 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7985 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7986 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7987 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7988
7989 #.  .SH HISTORY
7990 #.  A
7991 #.  .BR popen ()
7992 #.  and a
7993 #.  .BR pclose ()
7994 #.  function appeared in Version 7 AT&T UNIX.
7995 #. type: Plain text
7996 #: build/C/man3/popen.3:201
7997 msgid ""
7998 "Failure to execute the shell is indistinguishable from the shell's failure "
7999 "to execute command, or an immediate exit of the command.  The only hint is "
8000 "an exit status of 127."
8001 msgstr ""
8002 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
8003 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
8004 "なることである。"
8005
8006 #. type: Plain text
8007 #: build/C/man3/popen.3:211
8008 msgid ""
8009 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
8010 "B<fopen>(3), B<stdio>(3), B<system>(3)"
8011 msgstr ""
8012 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
8013 "B<fopen>(3), B<stdio>(3), B<system>(3)"
8014
8015 #. type: TH
8016 #: build/C/man3/printf.3:34
8017 #, no-wrap
8018 msgid "PRINTF"
8019 msgstr "PRINTF"
8020
8021 #. type: TH
8022 #: build/C/man3/printf.3:34
8023 #, no-wrap
8024 msgid "2013-03-05"
8025 msgstr "2013-03-05"
8026
8027 #. type: Plain text
8028 #: build/C/man3/printf.3:38
8029 msgid ""
8030 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
8031 "formatted output conversion"
8032 msgstr ""
8033 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
8034 "指定された書式に変換して出力を行う"
8035
8036 #. type: Plain text
8037 #: build/C/man3/printf.3:42
8038 msgid "B<int printf(const char *>I<format>B<, ...);>"
8039 msgstr "B<int printf(const char *>I<format>B<, ...);>"
8040
8041 #. type: Plain text
8042 #: build/C/man3/printf.3:44
8043 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
8044 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
8045
8046 #. type: Plain text
8047 #: build/C/man3/printf.3:46
8048 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
8049 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
8050
8051 #. type: Plain text
8052 #: build/C/man3/printf.3:48
8053 msgid ""
8054 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8055 "*>I<format>B<, ...);>"
8056 msgstr ""
8057 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8058 "*>I<format>B<, ...);>"
8059
8060 #. type: Plain text
8061 #: build/C/man3/printf.3:50
8062 msgid "B<#include E<lt>stdarg.hE<gt>>"
8063 msgstr "B<#include E<lt>stdarg.hE<gt>>"
8064
8065 #. type: Plain text
8066 #: build/C/man3/printf.3:52
8067 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
8068 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
8069
8070 #. type: Plain text
8071 #: build/C/man3/printf.3:54
8072 msgid ""
8073 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8074 ">I<ap>B<);>"
8075 msgstr ""
8076 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8077 ">I<ap>B<);>"
8078
8079 #. type: Plain text
8080 #: build/C/man3/printf.3:56
8081 msgid ""
8082 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
8083 msgstr ""
8084 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
8085
8086 #. type: Plain text
8087 #: build/C/man3/printf.3:59
8088 msgid ""
8089 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8090 "*>I<format>B<, va_list >I<ap>B<);>"
8091 msgstr ""
8092 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8093 "*>I<format>B<, va_list >I<ap>B<);>"
8094
8095 #. type: Plain text
8096 #: build/C/man3/printf.3:68
8097 msgid "B<snprintf>(), B<vsnprintf>():"
8098 msgstr "B<snprintf>(), B<vsnprintf>():"
8099
8100 #. type: Plain text
8101 #: build/C/man3/printf.3:71
8102 msgid ""
8103 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8104 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8105 msgstr ""
8106 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8107 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8108
8109 #. type: Plain text
8110 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
8111 msgid "or I<cc -std=c99>"
8112 msgstr "or I<cc -std=c99>"
8113
8114 #. type: Plain text
8115 #: build/C/man3/printf.3:101
8116 msgid ""
8117 "The functions in the B<printf>()  family produce output according to a "
8118 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
8119 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
8120 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
8121 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
8122 "string I<str>."
8123 msgstr ""
8124 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
8125 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
8126 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
8127 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8128 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
8129
8130 #. type: Plain text
8131 #: build/C/man3/printf.3:110
8132 msgid ""
8133 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
8134 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
8135 msgstr ""
8136 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
8137 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
8138
8139 #. type: Plain text
8140 #: build/C/man3/printf.3:134
8141 msgid ""
8142 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
8143 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
8144 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
8145 "instead of a variable number of arguments.  These functions do not call the "
8146 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
8147 "I<ap> is undefined after the call.  See B<stdarg>(3)."
8148 msgstr ""
8149 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
8150 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
8151 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
8152 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
8153 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
8154 "(3)  を参照のこと。"
8155
8156 #. type: Plain text
8157 #: build/C/man3/printf.3:141
8158 msgid ""
8159 "These eight functions write the output under the control of a I<format> "
8160 "string that specifies how subsequent arguments (or arguments accessed via "
8161 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
8162 "output."
8163 msgstr ""
8164 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
8165 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
8166 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
8167
8168 #. type: Plain text
8169 #: build/C/man3/printf.3:152
8170 msgid ""
8171 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
8172 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
8173 "copying to take place between objects that overlap (e.g., if the target "
8174 "string array and one of the supplied input arguments refer to the same "
8175 "buffer).  See NOTES."
8176 msgstr ""
8177 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8178 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
8179 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
8180 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
8181 "照。"
8182
8183 #. type: SS
8184 #: build/C/man3/printf.3:152
8185 #, no-wrap
8186 msgid "Return value"
8187 msgstr "Return Values"
8188
8189 #. type: Plain text
8190 #: build/C/man3/printf.3:155
8191 msgid ""
8192 "Upon successful return, these functions return the number of characters "
8193 "printed (excluding the null byte used to end output to strings)."
8194 msgstr ""
8195 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
8196 "用する NULL バイトは数に含まれない)。"
8197
8198 #. type: Plain text
8199 #: build/C/man3/printf.3:171
8200 msgid ""
8201 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
8202 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
8203 "the output was truncated due to this limit then the return value is the "
8204 "number of characters (excluding the terminating null byte)  which would have "
8205 "been written to the final string if enough space had been available.  Thus, "
8206 "a return value of I<size> or more means that the output was truncated.  (See "
8207 "also below under NOTES.)"
8208 msgstr ""
8209 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
8210 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
8211 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
8212 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
8213 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
8214 "する (後述の注意も参照のこと)。"
8215
8216 #. type: Plain text
8217 #: build/C/man3/printf.3:173
8218 msgid "If an output error is encountered, a negative value is returned."
8219 msgstr "エラーが発生した場合は、負の数を返す。"
8220
8221 #. type: SS
8222 #: build/C/man3/printf.3:173
8223 #, no-wrap
8224 msgid "Format of the format string"
8225 msgstr "フォーマット文字列のフォーマット"
8226
8227 #. type: Plain text
8228 #: build/C/man3/printf.3:195
8229 msgid ""
8230 "The format string is a character string, beginning and ending in its initial "
8231 "shift state, if any.  The format string is composed of zero or more "
8232 "directives: ordinary characters (not B<%>), which are copied unchanged to "
8233 "the output stream; and conversion specifications, each of which results in "
8234 "fetching zero or more subsequent arguments.  Each conversion specification "
8235 "is introduced by the character B<%>, and ends with a I<conversion "
8236 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
8237 "an optional minimum I<field width>, an optional I<precision> and an optional "
8238 "I<length modifier>."
8239 msgstr ""
8240 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
8241 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
8242 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
8243 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
8244 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
8245 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
8246 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
8247 "子> を (この順序で) 置くことができる。"
8248
8249 #. type: Plain text
8250 #: build/C/man3/printf.3:208
8251 msgid ""
8252 "The arguments must correspond properly (after type promotion) with the "
8253 "conversion specifier.  By default, the arguments are used in the order "
8254 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
8255 "next argument (and it is an error if insufficiently many arguments are "
8256 "given).  One can also specify explicitly which argument is taken, at each "
8257 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
8258 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
8259 "denotes the position in the argument list of the desired argument, indexed "
8260 "starting from 1.  Thus,"
8261 msgstr ""
8262 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
8263 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
8264 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
8265 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
8266 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
8267 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
8268 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
8269
8270 #. type: Plain text
8271 #: build/C/man3/printf.3:212
8272 #, no-wrap
8273 msgid "printf(\"%*d\", width, num);\n"
8274 msgstr "printf(\"%*d\", width, num);\n"
8275
8276 #. type: Plain text
8277 #: build/C/man3/printf.3:216
8278 msgid "and"
8279 msgstr "と"
8280
8281 #. type: Plain text
8282 #: build/C/man3/printf.3:220
8283 #, no-wrap
8284 msgid "printf(\"%2$*1$d\", width, num);\n"
8285 msgstr "printf(\"%2$*1$d\", width, num);\n"
8286
8287 #. type: Plain text
8288 #: build/C/man3/printf.3:236
8289 msgid ""
8290 "are equivalent.  The second style allows repeated references to the same "
8291 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
8292 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
8293 "\\(aq is used, it must be used throughout for all conversions taking an "
8294 "argument and all width and precision arguments, but it may be mixed with \"%%"
8295 "\" formats which do not consume an argument.  There may be no gaps in the "
8296 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
8297 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
8298 "format string."
8299 msgstr ""
8300 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
8301 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
8302 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
8303 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
8304 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
8305 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
8306 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
8307
8308 #. type: Plain text
8309 #: build/C/man3/printf.3:246
8310 msgid ""
8311 "For some numeric conversions a radix character (\"decimal point\") or "
8312 "thousands' grouping character is used.  The actual character used depends on "
8313 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
8314 "radix character, and does not have a grouping character.  Thus,"
8315 msgstr ""
8316 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
8317 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
8318 "\\(aq を用い、 区切り文字は使わない。 従って、"
8319
8320 #. type: Plain text
8321 #: build/C/man3/printf.3:250
8322 #, no-wrap
8323 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
8324 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
8325
8326 #. type: Plain text
8327 #: build/C/man3/printf.3:255
8328 msgid ""
8329 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
8330 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
8331 msgstr ""
8332 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
8333 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
8334
8335 #. type: SS
8336 #: build/C/man3/printf.3:255
8337 #, no-wrap
8338 msgid "The flag characters"
8339 msgstr "フラグ文字"
8340
8341 #. type: Plain text
8342 #: build/C/man3/printf.3:257
8343 msgid "The character % is followed by zero or more of the following flags:"
8344 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
8345
8346 #. type: TP
8347 #: build/C/man3/printf.3:257
8348 #, no-wrap
8349 msgid "B<#>"
8350 msgstr "B<#>"
8351
8352 #. type: Plain text
8353 #: build/C/man3/printf.3:291
8354 msgid ""
8355 "The value should be converted to an \"alternate form\".  For B<o> "
8356 "conversions, the first character of the output string is made zero (by "
8357 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
8358 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
8359 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
8360 "conversions, the result will always contain a decimal point, even if no "
8361 "digits follow it (normally, a decimal point appears in the results of those "
8362 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
8363 "trailing zeros are not removed from the result as they would otherwise be.  "
8364 "For other conversions, the result is undefined."
8365 msgstr ""
8366 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
8367 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
8368 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
8369 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
8370 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
8371 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
8372 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
8373 "変換では、結果は未定義である。"
8374
8375 #. type: TP
8376 #: build/C/man3/printf.3:291
8377 #, no-wrap
8378 msgid "B<\\&0>"
8379 msgstr "B<\\&0>"
8380
8381 #. type: Plain text
8382 #: build/C/man3/printf.3:331
8383 msgid ""
8384 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8385 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8386 "converted value is padded on the left with zeros rather than blanks.  If the "
8387 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8388 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8389 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8390 "is undefined."
8391 msgstr ""
8392 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8393 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8394 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8395 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8396 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8397 "である。"
8398
8399 #. type: TP
8400 #: build/C/man3/printf.3:331
8401 #, no-wrap
8402 msgid "B<->"
8403 msgstr "B<->"
8404
8405 #. type: Plain text
8406 #: build/C/man3/printf.3:344
8407 msgid ""
8408 "The converted value is to be left adjusted on the field boundary.  (The "
8409 "default is right justification.)  Except for B<n> conversions, the converted "
8410 "value is padded on the right with blanks, rather than on the left with "
8411 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8412 msgstr ""
8413 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8414 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8415 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8416
8417 #. type: TP
8418 #: build/C/man3/printf.3:344
8419 #, no-wrap
8420 msgid "B<\\(aq \\(aq>"
8421 msgstr "B<' '>"
8422
8423 #. type: Plain text
8424 #: build/C/man3/printf.3:348
8425 msgid ""
8426 "(a space) A blank should be left before a positive number (or empty string) "
8427 "produced by a signed conversion."
8428 msgstr ""
8429 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8430 "列) が置かれる。"
8431
8432 #. type: TP
8433 #: build/C/man3/printf.3:348
8434 #, no-wrap
8435 msgid "B<+>"
8436 msgstr "B<+>"
8437
8438 #. type: Plain text
8439 #: build/C/man3/printf.3:356
8440 msgid ""
8441 "A sign (+ or -) should always be placed before a number produced by a signed "
8442 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8443 "overrides a space if both are used."
8444 msgstr ""
8445 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8446 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8447 "が使われている場合には、 B<+> が優先される。"
8448
8449 #. type: Plain text
8450 #: build/C/man3/printf.3:359
8451 msgid ""
8452 "The five flag characters above are defined in the C standard.  The SUSv2 "
8453 "specifies one further flag character."
8454 msgstr ""
8455 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8456 "グ文字が規定されている。"
8457
8458 #. type: TP
8459 #: build/C/man3/printf.3:359
8460 #, no-wrap
8461 msgid "B<\\(aq>"
8462 msgstr "B<\\(aq>"
8463
8464 #. type: Plain text
8465 #: build/C/man3/printf.3:376
8466 msgid ""
8467 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8468 "output is to be grouped with thousands' grouping characters if the locale "
8469 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8470 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8471 "\\(aqF>."
8472 msgstr ""
8473 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8474 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8475 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8476 "\\(aqF は SUSv2 には含まれていない。"
8477
8478 #. type: Plain text
8479 #: build/C/man3/printf.3:378
8480 msgid "glibc 2.2 adds one further flag character."
8481 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8482
8483 #. type: TP
8484 #: build/C/man3/printf.3:378
8485 #, no-wrap
8486 msgid "B<I>"
8487 msgstr "B<I>"
8488
8489 #.  outdigits keyword in locale file
8490 #. type: Plain text
8491 #: build/C/man3/printf.3:388
8492 msgid ""
8493 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8494 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8495 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8496 msgstr ""
8497 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8498 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8499 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8500
8501 #. type: SS
8502 #: build/C/man3/printf.3:388
8503 #, no-wrap
8504 msgid "The field width"
8505 msgstr "フィールド幅"
8506
8507 #. type: Plain text
8508 #: build/C/man3/printf.3:404
8509 msgid ""
8510 "An optional decimal digit string (with nonzero first digit) specifying a "
8511 "minimum field width.  If the converted value has fewer characters than the "
8512 "field width, it will be padded with spaces on the left (or right, if the "
8513 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8514 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8515 "the field width is given in the next argument, or in the I<m>-th argument, "
8516 "respectively, which must be of type I<int>.  A negative field width is taken "
8517 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8518 "nonexistent or small field width cause truncation of a field; if the result "
8519 "of a conversion is wider than the field width, the field is expanded to "
8520 "contain the conversion result."
8521 msgstr ""
8522 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8523 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8524 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8525 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8526 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8527 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8528 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8529 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8530 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8531 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8532
8533 #. type: SS
8534 #: build/C/man3/printf.3:404
8535 #, no-wrap
8536 msgid "The precision"
8537 msgstr "精度"
8538
8539 #. type: Plain text
8540 #: build/C/man3/printf.3:440
8541 msgid ""
8542 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8543 "optional decimal digit string.  Instead of a decimal digit string one may "
8544 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8545 "precision is given in the next argument, or in the m-th argument, "
8546 "respectively, which must be of type I<int>.  If the precision is given as "
8547 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8548 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8549 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8550 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8551 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8552 "the maximum number of characters to be printed from a string for B<s> and "
8553 "B<S> conversions."
8554 msgstr ""
8555 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8556 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8557 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8558 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8559 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8560 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8561 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8562 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8563 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8564 "る最大文字数を指定する。"
8565
8566 #. type: SS
8567 #: build/C/man3/printf.3:440
8568 #, no-wrap
8569 msgid "The length modifier"
8570 msgstr "長さ修飾子"
8571
8572 #. type: Plain text
8573 #: build/C/man3/printf.3:450
8574 msgid ""
8575 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8576 "B<X> conversion."
8577 msgstr ""
8578 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8579
8580 #. type: TP
8581 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:294
8582 #, no-wrap
8583 msgid "B<hh>"
8584 msgstr "B<hh>"
8585
8586 #. type: Plain text
8587 #: build/C/man3/printf.3:461
8588 msgid ""
8589 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8590 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8591 "I<signed char> argument."
8592 msgstr ""
8593 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8594 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8595
8596 #. type: TP
8597 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:284
8598 #, no-wrap
8599 msgid "B<h>"
8600 msgstr "B<h>"
8601
8602 #. type: Plain text
8603 #: build/C/man3/printf.3:472
8604 msgid ""
8605 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8606 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8607 "to a I<short int> argument."
8608 msgstr ""
8609 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8610 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8611
8612 #. type: TP
8613 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:311
8614 #, no-wrap
8615 msgid "B<l>"
8616 msgstr "B<l>"
8617
8618 #. type: Plain text
8619 #: build/C/man3/printf.3:491
8620 msgid ""
8621 "(ell) A following integer conversion corresponds to a I<long int> or "
8622 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8623 "a pointer to a I<long int> argument, or a following B<c> conversion "
8624 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8625 "corresponds to a pointer to I<wchar_t> argument."
8626 msgstr ""
8627 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8628 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8629 "変換では I<wchar_t> へのポインタであることを示す。"
8630
8631 #. type: TP
8632 #: build/C/man3/printf.3:491
8633 #, no-wrap
8634 msgid "B<ll>"
8635 msgstr "B<ll> (エルエル)"
8636
8637 #. type: Plain text
8638 #: build/C/man3/printf.3:503
8639 msgid ""
8640 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8641 "or I<unsigned long long int> argument, or a following B<n> conversion "
8642 "corresponds to a pointer to a I<long long int> argument."
8643 msgstr ""
8644 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8645 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8646
8647 #. type: TP
8648 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:338
8649 #, no-wrap
8650 msgid "B<L>"
8651 msgstr "B<L>"
8652
8653 #. type: Plain text
8654 #: build/C/man3/printf.3:519
8655 msgid ""
8656 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8657 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8658 "not.)"
8659 msgstr ""
8660 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8661 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8662 "認められていない。)"
8663
8664 #. type: TP
8665 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:354
8666 #, no-wrap
8667 msgid "B<q>"
8668 msgstr "B<q>"
8669
8670 #. type: Plain text
8671 #: build/C/man3/printf.3:525
8672 msgid ""
8673 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8674 "B<ll>."
8675 msgstr ""
8676 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8677 "意味である。"
8678
8679 #. type: TP
8680 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:302
8681 #, no-wrap
8682 msgid "B<j>"
8683 msgstr "B<j>"
8684
8685 #. type: Plain text
8686 #: build/C/man3/printf.3:532
8687 msgid ""
8688 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8689 "argument."
8690 msgstr ""
8691 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8692
8693 #. type: TP
8694 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:366
8695 #, no-wrap
8696 msgid "B<z>"
8697 msgstr "B<z>"
8698
8699 #. type: Plain text
8700 #: build/C/man3/printf.3:543
8701 msgid ""
8702 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8703 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8704 msgstr ""
8705 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8706 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8707
8708 #. type: TP
8709 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:359
8710 #, no-wrap
8711 msgid "B<t>"
8712 msgstr "B<t>"
8713
8714 #. type: Plain text
8715 #: build/C/man3/printf.3:548
8716 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8717 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8718
8719 #. type: Plain text
8720 #: build/C/man3/printf.3:577
8721 msgid ""
8722 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
8723 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8724 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8725 msgstr ""
8726 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8727 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8728 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8729
8730 #. type: SS
8731 #: build/C/man3/printf.3:577
8732 #, no-wrap
8733 msgid "The conversion specifier"
8734 msgstr "変換指定子"
8735
8736 #. type: Plain text
8737 #: build/C/man3/printf.3:580
8738 msgid ""
8739 "A character that specifies the type of conversion to be applied.  The "
8740 "conversion specifiers and their meanings are:"
8741 msgstr ""
8742 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8743
8744 #. type: TP
8745 #: build/C/man3/printf.3:580
8746 #, no-wrap
8747 msgid "B<d>, B<i>"
8748 msgstr "B<d>, B<i>"
8749
8750 #. type: Plain text
8751 #: build/C/man3/printf.3:590
8752 msgid ""
8753 "The I<int> argument is converted to signed decimal notation.  The precision, "
8754 "if any, gives the minimum number of digits that must appear; if the "
8755 "converted value requires fewer digits, it is padded on the left with zeros.  "
8756 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8757 "the output is empty."
8758 msgstr ""
8759 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8760 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8761 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8762 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8763
8764 #. type: TP
8765 #: build/C/man3/printf.3:590
8766 #, no-wrap
8767 msgid "B<o>, B<u>, B<x>, B<X>"
8768 msgstr "B<o>, B<u>, B<x>, B<X>"
8769
8770 #. type: Plain text
8771 #: build/C/man3/printf.3:617
8772 msgid ""
8773 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8774 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8775 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8776 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8777 "of digits that must appear; if the converted value requires fewer digits, it "
8778 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8779 "printed with an explicit precision 0, the output is empty."
8780 msgstr ""
8781 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8782 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8783 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8784 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8785 "られる。"
8786
8787 #. type: TP
8788 #: build/C/man3/printf.3:617
8789 #, no-wrap
8790 msgid "B<e>, B<E>"
8791 msgstr "B<e>, B<E>"
8792
8793 #. type: Plain text
8794 #: build/C/man3/printf.3:636
8795 msgid ""
8796 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
8797 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
8798 "and the number of digits after it is equal to the precision; if the "
8799 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
8800 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
8801 "than B<e>)  to introduce the exponent.  The exponent always contains at "
8802 "least two digits; if the value is zero, the exponent is 00."
8803 msgstr ""
8804 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
8805 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
8806 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
8807 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
8808 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
8809 "指数の値が 0 の場合には、00 と表示される。"
8810
8811 #. type: TP
8812 #: build/C/man3/printf.3:636
8813 #, no-wrap
8814 msgid "B<f>, B<F>"
8815 msgstr "B<f>, B<F>"
8816
8817 #. type: Plain text
8818 #: build/C/man3/printf.3:647
8819 msgid ""
8820 "The I<double> argument is rounded and converted to decimal notation in the "
8821 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8822 "character is equal to the precision specification.  If the precision is "
8823 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8824 "point character appears.  If a decimal point appears, at least one digit "
8825 "appears before it."
8826 msgstr ""
8827 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8828 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8829 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8830 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8831
8832 #. type: Plain text
8833 #: build/C/man3/printf.3:658
8834 msgid ""
8835 "(The SUSv2 does not know about B<F> and says that character string "
8836 "representations for infinity and NaN may be made available.  The C99 "
8837 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8838 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8839 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8840 msgstr ""
8841 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8842 "行ってもよいことになっている。\n"
8843 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8844 "し、\n"
8845 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8846 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8847
8848 #. type: TP
8849 #: build/C/man3/printf.3:658
8850 #, no-wrap
8851 msgid "B<g>, B<G>"
8852 msgstr "B<g>, B<G>"
8853
8854 #. type: Plain text
8855 #: build/C/man3/printf.3:683
8856 msgid ""
8857 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8858 "for B<G> conversions).  The precision specifies the number of significant "
8859 "digits.  If the precision is missing, 6 digits are given; if the precision "
8860 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8861 "conversion is less than -4 or greater than or equal to the precision.  "
8862 "Trailing zeros are removed from the fractional part of the result; a decimal "
8863 "point appears only if it is followed by at least one digit."
8864 msgstr ""
8865 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8866 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8867 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8868 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8869 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8870 "一つある場合にだけである。"
8871
8872 #. type: TP
8873 #: build/C/man3/printf.3:683
8874 #, no-wrap
8875 msgid "B<a>, B<A>"
8876 msgstr "B<a>, B<A>"
8877
8878 #. type: Plain text
8879 #: build/C/man3/printf.3:707
8880 msgid ""
8881 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8882 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8883 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
8884 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8885 "digit before the decimal point, and the number of digits after it is equal "
8886 "to the precision.  The default precision suffices for an exact "
8887 "representation of the value if an exact representation in base 2 exists and "
8888 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8889 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8890 "and nonzero but otherwise unspecified for normalized numbers."
8891 msgstr ""
8892 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
8893 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8894 "16 進表記に変換する。\n"
8895 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8896 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8897 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8898 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8899 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8900 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8901 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8902
8903 #. type: TP
8904 #: build/C/man3/printf.3:707 build/C/man3/scanf.3:459
8905 #: build/C/man3/wprintf.3:151
8906 #, no-wrap
8907 msgid "B<c>"
8908 msgstr "B<c>"
8909
8910 #. type: Plain text
8911 #: build/C/man3/printf.3:725
8912 msgid ""
8913 "If no B<l> modifier is present, the I<int> argument is converted to an "
8914 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8915 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8916 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8917 "conversion state starting in the initial state, and the resulting multibyte "
8918 "string is written."
8919 msgstr ""
8920 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8921 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8922 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8923 "換し、 変換されたマルチバイト文字列を出力する。"
8924
8925 #. type: TP
8926 #: build/C/man3/printf.3:725 build/C/man3/scanf.3:451
8927 #: build/C/man3/wprintf.3:165
8928 #, no-wrap
8929 msgid "B<s>"
8930 msgstr "B<s>"
8931
8932 #. type: Plain text
8933 #: build/C/man3/printf.3:740
8934 msgid ""
8935 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
8936 "to be a pointer to an array of character type (pointer to a string).  "
8937 "Characters from the array are written up to (but not including) a "
8938 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8939 "than the number specified are written.  If a precision is given, no null "
8940 "byte need be present; if the precision is not specified, or is greater than "
8941 "the size of the array, the array must contain a terminating null byte."
8942 msgstr ""
8943 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
8944 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8945 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8946 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8947 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8948 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8949 "なければならない。"
8950
8951 #. type: Plain text
8952 #: build/C/man3/printf.3:767
8953 msgid ""
8954 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
8955 "expected to be a pointer to an array of wide characters.  Wide characters "
8956 "from the array are converted to multibyte characters (each by a call to the "
8957 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
8958 "state before the first wide character), up to and including a terminating "
8959 "null wide character.  The resulting multibyte characters are written up to "
8960 "(but not including) the terminating null byte.  If a precision is specified, "
8961 "no more bytes than the number specified are written, but no partial "
8962 "multibyte characters are written.  Note that the precision determines the "
8963 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
8964 "positions>.  The array must contain a terminating null wide character, "
8965 "unless a precision is given and it is so small that the number of bytes "
8966 "written exceeds it before the end of the array is reached."
8967 msgstr ""
8968 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
8969 "字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字"
8970 "毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド"
8971 "文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8972 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8973 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8974 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8975 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8976 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8977 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8978 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8979 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8980 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8981 "い。"
8982
8983 #. type: TP
8984 #: build/C/man3/printf.3:767
8985 #, no-wrap
8986 msgid "B<C>"
8987 msgstr "B<C>"
8988
8989 #. type: Plain text
8990 #: build/C/man3/printf.3:773
8991 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8992 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8993
8994 #. type: TP
8995 #: build/C/man3/printf.3:773
8996 #, no-wrap
8997 msgid "B<S>"
8998 msgstr "B<S>"
8999
9000 #. type: Plain text
9001 #: build/C/man3/printf.3:779
9002 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
9003 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
9004
9005 #. type: TP
9006 #: build/C/man3/printf.3:779 build/C/man3/scanf.3:502
9007 #, no-wrap
9008 msgid "B<p>"
9009 msgstr "B<p>"
9010
9011 #. type: Plain text
9012 #: build/C/man3/printf.3:787
9013 msgid ""
9014 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
9015 "or B<%#lx>)."
9016 msgstr ""
9017 "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
9018
9019 #. type: TP
9020 #: build/C/man3/printf.3:787 build/C/man3/scanf.3:510
9021 #, no-wrap
9022 msgid "B<n>"
9023 msgstr "B<n>"
9024
9025 #. type: Plain text
9026 #: build/C/man3/printf.3:794
9027 msgid ""
9028 "The number of characters written so far is stored into the integer indicated "
9029 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
9030 msgstr ""
9031 "これまでに出力された文字数を I<int\\ *> (または類似の型) のポインタ引き数が指"
9032 "す整数に保存する。 引き数の変換は行われない。"
9033
9034 #. type: TP
9035 #: build/C/man3/printf.3:794
9036 #, no-wrap
9037 msgid "B<m>"
9038 msgstr "B<m>"
9039
9040 #. type: Plain text
9041 #: build/C/man3/printf.3:800
9042 msgid ""
9043 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
9044 "required."
9045 msgstr ""
9046 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
9047
9048 #. type: TP
9049 #: build/C/man3/printf.3:800 build/C/man3/scanf.3:377
9050 #, no-wrap
9051 msgid "B<%>"
9052 msgstr "B<%>"
9053
9054 #. type: Plain text
9055 #: build/C/man3/printf.3:806
9056 msgid ""
9057 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
9058 "conversion specification is \\(aq%%\\(aq."
9059 msgstr ""
9060 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
9061 "%\" となる。"
9062
9063 #. type: Plain text
9064 #: build/C/man3/printf.3:821
9065 msgid ""
9066 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9067 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
9068 "B<vsnprintf>()  functions conform to C99."
9069 msgstr ""
9070 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9071 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
9072 "B<vsnprintf>()  は C99 に準拠している。"
9073
9074 #. type: Plain text
9075 #: build/C/man3/printf.3:834
9076 msgid ""
9077 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
9078 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
9079 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
9080 "this case, and gives the return value (as always)  as the number of "
9081 "characters that would have been written in case the output string has been "
9082 "large enough."
9083 msgstr ""
9084 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
9085 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
9086 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
9087 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
9088 "出力されるであろう文字数を返す。"
9089
9090 #. type: Plain text
9091 #: build/C/man3/printf.3:848
9092 msgid ""
9093 "Linux libc4 knows about the five C standard flags.  It knows about the "
9094 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
9095 "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 "
9096 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
9097 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
9098 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
9099 "dependent radix character, no thousands' separator, no NaN or infinity, no "
9100 "\"%m$\" and \"*m$\"."
9101 msgstr ""
9102 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
9103 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
9104 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
9105 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
9106 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
9107 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
9108 "えない。"
9109
9110 #. type: Plain text
9111 #: build/C/man3/printf.3:859
9112 msgid ""
9113 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
9114 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
9115 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
9116 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
9117 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
9118 "outputs I<strerror(errno)>."
9119 msgstr ""
9120 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
9121 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
9122 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
9123 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
9124 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
9125 "ある。"
9126
9127 #. type: Plain text
9128 #: build/C/man3/printf.3:861
9129 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
9130 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
9131
9132 #. type: Plain text
9133 #: build/C/man3/printf.3:864
9134 msgid ""
9135 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
9136 "characters B<a> and B<A>."
9137 msgstr ""
9138 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
9139 "加された。"
9140
9141 #. type: Plain text
9142 #: build/C/man3/printf.3:867
9143 msgid ""
9144 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
9145 "flag character B<I>."
9146 msgstr ""
9147 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
9148 "追加された。"
9149
9150 #. type: Plain text
9151 #: build/C/man3/printf.3:869
9152 msgid "Some programs imprudently rely on code such as the following"
9153 msgstr ""
9154 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
9155 "ラムがある。"
9156
9157 #. type: Plain text
9158 #: build/C/man3/printf.3:871
9159 #, no-wrap
9160 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
9161 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
9162
9163 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
9164 #. type: Plain text
9165 #: build/C/man3/printf.3:887
9166 msgid ""
9167 "to append text to I<buf>.  However, the standards explicitly note that the "
9168 "results are undefined if source and destination buffers overlap when calling "
9169 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
9170 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
9171 "such as the above will B<not> produce the expected results."
9172 msgstr ""
9173 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
9174 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
9175 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
9176 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
9177 "結果が得られ「ない」ことがある。"
9178
9179 #.  .SH HISTORY
9180 #.  UNIX V7 defines the three routines
9181 #.  .BR printf (),
9182 #.  .BR fprintf (),
9183 #.  .BR sprintf (),
9184 #.  and has the flag \-, the width or precision *, the length modifier l,
9185 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
9186 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
9187 #.  #, + and <space> and no longer mentions D,O,U,X.
9188 #.  2.11BSD has
9189 #.  .BR vprintf (),
9190 #.  .BR vfprintf (),
9191 #.  .BR vsprintf (),
9192 #.  and warns not to use D,O,U,X.
9193 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
9194 #.  and the conversions n, p, E, G, X (with current meaning)
9195 #.  and deprecates D,O,U.
9196 #.  4.4BSD introduces the functions
9197 #.  .BR snprintf ()
9198 #.  and
9199 #.  .BR vsnprintf (),
9200 #.  and the length modifier q.
9201 #.  FreeBSD also has functions
9202 #.  .BR asprintf ()
9203 #.  and
9204 #.  .BR vasprintf (),
9205 #.  that allocate a buffer large enough for
9206 #.  .BR sprintf ().
9207 #.  In glibc there are functions
9208 #.  .BR dprintf ()
9209 #.  and
9210 #.  .BR vdprintf ()
9211 #.  that print to a file descriptor instead of a stream.
9212 #. type: Plain text
9213 #: build/C/man3/printf.3:929
9214 msgid ""
9215 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
9216 "conforms to the C99 standard, that is, behaves as described above, since "
9217 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
9218 "was truncated."
9219 msgstr ""
9220 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
9221 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
9222 "切り詰められた場合は -1 を返す。"
9223
9224 #. type: Plain text
9225 #: build/C/man3/printf.3:946
9226 msgid ""
9227 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
9228 "callers must be careful not to overflow the actual space; this is often "
9229 "impossible to assure.  Note that the length of the strings produced is "
9230 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
9231 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
9232 msgstr ""
9233 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
9234 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
9235 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
9236 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
9237 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
9238
9239 #. type: Plain text
9240 #: build/C/man3/printf.3:959
9241 msgid ""
9242 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
9243 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
9244 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
9245 "libc4 leads to serious security problems."
9246 msgstr ""
9247 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
9248 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
9249 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
9250 "深刻なセキュリティ問題を引き起こすことがある。"
9251
9252 #.  .PP
9253 #.  Some floating-point conversions under early libc4
9254 #.  caused memory leaks.
9255 #. type: Plain text
9256 #: build/C/man3/printf.3:973
9257 msgid ""
9258 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
9259 "contain a % character.  If I<foo> comes from untrusted user input, it may "
9260 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
9261 "a security hole."
9262 msgstr ""
9263 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
9264 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
9265 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
9266 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
9267 "ルを作ることになるかもしれない。"
9268
9269 #. type: Plain text
9270 #: build/C/man3/printf.3:977
9271 msgid "To print I<Pi> to five decimal places:"
9272 msgstr "I<Pi> を 5 桁で出力する。"
9273
9274 #. type: Plain text
9275 #: build/C/man3/printf.3:983
9276 #, no-wrap
9277 msgid ""
9278 "#include E<lt>math.hE<gt>\n"
9279 "#include E<lt>stdio.hE<gt>\n"
9280 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9281 msgstr ""
9282 "#include E<lt>math.hE<gt>\n"
9283 "#include E<lt>stdio.hE<gt>\n"
9284 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9285
9286 #. type: Plain text
9287 #: build/C/man3/printf.3:992
9288 msgid ""
9289 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
9290 "I<weekday> and I<month> are pointers to strings:"
9291 msgstr ""
9292 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
9293 "I<month> は文字列へのポインタである)"
9294
9295 #. type: Plain text
9296 #: build/C/man3/printf.3:998
9297 #, no-wrap
9298 msgid ""
9299 "#include E<lt>stdio.hE<gt>\n"
9300 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9301 "        weekday, month, day, hour, min);\n"
9302 msgstr ""
9303 "#include E<lt>stdio.hE<gt>\n"
9304 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9305 "\tweekday, month, day, hour, min);\n"
9306
9307 #. type: Plain text
9308 #: build/C/man3/printf.3:1004
9309 msgid ""
9310 "Many countries use the day-month-year order.  Hence, an internationalized "
9311 "version must be able to print the arguments in an order specified by the "
9312 "format:"
9313 msgstr ""
9314 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
9315 "順番で 引き数を表示できなければならない。"
9316
9317 #. type: Plain text
9318 #: build/C/man3/printf.3:1010
9319 #, no-wrap
9320 msgid ""
9321 "#include E<lt>stdio.hE<gt>\n"
9322 "fprintf(stdout, format,\n"
9323 "        weekday, month, day, hour, min);\n"
9324 msgstr ""
9325 "#include E<lt>stdio.hE<gt>\n"
9326 "fprintf(stdout, format,\n"
9327 "\tweekday, month, day, hour, min);\n"
9328
9329 #. type: Plain text
9330 #: build/C/man3/printf.3:1017
9331 msgid ""
9332 "where I<format> depends on locale, and may permute the arguments.  With the "
9333 "value:"
9334 msgstr ""
9335 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
9336 "I<format> が"
9337
9338 #. type: Plain text
9339 #: build/C/man3/printf.3:1021
9340 #, no-wrap
9341 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9342 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9343
9344 #. type: Plain text
9345 #: build/C/man3/printf.3:1025
9346 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
9347 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
9348
9349 #. type: Plain text
9350 #: build/C/man3/printf.3:1028
9351 msgid ""
9352 "To allocate a sufficiently large string and print into it (code correct for "
9353 "both glibc 2.0 and glibc 2.1):"
9354 msgstr ""
9355 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
9356 "と glibc 2.1 の両方で正しく動作するコード):"
9357
9358 #. type: Plain text
9359 #: build/C/man3/printf.3:1031
9360 msgid ""
9361 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
9362 "error instead of being handled gracefully."
9363 msgstr ""
9364 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
9365 "理されず、エラーとして扱われる。"
9366
9367 #. type: Plain text
9368 #: build/C/man3/printf.3:1036
9369 #, no-wrap
9370 msgid ""
9371 "#include E<lt>stdio.hE<gt>\n"
9372 "#include E<lt>stdlib.hE<gt>\n"
9373 "#include E<lt>stdarg.hE<gt>\n"
9374 msgstr ""
9375 "#include E<lt>stdio.hE<gt>\n"
9376 "#include E<lt>stdlib.hE<gt>\n"
9377 "#include E<lt>stdarg.hE<gt>\n"
9378
9379 #. type: Plain text
9380 #: build/C/man3/printf.3:1044
9381 #, no-wrap
9382 msgid ""
9383 "char *\n"
9384 "make_message(const char *fmt, ...)\n"
9385 "{\n"
9386 "    int n;\n"
9387 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9388 "    char *p, *np;\n"
9389 "    va_list ap;\n"
9390 msgstr ""
9391 "char *\n"
9392 "make_message(const char *fmt, ...)\n"
9393 "{\n"
9394 "    int n;\n"
9395 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9396 "    char *p, *np;\n"
9397 "    va_list ap;\n"
9398
9399 #. type: Plain text
9400 #: build/C/man3/printf.3:1047
9401 #, no-wrap
9402 msgid ""
9403 "    if ((p = malloc(size)) == NULL)\n"
9404 "        return NULL;\n"
9405 msgstr ""
9406 "    if ((p = malloc(size)) == NULL)\n"
9407 "        return NULL;\n"
9408
9409 #. type: Plain text
9410 #: build/C/man3/printf.3:1049
9411 #, no-wrap
9412 msgid "    while (1) {\n"
9413 msgstr "    while (1) {\n"
9414
9415 #. type: Plain text
9416 #: build/C/man3/printf.3:1051
9417 #, no-wrap
9418 msgid "        /* Try to print in the allocated space */\n"
9419 msgstr "        /* Try to print in the allocated space */\n"
9420
9421 #. type: Plain text
9422 #: build/C/man3/printf.3:1055
9423 #, no-wrap
9424 msgid ""
9425 "        va_start(ap, fmt);\n"
9426 "        n = vsnprintf(p, size, fmt, ap);\n"
9427 "        va_end(ap);\n"
9428 msgstr ""
9429 "        va_start(ap, fmt);\n"
9430 "        n = vsnprintf(p, size, fmt, ap);\n"
9431 "        va_end(ap);\n"
9432
9433 #. type: Plain text
9434 #: build/C/man3/printf.3:1057
9435 #, no-wrap
9436 msgid "        /* Check error code */\n"
9437 msgstr "        /* Check error code */\n"
9438
9439 #. type: Plain text
9440 #: build/C/man3/printf.3:1060
9441 #, no-wrap
9442 msgid ""
9443 "        if (n E<lt> 0)\n"
9444 "            return NULL;\n"
9445 msgstr ""
9446 "        if (n E<lt> 0)\n"
9447 "            return NULL;\n"
9448
9449 #. type: Plain text
9450 #: build/C/man3/printf.3:1062
9451 #, no-wrap
9452 msgid "        /* If that worked, return the string */\n"
9453 msgstr "        /* If that worked, return the string */\n"
9454
9455 #. type: Plain text
9456 #: build/C/man3/printf.3:1065
9457 #, no-wrap
9458 msgid ""
9459 "        if (n E<lt> size)\n"
9460 "            return p;\n"
9461 msgstr ""
9462 "        if (n E<lt> size)\n"
9463 "            return p;\n"
9464
9465 #. type: Plain text
9466 #: build/C/man3/printf.3:1067
9467 #, no-wrap
9468 msgid "        /* Else try again with more space */\n"
9469 msgstr "        /* Else try again with more space */\n"
9470
9471 #. type: Plain text
9472 #: build/C/man3/printf.3:1069
9473 #, no-wrap
9474 msgid "        size = n + 1;       /* Precisely what is needed */\n"
9475 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
9476
9477 #. type: Plain text
9478 #: build/C/man3/printf.3:1079
9479 #, no-wrap
9480 msgid ""
9481 "        if ((np = realloc (p, size)) == NULL) {\n"
9482 "            free(p);\n"
9483 "            return NULL;\n"
9484 "        } else {\n"
9485 "            p = np;\n"
9486 "        }\n"
9487 "    }\n"
9488 "}\n"
9489 msgstr ""
9490 "        if ((np = realloc (p, size)) == NULL) {\n"
9491 "            free(p);\n"
9492 "            return NULL;\n"
9493 "        } else {\n"
9494 "            p = np;\n"
9495 "        }\n"
9496 "    }\n"
9497 "}\n"
9498
9499 #. type: Plain text
9500 #: build/C/man3/printf.3:1089
9501 msgid ""
9502 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9503 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9504 msgstr ""
9505 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9506 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9507
9508 #. type: TH
9509 #: build/C/man3/puts.3:26
9510 #, no-wrap
9511 msgid "PUTS"
9512 msgstr "PUTS"
9513
9514 #. type: TH
9515 #: build/C/man3/puts.3:26
9516 #, no-wrap
9517 msgid "2011-09-28"
9518 msgstr "2011-09-28"
9519
9520 #. type: Plain text
9521 #: build/C/man3/puts.3:29
9522 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9523 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9524
9525 #. type: Plain text
9526 #: build/C/man3/puts.3:34
9527 #, no-wrap
9528 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9529 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9530
9531 #. type: Plain text
9532 #: build/C/man3/puts.3:36
9533 #, no-wrap
9534 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9535 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9536
9537 #. type: Plain text
9538 #: build/C/man3/puts.3:38
9539 #, no-wrap
9540 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9541 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9542
9543 #. type: Plain text
9544 #: build/C/man3/puts.3:40
9545 #, no-wrap
9546 msgid "B<int putchar(int >I<c>B<);>\n"
9547 msgstr "B<int putchar(int >I<c>B<);>\n"
9548
9549 #. type: Plain text
9550 #: build/C/man3/puts.3:42
9551 #, no-wrap
9552 msgid "B<int puts(const char *>I<s>B<);>\n"
9553 msgstr "B<int puts(const char *>I<s>B<);>\n"
9554
9555 #. type: Plain text
9556 #: build/C/man3/puts.3:51
9557 msgid ""
9558 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9559 "I<stream>."
9560 msgstr ""
9561 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9562 "に書き込む。"
9563
9564 #. type: Plain text
9565 #: build/C/man3/puts.3:58
9566 msgid ""
9567 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9568 "null byte (\\(aq\\e0\\(aq)."
9569 msgstr ""
9570 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9571 "ト (\\(aq\\e0\\(aq) は出力しない。"
9572
9573 #. type: Plain text
9574 #: build/C/man3/puts.3:65
9575 msgid ""
9576 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9577 "a macro which evaluates I<stream> more than once."
9578 msgstr ""
9579 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9580 "れないという点を除き、 B<fputc>()  と同じである。"
9581
9582 #. type: Plain text
9583 #: build/C/man3/puts.3:69
9584 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9585 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9586
9587 #. type: Plain text
9588 #: build/C/man3/puts.3:76
9589 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9590 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9591
9592 #. type: Plain text
9593 #: build/C/man3/puts.3:81
9594 msgid ""
9595 "Calls to the functions described here can be mixed with each other and with "
9596 "calls to other output functions from the I<stdio> library for the same "
9597 "output stream."
9598 msgstr ""
9599 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9600 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9601 "る。"
9602
9603 #. type: Plain text
9604 #: build/C/man3/puts.3:96
9605 msgid ""
9606 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9607 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9608 msgstr ""
9609 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9610 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9611
9612 #. type: Plain text
9613 #: build/C/man3/puts.3:103
9614 msgid ""
9615 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9616 "on error."
9617 msgstr ""
9618 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9619 "は B<EOF> を返す。"
9620
9621 #. type: Plain text
9622 #: build/C/man3/puts.3:112
9623 msgid ""
9624 "It is not advisable to mix calls to output functions from the I<stdio> "
9625 "library with low-level calls to B<write>(2)  for the file descriptor "
9626 "associated with the same output stream; the results will be undefined and "
9627 "very probably not what you want."
9628 msgstr ""
9629 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9630 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9631 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9632 "性が高い。"
9633
9634 #. type: Plain text
9635 #: build/C/man3/puts.3:124
9636 msgid ""
9637 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9638 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9639 "(3)"
9640 msgstr ""
9641 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9642 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9643 "(3)"
9644
9645 #. type: TH
9646 #: build/C/man2/read.2:35
9647 #, no-wrap
9648 msgid "READ"
9649 msgstr "READ"
9650
9651 #. type: TH
9652 #: build/C/man2/read.2:35
9653 #, no-wrap
9654 msgid "2013-02-12"
9655 msgstr "2013-02-12"
9656
9657 #. type: Plain text
9658 #: build/C/man2/read.2:38
9659 msgid "read - read from a file descriptor"
9660 msgstr "read - ファイルディスクリプタから読み込む"
9661
9662 #. type: Plain text
9663 #: build/C/man2/read.2:43
9664 #, no-wrap
9665 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9666 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9667
9668 #. type: Plain text
9669 #: build/C/man2/read.2:52
9670 msgid ""
9671 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9672 "into the buffer starting at I<buf>."
9673 msgstr ""
9674 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9675 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9676
9677 #. type: Plain text
9678 #: build/C/man2/read.2:60
9679 msgid ""
9680 "On files that support seeking, the read operation commences at the current "
9681 "file offset, and the file offset is incremented by the number of bytes "
9682 "read.  If the current file offset is at or past the end of file, no bytes "
9683 "are read, and B<read>()  returns zero."
9684 msgstr ""
9685 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
9686 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
9687 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
9688 "0 を返す。"
9689
9690 #. type: Plain text
9691 #: build/C/man2/read.2:75
9692 msgid ""
9693 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
9694 "In the absence of any errors, or if B<read>()  does not check for errors, a "
9695 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
9696 msgstr ""
9697 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
9698 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
9699 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
9700
9701 #. type: Plain text
9702 #: build/C/man2/read.2:81
9703 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9704 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
9705
9706 #. type: Plain text
9707 #: build/C/man2/read.2:95
9708 msgid ""
9709 "On success, the number of bytes read is returned (zero indicates end of "
9710 "file), and the file position is advanced by this number.  It is not an error "
9711 "if this number is smaller than the number of bytes requested; this may "
9712 "happen for example because fewer bytes are actually available right now "
9713 "(maybe because we were close to end-of-file, or because we are reading from "
9714 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9715 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9716 "this case it is left unspecified whether the file position (if any) changes."
9717 msgstr ""
9718 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9719 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9720 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9721 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9722 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9723 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9724 "の場合はファイル位置が変更されるかどうかは 不定である。"
9725
9726 #. type: TP
9727 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
9728 #, no-wrap
9729 msgid "B<EAGAIN>"
9730 msgstr "B<EAGAIN>"
9731
9732 #. type: Plain text
9733 #: build/C/man2/read.2:103
9734 msgid ""
9735 "The file descriptor I<fd> refers to a file other than a socket and has been "
9736 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9737 msgstr ""
9738 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9739 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9740 "する状況にある。"
9741
9742 #. type: TP
9743 #: build/C/man2/read.2:103 build/C/man2/write.2:115
9744 #, no-wrap
9745 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9746 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9747
9748 #.  Actually EAGAIN on Linux
9749 #. type: Plain text
9750 #: build/C/man2/read.2:114
9751 msgid ""
9752 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9753 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9754 "to be returned for this case, and does not require these constants to have "
9755 "the same value, so a portable application should check for both "
9756 "possibilities."
9757 msgstr ""
9758 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9759 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9760 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9761 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9762 "プリケーションでは、両方の可能性を 確認すべきである。"
9763
9764 #. type: Plain text
9765 #: build/C/man2/read.2:118
9766 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9767 msgstr ""
9768 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9769 "(open) されていない。"
9770
9771 #. type: Plain text
9772 #: build/C/man2/read.2:122 build/C/man2/write.2:145
9773 msgid "I<buf> is outside your accessible address space."
9774 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9775
9776 #. type: Plain text
9777 #: build/C/man2/read.2:126
9778 msgid ""
9779 "The call was interrupted by a signal before any data was read; see B<signal>"
9780 "(7)."
9781 msgstr ""
9782 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9783
9784 #. type: Plain text
9785 #: build/C/man2/read.2:137
9786 msgid ""
9787 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9788 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9789 "I<buf>, the value specified in I<count>, or the current file offset is not "
9790 "suitably aligned."
9791 msgstr ""
9792 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9793 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9794 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9795 "ンメントが不適切である。"
9796
9797 #. type: Plain text
9798 #: build/C/man2/read.2:147
9799 msgid ""
9800 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9801 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9802 "information."
9803 msgstr ""
9804 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9805 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9806 "こと。"
9807
9808 #. type: Plain text
9809 #: build/C/man2/read.2:158
9810 msgid ""
9811 "I/O error.  This will happen for example when the process is in a background "
9812 "process group, tries to read from its controlling terminal, and either it is "
9813 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9814 "also occur when there is a low-level I/O error while reading from a disk or "
9815 "tape."
9816 msgstr ""
9817 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
9818 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9819 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9820 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9821 "た場合にも起こる。"
9822
9823 #. type: Plain text
9824 #: build/C/man2/read.2:162
9825 msgid "I<fd> refers to a directory."
9826 msgstr "I<fd> がディレクトリを参照している。"
9827
9828 #. type: Plain text
9829 #: build/C/man2/read.2:173
9830 msgid ""
9831 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9832 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9833 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9834 "read."
9835 msgstr ""
9836 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9837 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9838 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9839 "数を返してもよい。"
9840
9841 #. type: Plain text
9842 #: build/C/man2/read.2:187
9843 msgid ""
9844 "On NFS file systems, reading small amounts of data will update the timestamp "
9845 "only the first time, subsequent calls may not do so.  This is caused by "
9846 "client side attribute caching, because most if not all NFS clients leave "
9847 "st_atime (last file access time)  updates to the server and client side "
9848 "reads satisfied from the client's cache will not cause st_atime updates on "
9849 "the server as there are no server side reads.  UNIX semantics can be "
9850 "obtained by disabling client side attribute caching, but in most situations "
9851 "this will substantially increase server load and decrease performance."
9852 msgstr ""
9853 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9854 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9855 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9856 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9857 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9858 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9859 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9860 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9861
9862 #. type: Plain text
9863 #: build/C/man2/read.2:200
9864 msgid ""
9865 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9866 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9867 "B<fread>(3)"
9868 msgstr ""
9869 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9870 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9871 "B<fread>(3)"
9872
9873 #. type: TH
9874 #: build/C/man2/readlink.2:43
9875 #, no-wrap
9876 msgid "READLINK"
9877 msgstr "READLINK"
9878
9879 #. type: TH
9880 #: build/C/man2/readlink.2:43
9881 #, fuzzy, no-wrap
9882 #| msgid "2013-02-18"
9883 msgid "2013-07-18"
9884 msgstr "2013-02-18"
9885
9886 #. type: Plain text
9887 #: build/C/man2/readlink.2:46
9888 msgid "readlink - read value of a symbolic link"
9889 msgstr "readlink - シンボリックリンクの値を読む"
9890
9891 #. type: Plain text
9892 #: build/C/man2/readlink.2:50
9893 msgid ""
9894 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9895 ">I<bufsiz>B<);>"
9896 msgstr ""
9897 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9898 ">I<bufsiz>B<);>"
9899
9900 #. type: Plain text
9901 #: build/C/man2/readlink.2:58
9902 msgid "B<readlink>():"
9903 msgstr "B<readlink>():"
9904
9905 #. type: Plain text
9906 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
9907 msgid ""
9908 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9909 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9910 msgstr ""
9911 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9912 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9913
9914 #. type: Plain text
9915 #: build/C/man2/readlink.2:77
9916 msgid ""
9917 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9918 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9919 "null byte to I<buf>.  It will truncate the contents (to a length of "
9920 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9921 "contents."
9922 msgstr ""
9923 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9924 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9925 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9926 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9927
9928 #. type: Plain text
9929 #: build/C/man2/readlink.2:85
9930 msgid ""
9931 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9932 "error, -1 is returned and I<errno> is set to indicate the error."
9933 msgstr ""
9934 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9935 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9936
9937 #. type: Plain text
9938 #: build/C/man2/readlink.2:91
9939 msgid ""
9940 "Search permission is denied for a component of the path prefix.  (See also "
9941 "B<path_resolution>(7).)"
9942 msgstr ""
9943 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9944 "参照すること)。"
9945
9946 #. type: Plain text
9947 #: build/C/man2/readlink.2:95
9948 msgid "I<buf> extends outside the process's allocated address space."
9949 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9950
9951 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9952 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9953 #.  and this error can also occur if bufsiz < 0.
9954 #.  See: http://thread.gmane.org/gmane.linux.man/380
9955 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9956 #. type: Plain text
9957 #: build/C/man2/readlink.2:104
9958 msgid "I<bufsiz> is not positive."
9959 msgstr "I<bufsiz> が正でない。"
9960
9961 #. type: Plain text
9962 #: build/C/man2/readlink.2:107
9963 msgid "The named file is not a symbolic link."
9964 msgstr "指定したファイルがシンボリックリンクでない。"
9965
9966 #. type: Plain text
9967 #: build/C/man2/readlink.2:110
9968 msgid "An I/O error occurred while reading from the file system."
9969 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9970
9971 #. type: Plain text
9972 #: build/C/man2/readlink.2:113
9973 msgid "Too many symbolic links were encountered in translating the pathname."
9974 msgstr "パス名にシンボリックリンクが多すぎる。"
9975
9976 #. type: Plain text
9977 #: build/C/man2/readlink.2:116
9978 msgid "A pathname, or a component of a pathname, was too long."
9979 msgstr "パス名かパス名の一部分が長過ぎる。"
9980
9981 #. type: Plain text
9982 #: build/C/man2/readlink.2:119
9983 msgid "The named file does not exist."
9984 msgstr "その名前のファイルが存在しない。"
9985
9986 #. type: Plain text
9987 #: build/C/man2/readlink.2:125
9988 msgid "A component of the path prefix is not a directory."
9989 msgstr "パスのディレクトリ部分がディレクトリでない。"
9990
9991 #. type: Plain text
9992 #: build/C/man2/readlink.2:130
9993 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9994 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9995
9996 #. type: Plain text
9997 #: build/C/man2/readlink.2:138
9998 msgid ""
9999 "In versions of glibc up to and including glibc 2.4, the return type of "
10000 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
10001 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
10002 msgstr ""
10003 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
10004 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
10005 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
10006
10007 #. type: Plain text
10008 #: build/C/man2/readlink.2:157
10009 msgid ""
10010 "Using a statically sized buffer might not provide enough room for the "
10011 "symbolic link contents.  The required size for the buffer can be obtained "
10012 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
10013 "link.  However, the number of bytes written by B<readlink>()  should be "
10014 "checked to make sure that the size of the symbolic link did not increase "
10015 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
10016 "also addresses a common portability problem when using I<PATH_MAX> for the "
10017 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
10018 "the system does not have such limit."
10019 msgstr ""
10020 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
10021 "格納するのに十分な領域がない場合がある。\n"
10022 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
10023 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
10024 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
10025 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
10026 "の間で増えていないことを確認すべきである。\n"
10027 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
10028 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
10029 "問題を解決することができる。なぜなら、POSIX では、\n"
10030 "システムがそのような上限値を定義していない場合には、\n"
10031 "I<PATH_MAX> が定義されることが保証されていないからである。"
10032
10033 #. type: Plain text
10034 #: build/C/man2/readlink.2:163
10035 msgid ""
10036 "The following program allocates the buffer needed by B<readlink>()  "
10037 "dynamically from the information provided by B<lstat>(), making sure there's "
10038 "no race condition between the calls."
10039 msgstr ""
10040 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
10041 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
10042 "また、両方の呼び出し間で競合条件がないことを保証している。"
10043
10044 #. type: Plain text
10045 #: build/C/man2/readlink.2:170
10046 #, no-wrap
10047 msgid ""
10048 "#include E<lt>sys/types.hE<gt>\n"
10049 "#include E<lt>sys/stat.hE<gt>\n"
10050 "#include E<lt>stdio.hE<gt>\n"
10051 "#include E<lt>stdlib.hE<gt>\n"
10052 "#include E<lt>unistd.hE<gt>\n"
10053 msgstr ""
10054 "#include E<lt>sys/types.hE<gt>\n"
10055 "#include E<lt>sys/stat.hE<gt>\n"
10056 "#include E<lt>stdio.hE<gt>\n"
10057 "#include E<lt>stdlib.hE<gt>\n"
10058 "#include E<lt>unistd.hE<gt>\n"
10059
10060 #. type: Plain text
10061 #: build/C/man2/readlink.2:177
10062 #, no-wrap
10063 msgid ""
10064 "int\n"
10065 "main(int argc, char *argv[])\n"
10066 "{\n"
10067 "    struct stat sb;\n"
10068 "    char *linkname;\n"
10069 "    ssize_t r;\n"
10070 msgstr ""
10071 "int\n"
10072 "main(int argc, char *argv[])\n"
10073 "{\n"
10074 "    struct stat sb;\n"
10075 "    char *linkname;\n"
10076 "    ssize_t r;\n"
10077
10078 #. type: Plain text
10079 #: build/C/man2/readlink.2:182
10080 #, no-wrap
10081 msgid ""
10082 "    if (argc != 2) {\n"
10083 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10084 "        exit(EXIT_FAILURE);\n"
10085 "    }\n"
10086 msgstr ""
10087 "    if (argc != 2) {\n"
10088 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10089 "        exit(EXIT_FAILURE);\n"
10090 "    }\n"
10091
10092 #. type: Plain text
10093 #: build/C/man2/readlink.2:187
10094 #, no-wrap
10095 msgid ""
10096 "    if (lstat(argv[1], &sb) == -1) {\n"
10097 "        perror(\"lstat\");\n"
10098 "        exit(EXIT_FAILURE);\n"
10099 "    }\n"
10100 msgstr ""
10101 "    if (lstat(argv[1], &sb) == -1) {\n"
10102 "        perror(\"lstat\");\n"
10103 "        exit(EXIT_FAILURE);\n"
10104 "    }\n"
10105
10106 #. type: Plain text
10107 #: build/C/man2/readlink.2:193
10108 #, no-wrap
10109 msgid ""
10110 "    linkname = malloc(sb.st_size + 1);\n"
10111 "    if (linkname == NULL) {\n"
10112 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10113 "        exit(EXIT_FAILURE);\n"
10114 "    }\n"
10115 msgstr ""
10116 "    linkname = malloc(sb.st_size + 1);\n"
10117 "    if (linkname == NULL) {\n"
10118 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10119 "        exit(EXIT_FAILURE);\n"
10120 "    }\n"
10121
10122 #. type: Plain text
10123 #: build/C/man2/readlink.2:195
10124 #, no-wrap
10125 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10126 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10127
10128 #. type: Plain text
10129 #: build/C/man2/readlink.2:200
10130 #, fuzzy, no-wrap
10131 #| msgid ""
10132 #| "    if (r E<lt> 0) {\n"
10133 #| "        perror(\"lstat\");\n"
10134 #| "        exit(EXIT_FAILURE);\n"
10135 #| "    }\n"
10136 msgid ""
10137 "    if (r == -1) {\n"
10138 "        perror(\"lstat\");\n"
10139 "        exit(EXIT_FAILURE);\n"
10140 "    }\n"
10141 msgstr ""
10142 "    if (r E<lt> 0) {\n"
10143 "        perror(\"lstat\");\n"
10144 "        exit(EXIT_FAILURE);\n"
10145 "    }\n"
10146
10147 #. type: Plain text
10148 #: build/C/man2/readlink.2:206
10149 #, no-wrap
10150 msgid ""
10151 "    if (r E<gt> sb.st_size) {\n"
10152 "        fprintf(stderr, \"symlink increased in size \"\n"
10153 "                        \"between lstat() and readlink()\\en\");\n"
10154 "        exit(EXIT_FAILURE);\n"
10155 "    }\n"
10156 msgstr ""
10157 "    if (r E<gt> sb.st_size) {\n"
10158 "        fprintf(stderr, \"symlink increased in size \"\n"
10159 "                        \"between lstat() and readlink()\\en\");\n"
10160 "        exit(EXIT_FAILURE);\n"
10161 "    }\n"
10162
10163 #. type: Plain text
10164 #: build/C/man2/readlink.2:208
10165 #, fuzzy, no-wrap
10166 #| msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10167 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
10168 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
10169
10170 #. type: Plain text
10171 #: build/C/man2/readlink.2:210
10172 #, no-wrap
10173 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10174 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10175
10176 #. type: Plain text
10177 #: build/C/man2/readlink.2:222
10178 msgid ""
10179 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
10180 "B<path_resolution>(7), B<symlink>(7)"
10181 msgstr ""
10182 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
10183 "B<path_resolution>(7), B<symlink>(7)"
10184
10185 #. type: TH
10186 #: build/C/man2/readv.2:32
10187 #, no-wrap
10188 msgid "READV"
10189 msgstr "READV"
10190
10191 #. type: TH
10192 #: build/C/man2/readv.2:32
10193 #, no-wrap
10194 msgid "2010-11-17"
10195 msgstr "2010-11-17"
10196
10197 #. type: Plain text
10198 #: build/C/man2/readv.2:35
10199 msgid ""
10200 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
10201 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
10202
10203 #. type: Plain text
10204 #: build/C/man2/readv.2:38
10205 #, no-wrap
10206 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
10207 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
10208
10209 #. type: Plain text
10210 #: build/C/man2/readv.2:40
10211 #, no-wrap
10212 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10213 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10214
10215 #. type: Plain text
10216 #: build/C/man2/readv.2:42
10217 #, no-wrap
10218 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10219 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10220
10221 #. type: Plain text
10222 #: build/C/man2/readv.2:45
10223 #, no-wrap
10224 msgid ""
10225 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10226 "B<               off_t >I<offset>B<);>\n"
10227 msgstr ""
10228 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10229 "B<               off_t >I<offset>B<);>\n"
10230
10231 #. type: Plain text
10232 #: build/C/man2/readv.2:48
10233 #, no-wrap
10234 msgid ""
10235 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10236 "B<                off_t >I<offset>B<);>\n"
10237 msgstr ""
10238 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10239 "B<                off_t >I<offset>B<);>\n"
10240
10241 #. type: Plain text
10242 #: build/C/man2/readv.2:58
10243 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10244 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10245
10246 #. type: Plain text
10247 #: build/C/man2/readv.2:68
10248 msgid ""
10249 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
10250 "with the file descriptor I<fd> into the buffers described by I<iov> "
10251 "(\"scatter input\")."
10252 msgstr ""
10253 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
10254 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
10255 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
10256
10257 #. type: Plain text
10258 #: build/C/man2/readv.2:78
10259 msgid ""
10260 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
10261 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
10262 "\")."
10263 msgstr ""
10264 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
10265 "I<iovcnt>\n"
10266 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
10267 "ら\n"
10268 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
10269
10270 #. type: Plain text
10271 #: build/C/man2/readv.2:87
10272 msgid ""
10273 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
10274 "I<E<lt>sys/uio.hE<gt>> as:"
10275 msgstr ""
10276 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
10277 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10278
10279 #. type: Plain text
10280 #: build/C/man2/readv.2:95
10281 #, no-wrap
10282 msgid ""
10283 "struct iovec {\n"
10284 "    void  *iov_base;    /* Starting address */\n"
10285 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10286 "};\n"
10287 msgstr ""
10288 "struct iovec {\n"
10289 "    void  *iov_base;    /* Starting address */\n"
10290 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10291 "};\n"
10292
10293 #. type: Plain text
10294 #: build/C/man2/readv.2:103
10295 msgid ""
10296 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
10297 "buffers are filled."
10298 msgstr ""
10299 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
10300 "B<read>(2) と全く同様の動作を行う。"
10301
10302 #. type: Plain text
10303 #: build/C/man2/readv.2:109
10304 msgid ""
10305 "The B<writev>()  system call works just like B<write>(2)  except that "
10306 "multiple buffers are written out."
10307 msgstr ""
10308 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
10309 "B<write>(2) と全く同様の動作を行う。"
10310
10311 #. type: Plain text
10312 #: build/C/man2/readv.2:128
10313 msgid ""
10314 "Buffers are processed in array order.  This means that B<readv>()  "
10315 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
10316 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
10317 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
10318 "[0] before proceeding to I<iov>[1], and so on."
10319 msgstr ""
10320 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
10321 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
10322 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
10323 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
10324
10325 #. type: Plain text
10326 #: build/C/man2/readv.2:146
10327 msgid ""
10328 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
10329 "data written by B<writev>()  is written as a single block that is not "
10330 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
10331 "for an exception); analogously, B<readv>()  is guaranteed to read a "
10332 "contiguous block of data from the file, regardless of read operations "
10333 "performed in other threads or processes that have file descriptors referring "
10334 "to the same open file description (see B<open>(2))."
10335 msgstr ""
10336 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
10337 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
10338 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
10339 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
10340 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
10341 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
10342 "作の影響を受けることはない。"
10343
10344 #. type: SS
10345 #: build/C/man2/readv.2:146
10346 #, no-wrap
10347 msgid "preadv() and pwritev()"
10348 msgstr "preadv() と pwritev()"
10349
10350 #. type: Plain text
10351 #: build/C/man2/readv.2:159
10352 msgid ""
10353 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
10354 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
10355 "argument, I<offset>, which specifies the file offset at which the input "
10356 "operation is to be performed."
10357 msgstr ""
10358 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
10359 "組み合わせたものである。\n"
10360 "B<readv>() と同じ処理を実行するが、\n"
10361 "4 番目の引き数 I<offset> が追加されており、\n"
10362 "この引き数は入力操作を行うファイルオフセットを指定する。"
10363
10364 #. type: Plain text
10365 #: build/C/man2/readv.2:172
10366 msgid ""
10367 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
10368 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
10369 "argument, I<offset>, which specifies the file offset at which the output "
10370 "operation is to be performed."
10371 msgstr ""
10372 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
10373 "組み合わせたものである。\n"
10374 "B<writev>() と同じ処理を実行するが、\n"
10375 "4 番目の引き数 I<offset> が追加されており、\n"
10376 "この引き数は出力操作を行うファイルオフセットを指定する。"
10377
10378 #. type: Plain text
10379 #: build/C/man2/readv.2:177
10380 msgid ""
10381 "The file offset is not changed by these system calls.  The file referred to "
10382 "by I<fd> must be capable of seeking."
10383 msgstr ""
10384 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
10385 "I<fd> が参照するファイルは seek 可能でなければならない。"
10386
10387 #. type: Plain text
10388 #: build/C/man2/readv.2:188
10389 msgid ""
10390 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
10391 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
10392 "error, -1 is returned, and I<errno> is set appropriately."
10393 msgstr ""
10394 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
10395 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
10396 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
10397
10398 #. type: Plain text
10399 #: build/C/man2/readv.2:200
10400 msgid ""
10401 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
10402 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
10403 "(2).  Additionally, the following error is defined:"
10404 msgstr ""
10405 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
10406 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
10407 "る。\n"
10408 "また、追加で以下のエラーが定義されている:"
10409
10410 #. type: Plain text
10411 #: build/C/man2/readv.2:209
10412 msgid ""
10413 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
10414 "vector count I<iovcnt> is less than zero or greater than the permitted "
10415 "maximum."
10416 msgstr ""
10417 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
10418 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
10419
10420 #. type: Plain text
10421 #: build/C/man2/readv.2:214
10422 msgid ""
10423 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10424 "support was added in glibc 2.10."
10425 msgstr ""
10426 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10427 "ライブラリによるサポートは glibc 2.10 で追加された。"
10428
10429 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10430 #.  (Says release.libc.)
10431 #. type: Plain text
10432 #: build/C/man2/readv.2:222
10433 msgid ""
10434 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10435 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10436 "I<iovcnt> argument, and I<int> as the return type."
10437 msgstr ""
10438 "B<readv>(), B<writev>(): \n"
10439 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10440 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10441 "返り値の型として I<int> を使用していた。"
10442
10443 #. type: Plain text
10444 #: build/C/man2/readv.2:226
10445 msgid ""
10446 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10447 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10448
10449 #. type: SS
10450 #: build/C/man2/readv.2:227
10451 #, no-wrap
10452 msgid "Linux notes"
10453 msgstr "Linux での注意"
10454
10455 #. type: Plain text
10456 #: build/C/man2/readv.2:258
10457 msgid ""
10458 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10459 "items that can be passed in I<iov>.  An implementation can advertise its "
10460 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10461 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10462 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10463 "glibc wrapper functions do some extra work if they detect that the "
10464 "underlying kernel system call failed because this limit was exceeded.  In "
10465 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10466 "large enough for all of the items specified by I<iov>, passes that buffer in "
10467 "a call to B<read>(2), copies data from the buffer to the locations specified "
10468 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10469 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10470 "using a temporary buffer and a call to B<write>(2)."
10471 msgstr ""
10472 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10473 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10474 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10475 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10476 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10477 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10478 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10479 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10480 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10481 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10482 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10483 "(2)  を呼び出す。"
10484
10485 #. type: Plain text
10486 #: build/C/man2/readv.2:265
10487 msgid ""
10488 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10489 "operate on file descriptors, with the functions from the stdio library; the "
10490 "results will be undefined and probably not what you want."
10491 msgstr ""
10492 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10493 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10494 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10495 "得られないだろう。"
10496
10497 #. type: Plain text
10498 #: build/C/man2/readv.2:268
10499 msgid "The following code sample demonstrates the use of B<writev>():"
10500 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10501
10502 #. type: Plain text
10503 #: build/C/man2/readv.2:275
10504 #, no-wrap
10505 msgid ""
10506 "char *str0 = \"hello \";\n"
10507 "char *str1 = \"world\\en\";\n"
10508 "struct iovec iov[2];\n"
10509 "ssize_t nwritten;\n"
10510 msgstr ""
10511 "char *str0 = \"hello \";\n"
10512 "char *str1 = \"world\\en\";\n"
10513 "struct iovec iov[2];\n"
10514 "ssize_t nwritten;\n"
10515
10516 #. type: Plain text
10517 #: build/C/man2/readv.2:280
10518 #, no-wrap
10519 msgid ""
10520 "iov[0].iov_base = str0;\n"
10521 "iov[0].iov_len = strlen(str0);\n"
10522 "iov[1].iov_base = str1;\n"
10523 "iov[1].iov_len = strlen(str1);\n"
10524 msgstr ""
10525 "iov[0].iov_base = str0;\n"
10526 "iov[0].iov_len = strlen(str0);\n"
10527 "iov[1].iov_base = str1;\n"
10528 "iov[1].iov_len = strlen(str1);\n"
10529
10530 #. type: Plain text
10531 #: build/C/man2/readv.2:282
10532 #, no-wrap
10533 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10534 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10535
10536 #. type: Plain text
10537 #: build/C/man2/readv.2:288
10538 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10539 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10540
10541 #. type: TH
10542 #: build/C/man3/remove.3:31
10543 #, no-wrap
10544 msgid "REMOVE"
10545 msgstr "REMOVE"
10546
10547 #. type: TH
10548 #: build/C/man3/remove.3:31
10549 #, no-wrap
10550 msgid "2008-12-03"
10551 msgstr "2008-12-03"
10552
10553 #. type: Plain text
10554 #: build/C/man3/remove.3:34
10555 msgid "remove - remove a file or directory"
10556 msgstr "remove - ファイルやディレクトリを削除する"
10557
10558 #. type: Plain text
10559 #: build/C/man3/remove.3:38
10560 msgid "B<int remove(const char *>I<pathname>B<);>"
10561 msgstr "B<int remove(const char *>I<pathname>B<);>"
10562
10563 #. type: Plain text
10564 #: build/C/man3/remove.3:46
10565 msgid ""
10566 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10567 "for files, and B<rmdir>(2)  for directories."
10568 msgstr ""
10569 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10570 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10571
10572 #. type: Plain text
10573 #: build/C/man3/remove.3:50
10574 msgid ""
10575 "If the removed name was the last link to a file and no processes have the "
10576 "file open, the file is deleted and the space it was using is made available "
10577 "for reuse."
10578 msgstr ""
10579 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10580 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10581 "ことができるようになる。"
10582
10583 #. type: Plain text
10584 #: build/C/man3/remove.3:55
10585 msgid ""
10586 "If the name was the last link to a file, but any processes still have the "
10587 "file open, the file will remain in existence until the last file descriptor "
10588 "referring to it is closed."
10589 msgstr ""
10590 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10591 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10592 "でファイルは存在し続ける。"
10593
10594 #. type: Plain text
10595 #: build/C/man3/remove.3:57
10596 msgid "If the name referred to a symbolic link, the link is removed."
10597 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10598
10599 #. type: Plain text
10600 #: build/C/man3/remove.3:60
10601 msgid ""
10602 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10603 "processes which have the object open may continue to use it."
10604 msgstr ""
10605 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10606 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10607
10608 #. type: Plain text
10609 #: build/C/man3/remove.3:70
10610 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10611 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10612
10613 #. type: Plain text
10614 #: build/C/man3/remove.3:72
10615 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10616 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10617
10618 #. type: Plain text
10619 #: build/C/man3/remove.3:78
10620 msgid ""
10621 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10622 "hence would not remove directories)."
10623 msgstr ""
10624 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10625 "(従ってディレクトリを削除できなかった)。"
10626
10627 #. type: Plain text
10628 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10629 msgid ""
10630 "Infelicities in the protocol underlying NFS can cause the unexpected "
10631 "disappearance of files which are still being used."
10632 msgstr ""
10633 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10634 "うことがありえる。"
10635
10636 #. type: Plain text
10637 #: build/C/man3/remove.3:92
10638 msgid ""
10639 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10640 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10641 msgstr ""
10642 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10643 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10644
10645 #. type: TH
10646 #: build/C/man2/rename.2:32
10647 #, no-wrap
10648 msgid "RENAME"
10649 msgstr "RENAME"
10650
10651 #. type: Plain text
10652 #: build/C/man2/rename.2:35
10653 msgid "rename - change the name or location of a file"
10654 msgstr "rename - ファイルの名前や位置を変更する"
10655
10656 #. type: Plain text
10657 #: build/C/man2/rename.2:39
10658 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10659 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10660
10661 #. type: Plain text
10662 #: build/C/man2/rename.2:48
10663 msgid ""
10664 "B<rename>()  renames a file, moving it between directories if required.  Any "
10665 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10666 "Open file descriptors for I<oldpath> are also unaffected."
10667 msgstr ""
10668 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10669 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10670 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10671 "リプタにも影響はない。"
10672
10673 #. type: Plain text
10674 #: build/C/man2/rename.2:56
10675 msgid ""
10676 "If I<newpath> already exists it will be atomically replaced (subject to a "
10677 "few conditions; see ERRORS below), so that there is no point at which "
10678 "another process attempting to access I<newpath> will find it missing."
10679 msgstr ""
10680 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10681 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10682 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10683 "とはない (訳註: 常にアクセス可能である)。"
10684
10685 #. type: Plain text
10686 #: build/C/man2/rename.2:64
10687 msgid ""
10688 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10689 "file, then B<rename>()  does nothing, and returns a success status."
10690 msgstr ""
10691 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10692 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10693
10694 #. type: Plain text
10695 #: build/C/man2/rename.2:72
10696 msgid ""
10697 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10698 "guarantees to leave an instance of I<newpath> in place."
10699 msgstr ""
10700 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10701 "I<newpath> の実体を元のまま残すことを保証する。"
10702
10703 #. type: Plain text
10704 #: build/C/man2/rename.2:78
10705 msgid ""
10706 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10707 "not exist, or it must specify an empty directory."
10708 msgstr ""
10709 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10710 "存在しないか、空のディレクトリでなければならない。"
10711
10712 #. type: Plain text
10713 #: build/C/man2/rename.2:85
10714 msgid ""
10715 "However, when overwriting there will probably be a window in which both "
10716 "I<oldpath> and I<newpath> refer to the file being renamed."
10717 msgstr ""
10718 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10719 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10720
10721 #. type: Plain text
10722 #: build/C/man2/rename.2:91
10723 msgid ""
10724 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10725 "refers to a symbolic link the link will be overwritten."
10726 msgstr ""
10727 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10728 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10729 "は、リンクが上書きされる。"
10730
10731 #. type: Plain text
10732 #: build/C/man2/rename.2:116
10733 msgid ""
10734 "Write permission is denied for the directory containing I<oldpath> or "
10735 "I<newpath>, or, search permission is denied for one of the directories in "
10736 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10737 "and does not allow write permission (needed to update the I<..> entry).  "
10738 "(See also B<path_resolution>(7).)"
10739 msgstr ""
10740 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10741 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10742 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10743 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10744
10745 #. type: TP
10746 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10747 #, no-wrap
10748 msgid "B<EBUSY>"
10749 msgstr "B<EBUSY>"
10750
10751 #. type: Plain text
10752 #: build/C/man2/rename.2:133
10753 msgid ""
10754 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10755 "use by some process (perhaps as current working directory, or as root "
10756 "directory, or because it was open for reading) or is in use by the system "
10757 "(for example as mount point), while the system considers this an error.  "
10758 "(Note that there is no requirement to return B<EBUSY> in such cases"
10759 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10760 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10761 "situations.)"
10762 msgstr ""
10763 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10764 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10765 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10766 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10767 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10768 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10769 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10770 "B<EBUSY> を返すことが許されている。)"
10771
10772 #. type: Plain text
10773 #: build/C/man2/rename.2:143
10774 msgid ""
10775 "The new pathname contained a path prefix of the old, or, more generally, an "
10776 "attempt was made to make a directory a subdirectory of itself."
10777 msgstr ""
10778 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10779 "ディレクトリに 変更しようとした場合がほとんどである。"
10780
10781 #. type: Plain text
10782 #: build/C/man2/rename.2:149
10783 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10784 msgstr ""
10785 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10786 "い。"
10787
10788 #. type: Plain text
10789 #: build/C/man2/rename.2:160
10790 msgid ""
10791 "I<oldpath> already has the maximum number of links to it, or it was a "
10792 "directory and the directory containing I<newpath> has the maximum number of "
10793 "links."
10794 msgstr ""
10795 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10796 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10797
10798 #. type: Plain text
10799 #: build/C/man2/rename.2:176
10800 msgid ""
10801 "The link named by I<oldpath> does not exist; or, a directory component in "
10802 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10803 msgstr ""
10804 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10805 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10806
10807 #. type: Plain text
10808 #: build/C/man2/rename.2:193
10809 msgid ""
10810 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10811 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10812 "not a directory."
10813 msgstr ""
10814 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10815 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10816 "トリでない。"
10817
10818 #. type: TP
10819 #: build/C/man2/rename.2:193
10820 #, no-wrap
10821 msgid "B<ENOTEMPTY> or B<EEXIST>"
10822 msgstr "B<ENOTEMPTY  または  EEXIST>"
10823
10824 #. type: Plain text
10825 #: build/C/man2/rename.2:197
10826 msgid ""
10827 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10828 "\" and \"..\"."
10829 msgstr ""
10830 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10831 "でいる。"
10832
10833 #. type: TP
10834 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
10835 #, no-wrap
10836 msgid "B<EPERM> or B<EACCES>"
10837 msgstr "B<EPERM> または B<EACCES>"
10838
10839 #. type: Plain text
10840 #: build/C/man2/rename.2:221
10841 msgid ""
10842 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10843 "the process's effective user ID is neither the user ID of the file to be "
10844 "deleted nor that of the directory containing it, and the process is not "
10845 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10846 "I<newpath> is an existing file and the directory containing it has the "
10847 "sticky bit set and the process's effective user ID is neither the user ID of "
10848 "the file to be replaced nor that of the directory containing it, and the "
10849 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10850 "capability); or the file system containing I<pathname> does not support "
10851 "renaming of the type requested."
10852 msgstr ""
10853 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10854 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10855 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10856 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10857 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10858 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10859 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10860 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10861 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10862 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10863
10864 #. type: Plain text
10865 #: build/C/man2/rename.2:232
10866 msgid ""
10867 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10868 "permits a file system to be mounted at multiple points, but B<rename>()  "
10869 "does not work across different mount points, even if the same file system is "
10870 "mounted on both.)"
10871 msgstr ""
10872 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10873 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10874 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10875 "別々のマウント位置を跨いでは動作しない。)"
10876
10877 #. type: Plain text
10878 #: build/C/man2/rename.2:234
10879 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10880 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10881
10882 #. type: Plain text
10883 #: build/C/man2/rename.2:245
10884 msgid ""
10885 "On NFS file systems, you can not assume that if the operation failed the "
10886 "file was not renamed.  If the server does the rename operation and then "
10887 "crashes, the retransmitted RPC which will be processed when the server is up "
10888 "again causes a failure.  The application is expected to deal with this.  See "
10889 "B<link>(2)  for a similar problem."
10890 msgstr ""
10891 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10892 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10893 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10894 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10895 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10896
10897 #. type: Plain text
10898 #: build/C/man2/rename.2:254
10899 msgid ""
10900 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10901 "(2), B<path_resolution>(7), B<symlink>(7)"
10902 msgstr ""
10903 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10904 "(2), B<path_resolution>(7), B<symlink>(7)"
10905
10906 #. type: TH
10907 #: build/C/man2/rmdir.2:30
10908 #, no-wrap
10909 msgid "RMDIR"
10910 msgstr "RMDIR"
10911
10912 #. type: TH
10913 #: build/C/man2/rmdir.2:30
10914 #, no-wrap
10915 msgid "2008-05-08"
10916 msgstr "2008-05-08"
10917
10918 #. type: Plain text
10919 #: build/C/man2/rmdir.2:33
10920 msgid "rmdir - delete a directory"
10921 msgstr "rmdir - ディレクトリを削除する"
10922
10923 #. type: Plain text
10924 #: build/C/man2/rmdir.2:37
10925 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10926 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10927
10928 #. type: Plain text
10929 #: build/C/man2/rmdir.2:40
10930 msgid "B<rmdir>()  deletes a directory, which must be empty."
10931 msgstr ""
10932 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10933 "ない。"
10934
10935 #. type: Plain text
10936 #: build/C/man2/rmdir.2:55
10937 msgid ""
10938 "Write access to the directory containing I<pathname> was not allowed, or one "
10939 "of the directories in the path prefix of I<pathname> did not allow search "
10940 "permission.  (See also B<path_resolution>(7)."
10941 msgstr ""
10942 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10943 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10944 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10945 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10946 "と)"
10947
10948 #. type: Plain text
10949 #: build/C/man2/rmdir.2:64
10950 msgid ""
10951 "I<pathname> is currently in use by the system or some process that prevents "
10952 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10953 "point or is the root directory of the calling process."
10954 msgstr ""
10955 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10956 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10957 "たプロセスのルートディレクトリであることを意味する。"
10958
10959 #. type: Plain text
10960 #: build/C/man2/rmdir.2:73
10961 msgid "I<pathname> has I<.> as last component."
10962 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10963
10964 #. type: Plain text
10965 #: build/C/man2/rmdir.2:77
10966 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10967 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10968
10969 #. type: Plain text
10970 #: build/C/man2/rmdir.2:85
10971 msgid ""
10972 "A directory component in I<pathname> does not exist or is a dangling "
10973 "symbolic link."
10974 msgstr ""
10975 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10976 "リックリンク (symbolic link) である。"
10977
10978 #. type: Plain text
10979 #: build/C/man2/rmdir.2:94
10980 msgid ""
10981 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10982 "fact, a directory."
10983 msgstr ""
10984 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10985 "クトリでない。"
10986
10987 #. type: TP
10988 #: build/C/man2/rmdir.2:94
10989 #, no-wrap
10990 msgid "B<ENOTEMPTY>"
10991 msgstr "B<ENOTEMPTY>"
10992
10993 #. type: Plain text
10994 #: build/C/man2/rmdir.2:107
10995 msgid ""
10996 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10997 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10998 "condition."
10999 msgstr ""
11000 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
11001 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
11002 "で B<EEXIST> を返すことを認めている。"
11003
11004 #. type: Plain text
11005 #: build/C/man2/rmdir.2:118
11006 msgid ""
11007 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
11008 "and the process's effective user ID is neither the user ID of the file to be "
11009 "deleted nor that of the directory containing it, and the process is not "
11010 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
11011 msgstr ""
11012 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
11013 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
11014 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
11015 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
11016
11017 #. type: Plain text
11018 #: build/C/man2/rmdir.2:123
11019 msgid ""
11020 "The file system containing I<pathname> does not support the removal of "
11021 "directories."
11022 msgstr ""
11023 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
11024 "ない。"
11025
11026 #. type: Plain text
11027 #: build/C/man2/rmdir.2:127
11028 msgid "I<pathname> refers to a directory on a read-only file system."
11029 msgstr ""
11030 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
11031
11032 #. type: Plain text
11033 #: build/C/man2/rmdir.2:132
11034 msgid ""
11035 "Infelicities in the protocol underlying NFS can cause the unexpected "
11036 "disappearance of directories which are still being used."
11037 msgstr ""
11038 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
11039 "する現象が引き起こされることがある。"
11040
11041 #. type: Plain text
11042 #: build/C/man2/rmdir.2:141
11043 msgid ""
11044 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
11045 "B<unlink>(2), B<unlinkat>(2)"
11046 msgstr ""
11047 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
11048 "B<unlink>(2), B<unlinkat>(2)"
11049
11050 #. type: TH
11051 #: build/C/man3/scanf.3:52
11052 #, no-wrap
11053 msgid "SCANF"
11054 msgstr "SCANF"
11055
11056 #. type: TH
11057 #: build/C/man3/scanf.3:52
11058 #, no-wrap
11059 msgid "2013-01-30"
11060 msgstr "2013-01-30"
11061
11062 #. type: Plain text
11063 #: build/C/man3/scanf.3:55
11064 msgid ""
11065 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
11066 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
11067
11068 #. type: Plain text
11069 #: build/C/man3/scanf.3:62
11070 #, no-wrap
11071 msgid ""
11072 "B<int scanf(const char *>I<format>B<, ...);>\n"
11073 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11074 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11075 msgstr ""
11076 "B<int scanf(const char *>I<format>B<, ...);>\n"
11077 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11078 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11079
11080 #. type: Plain text
11081 #: build/C/man3/scanf.3:64
11082 #, no-wrap
11083 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
11084 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
11085
11086 #. type: Plain text
11087 #: build/C/man3/scanf.3:68
11088 #, no-wrap
11089 msgid ""
11090 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11091 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11092 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11093 msgstr ""
11094 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11095 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11096 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11097
11098 #. type: Plain text
11099 #: build/C/man3/scanf.3:79
11100 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11101 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11102
11103 #. type: Plain text
11104 #: build/C/man3/scanf.3:82
11105 msgid ""
11106 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11107 "200112L;"
11108 msgstr ""
11109 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11110 "200112L;"
11111
11112 #. type: Plain text
11113 #: build/C/man3/scanf.3:104
11114 msgid ""
11115 "The B<scanf>()  family of functions scans input according to I<format> as "
11116 "described below.  This format may contain I<conversion specifications>; the "
11117 "results from such conversions, if any, are stored in the locations pointed "
11118 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
11119 "argument must be of a type that is appropriate for the value returned by the "
11120 "corresponding conversion specification."
11121 msgstr ""
11122 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
11123 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
11124 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
11125 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
11126 "は、対応する変換指定が返す値に 適合していなければならない。"
11127
11128 #. type: Plain text
11129 #: build/C/man3/scanf.3:115
11130 msgid ""
11131 "If the number of conversion specifications in I<format> exceeds the number "
11132 "of I<pointer> arguments, the results are undefined.  If the number of "
11133 "I<pointer> arguments exceeds the number of conversion specifications, then "
11134 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
11135 msgstr ""
11136 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
11137 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
11138 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
11139
11140 #. type: Plain text
11141 #: build/C/man3/scanf.3:127
11142 msgid ""
11143 "The B<scanf>()  function reads input from the standard input stream "
11144 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
11145 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
11146 msgstr ""
11147 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
11148 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
11149 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
11150
11151 #. type: Plain text
11152 #: build/C/man3/scanf.3:145
11153 msgid ""
11154 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
11155 "from the stream pointer I<stream> using a variable argument list of pointers "
11156 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
11157 "from the standard input and the B<vsscanf>()  function scans it from a "
11158 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
11159 "functions respectively."
11160 msgstr ""
11161 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
11162 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
11163 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
11164 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
11165 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
11166
11167 #. type: Plain text
11168 #: build/C/man3/scanf.3:159
11169 msgid ""
11170 "The I<format> string consists of a sequence of I<directives> which describe "
11171 "how to process the sequence of input characters.  If processing of a "
11172 "directive fails, no further input is read, and B<scanf>()  returns.  A "
11173 "\"failure\" can be either of the following: I<input failure>, meaning that "
11174 "input characters were unavailable, or I<matching failure>, meaning that the "
11175 "input was inappropriate (see below)."
11176 msgstr ""
11177 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
11178 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
11179 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
11180 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
11181 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
11182 "であったこと (下記参照) を意味する。"
11183
11184 #. type: Plain text
11185 #: build/C/man3/scanf.3:161
11186 msgid "A directive is one of the following:"
11187 msgstr "命令は以下のいずれかである:"
11188
11189 #. type: TP
11190 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
11191 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
11192 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
11193 #, no-wrap
11194 msgid "\\(bu"
11195 msgstr "\\(bu"
11196
11197 #. type: Plain text
11198 #: build/C/man3/scanf.3:167
11199 msgid ""
11200 "A sequence of white-space characters (space, tab, newline, etc.; see "
11201 "B<isspace>(3)).  This directive matches any amount of white space, including "
11202 "none, in the input."
11203 msgstr ""
11204 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
11205 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
11206 "致する)。"
11207
11208 #. type: Plain text
11209 #: build/C/man3/scanf.3:171
11210 msgid ""
11211 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
11212 "This character must exactly match the next character of input."
11213 msgstr ""
11214 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
11215 "の次の文字に正確に一致しなければならない。"
11216
11217 #. type: Plain text
11218 #: build/C/man3/scanf.3:182
11219 msgid ""
11220 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
11221 "character.  A sequence of characters from the input is converted according "
11222 "to this specification, and the result is placed in the corresponding "
11223 "I<pointer> argument.  If the next item of input does not match the "
11224 "conversion specification, the conversion fails\\(emthis is a I<matching "
11225 "failure>."
11226 msgstr ""
11227 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
11228 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
11229 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
11230 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
11231
11232 #. type: Plain text
11233 #: build/C/man3/scanf.3:190
11234 msgid ""
11235 "Each I<conversion specification> in I<format> begins with either the "
11236 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
11237 "for the distinction) followed by:"
11238 msgstr ""
11239 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
11240 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
11241
11242 #. type: Plain text
11243 #: build/C/man3/scanf.3:201
11244 msgid ""
11245 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
11246 "input as directed by the conversion specification, but discards the input.  "
11247 "No corresponding I<pointer> argument is required, and this specification is "
11248 "not included in the count of successful assignments returned by B<scanf>()."
11249 msgstr ""
11250 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
11251 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
11252 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
11253
11254 #. type: Plain text
11255 #: build/C/man3/scanf.3:220
11256 msgid ""
11257 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
11258 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11259 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11260 "buffer of sufficient size, and assigns the address of this buffer to the "
11261 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
11262 "*> variable (this variable does not need to be initialized before the "
11263 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
11264 "longer required."
11265 msgstr ""
11266 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
11267 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
11268 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
11269 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
11270 "は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に"
11271 "初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファ"
11272 "を B<free>(3) すべきである。"
11273
11274 #. type: Plain text
11275 #: build/C/man3/scanf.3:232
11276 msgid ""
11277 "An optional decimal integer which specifies the I<maximum field width>.  "
11278 "Reading of characters stops either when this maximum is reached or when a "
11279 "nonmatching character is found, whichever happens first.  Most conversions "
11280 "discard initial white space characters (the exceptions are noted below), and "
11281 "these discarded characters don't count toward the maximum field width.  "
11282 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
11283 "mark the end of the input; the maximum field width does not include this "
11284 "terminator."
11285 msgstr ""
11286 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
11287 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
11288 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
11289 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
11290 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
11291 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
11292
11293 #. type: Plain text
11294 #: build/C/man3/scanf.3:246
11295 msgid ""
11296 "An optional I<type modifier character>.  For example, the B<l> type modifier "
11297 "is used with integer conversions such as B<%d> to specify that the "
11298 "corresponding I<pointer> argument refers to a I<long int> rather than a "
11299 "pointer to an I<int>."
11300 msgstr ""
11301 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
11302 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
11303 "I<int> ではなく I<long int> を参照していることを指定できる。"
11304
11305 #. type: Plain text
11306 #: build/C/man3/scanf.3:251
11307 msgid ""
11308 "A I<conversion specifier> that specifies the type of input conversion to be "
11309 "performed."
11310 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
11311
11312 #. type: Plain text
11313 #: build/C/man3/scanf.3:280
11314 msgid ""
11315 "The conversion specifications in I<format> are of two forms, either "
11316 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
11317 "forms should not be mixed in the same I<format> string, except that a string "
11318 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
11319 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
11320 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
11321 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
11322 "specifies that the converted input should be placed in the location referred "
11323 "to by the I<n>-th I<pointer> argument following I<format>."
11324 msgstr ""
11325 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
11326 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
11327 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
11328 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
11329 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
11330 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
11331 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
11332 "I<pointer> 引き数が参照する場所に格納することを指定する。"
11333
11334 #. type: SS
11335 #: build/C/man3/scanf.3:280
11336 #, no-wrap
11337 msgid "Conversions"
11338 msgstr "変換"
11339
11340 #. type: Plain text
11341 #: build/C/man3/scanf.3:284
11342 msgid ""
11343 "The following I<type modifier characters> can appear in a conversion "
11344 "specification:"
11345 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
11346
11347 #. type: Plain text
11348 #: build/C/man3/scanf.3:294
11349 msgid ""
11350 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
11351 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
11352 "I<unsigned short int> (rather than I<int>)."
11353 msgstr ""
11354 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
11355 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
11356 "あることを示す。"
11357
11358 #. type: Plain text
11359 #: build/C/man3/scanf.3:302
11360 msgid ""
11361 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
11362 "I<unsigned char>."
11363 msgstr ""
11364 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
11365 "タであることを示す。"
11366
11367 #. type: Plain text
11368 #: build/C/man3/scanf.3:311
11369 msgid ""
11370 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
11371 "I<uintmax_t>.  This modifier was introduced in C99."
11372 msgstr ""
11373 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
11374 "ることを示す。 この修飾子は C99 で導入された。"
11375
11376 #.  This use of l was introduced in Amendment 1 to ISO C90.
11377 #. type: Plain text
11378 #: build/C/man3/scanf.3:338
11379 msgid ""
11380 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
11381 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
11382 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
11383 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
11384 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
11385 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
11386 "as a pointer to a wide character or wide-character string respectively."
11387 msgstr ""
11388 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
11389 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
11390 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
11391 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
11392 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
11393 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
11394 "ンタであると みなされる。"
11395
11396 #.  MTK, Jul 05: The following is no longer true for modern
11397 #.  ANSI C (i.e., C99):
11398 #.  (Note that long long is not an
11399 #.  ANSI C
11400 #.  type. Any program using this will not be portable to all
11401 #.  architectures).
11402 #. type: Plain text
11403 #: build/C/man3/scanf.3:354
11404 msgid ""
11405 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
11406 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
11407 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
11408 msgstr ""
11409 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
11410 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
11411 "I<long long> へのポインタであることのいずれかであることを示す。"
11412
11413 #. type: Plain text
11414 #: build/C/man3/scanf.3:359
11415 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
11416 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
11417
11418 #. type: Plain text
11419 #: build/C/man3/scanf.3:366
11420 msgid ""
11421 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11422 "modifier was introduced in C99."
11423 msgstr ""
11424 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11425 "この修飾子は C99 で導入された。"
11426
11427 #. type: Plain text
11428 #: build/C/man3/scanf.3:373
11429 msgid ""
11430 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11431 "modifier was introduced in C99."
11432 msgstr ""
11433 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11434 "修飾子は C99 で導入された。"
11435
11436 #. type: Plain text
11437 #: build/C/man3/scanf.3:377
11438 msgid "The following I<conversion specifiers> are available:"
11439 msgstr "以下の I<「変換指定子」> が利用可能である。"
11440
11441 #. type: Plain text
11442 #: build/C/man3/scanf.3:386
11443 msgid ""
11444 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11445 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11446 "initial white space characters are discarded), and assignment does not occur."
11447 msgstr ""
11448 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11449 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11450 "る)、 変数への代入は生じない。"
11451
11452 #. type: TP
11453 #: build/C/man3/scanf.3:386
11454 #, no-wrap
11455 msgid "B<d>"
11456 msgstr "B<d>"
11457
11458 #. type: Plain text
11459 #: build/C/man3/scanf.3:391
11460 msgid ""
11461 "Matches an optionally signed decimal integer; the next pointer must be a "
11462 "pointer to I<int>."
11463 msgstr ""
11464 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11465 "ばならない。"
11466
11467 #. type: TP
11468 #: build/C/man3/scanf.3:391
11469 #, no-wrap
11470 msgid "B<D>"
11471 msgstr "B<D>"
11472
11473 #. type: Plain text
11474 #: build/C/man3/scanf.3:400
11475 msgid ""
11476 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11477 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11478 "causing old programs to fail mysteriously.)"
11479 msgstr ""
11480 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11481 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11482 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11483
11484 #. type: TP
11485 #: build/C/man3/scanf.3:400
11486 #, no-wrap
11487 msgid "B<i>"
11488 msgstr "B<i>"
11489
11490 #. type: Plain text
11491 #: build/C/man3/scanf.3:412
11492 msgid ""
11493 "Matches an optionally signed integer; the next pointer must be a pointer to "
11494 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11495 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11496 "that correspond to the base are used."
11497 msgstr ""
11498 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11499 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11500 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11501 "される文字は、これらの基数に対応しているものだけである。"
11502
11503 #. type: TP
11504 #: build/C/man3/scanf.3:412
11505 #, no-wrap
11506 msgid "B<o>"
11507 msgstr "B<o>"
11508
11509 #. type: Plain text
11510 #: build/C/man3/scanf.3:416
11511 msgid ""
11512 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11513 "I<unsigned int>."
11514 msgstr ""
11515 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11516 "らない。"
11517
11518 #. type: TP
11519 #: build/C/man3/scanf.3:416
11520 #, no-wrap
11521 msgid "B<u>"
11522 msgstr "B<u>"
11523
11524 #. type: Plain text
11525 #: build/C/man3/scanf.3:421
11526 msgid ""
11527 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11528 "I<unsigned int>."
11529 msgstr ""
11530 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11531 "でなければならない。"
11532
11533 #. type: Plain text
11534 #: build/C/man3/scanf.3:426
11535 msgid ""
11536 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11537 "to I<unsigned int>."
11538 msgstr ""
11539 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11540 "タでなければならない。"
11541
11542 #. type: TP
11543 #: build/C/man3/scanf.3:426
11544 #, no-wrap
11545 msgid "B<X>"
11546 msgstr "B<X>"
11547
11548 #. type: Plain text
11549 #: build/C/man3/scanf.3:430
11550 msgid "Equivalent to B<x>."
11551 msgstr "B<x> と同一である。"
11552
11553 #. type: TP
11554 #: build/C/man3/scanf.3:430
11555 #, no-wrap
11556 msgid "B<f>"
11557 msgstr "B<f>"
11558
11559 #. type: Plain text
11560 #: build/C/man3/scanf.3:435
11561 msgid ""
11562 "Matches an optionally signed floating-point number; the next pointer must be "
11563 "a pointer to I<float>."
11564 msgstr ""
11565 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11566 "ればならない。"
11567
11568 #. type: TP
11569 #: build/C/man3/scanf.3:435
11570 #, no-wrap
11571 msgid "B<e>"
11572 msgstr "B<e>"
11573
11574 #. type: Plain text
11575 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
11576 msgid "Equivalent to B<f>."
11577 msgstr "B<f> と同一である。"
11578
11579 #. type: TP
11580 #: build/C/man3/scanf.3:439
11581 #, no-wrap
11582 msgid "B<g>"
11583 msgstr "B<g>"
11584
11585 #. type: TP
11586 #: build/C/man3/scanf.3:443
11587 #, no-wrap
11588 msgid "B<E>"
11589 msgstr "B<E>"
11590
11591 #. type: Plain text
11592 #: build/C/man3/scanf.3:451
11593 msgid "(C99) Equivalent to B<f>."
11594 msgstr "(C99)  B<f> と同一である。"
11595
11596 #. type: Plain text
11597 #: build/C/man3/scanf.3:459
11598 msgid ""
11599 "Matches a sequence of non-white-space characters; the next pointer must be a "
11600 "pointer to character array that is long enough to hold the input sequence "
11601 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11602 "automatically.  The input string stops at white space or at the maximum "
11603 "field width, whichever occurs first."
11604 msgstr ""
11605 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11606 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11607 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11608 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11609 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11610
11611 #. type: Plain text
11612 #: build/C/man3/scanf.3:469
11613 msgid ""
11614 "Matches a sequence of characters whose length is specified by the I<maximum "
11615 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11616 "there must be enough room for all the characters (no terminating null byte "
11617 "is added).  The usual skip of leading white space is suppressed.  To skip "
11618 "white space first, use an explicit space in the format."
11619 msgstr ""
11620 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11621 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11622 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11623 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11624 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11625
11626 #. type: TP
11627 #: build/C/man3/scanf.3:469
11628 #, no-wrap
11629 msgid "B<\\&[>"
11630 msgstr "B<\\&[>"
11631
11632 #. type: Plain text
11633 #: build/C/man3/scanf.3:502
11634 msgid ""
11635 "Matches a nonempty sequence of characters from the specified set of accepted "
11636 "characters; the next pointer must be a pointer to I<char>, and there must be "
11637 "enough room for all the characters in the string, plus a terminating null "
11638 "byte.  The usual skip of leading white space is suppressed.  The string is "
11639 "to be made up of characters in (or not in) a particular set; the set is "
11640 "defined by the characters between the open bracket B<[> character and a "
11641 "close bracket B<]> character.  The set I<excludes> those characters if the "
11642 "first character after the open bracket is a circumflex (B<^>).  To include a "
11643 "close bracket in the set, make it the first character after the open bracket "
11644 "or the circumflex; any other position will end the set.  The hyphen "
11645 "character B<-> is also special; when placed between two other characters, it "
11646 "adds all intervening characters to the set.  To include a hyphen, make it "
11647 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11648 "> means the set \"everything except close bracket, zero through nine, and "
11649 "hyphen\".  The string ends with the appearance of a character not in the "
11650 "(or, with a circumflex, in) set or when the field width runs out."
11651 msgstr ""
11652 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11653 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11654 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11655 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11656 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11657 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11658 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11659 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11660 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11661 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11662 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11663 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11664 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11665 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11666 "文字の 出現または確保された領域が使い切られた時に終了する。"
11667
11668 #. type: Plain text
11669 #: build/C/man3/scanf.3:510
11670 msgid ""
11671 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11672 "pointer must be a pointer to a pointer to I<void>."
11673 msgstr ""
11674 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11675 "タは I<void> へのポインタへのポインタでなければならない。"
11676
11677 #. type: Plain text
11678 #: build/C/man3/scanf.3:530
11679 msgid ""
11680 "Nothing is expected; instead, the number of characters consumed thus far "
11681 "from the input is stored through the next pointer, which must be a pointer "
11682 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11683 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11684 "of a B<%n> directive does not increment the assignment count returned at the "
11685 "completion of execution\" but the Corrigendum seems to contradict this.  "
11686 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11687 "conversions on the return value."
11688 msgstr ""
11689 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11690 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11691 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11692 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11693 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11694 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11695 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11696
11697 #. type: Plain text
11698 #: build/C/man3/scanf.3:535
11699 msgid ""
11700 "These functions return the number of input items successfully matched and "
11701 "assigned, which can be fewer than provided for, or even zero in the event of "
11702 "an early matching failure."
11703 msgstr ""
11704 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11705 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11706 "ることもある。"
11707
11708 #. type: Plain text
11709 #: build/C/man3/scanf.3:547
11710 msgid ""
11711 "The value B<EOF> is returned if the end of input is reached before either "
11712 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11713 "also returned if a read error occurs, in which case the error indicator for "
11714 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11715 "error."
11716 msgstr ""
11717 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11718 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11719 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11720 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11721
11722 #. type: Plain text
11723 #: build/C/man3/scanf.3:553
11724 msgid ""
11725 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11726 "operation would block."
11727 msgstr ""
11728 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11729 "込み操作は停止 (block) することになる。"
11730
11731 #. type: Plain text
11732 #: build/C/man3/scanf.3:558
11733 msgid ""
11734 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11735 msgstr ""
11736 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11737 "ンされていない。"
11738
11739 #. type: Plain text
11740 #: build/C/man3/scanf.3:561
11741 msgid "Input byte sequence does not form a valid character."
11742 msgstr "入力されたバイト列が有効な文字を構成していない。"
11743
11744 #. type: Plain text
11745 #: build/C/man3/scanf.3:565
11746 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11747 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11748
11749 #. type: Plain text
11750 #: build/C/man3/scanf.3:570
11751 msgid "Not enough arguments; or I<format> is NULL."
11752 msgstr "引き数が十分でない。または I<format> が NULL である。"
11753
11754 #. type: Plain text
11755 #: build/C/man3/scanf.3:573
11756 msgid "Out of memory."
11757 msgstr "メモリ不足。"
11758
11759 #. type: TP
11760 #: build/C/man3/scanf.3:573
11761 #, no-wrap
11762 msgid "B<ERANGE>"
11763 msgstr "B<ERANGE>"
11764
11765 #. type: Plain text
11766 #: build/C/man3/scanf.3:577
11767 msgid ""
11768 "The result of an integer conversion would exceed the size that can be stored "
11769 "in the corresponding integer type."
11770 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11771
11772 #. type: Plain text
11773 #: build/C/man3/scanf.3:587
11774 msgid ""
11775 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11776 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11777 msgstr ""
11778 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11779 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11780
11781 #. type: Plain text
11782 #: build/C/man3/scanf.3:597
11783 msgid ""
11784 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11785 "the usage of B<L> in integer conversions is the GNU notation."
11786 msgstr ""
11787 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11788 "B<ll> または B<L> の使用は GNU での拡張である。"
11789
11790 #. type: Plain text
11791 #: build/C/man3/scanf.3:608
11792 msgid ""
11793 "The Linux version of these functions is based on the I<GNU> I<libio> "
11794 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11795 "(glibc-1.08)> for a more concise description."
11796 msgstr ""
11797 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11798 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11799
11800 #. type: Plain text
11801 #: build/C/man3/scanf.3:614
11802 msgid ""
11803 "The GNU C library supported the dynamic allocation conversion specifier (as "
11804 "a nonstandard extension) via the B<a> character.  This feature seems to be "
11805 "present at least as far back as glibc 2.0."
11806 msgstr ""
11807 "GNU C ライブラリ (glibc) では、 B<a> 文字による動的割り当て変換指定子 "
11808 "(dynamic allocation conversion specifier) を (非標準の拡張として) サポートし"
11809 "ている。この機能は少なくとも glibc 2.0 以降で存在しているようである。"
11810
11811 #. type: Plain text
11812 #: build/C/man3/scanf.3:624
11813 msgid ""
11814 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
11815 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
11816 "the B<a> is interpreted as a specifier for floating-point numbers (see "
11817 "above)."
11818 msgstr ""
11819 "この修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
11820 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない。この場"
11821 "合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11822
11823 #. type: Plain text
11824 #: build/C/man3/scanf.3:633
11825 msgid ""
11826 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11827 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11828 "advantages:"
11829 msgstr ""
11830 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11831 "ている。 B<m> 修飾子は以下の利点がある。"
11832
11833 #. type: Plain text
11834 #: build/C/man3/scanf.3:638
11835 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11836 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11837
11838 #. type: Plain text
11839 #: build/C/man3/scanf.3:644
11840 msgid ""
11841 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11842 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11843 msgstr ""
11844 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11845 "std=c99> などの影響も避けられる)。"
11846
11847 #. type: Plain text
11848 #: build/C/man3/scanf.3:646
11849 msgid "It is specified in the POSIX.1-2008 standard."
11850 msgstr "POSIX.1-2008 標準で規定されている。"
11851
11852 #. type: Plain text
11853 #: build/C/man3/scanf.3:659
11854 msgid ""
11855 "All functions are fully C89 conformant, but provide the additional "
11856 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11857 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11858 "the behavior of specifiers defined in C89."
11859 msgstr ""
11860 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11861 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11862 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11863 "れない。"
11864
11865 #. type: Plain text
11866 #: build/C/man3/scanf.3:675
11867 msgid ""
11868 "Some combinations of the type modifiers and conversion specifiers defined by "
11869 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
11870 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11871 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11872 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11873 "B<u>, B<x>, and B<X> conversions or B<ll>."
11874 msgstr ""
11875 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
11876 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
11877 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
11878 "他のアーキテクチャでも同様になっているとは限らない。\n"
11879 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
11880 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
11881 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11882
11883 #. type: Plain text
11884 #: build/C/man3/scanf.3:681
11885 msgid ""
11886 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11887 "conversions equivalently to B<L>."
11888 msgstr ""
11889 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11890 "動小数の変換に使用される。"
11891
11892 #. type: Plain text
11893 #: build/C/man3/scanf.3:691
11894 msgid ""
11895 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
11896 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
11897 "the returned string, as in the following example:"
11898 msgstr ""
11899 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
11900 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
11901 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
11902
11903 #. type: Plain text
11904 #: build/C/man3/scanf.3:696
11905 #, no-wrap
11906 msgid ""
11907 "char *p;\n"
11908 "int n;\n"
11909 msgstr ""
11910 "char *p;\n"
11911 "int n;\n"
11912
11913 #. type: Plain text
11914 #: build/C/man3/scanf.3:707
11915 #, no-wrap
11916 msgid ""
11917 "errno = 0;\n"
11918 "n = scanf(\"%m[a-z]\", &p);\n"
11919 "if (n == 1) {\n"
11920 "    printf(\"read: %s\\en\", p);\n"
11921 "    free(p);\n"
11922 "} else if (errno != 0) {\n"
11923 "    perror(\"scanf\");\n"
11924 "} else {\n"
11925 "    fprintf(stderr, \"No matching characters\\en\");\n"
11926 "}\n"
11927 msgstr ""
11928 "errno = 0;\n"
11929 "n = scanf(\"%m[a-z]\", &p);\n"
11930 "if (n == 1) {\n"
11931 "    printf(\"read: %s\\en\", p);\n"
11932 "    free(p);\n"
11933 "} else if (errno != 0) {\n"
11934 "    perror(\"scanf\");\n"
11935 "} else {\n"
11936 "    fprintf(stderr, \"No matching characters\\en\");\n"
11937 "}\n"
11938
11939 #. type: Plain text
11940 #: build/C/man3/scanf.3:715
11941 msgid ""
11942 "As shown in the above example, it is necessary to call B<free>(3)  only if "
11943 "the B<scanf>()  call successfully read a string."
11944 msgstr ""
11945 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11946 "B<free>(3)  を呼び出す必要がある。"
11947
11948 #. type: Plain text
11949 #: build/C/man3/scanf.3:722
11950 msgid ""
11951 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11952 "B<strtoul>(3)"
11953 msgstr ""
11954 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11955 "B<strtoul>(3),"
11956
11957 #. type: TH
11958 #: build/C/man3/setbuf.3:48
11959 #, no-wrap
11960 msgid "SETBUF"
11961 msgstr "SETBUF"
11962
11963 #. type: TH
11964 #: build/C/man3/setbuf.3:48
11965 #, no-wrap
11966 msgid "2012-08-03"
11967 msgstr "2012-08-03"
11968
11969 #. type: Plain text
11970 #: build/C/man3/setbuf.3:51
11971 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11972 msgstr ""
11973 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11974
11975 #. type: Plain text
11976 #: build/C/man3/setbuf.3:56
11977 #, no-wrap
11978 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11979 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11980
11981 #. type: Plain text
11982 #: build/C/man3/setbuf.3:58
11983 #, no-wrap
11984 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11985 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11986
11987 #. type: Plain text
11988 #: build/C/man3/setbuf.3:60
11989 #, no-wrap
11990 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11991 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11992
11993 #. type: Plain text
11994 #: build/C/man3/setbuf.3:63
11995 #, no-wrap
11996 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11997 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11998
11999 #. type: Plain text
12000 #: build/C/man3/setbuf.3:73
12001 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
12002 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
12003
12004 #. type: Plain text
12005 #: build/C/man3/setbuf.3:96
12006 msgid ""
12007 "The three types of buffering available are unbuffered, block buffered, and "
12008 "line buffered.  When an output stream is unbuffered, information appears on "
12009 "the destination file or terminal as soon as written; when it is block "
12010 "buffered many characters are saved up and written as a block; when it is "
12011 "line buffered characters are saved up until a newline is output or input is "
12012 "read from any stream attached to a terminal device (typically I<stdin>).  "
12013 "The function B<fflush>(3)  may be used to force the block out early.  (See "
12014 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
12015 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
12016 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
12017 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
12018 "by default."
12019 msgstr ""
12020 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
12021 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
12022 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
12023 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
12024 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
12025 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
12026 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
12027 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
12028 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
12029 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
12030 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
12031 "unbuffered である。"
12032
12033 #. type: Plain text
12034 #: build/C/man3/setbuf.3:103
12035 msgid ""
12036 "The B<setvbuf>()  function may be used on any open stream to change its "
12037 "buffer.  The I<mode> argument must be one of the following three macros:"
12038 msgstr ""
12039 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
12040 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
12041
12042 #. type: TP
12043 #: build/C/man3/setbuf.3:104
12044 #, no-wrap
12045 msgid "B<_IONBF>"
12046 msgstr "B<_IONBF>"
12047
12048 #. type: Plain text
12049 #: build/C/man3/setbuf.3:107
12050 msgid "unbuffered"
12051 msgstr "unbuffered"
12052
12053 #. type: TP
12054 #: build/C/man3/setbuf.3:107
12055 #, no-wrap
12056 msgid "B<_IOLBF>"
12057 msgstr "B<_IOLBF>"
12058
12059 #. type: Plain text
12060 #: build/C/man3/setbuf.3:110
12061 msgid "line buffered"
12062 msgstr "line buffered"
12063
12064 #. type: TP
12065 #: build/C/man3/setbuf.3:110
12066 #, no-wrap
12067 msgid "B<_IOFBF>"
12068 msgstr "B<_IOFBF>"
12069
12070 #. type: Plain text
12071 #: build/C/man3/setbuf.3:113
12072 msgid "fully buffered"
12073 msgstr "fully buffered"
12074
12075 #. type: Plain text
12076 #: build/C/man3/setbuf.3:129
12077 msgid ""
12078 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
12079 "least I<size> bytes long; this buffer will be used instead of the current "
12080 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
12081 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
12082 "()  function may be used only after opening a stream and before any other "
12083 "operations have been performed on it."
12084 msgstr ""
12085 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
12086 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
12087 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
12088 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
12089 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
12090
12091 #. type: Plain text
12092 #: build/C/man3/setbuf.3:135
12093 msgid ""
12094 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
12095 "().  The B<setbuf>()  function is exactly equivalent to the call"
12096 msgstr ""
12097 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
12098 "B<setbuf>()  関数は、"
12099
12100 #. type: Plain text
12101 #: build/C/man3/setbuf.3:138
12102 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12103 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12104
12105 #. type: Plain text
12106 #: build/C/man3/setbuf.3:148
12107 msgid ""
12108 "The B<setbuffer>()  function is the same, except that the size of the buffer "
12109 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
12110 "The B<setlinebuf>()  function is exactly equivalent to the call:"
12111 msgstr ""
12112 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
12113 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
12114 "は以下と同じである。"
12115
12116 #. type: Plain text
12117 #: build/C/man3/setbuf.3:151
12118 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
12119 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
12120
12121 #. type: Plain text
12122 #: build/C/man3/setbuf.3:162
12123 msgid ""
12124 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
12125 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
12126 "I<errno> on failure."
12127 msgstr ""
12128 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
12129 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
12130 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
12131
12132 #. type: Plain text
12133 #: build/C/man3/setbuf.3:164
12134 msgid "The other functions do not return a value."
12135 msgstr "その他の関数は値を返さない。"
12136
12137 #. type: Plain text
12138 #: build/C/man3/setbuf.3:170
12139 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
12140 msgstr ""
12141 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
12142
12143 #. type: Plain text
12144 #: build/C/man3/setbuf.3:180
12145 msgid ""
12146 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
12147 "versions of BSD before 4.2BSD, and are available under Linux since libc "
12148 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
12149 "buffer size and should be avoided."
12150 msgstr ""
12151 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
12152 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
12153 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
12154 "ズを使用するので、これも使うべきでない。"
12155
12156 #. type: Plain text
12157 #: build/C/man3/setbuf.3:187
12158 msgid ""
12159 "You must make sure that the space that I<buf> points to still exists by the "
12160 "time I<stream> is closed, which also happens at program termination.  For "
12161 "example, the following is invalid:"
12162 msgstr ""
12163 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
12164 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
12165 "な使い方は許されない:"
12166
12167 #. type: Plain text
12168 #: build/C/man3/setbuf.3:190
12169 #, no-wrap
12170 msgid "#include E<lt>stdio.hE<gt>\n"
12171 msgstr "#include E<lt>stdio.hE<gt>\n"
12172
12173 #. type: Plain text
12174 #: build/C/man3/setbuf.3:199
12175 #, no-wrap
12176 msgid ""
12177 "int\n"
12178 "main(void)\n"
12179 "{\n"
12180 "    char buf[BUFSIZ];\n"
12181 "    setbuf(stdin, buf);\n"
12182 "    printf(\"Hello, world!\\en\");\n"
12183 "    return 0;\n"
12184 "}\n"
12185 msgstr ""
12186 "int\n"
12187 "main(void)\n"
12188 "{\n"
12189 "    char buf[BUFSIZ];\n"
12190 "    setbuf(stdin, buf);\n"
12191 "    printf(\"Hello, world!\\en\");\n"
12192 "    return 0;\n"
12193 "}\n"
12194
12195 #. type: Plain text
12196 #: build/C/man3/setbuf.3:208
12197 msgid ""
12198 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12199 "(3), B<puts>(3)"
12200 msgstr ""
12201 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12202 "(3), B<puts>(3)"
12203
12204 #. type: TH
12205 #: build/C/man3/stdin.3:13
12206 #, no-wrap
12207 msgid "STDIN"
12208 msgstr "STDIN"
12209
12210 #. type: TH
12211 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
12212 #, no-wrap
12213 msgid "2008-07-14"
12214 msgstr "2008-07-14"
12215
12216 #. type: Plain text
12217 #: build/C/man3/stdin.3:16
12218 msgid "stdin, stdout, stderr - standard I/O streams"
12219 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
12220
12221 #. type: Plain text
12222 #: build/C/man3/stdin.3:23
12223 #, no-wrap
12224 msgid ""
12225 "B<extern FILE *>I<stdin>B<;>\n"
12226 "B<extern FILE *>I<stdout>B<;>\n"
12227 "B<extern FILE *>I<stderr>B<;>\n"
12228 msgstr ""
12229 "B<extern FILE *>I<stdin>B<;>\n"
12230 "B<extern FILE *>I<stdout>B<;>\n"
12231 "B<extern FILE *>I<stderr>B<;>\n"
12232
12233 #. type: Plain text
12234 #: build/C/man3/stdin.3:35
12235 msgid ""
12236 "Under normal circumstances every UNIX program has three streams opened for "
12237 "it when it starts up, one for input, one for output, and one for printing "
12238 "diagnostic or error messages.  These are typically attached to the user's "
12239 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
12240 "depending on what the parent process chose to set up.  (See also the "
12241 "\"Redirection\" section of B<sh>(1).)"
12242 msgstr ""
12243 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
12244 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
12245 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
12246 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
12247 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
12248
12249 #. type: Plain text
12250 #: build/C/man3/stdin.3:45
12251 msgid ""
12252 "The input stream is referred to as \"standard input\"; the output stream is "
12253 "referred to as \"standard output\"; and the error stream is referred to as "
12254 "\"standard error\".  These terms are abbreviated to form the symbols used to "
12255 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
12256 msgstr ""
12257 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
12258 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
12259 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
12260 "I<stdout>, I<stderr> である。"
12261
12262 #. type: Plain text
12263 #: build/C/man3/stdin.3:54
12264 msgid ""
12265 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
12266 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
12267 msgstr ""
12268 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
12269 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
12270
12271 #. type: Plain text
12272 #: build/C/man3/stdin.3:63
12273 msgid ""
12274 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
12275 "same underlying files may also be accessed using the raw UNIX file "
12276 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
12277 msgstr ""
12278 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
12279 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
12280 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
12281 "る。"
12282
12283 #. type: Plain text
12284 #: build/C/man3/stdin.3:82
12285 msgid ""
12286 "On program startup, the integer file descriptors associated with the streams "
12287 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
12288 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
12289 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
12290 "(3)  to one of these streams can change the file descriptor number "
12291 "associated with the stream.)"
12292 msgstr ""
12293 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
12294 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
12295 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
12296 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
12297 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
12298 "たファイルディスクリプタ の番号を変更することができる。)"
12299
12300 #. type: Plain text
12301 #: build/C/man3/stdin.3:95
12302 msgid ""
12303 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
12304 "unexpected results and should generally be avoided.  (For the masochistic "
12305 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
12306 "is supposed to work.)  A general rule is that file descriptors are handled "
12307 "in the kernel, while stdio is just a library.  This means for example, that "
12308 "after an B<exec>(3), the child inherits all open file descriptors, but all "
12309 "old streams have become inaccessible."
12310 msgstr ""
12311 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
12312 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
12313 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
12314 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
12315 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
12316 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
12317 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
12318
12319 #. type: Plain text
12320 #: build/C/man3/stdin.3:113
12321 msgid ""
12322 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
12323 "macros, assigning to them is nonportable.  The standard streams can be made "
12324 "to refer to different files with help of the library function B<freopen>(3), "
12325 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
12326 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
12327 "by normal program termination."
12328 msgstr ""
12329 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
12330 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
12331 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
12332 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
12333 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
12334 "グラムの正常終了によってクローズされる。"
12335
12336 #. type: Plain text
12337 #: build/C/man3/stdin.3:122
12338 msgid ""
12339 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
12340 "standard also stipulates that these three streams shall be open at program "
12341 "startup."
12342 msgstr ""
12343 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
12344 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
12345 "とが規定されている。"
12346
12347 #. type: Plain text
12348 #: build/C/man3/stdin.3:154
12349 msgid ""
12350 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
12351 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
12352 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
12353 "unexpected results, especially with debugging output.  The buffering mode of "
12354 "the standard streams (or any other stream)  can be changed using the "
12355 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
12356 "associated with a terminal, there may also be input buffering in the "
12357 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
12358 "terminal input is line buffered in the kernel.)  This kernel input handling "
12359 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
12360 "B<termios>(3)."
12361 msgstr ""
12362 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
12363 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
12364 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
12365 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
12366 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
12367 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
12368 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
12369 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
12370 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
12371 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
12372 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
12373 "B<termios>(3)  も参照すること。"
12374
12375 #. type: Plain text
12376 #: build/C/man3/stdin.3:160
12377 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12378 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12379
12380 #. type: TH
12381 #: build/C/man3/stdio.3:39
12382 #, no-wrap
12383 msgid "STDIO"
12384 msgstr "STDIO"
12385
12386 #. type: TH
12387 #: build/C/man3/stdio.3:39
12388 #, no-wrap
12389 msgid "2001-12-26"
12390 msgstr "2001-12-26"
12391
12392 #. type: Plain text
12393 #: build/C/man3/stdio.3:42
12394 msgid "stdio - standard input/output library functions"
12395 msgstr "stdio - 標準入出力ライブラリ関数"
12396
12397 #. type: Plain text
12398 #: build/C/man3/stdio.3:46
12399 msgid "B<FILE *>I<stdin>B<;>"
12400 msgstr "B<FILE *>I<stdin>B<;>"
12401
12402 #. type: Plain text
12403 #: build/C/man3/stdio.3:48
12404 msgid "B<FILE *>I<stdout>B<;>"
12405 msgstr "B<FILE *>I<stdout>B<;>"
12406
12407 #. type: Plain text
12408 #: build/C/man3/stdio.3:50
12409 msgid "B<FILE *>I<stderr>B<;>"
12410 msgstr "B<FILE *>I<stderr>B<;>"
12411
12412 #. type: Plain text
12413 #: build/C/man3/stdio.3:57
12414 msgid ""
12415 "The standard I/O library provides a simple and efficient buffered stream I/O "
12416 "interface.  Input and output is mapped into logical data streams and the "
12417 "physical I/O characteristics are concealed.  The functions and macros are "
12418 "listed below; more information is available from the individual man pages."
12419 msgstr ""
12420 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
12421 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
12422 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12423 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12424
12425 #. type: Plain text
12426 #: build/C/man3/stdio.3:80
12427 msgid ""
12428 "A stream is associated with an external file (which may be a physical "
12429 "device) by I<opening> a file, which may involve creating a new file.  "
12430 "Creating an existing file causes its former contents to be discarded.  If a "
12431 "file can support positioning requests (such as a disk file, as opposed to a "
12432 "terminal) then a I<file position indicator> associated with the stream is "
12433 "positioned at the start of the file (byte zero), unless the file is opened "
12434 "with append mode.  If append mode is used, it is unspecified whether the "
12435 "position indicator will be placed at the start or the end of the file.  The "
12436 "position indicator is maintained by subsequent reads, writes and positioning "
12437 "requests.  All input occurs as if the characters were read by successive "
12438 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12439 "characters were written by successive calls to the B<fputc>(3)  function."
12440 msgstr ""
12441 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12442 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12443 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12444 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12445 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12446 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12447 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12448 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12449 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12450 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12451 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12452 "字を書き込んだかのように行われる。"
12453
12454 #. type: Plain text
12455 #: build/C/man3/stdio.3:90
12456 msgid ""
12457 "A file is disassociated from a stream by I<closing> the file.  Output "
12458 "streams are flushed (any unwritten buffer contents are transferred to the "
12459 "host environment) before the stream is disassociated from the file.  The "
12460 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12461 "closed (garbage)."
12462 msgstr ""
12463 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12464 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12465 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12466 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12467 "確定になる (ゴミになってしまう)。"
12468
12469 #. type: Plain text
12470 #: build/C/man3/stdio.3:103
12471 msgid ""
12472 "A file may be subsequently reopened, by the same or another program "
12473 "execution, and its contents reclaimed or modified (if it can be repositioned "
12474 "at the start).  If the main function returns to its original caller, or the "
12475 "B<exit>(3)  function is called, all open files are closed (hence all output "
12476 "streams are flushed) before program termination.  Other methods of program "
12477 "termination, such as B<abort>(3)  do not bother about closing files properly."
12478 msgstr ""
12479 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12480 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12481 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12482 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12483 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12484 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12485 "保証はない。"
12486
12487 #. type: Plain text
12488 #: build/C/man3/stdio.3:119
12489 msgid ""
12490 "At program startup, three text streams are predefined and need not be opened "
12491 "explicitly: I<standard input> (for reading conventional input), I<standard "
12492 "output> (for writing conventional input), and I<standard error> (for writing "
12493 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12494 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12495 "the standard input and output streams are fully buffered if and only if the "
12496 "streams do not refer to an interactive device."
12497 msgstr ""
12498 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12499 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12500 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12501 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12502 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12503 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12504 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12505 "スを参照していなければ、 完全にバッファリングされている。"
12506
12507 #. type: Plain text
12508 #: build/C/man3/stdio.3:129
12509 msgid ""
12510 "Output streams that refer to terminal devices are always line buffered by "
12511 "default; pending output to such streams is written automatically whenever an "
12512 "input stream that refers to a terminal device is read.  In cases where a "
12513 "large amount of computation is done after printing part of a line on an "
12514 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12515 "going off and computing so that the output will appear."
12516 msgstr ""
12517 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12518 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12519 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12520 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12521 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12522 "必要がある。"
12523
12524 #. type: Plain text
12525 #: build/C/man3/stdio.3:143
12526 msgid ""
12527 "The I<stdio> library is a part of the library B<libc> and routines are "
12528 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12529 "SYNOPSIS sections of the following manual pages indicate which include files "
12530 "are to be used, what the compiler declaration for the function looks like "
12531 "and which external variables are of interest."
12532 msgstr ""
12533 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12534 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12535 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12536 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12537 "数が関係するのかが示されている。"
12538
12539 #.  Not on Linux: .BR fropen ,
12540 #.  Not on Linux: .BR fwopen ,
12541 #. type: Plain text
12542 #: build/C/man3/stdio.3:183
12543 msgid ""
12544 "The following are defined as macros; these names may not be reused without "
12545 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12546 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12547 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12548 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12549 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12550 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12551 "and B<putchar> exist and will be used if the macros definitions are "
12552 "explicitly removed."
12553 msgstr ""
12554 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12555 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12556 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12557 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12558 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12559 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12560 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12561 "示的に消去されている場合には、 これらを使用することになるだろう。"
12562
12563 #. type: SS
12564 #: build/C/man3/stdio.3:183
12565 #, no-wrap
12566 msgid "List of functions"
12567 msgstr "関数のリスト"
12568
12569 #. type: tbl table
12570 #: build/C/man3/stdio.3:188
12571 #, no-wrap
12572 msgid "Function\tDescription\n"
12573 msgstr "関数\t説明\n"
12574
12575 #. type: tbl table
12576 #: build/C/man3/stdio.3:189
12577 #, no-wrap
12578 msgid "_\n"
12579 msgstr "_\n"
12580
12581 #. type: tbl table
12582 #: build/C/man3/stdio.3:190
12583 #, no-wrap
12584 msgid "clearerr\tcheck and reset stream status\n"
12585 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12586
12587 #. type: tbl table
12588 #: build/C/man3/stdio.3:191
12589 #, no-wrap
12590 msgid "fclose\tclose a stream\n"
12591 msgstr "fclose\tストリームをクローズする\n"
12592
12593 #. type: tbl table
12594 #: build/C/man3/stdio.3:192
12595 #, no-wrap
12596 msgid "fdopen\tstream open functions\n"
12597 msgstr "fdopen\tストリームをオープンする\n"
12598
12599 #. type: tbl table
12600 #: build/C/man3/stdio.3:193
12601 #, no-wrap
12602 msgid "feof\tcheck and reset stream status\n"
12603 msgstr "feof\tストリームの状態の確認とリセット\n"
12604
12605 #. type: tbl table
12606 #: build/C/man3/stdio.3:194
12607 #, no-wrap
12608 msgid "ferror\tcheck and reset stream status\n"
12609 msgstr "ferror\tストリームの状態の確認とリセット\n"
12610
12611 #. type: tbl table
12612 #: build/C/man3/stdio.3:195
12613 #, no-wrap
12614 msgid "fflush\tflush a stream\n"
12615 msgstr "fflush\tストリームをフラッシュする\n"
12616
12617 #. type: tbl table
12618 #: build/C/man3/stdio.3:196
12619 #, no-wrap
12620 msgid "fgetc\tget next character or word from input stream\n"
12621 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12622
12623 #. type: tbl table
12624 #: build/C/man3/stdio.3:197
12625 #, no-wrap
12626 msgid "fgetpos\treposition a stream\n"
12627 msgstr "fgetpos\tストリームの位置を取得する\n"
12628
12629 #. type: tbl table
12630 #: build/C/man3/stdio.3:198
12631 #, no-wrap
12632 msgid "fgets\tget a line from a stream\n"
12633 msgstr "fgets\tストリームから行を取得する\n"
12634
12635 #. type: tbl table
12636 #: build/C/man3/stdio.3:199
12637 #, no-wrap
12638 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12639 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12640
12641 #. type: tbl table
12642 #: build/C/man3/stdio.3:200
12643 #, no-wrap
12644 msgid "fopen\tstream open functions\n"
12645 msgstr "fopen\tストリームをオープンする\n"
12646
12647 #. type: tbl table
12648 #: build/C/man3/stdio.3:201
12649 #, no-wrap
12650 msgid "fprintf\tformatted output conversion\n"
12651 msgstr "fprintf\t書式付き出力変換\n"
12652
12653 #. type: tbl table
12654 #: build/C/man3/stdio.3:202
12655 #, no-wrap
12656 msgid "fpurge\tflush a stream\n"
12657 msgstr "fpurge\tストリームをフラッシュする\n"
12658
12659 #. type: tbl table
12660 #: build/C/man3/stdio.3:203
12661 #, no-wrap
12662 msgid "fputc\toutput a character or word to a stream\n"
12663 msgstr "fputc\t文字または語をストリームに出力する\n"
12664
12665 #. type: tbl table
12666 #: build/C/man3/stdio.3:204
12667 #, no-wrap
12668 msgid "fputs\toutput a line to a stream\n"
12669 msgstr "fputs\t行をストリームに出力する\n"
12670
12671 #. type: tbl table
12672 #: build/C/man3/stdio.3:205
12673 #, no-wrap
12674 msgid "fread\tbinary stream input/output\n"
12675 msgstr "fread\tバイナリーストリーム入出力\n"
12676
12677 #. type: tbl table
12678 #: build/C/man3/stdio.3:206
12679 #, no-wrap
12680 msgid "freopen\tstream open functions\n"
12681 msgstr "freopen\tストリームをオープンする\n"
12682
12683 #. type: tbl table
12684 #: build/C/man3/stdio.3:207
12685 #, no-wrap
12686 msgid "fscanf\tinput format conversion\n"
12687 msgstr "fscanf\t書式付き入力変換\n"
12688
12689 #. type: tbl table
12690 #: build/C/man3/stdio.3:208
12691 #, no-wrap
12692 msgid "fseek\treposition a stream\n"
12693 msgstr "fseek\tストリームの位置指示子を移動する\n"
12694
12695 #. type: tbl table
12696 #: build/C/man3/stdio.3:209
12697 #, no-wrap
12698 msgid "fsetpos\treposition a stream\n"
12699 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12700
12701 #. type: tbl table
12702 #: build/C/man3/stdio.3:210
12703 #, no-wrap
12704 msgid "ftell\treposition a stream\n"
12705 msgstr "ftell\tストリームの位置を取得する\n"
12706
12707 #. type: tbl table
12708 #: build/C/man3/stdio.3:211
12709 #, no-wrap
12710 msgid "fwrite\tbinary stream input/output\n"
12711 msgstr "fwrite\tバイナリーストリーム入出力\n"
12712
12713 #. type: tbl table
12714 #: build/C/man3/stdio.3:212
12715 #, no-wrap
12716 msgid "getc\tget next character or word from input stream\n"
12717 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12718
12719 #. type: tbl table
12720 #: build/C/man3/stdio.3:213
12721 #, no-wrap
12722 msgid "getchar\tget next character or word from input stream\n"
12723 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12724
12725 #. type: tbl table
12726 #: build/C/man3/stdio.3:214
12727 #, no-wrap
12728 msgid "gets\tget a line from a stream\n"
12729 msgstr "gets\t行を入力ストリームから取得する\n"
12730
12731 #. type: tbl table
12732 #: build/C/man3/stdio.3:215
12733 #, no-wrap
12734 msgid "getw\tget next character or word from input stream\n"
12735 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12736
12737 #. type: tbl table
12738 #: build/C/man3/stdio.3:216
12739 #, no-wrap
12740 msgid "mktemp\tmake temporary filename (unique)\n"
12741 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12742
12743 #. type: tbl table
12744 #: build/C/man3/stdio.3:217
12745 #, no-wrap
12746 msgid "perror\tsystem error messages\n"
12747 msgstr "perror\tシステムエラーメッセージ\n"
12748
12749 #. type: tbl table
12750 #: build/C/man3/stdio.3:218
12751 #, no-wrap
12752 msgid "printf\tformatted output conversion\n"
12753 msgstr "printf\t書式付き出力変換\n"
12754
12755 #. type: tbl table
12756 #: build/C/man3/stdio.3:219
12757 #, no-wrap
12758 msgid "putc\toutput a character or word to a stream\n"
12759 msgstr "putc\t文字または語をストリームに出力する\n"
12760
12761 #. type: tbl table
12762 #: build/C/man3/stdio.3:220
12763 #, no-wrap
12764 msgid "putchar\toutput a character or word to a stream\n"
12765 msgstr "putchar\t文字または語をストリームに出力する\n"
12766
12767 #. type: tbl table
12768 #: build/C/man3/stdio.3:221
12769 #, no-wrap
12770 msgid "puts\toutput a line to a stream\n"
12771 msgstr "puts\t行をストリームに出力する\n"
12772
12773 #. type: tbl table
12774 #: build/C/man3/stdio.3:222
12775 #, no-wrap
12776 msgid "putw\toutput a character or word to a stream\n"
12777 msgstr "putw\t文字または語をストリームに出力する\n"
12778
12779 #. type: tbl table
12780 #: build/C/man3/stdio.3:223
12781 #, no-wrap
12782 msgid "remove\tremove directory entry\n"
12783 msgstr "remove\tディレクトリエントリを削除する\n"
12784
12785 #. type: tbl table
12786 #: build/C/man3/stdio.3:224
12787 #, no-wrap
12788 msgid "rewind\treposition a stream\n"
12789 msgstr "rewind\tストリームの位置指示子を移動する\n"
12790
12791 #. type: tbl table
12792 #: build/C/man3/stdio.3:225
12793 #, no-wrap
12794 msgid "scanf\tinput format conversion\n"
12795 msgstr "scanf\t書式付き入力変換\n"
12796
12797 #. type: tbl table
12798 #: build/C/man3/stdio.3:226
12799 #, no-wrap
12800 msgid "setbuf\tstream buffering operations\n"
12801 msgstr "setbuf\tストリームのバッファリングの操作\n"
12802
12803 #. type: tbl table
12804 #: build/C/man3/stdio.3:227
12805 #, no-wrap
12806 msgid "setbuffer\tstream buffering operations\n"
12807 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12808
12809 #. type: tbl table
12810 #: build/C/man3/stdio.3:228
12811 #, no-wrap
12812 msgid "setlinebuf\tstream buffering operations\n"
12813 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12814
12815 #. type: tbl table
12816 #: build/C/man3/stdio.3:229
12817 #, no-wrap
12818 msgid "setvbuf\tstream buffering operations\n"
12819 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12820
12821 #. type: tbl table
12822 #: build/C/man3/stdio.3:230
12823 #, no-wrap
12824 msgid "sprintf\tformatted output conversion\n"
12825 msgstr "sprintf\t書式付き出力変換\n"
12826
12827 #. type: tbl table
12828 #: build/C/man3/stdio.3:231
12829 #, no-wrap
12830 msgid "sscanf\tinput format conversion\n"
12831 msgstr "sscanf\t書式付き入力変換\n"
12832
12833 #. type: tbl table
12834 #: build/C/man3/stdio.3:232
12835 #, no-wrap
12836 msgid "strerror\tsystem error messages\n"
12837 msgstr "strerror\tシステムエラーメッセージ\n"
12838
12839 #. type: tbl table
12840 #: build/C/man3/stdio.3:233
12841 #, no-wrap
12842 msgid "sys_errlist\tsystem error messages\n"
12843 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12844
12845 #. type: tbl table
12846 #: build/C/man3/stdio.3:234
12847 #, no-wrap
12848 msgid "sys_nerr\tsystem error messages\n"
12849 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12850
12851 #. type: tbl table
12852 #: build/C/man3/stdio.3:235
12853 #, no-wrap
12854 msgid "tempnam\ttemporary file routines\n"
12855 msgstr "tempnam\tテンポラリファイルの操作\n"
12856
12857 #. type: tbl table
12858 #: build/C/man3/stdio.3:236
12859 #, no-wrap
12860 msgid "tmpfile\ttemporary file routines\n"
12861 msgstr "tmpfile\tテンポラリファイルの操作\n"
12862
12863 #. type: tbl table
12864 #: build/C/man3/stdio.3:237
12865 #, no-wrap
12866 msgid "tmpnam\ttemporary file routines\n"
12867 msgstr "tmpnam\tテンポラリファイルの操作\n"
12868
12869 #. type: tbl table
12870 #: build/C/man3/stdio.3:238
12871 #, no-wrap
12872 msgid "ungetc\tun-get character from input stream\n"
12873 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12874
12875 #. type: tbl table
12876 #: build/C/man3/stdio.3:239
12877 #, no-wrap
12878 msgid "vfprintf\tformatted output conversion\n"
12879 msgstr "vfprintf\t書式付き出力変換\n"
12880
12881 #. type: tbl table
12882 #: build/C/man3/stdio.3:240
12883 #, no-wrap
12884 msgid "vfscanf\tinput format conversion\n"
12885 msgstr "vfscanf\t書式付き入力変換\n"
12886
12887 #. type: tbl table
12888 #: build/C/man3/stdio.3:241
12889 #, no-wrap
12890 msgid "vprintf\tformatted output conversion\n"
12891 msgstr "vprintf\t書式付き出力変換\n"
12892
12893 #. type: tbl table
12894 #: build/C/man3/stdio.3:242
12895 #, no-wrap
12896 msgid "vscanf\tinput format conversion\n"
12897 msgstr "vscanf\t書式付き入力変換\n"
12898
12899 #. type: tbl table
12900 #: build/C/man3/stdio.3:243
12901 #, no-wrap
12902 msgid "vsprintf\tformatted output conversion\n"
12903 msgstr "vsprintf\t書式付き出力変換\n"
12904
12905 #. type: tbl table
12906 #: build/C/man3/stdio.3:244
12907 #, no-wrap
12908 msgid "vsscanf\tinput format conversion\n"
12909 msgstr "vsscanf\t書式付き入力変換\n"
12910
12911 #. type: Plain text
12912 #: build/C/man3/stdio.3:250
12913 msgid "The I<stdio> library conforms to C89."
12914 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12915
12916 #. type: Plain text
12917 #: build/C/man3/stdio.3:257
12918 msgid ""
12919 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12920 "B<unlocked_stdio>(3)"
12921 msgstr ""
12922 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12923 "B<unlocked_stdio>(3)"
12924
12925 #. type: TH
12926 #: build/C/man3/stdio_ext.3:25
12927 #, no-wrap
12928 msgid "STDIO_EXT"
12929 msgstr "STDIO_EXT"
12930
12931 #. type: Plain text
12932 #: build/C/man3/stdio_ext.3:30
12933 msgid ""
12934 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12935 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12936 "structure"
12937 msgstr ""
12938 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12939 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12940 "へのインタフェース"
12941
12942 #. type: Plain text
12943 #: build/C/man3/stdio_ext.3:34
12944 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12945 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12946
12947 #. type: Plain text
12948 #: build/C/man3/stdio_ext.3:36
12949 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12950 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12951
12952 #. type: Plain text
12953 #: build/C/man3/stdio_ext.3:38
12954 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12955 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12956
12957 #. type: Plain text
12958 #: build/C/man3/stdio_ext.3:40
12959 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12960 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12961
12962 #. type: Plain text
12963 #: build/C/man3/stdio_ext.3:42
12964 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12965 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12966
12967 #. type: Plain text
12968 #: build/C/man3/stdio_ext.3:44
12969 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12970 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12971
12972 #. type: Plain text
12973 #: build/C/man3/stdio_ext.3:46
12974 msgid "B<int __freading(FILE *>I<stream>B<);>"
12975 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12976
12977 #. type: Plain text
12978 #: build/C/man3/stdio_ext.3:48
12979 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12980 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12981
12982 #. type: Plain text
12983 #: build/C/man3/stdio_ext.3:50
12984 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12985 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12986
12987 #. type: Plain text
12988 #: build/C/man3/stdio_ext.3:52
12989 msgid "B<void _flushlbf(void);>"
12990 msgstr "B<void _flushlbf(void);>"
12991
12992 #. type: Plain text
12993 #: build/C/man3/stdio_ext.3:54
12994 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12995 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12996
12997 #. type: Plain text
12998 #: build/C/man3/stdio_ext.3:59
12999 msgid ""
13000 "Solaris introduced routines to allow portable access to the internals of the "
13001 "I<FILE> structure, and glibc also implemented these."
13002 msgstr ""
13003 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
13004 "が導入されており、これらは glibc でも実装されている。"
13005
13006 #. type: Plain text
13007 #: build/C/man3/stdio_ext.3:64
13008 msgid ""
13009 "The B<__fbufsize>()  function returns the size of the buffer currently used "
13010 "by the given stream."
13011 msgstr ""
13012 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
13013 "す。"
13014
13015 #. type: Plain text
13016 #: build/C/man3/stdio_ext.3:71
13017 msgid ""
13018 "The B<__fpending>()  function returns the number of bytes in the output "
13019 "buffer.  For wide-oriented streams the unit is wide characters.  This "
13020 "function is undefined on buffers in reading mode, or opened read-only."
13021 msgstr ""
13022 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
13023 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
13024 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
13025 "は未定義である。"
13026
13027 #. type: Plain text
13028 #: build/C/man3/stdio_ext.3:76
13029 msgid ""
13030 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
13031 "buffered, and zero otherwise."
13032 msgstr ""
13033 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
13034 "場合は 0 を返す。"
13035
13036 #. type: Plain text
13037 #: build/C/man3/stdio_ext.3:81
13038 msgid ""
13039 "The B<__freadable>()  function returns a nonzero value if the stream allows "
13040 "reading, and zero otherwise."
13041 msgstr ""
13042 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
13043 "外の場合は 0 を返す。"
13044
13045 #. type: Plain text
13046 #: build/C/man3/stdio_ext.3:86
13047 msgid ""
13048 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
13049 "writing, and zero otherwise."
13050 msgstr ""
13051 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
13052 "外の場合は 0 を返す。"
13053
13054 #. type: Plain text
13055 #: build/C/man3/stdio_ext.3:92
13056 msgid ""
13057 "The B<__freading>()  function returns a nonzero value if the stream is read-"
13058 "only, or if the last operation on the stream was a read operation, and zero "
13059 "otherwise."
13060 msgstr ""
13061 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
13062 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
13063 "を返す。"
13064
13065 #. type: Plain text
13066 #: build/C/man3/stdio_ext.3:98
13067 msgid ""
13068 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
13069 "only (or append-only), or if the last operation on the stream was a write "
13070 "operation, and zero otherwise."
13071 msgstr ""
13072 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
13073 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
13074 "し、 それ以外の場合は 0 を返す。"
13075
13076 #. type: Plain text
13077 #: build/C/man3/stdio_ext.3:106
13078 msgid ""
13079 "The B<__fsetlocking>()  function can be used to select the desired type of "
13080 "locking on the stream.  It returns the current type.  The I<type> argument "
13081 "can take the following three values:"
13082 msgstr ""
13083 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
13084 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
13085 "ることができる :"
13086
13087 #. type: TP
13088 #: build/C/man3/stdio_ext.3:106
13089 #, no-wrap
13090 msgid "B<FSETLOCKING_INTERNAL>"
13091 msgstr "B<FSETLOCKING_INTERNAL>"
13092
13093 #. type: Plain text
13094 #: build/C/man3/stdio_ext.3:111
13095 msgid ""
13096 "Perform implicit locking around every operation on the given stream (except "
13097 "for the *_unlocked ones).  This is the default."
13098 msgstr ""
13099 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
13100 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
13101 "である)。 これがデフォルトのロック形式である。"
13102
13103 #. type: TP
13104 #: build/C/man3/stdio_ext.3:111
13105 #, no-wrap
13106 msgid "B<FSETLOCKING_BYCALLER>"
13107 msgstr "B<FSETLOCKING_BYCALLER>"
13108
13109 #. type: Plain text
13110 #: build/C/man3/stdio_ext.3:118
13111 msgid ""
13112 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
13113 "case there is more than one thread), and the stdio routines will not do "
13114 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
13115 msgstr ""
13116 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
13117 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
13118 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
13119 "理を行わない。"
13120
13121 #. type: TP
13122 #: build/C/man3/stdio_ext.3:118
13123 #, no-wrap
13124 msgid "B<FSETLOCKING_QUERY>"
13125 msgstr "B<FSETLOCKING_QUERY>"
13126
13127 #. type: Plain text
13128 #: build/C/man3/stdio_ext.3:122
13129 msgid "Don't change the type of locking.  (Only return it.)"
13130 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
13131
13132 #. type: Plain text
13133 #: build/C/man3/stdio_ext.3:128
13134 msgid ""
13135 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
13136 "so that output to a terminal is forced out, say before reading keyboard "
13137 "input.)"
13138 msgstr ""
13139 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
13140 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
13141 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
13142 "いだろう)"
13143
13144 #. type: Plain text
13145 #: build/C/man3/stdio_ext.3:132
13146 msgid ""
13147 "The B<__fpurge>()  function discards the contents of the stream's buffer."
13148 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
13149
13150 #. type: Plain text
13151 #: build/C/man3/stdio_ext.3:141
13152 msgid ""
13153 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
13154 "functions do not lock the stream, so they are not thread-safe."
13155 msgstr ""
13156 "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() "
13157 "は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
13158
13159 #. type: Plain text
13160 #: build/C/man3/stdio_ext.3:151
13161 msgid ""
13162 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13163 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
13164 msgstr ""
13165 "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13166 "B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
13167
13168 #. type: Plain text
13169 #: build/C/man3/stdio_ext.3:154
13170 msgid "B<flockfile>(3), B<fpurge>(3)"
13171 msgstr "B<flockfile>(3), B<fpurge>(3)"
13172
13173 #. type: TH
13174 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
13175 #, no-wrap
13176 msgid "SYMLINK"
13177 msgstr "SYMLINK"
13178
13179 #. type: Plain text
13180 #: build/C/man2/symlink.2:35
13181 msgid "symlink - make a new name for a file"
13182 msgstr "symlink - ファイルに新しい名前を付ける"
13183
13184 #. type: Plain text
13185 #: build/C/man2/symlink.2:39
13186 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13187 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13188
13189 #. type: Plain text
13190 #: build/C/man2/symlink.2:47
13191 msgid "B<symlink>():"
13192 msgstr "B<symlink>():"
13193
13194 #. type: Plain text
13195 #: build/C/man2/symlink.2:58
13196 msgid ""
13197 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
13198 "string I<oldpath>."
13199 msgstr ""
13200 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
13201 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
13202
13203 #. type: Plain text
13204 #: build/C/man2/symlink.2:62
13205 msgid ""
13206 "Symbolic links are interpreted at run time as if the contents of the link "
13207 "had been substituted into the path being followed to find a file or "
13208 "directory."
13209 msgstr ""
13210 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
13211 "スを辿ることで、 ファイルやディレクトリに到達する。"
13212
13213 #. type: Plain text
13214 #: build/C/man2/symlink.2:67
13215 msgid ""
13216 "Symbolic links may contain I<..> path components, which (if used at the "
13217 "start of the link) refer to the parent directories of that in which the link "
13218 "resides."
13219 msgstr ""
13220 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
13221 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
13222 "される。"
13223
13224 #. type: Plain text
13225 #: build/C/man2/symlink.2:71
13226 msgid ""
13227 "A symbolic link (also known as a soft link) may point to an existing file or "
13228 "to a nonexistent one; the latter case is known as a dangling link."
13229 msgstr ""
13230 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
13231 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
13232 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
13233
13234 #. type: Plain text
13235 #: build/C/man2/symlink.2:78
13236 msgid ""
13237 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
13238 "when following the link, but is checked when removal or renaming of the link "
13239 "is requested and the link is in a directory with the sticky bit "
13240 "(B<S_ISVTX>)  set."
13241 msgstr ""
13242 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
13243 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
13244 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
13245 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
13246
13247 #. type: Plain text
13248 #: build/C/man2/symlink.2:99
13249 msgid ""
13250 "Write access to the directory containing I<newpath> is denied, or one of the "
13251 "directories in the path prefix of I<newpath> did not allow search "
13252 "permission.  (See also B<path_resolution>(7).)"
13253 msgstr ""
13254 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
13255 "含まれているディレクトリのどれかに検索許可が与えられていない "
13256 "(B<path_resolution>(7)  も参照すること)。"
13257
13258 #. type: Plain text
13259 #: build/C/man2/symlink.2:104
13260 msgid ""
13261 "The user's quota of resources on the file system has been exhausted.  The "
13262 "resources could be inodes or disk blocks, depending on the file system "
13263 "implementation."
13264 msgstr ""
13265 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
13266 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
13267 "依存である。"
13268
13269 #. type: Plain text
13270 #: build/C/man2/symlink.2:118
13271 msgid "Too many symbolic links were encountered in resolving I<newpath>."
13272 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13273
13274 #. type: Plain text
13275 #: build/C/man2/symlink.2:128
13276 msgid ""
13277 "A directory component in I<newpath> does not exist or is a dangling symbolic "
13278 "link, or I<oldpath> is the empty string."
13279 msgstr ""
13280 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
13281 "I<oldpath> が空文字列である。"
13282
13283 #. type: Plain text
13284 #: build/C/man2/symlink.2:140
13285 msgid ""
13286 "A component used as a directory in I<newpath> is not, in fact, a directory."
13287 msgstr ""
13288 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
13289
13290 #. type: Plain text
13291 #: build/C/man2/symlink.2:145
13292 msgid ""
13293 "The file system containing I<newpath> does not support the creation of "
13294 "symbolic links."
13295 msgstr ""
13296 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
13297 "作成をサポートしていない。"
13298
13299 #. type: Plain text
13300 #: build/C/man2/symlink.2:149
13301 msgid "I<newpath> is on a read-only file system."
13302 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
13303
13304 #. type: Plain text
13305 #: build/C/man2/symlink.2:159
13306 msgid "No checking of I<oldpath> is done."
13307 msgstr "I<oldpath> についてのチェックは行なわれない。"
13308
13309 #. type: Plain text
13310 #: build/C/man2/symlink.2:164
13311 msgid ""
13312 "Deleting the name referred to by a symlink will actually delete the file "
13313 "(unless it also has other hard links).  If this behavior is not desired, use "
13314 "B<link>(2)."
13315 msgstr ""
13316 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
13317 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
13318 "場合は、 B<link>(2)  を使用すること。"
13319
13320 #. type: Plain text
13321 #: build/C/man2/symlink.2:176
13322 msgid ""
13323 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13324 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13325 "B<symlink>(7)"
13326 msgstr ""
13327 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13328 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13329 "B<symlink>(7)"
13330
13331 #. type: TH
13332 #: build/C/man7/symlink.7:36
13333 #, no-wrap
13334 msgid "2008-06-18"
13335 msgstr "2008-06-18"
13336
13337 #. type: Plain text
13338 #: build/C/man7/symlink.7:39
13339 msgid "symlink - symbolic link handling"
13340 msgstr ""
13341
13342 #. type: SH
13343 #: build/C/man7/symlink.7:39
13344 #, no-wrap
13345 msgid "SYMBOLIC LINK HANDLING"
13346 msgstr ""
13347
13348 #. type: Plain text
13349 #: build/C/man7/symlink.7:43
13350 msgid ""
13351 "Symbolic links are files that act as pointers to other files.  To understand "
13352 "their behavior, you must first understand how hard links work."
13353 msgstr ""
13354
13355 #. type: Plain text
13356 #: build/C/man7/symlink.7:59
13357 msgid ""
13358 "A hard link to a file is indistinguishable from the original file because it "
13359 "is a reference to the object underlying the original filename.  (To be "
13360 "precise: each of the hard links to a file is a reference to the same I<i-"
13361 "node number>, where an i-node number is an index into the i-node table, "
13362 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
13363 "Changes to a file are independent of the name used to reference the file.  "
13364 "Hard links may not refer to directories (to prevent the possibility of loops "
13365 "within the file system tree, which would confuse many programs)  and may not "
13366 "refer to files on different file systems (because i-node numbers are not "
13367 "unique across file systems)."
13368 msgstr ""
13369
13370 #. type: Plain text
13371 #: build/C/man7/symlink.7:66
13372 msgid ""
13373 "A symbolic link is a special type of file whose contents are a string that "
13374 "is the pathname another file, the file to which the link refers.  In other "
13375 "words, a symbolic link is a pointer to another name, and not to an "
13376 "underlying object.  For this reason, symbolic links may refer to directories "
13377 "and may cross file system boundaries."
13378 msgstr ""
13379
13380 #. type: Plain text
13381 #: build/C/man7/symlink.7:72
13382 msgid ""
13383 "There is no requirement that the pathname referred to by a symbolic link "
13384 "should exist.  A symbolic link that refers to a pathname that does not exist "
13385 "is said to be a I<dangling link>."
13386 msgstr ""
13387
13388 #. type: Plain text
13389 #: build/C/man7/symlink.7:84
13390 msgid ""
13391 "Because a symbolic link and its referenced object coexist in the file system "
13392 "name space, confusion can arise in distinguishing between the link itself "
13393 "and the referenced object.  On historical systems, commands and system calls "
13394 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
13395 "Rules for a more uniform approach, as they are implemented on Linux and "
13396 "other systems, are outlined here.  It is important that site-local "
13397 "applications also conform to these rules, so that the user interface can be "
13398 "as consistent as possible."
13399 msgstr ""
13400
13401 #. type: SS
13402 #: build/C/man7/symlink.7:84
13403 #, no-wrap
13404 msgid "Symbolic link ownership, permissions, and timestamps"
13405 msgstr ""
13406
13407 #. type: Plain text
13408 #: build/C/man7/symlink.7:92
13409 msgid ""
13410 "The owner and group of an existing symbolic link can be changed using "
13411 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
13412 "is when the link is being removed or renamed in a directory that has the "
13413 "sticky bit set (see B<stat>(2))."
13414 msgstr ""
13415
13416 #. type: Plain text
13417 #: build/C/man7/symlink.7:98
13418 msgid ""
13419 "The last access and last modification timestamps of a symbolic link can be "
13420 "changed using B<utimensat>(2)  or B<lutimes>(3)."
13421 msgstr ""
13422
13423 #.  Linux does not currently implement an lchmod(2).
13424 #.  The
13425 #.  4.4BSD
13426 #.  system differs from historical
13427 #.  4BSD
13428 #.  systems in that the system call
13429 #.  .BR chown (2)
13430 #.  has been changed to follow symbolic links.
13431 #.  The
13432 #.  .BR lchown (2)
13433 #.  system call was added later when the limitations of the new
13434 #.  .BR chown (2)
13435 #.  became apparent.
13436 #. type: Plain text
13437 #: build/C/man7/symlink.7:117
13438 msgid ""
13439 "On Linux, the permissions of a symbolic link are not used in any operations; "
13440 "the permissions are always 0777 (read, write, and execute for all user "
13441 "categories), and can't be changed."
13442 msgstr ""
13443
13444 #. type: SS
13445 #: build/C/man7/symlink.7:117
13446 #, no-wrap
13447 msgid "Handling of symbolic links by system calls and commands"
13448 msgstr ""
13449
13450 #. type: Plain text
13451 #: build/C/man7/symlink.7:132
13452 msgid ""
13453 "Symbolic links are handled either by operating on the link itself, or by "
13454 "operating on the object referred to by the link.  In the latter case, an "
13455 "application or system call is said to I<follow> the link.  Symbolic links "
13456 "may refer to other symbolic links, in which case the links are dereferenced "
13457 "until an object that is not a symbolic link is found, a symbolic link that "
13458 "refers to a file which does not exist is found, or a loop is detected.  "
13459 "(Loop detection is done by placing an upper limit on the number of links "
13460 "that may be followed, and an error results if this limit is exceeded.)"
13461 msgstr ""
13462
13463 #. type: Plain text
13464 #: build/C/man7/symlink.7:135
13465 msgid ""
13466 "There are three separate areas that need to be discussed.  They are as "
13467 "follows:"
13468 msgstr ""
13469
13470 #. type: IP
13471 #: build/C/man7/symlink.7:135
13472 #, no-wrap
13473 msgid "1."
13474 msgstr "1."
13475
13476 #. type: Plain text
13477 #: build/C/man7/symlink.7:137
13478 msgid "Symbolic links used as filename arguments for system calls."
13479 msgstr ""
13480
13481 #. type: IP
13482 #: build/C/man7/symlink.7:137
13483 #, no-wrap
13484 msgid "2."
13485 msgstr "2."
13486
13487 #. type: Plain text
13488 #: build/C/man7/symlink.7:140
13489 msgid ""
13490 "Symbolic links specified as command-line arguments to utilities that are not "
13491 "traversing a file tree."
13492 msgstr ""
13493
13494 #. type: IP
13495 #: build/C/man7/symlink.7:140
13496 #, no-wrap
13497 msgid "3."
13498 msgstr "3."
13499
13500 #. type: Plain text
13501 #: build/C/man7/symlink.7:144
13502 msgid ""
13503 "Symbolic links encountered by utilities that are traversing a file tree "
13504 "(either specified on the command line or encountered as part of the file "
13505 "hierarchy walk)."
13506 msgstr ""
13507
13508 #. type: SS
13509 #: build/C/man7/symlink.7:144
13510 #, no-wrap
13511 msgid "System calls"
13512 msgstr ""
13513
13514 #. type: Plain text
13515 #: build/C/man7/symlink.7:147
13516 msgid ""
13517 "The first area is symbolic links used as filename arguments for system calls."
13518 msgstr ""
13519
13520 #. type: Plain text
13521 #: build/C/man7/symlink.7:157
13522 msgid ""
13523 "Except as noted below, all system calls follow symbolic links.  For example, "
13524 "if there were a symbolic link I<slink> which pointed to a file named "
13525 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13526 "descriptor referring to the file I<afile>."
13527 msgstr ""
13528
13529 #.  Maybe one day: .BR fchownat (2)
13530 #. type: Plain text
13531 #: build/C/man7/symlink.7:207
13532 msgid ""
13533 "Various system calls do not follow links, and operate on the symbolic link "
13534 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13535 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13536 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13537 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13538 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13539 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13540 "(2), that library function also does not follow symbolic links.  When "
13541 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13542 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13543 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13544 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13545 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13546 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13547 "to allow either behavior in an implementation."
13548 msgstr ""
13549
13550 #. type: SS
13551 #: build/C/man7/symlink.7:207
13552 #, no-wrap
13553 msgid "Commands not traversing a file tree"
13554 msgstr ""
13555
13556 #. type: Plain text
13557 #: build/C/man7/symlink.7:210
13558 msgid ""
13559 "The second area is symbolic links, specified as command-line filename "
13560 "arguments, to commands which are not traversing a file tree."
13561 msgstr ""
13562
13563 #. type: Plain text
13564 #: build/C/man7/symlink.7:221
13565 msgid ""
13566 "Except as noted below, commands follow symbolic links named as command-line "
13567 "arguments.  For example, if there were a symbolic link I<slink> which "
13568 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13569 "contents of the file I<afile>."
13570 msgstr ""
13571
13572 #. type: Plain text
13573 #: build/C/man7/symlink.7:229
13574 msgid ""
13575 "It is important to realize that this rule includes commands which may "
13576 "optionally traverse file trees, e.g., the command I<chown file> is included "
13577 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13578 "traversal, is not.  (The latter is described in the third area, below.)"
13579 msgstr ""
13580
13581 #. type: Plain text
13582 #: build/C/man7/symlink.7:247
13583 msgid ""
13584 "If it is explicitly intended that the command operate on the symbolic link "
13585 "instead of following the symbolic link, e.g., it is desired that I<chown "
13586 "slink> change the ownership of the file that I<slink> is, whether it is a "
13587 "symbolic link or not, the I<-h> option should be used.  In the above "
13588 "example, I<chown root slink> would change the ownership of the file referred "
13589 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13590 "I<slink> itself."
13591 msgstr ""
13592
13593 #. type: Plain text
13594 #: build/C/man7/symlink.7:249
13595 msgid "There are some exceptions to this rule:"
13596 msgstr ""
13597
13598 #. type: Plain text
13599 #: build/C/man7/symlink.7:259
13600 msgid ""
13601 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13602 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13603 "the symbolic link references a file via a relative path, moving it to "
13604 "another directory may very well cause it to stop working, since the path may "
13605 "no longer be correct.)"
13606 msgstr ""
13607
13608 #. type: Plain text
13609 #: build/C/man7/symlink.7:289
13610 msgid ""
13611 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13612 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13613 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13614 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13615 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13616 "the only command where the I<-H> and I<-L> options affect its behavior even "
13617 "though it is not doing a walk of a file tree.)"
13618 msgstr ""
13619
13620 #. The 4.4BSD system differs from historical 4BSD systems in that the
13621 #. .BR chown (1)
13622 #. and
13623 #. .BR chgrp (1)
13624 #. commands follow symbolic links specified on the command line.
13625 #. type: Plain text
13626 #: build/C/man7/symlink.7:307
13627 msgid ""
13628 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13629 "command does not follow symbolic links named as argument by default.  The "
13630 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13631 "L> option is specified."
13632 msgstr ""
13633
13634 #. type: SS
13635 #: build/C/man7/symlink.7:307
13636 #, no-wrap
13637 msgid "Commands traversing a file tree"
13638 msgstr ""
13639
13640 #. type: Plain text
13641 #: build/C/man7/symlink.7:320
13642 msgid ""
13643 "The following commands either optionally or always traverse file trees: "
13644 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13645 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13646 msgstr ""
13647
13648 #. type: Plain text
13649 #: build/C/man7/symlink.7:324
13650 msgid ""
13651 "It is important to realize that the following rules apply equally to "
13652 "symbolic links encountered during the file tree traversal and symbolic links "
13653 "listed as command-line arguments."
13654 msgstr ""
13655
13656 #. type: Plain text
13657 #: build/C/man7/symlink.7:329
13658 msgid ""
13659 "The I<first rule> applies to symbolic links that reference files other than "
13660 "directories.  Operations that apply to symbolic links are performed on the "
13661 "links themselves, but otherwise the links are ignored."
13662 msgstr ""
13663
13664 #. type: Plain text
13665 #: build/C/man7/symlink.7:341
13666 msgid ""
13667 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13668 "symbolic links encountered in the tree traversal of I<directory>, because "
13669 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13670 "referred to by I<slink>."
13671 msgstr ""
13672
13673 #. type: Plain text
13674 #: build/C/man7/symlink.7:346
13675 msgid ""
13676 "The I<second rule> applies to symbolic links that refer to directories.  "
13677 "Symbolic links that refer to directories are never followed by default.  "
13678 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13679 "\" walk (where symbolic links the refer to directories are followed)."
13680 msgstr ""
13681
13682 #. type: Plain text
13683 #: build/C/man7/symlink.7:349
13684 msgid ""
13685 "Certain conventions are (should be) followed as consistently as possible by "
13686 "commands that perform file tree walks:"
13687 msgstr ""
13688
13689 #. type: Plain text
13690 #: build/C/man7/symlink.7:362
13691 msgid ""
13692 "A command can be made to follow any symbolic links named on the command "
13693 "line, regardless of the type of file they reference, by specifying the I<-H> "
13694 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13695 "name space look like the logical name space.  (Note, for commands that do "
13696 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13697 "R> flag is not also specified.)"
13698 msgstr ""
13699
13700 #. type: Plain text
13701 #: build/C/man7/symlink.7:378
13702 msgid ""
13703 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13704 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13705 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13706 "symbolic links specified on the command line to be dereferenced for the "
13707 "purposes of both the action to be performed and the tree walk, and it is as "
13708 "if the user had specified the name of the file to which the symbolic link "
13709 "pointed."
13710 msgstr ""
13711
13712 #. type: Plain text
13713 #: build/C/man7/symlink.7:392
13714 msgid ""
13715 "A command can be made to follow any symbolic links named on the command "
13716 "line, as well as any symbolic links encountered during the traversal, "
13717 "regardless of the type of file they reference, by specifying the I<-L> (for "
13718 "\"logical\") flag.  This flag is intended to make the entire name space look "
13719 "like the logical name space.  (Note, for commands that do not always do file "
13720 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13721 "also specified.)"
13722 msgstr ""
13723
13724 #. type: Plain text
13725 #: build/C/man7/symlink.7:407
13726 msgid ""
13727 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13728 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13729 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13730 "references.  In addition, if any symbolic links are encountered in any file "
13731 "tree that B<chown> traverses, they will be treated in the same fashion as "
13732 "I<slink>."
13733 msgstr ""
13734
13735 #. type: Plain text
13736 #: build/C/man7/symlink.7:414
13737 msgid ""
13738 "A command can be made to provide the default behavior by specifying the I<-"
13739 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13740 "space look like the physical name space."
13741 msgstr ""
13742
13743 #. type: Plain text
13744 #: build/C/man7/symlink.7:432
13745 msgid ""
13746 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13747 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13748 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13749 "once; the last one specified determines the command's behavior.  This is "
13750 "intended to permit you to alias commands to behave one way or the other, and "
13751 "then override that behavior on the command line."
13752 msgstr ""
13753
13754 #. type: Plain text
13755 #: build/C/man7/symlink.7:438
13756 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13757 msgstr ""
13758
13759 #. type: Plain text
13760 #: build/C/man7/symlink.7:451
13761 msgid ""
13762 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13763 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13764 "command does not support the I<-H>, I<-L>, or I<-P> options."
13765 msgstr ""
13766
13767 #. type: Plain text
13768 #: build/C/man7/symlink.7:471
13769 msgid ""
13770 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13771 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13772 "options, B<ls>(1)  will follow symbolic links specified on the command "
13773 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13774 "regardless of their type, whether specified on the command line or "
13775 "encountered in the tree walk."
13776 msgstr ""
13777
13778 #. type: Plain text
13779 #: build/C/man7/symlink.7:489
13780 msgid ""
13781 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13782 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13783 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13784 "B<path_resolution>(7)"
13785 msgstr ""
13786 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13787 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13788 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13789 "B<lutimes>(3), B<path_resolution>(7)"
13790
13791 #. type: TH
13792 #: build/C/man3/tempnam.3:25
13793 #, no-wrap
13794 msgid "TEMPNAM"
13795 msgstr "TEMPNAM"
13796
13797 #. type: Plain text
13798 #: build/C/man3/tempnam.3:28
13799 msgid "tempnam - create a name for a temporary file"
13800 msgstr "tempnam - テンポラリファイルの名前を作成する"
13801
13802 #. type: Plain text
13803 #: build/C/man3/tempnam.3:33
13804 #, no-wrap
13805 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13806 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13807
13808 #. type: Plain text
13809 #: build/C/man3/tempnam.3:42
13810 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13811 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13812
13813 #. type: Plain text
13814 #: build/C/man3/tempnam.3:56
13815 msgid ""
13816 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13817 "filename, and such that a file with this name did not exist when B<tempnam>"
13818 "()  checked.  The filename suffix of the pathname generated will start with "
13819 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13820 "directory prefix part of the pathname generated is required to be "
13821 "\"appropriate\" (often that at least implies writable)."
13822 msgstr ""
13823 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13824 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13825 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13826 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13827 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13828 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13829
13830 #. type: Plain text
13831 #: build/C/man3/tempnam.3:59
13832 msgid ""
13833 "Attempts to find an appropriate directory go through the following steps:"
13834 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13835
13836 #. type: TP
13837 #: build/C/man3/tempnam.3:59
13838 #, no-wrap
13839 msgid "a)"
13840 msgstr "a)"
13841
13842 #. type: Plain text
13843 #: build/C/man3/tempnam.3:65
13844 msgid ""
13845 "In case the environment variable B<TMPDIR> exists and contains the name of "
13846 "an appropriate directory, that is used."
13847 msgstr ""
13848 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13849 "ら、それを用いる。"
13850
13851 #. type: TP
13852 #: build/C/man3/tempnam.3:65
13853 #, no-wrap
13854 msgid "b)"
13855 msgstr "b)"
13856
13857 #. type: Plain text
13858 #: build/C/man3/tempnam.3:70
13859 msgid ""
13860 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13861 msgstr ""
13862 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13863 "る。"
13864
13865 #. type: TP
13866 #: build/C/man3/tempnam.3:70
13867 #, no-wrap
13868 msgid "c)"
13869 msgstr "c)"
13870
13871 #. type: Plain text
13872 #: build/C/man3/tempnam.3:77
13873 msgid ""
13874 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13875 "appropriate."
13876 msgstr ""
13877 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13878 "なら、それを用いる。"
13879
13880 #. type: TP
13881 #: build/C/man3/tempnam.3:77
13882 #, no-wrap
13883 msgid "d)"
13884 msgstr "d)"
13885
13886 #. type: Plain text
13887 #: build/C/man3/tempnam.3:80
13888 msgid "Finally an implementation-defined directory may be used."
13889 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13890
13891 #. type: Plain text
13892 #: build/C/man3/tempnam.3:87
13893 msgid ""
13894 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13895 "hence should be freed by B<free>(3)."
13896 msgstr ""
13897 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13898 "B<free>(3)  で解放すべきである。"
13899
13900 #. type: Plain text
13901 #: build/C/man3/tempnam.3:94
13902 msgid ""
13903 "On succes, the B<tempnam>()  function returns a pointer to a unique "
13904 "temporary filename.  It returns NULL if a unique name cannot be generated, "
13905 "with I<errno> set to indicate the cause of the error."
13906 msgstr ""
13907 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返"
13908 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
13909 "値を設定する。"
13910
13911 #. type: Plain text
13912 #: build/C/man3/tempnam.3:98
13913 msgid "Allocation of storage failed."
13914 msgstr "保存領域の割り当てに失敗した。"
13915
13916 #. type: Plain text
13917 #: build/C/man3/tempnam.3:103
13918 msgid ""
13919 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13920 msgstr ""
13921 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13922 "る。"
13923
13924 #. type: Plain text
13925 #: build/C/man3/tempnam.3:122
13926 msgid ""
13927 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13928 "nevertheless possible that between the time that B<tempnam>()  returns a "
13929 "pathname, and the time that the program opens it, another program might "
13930 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13931 "This can lead to security holes.  To avoid such possibilities, use the "
13932 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13933 "B<mkstemp>(3)  or B<tmpfile>(3)."
13934 msgstr ""
13935 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13936 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13937 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13938 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13939 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13940 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13941 "B<tmpfile>(3)  を使うことである。"
13942
13943 #. type: Plain text
13944 #: build/C/man3/tempnam.3:130
13945 msgid ""
13946 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13947 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13948 "tmp> (and this is what glibc does)."
13949 msgstr ""
13950 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13951 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13952 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13953
13954 #. type: Plain text
13955 #: build/C/man3/tempnam.3:135
13956 msgid ""
13957 "Because it dynamically allocates memory used to return the pathname, "
13958 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13959 msgstr ""
13960 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13961 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13962
13963 #. type: Plain text
13964 #: build/C/man3/tempnam.3:148
13965 msgid ""
13966 "The B<tempnam>()  function generates a different string each time it is "
13967 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13968 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13969 msgstr ""
13970 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13971 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13972 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13973
13974 #. type: Plain text
13975 #: build/C/man3/tempnam.3:152
13976 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13977 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13978
13979 #. type: Plain text
13980 #: build/C/man3/tempnam.3:158
13981 msgid ""
13982 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13983 "upon failure to find a unique name."
13984 msgstr ""
13985 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13986 "ラー B<EEXIST> で失敗する。"
13987
13988 #. type: Plain text
13989 #: build/C/man3/tempnam.3:161
13990 msgid ""
13991 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13992 "accessibility of a directory is determined."
13993 msgstr ""
13994 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13995 "度のアクセス権限が必要なのかは指定されていない。"
13996
13997 #. type: Plain text
13998 #: build/C/man3/tempnam.3:168 build/C/man3/tmpnam.3:163
13999 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
14000 msgstr ""
14001 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
14002 "を使うこと。"
14003
14004 #. type: Plain text
14005 #: build/C/man3/tempnam.3:173
14006 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
14007 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
14008
14009 #. type: TH
14010 #: build/C/man3/tmpfile.3:31
14011 #, no-wrap
14012 msgid "TMPFILE"
14013 msgstr "TMPFILE"
14014
14015 #. type: Plain text
14016 #: build/C/man3/tmpfile.3:34
14017 msgid "tmpfile - create a temporary file"
14018 msgstr "tmpfile - テンポラリファイルを作成する"
14019
14020 #. type: Plain text
14021 #: build/C/man3/tmpfile.3:39
14022 #, no-wrap
14023 msgid "B<FILE *tmpfile(void);>\n"
14024 msgstr "B<FILE *tmpfile(void);>\n"
14025
14026 #. type: Plain text
14027 #: build/C/man3/tmpfile.3:47
14028 msgid ""
14029 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
14030 "write (w+b) mode.  The file will be automatically deleted when it is closed "
14031 "or the program terminates."
14032 msgstr ""
14033 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
14034 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
14035 "自動的に削除される。"
14036
14037 #. type: Plain text
14038 #: build/C/man3/tmpfile.3:56
14039 msgid ""
14040 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
14041 "filename cannot be generated or the unique file cannot be opened.  In the "
14042 "latter case, I<errno> is set to indicate the error."
14043 msgstr ""
14044 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
14045 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
14046 "I<errno> を設定する。"
14047
14048 #. type: Plain text
14049 #: build/C/man3/tmpfile.3:60
14050 msgid "Search permission denied for directory in file's path prefix."
14051 msgstr ""
14052 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
14053
14054 #. type: Plain text
14055 #: build/C/man3/tmpfile.3:63
14056 msgid "Unable to generate a unique filename."
14057 msgstr "ユニークなファイル名が作成できなかった。"
14058
14059 #. type: Plain text
14060 #: build/C/man3/tmpfile.3:66
14061 msgid "The call was interrupted by a signal."
14062 msgstr "呼び出しがシグナルによって中断された。"
14063
14064 #. type: Plain text
14065 #: build/C/man3/tmpfile.3:69
14066 msgid "Too many file descriptors in use by the process."
14067 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
14068
14069 #. type: Plain text
14070 #: build/C/man3/tmpfile.3:72
14071 msgid "Too many files open in the system."
14072 msgstr "システム全体でオープン可能なファイル数を超過した。"
14073
14074 #. type: Plain text
14075 #: build/C/man3/tmpfile.3:75
14076 msgid "There was no room in the directory to add the new filename."
14077 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
14078
14079 #. type: Plain text
14080 #: build/C/man3/tmpfile.3:78
14081 msgid "Read-only file system."
14082 msgstr "読みだし専用ファイルシステムである。"
14083
14084 #. type: Plain text
14085 #: build/C/man3/tmpfile.3:80
14086 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14087 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14088
14089 #. type: Plain text
14090 #: build/C/man3/tmpfile.3:86
14091 msgid ""
14092 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
14093 "stream cannot be opened."
14094 msgstr ""
14095 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
14096 "メッセージが書き出される、と規定されている。"
14097
14098 #. type: Plain text
14099 #: build/C/man3/tmpfile.3:97
14100 msgid ""
14101 "The standard does not specify the directory that B<tmpfile>()  will use.  "
14102 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
14103 "and if that fails the directory I</tmp>."
14104 msgstr ""
14105 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
14106 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
14107 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
14108
14109 #. type: Plain text
14110 #: build/C/man3/tmpfile.3:103
14111 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14112 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14113
14114 #. type: TH
14115 #: build/C/man3/tmpnam.3:27
14116 #, no-wrap
14117 msgid "TMPNAM"
14118 msgstr "TMPNAM"
14119
14120 #. type: Plain text
14121 #: build/C/man3/tmpnam.3:30
14122 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
14123 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
14124
14125 #. type: Plain text
14126 #: build/C/man3/tmpnam.3:35
14127 #, no-wrap
14128 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
14129 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
14130
14131 #. type: Plain text
14132 #: build/C/man3/tmpnam.3:58
14133 msgid ""
14134 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
14135 "filename, and such that a file with this name did not exist at some point in "
14136 "time, so that naive programmers may think it a suitable name for a temporary "
14137 "file.  If the argument I<s> is NULL this name is generated in an internal "
14138 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
14139 "I<s> is not NULL, the name is copied to the character array (of length at "
14140 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
14141 "case of success."
14142 msgstr ""
14143 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
14144 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
14145 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
14146 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
14147 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
14148 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
14149 "ピーされ、 成功した場合は I<s> が返される。"
14150
14151 #. type: Plain text
14152 #: build/C/man3/tmpnam.3:70
14153 msgid ""
14154 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
14155 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
14156 "the B<TMP_MAX> mentioned below.)"
14157 msgstr ""
14158 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
14159 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
14160 "hE<gt>> で定義されている。)"
14161
14162 #. type: Plain text
14163 #: build/C/man3/tmpnam.3:75
14164 msgid ""
14165 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
14166 "or NULL if a unique name cannot be generated."
14167 msgstr ""
14168 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
14169 "が作成できなかった場合は NULL を返す。"
14170
14171 #. type: Plain text
14172 #: build/C/man3/tmpnam.3:77
14173 msgid "No errors are defined."
14174 msgstr "エラーは定義されていない。"
14175
14176 #. type: Plain text
14177 #: build/C/man3/tmpnam.3:83
14178 msgid ""
14179 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
14180 "safe if called with a NULL parameter."
14181 msgstr ""
14182 "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
14183 "れた場合はスレッドセーフではない。"
14184
14185 #. type: Plain text
14186 #: build/C/man3/tmpnam.3:87
14187 msgid "The B<tmpnam_r>()  function is thread-safe."
14188 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
14189
14190 #. type: Plain text
14191 #: build/C/man3/tmpnam.3:92
14192 msgid ""
14193 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
14194 "obsolete."
14195 msgstr ""
14196 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
14197 "定としている。"
14198
14199 #. type: Plain text
14200 #: build/C/man3/tmpnam.3:103
14201 msgid ""
14202 "The B<tmpnam>()  function generates a different string each time it is "
14203 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
14204 "the behavior is implementation defined."
14205 msgstr ""
14206 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
14207 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
14208
14209 #. type: Plain text
14210 #: build/C/man3/tmpnam.3:122
14211 msgid ""
14212 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
14213 "nevertheless possible that between the time that B<tmpnam>()  returns a "
14214 "pathname, and the time that the program opens it, another program might "
14215 "create that pathname using B<open>(2), or create it as a symbolic link.  "
14216 "This can lead to security holes.  To avoid such possibilities, use the "
14217 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
14218 "B<mkstemp>(3)  or B<tmpfile>(3)."
14219 msgstr ""
14220 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
14221 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
14222 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
14223 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
14224 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
14225 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
14226 "B<tmpfile>(3)  を使うことである。"
14227
14228 #. type: Plain text
14229 #: build/C/man3/tmpnam.3:130
14230 msgid ""
14231 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
14232 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
14233 "defined."
14234 msgstr ""
14235 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
14236 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
14237 "NULL 引き数で呼び出してはならない。"
14238
14239 #. type: Plain text
14240 #: build/C/man3/tmpnam.3:134
14241 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
14242 msgstr ""
14243 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
14244 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
14245 "扱いしている。"
14246
14247 #. type: Plain text
14248 #: build/C/man3/tmpnam.3:142
14249 #, no-wrap
14250 msgid ""
14251 "char *\n"
14252 "tmpnam_r(char *s)\n"
14253 "{\n"
14254 "    return s ? tmpnam(s) : NULL;\n"
14255 "}\n"
14256 msgstr ""
14257 "char *\n"
14258 "tmpnam_r(char *s)\n"
14259 "{\n"
14260 "    return s ? tmpnam(s) : NULL;\n"
14261 "}\n"
14262
14263 #. type: Plain text
14264 #: build/C/man3/tmpnam.3:156
14265 msgid ""
14266 "apparently as a warning not to use NULL.  A few systems implement it.  To "
14267 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
14268 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
14269 msgstr ""
14270 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
14271 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
14272 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
14273 "がある。"
14274
14275 #. type: Plain text
14276 #: build/C/man3/tmpnam.3:168
14277 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14278 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14279
14280 #. type: TH
14281 #: build/C/man2/unlink.2:32
14282 #, no-wrap
14283 msgid "UNLINK"
14284 msgstr "UNLINK"
14285
14286 #. type: TH
14287 #: build/C/man2/unlink.2:32
14288 #, no-wrap
14289 msgid "2011-09-15"
14290 msgstr "2011-09-15"
14291
14292 #. type: Plain text
14293 #: build/C/man2/unlink.2:35
14294 msgid "unlink - delete a name and possibly the file it refers to"
14295 msgstr ""
14296 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
14297
14298 #. type: Plain text
14299 #: build/C/man2/unlink.2:39
14300 msgid "B<int unlink(const char *>I<pathname>B<);>"
14301 msgstr "B<int unlink(const char *>I<pathname>B<);>"
14302
14303 #. type: Plain text
14304 #: build/C/man2/unlink.2:45
14305 msgid ""
14306 "B<unlink>()  deletes a name from the file system.  If that name was the last "
14307 "link to a file and no processes have the file open the file is deleted and "
14308 "the space it was using is made available for reuse."
14309 msgstr ""
14310 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
14311 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
14312 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
14313 "は再利用が可能になる。"
14314
14315 #. type: Plain text
14316 #: build/C/man2/unlink.2:49
14317 msgid ""
14318 "If the name was the last link to a file but any processes still have the "
14319 "file open the file will remain in existence until the last file descriptor "
14320 "referring to it is closed."
14321 msgstr ""
14322 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
14323 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
14324 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
14325 "ける。"
14326
14327 #. type: Plain text
14328 #: build/C/man2/unlink.2:51
14329 msgid "If the name referred to a symbolic link the link is removed."
14330 msgstr ""
14331 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
14332 "削除される。"
14333
14334 #. type: Plain text
14335 #: build/C/man2/unlink.2:55
14336 msgid ""
14337 "If the name referred to a socket, fifo or device the name for it is removed "
14338 "but processes which have the object open may continue to use it."
14339 msgstr ""
14340 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
14341 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
14342 "とができる。"
14343
14344 #. type: Plain text
14345 #: build/C/man2/unlink.2:71
14346 msgid ""
14347 "Write access to the directory containing I<pathname> is not allowed for the "
14348 "process's effective UID, or one of the directories in I<pathname> did not "
14349 "allow search permission.  (See also B<path_resolution>(7).)"
14350 msgstr ""
14351 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
14352 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
14353 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
14354 "と)。"
14355
14356 #. type: Plain text
14357 #: build/C/man2/unlink.2:80
14358 msgid ""
14359 "The file I<pathname> cannot be unlinked because it is being used by the "
14360 "system or another process; for example, it is a mount point or the NFS "
14361 "client software created it to represent an active but otherwise nameless "
14362 "inode (\"NFS silly renamed\")."
14363 msgstr ""
14364 "システムか別のプロセスがそのファイルを使用中のため、\n"
14365 "ファイル I<pathname> を unlink できない。\n"
14366 "例えば、そのファイルがマウントポイントの場合や、\n"
14367 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
14368 "名前なし inode (nameless inode) であることを示すために作成した\n"
14369 "場合 (\"NFS silly renamed\") などがある。"
14370
14371 #. type: Plain text
14372 #: build/C/man2/unlink.2:92
14373 msgid ""
14374 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
14375 "Linux since 2.1.132.)"
14376 msgstr ""
14377 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
14378 "で、Linux 2.1.132 以降で返される。)"
14379
14380 #. type: Plain text
14381 #: build/C/man2/unlink.2:96
14382 msgid "Too many symbolic links were encountered in translating I<pathname>."
14383 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
14384
14385 #. type: Plain text
14386 #: build/C/man2/unlink.2:106
14387 msgid ""
14388 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14389 "I<pathname> is empty."
14390 msgstr ""
14391 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
14392 "I<pathname> が空である。"
14393
14394 #. type: Plain text
14395 #: build/C/man2/unlink.2:114
14396 msgid ""
14397 "A component used as a directory in I<pathname> is not, in fact, a directory."
14398 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14399
14400 #. type: Plain text
14401 #: build/C/man2/unlink.2:123
14402 msgid ""
14403 "The system does not allow unlinking of directories, or unlinking of "
14404 "directories requires privileges that the calling process doesn't have.  "
14405 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14406 "B<EISDIR> for this case.)"
14407 msgstr ""
14408 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14409 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14410 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14411 "合には Linux は B<EISDIR> を返す。)"
14412
14413 #. type: TP
14414 #: build/C/man2/unlink.2:123
14415 #, no-wrap
14416 msgid "B<EPERM> (Linux only)"
14417 msgstr "B<EPERM> (Linux のみ)"
14418
14419 #. type: Plain text
14420 #: build/C/man2/unlink.2:126
14421 msgid "The file system does not allow unlinking of files."
14422 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14423
14424 #. type: Plain text
14425 #: build/C/man2/unlink.2:137
14426 msgid ""
14427 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14428 "and the process's effective UID is neither the UID of the file to be deleted "
14429 "nor that of the directory containing it, and the process is not privileged "
14430 "(Linux: does not have the B<CAP_FOWNER> capability)."
14431 msgstr ""
14432 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14433 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14434 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14435 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14436
14437 #. type: Plain text
14438 #: build/C/man2/unlink.2:141
14439 msgid "I<pathname> refers to a file on a read-only file system."
14440 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14441
14442 #. type: Plain text
14443 #: build/C/man2/unlink.2:161
14444 msgid ""
14445 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14446 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14447 "(7), B<symlink>(7)"
14448 msgstr ""
14449 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14450 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14451 "(7), B<symlink>(7)"
14452
14453 #. type: TH
14454 #: build/C/man3/unlocked_stdio.3:25
14455 #, no-wrap
14456 msgid "UNLOCKED_STDIO"
14457 msgstr "UNLOCKED_STDIO"
14458
14459 #. type: TH
14460 #: build/C/man3/unlocked_stdio.3:25
14461 #, no-wrap
14462 msgid "2008-08-29"
14463 msgstr "2008-08-29"
14464
14465 #. type: Plain text
14466 #: build/C/man3/unlocked_stdio.3:29
14467 msgid ""
14468 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14469 "nonlocking stdio functions"
14470 msgstr ""
14471 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14472 "わずに標準入出力を行う関数群"
14473
14474 #. type: Plain text
14475 #: build/C/man3/unlocked_stdio.3:37
14476 #, no-wrap
14477 msgid ""
14478 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14479 "B<int getchar_unlocked(void);>\n"
14480 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14481 "B<int putchar_unlocked(int >I<c>B<);>\n"
14482 msgstr ""
14483 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14484 "B<int getchar_unlocked(void);>\n"
14485 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14486 "B<int putchar_unlocked(int >I<c>B<);>\n"
14487
14488 #. type: Plain text
14489 #: build/C/man3/unlocked_stdio.3:49
14490 #, no-wrap
14491 msgid ""
14492 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14493 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14494 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14495 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14496 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14497 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14498 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14499 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14500 "B<                      FILE *>I<stream>B<);>\n"
14501 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14502 "B<                      FILE *>I<stream>B<);>\n"
14503 msgstr ""
14504 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14505 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14506 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14507 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14508 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14509 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14510 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14511 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14512 "B<                      FILE *>I<stream>B<);>\n"
14513 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14514 "B<                      FILE *>I<stream>B<);>\n"
14515
14516 #. type: Plain text
14517 #: build/C/man3/unlocked_stdio.3:52
14518 #, no-wrap
14519 msgid ""
14520 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14521 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14522 msgstr ""
14523 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14524 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14525
14526 #. type: Plain text
14527 #: build/C/man3/unlocked_stdio.3:63
14528 #, no-wrap
14529 msgid ""
14530 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14531 "B<wint_t getwchar_unlocked(void);>\n"
14532 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14533 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14534 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14535 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14536 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14537 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14538 msgstr ""
14539 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14540 "B<wint_t getwchar_unlocked(void);>\n"
14541 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14542 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14543 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14544 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14545 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14546 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14547
14548 #. type: Plain text
14549 #: build/C/man3/unlocked_stdio.3:75
14550 msgid ""
14551 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14552 "B<putchar_unlocked>():"
14553 msgstr ""
14554 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14555 "B<putchar_unlocked>():"
14556
14557 #. type: Plain text
14558 #: build/C/man3/unlocked_stdio.3:78
14559 msgid ""
14560 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14561 "_BSD_SOURCE || _SVID_SOURCE"
14562 msgstr ""
14563 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14564 "_BSD_SOURCE || _SVID_SOURCE"
14565
14566 #. type: Plain text
14567 #: build/C/man3/unlocked_stdio.3:89
14568 msgid ""
14569 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14570 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14571 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14572 msgstr ""
14573 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14574 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14575 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14576
14577 #. type: Plain text
14578 #: build/C/man3/unlocked_stdio.3:91
14579 msgid "_BSD_SOURCE || _SVID_SOURCE"
14580 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14581
14582 #. type: Plain text
14583 #: build/C/man3/unlocked_stdio.3:102
14584 msgid ""
14585 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14586 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14587 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14588 msgstr ""
14589 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14590 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14591 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14592
14593 #. type: Plain text
14594 #: build/C/man3/unlocked_stdio.3:113
14595 msgid ""
14596 "Each of these functions has the same behavior as its counterpart without the "
14597 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14598 "locks themselves, and do not test for the presence of locks set by others) "
14599 "and hence are thread-unsafe.  See B<flockfile>(3)."
14600 msgstr ""
14601 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14602 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14603 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14604 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14605 "B<flockfile>(3)  を参照のこと。"
14606
14607 #. type: Plain text
14608 #: build/C/man3/unlocked_stdio.3:120
14609 msgid ""
14610 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14611 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14612 msgstr ""
14613 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14614 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14615
14616 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14617 #.  moved to a compatibility library.
14618 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14619 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14620 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14621 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14622 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14623 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14624 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14625 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14626 #.  ungetc_unlocked, ungetwc_unlocked.
14627 #. type: Plain text
14628 #: build/C/man3/unlocked_stdio.3:136
14629 msgid ""
14630 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14631 "are available in recent glibc.  They should probably not be used."
14632 msgstr ""
14633 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14634 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14635
14636 #. type: Plain text
14637 #: build/C/man3/unlocked_stdio.3:139
14638 msgid "B<flockfile>(3), B<stdio>(3)"
14639 msgstr "B<flockfile>(3), B<stdio>(3)"
14640
14641 #. type: TH
14642 #: build/C/man3/wprintf.3:16
14643 #, no-wrap
14644 msgid "WPRINTF"
14645 msgstr "WPRINTF"
14646
14647 #. type: TH
14648 #: build/C/man3/wprintf.3:16
14649 #, no-wrap
14650 msgid "2011-09-17"
14651 msgstr "2011-09-17"
14652
14653 #. type: Plain text
14654 #: build/C/man3/wprintf.3:20
14655 msgid ""
14656 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14657 "character output conversion"
14658 msgstr ""
14659 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14660 "フォーマットして出力する"
14661
14662 #. type: Plain text
14663 #: build/C/man3/wprintf.3:24
14664 #, no-wrap
14665 msgid ""
14666 "B<#include E<lt>stdio.hE<gt>>\n"
14667 "B<#include E<lt>wchar.hE<gt>>\n"
14668 msgstr ""
14669 "B<#include E<lt>stdio.hE<gt>>\n"
14670 "B<#include E<lt>wchar.hE<gt>>\n"
14671
14672 #. type: Plain text
14673 #: build/C/man3/wprintf.3:29
14674 #, no-wrap
14675 msgid ""
14676 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14677 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14678 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14679 "B<             const wchar_t *>I<format>B<, ...);>\n"
14680 msgstr ""
14681 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14682 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14683 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14684 "B<             const wchar_t *>I<format>B<, ...);>\n"
14685
14686 #. type: Plain text
14687 #: build/C/man3/wprintf.3:34
14688 #, no-wrap
14689 msgid ""
14690 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14691 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14692 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14693 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14694 msgstr ""
14695 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14696 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14697 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14698 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14699
14700 #.  .BR wprintf (),
14701 #.  .BR fwprintf (),
14702 #.  .BR swprintf (),
14703 #.  .BR vwprintf (),
14704 #.  .BR vfwprintf (),
14705 #.  .BR vswprintf ():
14706 #. type: Plain text
14707 #: build/C/man3/wprintf.3:51
14708 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14709 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14710
14711 #. type: Plain text
14712 #: build/C/man3/wprintf.3:53
14713 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14714 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14715
14716 #. type: Plain text
14717 #: build/C/man3/wprintf.3:55
14718 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14719 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14720
14721 #. type: Plain text
14722 #: build/C/man3/wprintf.3:58
14723 msgid "or I<cc\\ -std=c99>"
14724 msgstr "or I<cc\\ -std=c99>"
14725
14726 #. type: Plain text
14727 #: build/C/man3/wprintf.3:69
14728 msgid ""
14729 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14730 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14731 "characters."
14732 msgstr ""
14733 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14734 "版である。これらはワイド文字をフォーマットして出力する。"
14735
14736 #. type: Plain text
14737 #: build/C/man3/wprintf.3:81
14738 msgid ""
14739 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14740 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14741 "more information."
14742 msgstr ""
14743 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14744 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14745 "ること。"
14746
14747 #. type: Plain text
14748 #: build/C/man3/wprintf.3:93
14749 msgid ""
14750 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14751 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14752 "for more information."
14753 msgstr ""
14754 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14755 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14756 "B<fwide>(3)  を参照すること。"
14757
14758 #. type: Plain text
14759 #: build/C/man3/wprintf.3:107
14760 msgid ""
14761 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14762 "output to an array of wide characters.  The programmer must ensure that "
14763 "there is room for at least I<maxlen> wide characters at I<wcs>."
14764 msgstr ""
14765 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14766 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14767 "空きがあることを保証しなければ ならない。"
14768
14769 #. type: Plain text
14770 #: build/C/man3/wprintf.3:118
14771 msgid ""
14772 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14773 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14774 "following differences:"
14775 msgstr ""
14776 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14777 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14778
14779 #. type: TP
14780 #: build/C/man3/wprintf.3:118 build/C/man3/wprintf.3:123
14781 #: build/C/man3/wprintf.3:126
14782 #, no-wrap
14783 msgid "B<\\(bu>"
14784 msgstr "B<\\(bu>"
14785
14786 #. type: Plain text
14787 #: build/C/man3/wprintf.3:123
14788 msgid "The I<format> string is a wide-character string."
14789 msgstr "I<format> がワイド文字列で与えられる。"
14790
14791 #. type: Plain text
14792 #: build/C/man3/wprintf.3:126
14793 msgid "The output consists of wide characters, not bytes."
14794 msgstr "出力がバイトではなくワイド文字で構成される。"
14795
14796 #. type: Plain text
14797 #: build/C/man3/wprintf.3:145
14798 msgid ""
14799 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14800 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14801 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14802 "overflow on Linux.)"
14803 msgstr ""
14804 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14805 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14806 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14807 "も -1 を返さない)。"
14808
14809 #. type: Plain text
14810 #: build/C/man3/wprintf.3:151
14811 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14812 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14813
14814 #. type: Plain text
14815 #: build/C/man3/wprintf.3:165
14816 msgid ""
14817 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14818 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14819 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14820 "character) argument is written."
14821 msgstr ""
14822 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14823 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14824 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14825
14826 #. type: Plain text
14827 #: build/C/man3/wprintf.3:205
14828 msgid ""
14829 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14830 "to be a pointer to an array of character type (pointer to a string) "
14831 "containing a multibyte character sequence beginning in the initial shift "
14832 "state.  Characters from the array are converted to wide characters (each by "
14833 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14834 "the initial state before the first byte).  The resulting wide characters are "
14835 "written up to (but not including) the terminating null wide character (L\\(aq"
14836 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
14837 "number specified are written.  Note that the precision determines the number "
14838 "of I<wide characters> written, not the number of I<bytes> or I<screen "
14839 "positions>.  The array must contain a terminating null byte (\\(aq"
14840 "\\e0\\(aq), unless a precision is given and it is so small that the number "
14841 "of converted wide characters reaches it before the end of the array is "
14842 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
14843 "argument is expected to be a pointer to an array of wide characters.  Wide "
14844 "characters from the array are written up to (but not including) a "
14845 "terminating null wide character.  If a precision is specified, no more than "
14846 "the number specified are written.  The array must contain a terminating null "
14847 "wide character, unless a precision is given and it is smaller than or equal "
14848 "to the number of wide characters in the array."
14849 msgstr ""
14850 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14851 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14852 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14853 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14854 "字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度"
14855 "(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれな"
14856 "い。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字"
14857 "> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
14858 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
14859 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
14860 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
14861 "引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端の"
14862 "ナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精"
14863 "度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含"
14864 "む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さ"
14865 "くな ければならない。"
14866
14867 #. type: Plain text
14868 #: build/C/man3/wprintf.3:213
14869 msgid ""
14870 "The functions return the number of wide characters written, excluding the "
14871 "terminating null wide character in case of the functions B<swprintf>()  and "
14872 "B<vswprintf>().  They return -1 when an error occurs."
14873 msgstr ""
14874 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14875 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14876 "場合は -1 を返す。"
14877
14878 #. type: Plain text
14879 #: build/C/man3/wprintf.3:215
14880 msgid "C99."
14881 msgstr "C99."
14882
14883 #. type: Plain text
14884 #: build/C/man3/wprintf.3:223
14885 msgid ""
14886 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14887 "the current locale."
14888 msgstr ""
14889 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14890
14891 #. type: Plain text
14892 #: build/C/man3/wprintf.3:253
14893 msgid ""
14894 "If the I<format> string contains non-ASCII wide characters, the program will "
14895 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
14896 "time is the same as the B<LC_CTYPE> category of the current locale at "
14897 "compile time.  This is because the I<wchar_t> representation is platform- "
14898 "and locale-dependent.  (The glibc represents wide characters using their "
14899 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14900 "the use of C99 universal character names of the form \\eunnnn does not solve "
14901 "this problem.)  Therefore, in internationalized programs, the I<format> "
14902 "string should consist of ASCII wide characters only, or should be "
14903 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14904 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14905 msgstr ""
14906 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14907 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14908 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14909 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14910 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14911 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14912 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14913 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14914 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14915
14916 #.  .BR wscanf (3)
14917 #. type: Plain text
14918 #: build/C/man3/wprintf.3:260
14919 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14920 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14921
14922 #. type: TH
14923 #: build/C/man2/write.2:39
14924 #, no-wrap
14925 msgid "WRITE"
14926 msgstr "WRITE"
14927
14928 #. type: Plain text
14929 #: build/C/man2/write.2:42
14930 msgid "write - write to a file descriptor"
14931 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14932
14933 #. type: Plain text
14934 #: build/C/man2/write.2:46
14935 msgid ""
14936 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14937 msgstr ""
14938 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14939
14940 #. type: Plain text
14941 #: build/C/man2/write.2:54
14942 msgid ""
14943 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14944 "the file referred to by the file descriptor I<fd>."
14945 msgstr ""
14946 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14947 "照するファイルへ、最大 I<count> バイトを書き込む。"
14948
14949 #. type: Plain text
14950 #: build/C/man2/write.2:68
14951 msgid ""
14952 "The number of bytes written may be less than I<count> if, for example, there "
14953 "is insufficient space on the underlying physical medium, or the "
14954 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14955 "call was interrupted by a signal handler after having written less than "
14956 "I<count> bytes.  (See also B<pipe>(7).)"
14957 msgstr ""
14958 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14959 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14960 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14961 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14962 "(7)  も参照のこと。)"
14963
14964 #. type: Plain text
14965 #: build/C/man2/write.2:82
14966 msgid ""
14967 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14968 "example, a regular file)  writing takes place at the current file offset, "
14969 "and the file offset is incremented by the number of bytes actually written.  "
14970 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14971 "to the end of the file before writing.  The adjustment of the file offset "
14972 "and the write operation are performed as an atomic step."
14973 msgstr ""
14974 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14975 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14976 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14977 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14978 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14979 "処理として 実行される。"
14980
14981 #. type: Plain text
14982 #: build/C/man2/write.2:89
14983 msgid ""
14984 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14985 "B<write>()  has returned returns the new data.  Note that not all file "
14986 "systems are POSIX conforming."
14987 msgstr ""
14988 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14989 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14990 "ること。"
14991
14992 #. type: Plain text
14993 #: build/C/man2/write.2:94
14994 msgid ""
14995 "On success, the number of bytes written is returned (zero indicates nothing "
14996 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14997 msgstr ""
14998 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14999 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
15000
15001 #. type: Plain text
15002 #: build/C/man2/write.2:107
15003 msgid ""
15004 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
15005 "return a failure status if one of the errors below is detected.  If no "
15006 "errors are detected, 0 will be returned without causing any other effect.  "
15007 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
15008 "the results are not specified."
15009 msgstr ""
15010 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
15011 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
15012 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
15013 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
15014 "その結果は規定されていない。"
15015
15016 #. type: Plain text
15017 #: build/C/man2/write.2:115
15018 msgid ""
15019 "The file descriptor I<fd> refers to a file other than a socket and has been "
15020 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
15021 msgstr ""
15022 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
15023 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
15024 "する状況にある。"
15025
15026 #.  Actually EAGAIN on Linux
15027 #. type: Plain text
15028 #: build/C/man2/write.2:126
15029 msgid ""
15030 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
15031 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
15032 "error to be returned for this case, and does not require these constants to "
15033 "have the same value, so a portable application should check for both "
15034 "possibilities."
15035 msgstr ""
15036 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
15037 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
15038 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
15039 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
15040 "プリケーションでは、両方の可能性を 確認すべきである。"
15041
15042 #. type: Plain text
15043 #: build/C/man2/write.2:130
15044 msgid "I<fd> is not a valid file descriptor or is not open for writing."
15045 msgstr ""
15046 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
15047 "されていない。"
15048
15049 #. type: TP
15050 #: build/C/man2/write.2:130
15051 #, no-wrap
15052 msgid "B<EDESTADDRREQ>"
15053 msgstr "B<EDESTADDRREQ>"
15054
15055 #. type: Plain text
15056 #: build/C/man2/write.2:135
15057 msgid ""
15058 "I<fd> refers to a datagram socket for which a peer address has not been set "
15059 "using B<connect>(2)."
15060 msgstr ""
15061 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
15062 "グラムソケットを 参照している。"
15063
15064 #. type: Plain text
15065 #: build/C/man2/write.2:141
15066 msgid ""
15067 "The user's quota of disk blocks on the file system containing the file "
15068 "referred to by I<fd> has been exhausted."
15069 msgstr ""
15070 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
15071 "クォータの上限に達している。"
15072
15073 #. type: Plain text
15074 #: build/C/man2/write.2:150
15075 msgid ""
15076 "An attempt was made to write a file that exceeds the implementation-defined "
15077 "maximum file size or the process's file size limit, or to write at a "
15078 "position past the maximum allowed offset."
15079 msgstr ""
15080 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
15081 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
15082 "書き込もうとした。"
15083
15084 #. type: Plain text
15085 #: build/C/man2/write.2:154
15086 msgid ""
15087 "The call was interrupted by a signal before any data was written; see "
15088 "B<signal>(7)."
15089 msgstr ""
15090 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
15091 "(7)  参照。"
15092
15093 #. type: Plain text
15094 #: build/C/man2/write.2:165
15095 msgid ""
15096 "I<fd> is attached to an object which is unsuitable for writing; or the file "
15097 "was opened with the B<O_DIRECT> flag, and either the address specified in "
15098 "I<buf>, the value specified in I<count>, or the current file offset is not "
15099 "suitably aligned."
15100 msgstr ""
15101 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
15102 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
15103 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
15104 "メントが不適切である。"
15105
15106 #. type: Plain text
15107 #: build/C/man2/write.2:168
15108 msgid "A low-level I/O error occurred while modifying the inode."
15109 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
15110
15111 #. type: Plain text
15112 #: build/C/man2/write.2:173
15113 msgid ""
15114 "The device containing the file referred to by I<fd> has no room for the data."
15115 msgstr ""
15116 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
15117
15118 #. type: TP
15119 #: build/C/man2/write.2:173
15120 #, no-wrap
15121 msgid "B<EPIPE>"
15122 msgstr "B<EPIPE>"
15123
15124 #. type: Plain text
15125 #: build/C/man2/write.2:182
15126 msgid ""
15127 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
15128 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
15129 "(Thus, the write return value is seen only if the program catches, blocks or "
15130 "ignores this signal.)"
15131 msgstr ""
15132 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
15133 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
15134 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
15135 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
15136 "write の返り値を参照できる。)"
15137
15138 #. type: Plain text
15139 #: build/C/man2/write.2:185
15140 msgid "Other errors may occur, depending on the object connected to I<fd>."
15141 msgstr ""
15142 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
15143
15144 #. type: Plain text
15145 #: build/C/man2/write.2:194
15146 msgid ""
15147 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
15148 "just before any data is written."
15149 msgstr ""
15150 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
15151 "で B<EINTR> が返る。"
15152
15153 #. type: Plain text
15154 #: build/C/man2/write.2:203
15155 msgid ""
15156 "A successful return from B<write>()  does not make any guarantee that data "
15157 "has been committed to disk.  In fact, on some buggy implementations, it does "
15158 "not even guarantee that space has successfully been reserved for the data.  "
15159 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
15160 "all your data."
15161 msgstr ""
15162 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
15163 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
15164 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
15165 "write した後に B<fsync>(2)  を呼び出すことである。"
15166
15167 #. type: Plain text
15168 #: build/C/man2/write.2:211
15169 msgid ""
15170 "If a B<write>()  is interrupted by a signal handler before any bytes are "
15171 "written, then the call fails with the error B<EINTR>; if it is interrupted "
15172 "after at least one byte has been written, the call succeeds, and returns the "
15173 "number of bytes written."
15174 msgstr ""
15175 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
15176 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
15177 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
15178
15179 #. type: Plain text
15180 #: build/C/man2/write.2:223
15181 msgid ""
15182 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15183 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15184 msgstr ""
15185 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15186 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15187
15188 #~ msgid "2009-09-06"
15189 #~ msgstr "2009-09-06"
15190
15191 #~ msgid "2011-09-20"
15192 #~ msgstr "2011-09-20"
15193
15194 #~ msgid ""
15195 #~ "Many file systems and disks were considered to be fast enough that the "
15196 #~ "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, "
15197 #~ "B<O_NONBLOCK> may not be available on files and/or disks."
15198 #~ msgstr ""
15199 #~ "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むく"
15200 #~ "らいに十分に高速であると考えられている。 それでそのようなファイルやディス"
15201 #~ "クには B<O_NONBLOCK> は利用できないかもしれない。"
15202
15203 #~ msgid ""
15204 #~ "The I<local_iov> and I<remote_iov> arguments point to an array of "
15205 #~ "I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
15206 #~ msgstr ""
15207 #~ "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
15208 #~ "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
15209 #~ "されている:"
15210
15211 #~ msgid ""
15212 #~ "Buffers are processed in array order.  This means that B<process_vm_readv>"
15213 #~ "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]"
15214 #~ ">, and so on.  Likewise, I<remote_iov[0]> is completely read before "
15215 #~ "proceeding to I<remote_iov[1]>, and so on."
15216 #~ msgstr ""
15217 #~ "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
15218 #~ "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
15219 #~ "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
15220 #~ "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
15221 #~ "以降も同様である。"