OSDN Git Service

(split) LDP: editorial changes in LDP v3.54
[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-09-28 04:06+0900\n"
10 "PO-Revision-Date: 2013-10-02 00:19+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/asprintf.3:27
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25
26 #: build/C/man3/ferror.3:44 build/C/man3/fmtmsg.3:13
27 #: build/C/man3/stdio_ext.3:25 build/C/man3/tmpnam.3:27
28 #, no-wrap
29 msgid "2013-06-21"
30 msgstr "2013-06-21"
31
32 #. type: TH
33 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
34 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
35 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
36 #: build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44
37 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
38 #: build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25
39 #: build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26
40 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:52 build/C/man3/wprintf.3:16
41 #, no-wrap
42 msgid "GNU"
43 msgstr "GNU"
44
45 #. type: TH
46 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
47 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
48 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
49 #: build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18
50 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
51 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
52 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
53 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
54 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:27
55 #: build/C/man3/getw.3:25 build/C/man2/link.2:31 build/C/man2/llseek.2:28
56 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2: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:568 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:727 build/C/man3/perror.3:111
242 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:172 build/C/man3/printf.3:807
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:164
278 #: build/C/man2/open.2:1000 build/C/man3/perror.3:139 build/C/man2/pipe.2:190
279 #: build/C/man3/popen.3:201 build/C/man3/printf.3:1081 build/C/man3/puts.3:112
280 #: build/C/man2/read.2:187 build/C/man2/readlink.2:214
281 #: build/C/man2/readv.2:284 build/C/man3/remove.3:81 build/C/man2/rename.2:245
282 #: build/C/man2/rmdir.2:132 build/C/man3/scanf.3:715 build/C/man3/setbuf.3:200
283 #: build/C/man3/stdin.3:154 build/C/man3/stdio.3:250
284 #: build/C/man3/stdio_ext.3:151 build/C/man2/symlink.2:164
285 #: build/C/man7/symlink.7:471 build/C/man3/tempnam.3:168
286 #: build/C/man3/tmpfile.3:97 build/C/man3/tmpnam.3:163
287 #: build/C/man2/unlink.2:148 build/C/man3/unlocked_stdio.3:136
288 #: build/C/man3/wprintf.3:253 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:167
310 #: build/C/man2/open.2:1022 build/C/man3/perror.3:144 build/C/man2/pipe.2:197
311 #: build/C/man3/popen.3:211 build/C/man3/printf.3:1090 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:174 build/C/man2/open.2:1029
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:1097 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.54 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.54 の一部\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/lseek64.3:159 build/C/man3/stdio_ext.3:132
439 #: build/C/man3/tmpnam.3:77
440 #, no-wrap
441 msgid "ATTRIBUTES"
442 msgstr "属性"
443
444 #. type: SS
445 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
446 #: build/C/man3/ferror.3:107 build/C/man3/fflush.3:94
447 #: build/C/man3/flockfile.3:128 build/C/man3/fmtmsg.3:226
448 #: build/C/man3/lseek64.3:160 build/C/man3/stdio_ext.3:133
449 #: build/C/man3/tmpnam.3:78
450 #, no-wrap
451 msgid "Multithreading (see pthreads(7))"
452 msgstr "マルチスレッディング (pthreads(7) 参照)"
453
454 #. type: Plain text
455 #: build/C/man3/ctermid.3:67
456 msgid ""
457 "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-"
458 "safe if called with a NULL parameter."
459 msgstr ""
460 "B<ctermid>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
461 "れた場合はスレッドセーフではない。"
462
463 #. type: Plain text
464 #: build/C/man3/ctermid.3:69
465 msgid "Svr4, POSIX.1-2001."
466 msgstr "SVr4, POSIX.1-2001."
467
468 #. type: SH
469 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213
470 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82
471 #: build/C/man2/link.2:181 build/C/man2/open.2:989 build/C/man3/popen.3:178
472 #: build/C/man3/printf.3:930 build/C/man3/puts.3:105 build/C/man2/readv.2:258
473 #: build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129
474 #: build/C/man3/scanf.3:646 build/C/man3/setbuf.3:170
475 #: build/C/man3/tempnam.3:158 build/C/man3/tmpnam.3:156
476 #: build/C/man2/unlink.2:145
477 #, no-wrap
478 msgid "BUGS"
479 msgstr "バグ"
480
481 #. type: Plain text
482 #: build/C/man3/ctermid.3:73
483 msgid ""
484 "The path returned may not uniquely identify the controlling terminal; it "
485 "may, for example, be I</dev/tty>."
486 msgstr ""
487 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
488 "ように。"
489
490 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
491 #.  if ctermid() was given an argument; fixed in 2.4.
492 #. type: Plain text
493 #: build/C/man3/ctermid.3:77
494 msgid "It is not assured that the program can open the terminal."
495 msgstr "プログラムが端末をオープンできることは保証されていない。"
496
497 #. type: Plain text
498 #: build/C/man3/ctermid.3:79
499 msgid "B<ttyname>(3)"
500 msgstr "B<ttyname>(3)"
501
502 #. type: TH
503 #: build/C/man3/dprintf.3:26
504 #, no-wrap
505 msgid "DPRINTF"
506 msgstr "DPRINTF"
507
508 #. type: TH
509 #: build/C/man3/dprintf.3:26
510 #, no-wrap
511 msgid "2010-09-15"
512 msgstr "2010-09-15"
513
514 #. type: Plain text
515 #: build/C/man3/dprintf.3:29
516 msgid "dprintf, vdprintf - print to a file descriptor"
517 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
518
519 #. type: Plain text
520 #: build/C/man3/dprintf.3:33
521 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
522 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
523
524 #. type: Plain text
525 #: build/C/man3/dprintf.3:35
526 msgid ""
527 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
528 msgstr ""
529 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
530
531 #. type: Plain text
532 #: build/C/man3/dprintf.3:43
533 msgid "B<dprintf>(), B<vdprintf>():"
534 msgstr "B<dprintf>(), B<vdprintf>():"
535
536 #. type: TP
537 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
538 #: build/C/man3/getline.3:49
539 #, no-wrap
540 msgid "Since glibc 2.10:"
541 msgstr "glibc 2.10 以降:"
542
543 #. type: Plain text
544 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
545 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
546 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
547
548 #. type: TP
549 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
550 #: build/C/man3/getline.3:52
551 #, no-wrap
552 msgid "Before glibc 2.10:"
553 msgstr "glibc 2.10 より前:"
554
555 #. type: Plain text
556 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
557 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
558 msgid "_GNU_SOURCE"
559 msgstr "_GNU_SOURCE"
560
561 #. type: Plain text
562 #: build/C/man3/dprintf.3:69
563 msgid ""
564 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
565 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
566 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
567 msgstr ""
568 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
569 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
570 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
571 "行う。"
572
573 #.  .SH NOTES
574 #.  These functions are GNU extensions, not in C or POSIX.
575 #.  Clearly, the names were badly chosen.
576 #.  Many systems (like MacOS) have incompatible functions called
577 #.  .BR dprintf (),
578 #.  usually some debugging version of
579 #.  .BR printf (3),
580 #.  perhaps with a prototype like
581 #.  .BI "void dprintf(int level, const char *" format ", ...);"
582 #.  where the first argument is a debugging level (and output is to
583 #.  .IR stderr ).
584 #.  Moreover,
585 #.  .BR dprintf ()
586 #.  (or
587 #.  .BR DPRINTF )
588 #.  is also a popular macro name for a debugging printf.
589 #.  So, probably, it is better to avoid this function in programs
590 #.  intended to be portable.
591 #.  A better name would have been
592 #.  .BR fdprintf ().
593 #. type: Plain text
594 #: build/C/man3/dprintf.3:95
595 msgid ""
596 "These functions are GNU extensions that are nowadays specified in "
597 "POSIX.1-2008."
598 msgstr ""
599 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
600 "る。"
601
602 #. type: Plain text
603 #: build/C/man3/dprintf.3:97
604 msgid "B<printf>(3)"
605 msgstr "B<printf>(3)"
606
607 #. type: TH
608 #: build/C/man3/fclose.3:44
609 #, no-wrap
610 msgid "FCLOSE"
611 msgstr "FCLOSE"
612
613 #. type: TH
614 #: build/C/man3/fclose.3:44
615 #, no-wrap
616 msgid "2009-02-23"
617 msgstr "2009-02-23"
618
619 #. type: Plain text
620 #: build/C/man3/fclose.3:47
621 msgid "fclose - close a stream"
622 msgstr "fclose - ストリームを閉じる"
623
624 #. type: Plain text
625 #: build/C/man3/fclose.3:51
626 msgid "B<int fclose(FILE *>I<fp>B<);>"
627 msgstr "B<int fclose(FILE *>I<fp>B<);>"
628
629 #. type: Plain text
630 #: build/C/man3/fclose.3:59
631 msgid ""
632 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
633 "any buffered output data using B<fflush>(3))  and closes the underlying file "
634 "descriptor."
635 msgstr ""
636 "B<fclose>() 関数は、 I<fp> が指すストリームを (バッファリングされて\n"
637 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
638 "対応するファイルディスクリプタをクローズする。"
639
640 #. type: Plain text
641 #: build/C/man3/fclose.3:70
642 msgid ""
643 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
644 "I<errno> is set to indicate the error.  In either case any further access "
645 "(including another call to B<fclose>())  to the stream results in undefined "
646 "behavior."
647 msgstr ""
648 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
649 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
650 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
651 "は 未定義の動作を生じさせる。"
652
653 #. type: SH
654 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
655 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
656 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
657 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:84
658 #: build/C/man3/getline.3:125 build/C/man2/link.2:57 build/C/man2/llseek.2:69
659 #: build/C/man2/lseek.2:170 build/C/man2/open.2:576 build/C/man2/pipe.2:97
660 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:85
661 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96
662 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:89
663 #: build/C/man3/tempnam.3:94 build/C/man3/tmpfile.3:56
664 #: build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
665 #, no-wrap
666 msgid "ERRORS"
667 msgstr "エラー"
668
669 #. type: TP
670 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
671 #: build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:171
672 #: build/C/man2/read.2:114 build/C/man3/scanf.3:553 build/C/man2/write.2:126
673 #, no-wrap
674 msgid "B<EBADF>"
675 msgstr "B<EBADF>"
676
677 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
678 #.   low-level file operations on the same stream. If you do get this error,
679 #.   you must have closed the stream's low-level file descriptor using
680 #.   something like close(fileno(fp)).
681 #. type: Plain text
682 #: build/C/man3/fclose.3:80
683 msgid "The file descriptor underlying I<fp> is not valid."
684 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
685
686 #. type: Plain text
687 #: build/C/man3/fclose.3:90
688 msgid ""
689 "The B<fclose>()  function may also fail and set I<errno> for any of the "
690 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
691 msgstr ""
692 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
693 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
694 "された値に設定される。"
695
696 #. type: Plain text
697 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
698 msgid "C89, C99."
699 msgstr "C89, C99."
700
701 #. type: SH
702 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
703 #: build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252
704 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
705 #: build/C/man3/fseeko.3:89 build/C/man2/link.2:143 build/C/man2/llseek.2:84
706 #: build/C/man2/lseek.2:210 build/C/man2/open.2:754 build/C/man3/perror.3:124
707 #: build/C/man3/printf.3:868 build/C/man2/read.2:175
708 #: build/C/man2/readlink.2:130 build/C/man2/readv.2:226
709 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
710 #: build/C/man2/symlink.2:155 build/C/man3/tempnam.3:103
711 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:92
712 #: build/C/man3/wprintf.3:215 build/C/man2/write.2:194
713 #, no-wrap
714 msgid "NOTES"
715 msgstr "注意"
716
717 #. type: Plain text
718 #: build/C/man3/fclose.3:102
719 msgid ""
720 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
721 "library.  To ensure that the data is physically stored on disk the kernel "
722 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
723 msgstr ""
724 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
725 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
726 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
727 "ればならない。"
728
729 #. type: Plain text
730 #: build/C/man3/fclose.3:108
731 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
732 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
733
734 #. type: TH
735 #: build/C/man3/fcloseall.3:25
736 #, no-wrap
737 msgid "FCLOSEALL"
738 msgstr "FCLOSEALL"
739
740 #. type: Plain text
741 #: build/C/man3/fcloseall.3:28
742 msgid "fcloseall - close all open streams"
743 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
744
745 #. type: Plain text
746 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
747 #, no-wrap
748 msgid ""
749 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
750 "B<#include E<lt>stdio.hE<gt>>\n"
751 msgstr ""
752 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
753 "B<#include E<lt>stdio.hE<gt>>\n"
754
755 #. type: Plain text
756 #: build/C/man3/fcloseall.3:34
757 #, no-wrap
758 msgid "B<int fcloseall(void);>\n"
759 msgstr "B<int fcloseall(void);>\n"
760
761 #. type: Plain text
762 #: build/C/man3/fcloseall.3:43
763 msgid ""
764 "The B<fcloseall>()  function closes all of the calling process's open "
765 "streams.  Buffered output for each stream is written before it is closed (as "
766 "for B<fflush>(3)); buffered input is discarded."
767 msgstr ""
768 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
769 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
770 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
771 "れる。"
772
773 #. type: Plain text
774 #: build/C/man3/fcloseall.3:50
775 msgid ""
776 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
777 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
778
779 #. type: Plain text
780 #: build/C/man3/fcloseall.3:55
781 msgid ""
782 "This function returns 0 if all files were successfully closed; on error, "
783 "B<EOF> is returned."
784 msgstr ""
785 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
786 "B<EOF> を返す。"
787
788 #. type: Plain text
789 #: build/C/man3/fcloseall.3:60
790 msgid ""
791 "The B<fcloseall>()  function does not lock the streams, so it is not thread-"
792 "safe."
793 msgstr ""
794 "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフで"
795 "はない。"
796
797 #. type: Plain text
798 #: build/C/man3/fcloseall.3:62
799 msgid "This function is a GNU extension."
800 msgstr "この関数は GNU 拡張である。"
801
802 #. type: Plain text
803 #: build/C/man3/fcloseall.3:68
804 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
805 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
806
807 #. type: TH
808 #: build/C/man3/ferror.3:44
809 #, no-wrap
810 msgid "FERROR"
811 msgstr "FERROR"
812
813 #. type: Plain text
814 #: build/C/man3/ferror.3:47
815 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
816 msgstr ""
817 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
818
819 #. type: Plain text
820 #: build/C/man3/ferror.3:51
821 msgid "B<void clearerr(FILE *>I<stream>B<);>"
822 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
823
824 #. type: Plain text
825 #: build/C/man3/ferror.3:53
826 msgid "B<int feof(FILE *>I<stream>B<);>"
827 msgstr "B<int feof(FILE *>I<stream>B<);>"
828
829 #. type: Plain text
830 #: build/C/man3/ferror.3:55
831 msgid "B<int ferror(FILE *>I<stream>B<);>"
832 msgstr "B<int ferror(FILE *>I<stream>B<);>"
833
834 #. type: Plain text
835 #: build/C/man3/ferror.3:57
836 msgid "B<int fileno(FILE *>I<stream>B<);>"
837 msgstr "B<int fileno(FILE *>I<stream>B<);>"
838
839 #. type: Plain text
840 #: build/C/man3/ferror.3:65
841 msgid ""
842 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
843 msgstr ""
844 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
845
846 #. type: Plain text
847 #: build/C/man3/ferror.3:70
848 msgid ""
849 "The function B<clearerr>()  clears the end-of-file and error indicators for "
850 "the stream pointed to by I<stream>."
851 msgstr ""
852 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
853 "子とエラー指示子をクリアする。"
854
855 #. type: Plain text
856 #: build/C/man3/ferror.3:78
857 msgid ""
858 "The function B<feof>()  tests the end-of-file indicator for the stream "
859 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
860 "indicator can be cleared only by the function B<clearerr>()."
861 msgstr ""
862 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
863 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
864 "よってのみクリアすることができる。"
865
866 #. type: Plain text
867 #: build/C/man3/ferror.3:87
868 msgid ""
869 "The function B<ferror>()  tests the error indicator for the stream pointed "
870 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
871 "reset only by the B<clearerr>()  function."
872 msgstr ""
873 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
874 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
875 "()  によってのみリセットすることができる。"
876
877 #. type: Plain text
878 #: build/C/man3/ferror.3:93
879 msgid ""
880 "The function B<fileno>()  examines the argument I<stream> and returns its "
881 "integer descriptor."
882 msgstr ""
883 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
884
885 #. type: Plain text
886 #: build/C/man3/ferror.3:96 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54
887 #: build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
888 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
889 msgstr ""
890 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
891
892 #. type: Plain text
893 #: build/C/man3/ferror.3:106
894 msgid ""
895 "These functions should not fail and do not set the external variable "
896 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
897 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
898 msgstr ""
899 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
900 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
901 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
902
903 #. type: Plain text
904 #: build/C/man3/ferror.3:115
905 msgid ""
906 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
907 "thread-safe."
908 msgstr ""
909 "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフであ"
910 "る。"
911
912 #. type: Plain text
913 #: build/C/man3/ferror.3:122
914 msgid ""
915 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
916 "C99."
917 msgstr ""
918 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
919
920 #. type: Plain text
921 #: build/C/man3/ferror.3:127
922 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
923 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
924
925 #. type: TH
926 #: build/C/man3/fflush.3:45
927 #, no-wrap
928 msgid "FFLUSH"
929 msgstr "FFLUSH"
930
931 #. type: TH
932 #: build/C/man3/fflush.3:45
933 #, no-wrap
934 msgid "2013-07-15"
935 msgstr "2013-07-15"
936
937 #. type: Plain text
938 #: build/C/man3/fflush.3:48
939 msgid "fflush - flush a stream"
940 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
941
942 #. type: Plain text
943 #: build/C/man3/fflush.3:52
944 msgid "B<int fflush(FILE *>I<stream>B<);>"
945 msgstr "B<int fflush(FILE *>I<stream>B<);>"
946
947 #. type: Plain text
948 #: build/C/man3/fflush.3:63
949 msgid ""
950 "For output streams, B<fflush>()  forces a write of all user-space buffered "
951 "data for the given output or update I<stream> via the stream's underlying "
952 "write function.  For input streams, B<fflush>()  discards any buffered data "
953 "that has been fetched from the underlying file, but has not been consumed by "
954 "the application.  The open status of the stream is unaffected."
955 msgstr ""
956 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
957 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
958 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
959 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
960 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
961 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
962 "い。"
963
964 #. type: Plain text
965 #: build/C/man3/fflush.3:71
966 msgid ""
967 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
968 "streams."
969 msgstr ""
970 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
971 "トリームをフラッシュする。"
972
973 #. type: Plain text
974 #: build/C/man3/fflush.3:74
975 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
976 msgstr ""
977 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
978 "と。"
979
980 #. type: Plain text
981 #: build/C/man3/fflush.3:81
982 msgid ""
983 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
984 "I<errno> is set to indicate the error."
985 msgstr ""
986 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
987 "ラーに対応した値に設定される。"
988
989 #. type: Plain text
990 #: build/C/man3/fflush.3:86
991 msgid "I<Stream> is not an open stream, or is not open for writing."
992 msgstr ""
993 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
994 "ない。"
995
996 #. type: Plain text
997 #: build/C/man3/fflush.3:93
998 msgid ""
999 "The function B<fflush>()  may also fail and set I<errno> for any of the "
1000 "errors specified for B<write>(2)."
1001 msgstr ""
1002 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
1003 "ある。 この場合 I<errno> もその値に設定される。"
1004
1005 #. type: Plain text
1006 #: build/C/man3/fflush.3:98
1007 msgid "The B<fflush>()  function is thread-safe."
1008 msgstr "関数 B<fflush>() はスレッドセーフである。"
1009
1010 #. type: Plain text
1011 #: build/C/man3/fflush.3:100
1012 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
1013 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
1014
1015 #.  Verified on: Solaris 8.
1016 #. type: Plain text
1017 #: build/C/man3/fflush.3:104
1018 msgid ""
1019 "The standards do not specify the behavior for input streams.  Most other "
1020 "implementations behave the same as Linux."
1021 msgstr ""
1022 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
1023 "は Linux と同じ動作をする。"
1024
1025 #. type: Plain text
1026 #: build/C/man3/fflush.3:113
1027 msgid ""
1028 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
1029 "library.  To ensure that the data is physically stored on disk the kernel "
1030 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
1031 msgstr ""
1032 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
1033 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
1034 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
1035 "B<fsync>(2)  を用いる。"
1036
1037 #. type: Plain text
1038 #: build/C/man3/fflush.3:121
1039 msgid ""
1040 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1041 "(3), B<unlocked_stdio>(3)"
1042 msgstr ""
1043 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1044 "(3), B<unlocked_stdio>(3)"
1045
1046 #. type: TH
1047 #: build/C/man3/fgetwc.3:18
1048 #, no-wrap
1049 msgid "FGETWC"
1050 msgstr "FGETWC"
1051
1052 #. type: TH
1053 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/getline.3:26
1054 #: build/C/man3/popen.3:40 build/C/man3/tempnam.3:25
1055 #, no-wrap
1056 msgid "2013-04-19"
1057 msgstr "2013-04-19"
1058
1059 #. type: Plain text
1060 #: build/C/man3/fgetwc.3:21
1061 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1062 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1063
1064 #. type: Plain text
1065 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1066 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1067 #, no-wrap
1068 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1069 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1070
1071 #. type: Plain text
1072 #: build/C/man3/fgetwc.3:29
1073 #, no-wrap
1074 msgid ""
1075 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1076 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1077 msgstr ""
1078 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1079 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1080
1081 #. type: Plain text
1082 #: build/C/man3/fgetwc.3:44
1083 msgid ""
1084 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1085 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1086 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1087 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1088 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1089 msgstr ""
1090 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1091 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1092 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1093 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1094 "し、 B<WEOF> を返す。"
1095
1096 #. type: Plain text
1097 #: build/C/man3/fgetwc.3:52
1098 msgid ""
1099 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1100 "may be implemented as a macro, and may evaluate its argument more than "
1101 "once.  There is no reason ever to use it."
1102 msgstr ""
1103 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1104 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1105 "ない。この関数を使う理由はもはや存在しない。"
1106
1107 #. type: Plain text
1108 #: build/C/man3/fgetwc.3:64
1109 msgid ""
1110 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1111 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1112 msgstr ""
1113 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エ"
1114 "ラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1115
1116 #. type: Plain text
1117 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1118 msgid "Apart from the usual ones, there is"
1119 msgstr "通常のエラーに加えて、以下のエラーがある:"
1120
1121 #. type: TP
1122 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1123 #, no-wrap
1124 msgid "B<EILSEQ>"
1125 msgstr "B<EILSEQ>"
1126
1127 #. type: Plain text
1128 #: build/C/man3/fgetwc.3:70
1129 msgid ""
1130 "The data obtained from the input stream does not form a valid character."
1131 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1132
1133 #. type: Plain text
1134 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1135 msgid "C99, POSIX.1-2001."
1136 msgstr "C99, POSIX.1-2001."
1137
1138 #. type: Plain text
1139 #: build/C/man3/fgetwc.3:79
1140 msgid ""
1141 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1142 "current locale."
1143 msgstr ""
1144 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1145
1146 #. type: Plain text
1147 #: build/C/man3/fgetwc.3:87
1148 msgid ""
1149 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1150 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1151 "sequence from the stream and then convert it to a wide character."
1152 msgstr ""
1153 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1154 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1155 "換すると期待することは適切である。"
1156
1157 #. type: Plain text
1158 #: build/C/man3/fgetwc.3:92
1159 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1160 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1161
1162 #. type: TH
1163 #: build/C/man3/flockfile.3:25
1164 #, no-wrap
1165 msgid "FLOCKFILE"
1166 msgstr "FLOCKFILE"
1167
1168 #. type: TH
1169 #: build/C/man3/flockfile.3:25
1170 #, no-wrap
1171 msgid "2013-07-23"
1172 msgstr "2013-07-23"
1173
1174 #. type: Plain text
1175 #: build/C/man3/flockfile.3:28
1176 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1177 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1178
1179 #. type: Plain text
1180 #: build/C/man3/flockfile.3:33
1181 #, no-wrap
1182 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1183 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1184
1185 #. type: Plain text
1186 #: build/C/man3/flockfile.3:35
1187 #, no-wrap
1188 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1189 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1190
1191 #. type: Plain text
1192 #: build/C/man3/flockfile.3:37
1193 #, no-wrap
1194 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1195 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1196
1197 #. type: Plain text
1198 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1199 msgid "All functions shown above:"
1200 msgstr "上記の全ての関数:"
1201
1202 #. type: Plain text
1203 #: build/C/man3/flockfile.3:49
1204 msgid ""
1205 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1206 "|| _POSIX_SOURCE"
1207 msgstr ""
1208 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1209 "|| _POSIX_SOURCE"
1210
1211 #. type: Plain text
1212 #: build/C/man3/flockfile.3:63
1213 msgid ""
1214 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1215 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1216 "thread.  For each library call, these functions wait until the I<FILE> "
1217 "object is no longer locked by a different thread, then lock it, do the "
1218 "requested I/O, and unlock the object again."
1219 msgstr ""
1220 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1221 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1222 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1223 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1224 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1225 "オブジェクトのロックを解除する。"
1226
1227 #. type: Plain text
1228 #: build/C/man3/flockfile.3:69
1229 msgid ""
1230 "(Note: this locking has nothing to do with the file locking done by "
1231 "functions like B<flock>(2)  and B<lockf>(3).)"
1232 msgstr ""
1233 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1234 "全く無関係である。)"
1235
1236 #. type: Plain text
1237 #: build/C/man3/flockfile.3:77
1238 msgid ""
1239 "All this is invisible to the C-programmer, but there may be two reasons to "
1240 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1241 "actions by one thread belongs together, and should not be interrupted by the "
1242 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1243 "should be avoided for greater efficiency."
1244 msgstr ""
1245 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1246 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1247 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1248 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1249 "避ける必要があるということであろう。"
1250
1251 #. type: Plain text
1252 #: build/C/man3/flockfile.3:94
1253 msgid ""
1254 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1255 "series of I/O actions, then unlock.  This prevents other threads from coming "
1256 "in between.  If the reason for doing this was to achieve greater efficiency, "
1257 "one does the I/O with the nonlocking versions of the stdio functions: with "
1258 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1259 "B<putc>(3)."
1260 msgstr ""
1261 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1262 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1263 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1264 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1265 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1266 "B<putc_unlocked>(3)  を使用する。"
1267
1268 #. type: Plain text
1269 #: build/C/man3/flockfile.3:105
1270 msgid ""
1271 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1272 "by a different thread, then makes the current thread owner of "
1273 "I<*filehandle>, and increments the lockcount."
1274 msgstr ""
1275 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1276 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1277 "ロック数を加算する。"
1278
1279 #. type: Plain text
1280 #: build/C/man3/flockfile.3:109
1281 msgid "The B<funlockfile>()  function decrements the lock count."
1282 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1283
1284 #. type: Plain text
1285 #: build/C/man3/flockfile.3:120
1286 msgid ""
1287 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1288 "It does nothing in case some other thread owns I<*filehandle>, and it "
1289 "obtains ownership and increments the lockcount otherwise."
1290 msgstr ""
1291 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1292 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1293 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1294
1295 #. type: Plain text
1296 #: build/C/man3/flockfile.3:125
1297 msgid ""
1298 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1299 "obtained), and nonzero for failure."
1300 msgstr ""
1301 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1302 "の値を返す。"
1303
1304 #. type: Plain text
1305 #: build/C/man3/flockfile.3:127
1306 msgid "None."
1307 msgstr "なし。"
1308
1309 #. type: Plain text
1310 #: build/C/man3/flockfile.3:135
1311 msgid ""
1312 "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are "
1313 "thread-safe."
1314 msgstr ""
1315 "関数 B<flockfile>(), B<ftrylockfile>(), B<funlockfile>() はスレッドセーフであ"
1316 "る。"
1317
1318 #. type: Plain text
1319 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1320 msgid "POSIX.1-2001."
1321 msgstr "POSIX.1-2001."
1322
1323 #. type: SH
1324 #: build/C/man3/flockfile.3:137
1325 #, no-wrap
1326 msgid "AVAILABILITY"
1327 msgstr "可用性"
1328
1329 #. type: Plain text
1330 #: build/C/man3/flockfile.3:143
1331 msgid ""
1332 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1333 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1334 msgstr ""
1335 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1336 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1337
1338 #. type: Plain text
1339 #: build/C/man3/flockfile.3:145
1340 msgid "B<unlocked_stdio>(3)"
1341 msgstr "B<unlocked_stdio>(3)"
1342
1343 #. type: TH
1344 #: build/C/man3/fmemopen.3:10
1345 #, no-wrap
1346 msgid "FMEMOPEN"
1347 msgstr "FMEMOPEN"
1348
1349 #. type: TH
1350 #: build/C/man3/fmemopen.3:10
1351 #, no-wrap
1352 msgid "2012-04-28"
1353 msgstr "2012-04-28"
1354
1355 #. type: Plain text
1356 #: build/C/man3/fmemopen.3:13
1357 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1358 msgstr ""
1359 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1360 "する"
1361
1362 #. type: Plain text
1363 #: build/C/man3/fmemopen.3:18
1364 #, no-wrap
1365 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1366 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1367
1368 #. type: Plain text
1369 #: build/C/man3/fmemopen.3:20
1370 #, no-wrap
1371 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1372 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1373
1374 #. type: Plain text
1375 #: build/C/man3/fmemopen.3:24
1376 #, no-wrap
1377 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1378 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1379
1380 #. type: Plain text
1381 #: build/C/man3/fmemopen.3:34
1382 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1383 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1384
1385 #. type: Plain text
1386 #: build/C/man3/fmemopen.3:57
1387 msgid ""
1388 "The B<fmemopen>()  function opens a stream that permits the access specified "
1389 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1390 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1391 "long."
1392 msgstr ""
1393 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1394 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1395 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1396 "I<size> バイトの長さでなければならない。"
1397
1398 #. type: Plain text
1399 #: build/C/man3/fmemopen.3:77
1400 msgid ""
1401 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1402 "an append mode, then the initial file position is set to the location of the "
1403 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1404 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
1405 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
1406 "provides \"binary\" mode: writes don't implicitly add a terminating null "
1407 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i."
1408 "e., the value specified by the I<size> argument), rather than the current "
1409 "string length."
1410 msgstr ""
1411 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1412 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1413 "最初の NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1414 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1415 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1416 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1417 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1418 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1419 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1420
1421 #. type: Plain text
1422 #: build/C/man3/fmemopen.3:89
1423 msgid ""
1424 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1425 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1426 "there is space.  The caller should ensure that an extra byte is available in "
1427 "the buffer (and that I<size> counts that byte)  to allow for this."
1428 msgstr ""
1429 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1430 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1431 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1432 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1433
1434 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1435 #.  and
1436 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1437 #. type: Plain text
1438 #: build/C/man3/fmemopen.3:107
1439 msgid ""
1440 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1441 "(By default, such errors will be visible only when the I<stdio> buffer is "
1442 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1443 "detect errors at the time of an output operation.  Alternatively, the caller "
1444 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1445 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1446 msgstr ""
1447 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1448 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1449 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1450 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1451 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1452 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1453 "stdio に教える方法がある。)"
1454
1455 #. type: Plain text
1456 #: build/C/man3/fmemopen.3:115
1457 msgid ""
1458 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1459 "not cause read operations to return an end-of-file indication.  A read from "
1460 "the buffer will only indicate end-of-file when the file pointer advances "
1461 "I<size> bytes past the start of the buffer."
1462 msgstr ""
1463 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1464 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1465 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1466 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1467
1468 #. type: Plain text
1469 #: build/C/man3/fmemopen.3:130
1470 msgid ""
1471 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1472 "buffer I<size> bytes long.  This is useful for an application that wants to "
1473 "write data to a temporary buffer and then read it back again.  The buffer is "
1474 "automatically freed when the stream is closed.  Note that the caller has no "
1475 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1476 "see B<open_memstream>()  below)."
1477 msgstr ""
1478 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1479 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1480 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1481 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1482 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1483 "の B<open_memstream>()  も参照)。"
1484
1485 #. type: Plain text
1486 #: build/C/man3/fmemopen.3:141
1487 msgid ""
1488 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1489 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1490 "automatically grows as required.  After closing the stream, the caller "
1491 "should B<free>(3)  this buffer."
1492 msgstr ""
1493 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1494 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1495 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1496 "B<free>(3)  すべきである。"
1497
1498 #. type: Plain text
1499 #: build/C/man3/fmemopen.3:156
1500 msgid ""
1501 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1502 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1503 "respectively, a pointer to the buffer and the current size of the buffer.  "
1504 "These values remain valid only as long as the caller performs no further "
1505 "output on the stream.  If further output is performed, then the stream must "
1506 "again be flushed before trying to access these variables."
1507 msgstr ""
1508 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1509 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1510 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1511 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1512 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1513
1514 #. type: Plain text
1515 #: build/C/man3/fmemopen.3:162
1516 msgid ""
1517 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1518 "included in the size value stored at I<sizeloc>."
1519 msgstr ""
1520 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1521 "されるサイズには「含まれない」。"
1522
1523 #. type: Plain text
1524 #: build/C/man3/fmemopen.3:170
1525 msgid ""
1526 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1527 "(3).  Moving the file position past the end of the data already written "
1528 "fills the intervening space with zeros."
1529 msgstr ""
1530 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1531 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1532 "は 0 で埋められる。"
1533
1534 #. type: Plain text
1535 #: build/C/man3/fmemopen.3:176
1536 msgid ""
1537 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1538 "wide characters instead of bytes."
1539 msgstr ""
1540 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1541 "ド文字に対して操作を行う点が異なる。"
1542
1543 #. type: Plain text
1544 #: build/C/man3/fmemopen.3:188
1545 msgid ""
1546 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1547 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1548 "and I<errno> is set to indicate the error."
1549 msgstr ""
1550 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1551 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1552 "し、 I<errno> にエラーを示す値をセットする。"
1553
1554 #. type: SH
1555 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222
1556 #: build/C/man3/getline.3:135 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1557 #, no-wrap
1558 msgid "VERSIONS"
1559 msgstr "バージョン"
1560
1561 #. type: Plain text
1562 #: build/C/man3/fmemopen.3:195
1563 msgid ""
1564 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1565 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1566 msgstr ""
1567 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1568 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1569
1570 #. type: Plain text
1571 #: build/C/man3/fmemopen.3:199
1572 msgid ""
1573 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1574 "not widely available on other systems."
1575 msgstr ""
1576 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1577 "のシステムで広く利用可能である。"
1578
1579 #.  http://austingroupbugs.net/view.php?id=396
1580 #. type: Plain text
1581 #: build/C/man3/fmemopen.3:207
1582 msgid ""
1583 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1584 "However, Technical Corrigendum 1 adjusts the standard to allow "
1585 "implementation-specific treatment for this case, thus permitting the glibc "
1586 "treatment of \\(aqb\\(aq."
1587 msgstr ""
1588 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1589 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1590 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1591 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1592
1593 #. type: Plain text
1594 #: build/C/man3/fmemopen.3:213
1595 msgid ""
1596 "There is no file descriptor associated with the file stream returned by "
1597 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1598 "returned stream)."
1599 msgstr ""
1600 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1601 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1602 "とになる)。"
1603
1604 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1605 #. type: Plain text
1606 #: build/C/man3/fmemopen.3:220
1607 msgid ""
1608 "In glibc before version 2.7, seeking past the end of a stream created by "
1609 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1610 "call fails, returning -1."
1611 msgstr ""
1612 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1613 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1614 "B<fseek>(3)  が失敗し -1 が返る。"
1615
1616 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1617 #. type: Plain text
1618 #: build/C/man3/fmemopen.3:231
1619 msgid ""
1620 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1621 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1622 "stream that then returned end of file on the first attempt at reading.  "
1623 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1624 msgstr ""
1625 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1626 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1627 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1628 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1629
1630 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1631 #. type: Plain text
1632 #: build/C/man3/fmemopen.3:239
1633 msgid ""
1634 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1635 "file position to the first null byte, but (if the file offset is reset to a "
1636 "location other than the end of the stream)  does not force subsequent writes "
1637 "to append at the end of the stream."
1638 msgstr ""
1639 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1640 "ファイル位置の初期値は最初の NULL バイトに設定されるが、(ファイル\n"
1641 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1642 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1643
1644 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1645 #. type: Plain text
1646 #: build/C/man3/fmemopen.3:255
1647 msgid ""
1648 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+"
1649 "\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1650 "according to POSIX.1-2008, the initial file position should be set to the "
1651 "next byte after the end of the buffer.  However, in this case the glibc "
1652 "B<fmemopen>()  sets the file position to -1."
1653 msgstr ""
1654 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1655 "I<size> 引き数で指定した範囲の I<buf> 内に NULL バイトがない場合、\n"
1656 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1657 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1658 "この場合ファイル位置は -1 に設定される。"
1659
1660 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1661 #. type: Plain text
1662 #: build/C/man3/fmemopen.3:268
1663 msgid ""
1664 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1665 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1666 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1667 "I<mode> by B<fopen>(3)."
1668 msgstr ""
1669 "B<fmemopen>() でバイナリモードを指定するには、\n"
1670 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1671 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1672 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1673
1674 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1675 #. type: Plain text
1676 #: build/C/man3/fmemopen.3:276
1677 msgid ""
1678 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1679 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1680 msgstr ""
1681 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1682 "ABI (Application Binary Interface) が黙って変更された。\n"
1683 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1684
1685 #. type: SH
1686 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256
1687 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1688 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:974
1689 #: build/C/man2/readlink.2:157 build/C/man2/readv.2:265
1690 #: build/C/man3/scanf.3:681
1691 #, no-wrap
1692 msgid "EXAMPLE"
1693 msgstr "例"
1694
1695 #. type: Plain text
1696 #: build/C/man3/fmemopen.3:286
1697 msgid ""
1698 "The program below uses B<fmemopen>()  to open an input buffer, and "
1699 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1700 "scans its input string (taken from the program's first command-line "
1701 "argument) reading integers, and writes the squares of these integers to the "
1702 "output buffer.  An example of the output produced by this program is the "
1703 "following:"
1704 msgstr ""
1705 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1706 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1707 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1708 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1709 "ムの実行例は以下のようになる。"
1710
1711 #. type: Plain text
1712 #: build/C/man3/fmemopen.3:291
1713 #, no-wrap
1714 msgid ""
1715 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1716 "size=11; ptr=1 529 1849\n"
1717 msgstr ""
1718 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1719 "size=11; ptr=1 529 1849\n"
1720
1721 #. type: SS
1722 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1723 #, no-wrap
1724 msgid "Program source"
1725 msgstr "プログラムのソース"
1726
1727 #. type: Plain text
1728 #: build/C/man3/fmemopen.3:300
1729 #, no-wrap
1730 msgid ""
1731 "#define _GNU_SOURCE\n"
1732 "#include E<lt>string.hE<gt>\n"
1733 "#include E<lt>stdio.hE<gt>\n"
1734 "#include E<lt>stdlib.hE<gt>\n"
1735 msgstr ""
1736 "#define _GNU_SOURCE\n"
1737 "#include E<lt>string.hE<gt>\n"
1738 "#include E<lt>stdio.hE<gt>\n"
1739 "#include E<lt>stdlib.hE<gt>\n"
1740
1741 #. type: Plain text
1742 #: build/C/man3/fmemopen.3:303
1743 #, no-wrap
1744 msgid ""
1745 "#define handle_error(msg) \\e\n"
1746 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1747 msgstr ""
1748 "#define handle_error(msg) \\e\n"
1749 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1750
1751 #. type: Plain text
1752 #: build/C/man3/fmemopen.3:311
1753 #, no-wrap
1754 msgid ""
1755 "int\n"
1756 "main(int argc, char *argv[])\n"
1757 "{\n"
1758 "    FILE *out, *in;\n"
1759 "    int v, s;\n"
1760 "    size_t size;\n"
1761 "    char *ptr;\n"
1762 msgstr ""
1763 "int\n"
1764 "main(int argc, char *argv[])\n"
1765 "{\n"
1766 "    FILE *out, *in;\n"
1767 "    int v, s;\n"
1768 "    size_t size;\n"
1769 "    char *ptr;\n"
1770
1771 #. type: Plain text
1772 #: build/C/man3/fmemopen.3:316
1773 #, no-wrap
1774 msgid ""
1775 "    if (argc != 2) {\n"
1776 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1777 "\texit(EXIT_FAILURE);\n"
1778 "    }\n"
1779 msgstr ""
1780 "    if (argc != 2) {\n"
1781 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1782 "\texit(EXIT_FAILURE);\n"
1783 "    }\n"
1784
1785 #. type: Plain text
1786 #: build/C/man3/fmemopen.3:320
1787 #, no-wrap
1788 msgid ""
1789 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1790 "    if (in == NULL)\n"
1791 "        handle_error(\"fmemopen\");\n"
1792 msgstr ""
1793 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1794 "    if (in == NULL)\n"
1795 "        handle_error(\"fmemopen\");\n"
1796
1797 #. type: Plain text
1798 #: build/C/man3/fmemopen.3:324
1799 #, no-wrap
1800 msgid ""
1801 "    out = open_memstream(&ptr, &size);\n"
1802 "    if (out == NULL)\n"
1803 "        handle_error(\"open_memstream\");\n"
1804 msgstr ""
1805 "    out = open_memstream(&ptr, &size);\n"
1806 "    if (out == NULL)\n"
1807 "        handle_error(\"open_memstream\");\n"
1808
1809 #. type: Plain text
1810 #: build/C/man3/fmemopen.3:329
1811 #, no-wrap
1812 msgid ""
1813 "    for (;;) {\n"
1814 "        s = fscanf(in, \"%d\", &v);\n"
1815 "        if (s E<lt>= 0)\n"
1816 "            break;\n"
1817 msgstr ""
1818 "    for (;;) {\n"
1819 "        s = fscanf(in, \"%d\", &v);\n"
1820 "        if (s E<lt>= 0)\n"
1821 "            break;\n"
1822
1823 #. type: Plain text
1824 #: build/C/man3/fmemopen.3:340
1825 #, no-wrap
1826 msgid ""
1827 "        s = fprintf(out, \"%d \", v * v);\n"
1828 "        if (s == -1)\n"
1829 "            handle_error(\"fprintf\");\n"
1830 "    }\n"
1831 "    fclose(in);\n"
1832 "    fclose(out);\n"
1833 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1834 "    free(ptr);\n"
1835 "    exit(EXIT_SUCCESS);\n"
1836 "}\n"
1837 msgstr ""
1838 "        s = fprintf(out, \"%d \", v * v);\n"
1839 "        if (s == -1)\n"
1840 "            handle_error(\"fprintf\");\n"
1841 "    }\n"
1842 "    fclose(in);\n"
1843 "    fclose(out);\n"
1844 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1845 "    free(ptr);\n"
1846 "    exit(EXIT_SUCCESS);\n"
1847 "}\n"
1848
1849 #. type: Plain text
1850 #: build/C/man3/fmemopen.3:344
1851 msgid "B<fopen>(3), B<fopencookie>(3)"
1852 msgstr "B<fopen>(3), B<fopencookie>(3)"
1853
1854 #. type: TH
1855 #: build/C/man3/fmtmsg.3:13
1856 #, no-wrap
1857 msgid "FMTMSG"
1858 msgstr "FMTMSG"
1859
1860 #. type: Plain text
1861 #: build/C/man3/fmtmsg.3:16
1862 msgid "fmtmsg - print formatted error messages"
1863 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1864
1865 #. type: Plain text
1866 #: build/C/man3/fmtmsg.3:19
1867 #, no-wrap
1868 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1869 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1870
1871 #. type: Plain text
1872 #: build/C/man3/fmtmsg.3:21
1873 #, no-wrap
1874 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1875 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1876
1877 #. type: Plain text
1878 #: build/C/man3/fmtmsg.3:23
1879 #, no-wrap
1880 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1881 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1882
1883 #. type: Plain text
1884 #: build/C/man3/fmtmsg.3:25
1885 #, no-wrap
1886 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1887 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1888
1889 #. type: Plain text
1890 #: build/C/man3/fmtmsg.3:36
1891 msgid ""
1892 "This function displays a message described by its arguments on the device"
1893 "(s)  specified in the I<classification> argument.  For messages written to "
1894 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1895 msgstr ""
1896 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1897 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1898 "は、 B<MSGVERB> 環境変数に依存する。"
1899
1900 #. type: Plain text
1901 #: build/C/man3/fmtmsg.3:43
1902 msgid ""
1903 "The I<label> argument identifies the source of the message.  The string must "
1904 "consist of two colon separated parts where the first part has not more than "
1905 "10 and the second part not more than 14 characters."
1906 msgstr ""
1907 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1908 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1909 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1910
1911 #. type: Plain text
1912 #: build/C/man3/fmtmsg.3:47
1913 msgid "The I<text> argument describes the condition of the error."
1914 msgstr "I<text> 引き数にはエラー条件を記述する。"
1915
1916 #. type: Plain text
1917 #: build/C/man3/fmtmsg.3:52
1918 msgid ""
1919 "The I<action> argument describes possible steps to recover from the error.  "
1920 "If it is printed, it is prefixed by \"TO FIX: \"."
1921 msgstr ""
1922 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1923 "れが表示される場合、\"TO FIX: \" が前に付く。"
1924
1925 #. type: Plain text
1926 #: build/C/man3/fmtmsg.3:60
1927 msgid ""
1928 "The I<tag> argument is a reference to the online documentation where more "
1929 "information can be found.  It should contain the I<label> value and a unique "
1930 "identification number."
1931 msgstr ""
1932 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1933 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1934
1935 #. type: SS
1936 #: build/C/man3/fmtmsg.3:60
1937 #, no-wrap
1938 msgid "Dummy arguments"
1939 msgstr "ダミー引き数"
1940
1941 #. type: Plain text
1942 #: build/C/man3/fmtmsg.3:79
1943 msgid ""
1944 "Each of the arguments can have a dummy value.  The dummy classification "
1945 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1946 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1947 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1948 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
1949 "synonym for B<NO_SEV>."
1950 msgstr ""
1951 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1952 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1953 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1954 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1955 "((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名"
1956 "である。"
1957
1958 #. type: SS
1959 #: build/C/man3/fmtmsg.3:79
1960 #, no-wrap
1961 msgid "The classification argument"
1962 msgstr "classification 引き数"
1963
1964 #. type: Plain text
1965 #: build/C/man3/fmtmsg.3:83
1966 msgid ""
1967 "The I<classification> argument is the sum of values describing 4 types of "
1968 "information."
1969 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1970
1971 #. type: Plain text
1972 #: build/C/man3/fmtmsg.3:86
1973 msgid "The first value defines the output channel."
1974 msgstr "最初の値は出力チャンネルを定義する。"
1975
1976 #. type: TP
1977 #: build/C/man3/fmtmsg.3:86
1978 #, no-wrap
1979 msgid "B<MM_PRINT>"
1980 msgstr "B<MM_PRINT>"
1981
1982 #. type: Plain text
1983 #: build/C/man3/fmtmsg.3:90
1984 msgid "Output to I<stderr>."
1985 msgstr "I<stderr> に出力する。"
1986
1987 #. type: TP
1988 #: build/C/man3/fmtmsg.3:90
1989 #, no-wrap
1990 msgid "B<MM_CONSOLE>"
1991 msgstr "B<MM_CONSOLE>"
1992
1993 #. type: Plain text
1994 #: build/C/man3/fmtmsg.3:93
1995 msgid "Output to the system console."
1996 msgstr "システムコンソールに出力する。"
1997
1998 #. type: TP
1999 #: build/C/man3/fmtmsg.3:93
2000 #, no-wrap
2001 msgid "B<MM_PRINT | MM_CONSOLE>"
2002 msgstr "B<MM_PRINT | MM_CONSOLE>"
2003
2004 #. type: Plain text
2005 #: build/C/man3/fmtmsg.3:96
2006 msgid "Output to both."
2007 msgstr "両方に出力する。"
2008
2009 #. type: Plain text
2010 #: build/C/man3/fmtmsg.3:98
2011 msgid "The second value is the source of the error:"
2012 msgstr "2 番目の値はエラーの発生源である:"
2013
2014 #. type: TP
2015 #: build/C/man3/fmtmsg.3:98
2016 #, no-wrap
2017 msgid "B<MM_HARD>"
2018 msgstr "B<MM_HARD>"
2019
2020 #. type: Plain text
2021 #: build/C/man3/fmtmsg.3:101
2022 msgid "A hardware error occurred."
2023 msgstr "ハードウェアエラーが起こった。"
2024
2025 #. type: TP
2026 #: build/C/man3/fmtmsg.3:101
2027 #, no-wrap
2028 msgid "B<MM_FIRM>"
2029 msgstr "B<MM_FIRM>"
2030
2031 #. type: Plain text
2032 #: build/C/man3/fmtmsg.3:104
2033 msgid "A firmware error occurred."
2034 msgstr "ファームウェアエラーが起こった。"
2035
2036 #. type: TP
2037 #: build/C/man3/fmtmsg.3:104
2038 #, no-wrap
2039 msgid "B<MM_SOFT>"
2040 msgstr "B<MM_SOFT>"
2041
2042 #. type: Plain text
2043 #: build/C/man3/fmtmsg.3:107
2044 msgid "A software error occurred."
2045 msgstr "ソフトウェアエラーが起こった。"
2046
2047 #. type: Plain text
2048 #: build/C/man3/fmtmsg.3:109
2049 msgid "The third value encodes the detector of the problem:"
2050 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
2051
2052 #. type: TP
2053 #: build/C/man3/fmtmsg.3:109
2054 #, no-wrap
2055 msgid "B<MM_APPL>"
2056 msgstr "B<MM_APPL>"
2057
2058 #. type: Plain text
2059 #: build/C/man3/fmtmsg.3:112
2060 msgid "It is detected by an application."
2061 msgstr "アプリケーションによって検知された。"
2062
2063 #. type: TP
2064 #: build/C/man3/fmtmsg.3:112
2065 #, no-wrap
2066 msgid "B<MM_UTIL>"
2067 msgstr "B<MM_UTIL>"
2068
2069 #. type: Plain text
2070 #: build/C/man3/fmtmsg.3:115
2071 msgid "It is detected by a utility."
2072 msgstr "ユーティリティによって検知された。"
2073
2074 #. type: TP
2075 #: build/C/man3/fmtmsg.3:115
2076 #, no-wrap
2077 msgid "B<MM_OPSYS>"
2078 msgstr "B<MM_OPSYS>"
2079
2080 #. type: Plain text
2081 #: build/C/man3/fmtmsg.3:118
2082 msgid "It is detected by the operating system."
2083 msgstr "オペレーティングシステムによって検知された。"
2084
2085 #. type: Plain text
2086 #: build/C/man3/fmtmsg.3:120
2087 msgid "The fourth value shows the severity of the incident:"
2088 msgstr "4 番目の値は問題の重大度を表す:"
2089
2090 #. type: TP
2091 #: build/C/man3/fmtmsg.3:120
2092 #, no-wrap
2093 msgid "B<MM_RECOVER>"
2094 msgstr "B<MM_RECOVER>"
2095
2096 #. type: Plain text
2097 #: build/C/man3/fmtmsg.3:123
2098 msgid "It is a recoverable error."
2099 msgstr "回復可能なエラーである。"
2100
2101 #. type: TP
2102 #: build/C/man3/fmtmsg.3:123
2103 #, no-wrap
2104 msgid "B<MM_NRECOV>"
2105 msgstr "B<MM_NRECOV>"
2106
2107 #. type: Plain text
2108 #: build/C/man3/fmtmsg.3:126
2109 msgid "It is a nonrecoverable error."
2110 msgstr "回復不可能なエラーである。"
2111
2112 #. type: SS
2113 #: build/C/man3/fmtmsg.3:126
2114 #, no-wrap
2115 msgid "The severity argument"
2116 msgstr "severity 引き数"
2117
2118 #. type: Plain text
2119 #: build/C/man3/fmtmsg.3:130
2120 msgid "The I<severity> argument can take one of the following values:"
2121 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
2122
2123 #. type: TP
2124 #: build/C/man3/fmtmsg.3:130
2125 #, no-wrap
2126 msgid "B<MM_NOSEV>"
2127 msgstr "B<MM_NOSEV>"
2128
2129 #. type: Plain text
2130 #: build/C/man3/fmtmsg.3:133
2131 msgid "No severity is printed."
2132 msgstr "重大度は表示されない。"
2133
2134 #. type: TP
2135 #: build/C/man3/fmtmsg.3:133
2136 #, no-wrap
2137 msgid "B<MM_HALT>"
2138 msgstr "B<MM_HALT>"
2139
2140 #. type: Plain text
2141 #: build/C/man3/fmtmsg.3:136
2142 msgid "This value is printed as HALT."
2143 msgstr "この値は HALT として表示される。"
2144
2145 #. type: TP
2146 #: build/C/man3/fmtmsg.3:136
2147 #, no-wrap
2148 msgid "B<MM_ERROR>"
2149 msgstr "B<MM_ERROR>"
2150
2151 #. type: Plain text
2152 #: build/C/man3/fmtmsg.3:139
2153 msgid "This value is printed as ERROR."
2154 msgstr "この値は ERROR として表示される。"
2155
2156 #. type: TP
2157 #: build/C/man3/fmtmsg.3:139
2158 #, no-wrap
2159 msgid "B<MM_WARNING>"
2160 msgstr "B<MM_WARNING>"
2161
2162 #. type: Plain text
2163 #: build/C/man3/fmtmsg.3:142
2164 msgid "This value is printed as WARNING."
2165 msgstr "この値は WARNING として表示される。"
2166
2167 #. type: TP
2168 #: build/C/man3/fmtmsg.3:142
2169 #, no-wrap
2170 msgid "B<MM_INFO>"
2171 msgstr "B<MM_INFO>"
2172
2173 #. type: Plain text
2174 #: build/C/man3/fmtmsg.3:145
2175 msgid "This value is printed as INFO."
2176 msgstr "この値は INFO として表示される。"
2177
2178 #. type: Plain text
2179 #: build/C/man3/fmtmsg.3:152
2180 msgid ""
2181 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2182 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2183 "print."
2184 msgstr ""
2185 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2186 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2187
2188 #. type: Plain text
2189 #: build/C/man3/fmtmsg.3:154
2190 msgid "The function can return 4 values:"
2191 msgstr "関数は 4 つの値を返す:"
2192
2193 #. type: TP
2194 #: build/C/man3/fmtmsg.3:154
2195 #, no-wrap
2196 msgid "B<MM_OK>"
2197 msgstr "B<MM_OK>"
2198
2199 #. type: Plain text
2200 #: build/C/man3/fmtmsg.3:157
2201 msgid "Everything went smooth."
2202 msgstr "全てがうまくいった。"
2203
2204 #. type: TP
2205 #: build/C/man3/fmtmsg.3:157
2206 #, no-wrap
2207 msgid "B<MM_NOTOK>"
2208 msgstr "B<MM_NOTOK>"
2209
2210 #. type: Plain text
2211 #: build/C/man3/fmtmsg.3:160
2212 msgid "Complete failure."
2213 msgstr "完全に失敗した。"
2214
2215 #. type: TP
2216 #: build/C/man3/fmtmsg.3:160
2217 #, no-wrap
2218 msgid "B<MM_NOMSG>"
2219 msgstr "B<MM_NOMSG>"
2220
2221 #. type: Plain text
2222 #: build/C/man3/fmtmsg.3:164
2223 msgid "Error writing to I<stderr>."
2224 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2225
2226 #. type: TP
2227 #: build/C/man3/fmtmsg.3:164
2228 #, no-wrap
2229 msgid "B<MM_NOCON>"
2230 msgstr "B<MM_NOCON>"
2231
2232 #. type: Plain text
2233 #: build/C/man3/fmtmsg.3:167
2234 msgid "Error writing to the console."
2235 msgstr "コンソールに書き込むときにエラーが起こった。"
2236
2237 #. type: SH
2238 #: build/C/man3/fmtmsg.3:167
2239 #, no-wrap
2240 msgid "ENVIRONMENT"
2241 msgstr "環境変数"
2242
2243 #. type: Plain text
2244 #: build/C/man3/fmtmsg.3:178
2245 msgid ""
2246 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2247 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2248 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2249 "separated list of valid keywords, then only the parts of the message "
2250 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2251 "\"severity\", \"text\", \"action\" and \"tag\"."
2252 msgstr ""
2253 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2254 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2255 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2256 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2257 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2258
2259 #. type: Plain text
2260 #: build/C/man3/fmtmsg.3:190
2261 msgid ""
2262 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2263 "levels.  By default, only the five severity levels described above are "
2264 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2265 "If the user puts B<SEV_LEVEL> with a format like"
2266 msgstr ""
2267 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2268 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2269 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2270 "B<SEV_LEVEL> を"
2271
2272 #. type: Plain text
2273 #: build/C/man3/fmtmsg.3:193
2274 msgid "SEV_LEVEL=[description[:description[:...]]]"
2275 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2276
2277 #. type: Plain text
2278 #: build/C/man3/fmtmsg.3:198
2279 msgid ""
2280 "in the environment of the process before the first call to B<fmtmsg>(), "
2281 "where each description is of the form"
2282 msgstr ""
2283 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2284 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2285 "指定された printstring を表示する。 各 description は"
2286
2287 #. type: Plain text
2288 #: build/C/man3/fmtmsg.3:201
2289 msgid "severity-keyword,level,printstring"
2290 msgstr "severity-keyword,level,printstring"
2291
2292 #. type: Plain text
2293 #: build/C/man3/fmtmsg.3:208
2294 msgid ""
2295 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2296 "addition to the standard levels 0-4), and use the indicated printstring when "
2297 "such a level occurs."
2298 msgstr "という形式である。"
2299
2300 #. type: Plain text
2301 #: build/C/man3/fmtmsg.3:222
2302 msgid ""
2303 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2304 "present.  The level part is a string representation of a number.  The "
2305 "numeric value must be a number greater than 4.  This value must be used in "
2306 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2307 "possible to overwrite any of the predefined classes.  The printstring is the "
2308 "string printed when a message of this class is processed by B<fmtmsg>()."
2309 msgstr ""
2310 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2311 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2312 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2313 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2314 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2315 "た場合に表示される文字列である。"
2316
2317 #. type: Plain text
2318 #: build/C/man3/fmtmsg.3:225
2319 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2320 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2321
2322 #. type: Plain text
2323 #: build/C/man3/fmtmsg.3:231
2324 msgid ""
2325 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
2326 "not protected, so it is not thread-safe."
2327 msgstr ""
2328 "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的"
2329 "な変数を使うため、 スレッドセーフではない。"
2330
2331 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
2332 #. type: Plain text
2333 #: build/C/man3/fmtmsg.3:237
2334 msgid ""
2335 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
2336 "static variable, so it is thread-safe."
2337 msgstr ""
2338 "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護してお"
2339 "り、 スレッドセーフである。"
2340
2341 #. type: Plain text
2342 #: build/C/man3/fmtmsg.3:252
2343 msgid ""
2344 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2345 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2346 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2347 msgstr ""
2348 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2349 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2350 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2351
2352 #. type: Plain text
2353 #: build/C/man3/fmtmsg.3:256
2354 msgid ""
2355 "System V and UnixWare man pages tell us that these functions have been "
2356 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2357 "vlfmt()\", and will be removed later."
2358 msgstr ""
2359 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2360 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2361 "は削除される予定である」と書かれている。"
2362
2363 #. type: Plain text
2364 #: build/C/man3/fmtmsg.3:261
2365 #, no-wrap
2366 msgid ""
2367 "#include E<lt>stdio.hE<gt>\n"
2368 "#include E<lt>stdlib.hE<gt>\n"
2369 "#include E<lt>fmtmsg.hE<gt>\n"
2370 msgstr ""
2371 "#include E<lt>stdio.hE<gt>\n"
2372 "#include E<lt>stdlib.hE<gt>\n"
2373 "#include E<lt>fmtmsg.hE<gt>\n"
2374
2375 #. type: Plain text
2376 #: build/C/man3/fmtmsg.3:267
2377 #, no-wrap
2378 msgid ""
2379 "int\n"
2380 "main(void)\n"
2381 "{\n"
2382 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2383 "    int err;\n"
2384 msgstr ""
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
2391 #. type: Plain text
2392 #: build/C/man3/fmtmsg.3:288
2393 #, no-wrap
2394 msgid ""
2395 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2396 "                \"unknown mount option\", \"See mount(8).\",\n"
2397 "                \"util-linux:mount:017\");\n"
2398 "    switch (err) {\n"
2399 "    case MM_OK:\n"
2400 "        break;\n"
2401 "    case MM_NOTOK:\n"
2402 "        printf(\"Nothing printed\\en\");\n"
2403 "        break;\n"
2404 "    case MM_NOMSG:\n"
2405 "        printf(\"Nothing printed to stderr\\en\");\n"
2406 "        break;\n"
2407 "    case MM_NOCON:\n"
2408 "        printf(\"No console output\\en\");\n"
2409 "        break;\n"
2410 "    default:\n"
2411 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2412 "    }\n"
2413 "    exit(EXIT_SUCCESS);\n"
2414 "}\n"
2415 msgstr ""
2416 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2417 "                \"unknown mount option\", \"See mount(8).\",\n"
2418 "                \"util-linux:mount:017\");\n"
2419 "    switch (err) {\n"
2420 "    case MM_OK:\n"
2421 "      break;\n"
2422 "    case MM_NOTOK:\n"
2423 "        printf(\"Nothing printed\\en\");\n"
2424 "        break;\n"
2425 "    case MM_NOMSG:\n"
2426 "        printf(\"Nothing printed to stderr\\en\");\n"
2427 "        break;\n"
2428 "    case MM_NOCON:\n"
2429 "        printf(\"No console output\\en\");\n"
2430 "        break;\n"
2431 "    default:\n"
2432 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2433 "    }\n"
2434 "    exit(EXIT_SUCCESS);\n"
2435 "}\n"
2436
2437 #. type: Plain text
2438 #: build/C/man3/fmtmsg.3:291
2439 msgid "The output should be:"
2440 msgstr "出力は"
2441
2442 #. type: Plain text
2443 #: build/C/man3/fmtmsg.3:295
2444 #, no-wrap
2445 msgid ""
2446 "    util-linux:mount: ERROR: unknown mount option\n"
2447 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2448 msgstr ""
2449 "    util-linux:mount: ERROR: unknown mount option\n"
2450 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2451
2452 #. type: Plain text
2453 #: build/C/man3/fmtmsg.3:298
2454 msgid "and after"
2455 msgstr "のようになり、"
2456
2457 #. type: Plain text
2458 #: build/C/man3/fmtmsg.3:301
2459 #, no-wrap
2460 msgid "    MSGVERB=text:action; export MSGVERB\n"
2461 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2462
2463 #. type: Plain text
2464 #: build/C/man3/fmtmsg.3:304
2465 msgid "the output becomes:"
2466 msgstr "を実行すると、次のようになる。"
2467
2468 #. type: Plain text
2469 #: build/C/man3/fmtmsg.3:308
2470 #, no-wrap
2471 msgid ""
2472 "    unknown mount option\n"
2473 "    TO FIX: See mount(8).\n"
2474 msgstr ""
2475 "    unknown mount option\n"
2476 "    TO FIX: See mount(8).\n"
2477
2478 #. type: Plain text
2479 #: build/C/man3/fmtmsg.3:312
2480 msgid "B<addseverity>(3), B<perror>(3)"
2481 msgstr "B<addseverity>(3), B<perror>(3)"
2482
2483 #. type: TH
2484 #: build/C/man3/fopen.3:44
2485 #, no-wrap
2486 msgid "FOPEN"
2487 msgstr "FOPEN"
2488
2489 #. type: TH
2490 #: build/C/man3/fopen.3:44
2491 #, no-wrap
2492 msgid "2012-04-22"
2493 msgstr "2012-04-22"
2494
2495 #. type: Plain text
2496 #: build/C/man3/fopen.3:47
2497 msgid "fopen, fdopen, freopen - stream open functions"
2498 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2499
2500 #. type: Plain text
2501 #: build/C/man3/fopen.3:52
2502 #, no-wrap
2503 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2504 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2505
2506 #. type: Plain text
2507 #: build/C/man3/fopen.3:54
2508 #, no-wrap
2509 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2510 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2511
2512 #. type: Plain text
2513 #: build/C/man3/fopen.3:56
2514 #, no-wrap
2515 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2516 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2517
2518 #. type: Plain text
2519 #: build/C/man3/fopen.3:65
2520 msgid ""
2521 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2522 msgstr ""
2523 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2524
2525 #. type: Plain text
2526 #: build/C/man3/fopen.3:71
2527 msgid ""
2528 "The B<fopen>()  function opens the file whose name is the string pointed to "
2529 "by I<path> and associates a stream with it."
2530 msgstr ""
2531 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2532 "びつける。"
2533
2534 #. type: Plain text
2535 #: build/C/man3/fopen.3:76
2536 msgid ""
2537 "The argument I<mode> points to a string beginning with one of the following "
2538 "sequences (possibly followed by additional characters, as described below):"
2539 msgstr ""
2540 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2541 "る (以下の述べる、追加の文字が後に続くこともある):"
2542
2543 #. type: TP
2544 #: build/C/man3/fopen.3:76
2545 #, no-wrap
2546 msgid "B<r>"
2547 msgstr "B<r>"
2548
2549 #. type: Plain text
2550 #: build/C/man3/fopen.3:80
2551 msgid ""
2552 "Open text file for reading.  The stream is positioned at the beginning of "
2553 "the file."
2554 msgstr ""
2555 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2556 "る。"
2557
2558 #. type: TP
2559 #: build/C/man3/fopen.3:80
2560 #, no-wrap
2561 msgid "B<r+>"
2562 msgstr "B<r+>"
2563
2564 #. type: Plain text
2565 #: build/C/man3/fopen.3:84
2566 msgid ""
2567 "Open for reading and writing.  The stream is positioned at the beginning of "
2568 "the file."
2569 msgstr ""
2570 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2571 "る。"
2572
2573 #. type: TP
2574 #: build/C/man3/fopen.3:84
2575 #, no-wrap
2576 msgid "B<w>"
2577 msgstr "B<w>"
2578
2579 #. type: Plain text
2580 #: build/C/man3/fopen.3:88
2581 msgid ""
2582 "Truncate file to zero length or create text file for writing.  The stream is "
2583 "positioned at the beginning of the file."
2584 msgstr ""
2585 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2586 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2587 "頭に位置される。"
2588
2589 #. type: TP
2590 #: build/C/man3/fopen.3:88
2591 #, no-wrap
2592 msgid "B<w+>"
2593 msgstr "B<w+>"
2594
2595 #. type: Plain text
2596 #: build/C/man3/fopen.3:94
2597 msgid ""
2598 "Open for reading and writing.  The file is created if it does not exist, "
2599 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2600 "file."
2601 msgstr ""
2602 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2603 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2604 "の先頭に位置される。"
2605
2606 #. type: TP
2607 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2608 #, no-wrap
2609 msgid "B<a>"
2610 msgstr "B<a>"
2611
2612 #. type: Plain text
2613 #: build/C/man3/fopen.3:99
2614 msgid ""
2615 "Open for appending (writing at end of file).  The file is created if it does "
2616 "not exist.  The stream is positioned at the end of the file."
2617 msgstr ""
2618 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2619 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2620
2621 #. type: TP
2622 #: build/C/man3/fopen.3:99
2623 #, no-wrap
2624 msgid "B<a+>"
2625 msgstr "B<a+>"
2626
2627 #. type: Plain text
2628 #: build/C/man3/fopen.3:105
2629 msgid ""
2630 "Open for reading and appending (writing at end of file).  The file is "
2631 "created if it does not exist.  The initial file position for reading is at "
2632 "the beginning of the file, but output is always appended to the end of the "
2633 "file."
2634 msgstr ""
2635 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2636 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2637 "あるが、 書き込みは常にファイルの最後に追加される。"
2638
2639 #. type: Plain text
2640 #: build/C/man3/fopen.3:118
2641 msgid ""
2642 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2643 "character or as a character between the characters in any of the two-"
2644 "character strings described above.  This is strictly for compatibility with "
2645 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2646 "systems, including Linux.  (Other systems may treat text files and binary "
2647 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2648 "O to a binary file and expect that your program may be ported to non-UNIX "
2649 "environments.)"
2650 msgstr ""
2651 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2652 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2653 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2654 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2655 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2656 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2657 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2658 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2659
2660 #. type: Plain text
2661 #: build/C/man3/fopen.3:121
2662 msgid "See NOTES below for details of glibc extensions for I<mode>."
2663 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2664
2665 #. type: Plain text
2666 #: build/C/man3/fopen.3:126
2667 msgid ""
2668 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2669 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2670 "umask value (see B<umask>(2))."
2671 msgstr ""
2672 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2673 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2674 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2675
2676 #. type: Plain text
2677 #: build/C/man3/fopen.3:141
2678 msgid ""
2679 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2680 "that ANSI C requires that a file positioning function intervene between "
2681 "output and input, unless an input operation encounters end-of-file.  (If "
2682 "this condition is not met, then a read is allowed to return the result of "
2683 "writes other than the most recent.)  Therefore it is good practice (and "
2684 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2685 "(3)  operation between write and read operations on such a stream.  This "
2686 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2687 "for its synchronizing side effect."
2688 msgstr ""
2689 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2690 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2691 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2692 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2693 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2694 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2695 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2696 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2697 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2698 "い)。"
2699
2700 #. type: Plain text
2701 #: build/C/man3/fopen.3:146
2702 msgid ""
2703 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2704 "causes all subsequent write operations to this stream to occur at end-of-"
2705 "file, as if preceded the call:"
2706 msgstr ""
2707 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2708 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2709 "かのように) ファイルの末尾で行われる。"
2710
2711 #. type: Plain text
2712 #: build/C/man3/fopen.3:149
2713 #, no-wrap
2714 msgid "    fseek(stream, 0, SEEK_END);\n"
2715 msgstr "    fseek(stream, 0, SEEK_END);\n"
2716
2717 #. type: Plain text
2718 #: build/C/man3/fopen.3:171
2719 msgid ""
2720 "The B<fdopen>()  function associates a stream with the existing file "
2721 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2722 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2723 "file descriptor.  The file position indicator of the new stream is set to "
2724 "that belonging to I<fd>, and the error and end-of-file indicators are "
2725 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2726 "file descriptor is not dup'ed, and will be closed when the stream created by "
2727 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2728 "memory object is undefined."
2729 msgstr ""
2730 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2731 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2732 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2733 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2734 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2735 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2736 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2737 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2738
2739 #. type: Plain text
2740 #: build/C/man3/fopen.3:189
2741 msgid ""
2742 "The B<freopen>()  function opens the file whose name is the string pointed "
2743 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2744 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2745 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2746 "function is to change the file associated with a standard text stream "
2747 "(I<stderr>, I<stdin>, or I<stdout>)."
2748 msgstr ""
2749 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2750 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2751 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2752 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2753 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2754
2755 #. type: Plain text
2756 #: build/C/man3/fopen.3:201
2757 msgid ""
2758 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2759 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2760 "indicate the error."
2761 msgstr ""
2762 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2763 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2764
2765 #. type: TP
2766 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2767 #: build/C/man3/getline.3:126 build/C/man2/llseek.2:77
2768 #: build/C/man2/lseek.2:175 build/C/man2/open.2:613 build/C/man2/pipe.2:102
2769 #: build/C/man2/read.2:126 build/C/man2/read.2:137 build/C/man2/readlink.2:95
2770 #: build/C/man2/readlink.2:104 build/C/man2/readv.2:200
2771 #: build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:565
2772 #: build/C/man2/write.2:154
2773 #, no-wrap
2774 msgid "B<EINVAL>"
2775 msgstr "B<EINVAL>"
2776
2777 #. type: Plain text
2778 #: build/C/man3/fopen.3:212
2779 msgid ""
2780 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2781 "invalid."
2782 msgstr ""
2783 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2784
2785 #. type: Plain text
2786 #: build/C/man3/fopen.3:222
2787 msgid ""
2788 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2789 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2790 msgstr ""
2791 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2792 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2793 "する。"
2794
2795 #. type: Plain text
2796 #: build/C/man3/fopen.3:229
2797 msgid ""
2798 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2799 "errors specified for the routine B<open>(2)."
2800 msgstr ""
2801 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2802 "があり、 その時は対応する値に I<errno> をセットする。"
2803
2804 #. type: Plain text
2805 #: build/C/man3/fopen.3:236
2806 msgid ""
2807 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2808 "errors specified for the routine B<fcntl>(2)."
2809 msgstr ""
2810 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2811 "とがあり、 その時は対応する値に I<errno> をセットする。"
2812
2813 #. type: Plain text
2814 #: build/C/man3/fopen.3:246
2815 msgid ""
2816 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2817 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2818 msgstr ""
2819 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2820 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2821 "トする。"
2822
2823 #. type: Plain text
2824 #: build/C/man3/fopen.3:255
2825 msgid ""
2826 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2827 "()  function conforms to POSIX.1-1990."
2828 msgstr ""
2829 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2830 "は POSIX.1-1990 に準拠している。"
2831
2832 #. type: SS
2833 #: build/C/man3/fopen.3:256
2834 #, no-wrap
2835 msgid "Glibc notes"
2836 msgstr "glibc での注意"
2837
2838 #. type: Plain text
2839 #: build/C/man3/fopen.3:259
2840 msgid ""
2841 "The GNU C library allows the following extensions for the string specified "
2842 "in I<mode>:"
2843 msgstr ""
2844 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2845 "いる:"
2846
2847 #. type: TP
2848 #: build/C/man3/fopen.3:259
2849 #, no-wrap
2850 msgid "B<c> (since glibc 2.3.3)"
2851 msgstr "B<c> (glibc 2.3.3 以降)"
2852
2853 #. type: Plain text
2854 #: build/C/man3/fopen.3:266
2855 msgid ""
2856 "Do not make the open operation, or subsequent read and write operations, "
2857 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2858 msgstr ""
2859 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2860 "(cancellation points) を作成しない。\n"
2861 "このフラグは B<fdopen>() では無視される。"
2862
2863 #. type: TP
2864 #: build/C/man3/fopen.3:266
2865 #, no-wrap
2866 msgid "B<e> (since glibc 2.7)"
2867 msgstr "B<e> (glibc 2.7 以降)"
2868
2869 #. type: Plain text
2870 #: build/C/man3/fopen.3:276
2871 msgid ""
2872 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2873 "information.  This flag is ignored for B<fdopen>()."
2874 msgstr ""
2875 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2876 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2877
2878 #. type: TP
2879 #: build/C/man3/fopen.3:276
2880 #, no-wrap
2881 msgid "B<m> (since glibc 2.3)"
2882 msgstr "B<m> (glibc 2.3 以降)"
2883
2884 #.  As at glibc 2.4:
2885 #. type: Plain text
2886 #: build/C/man3/fopen.3:288
2887 msgid ""
2888 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2889 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
2890 "for a file opened for reading."
2891 msgstr ""
2892 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2893 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2894 "オープンするファイルについてだけである。"
2895
2896 #. type: TP
2897 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2898 #, no-wrap
2899 msgid "B<x>"
2900 msgstr "B<x>"
2901
2902 #.  Since glibc 2.0?
2903 #.  FIXME C11 specifies this flag
2904 #. type: Plain text
2905 #: build/C/man3/fopen.3:305
2906 msgid ""
2907 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2908 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2909 "This flag is ignored for B<fdopen>()."
2910 msgstr ""
2911 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2912 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2913 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2914
2915 #. type: Plain text
2916 #: build/C/man3/fopen.3:313
2917 msgid ""
2918 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2919 "the following syntax in I<mode>:"
2920 msgstr ""
2921 "上記の文字に加えて、\n"
2922 "B<fopen>() と B<freopen>() では I<mode> に\n"
2923 "以下の書式を 指定することができる。"
2924
2925 #. type: Plain text
2926 #: build/C/man3/fopen.3:315
2927 msgid "B< ,ccs=>I<string>"
2928 msgstr "B< ,ccs=>I<string>"
2929
2930 #. type: Plain text
2931 #: build/C/man3/fopen.3:331
2932 msgid ""
2933 "The given I<string> is taken as the name of a coded character set and the "
2934 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2935 "functions convert I/O to and from the character set I<string>.  If the B<,"
2936 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2937 "stream is determined by the first file operation.  If that operation is a "
2938 "wide-character operation, the stream is marked wide-oriented, and functions "
2939 "to convert to the coded character set are loaded."
2940 msgstr ""
2941 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2942 "ストリームではワイド文字のストリームとして扱われる。\n"
2943 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2944 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2945 "ストリームをワイド文字のストリームとして扱うかは\n"
2946 "最初のファイル操作時に決定される。\n"
2947 "最初のファイル操作がワイド文字操作であった場合は、\n"
2948 "そのストリームはワイド文字のストリームとして扱われ、\n"
2949 "符号化文字集合との変換を行う関数が読み込まれる。"
2950
2951 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2952 #. type: Plain text
2953 #: build/C/man3/fopen.3:348
2954 msgid ""
2955 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2956 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>"
2957 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2958 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2959 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2960 "B<fdopen>()  parses at most 5 characters in I<mode>."
2961 msgstr ""
2962 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2963 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2964 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2965 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2966 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2967 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2968
2969 #. type: Plain text
2970 #: build/C/man3/fopen.3:354
2971 msgid ""
2972 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2973 msgstr ""
2974 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2975
2976 #. type: TH
2977 #: build/C/man3/fopencookie.3:26
2978 #, no-wrap
2979 msgid "FOPENCOOKIE"
2980 msgstr "FOPENCOOKIE"
2981
2982 #. type: TH
2983 #: build/C/man3/fopencookie.3:26
2984 #, no-wrap
2985 msgid "2013-03-17"
2986 msgstr "2013-03-17"
2987
2988 #. type: TH
2989 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31
2990 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
2991 #: build/C/man2/open.2:51 build/C/man2/pipe.2:36 build/C/man2/read.2:35
2992 #: build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32
2993 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13
2994 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
2995 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
2996 #, no-wrap
2997 msgid "Linux"
2998 msgstr "Linux"
2999
3000 #. type: Plain text
3001 #: build/C/man3/fopencookie.3:29
3002 msgid "fopencookie - opening a custom stream"
3003 msgstr ""
3004
3005 #. type: Plain text
3006 #: build/C/man3/fopencookie.3:36
3007 #, no-wrap
3008 msgid ""
3009 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3010 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3011 msgstr ""
3012 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
3013 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
3014
3015 #. type: Plain text
3016 #: build/C/man3/fopencookie.3:49
3017 msgid ""
3018 "The B<fopencookie>()  function allows the programmer to create a custom "
3019 "implementation for a standard I/O stream.  This implementation can store the "
3020 "stream's data at a location of its own choosing; for example, B<fopencookie>"
3021 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
3022 "to data that is stored in a buffer in memory."
3023 msgstr ""
3024
3025 #. type: Plain text
3026 #: build/C/man3/fopencookie.3:51
3027 msgid "In order to create a custom stream the programmer must:"
3028 msgstr ""
3029
3030 #. type: IP
3031 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
3032 #: build/C/man3/fopencookie.3:65 build/C/man2/open.2:470
3033 #: build/C/man2/open.2:478 build/C/man2/open.2:484 build/C/man2/open.2:490
3034 #: build/C/man2/open.2:497 build/C/man2/open.2:503 build/C/man3/scanf.3:633
3035 #: build/C/man3/scanf.3:638 build/C/man3/scanf.3:644
3036 #: build/C/man7/symlink.7:249 build/C/man7/symlink.7:259
3037 #: build/C/man7/symlink.7:289 build/C/man7/symlink.7:349
3038 #: build/C/man7/symlink.7:378 build/C/man7/symlink.7:407
3039 #: build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
3040 #, no-wrap
3041 msgid "*"
3042 msgstr "*"
3043
3044 #. type: Plain text
3045 #: build/C/man3/fopencookie.3:54
3046 msgid ""
3047 "Implement four \"hook\" functions that are used internally by the standard I/"
3048 "O library when performing I/O on the stream."
3049 msgstr ""
3050
3051 #. type: Plain text
3052 #: build/C/man3/fopencookie.3:65
3053 msgid ""
3054 "Define a \"cookie\" data type, a structure that provides bookkeeping "
3055 "information (e.g., where to store data) used by the aforementioned hook "
3056 "functions.  The standard I/O package knows nothing about the contents of "
3057 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
3058 "()), but automatically supplies the cookie as the first argument when "
3059 "calling the hook functions."
3060 msgstr ""
3061
3062 #. type: Plain text
3063 #: build/C/man3/fopencookie.3:70
3064 msgid ""
3065 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
3066 "hook functions with that stream."
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: build/C/man3/fopencookie.3:78
3071 msgid ""
3072 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
3073 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
3074 "operate on that stream."
3075 msgstr ""
3076
3077 #. type: Plain text
3078 #: build/C/man3/fopencookie.3:85
3079 msgid ""
3080 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
3081 "to be associated with the new stream.  This pointer is supplied as the first "
3082 "argument when the standard I/O library invokes any of the hook functions "
3083 "described below."
3084 msgstr ""
3085
3086 #. type: Plain text
3087 #: build/C/man3/fopencookie.3:101
3088 msgid ""
3089 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
3090 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
3091 "See B<fopen>(3)  for details."
3092 msgstr ""
3093
3094 #. type: Plain text
3095 #: build/C/man3/fopencookie.3:107
3096 msgid ""
3097 "The I<io_funcs> argument is a structure that contains four fields pointing "
3098 "to the programmer-defined hook functions that are used to implement this "
3099 "stream.  The structure is defined as follows"
3100 msgstr ""
3101
3102 #. type: Plain text
3103 #: build/C/man3/fopencookie.3:116
3104 #, no-wrap
3105 msgid ""
3106 "typedef struct {\n"
3107 "    cookie_read_function_t  *read;\n"
3108 "    cookie_write_function_t *write;\n"
3109 "    cookie_seek_function_t  *seek;\n"
3110 "    cookie_close_function_t *close;\n"
3111 "} cookie_io_functions_t;\n"
3112 msgstr ""
3113 "typedef struct {\n"
3114 "    cookie_read_function_t  *read;\n"
3115 "    cookie_write_function_t *write;\n"
3116 "    cookie_seek_function_t  *seek;\n"
3117 "    cookie_close_function_t *close;\n"
3118 "} cookie_io_functions_t;\n"
3119
3120 #. type: Plain text
3121 #: build/C/man3/fopencookie.3:120
3122 msgid "The four fields are as follows:"
3123 msgstr ""
3124
3125 #. type: TP
3126 #: build/C/man3/fopencookie.3:120
3127 #, no-wrap
3128 msgid "I<cookie_read_function_t *read>"
3129 msgstr "I<cookie_read_function_t *read>"
3130
3131 #. type: Plain text
3132 #: build/C/man3/fopencookie.3:124
3133 msgid ""
3134 "This function implements read operations for the stream.  When called, it "
3135 "receives three arguments:"
3136 msgstr ""
3137
3138 #. type: Plain text
3139 #: build/C/man3/fopencookie.3:126
3140 #, no-wrap
3141 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3142 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
3143
3144 #. type: Plain text
3145 #: build/C/man3/fopencookie.3:141
3146 msgid ""
3147 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
3148 "input data can be placed and the size of that buffer.  As its function "
3149 "result, the I<read> function should return the number of bytes copied into "
3150 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
3151 "update the stream offset appropriately."
3152 msgstr ""
3153
3154 #. type: Plain text
3155 #: build/C/man3/fopencookie.3:146
3156 msgid ""
3157 "If I<*read> is a NULL pointer, then reads from the custom stream always "
3158 "return end of file."
3159 msgstr ""
3160
3161 #. type: TP
3162 #: build/C/man3/fopencookie.3:146
3163 #, no-wrap
3164 msgid "I<cookie_write_function_t *write>"
3165 msgstr "I<cookie_write_function_t *write>"
3166
3167 #. type: Plain text
3168 #: build/C/man3/fopencookie.3:150
3169 msgid ""
3170 "This function implements write operations for the stream.  When called, it "
3171 "receives three arguments:"
3172 msgstr ""
3173
3174 #. type: Plain text
3175 #: build/C/man3/fopencookie.3:152
3176 #, no-wrap
3177 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3178 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3179
3180 #. type: Plain text
3181 #: build/C/man3/fopencookie.3:168
3182 msgid ""
3183 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3184 "output to the stream and the size of that buffer.  As its function result, "
3185 "the I<write> function should return the number of bytes copied from I<buf>, "
3186 "or 0 on error.  (The function must not return a negative value.)  The "
3187 "I<write> function should update the stream offset appropriately."
3188 msgstr ""
3189
3190 #. type: Plain text
3191 #: build/C/man3/fopencookie.3:173
3192 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3193 msgstr ""
3194
3195 #. type: TP
3196 #: build/C/man3/fopencookie.3:173
3197 #, no-wrap
3198 msgid "I<cookie_seek_function_t *seek>"
3199 msgstr "I<cookie_seek_function_t *seek>"
3200
3201 #. type: Plain text
3202 #: build/C/man3/fopencookie.3:177
3203 msgid ""
3204 "This function implements seek operations on the stream.  When called, it "
3205 "receives three arguments:"
3206 msgstr ""
3207
3208 #. type: Plain text
3209 #: build/C/man3/fopencookie.3:179
3210 #, no-wrap
3211 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3212 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3213
3214 #. type: Plain text
3215 #: build/C/man3/fopencookie.3:185
3216 msgid ""
3217 "The I<*offset> argument specifies the new file offset depending on which of "
3218 "the following three values is supplied in I<whence>:"
3219 msgstr ""
3220
3221 #. type: TP
3222 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
3223 #, no-wrap
3224 msgid "B<SEEK_SET>"
3225 msgstr "B<SEEK_SET>"
3226
3227 #. type: Plain text
3228 #: build/C/man3/fopencookie.3:191
3229 msgid ""
3230 "The stream offset should be set I<*offset> bytes from the start of the "
3231 "stream."
3232 msgstr ""
3233
3234 #. type: TP
3235 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
3236 #, no-wrap
3237 msgid "B<SEEK_CUR>"
3238 msgstr "B<SEEK_CUR>"
3239
3240 #. type: Plain text
3241 #: build/C/man3/fopencookie.3:195
3242 msgid "I<*offset> should be added to the current stream offset."
3243 msgstr ""
3244
3245 #. type: TP
3246 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
3247 #, no-wrap
3248 msgid "B<SEEK_END>"
3249 msgstr "B<SEEK_END>"
3250
3251 #. type: Plain text
3252 #: build/C/man3/fopencookie.3:199
3253 msgid ""
3254 "The stream offset should be set to the size of the stream plus I<*offset>."
3255 msgstr ""
3256
3257 #. type: Plain text
3258 #: build/C/man3/fopencookie.3:206
3259 msgid ""
3260 "Before returning, the I<seek> function should update I<*offset> to indicate "
3261 "the new stream offset."
3262 msgstr ""
3263
3264 #. type: Plain text
3265 #: build/C/man3/fopencookie.3:210
3266 msgid ""
3267 "As its function result, the I<seek> function should return 0 on success, and "
3268 "-1 on error."
3269 msgstr ""
3270
3271 #. type: Plain text
3272 #: build/C/man3/fopencookie.3:215
3273 msgid ""
3274 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3275 "operations on the stream."
3276 msgstr ""
3277
3278 #. type: TP
3279 #: build/C/man3/fopencookie.3:215
3280 #, no-wrap
3281 msgid "I<cookie_close_function_t *close>"
3282 msgstr "I<cookie_close_function_t *close>"
3283
3284 #. type: Plain text
3285 #: build/C/man3/fopencookie.3:221
3286 msgid ""
3287 "This function closes the stream.  The hook function can do things such as "
3288 "freeing buffers allocated for the stream.  When called, it receives one "
3289 "argument:"
3290 msgstr ""
3291
3292 #. type: Plain text
3293 #: build/C/man3/fopencookie.3:223
3294 #, no-wrap
3295 msgid "    int close(void *cookie);\n"
3296 msgstr "    int close(void *cookie);\n"
3297
3298 #. type: Plain text
3299 #: build/C/man3/fopencookie.3:228
3300 msgid ""
3301 "The I<cookie> argument is the cookie that the programmer supplied when "
3302 "calling B<fopencookie>()."
3303 msgstr ""
3304
3305 #. type: Plain text
3306 #: build/C/man3/fopencookie.3:234
3307 msgid ""
3308 "As its function result, the I<close> function should return 0 on success, "
3309 "and B<EOF> on error."
3310 msgstr ""
3311
3312 #. type: Plain text
3313 #: build/C/man3/fopencookie.3:238
3314 msgid ""
3315 "If I<*close> is NULL, then no special action is performed when the stream is "
3316 "closed."
3317 msgstr ""
3318
3319 #.  .SH ERRORS
3320 #.  It's not clear if errno ever gets set...
3321 #. type: Plain text
3322 #: build/C/man3/fopencookie.3:245
3323 msgid ""
3324 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3325 "NULL is returned."
3326 msgstr ""
3327
3328 #. type: Plain text
3329 #: build/C/man3/fopencookie.3:247
3330 msgid "This function is a nonstandard GNU extension."
3331 msgstr ""
3332
3333 #. type: Plain text
3334 #: build/C/man3/fopencookie.3:256
3335 msgid ""
3336 "The program below implements a custom stream whose functionality is similar "
3337 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3338 "stream whose data is stored in a memory buffer.  The program writes its "
3339 "command-line arguments to the stream, and then seeks through the stream "
3340 "reading two out of every five characters and writing them to standard "
3341 "output.  The following shell session demonstrates the use of the program:"
3342 msgstr ""
3343
3344 #. type: Plain text
3345 #: build/C/man3/fopencookie.3:264
3346 #, no-wrap
3347 msgid ""
3348 "$B< ./a.out \\(aqhello world\\(aq>\n"
3349 "/he/\n"
3350 "/ w/\n"
3351 "/d/\n"
3352 "Reached end of file\n"
3353 msgstr ""
3354 "$B< ./a.out \\(aqhello world\\(aq>\n"
3355 "/he/\n"
3356 "/ w/\n"
3357 "/d/\n"
3358 "Reached end of file\n"
3359
3360 #. type: Plain text
3361 #: build/C/man3/fopencookie.3:271
3362 msgid ""
3363 "Note that a more general version of the program below could be improved to "
3364 "more robustly handle various error situations (e.g., opening a stream with a "
3365 "cookie that already has an open stream; closing a stream that has already "
3366 "been closed)."
3367 msgstr ""
3368
3369 #. type: Plain text
3370 #: build/C/man3/fopencookie.3:280
3371 #, no-wrap
3372 msgid ""
3373 "#define _GNU_SOURCE\n"
3374 "#include E<lt>sys/types.hE<gt>\n"
3375 "#include E<lt>stdio.hE<gt>\n"
3376 "#include E<lt>stdlib.hE<gt>\n"
3377 "#include E<lt>unistd.hE<gt>\n"
3378 "#include E<lt>string.hE<gt>\n"
3379 msgstr ""
3380 "#define _GNU_SOURCE\n"
3381 "#include E<lt>sys/types.hE<gt>\n"
3382 "#include E<lt>stdio.hE<gt>\n"
3383 "#include E<lt>stdlib.hE<gt>\n"
3384 "#include E<lt>unistd.hE<gt>\n"
3385 "#include E<lt>string.hE<gt>\n"
3386
3387 #. type: Plain text
3388 #: build/C/man3/fopencookie.3:282
3389 #, no-wrap
3390 msgid "#define INIT_BUF_SIZE 4\n"
3391 msgstr "#define INIT_BUF_SIZE 4\n"
3392
3393 #. type: Plain text
3394 #: build/C/man3/fopencookie.3:289
3395 #, no-wrap
3396 msgid ""
3397 "struct memfile_cookie {\n"
3398 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3399 "    size_t  allocated;  /* Size of buf */\n"
3400 "    size_t  endpos;     /* Number of characters in buf */\n"
3401 "    off_t   offset;     /* Current file offset in buf */\n"
3402 "};\n"
3403 msgstr ""
3404 "struct memfile_cookie {\n"
3405 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3406 "    size_t  allocated;  /* Size of buf */\n"
3407 "    size_t  endpos;     /* Number of characters in buf */\n"
3408 "    off_t   offset;     /* Current file offset in buf */\n"
3409 "};\n"
3410
3411 #. type: Plain text
3412 #: build/C/man3/fopencookie.3:295
3413 #, no-wrap
3414 msgid ""
3415 "ssize_t\n"
3416 "memfile_write(void *c, const char *buf, size_t size)\n"
3417 "{\n"
3418 "    char *new_buff;\n"
3419 "    struct memfile_cookie *cookie = c;\n"
3420 msgstr ""
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
3427 #. type: Plain text
3428 #: build/C/man3/fopencookie.3:297
3429 #, no-wrap
3430 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3431 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3432
3433 #. type: Plain text
3434 #: build/C/man3/fopencookie.3:307
3435 #, no-wrap
3436 msgid ""
3437 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3438 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3439 "        if (new_buff == NULL) {\n"
3440 "            return -1;\n"
3441 "        } else {\n"
3442 "            cookie-E<gt>allocated *= 2;\n"
3443 "            cookie-E<gt>buf = new_buff;\n"
3444 "        }\n"
3445 "    }\n"
3446 msgstr ""
3447 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3448 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3449 "        if (new_buff == NULL) {\n"
3450 "            return -1;\n"
3451 "        } else {\n"
3452 "            cookie-E<gt>allocated *= 2;\n"
3453 "            cookie-E<gt>buf = new_buff;\n"
3454 "        }\n"
3455 "    }\n"
3456
3457 #. type: Plain text
3458 #: build/C/man3/fopencookie.3:309
3459 #, no-wrap
3460 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3461 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3462
3463 #. type: Plain text
3464 #: build/C/man3/fopencookie.3:313
3465 #, no-wrap
3466 msgid ""
3467 "    cookie-E<gt>offset += size;\n"
3468 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3469 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3470 msgstr ""
3471 "    cookie-E<gt>offset += size;\n"
3472 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3473 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3474
3475 #. type: Plain text
3476 #: build/C/man3/fopencookie.3:316
3477 #, no-wrap
3478 msgid ""
3479 "    return size;\n"
3480 "}\n"
3481 msgstr ""
3482 "    return size;\n"
3483 "}\n"
3484
3485 #. type: Plain text
3486 #: build/C/man3/fopencookie.3:322
3487 #, no-wrap
3488 msgid ""
3489 "ssize_t\n"
3490 "memfile_read(void *c, char *buf, size_t size)\n"
3491 "{\n"
3492 "    ssize_t xbytes;\n"
3493 "    struct memfile_cookie *cookie = c;\n"
3494 msgstr ""
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
3501 #. type: Plain text
3502 #: build/C/man3/fopencookie.3:324
3503 #, no-wrap
3504 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3505 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3506
3507 #. type: Plain text
3508 #: build/C/man3/fopencookie.3:330
3509 #, no-wrap
3510 msgid ""
3511 "    xbytes = size;\n"
3512 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3513 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3514 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3515 "       xbytes = 0;\n"
3516 msgstr ""
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
3523 #. type: Plain text
3524 #: build/C/man3/fopencookie.3:332
3525 #, no-wrap
3526 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3527 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3528
3529 #. type: Plain text
3530 #: build/C/man3/fopencookie.3:336
3531 #, no-wrap
3532 msgid ""
3533 "    cookie-E<gt>offset += xbytes;\n"
3534 "    return xbytes;\n"
3535 "}\n"
3536 msgstr ""
3537 "    cookie-E<gt>offset += xbytes;\n"
3538 "    return xbytes;\n"
3539 "}\n"
3540
3541 #. type: Plain text
3542 #: build/C/man3/fopencookie.3:342
3543 #, no-wrap
3544 msgid ""
3545 "int\n"
3546 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3547 "{\n"
3548 "    off64_t new_offset;\n"
3549 "    struct memfile_cookie *cookie = c;\n"
3550 msgstr ""
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
3557 #. type: Plain text
3558 #: build/C/man3/fopencookie.3:351
3559 #, no-wrap
3560 msgid ""
3561 "    if (whence == SEEK_SET)\n"
3562 "        new_offset = *offset;\n"
3563 "    else if (whence == SEEK_END)\n"
3564 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3565 "    else if (whence == SEEK_CUR)\n"
3566 "        new_offset = cookie-E<gt>offset + *offset;\n"
3567 "    else\n"
3568 "        return -1;\n"
3569 msgstr ""
3570 "    if (whence == SEEK_SET)\n"
3571 "        new_offset = *offset;\n"
3572 "    else if (whence == SEEK_END)\n"
3573 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3574 "    else if (whence == SEEK_CUR)\n"
3575 "        new_offset = cookie-E<gt>offset + *offset;\n"
3576 "    else\n"
3577 "        return -1;\n"
3578
3579 #. type: Plain text
3580 #: build/C/man3/fopencookie.3:354
3581 #, no-wrap
3582 msgid ""
3583 "    if (new_offset E<lt> 0)\n"
3584 "        return -1;\n"
3585 msgstr ""
3586 "    if (new_offset E<lt> 0)\n"
3587 "        return -1;\n"
3588
3589 #. type: Plain text
3590 #: build/C/man3/fopencookie.3:359
3591 #, no-wrap
3592 msgid ""
3593 "    cookie-E<gt>offset = new_offset;\n"
3594 "    *offset = new_offset;\n"
3595 "    return 0;\n"
3596 "}\n"
3597 msgstr ""
3598 "    cookie-E<gt>offset = new_offset;\n"
3599 "    *offset = new_offset;\n"
3600 "    return 0;\n"
3601 "}\n"
3602
3603 #. type: Plain text
3604 #: build/C/man3/fopencookie.3:364
3605 #, no-wrap
3606 msgid ""
3607 "int\n"
3608 "memfile_close(void *c)\n"
3609 "{\n"
3610 "    struct memfile_cookie *cookie = c;\n"
3611 msgstr ""
3612 "int\n"
3613 "memfile_close(void *c)\n"
3614 "{\n"
3615 "    struct memfile_cookie *cookie = c;\n"
3616
3617 #. type: Plain text
3618 #: build/C/man3/fopencookie.3:368
3619 #, no-wrap
3620 msgid ""
3621 "    free(cookie-E<gt>buf);\n"
3622 "    cookie-E<gt>allocated = 0;\n"
3623 "    cookie-E<gt>buf = NULL;\n"
3624 msgstr ""
3625 "    free(cookie-E<gt>buf);\n"
3626 "    cookie-E<gt>allocated = 0;\n"
3627 "    cookie-E<gt>buf = NULL;\n"
3628
3629 #. type: Plain text
3630 #: build/C/man3/fopencookie.3:371
3631 #, no-wrap
3632 msgid ""
3633 "    return 0;\n"
3634 "}\n"
3635 msgstr ""
3636 "    return 0;\n"
3637 "}\n"
3638
3639 #. type: Plain text
3640 #: build/C/man3/fopencookie.3:387
3641 #, no-wrap
3642 msgid ""
3643 "int\n"
3644 "main(int argc, char *argv[])\n"
3645 "{\n"
3646 "    cookie_io_functions_t  memfile_func = {\n"
3647 "        .read  = memfile_read,\n"
3648 "        .write = memfile_write,\n"
3649 "        .seek  = memfile_seek,\n"
3650 "        .close = memfile_close\n"
3651 "    };\n"
3652 "    FILE *fp;\n"
3653 "    struct memfile_cookie mycookie;\n"
3654 "    ssize_t nread;\n"
3655 "    long p;\n"
3656 "    int j;\n"
3657 "    char buf[1000];\n"
3658 msgstr ""
3659 "int\n"
3660 "main(int argc, char *argv[])\n"
3661 "{\n"
3662 "    cookie_io_functions_t  memfile_func = {\n"
3663 "        .read  = memfile_read,\n"
3664 "        .write = memfile_write,\n"
3665 "        .seek  = memfile_seek,\n"
3666 "        .close = memfile_close\n"
3667 "    };\n"
3668 "    FILE *fp;\n"
3669 "    struct memfile_cookie mycookie;\n"
3670 "    ssize_t nread;\n"
3671 "    long p;\n"
3672 "    int j;\n"
3673 "    char buf[1000];\n"
3674
3675 #. type: Plain text
3676 #: build/C/man3/fopencookie.3:389
3677 #, no-wrap
3678 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3679 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3680
3681 #. type: Plain text
3682 #: build/C/man3/fopencookie.3:395
3683 #, no-wrap
3684 msgid ""
3685 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3686 "    if (mycookie.buf == NULL) {\n"
3687 "        perror(\"malloc\");\n"
3688 "        exit(EXIT_FAILURE);\n"
3689 "    }\n"
3690 msgstr ""
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
3697 #. type: Plain text
3698 #: build/C/man3/fopencookie.3:399
3699 #, no-wrap
3700 msgid ""
3701 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3702 "    mycookie.offset = 0;\n"
3703 "    mycookie.endpos = 0;\n"
3704 msgstr ""
3705 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3706 "    mycookie.offset = 0;\n"
3707 "    mycookie.endpos = 0;\n"
3708
3709 #. type: Plain text
3710 #: build/C/man3/fopencookie.3:405
3711 #, no-wrap
3712 msgid ""
3713 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3714 "    if (fp == NULL) {\n"
3715 "        perror(\"fopencookie\");\n"
3716 "        exit(EXIT_FAILURE);\n"
3717 "    }\n"
3718 msgstr ""
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
3725 #. type: Plain text
3726 #: build/C/man3/fopencookie.3:407
3727 #, no-wrap
3728 msgid "    /* Write command-line arguments to our file */\n"
3729 msgstr "    /* Write command-line arguments to our file */\n"
3730
3731 #. type: Plain text
3732 #: build/C/man3/fopencookie.3:413
3733 #, no-wrap
3734 msgid ""
3735 "    for (j = 1; j E<lt> argc; j++)\n"
3736 "        if (fputs(argv[j], fp) == EOF) {\n"
3737 "            perror(\"fputs\");\n"
3738 "            exit(EXIT_FAILURE);\n"
3739 "        }\n"
3740 msgstr ""
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
3747 #. type: Plain text
3748 #: build/C/man3/fopencookie.3:415
3749 #, no-wrap
3750 msgid "    /* Read two bytes out of every five, until EOF */\n"
3751 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3752
3753 #. type: Plain text
3754 #: build/C/man3/fopencookie.3:430
3755 #, no-wrap
3756 msgid ""
3757 "    for (p = 0; ; p += 5) {\n"
3758 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3759 "            perror(\"fseek\");\n"
3760 "            exit(EXIT_FAILURE);\n"
3761 "        }\n"
3762 "        nread = fread(buf, 1, 2, fp);\n"
3763 "        if (nread == -1) {\n"
3764 "            perror(\"fread\");\n"
3765 "            exit(EXIT_FAILURE);\n"
3766 "        }\n"
3767 "        if (nread == 0) {\n"
3768 "            printf(\"Reached end of file\\en\");\n"
3769 "            break;\n"
3770 "        }\n"
3771 msgstr ""
3772 "    for (p = 0; ; p += 5) {\n"
3773 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3774 "            perror(\"fseek\");\n"
3775 "            exit(EXIT_FAILURE);\n"
3776 "        }\n"
3777 "        nread = fread(buf, 1, 2, fp);\n"
3778 "        if (nread == -1) {\n"
3779 "            perror(\"fread\");\n"
3780 "            exit(EXIT_FAILURE);\n"
3781 "        }\n"
3782 "        if (nread == 0) {\n"
3783 "            printf(\"Reached end of file\\en\");\n"
3784 "            break;\n"
3785 "        }\n"
3786
3787 #. type: Plain text
3788 #: build/C/man3/fopencookie.3:433
3789 #, no-wrap
3790 msgid ""
3791 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3792 "    }\n"
3793 msgstr ""
3794 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3795 "    }\n"
3796
3797 #. type: Plain text
3798 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
3799 #, no-wrap
3800 msgid ""
3801 "    exit(EXIT_SUCCESS);\n"
3802 "}\n"
3803 msgstr ""
3804 "    exit(EXIT_SUCCESS);\n"
3805 "}\n"
3806
3807 #. type: Plain text
3808 #: build/C/man3/fopencookie.3:442
3809 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3810 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3811
3812 #. type: TH
3813 #: build/C/man3/fpurge.3:25
3814 #, no-wrap
3815 msgid "FPURGE"
3816 msgstr "FPURGE"
3817
3818 #. type: TH
3819 #: build/C/man3/fpurge.3:25
3820 #, no-wrap
3821 msgid "2001-12-15"
3822 msgstr "2001-12-15"
3823
3824 #. type: Plain text
3825 #: build/C/man3/fpurge.3:28
3826 msgid "fpurge, __fpurge - purge a stream"
3827 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3828
3829 #. type: Plain text
3830 #: build/C/man3/fpurge.3:32
3831 #, no-wrap
3832 msgid ""
3833 "/* unsupported */\n"
3834 "B<#include E<lt>stdio.hE<gt>>\n"
3835 msgstr ""
3836 "/* unsupported */\n"
3837 "B<#include E<lt>stdio.hE<gt>>\n"
3838
3839 #. type: Plain text
3840 #: build/C/man3/fpurge.3:34
3841 #, no-wrap
3842 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3843 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3844
3845 #. type: Plain text
3846 #: build/C/man3/fpurge.3:37
3847 #, no-wrap
3848 msgid ""
3849 "/* supported */\n"
3850 "B<#include E<lt>stdio.hE<gt>>\n"
3851 msgstr ""
3852 "/* supported */\n"
3853 "B<#include E<lt>stdio.hE<gt>>\n"
3854
3855 #. type: Plain text
3856 #: build/C/man3/fpurge.3:39
3857 #, no-wrap
3858 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3859 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3860
3861 #. type: Plain text
3862 #: build/C/man3/fpurge.3:41
3863 #, no-wrap
3864 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3865 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3866
3867 #. type: Plain text
3868 #: build/C/man3/fpurge.3:54
3869 msgid ""
3870 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3871 "output streams this discards any unwritten output.  For input streams this "
3872 "discards any input read from the underlying object but not yet obtained via "
3873 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3874 "B<fflush>(3)."
3875 msgstr ""
3876 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3877 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3878 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3879 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3880 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3881
3882 #. type: Plain text
3883 #: build/C/man3/fpurge.3:58
3884 msgid ""
3885 "The function B<__fpurge>()  does precisely the same, but without returning a "
3886 "value."
3887 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3888
3889 #. type: Plain text
3890 #: build/C/man3/fpurge.3:65
3891 msgid ""
3892 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3893 "and sets I<errno> appropriately."
3894 msgstr ""
3895 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3896 "を適切な値に設定する。"
3897
3898 #. type: Plain text
3899 #: build/C/man3/fpurge.3:70
3900 msgid "I<stream> is not an open stream."
3901 msgstr "I<stream> がオープンされていない。"
3902
3903 #. type: Plain text
3904 #: build/C/man3/fpurge.3:78
3905 msgid ""
3906 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3907 "was introduced in 4.4BSD and is not available under Linux.  The function "
3908 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3909 "later."
3910 msgstr ""
3911 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3912 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3913 "され、glibc 2.1.95 以降には存在している。"
3914
3915 #. type: Plain text
3916 #: build/C/man3/fpurge.3:80
3917 msgid "Usually it is a mistake to want to discard input buffers."
3918 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3919
3920 #.  .BR fclean (3),
3921 #. type: Plain text
3922 #: build/C/man3/fpurge.3:85
3923 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3924 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3925
3926 #. type: TH
3927 #: build/C/man3/fputwc.3:16
3928 #, no-wrap
3929 msgid "FPUTWC"
3930 msgstr "FPUTWC"
3931
3932 #. type: Plain text
3933 #: build/C/man3/fputwc.3:19
3934 msgid "fputwc, putwc - write a wide character to a FILE stream"
3935 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3936
3937 #. type: Plain text
3938 #: build/C/man3/fputwc.3:27
3939 #, no-wrap
3940 msgid ""
3941 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3942 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3943 msgstr ""
3944 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3945 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3946
3947 #. type: Plain text
3948 #: build/C/man3/fputwc.3:43
3949 msgid ""
3950 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3951 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3952 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3953 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3954 "it returns I<wc>."
3955 msgstr ""
3956 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3957 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3958 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3959 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3960 "関数は I<wc> を返す。"
3961
3962 #. type: Plain text
3963 #: build/C/man3/fputwc.3:51
3964 msgid ""
3965 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3966 "may be implemented as a macro, and may evaluate its argument more than "
3967 "once.  There is no reason ever to use it."
3968 msgstr ""
3969 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3970 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3971 "ない。この関数を使う理由はもはや存在しない。"
3972
3973 #. type: Plain text
3974 #: build/C/man3/fputwc.3:63
3975 msgid ""
3976 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3977 "indicate an error.  In the event of an error, I<errno> is set to indicate "
3978 "the cause."
3979 msgstr ""
3980 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3981 "B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
3982
3983 #. type: Plain text
3984 #: build/C/man3/fputwc.3:68
3985 msgid "Conversion of I<wc> to the stream's encoding fails."
3986 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3987
3988 #. type: Plain text
3989 #: build/C/man3/fputwc.3:77
3990 msgid ""
3991 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3992 "current locale."
3993 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
3994
3995 #. type: Plain text
3996 #: build/C/man3/fputwc.3:85
3997 msgid ""
3998 "In the absence of additional information passed to the B<fopen>(3)  call, it "
3999 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
4000 "sequence corresponding to the wide character I<wc>."
4001 msgstr ""
4002 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
4003 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
4004 "よい。"
4005
4006 #. type: Plain text
4007 #: build/C/man3/fputwc.3:89
4008 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4009 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
4010
4011 #. type: TH
4012 #: build/C/man3/fread.3:45
4013 #, no-wrap
4014 msgid "FREAD"
4015 msgstr "FREAD"
4016
4017 #. type: TH
4018 #: build/C/man3/fread.3:45
4019 #, no-wrap
4020 msgid "2012-03-30"
4021 msgstr "2012-03-30"
4022
4023 #. type: Plain text
4024 #: build/C/man3/fread.3:48
4025 msgid "fread, fwrite - binary stream input/output"
4026 msgstr "fread, fwrite - バイナリストリームの入出力"
4027
4028 #. type: Plain text
4029 #: build/C/man3/fread.3:54
4030 #, no-wrap
4031 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4032 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
4033
4034 #. type: Plain text
4035 #: build/C/man3/fread.3:57
4036 #, no-wrap
4037 msgid ""
4038 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4039 "B<              FILE *>I<stream>B<);>\n"
4040 msgstr ""
4041 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
4042 "B<              FILE *>I<stream>B<);>\n"
4043
4044 #. type: Plain text
4045 #: build/C/man3/fread.3:69
4046 msgid ""
4047 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
4048 "long, from the stream pointed to by I<stream>, storing them at the location "
4049 "given by I<ptr>."
4050 msgstr ""
4051 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
4052 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
4053 "I<size> バイトの長さを持つ。"
4054
4055 #. type: Plain text
4056 #: build/C/man3/fread.3:80
4057 msgid ""
4058 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
4059 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
4060 "location given by I<ptr>."
4061 msgstr ""
4062 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
4063 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
4064 "バイトの長さを持つ。"
4065
4066 #. type: Plain text
4067 #: build/C/man3/fread.3:96
4068 msgid ""
4069 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
4070 "or written.  This number equals the number of bytes transferred only when "
4071 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
4072 "return value is a short item count (or zero)."
4073 msgstr ""
4074 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
4075 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
4076 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
4077 "返り値は指定した個数よりも小さい値 (または 0) となる。"
4078
4079 #. type: Plain text
4080 #: build/C/man3/fread.3:103
4081 msgid ""
4082 "B<fread>()  does not distinguish between end-of-file and error, and callers "
4083 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
4084 msgstr ""
4085 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
4086 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
4087 "らない。"
4088
4089 #. type: Plain text
4090 #: build/C/man3/fread.3:105
4091 msgid "C89, POSIX.1-2001."
4092 msgstr "C89, POSIX.1-2001."
4093
4094 #. type: Plain text
4095 #: build/C/man3/fread.3:111
4096 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4097 msgstr ""
4098 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
4099
4100 #. type: TH
4101 #: build/C/man3/fseek.3:42
4102 #, no-wrap
4103 msgid "FSEEK"
4104 msgstr "FSEEK"
4105
4106 #. type: TH
4107 #: build/C/man3/fseek.3:42
4108 #, no-wrap
4109 msgid "1993-11-29"
4110 msgstr "1993-11-29"
4111
4112 #. type: Plain text
4113 #: build/C/man3/fseek.3:45
4114 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
4115 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
4116
4117 #. type: Plain text
4118 #: build/C/man3/fseek.3:49
4119 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4120 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
4121
4122 #. type: Plain text
4123 #: build/C/man3/fseek.3:51
4124 msgid "B<long ftell(FILE *>I<stream>B<);>"
4125 msgstr "B<long ftell(FILE *>I<stream>B<);>"
4126
4127 #. type: Plain text
4128 #: build/C/man3/fseek.3:53
4129 msgid "B<void rewind(FILE *>I<stream>B<);>"
4130 msgstr "B<void rewind(FILE *>I<stream>B<);>"
4131
4132 #. type: Plain text
4133 #: build/C/man3/fseek.3:55
4134 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4135 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4136
4137 #. type: Plain text
4138 #: build/C/man3/fseek.3:57
4139 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4140 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
4141
4142 #. type: Plain text
4143 #: build/C/man3/fseek.3:81
4144 msgid ""
4145 "The B<fseek>()  function sets the file position indicator for the stream "
4146 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
4147 "by adding I<offset> bytes to the position specified by I<whence>.  If "
4148 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
4149 "relative to the start of the file, the current position indicator, or end-of-"
4150 "file, respectively.  A successful call to the B<fseek>()  function clears "
4151 "the end-of-file indicator for the stream and undoes any effects of the "
4152 "B<ungetc>(3)  function on the same stream."
4153 msgstr ""
4154 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
4155 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
4156 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
4157 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
4158 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
4159 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4160 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4161 "かったことになる。"
4162
4163 #. type: Plain text
4164 #: build/C/man3/fseek.3:87
4165 msgid ""
4166 "The B<ftell>()  function obtains the current value of the file position "
4167 "indicator for the stream pointed to by I<stream>."
4168 msgstr ""
4169 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4170 "置表示子 の現時点での値を与える。"
4171
4172 #. type: Plain text
4173 #: build/C/man3/fseek.3:94
4174 msgid ""
4175 "The B<rewind>()  function sets the file position indicator for the stream "
4176 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4177 msgstr ""
4178 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4179 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4180
4181 #. type: Plain text
4182 #: build/C/man3/fseek.3:97
4183 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4184 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4185
4186 #. type: Plain text
4187 #: build/C/man3/fseek.3:101
4188 msgid ""
4189 "except that the error indicator for the stream is also cleared (see "
4190 "B<clearerr>(3))."
4191 msgstr ""
4192 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4193 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4194
4195 #. type: Plain text
4196 #: build/C/man3/fseek.3:121
4197 msgid ""
4198 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4199 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
4200 "B<SEEK_SET>), setting and storing the current value of the file offset into "
4201 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
4202 "I<fpos_t> object may be a complex object and these routines may be the only "
4203 "way to portably reposition a text stream."
4204 msgstr ""
4205 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4206 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4207 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4208 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4209 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4210 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4211 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4212
4213 #. type: Plain text
4214 #: build/C/man3/fseek.3:136
4215 msgid ""
4216 "The B<rewind>()  function returns no value.  Upon successful completion, "
4217 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4218 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4219 "indicate the error."
4220 msgstr ""
4221 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4222 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4223 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4224
4225 #. type: Plain text
4226 #: build/C/man3/fseek.3:142
4227 msgid "The I<stream> specified is not a seekable stream."
4228 msgstr "指定した I<stream> がシークできない。"
4229
4230 #. type: Plain text
4231 #: build/C/man3/fseek.3:153
4232 msgid ""
4233 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4234 "B<SEEK_CUR>."
4235 msgstr ""
4236 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4237 "B<SEEK_CUR> 以外の値であった。"
4238
4239 #. type: Plain text
4240 #: build/C/man3/fseek.3:168
4241 msgid ""
4242 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4243 "also fail and set I<errno> for any of the errors specified for the routines "
4244 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4245 msgstr ""
4246 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4247 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4248 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4249
4250 #. type: Plain text
4251 #: build/C/man3/fseek.3:173
4252 msgid "B<lseek>(2), B<fseeko>(3)"
4253 msgstr "B<lseek>(2), B<fseeko>(3)"
4254
4255 #. type: TH
4256 #: build/C/man3/fseeko.3:25
4257 #, no-wrap
4258 msgid "FSEEKO"
4259 msgstr "FSEEKO"
4260
4261 #. type: TH
4262 #: build/C/man3/fseeko.3:25
4263 #, no-wrap
4264 msgid "2001-11-05"
4265 msgstr "2001-11-05"
4266
4267 #. type: Plain text
4268 #: build/C/man3/fseeko.3:28
4269 msgid "fseeko, ftello - seek to or report file position"
4270 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4271
4272 #. type: Plain text
4273 #: build/C/man3/fseeko.3:33
4274 #, no-wrap
4275 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4276 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4277
4278 #. type: Plain text
4279 #: build/C/man3/fseeko.3:36
4280 #, no-wrap
4281 msgid ""
4282 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4283 "\n"
4284 msgstr ""
4285 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4286 "\n"
4287
4288 #. type: Plain text
4289 #: build/C/man3/fseeko.3:58
4290 msgid ""
4291 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4292 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4293 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4294 "I<off_t> instead of I<long>."
4295 msgstr ""
4296 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4297 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4298 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4299 "I<off_t> になっている。"
4300
4301 #. type: Plain text
4302 #: build/C/man3/fseeko.3:65
4303 msgid ""
4304 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4305 "compilation with"
4306 msgstr ""
4307 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4308
4309 #. type: Plain text
4310 #: build/C/man3/fseeko.3:69 build/C/man3/lseek64.3:81
4311 #, no-wrap
4312 msgid "#define _FILE_OFFSET_BITS 64\n"
4313 msgstr "#define _FILE_OFFSET_BITS 64\n"
4314
4315 #. type: Plain text
4316 #: build/C/man3/fseeko.3:75
4317 msgid "will turn I<off_t> into a 64-bit type."
4318 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4319
4320 #. type: Plain text
4321 #: build/C/man3/fseeko.3:84
4322 msgid ""
4323 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4324 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4325 "indicate the error."
4326 msgstr ""
4327 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4328 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4329
4330 #. type: Plain text
4331 #: build/C/man3/fseeko.3:87
4332 msgid "See the ERRORS in B<fseek>(3)."
4333 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4334
4335 #. type: Plain text
4336 #: build/C/man3/fseeko.3:89
4337 msgid "SUSv2, POSIX.1-2001."
4338 msgstr "SUSv2, POSIX.1-2001."
4339
4340 #. type: Plain text
4341 #: build/C/man3/fseeko.3:93
4342 msgid ""
4343 "These functions are found on System V-like systems.  They are not present in "
4344 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4345 msgstr ""
4346 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4347 "かったが、 glibc 2.1 から使えるようになった。"
4348
4349 #. type: Plain text
4350 #: build/C/man3/fseeko.3:95
4351 msgid "B<fseek>(3)"
4352 msgstr "B<fseek>(3)"
4353
4354 #. type: TH
4355 #: build/C/man3/getline.3:26
4356 #, no-wrap
4357 msgid "GETLINE"
4358 msgstr "GETLINE"
4359
4360 #. type: Plain text
4361 #: build/C/man3/getline.3:29
4362 msgid "getline, getdelim - delimited string input"
4363 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4364
4365 #. type: Plain text
4366 #: build/C/man3/getline.3:34
4367 #, no-wrap
4368 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4369 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4370
4371 #. type: Plain text
4372 #: build/C/man3/getline.3:37
4373 #, no-wrap
4374 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4375 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4376
4377 #. type: Plain text
4378 #: build/C/man3/getline.3:47
4379 msgid "B<getline>(), B<getdelim>():"
4380 msgstr "B<getline>(), B<getdelim>():"
4381
4382 #. type: Plain text
4383 #: build/C/man3/getline.3:52
4384 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4385 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4386
4387 #. type: Plain text
4388 #: build/C/man3/getline.3:65
4389 msgid ""
4390 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4391 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4392 "terminated and includes the newline character, if one was found."
4393 msgstr ""
4394 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4395 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4396 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4397
4398 #. type: Plain text
4399 #: build/C/man3/getline.3:75
4400 msgid ""
4401 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4402 "storing the line, which should be freed by the user program.  (In this case, "
4403 "the value in I<*n> is ignored.)"
4404 msgstr ""
4405 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4406 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4407 "合、 I<*n> の値は無視される)。"
4408
4409 #. type: Plain text
4410 #: build/C/man3/getline.3:93
4411 msgid ""
4412 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4413 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4414 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4415 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4416 msgstr ""
4417 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4418 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4419 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4420 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4421 "I<*n> を更新する。"
4422
4423 #. type: Plain text
4424 #: build/C/man3/getline.3:99
4425 msgid ""
4426 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4427 "to reflect the buffer address and allocated size respectively."
4428 msgstr ""
4429 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4430 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4431
4432 #. type: Plain text
4433 #: build/C/man3/getline.3:110
4434 msgid ""
4435 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4436 "than newline can be specified as the I<delimiter> argument.  As with "
4437 "B<getline>(), a delimiter character is not added if one was not present in "
4438 "the input before end of file was reached."
4439 msgstr ""
4440 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4441 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4442 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4443 "ファに追加しない。"
4444
4445 #. type: Plain text
4446 #: build/C/man3/getline.3:119
4447 msgid ""
4448 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4449 "read, including the delimiter character, but not including the terminating "
4450 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
4451 "bytes in the line read."
4452 msgstr ""
4453 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4454 "字数には区切り文字は含まれるが、終端に使う NULL バイト (\\(aq\\e0\\(aq) は含"
4455 "まれない。 この値によって、読み込んだ行に含まれる NULL バイトを操作することが"
4456 "できる。"
4457
4458 #. type: Plain text
4459 #: build/C/man3/getline.3:125
4460 msgid ""
4461 "Both functions return -1 on failure to read a line (including end-of-file "
4462 "condition).  In the event of an error, I<errno> is set to indicate the cause."
4463 msgstr ""
4464 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4465 "した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因"
4466 "を示す値が設定される。"
4467
4468 #. type: Plain text
4469 #: build/C/man3/getline.3:135
4470 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4471 msgstr ""
4472 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4473 "I<stream> が有効でない)。"
4474
4475 #. type: Plain text
4476 #: build/C/man3/getline.3:137
4477 msgid "These functions are available since libc 4.6.27."
4478 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4479
4480 #. type: Plain text
4481 #: build/C/man3/getline.3:144
4482 msgid ""
4483 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4484 "were standardized in POSIX.1-2008."
4485 msgstr ""
4486 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4487 "POSIX.1-2008 で標準化された。"
4488
4489 #. type: Plain text
4490 #: build/C/man3/getline.3:149
4491 #, no-wrap
4492 msgid ""
4493 "#define _GNU_SOURCE\n"
4494 "#include E<lt>stdio.hE<gt>\n"
4495 "#include E<lt>stdlib.hE<gt>\n"
4496 msgstr ""
4497 "#define _GNU_SOURCE\n"
4498 "#include E<lt>stdio.hE<gt>\n"
4499 "#include E<lt>stdlib.hE<gt>\n"
4500
4501 #. type: Plain text
4502 #: build/C/man3/getline.3:157
4503 #, no-wrap
4504 msgid ""
4505 "int\n"
4506 "main(void)\n"
4507 "{\n"
4508 "    FILE *fp;\n"
4509 "    char *line = NULL;\n"
4510 "    size_t len = 0;\n"
4511 "    ssize_t read;\n"
4512 msgstr ""
4513 "int\n"
4514 "main(void)\n"
4515 "{\n"
4516 "    FILE *fp;\n"
4517 "    char *line = NULL;\n"
4518 "    size_t len = 0;\n"
4519 "    ssize_t read;\n"
4520
4521 #. type: Plain text
4522 #: build/C/man3/getline.3:161
4523 #, no-wrap
4524 msgid ""
4525 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4526 "    if (fp == NULL)\n"
4527 "        exit(EXIT_FAILURE);\n"
4528 msgstr ""
4529 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4530 "    if (fp == NULL)\n"
4531 "        exit(EXIT_FAILURE);\n"
4532
4533 #. type: Plain text
4534 #: build/C/man3/getline.3:166
4535 #, no-wrap
4536 msgid ""
4537 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4538 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4539 "        printf(\"%s\", line);\n"
4540 "    }\n"
4541 msgstr ""
4542 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4543 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4544 "        printf(\"%s\", line);\n"
4545 "    }\n"
4546
4547 #. type: Plain text
4548 #: build/C/man3/getline.3:170
4549 #, no-wrap
4550 msgid ""
4551 "    free(line);\n"
4552 "    exit(EXIT_SUCCESS);\n"
4553 "}\n"
4554 msgstr ""
4555 "    free(line);\n"
4556 "    exit(EXIT_SUCCESS);\n"
4557 "}\n"
4558
4559 #. type: Plain text
4560 #: build/C/man3/getline.3:178
4561 msgid ""
4562 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4563 msgstr ""
4564 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4565
4566 #. type: TH
4567 #: build/C/man3/gets.3:27
4568 #, no-wrap
4569 msgid "GETS"
4570 msgstr "GETS"
4571
4572 #. type: TH
4573 #: build/C/man3/gets.3:27
4574 #, no-wrap
4575 msgid "2012-01-18"
4576 msgstr "2012-01-18"
4577
4578 #. type: Plain text
4579 #: build/C/man3/gets.3:30
4580 msgid ""
4581 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4582 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4583
4584 #. type: Plain text
4585 #: build/C/man3/gets.3:35
4586 #, no-wrap
4587 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4588 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4589
4590 #. type: Plain text
4591 #: build/C/man3/gets.3:37
4592 #, no-wrap
4593 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4594 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4595
4596 #. type: Plain text
4597 #: build/C/man3/gets.3:39
4598 #, no-wrap
4599 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4600 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4601
4602 #. type: Plain text
4603 #: build/C/man3/gets.3:41
4604 #, no-wrap
4605 msgid "B<int getchar(void);>\n"
4606 msgstr "B<int getchar(void);>\n"
4607
4608 #. type: Plain text
4609 #: build/C/man3/gets.3:43
4610 #, no-wrap
4611 msgid "B<char *gets(char *>I<s>B<);>\n"
4612 msgstr "B<char *gets(char *>I<s>B<);>\n"
4613
4614 #. type: Plain text
4615 #: build/C/man3/gets.3:45
4616 #, no-wrap
4617 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4618 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4619
4620 #. type: Plain text
4621 #: build/C/man3/gets.3:57
4622 msgid ""
4623 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4624 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4625 msgstr ""
4626 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4627 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4628 "す。"
4629
4630 #. type: Plain text
4631 #: build/C/man3/gets.3:64
4632 msgid ""
4633 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4634 "a macro which evaluates I<stream> more than once."
4635 msgstr ""
4636 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4637 "実装されているかもしれない。"
4638
4639 #. type: Plain text
4640 #: build/C/man3/gets.3:68
4641 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4642 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4643
4644 #. type: Plain text
4645 #: build/C/man3/gets.3:78
4646 msgid ""
4647 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4648 "until either a terminating newline or B<EOF>, which it replaces with a null "
4649 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4650 "below)."
4651 msgstr ""
4652 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4653 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4654 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4655 "記の「バグ」を参照)。"
4656
4657 #. type: Plain text
4658 #: build/C/man3/gets.3:92
4659 msgid ""
4660 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4661 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4662 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4663 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4664 "in the buffer."
4665 msgstr ""
4666 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4667 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4668 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4669 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4670
4671 #. type: Plain text
4672 #: build/C/man3/gets.3:103
4673 msgid ""
4674 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4675 "it is available for subsequent read operations.  Pushed-back characters will "
4676 "be returned in reverse order; only one pushback is guaranteed."
4677 msgstr ""
4678 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4679 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4680 "しとして保証されているのは、一文字だけである。"
4681
4682 #. type: Plain text
4683 #: build/C/man3/gets.3:108
4684 msgid ""
4685 "Calls to the functions described here can be mixed with each other and with "
4686 "calls to other input functions from the I<stdio> library for the same input "
4687 "stream."
4688 msgstr ""
4689 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4690 "互いに混ぜて使うことができる。"
4691
4692 #. type: Plain text
4693 #: build/C/man3/gets.3:123
4694 msgid ""
4695 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4696 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4697 msgstr ""
4698 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4699 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4700 "す。"
4701
4702 #. type: Plain text
4703 #: build/C/man3/gets.3:131
4704 msgid ""
4705 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4706 "end of file occurs while no characters have been read."
4707 msgstr ""
4708 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4709 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4710
4711 #. type: Plain text
4712 #: build/C/man3/gets.3:138
4713 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4714 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4715
4716 #. type: Plain text
4717 #: build/C/man3/gets.3:140
4718 msgid "C89, C99, POSIX.1-2001."
4719 msgstr "C89, C99, POSIX.1-2001."
4720
4721 #. type: Plain text
4722 #: build/C/man3/gets.3:152
4723 msgid ""
4724 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4725 "C11 removes the specification of B<gets>()  from the C language, and since "
4726 "version 2.16, glibc header files don't expose the function declaration if "
4727 "the B<_ISOC11_SOURCE> feature test macro is defined."
4728 msgstr ""
4729 "LSB は B<gets>() を非推奨としている。\n"
4730 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4731 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4732 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4733 "た\n"
4734 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4735
4736 #. type: Plain text
4737 #: build/C/man3/gets.3:166
4738 msgid ""
4739 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4740 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4741 "()  will continue to store characters past the end of the buffer, it is "
4742 "extremely dangerous to use.  It has been used to break computer security.  "
4743 "Use B<fgets>()  instead."
4744 msgstr ""
4745 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4746 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4747 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4748 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4749 "と。"
4750
4751 #. type: Plain text
4752 #: build/C/man3/gets.3:173
4753 msgid ""
4754 "It is not advisable to mix calls to input functions from the I<stdio> "
4755 "library with low-level calls to B<read>(2)  for the file descriptor "
4756 "associated with the input stream; the results will be undefined and very "
4757 "probably not what you want."
4758 msgstr ""
4759 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4760 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4761 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4762
4763 #. type: Plain text
4764 #: build/C/man3/gets.3:189
4765 msgid ""
4766 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4767 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4768 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4769 msgstr ""
4770 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4771 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4772 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4773 "B<feature_test_macros>(7)"
4774
4775 #. type: TH
4776 #: build/C/man3/getw.3:25
4777 #, no-wrap
4778 msgid "GETW"
4779 msgstr "GETW"
4780
4781 #. type: TH
4782 #: build/C/man3/getw.3:25
4783 #, no-wrap
4784 msgid "2010-09-26"
4785 msgstr "2010-09-26"
4786
4787 #. type: Plain text
4788 #: build/C/man3/getw.3:28
4789 msgid "getw, putw - input and output of words (ints)"
4790 msgstr "getw, putw - ワード(int)の入出力"
4791
4792 #. type: Plain text
4793 #: build/C/man3/getw.3:33
4794 #, no-wrap
4795 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4796 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4797
4798 #. type: Plain text
4799 #: build/C/man3/getw.3:35
4800 #, no-wrap
4801 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4802 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4803
4804 #. type: Plain text
4805 #: build/C/man3/getw.3:44
4806 msgid "B<getw>(), B<putw>():"
4807 msgstr "B<getw>(), B<putw>():"
4808
4809 #. type: TP
4810 #: build/C/man3/getw.3:47
4811 #, no-wrap
4812 msgid "Since glibc 2.3.3:"
4813 msgstr "glibc 2.3.3 以降:"
4814
4815 #. type: Plain text
4816 #: build/C/man3/getw.3:50
4817 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4818 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4819
4820 #. type: Plain text
4821 #: build/C/man3/getw.3:53
4822 #, no-wrap
4823 msgid ""
4824 "(_XOPEN_SOURCE &&\n"
4825 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4826 msgstr ""
4827 "(_XOPEN_SOURCE &&\n"
4828 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4829
4830 #. type: TP
4831 #: build/C/man3/getw.3:53
4832 #, no-wrap
4833 msgid "Before glibc 2.3.3:"
4834 msgstr "glibc 2.3.3 より前:"
4835
4836 #. type: Plain text
4837 #: build/C/man3/getw.3:56
4838 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4839 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4840
4841 #. type: Plain text
4842 #: build/C/man3/getw.3:66
4843 msgid ""
4844 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4845 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4846 msgstr ""
4847 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4848 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4849 "ことを勧める。"
4850
4851 #. type: Plain text
4852 #: build/C/man3/getw.3:73
4853 msgid ""
4854 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4855 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4856 "instead."
4857 msgstr ""
4858 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4859 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4860 "使用することを勧める。"
4861
4862 #. type: Plain text
4863 #: build/C/man3/getw.3:80
4864 msgid ""
4865 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4866 "error, they return B<EOF>."
4867 msgstr ""
4868 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4869 "が発生した場合、これらの関数は B<EOF> を返す。"
4870
4871 #. type: Plain text
4872 #: build/C/man3/getw.3:82
4873 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4874 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4875
4876 #. type: Plain text
4877 #: build/C/man3/getw.3:86
4878 msgid ""
4879 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4880 "can be used to distinguish between the two cases."
4881 msgstr ""
4882 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4883 "(3)  を用いると、この二つの場合を区別することが出来る。"
4884
4885 #. type: Plain text
4886 #: build/C/man3/getw.3:92
4887 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4888 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4889
4890 #. type: TH
4891 #: build/C/man2/link.2:31
4892 #, no-wrap
4893 msgid "LINK"
4894 msgstr "LINK"
4895
4896 #. type: TH
4897 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32
4898 #: build/C/man2/write.2:39
4899 #, no-wrap
4900 msgid "2013-01-27"
4901 msgstr "2013-01-27"
4902
4903 #. type: Plain text
4904 #: build/C/man2/link.2:34
4905 msgid "link - make a new name for a file"
4906 msgstr "link - ファイルの新しい名前を作成する"
4907
4908 #. type: Plain text
4909 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34
4910 #: build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35
4911 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4912 msgid "B<#include E<lt>unistd.hE<gt>>"
4913 msgstr "B<#include E<lt>unistd.hE<gt>>"
4914
4915 #. type: Plain text
4916 #: build/C/man2/link.2:38
4917 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4918 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4919
4920 #. type: Plain text
4921 #: build/C/man2/link.2:41
4922 msgid ""
4923 "B<link>()  creates a new link (also known as a hard link) to an existing "
4924 "file."
4925 msgstr ""
4926 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4927 "link) ともいう) を作成する。"
4928
4929 #. type: Plain text
4930 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4931 msgid "If I<newpath> exists it will I<not> be overwritten."
4932 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4933
4934 #. type: Plain text
4935 #: build/C/man2/link.2:52
4936 msgid ""
4937 "This new name may be used exactly as the old one for any operation; both "
4938 "names refer to the same file (and so have the same permissions and "
4939 "ownership) and it is impossible to tell which name was the \"original\"."
4940 msgstr ""
4941 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4942 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4943 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4944
4945 #. type: Plain text
4946 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4947 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4948 #: build/C/man2/unlink.2:60
4949 msgid ""
4950 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4951 "appropriately."
4952 msgstr ""
4953 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4954 "定される。"
4955
4956 #. type: TP
4957 #: build/C/man2/link.2:58 build/C/man2/open.2:577 build/C/man2/readlink.2:86
4958 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4959 #: build/C/man3/tmpfile.3:57 build/C/man2/unlink.2:61
4960 #, no-wrap
4961 msgid "B<EACCES>"
4962 msgstr "B<EACCES>"
4963
4964 #. type: Plain text
4965 #: build/C/man2/link.2:69
4966 msgid ""
4967 "Write access to the directory containing I<newpath> is denied, or search "
4968 "permission is denied for one of the directories in the path prefix of "
4969 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4970 msgstr ""
4971 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4972 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4973 "(B<path_resolution>(7)  を参照)。"
4974
4975 #. type: TP
4976 #: build/C/man2/link.2:69 build/C/man2/open.2:586 build/C/man2/rename.2:133
4977 #: build/C/man2/symlink.2:99 build/C/man2/write.2:135
4978 #, no-wrap
4979 msgid "B<EDQUOT>"
4980 msgstr "B<EDQUOT>"
4981
4982 #. type: Plain text
4983 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
4984 msgid "The user's quota of disk blocks on the filesystem has been exhausted."
4985 msgstr ""
4986 "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
4987
4988 #. type: TP
4989 #: build/C/man2/link.2:72 build/C/man2/open.2:592 build/C/man2/symlink.2:104
4990 #: build/C/man3/tmpfile.3:60
4991 #, no-wrap
4992 msgid "B<EEXIST>"
4993 msgstr "B<EEXIST>"
4994
4995 #. type: Plain text
4996 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
4997 msgid "I<newpath> already exists."
4998 msgstr "I<newpath> が既に存在する。"
4999
5000 #. type: TP
5001 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:598
5002 #: build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91
5003 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:64
5004 #: build/C/man2/symlink.2:108 build/C/man2/unlink.2:80
5005 #: build/C/man2/write.2:141
5006 #, no-wrap
5007 msgid "B<EFAULT>"
5008 msgstr "B<EFAULT>"
5009
5010 #. type: Plain text
5011 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
5012 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
5013 msgstr ""
5014 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
5015
5016 #. type: TP
5017 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107
5018 #: build/C/man2/symlink.2:111 build/C/man2/unlink.2:84
5019 #: build/C/man2/write.2:165
5020 #, no-wrap
5021 msgid "B<EIO>"
5022 msgstr "B<EIO>"
5023
5024 #. type: Plain text
5025 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
5026 msgid "An I/O error occurred."
5027 msgstr "I/O エラーが発生した。"
5028
5029 #. type: TP
5030 #: build/C/man2/link.2:82 build/C/man2/open.2:629 build/C/man2/readlink.2:110
5031 #: build/C/man2/rename.2:149 build/C/man2/rmdir.2:73
5032 #: build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
5033 #, no-wrap
5034 msgid "B<ELOOP>"
5035 msgstr "B<ELOOP>"
5036
5037 #. type: Plain text
5038 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5039 msgid ""
5040 "Too many symbolic links were encountered in resolving I<oldpath> or "
5041 "I<newpath>."
5042 msgstr ""
5043 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
5044 "る。"
5045
5046 #. type: TP
5047 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
5048 #, no-wrap
5049 msgid "B<EMLINK>"
5050 msgstr "B<EMLINK>"
5051
5052 #. type: Plain text
5053 #: build/C/man2/link.2:91
5054 msgid ""
5055 "The file referred to by I<oldpath> already has the maximum number of links "
5056 "to it."
5057 msgstr ""
5058 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
5059
5060 #. type: TP
5061 #: build/C/man2/link.2:91 build/C/man2/open.2:639 build/C/man2/readlink.2:113
5062 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:77
5063 #: build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
5064 #, no-wrap
5065 msgid "B<ENAMETOOLONG>"
5066 msgstr "B<ENAMETOOLONG>"
5067
5068 #. type: Plain text
5069 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
5070 msgid "I<oldpath> or I<newpath> was too long."
5071 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
5072
5073 #. type: TP
5074 #: build/C/man2/link.2:94 build/C/man2/open.2:653 build/C/man2/readlink.2:116
5075 #: build/C/man2/rename.2:163 build/C/man2/rmdir.2:80
5076 #: build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
5077 #, no-wrap
5078 msgid "B<ENOENT>"
5079 msgstr "B<ENOENT>"
5080
5081 #. type: Plain text
5082 #: build/C/man2/link.2:99
5083 msgid ""
5084 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
5085 "dangling symbolic link."
5086 msgstr ""
5087 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
5088 "(dangling)シンボリックリンクである。"
5089
5090 #. type: TP
5091 #: build/C/man2/link.2:99 build/C/man2/open.2:660 build/C/man2/readlink.2:119
5092 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
5093 #: build/C/man2/symlink.2:128 build/C/man3/tempnam.3:95
5094 #: build/C/man2/unlink.2:106
5095 #, no-wrap
5096 msgid "B<ENOMEM>"
5097 msgstr "B<ENOMEM>"
5098
5099 #. type: Plain text
5100 #: build/C/man2/link.2:102 build/C/man2/open.2:663 build/C/man2/readlink.2:122
5101 #: build/C/man2/rename.2:179 build/C/man2/rmdir.2:88
5102 #: build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
5103 msgid "Insufficient kernel memory was available."
5104 msgstr "十分なカーネルメモリーがない。"
5105
5106 #. type: TP
5107 #: build/C/man2/link.2:102 build/C/man2/open.2:663 build/C/man2/rename.2:179
5108 #: build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:72
5109 #: build/C/man2/write.2:168
5110 #, no-wrap
5111 msgid "B<ENOSPC>"
5112 msgstr "B<ENOSPC>"
5113
5114 #. type: Plain text
5115 #: build/C/man2/link.2:106 build/C/man2/rename.2:183
5116 #: build/C/man2/symlink.2:135
5117 msgid "The device containing the file has no room for the new directory entry."
5118 msgstr ""
5119 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
5120 "空きがない。"
5121
5122 #. type: TP
5123 #: build/C/man2/link.2:106 build/C/man2/open.2:669 build/C/man2/readlink.2:122
5124 #: build/C/man2/rename.2:183 build/C/man2/rmdir.2:88
5125 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
5126 #, no-wrap
5127 msgid "B<ENOTDIR>"
5128 msgstr "B<ENOTDIR>"
5129
5130 #. type: Plain text
5131 #: build/C/man2/link.2:111
5132 msgid ""
5133 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
5134 "a directory."
5135 msgstr ""
5136 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
5137 "い。"
5138
5139 #. type: TP
5140 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:702
5141 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
5142 #: build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
5143 #, no-wrap
5144 msgid "B<EPERM>"
5145 msgstr "B<EPERM>"
5146
5147 #. type: Plain text
5148 #: build/C/man2/link.2:115
5149 msgid "I<oldpath> is a directory."
5150 msgstr "I<oldpath> がディレクトリである。"
5151
5152 #. type: Plain text
5153 #: build/C/man2/link.2:120
5154 msgid ""
5155 "The filesystem containing I<oldpath> and I<newpath> does not support the "
5156 "creation of hard links."
5157 msgstr ""
5158 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
5159 "していない。"
5160
5161 #. type: TP
5162 #: build/C/man2/link.2:120
5163 #, no-wrap
5164 msgid "B<EPERM> (since Linux 3.6)"
5165 msgstr "B<EPERM> (Linux 3.6 以降)"
5166
5167 #. type: Plain text
5168 #: build/C/man2/link.2:127
5169 msgid ""
5170 "The caller does not have permission to create a hard link to this file (see "
5171 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
5172 msgstr ""
5173 "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) "
5174 "の I</proc/sys/fs/protected_hardlink> の説明を参照)。"
5175
5176 #. type: TP
5177 #: build/C/man2/link.2:127 build/C/man2/open.2:710 build/C/man2/rename.2:221
5178 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145
5179 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:137
5180 #, no-wrap
5181 msgid "B<EROFS>"
5182 msgstr "B<EROFS>"
5183
5184 #. type: Plain text
5185 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5186 msgid "The file is on a read-only filesystem."
5187 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5188
5189 #. type: TP
5190 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
5191 #, no-wrap
5192 msgid "B<EXDEV>"
5193 msgstr "B<EXDEV>"
5194
5195 #. type: Plain text
5196 #: build/C/man2/link.2:138
5197 msgid ""
5198 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
5199 "permits a filesystem to be mounted at multiple points, but B<link>()  does "
5200 "not work across different mount points, even if the same filesystem is "
5201 "mounted on both.)"
5202 msgstr ""
5203 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5204 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5205 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5206 "のマウント位置を跨いでは動作しない。)"
5207
5208 #.  SVr4 documents additional ENOLINK and
5209 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5210 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5211 #. type: Plain text
5212 #: build/C/man2/link.2:143
5213 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5214 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5215
5216 #. type: Plain text
5217 #: build/C/man2/link.2:150
5218 msgid ""
5219 "Hard links, as created by B<link>(), cannot span filesystems.  Use B<symlink>"
5220 "(2)  if this is required."
5221 msgstr ""
5222 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5223 "このような場合は B<symlink>(2)  を使用すること。"
5224
5225 #.  more precisely: since kernel 1.3.56
5226 #.  For example, the default Solaris compilation environment
5227 #.  behaves like Linux, and contributors to a March 2005
5228 #.  thread in the Austin mailing list reported that some
5229 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5230 #. type: Plain text
5231 #: build/C/man2/link.2:181
5232 msgid ""
5233 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5234 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5235 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5236 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5237 "the same file that I<oldpath> refers to).  Some other implementations behave "
5238 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5239 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5240 "dereferenced if it is a symbolic link.  For precise control over the "
5241 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5242 msgstr ""
5243 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5244 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5245 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5246 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5247 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5248 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5249 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5250 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5251 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5252 "は B<linkat>(2)  を参照のこと。"
5253
5254 #. type: Plain text
5255 #: build/C/man2/link.2:187
5256 msgid ""
5257 "On NFS filesystems, the return code may be wrong in case the NFS server "
5258 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5259 "to find out if the link got created."
5260 msgstr ""
5261 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5262 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5263 "ためには B<stat>(2)  を使用すること。"
5264
5265 #. type: Plain text
5266 #: build/C/man2/link.2:197
5267 msgid ""
5268 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5269 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5270 msgstr ""
5271 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5272 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5273
5274 #. type: TH
5275 #: build/C/man2/llseek.2:28
5276 #, no-wrap
5277 msgid "LLSEEK"
5278 msgstr "LLSEEK"
5279
5280 #. type: TH
5281 #: build/C/man2/llseek.2:28
5282 #, no-wrap
5283 msgid "2012-07-13"
5284 msgstr "2012-07-13"
5285
5286 #. type: Plain text
5287 #: build/C/man2/llseek.2:31
5288 msgid "_llseek - reposition read/write file offset"
5289 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5290
5291 #. type: Plain text
5292 #: build/C/man2/llseek.2:35
5293 #, no-wrap
5294 msgid ""
5295 "B<#include E<lt>sys/types.hE<gt>>\n"
5296 "B<#include E<lt>unistd.hE<gt>>\n"
5297 msgstr ""
5298 "B<#include E<lt>sys/types.hE<gt>>\n"
5299 "B<#include E<lt>unistd.hE<gt>>\n"
5300
5301 #. type: Plain text
5302 #: build/C/man2/llseek.2:39
5303 #, no-wrap
5304 msgid ""
5305 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5306 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5307 "B<            unsigned int >I<whence>B<);>\n"
5308 msgstr ""
5309 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5310 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5311 "B<            unsigned int >I<whence>B<);>\n"
5312
5313 #. type: Plain text
5314 #: build/C/man2/llseek.2:43
5315 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
5316 msgstr ""
5317 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
5318 "を参照。"
5319
5320 #. type: Plain text
5321 #: build/C/man2/llseek.2:62
5322 msgid ""
5323 "The B<_llseek>()  function repositions the offset of the open file "
5324 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5325 "offset_low> bytes relative to the beginning of the file, the current "
5326 "position in the file, or the end of the file, depending on whether I<whence> "
5327 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5328 "resulting file position in the argument I<result>."
5329 msgstr ""
5330 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5331 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5332 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5333 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5334 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5335 "のファイル位置を I<result> 引き数に返す。"
5336
5337 #. type: Plain text
5338 #: build/C/man2/llseek.2:69
5339 msgid ""
5340 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5341 "-1 is returned and I<errno> is set to indicate the error."
5342 msgstr ""
5343 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5344 "エラーを示す I<errno> が設定される。"
5345
5346 #. type: Plain text
5347 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:175
5348 msgid "I<fd> is not an open file descriptor."
5349 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5350
5351 #. type: Plain text
5352 #: build/C/man2/llseek.2:77
5353 msgid "Problem with copying results to user space."
5354 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5355
5356 #. type: Plain text
5357 #: build/C/man2/llseek.2:81
5358 msgid "I<whence> is invalid."
5359 msgstr "I<whence> が不正である。"
5360
5361 #. type: Plain text
5362 #: build/C/man2/llseek.2:84
5363 msgid ""
5364 "This function is Linux-specific, and should not be used in programs intended "
5365 "to be portable."
5366 msgstr ""
5367 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5368
5369 #. type: Plain text
5370 #: build/C/man2/llseek.2:87
5371 msgid ""
5372 "Glibc does not provide a wrapper for this system call; call it using "
5373 "B<syscall>(2)."
5374 msgstr ""
5375 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5376 "(2)  を使って呼び出すこと。"
5377
5378 #. type: Plain text
5379 #: build/C/man2/llseek.2:90
5380 msgid "B<lseek>(2), B<lseek64>(3)"
5381 msgstr "B<lseek>(2), B<lseek64>(3)"
5382
5383 #. type: TH
5384 #: build/C/man2/lseek.2:47
5385 #, no-wrap
5386 msgid "LSEEK"
5387 msgstr "LSEEK"
5388
5389 #. type: TH
5390 #: build/C/man2/lseek.2:47
5391 #, no-wrap
5392 msgid "2013-03-27"
5393 msgstr "2013-03-27"
5394
5395 #. type: Plain text
5396 #: build/C/man2/lseek.2:50
5397 msgid "lseek - reposition read/write file offset"
5398 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5399
5400 #. type: Plain text
5401 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
5402 msgid "B<#include E<lt>sys/types.hE<gt>>"
5403 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5404
5405 #. type: Plain text
5406 #: build/C/man2/lseek.2:56
5407 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5408 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5409
5410 #. type: Plain text
5411 #: build/C/man2/lseek.2:67
5412 msgid ""
5413 "The B<lseek>()  function repositions the offset of the open file associated "
5414 "with the file descriptor I<fd> to the argument I<offset> according to the "
5415 "directive I<whence> as follows:"
5416 msgstr ""
5417 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5418 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5419 "へ以下のように変更する:"
5420
5421 #. type: Plain text
5422 #: build/C/man2/lseek.2:72
5423 msgid "The offset is set to I<offset> bytes."
5424 msgstr "オフセットは I<offset> バイトに設定される。"
5425
5426 #. type: Plain text
5427 #: build/C/man2/lseek.2:77
5428 msgid "The offset is set to its current location plus I<offset> bytes."
5429 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5430
5431 #. type: Plain text
5432 #: build/C/man2/lseek.2:82
5433 msgid "The offset is set to the size of the file plus I<offset> bytes."
5434 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5435
5436 #. type: Plain text
5437 #: build/C/man2/lseek.2:90
5438 msgid ""
5439 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5440 "the file (but this does not change the size of the file).  If data is later "
5441 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5442 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5443 "gap."
5444 msgstr ""
5445 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5446 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5447 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5448 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5449 "される。"
5450
5451 #. type: SS
5452 #: build/C/man2/lseek.2:90
5453 #, no-wrap
5454 msgid "Seeking file data and holes"
5455 msgstr "ファイルのデータとホールの探索"
5456
5457 #. type: Plain text
5458 #: build/C/man2/lseek.2:93
5459 msgid ""
5460 "Since version 3.1, Linux supports the following additional values for "
5461 "I<whence>:"
5462 msgstr ""
5463 "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
5464
5465 #. type: TP
5466 #: build/C/man2/lseek.2:93
5467 #, no-wrap
5468 msgid "B<SEEK_DATA>"
5469 msgstr "B<SEEK_DATA>"
5470
5471 #. type: Plain text
5472 #: build/C/man2/lseek.2:104
5473 msgid ""
5474 "Adjust the file offset to the next location in the file greater than or "
5475 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5476 "file offset is set to I<offset>."
5477 msgstr ""
5478 "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 "
5479 "I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設"
5480 "定される。"
5481
5482 #. type: TP
5483 #: build/C/man2/lseek.2:104
5484 #, no-wrap
5485 msgid "B<SEEK_HOLE>"
5486 msgstr "B<SEEK_HOLE>"
5487
5488 #. type: Plain text
5489 #: build/C/man2/lseek.2:118
5490 msgid ""
5491 "Adjust the file offset to the next hole in the file greater than or equal to "
5492 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5493 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5494 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5495 "hole at the end of any file)."
5496 msgstr ""
5497 "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 "
5498 "I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定され"
5499 "る。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に"
5500 "設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということ"
5501 "だ)。"
5502
5503 #. type: Plain text
5504 #: build/C/man2/lseek.2:124
5505 msgid ""
5506 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5507 "end of the file."
5508 msgstr ""
5509 "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には "
5510 "B<lseek>() は失敗する。"
5511
5512 #. type: Plain text
5513 #: build/C/man2/lseek.2:130
5514 msgid ""
5515 "These operations allow applications to map holes in a sparsely allocated "
5516 "file.  This can be useful for applications such as file backup tools, which "
5517 "can save space when creating backups and preserve holes, if they have a "
5518 "mechanism for discovering holes."
5519 msgstr ""
5520 "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割"
5521 "り当てられたファイルでホールをマップすることができる。 この機能はファイルバッ"
5522 "クアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあ"
5523 "れば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節"
5524 "約し、ホールを保持することができる。"
5525
5526 #.  https://lkml.org/lkml/2011/4/22/79
5527 #.  http://lwn.net/Articles/440255/
5528 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5529 #. type: Plain text
5530 #: build/C/man2/lseek.2:153
5531 msgid ""
5532 "For the purposes of these operations, a hole is a sequence of zeros that "
5533 "(normally) has not been allocated in the underlying file storage.  However, "
5534 "a filesystem is not obliged to report holes, so these operations are not a "
5535 "guaranteed mechanism for mapping the storage space actually allocated to a "
5536 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5537 "the underlying storage may not be reported as a hole.)  In the simplest "
5538 "implementation, a filesystem can support the operations by making "
5539 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5540 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5541 "by I<offset> is a hole, it can be considered to consist of data that is a "
5542 "sequence of zeros)."
5543 msgstr ""
5544 "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレー"
5545 "ジには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムに"
5546 "はホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割"
5547 "り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みでは"
5548 "ない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列は"
5549 "ホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> "
5550 "は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> "
5551 "を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることがで"
5552 "きる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場"
5553 "所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなす"
5554 "ということである)。"
5555
5556 #. type: Plain text
5557 #: build/C/man2/lseek.2:162
5558 msgid ""
5559 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
5560 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
5561 msgstr ""
5562 "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機"
5563 "能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5564
5565 #. type: Plain text
5566 #: build/C/man2/lseek.2:170
5567 msgid ""
5568 "Upon successful completion, B<lseek>()  returns the resulting offset "
5569 "location as measured in bytes from the beginning of the file.  On error, the "
5570 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5571 msgstr ""
5572 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5573 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5574 "される。"
5575
5576 #.  Some systems may allow negative offsets for character devices
5577 #.  and/or for remote filesystems.
5578 #. type: Plain text
5579 #: build/C/man2/lseek.2:183
5580 msgid ""
5581 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5582 "beyond the end of a seekable device."
5583 msgstr ""
5584 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5585 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5586
5587 #. type: TP
5588 #: build/C/man2/lseek.2:183 build/C/man2/open.2:682
5589 #, no-wrap
5590 msgid "B<EOVERFLOW>"
5591 msgstr "B<EOVERFLOW>"
5592
5593 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5594 #. type: Plain text
5595 #: build/C/man2/lseek.2:188
5596 msgid "The resulting file offset cannot be represented in an I<off_t>."
5597 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5598
5599 #. type: TP
5600 #: build/C/man2/lseek.2:188
5601 #, no-wrap
5602 msgid "B<ESPIPE>"
5603 msgstr "B<ESPIPE>"
5604
5605 #. type: Plain text
5606 #: build/C/man2/lseek.2:192
5607 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5608 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5609
5610 #. type: TP
5611 #: build/C/man2/lseek.2:192 build/C/man2/open.2:676
5612 #, no-wrap
5613 msgid "B<ENXIO>"
5614 msgstr "B<ENXIO>"
5615
5616 #. type: Plain text
5617 #: build/C/man2/lseek.2:200
5618 msgid ""
5619 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5620 "beyond the end of the file."
5621 msgstr ""
5622 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5623 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5624
5625 #.  SVr4 documents additional error
5626 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5627 #. type: Plain text
5628 #: build/C/man2/lseek.2:202 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
5629 #: build/C/man2/symlink.2:155 build/C/man2/unlink.2:145
5630 #: build/C/man2/write.2:189
5631 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5632 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5633
5634 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5635 #. type: Plain text
5636 #: build/C/man2/lseek.2:210
5637 msgid ""
5638 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5639 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5640 "next POSIX revision (Issue 8)."
5641 msgstr ""
5642 "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly "
5643 "BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されてい"
5644 "る。"
5645
5646 #. type: Plain text
5647 #: build/C/man2/lseek.2:214
5648 msgid ""
5649 "Some devices are incapable of seeking and POSIX does not specify which "
5650 "devices must support B<lseek>()."
5651 msgstr ""
5652 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5653 "に対応すべきかは規定していない。"
5654
5655 #.  Other systems return the number of written characters,
5656 #.  using SEEK_SET to set the counter. (Of written characters.)
5657 #. type: Plain text
5658 #: build/C/man2/lseek.2:221
5659 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
5660 msgstr ""
5661 "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返"
5662 "る。"
5663
5664 #. type: Plain text
5665 #: build/C/man2/lseek.2:224
5666 msgid ""
5667 "When converting old code, substitute values for I<whence> with the following "
5668 "macros:"
5669 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5670
5671 #. type: tbl table
5672 #: build/C/man2/lseek.2:227
5673 #, no-wrap
5674 msgid "old\tnew\n"
5675 msgstr "old \tnew\n"
5676
5677 #. type: tbl table
5678 #: build/C/man2/lseek.2:228
5679 #, no-wrap
5680 msgid "0\tSEEK_SET\n"
5681 msgstr "0\tSEEK_SET\n"
5682
5683 #. type: tbl table
5684 #: build/C/man2/lseek.2:229
5685 #, no-wrap
5686 msgid "1\tSEEK_CUR\n"
5687 msgstr "1\tSEEK_CUR\n"
5688
5689 #. type: tbl table
5690 #: build/C/man2/lseek.2:230
5691 #, no-wrap
5692 msgid "2\tSEEK_END\n"
5693 msgstr "2\tSEEK_END\n"
5694
5695 #. type: tbl table
5696 #: build/C/man2/lseek.2:231
5697 #, no-wrap
5698 msgid "L_SET\tSEEK_SET\n"
5699 msgstr "L_SET\tSEEK_SET\n"
5700
5701 #. type: tbl table
5702 #: build/C/man2/lseek.2:232
5703 #, no-wrap
5704 msgid "L_INCR\tSEEK_CUR\n"
5705 msgstr "L_INCR\tSEEK_CUR\n"
5706
5707 #. type: tbl table
5708 #: build/C/man2/lseek.2:233
5709 #, no-wrap
5710 msgid "L_XTND\tSEEK_END\n"
5711 msgstr "L_XTND\tSEEK_END\n"
5712
5713 #. type: Plain text
5714 #: build/C/man2/lseek.2:245
5715 msgid ""
5716 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5717 "current file position pointer, so seeking on such files may be subject to "
5718 "race conditions."
5719 msgstr ""
5720 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5721 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5722 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5723
5724 #. type: Plain text
5725 #: build/C/man2/lseek.2:252
5726 msgid ""
5727 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5728 "B<posix_fallocate>(3)"
5729 msgstr ""
5730 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5731 "B<posix_fallocate>(3)"
5732
5733 #. type: TH
5734 #: build/C/man3/lseek64.3:25
5735 #, no-wrap
5736 msgid "LSEEK64"
5737 msgstr "LSEEK64"
5738
5739 #. type: TH
5740 #: build/C/man3/lseek64.3:25
5741 #, no-wrap
5742 msgid "2013-08-19"
5743 msgstr "2013-08-19"
5744
5745 #. type: Plain text
5746 #: build/C/man3/lseek64.3:28
5747 msgid "lseek64 - reposition 64-bit read/write file offset"
5748 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5749
5750 #. type: Plain text
5751 #: build/C/man3/lseek64.3:30
5752 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5753 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5754
5755 #. type: Plain text
5756 #: build/C/man3/lseek64.3:36
5757 msgid ""
5758 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5759 msgstr ""
5760 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5761
5762 #. type: Plain text
5763 #: build/C/man3/lseek64.3:53
5764 msgid ""
5765 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5766 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5767 "start, current position, or end of the file, when I<whence> has the value "
5768 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5769 msgstr ""
5770 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5771 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5772 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5773 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5774
5775 #. type: Plain text
5776 #: build/C/man3/lseek64.3:56
5777 msgid "For more details, return value, and errors, see B<lseek>(2)."
5778 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5779
5780 #. type: Plain text
5781 #: build/C/man3/lseek64.3:63
5782 msgid ""
5783 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5784 "the raw system call B<_llseek>(2)."
5785 msgstr ""
5786 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5787 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5788
5789 #. type: SS
5790 #: build/C/man3/lseek64.3:63
5791 #, no-wrap
5792 msgid "lseek"
5793 msgstr "lseek"
5794
5795 #. type: Plain text
5796 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
5797 #: build/C/man3/lseek64.3:116
5798 msgid "Prototype:"
5799 msgstr "プロトタイプ:"
5800
5801 #. type: Plain text
5802 #: build/C/man3/lseek64.3:69
5803 #, no-wrap
5804 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5805 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5806
5807 #. type: Plain text
5808 #: build/C/man3/lseek64.3:77
5809 msgid ""
5810 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5811 "architectures, unless one compiles with"
5812 msgstr ""
5813 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5814 "ビット符号付き型である。 ただし、"
5815
5816 #. type: Plain text
5817 #: build/C/man3/lseek64.3:85
5818 msgid "in which case it is a 64-bit signed type."
5819 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5820
5821 #. type: SS
5822 #: build/C/man3/lseek64.3:85
5823 #, no-wrap
5824 msgid "lseek64"
5825 msgstr "lseek64"
5826
5827 #. type: Plain text
5828 #: build/C/man3/lseek64.3:91
5829 #, no-wrap
5830 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5831 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5832
5833 #. type: Plain text
5834 #: build/C/man3/lseek64.3:102
5835 msgid ""
5836 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5837 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5838 "when one compiles with"
5839 msgstr ""
5840 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5841 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5842 "ルした場合にのみ使用可能である。"
5843
5844 #. type: Plain text
5845 #: build/C/man3/lseek64.3:106
5846 #, no-wrap
5847 msgid "#define _LARGEFILE64_SOURCE\n"
5848 msgstr "#define _LARGEFILE64_SOURCE\n"
5849
5850 #.  in glibc 2.0.94, not in 2.0.6
5851 #. type: Plain text
5852 #: build/C/man3/lseek64.3:114
5853 msgid ""
5854 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5855 "be an alias for B<llseek>()."
5856 msgstr ""
5857 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5858 "アスとして定義されている。"
5859
5860 #. type: SS
5861 #: build/C/man3/lseek64.3:114
5862 #, no-wrap
5863 msgid "llseek"
5864 msgstr "llseek"
5865
5866 #. type: Plain text
5867 #: build/C/man3/lseek64.3:120
5868 #, no-wrap
5869 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5870 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5871
5872 #.  in libc 5.0.9, not in 4.7.6
5873 #. type: Plain text
5874 #: build/C/man3/lseek64.3:139
5875 msgid ""
5876 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5877 "()  is available in libc5 and glibc and works without special defines.  Its "
5878 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5879 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5880 "should add the above prototype, or something equivalent, to their own "
5881 "source.  When users complained about data loss caused by a miscompilation of "
5882 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5883 msgstr ""
5884 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5885 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5886 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5887 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5888 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5889 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5890 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5891
5892 #. type: Plain text
5893 #: build/C/man3/lseek64.3:142
5894 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5895 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5896
5897 #. type: Plain text
5898 #: build/C/man3/lseek64.3:146
5899 msgid ""
5900 "This makes this function unusable if one desires a warning-free compilation."
5901 msgstr ""
5902 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5903
5904 #. type: SS
5905 #: build/C/man3/lseek64.3:146
5906 #, no-wrap
5907 msgid "_llseek"
5908 msgstr "_llseek"
5909
5910 #. type: Plain text
5911 #: build/C/man3/lseek64.3:149
5912 msgid ""
5913 "All the above functions are implemented in terms of this system call.  The "
5914 "prototype is:"
5915 msgstr ""
5916 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5917 "下の通り:"
5918
5919 #. type: Plain text
5920 #: build/C/man3/lseek64.3:154
5921 #, no-wrap
5922 msgid ""
5923 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5924 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5925 msgstr ""
5926 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5927 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5928
5929 #. type: Plain text
5930 #: build/C/man3/lseek64.3:159
5931 msgid "For more details, see B<llseek>(2)."
5932 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5933
5934 #. type: Plain text
5935 #: build/C/man3/lseek64.3:164
5936 msgid "The B<lseek64>()  function is thread-safe."
5937 msgstr "関数 B<lseek64>() はスレッドセーフである。"
5938
5939 #. type: Plain text
5940 #: build/C/man3/lseek64.3:167
5941 msgid "B<llseek>(2), B<lseek>(2)"
5942 msgstr "B<llseek>(2), B<lseek>(2)"
5943
5944 #. type: TH
5945 #: build/C/man2/open.2:51
5946 #, no-wrap
5947 msgid "OPEN"
5948 msgstr "OPEN"
5949
5950 #. type: TH
5951 #: build/C/man2/open.2:51
5952 #, no-wrap
5953 msgid "2013-08-09"
5954 msgstr "2013-08-09"
5955
5956 #. type: Plain text
5957 #: build/C/man2/open.2:54
5958 msgid "open, creat - open and possibly create a file or device"
5959 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5960
5961 #. type: Plain text
5962 #: build/C/man2/open.2:59
5963 #, no-wrap
5964 msgid ""
5965 "B<#include E<lt>sys/types.hE<gt>>\n"
5966 "B<#include E<lt>sys/stat.hE<gt>>\n"
5967 "B<#include E<lt>fcntl.hE<gt>>\n"
5968 msgstr ""
5969 "B<#include E<lt>sys/types.hE<gt>>\n"
5970 "B<#include E<lt>sys/stat.hE<gt>>\n"
5971 "B<#include E<lt>fcntl.hE<gt>>\n"
5972
5973 #. type: Plain text
5974 #: build/C/man2/open.2:62
5975 #, no-wrap
5976 msgid ""
5977 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5978 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5979 msgstr ""
5980 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5981 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5982
5983 #. type: Plain text
5984 #: build/C/man2/open.2:64
5985 #, no-wrap
5986 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5987 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5988
5989 #. type: Plain text
5990 #: build/C/man2/open.2:75
5991 msgid ""
5992 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
5993 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
5994 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
5995 "by a successful call will be the lowest-numbered file descriptor not "
5996 "currently open for the process."
5997 msgstr ""
5998 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
5999 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
6000 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
6001 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
6002 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
6003 "のものとなる。"
6004
6005 #. type: Plain text
6006 #: build/C/man2/open.2:87
6007 msgid ""
6008 "By default, the new file descriptor is set to remain open across an B<execve>"
6009 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
6010 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
6011 "to change this default).  The file offset is set to the beginning of the "
6012 "file (see B<lseek>(2))."
6013 msgstr ""
6014 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
6015 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
6016 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
6017 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
6018 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
6019
6020 #. type: Plain text
6021 #: build/C/man2/open.2:106
6022 msgid ""
6023 "A call to B<open>()  creates a new I<open file description>, an entry in the "
6024 "system-wide table of open files.  This entry records the file offset and the "
6025 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
6026 "file descriptor is a reference to one of these entries; this reference is "
6027 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
6028 "different file.  The new open file description is initially not shared with "
6029 "any other process, but sharing may arise via B<fork>(2)."
6030 msgstr ""
6031 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
6032 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
6033 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
6034 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
6035 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
6036 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
6037 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
6038 "が、 B<fork>(2)  で共有が起こる場合がある。"
6039
6040 #. type: Plain text
6041 #: build/C/man2/open.2:114
6042 msgid ""
6043 "The argument I<flags> must include one of the following I<access modes>: "
6044 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
6045 "only, write-only, or read/write, respectively."
6046 msgstr ""
6047 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
6048 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
6049 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
6050
6051 #.  SUSv4 divides the flags into:
6052 #.  * Access mode
6053 #.  * File creation
6054 #.  * File status
6055 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
6056 #.  though it's not clear what the difference between "other" and
6057 #.  "File creation" flags is.  I raised an Aardvark to see if this
6058 #.  can be clarified in SUSv4; 10 Oct 2008.
6059 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
6060 #.  TC1 (balloted in 2013), resolved this, so that those three constants
6061 #.  are also categorized" as file status flags.
6062 #. type: Plain text
6063 #: build/C/man2/open.2:152
6064 msgid ""
6065 "In addition, zero or more file creation flags and file status flags can be "
6066 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
6067 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
6068 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
6069 "remaining flags listed below.  The distinction between these two groups of "
6070 "flags is that the file status flags can be retrieved and (in some cases)  "
6071 "modified using B<fcntl>(2).  The full list of file creation flags and file "
6072 "status flags is as follows:"
6073 msgstr ""
6074 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
6075 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
6076 "定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, "
6077 "B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TRUNC>, "
6078 "B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち上記以外の残"
6079 "りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は B<fcntl>"
6080 "(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点にあ"
6081 "る。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
6082
6083 #. type: TP
6084 #: build/C/man2/open.2:152
6085 #, no-wrap
6086 msgid "B<O_APPEND>"
6087 msgstr "B<O_APPEND>"
6088
6089 #.  For more background, see
6090 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
6091 #.  http://nfs.sourceforge.net/
6092 #. type: Plain text
6093 #: build/C/man2/open.2:169
6094 msgid ""
6095 "The file is opened in append mode.  Before each B<write>(2), the file offset "
6096 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
6097 "may lead to corrupted files on NFS filesystems if more than one process "
6098 "appends data to a file at once.  This is because NFS does not support "
6099 "appending to a file, so the client kernel has to simulate it, which can't be "
6100 "done without a race condition."
6101 msgstr ""
6102 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
6103 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
6104 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
6105 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
6106 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
6107 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
6108 "とはできないからである。"
6109
6110 #. type: TP
6111 #: build/C/man2/open.2:169
6112 #, no-wrap
6113 msgid "B<O_ASYNC>"
6114 msgstr "B<O_ASYNC>"
6115
6116 #. type: Plain text
6117 #: build/C/man2/open.2:182
6118 msgid ""
6119 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
6120 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
6121 "this file descriptor.  This feature is available only for terminals, "
6122 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
6123 "B<fcntl>(2)  for further details."
6124 msgstr ""
6125 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
6126 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
6127 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
6128 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
6129 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
6130
6131 #. type: TP
6132 #: build/C/man2/open.2:182
6133 #, no-wrap
6134 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
6135 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
6136
6137 #.  This flag fixes only one form of the race condition;
6138 #.  The race can also occur with, for example, descriptors
6139 #.  returned by accept(), pipe(), etc.
6140 #. type: Plain text
6141 #: build/C/man2/open.2:207
6142 msgid ""
6143 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
6144 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
6145 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
6146 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
6147 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
6148 "race conditions where one thread opens a file descriptor at the same time as "
6149 "another thread does a B<fork>(2)  plus B<execve>(2)."
6150 msgstr ""
6151 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
6152 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
6153 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
6154 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
6155 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
6156 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
6157 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
6158 "はないからである。"
6159
6160 #. type: TP
6161 #: build/C/man2/open.2:207
6162 #, no-wrap
6163 msgid "B<O_CREAT>"
6164 msgstr "B<O_CREAT>"
6165
6166 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
6167 #.  XFS (since 2.6.14).
6168 #. type: Plain text
6169 #: build/C/man2/open.2:223
6170 msgid ""
6171 "If the file does not exist it will be created.  The owner (user ID) of the "
6172 "file is set to the effective user ID of the process.  The group ownership "
6173 "(group ID) is set either to the effective group ID of the process or to the "
6174 "group ID of the parent directory (depending on filesystem type and mount "
6175 "options, and the mode of the parent directory, see the mount options "
6176 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
6177 msgstr ""
6178 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
6179 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
6180 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
6181 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
6182 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
6183 "I<bsdgroups> と I<sysvgroups> を参照)。"
6184
6185 #. type: Plain text
6186 #: build/C/man2/open.2:246
6187 msgid ""
6188 "I<mode> specifies the permissions to use in case a new file is created.  "
6189 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
6190 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
6191 "permissions are modified by the process's I<umask> in the usual way: The "
6192 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
6193 "mode applies only to future accesses of the newly created file; the B<open>"
6194 "()  call that creates a read-only file may well return a read/write file "
6195 "descriptor."
6196 msgstr ""
6197 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
6198 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
6199 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
6200 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
6201 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
6202 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
6203 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
6204 "可能なファイルディスクリプタを返すことがありうる。"
6205
6206 #. type: Plain text
6207 #: build/C/man2/open.2:249
6208 msgid "The following symbolic constants are provided for I<mode>:"
6209 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
6210
6211 #. type: TP
6212 #: build/C/man2/open.2:249
6213 #, no-wrap
6214 msgid "B<S_IRWXU>"
6215 msgstr "B<S_IRWXU>"
6216
6217 #. type: Plain text
6218 #: build/C/man2/open.2:252
6219 msgid "00700 user (file owner) has read, write and execute permission"
6220 msgstr ""
6221 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
6222
6223 #. type: TP
6224 #: build/C/man2/open.2:252
6225 #, no-wrap
6226 msgid "B<S_IRUSR>"
6227 msgstr "B<S_IRUSR>"
6228
6229 #. type: Plain text
6230 #: build/C/man2/open.2:255
6231 msgid "00400 user has read permission"
6232 msgstr "00400 ユーザーに読み込みの許可がある。"
6233
6234 #. type: TP
6235 #: build/C/man2/open.2:255
6236 #, no-wrap
6237 msgid "B<S_IWUSR>"
6238 msgstr "B<S_IWUSR>"
6239
6240 #. type: Plain text
6241 #: build/C/man2/open.2:258
6242 msgid "00200 user has write permission"
6243 msgstr "00200 ユーザーに書き込みの許可がある。"
6244
6245 #. type: TP
6246 #: build/C/man2/open.2:258
6247 #, no-wrap
6248 msgid "B<S_IXUSR>"
6249 msgstr "B<S_IXUSR>"
6250
6251 #. type: Plain text
6252 #: build/C/man2/open.2:261
6253 msgid "00100 user has execute permission"
6254 msgstr "00100 ユーザーに実行の許可がある。"
6255
6256 #. type: TP
6257 #: build/C/man2/open.2:261
6258 #, no-wrap
6259 msgid "B<S_IRWXG>"
6260 msgstr "B<S_IRWXG>"
6261
6262 #. type: Plain text
6263 #: build/C/man2/open.2:264
6264 msgid "00070 group has read, write and execute permission"
6265 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6266
6267 #. type: TP
6268 #: build/C/man2/open.2:264
6269 #, no-wrap
6270 msgid "B<S_IRGRP>"
6271 msgstr "B<S_IRGRP>"
6272
6273 #. type: Plain text
6274 #: build/C/man2/open.2:267
6275 msgid "00040 group has read permission"
6276 msgstr "00040 グループに読み込みの許可がある。"
6277
6278 #. type: TP
6279 #: build/C/man2/open.2:267
6280 #, no-wrap
6281 msgid "B<S_IWGRP>"
6282 msgstr "B<S_IWGRP>"
6283
6284 #. type: Plain text
6285 #: build/C/man2/open.2:270
6286 msgid "00020 group has write permission"
6287 msgstr "00020 グループに書き込みの許可がある。"
6288
6289 #. type: TP
6290 #: build/C/man2/open.2:270
6291 #, no-wrap
6292 msgid "B<S_IXGRP>"
6293 msgstr "B<S_IXGRP>"
6294
6295 #. type: Plain text
6296 #: build/C/man2/open.2:273
6297 msgid "00010 group has execute permission"
6298 msgstr "00010 グループに実行の許可がある。"
6299
6300 #. type: TP
6301 #: build/C/man2/open.2:273
6302 #, no-wrap
6303 msgid "B<S_IRWXO>"
6304 msgstr "B<S_IRWXO>"
6305
6306 #. type: Plain text
6307 #: build/C/man2/open.2:276
6308 msgid "00007 others have read, write and execute permission"
6309 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6310
6311 #. type: TP
6312 #: build/C/man2/open.2:276
6313 #, no-wrap
6314 msgid "B<S_IROTH>"
6315 msgstr "B<S_IROTH>"
6316
6317 #. type: Plain text
6318 #: build/C/man2/open.2:279
6319 msgid "00004 others have read permission"
6320 msgstr "00004 他人に読み込みの許可がある。"
6321
6322 #. type: TP
6323 #: build/C/man2/open.2:279
6324 #, no-wrap
6325 msgid "B<S_IWOTH>"
6326 msgstr "B<S_IWOTH>"
6327
6328 #. type: Plain text
6329 #: build/C/man2/open.2:282
6330 msgid "00002 others have write permission"
6331 msgstr "00002 他人に書き込みの許可がある。"
6332
6333 #. type: TP
6334 #: build/C/man2/open.2:282
6335 #, no-wrap
6336 msgid "B<S_IXOTH>"
6337 msgstr "B<S_IXOTH>"
6338
6339 #. type: Plain text
6340 #: build/C/man2/open.2:285
6341 msgid "00001 others have execute permission"
6342 msgstr "00001 他人に実行の許可がある。"
6343
6344 #. type: TP
6345 #: build/C/man2/open.2:286
6346 #, no-wrap
6347 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6348 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6349
6350 #. type: Plain text
6351 #: build/C/man2/open.2:303
6352 msgid ""
6353 "Try to minimize cache effects of the I/O to and from this file.  In general "
6354 "this will degrade performance, but it is useful in special situations, such "
6355 "as when applications do their own caching.  File I/O is done directly to/"
6356 "from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6357 "transfer data synchronously, but does not give the guarantees of the "
6358 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6359 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6360 "B<O_DIRECT>.  See NOTES below for further discussion."
6361 msgstr ""
6362 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを"
6363 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを"
6364 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6365 "ファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようと"
6366 "はするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証される"
6367 "わけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を"
6368 "使用しなければならない。下記の「注意」の節の議論も参照。"
6369
6370 #. type: Plain text
6371 #: build/C/man2/open.2:307
6372 msgid ""
6373 "A semantically similar (but deprecated) interface for block devices is "
6374 "described in B<raw>(8)."
6375 msgstr ""
6376 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6377 "れている (但し、このインタフェースは非推奨である)。"
6378
6379 #. type: TP
6380 #: build/C/man2/open.2:307
6381 #, no-wrap
6382 msgid "B<O_DIRECTORY>"
6383 msgstr "B<O_DIRECTORY>"
6384
6385 #.  But see the following and its replies:
6386 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6387 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6388 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6389 #. type: Plain text
6390 #: build/C/man2/open.2:319
6391 msgid ""
6392 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6393 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6394 "service problems if B<opendir>(3)  is called on a FIFO or tape device."
6395 msgstr ""
6396 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6397 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6398 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6399 "加された。"
6400
6401 #. type: TP
6402 #: build/C/man2/open.2:319
6403 #, no-wrap
6404 msgid "B<O_EXCL>"
6405 msgstr "B<O_EXCL>"
6406
6407 #. type: Plain text
6408 #: build/C/man2/open.2:329
6409 msgid ""
6410 "Ensure that this call creates the file: if this flag is specified in "
6411 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6412 "will fail."
6413 msgstr ""
6414 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6415 "と\n"
6416 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6417 "敗\n"
6418 "する。"
6419
6420 #.  POSIX.1-2001 explicitly requires this behavior.
6421 #. type: Plain text
6422 #: build/C/man2/open.2:337
6423 msgid ""
6424 "When these two flags are specified, symbolic links are not followed: if "
6425 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6426 "the symbolic link points to."
6427 msgstr ""
6428 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6429 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6430 "かに関わらず B<open>()  は失敗する。"
6431
6432 #. type: Plain text
6433 #: build/C/man2/open.2:353
6434 msgid ""
6435 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6436 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6437 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6438 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6439 "the error B<EBUSY>."
6440 msgstr ""
6441 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6442 "B<O_EXCL> の動作は規定されていない。\n"
6443 "これには一つ例外があり、Linux 2.6 以降では、\n"
6444 "I<pathname> がブロックデバイスを参照している場合、\n"
6445 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6446 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6447 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6448
6449 #. type: Plain text
6450 #: build/C/man2/open.2:375
6451 msgid ""
6452 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
6453 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6454 "programs that rely on it for performing locking tasks will contain a race "
6455 "condition.  Portable programs that want to perform atomic file locking using "
6456 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6457 "create a unique file on the same filesystem (e.g., incorporating hostname "
6458 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6459 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6460 "unique file to check if its link count has increased to 2, in which case the "
6461 "lock is also successful."
6462 msgstr ""
6463 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6464 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6465 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6466 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6467 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6468 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6469 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6470 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6471 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6472 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6473 "じくロックに成功しているということである。"
6474
6475 #. type: TP
6476 #: build/C/man2/open.2:375
6477 #, no-wrap
6478 msgid "B<O_LARGEFILE>"
6479 msgstr "B<O_LARGEFILE>"
6480
6481 #. type: Plain text
6482 #: build/C/man2/open.2:397
6483 msgid ""
6484 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6485 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6486 "macro must be defined (before including I<any> header files)  in order to "
6487 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6488 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6489 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6490 msgstr ""
6491 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6492 "ファ\n"
6493 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6494 "イ\n"
6495 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6496 "ば\n"
6497 "ならない。\n"
6498 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6499 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6500 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6501
6502 #. type: TP
6503 #: build/C/man2/open.2:397
6504 #, no-wrap
6505 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6506 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6507
6508 #.  The O_NOATIME flag also affects the treatment of st_atime
6509 #.  by mmap() and readdir(2), MTK, Dec 04.
6510 #. type: Plain text
6511 #: build/C/man2/open.2:410
6512 msgid ""
6513 "Do not update the file last access time (I<st_atime> in the inode)  when the "
6514 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6515 "programs, where its use can significantly reduce the amount of disk "
6516 "activity.  This flag may not be effective on all filesystems.  One example "
6517 "is NFS, where the server maintains the access time."
6518 msgstr ""
6519 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6520 "I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログ"
6521 "ラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らす"
6522 "ことができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6523 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6524
6525 #. type: TP
6526 #: build/C/man2/open.2:410
6527 #, no-wrap
6528 msgid "B<O_NOCTTY>"
6529 msgstr "B<O_NOCTTY>"
6530
6531 #. type: Plain text
6532 #: build/C/man2/open.2:418
6533 msgid ""
6534 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
6535 "become the process's controlling terminal even if the process does not have "
6536 "one."
6537 msgstr ""
6538 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6539 "る\n"
6540 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6541 "ル\n"
6542 "は制御端末にはならない。"
6543
6544 #. type: TP
6545 #: build/C/man2/open.2:418
6546 #, no-wrap
6547 msgid "B<O_NOFOLLOW>"
6548 msgstr "B<O_NOFOLLOW>"
6549
6550 #.  The headers from glibc 2.0.100 and later include a
6551 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6552 #.  used\fP.
6553 #. type: Plain text
6554 #: build/C/man2/open.2:430
6555 msgid ""
6556 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6557 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6558 "earlier components of the pathname will still be followed.  See also "
6559 "B<O_NOPATH> below."
6560 msgstr ""
6561 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6562 "FreeBSD の拡張で、Linux には バージョン 2.1.126 で追加された。 このフラグが指"
6563 "定された場合でも I<pathname> の前の方の要素 (最後のディレクトリセパレータより"
6564 "前の部分) にあるシンボリックリンクについてはリンクが辿られる。 下記の "
6565 "B<O_PATH> も参照のこと。"
6566
6567 #. type: TP
6568 #: build/C/man2/open.2:430
6569 #, no-wrap
6570 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6571 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6572
6573 #. type: Plain text
6574 #: build/C/man2/open.2:443
6575 msgid ""
6576 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6577 "()  nor any subsequent operations on the file descriptor which is returned "
6578 "will cause the calling process to wait.  For the handling of FIFOs (named "
6579 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6580 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6581 "see B<fcntl>(2)."
6582 msgstr ""
6583 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6584 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6585 "出\n"
6586 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6587 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6588 "イ\n"
6589 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6590 "議論は、 B<fcntl>(2) を参照すること。"
6591
6592 #. type: TP
6593 #: build/C/man2/open.2:443
6594 #, no-wrap
6595 msgid "B<O_PATH> (since Linux 2.6.39)"
6596 msgstr "B<O_PATH> (Linux 2.6.39 以降)"
6597
6598 #
6599 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
6600 #.  commit 326be7b484843988afe57566b627fb7a70beac56
6601 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
6602 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
6603 #.      Subject: Re: [PATCH] open(2): document O_PATH
6604 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
6605 #. type: Plain text
6606 #: build/C/man2/open.2:465
6607 msgid ""
6608 "Obtain a file descriptor that can be used for two purposes: to indicate a "
6609 "location in the filesystem tree and to perform operations that act purely at "
6610 "the file descriptor level.  The file itself is not opened, and other file "
6611 "operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), "
6612 "B<fgetxattr>(2), B<mmap>(2))  fail with the error B<EBADF>."
6613 msgstr ""
6614
6615 #. type: Plain text
6616 #: build/C/man2/open.2:469
6617 msgid ""
6618 "The following operations I<can> be performed on the resulting file "
6619 "descriptor:"
6620 msgstr ""
6621
6622 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
6623 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
6624 #. type: Plain text
6625 #: build/C/man2/open.2:478
6626 msgid ""
6627 "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
6628 msgstr ""
6629
6630 #. type: Plain text
6631 #: build/C/man2/open.2:484
6632 msgid ""
6633 "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
6634 msgstr ""
6635
6636 #. type: Plain text
6637 #: build/C/man2/open.2:490
6638 msgid ""
6639 "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and "
6640 "B<F_SETFD>)."
6641 msgstr ""
6642
6643 #. type: Plain text
6644 #: build/C/man2/open.2:496
6645 msgid ""
6646 "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> "
6647 "operation: the returned flags will include the bit B<O_PATH>."
6648 msgstr ""
6649
6650 #. type: Plain text
6651 #: build/C/man2/open.2:503
6652 msgid ""
6653 "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and "
6654 "the other \"*at()\" system calls."
6655 msgstr ""
6656
6657 #. type: Plain text
6658 #: build/C/man2/open.2:509
6659 msgid ""
6660 "Passing the file descriptor to another process via a UNIX domain socket (see "
6661 "B<SCM_RIGHTS> in B<unix>(7))."
6662 msgstr ""
6663
6664 #. type: Plain text
6665 #: build/C/man2/open.2:520
6666 msgid ""
6667 "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_DIRECTORY> "
6668 "and B<O_NOFOLLOW> are ignored."
6669 msgstr ""
6670
6671 #. type: Plain text
6672 #: build/C/man2/open.2:534
6673 msgid ""
6674 "If the B<O_NOFOLLOW> flag is also specified, then the call returns a file "
6675 "descriptor referring to the symbolic link.  This file descriptor can be used "
6676 "as the I<dirfd> argument in calls to B<fchownat>(2), B<fstatat>(2), B<linkat>"
6677 "(2), and B<readlinkat>(2)  with an empty pathname to have the calls operate "
6678 "on the symbolic link."
6679 msgstr ""
6680
6681 #. type: TP
6682 #: build/C/man2/open.2:534
6683 #, no-wrap
6684 msgid "B<O_SYNC>"
6685 msgstr "B<O_SYNC>"
6686
6687 #. type: Plain text
6688 #: build/C/man2/open.2:542
6689 msgid ""
6690 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6691 "file descriptor will block the calling process until the data has been "
6692 "physically written to the underlying hardware.  I<But see NOTES below>."
6693 msgstr ""
6694 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6695 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6696 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6697 "「注意」の章も参照。>"
6698
6699 #. type: TP
6700 #: build/C/man2/open.2:542
6701 #, no-wrap
6702 msgid "B<O_TRUNC>"
6703 msgstr "B<O_TRUNC>"
6704
6705 #. type: Plain text
6706 #: build/C/man2/open.2:556
6707 msgid ""
6708 "If the file already exists and is a regular file and the open mode allows "
6709 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6710 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6711 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6712 msgstr ""
6713 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6714 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6715 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6716 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6717 "ある。"
6718
6719 #. type: Plain text
6720 #: build/C/man2/open.2:560
6721 msgid ""
6722 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6723 "file has been opened."
6724 msgstr ""
6725 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6726 "用して変更することができる。"
6727
6728 #. type: Plain text
6729 #: build/C/man2/open.2:568
6730 msgid ""
6731 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6732 "O_WRONLY|O_TRUNC>."
6733 msgstr ""
6734 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6735 "を行うのと等価である。"
6736
6737 #. type: Plain text
6738 #: build/C/man2/open.2:576
6739 msgid ""
6740 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6741 "occurred (in which case, I<errno> is set appropriately)."
6742 msgstr ""
6743 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6744 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6745
6746 #. type: Plain text
6747 #: build/C/man2/open.2:586
6748 msgid ""
6749 "The requested access to the file is not allowed, or search permission is "
6750 "denied for one of the directories in the path prefix of I<pathname>, or the "
6751 "file did not exist yet and write access to the parent directory is not "
6752 "allowed.  (See also B<path_resolution>(7).)"
6753 msgstr ""
6754 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6755 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6756 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6757 "すること。)"
6758
6759 #. type: Plain text
6760 #: build/C/man2/open.2:592
6761 msgid ""
6762 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
6763 "of disk blocks or inodes on the filesystem has been exhausted."
6764 msgstr ""
6765 "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか "
6766 "inode がそのファイルシステムのユーザクォータに達していた。"
6767
6768 #. type: Plain text
6769 #: build/C/man2/open.2:598
6770 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6771 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6772
6773 #. type: Plain text
6774 #: build/C/man2/open.2:602 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6775 msgid "I<pathname> points outside your accessible address space."
6776 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6777
6778 #. type: TP
6779 #: build/C/man2/open.2:602 build/C/man2/write.2:145
6780 #, no-wrap
6781 msgid "B<EFBIG>"
6782 msgstr "B<EFBIG>"
6783
6784 #. type: Plain text
6785 #: build/C/man2/open.2:606
6786 msgid "See B<EOVERFLOW>."
6787 msgstr "B<EOVERFLOW> 参照。"
6788
6789 #. type: TP
6790 #: build/C/man2/open.2:606 build/C/man2/read.2:122 build/C/man3/scanf.3:561
6791 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
6792 #, no-wrap
6793 msgid "B<EINTR>"
6794 msgstr "B<EINTR>"
6795
6796 #. type: Plain text
6797 #: build/C/man2/open.2:613
6798 msgid ""
6799 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6800 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6801 "(7)."
6802 msgstr ""
6803 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6804 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6805 "B<signal>(7)  参照。"
6806
6807 #. type: Plain text
6808 #: build/C/man2/open.2:620
6809 msgid ""
6810 "The filesystem does not support the B<O_DIRECT> flag. See B<NOTES> for more "
6811 "information."
6812 msgstr ""
6813
6814 #. type: TP
6815 #: build/C/man2/open.2:620 build/C/man2/read.2:158 build/C/man2/rename.2:143
6816 #: build/C/man2/unlink.2:87
6817 #, no-wrap
6818 msgid "B<EISDIR>"
6819 msgstr "B<EISDIR>"
6820
6821 #. type: Plain text
6822 #: build/C/man2/open.2:629
6823 msgid ""
6824 "I<pathname> refers to a directory and the access requested involved writing "
6825 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6826 msgstr ""
6827 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6828 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6829
6830 #. type: Plain text
6831 #: build/C/man2/open.2:636
6832 msgid ""
6833 "Too many symbolic links were encountered in resolving I<pathname>, or "
6834 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6835 msgstr ""
6836 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6837 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6838
6839 #. type: TP
6840 #: build/C/man2/open.2:636 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:66
6841 #, no-wrap
6842 msgid "B<EMFILE>"
6843 msgstr "B<EMFILE>"
6844
6845 #. type: Plain text
6846 #: build/C/man2/open.2:639
6847 msgid "The process already has the maximum number of files open."
6848 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6849
6850 #. type: Plain text
6851 #: build/C/man2/open.2:643 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6852 msgid "I<pathname> was too long."
6853 msgstr "I<pathname> が長過ぎる。"
6854
6855 #. type: TP
6856 #: build/C/man2/open.2:643 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:69
6857 #, no-wrap
6858 msgid "B<ENFILE>"
6859 msgstr "B<ENFILE>"
6860
6861 #. type: Plain text
6862 #: build/C/man2/open.2:646 build/C/man2/pipe.2:113
6863 msgid "The system limit on the total number of open files has been reached."
6864 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6865
6866 #. type: TP
6867 #: build/C/man2/open.2:646
6868 #, no-wrap
6869 msgid "B<ENODEV>"
6870 msgstr "B<ENODEV>"
6871
6872 #. type: Plain text
6873 #: build/C/man2/open.2:653
6874 msgid ""
6875 "I<pathname> refers to a device special file and no corresponding device "
6876 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6877 "returned.)"
6878 msgstr ""
6879 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6880 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6881 "るべきである)"
6882
6883 #. type: Plain text
6884 #: build/C/man2/open.2:660
6885 msgid ""
6886 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6887 "component in I<pathname> does not exist or is a dangling symbolic link."
6888 msgstr ""
6889 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6890 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6891 "ンクである。"
6892
6893 #. type: Plain text
6894 #: build/C/man2/open.2:669
6895 msgid ""
6896 "I<pathname> was to be created but the device containing I<pathname> has no "
6897 "room for the new file."
6898 msgstr ""
6899 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6900 "ファイルのための空き容量がない。"
6901
6902 #. type: Plain text
6903 #: build/C/man2/open.2:676
6904 msgid ""
6905 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6906 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6907 msgstr ""
6908 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6909 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6910
6911 #. type: Plain text
6912 #: build/C/man2/open.2:682
6913 msgid ""
6914 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6915 "has the file open for reading.  Or, the file is a device special file and no "
6916 "corresponding device exists."
6917 msgstr ""
6918 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6919 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6920 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6921
6922 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6923 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6924 #.  Reported 2006-10-03
6925 #. type: Plain text
6926 #: build/C/man2/open.2:702
6927 msgid ""
6928 "I<pathname> refers to a regular file that is too large to be opened.  The "
6929 "usual scenario here is that an application compiled on a 32-bit platform "
6930 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6931 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6932 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6933 "B<EFBIG> for this case."
6934 msgstr ""
6935 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6936 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6937 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6938 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6939 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6940 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6941 "いた。"
6942
6943 #.  Strictly speaking, it's the filesystem UID... (MTK)
6944 #. type: Plain text
6945 #: build/C/man2/open.2:710
6946 msgid ""
6947 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6948 "did not match the owner of the file and the caller was not privileged "
6949 "(B<CAP_FOWNER>)."
6950 msgstr ""
6951 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6952 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6953
6954 #. type: Plain text
6955 #: build/C/man2/open.2:715
6956 msgid ""
6957 "I<pathname> refers to a file on a read-only filesystem and write access was "
6958 "requested."
6959 msgstr ""
6960 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6961 "込みアクセスが要求された。"
6962
6963 #. type: TP
6964 #: build/C/man2/open.2:715
6965 #, no-wrap
6966 msgid "B<ETXTBSY>"
6967 msgstr "B<ETXTBSY>"
6968
6969 #. type: Plain text
6970 #: build/C/man2/open.2:720
6971 msgid ""
6972 "I<pathname> refers to an executable image which is currently being executed "
6973 "and write access was requested."
6974 msgstr ""
6975 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6976
6977 #. type: TP
6978 #: build/C/man2/open.2:720
6979 #, no-wrap
6980 msgid "B<EWOULDBLOCK>"
6981 msgstr "B<EWOULDBLOCK>"
6982
6983 #. type: Plain text
6984 #: build/C/man2/open.2:727
6985 msgid ""
6986 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6987 "the file (see B<fcntl>(2))."
6988 msgstr ""
6989 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6990 "ていた (B<fcntl>(2)  参照)。"
6991
6992 #. type: Plain text
6993 #: build/C/man2/open.2:741
6994 msgid ""
6995 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, "
6996 "B<O_NOFOLLOW>, and B<O_PATH> flags are Linux-specific, and one may need to "
6997 "define B<_GNU_SOURCE> (before including I<any> header files)  to obtain "
6998 "their definitions."
6999 msgstr ""
7000 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
7001 "B<O_NOFOLLOW>, B<O_PATH> は Linux 特有のものであり、 これらのフラグの定義を得"
7002 "るためには、 (「どの」ヘッダファイルをインクルードするよりも前に)  "
7003 "B<_GNU_SOURCE> を定義する必要があるかもしれない。"
7004
7005 #. type: Plain text
7006 #: build/C/man2/open.2:746
7007 msgid ""
7008 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
7009 "POSIX.1-2008."
7010 msgstr ""
7011 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
7012 "定されている。"
7013
7014 #. type: Plain text
7015 #: build/C/man2/open.2:754
7016 msgid ""
7017 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
7018 "(before including I<any> header files)  to get its definition."
7019 msgstr ""
7020 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
7021 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
7022 "なければならない。"
7023
7024 #. type: Plain text
7025 #: build/C/man2/open.2:762
7026 msgid ""
7027 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
7028 "does not necessarily have the intention to read or write.  This is typically "
7029 "used to open devices in order to get a file descriptor for use with B<ioctl>"
7030 "(2)."
7031 msgstr ""
7032 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
7033 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
7034 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
7035 "られる。"
7036
7037 #.  See for example util-linux's disk-utils/setfdprm.c
7038 #.  For some background on access mode 3, see
7039 #.  http://thread.gmane.org/gmane.linux.kernel/653123
7040 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
7041 #.  LKML, 12 Mar 2008
7042 #. type: Plain text
7043 #: build/C/man2/open.2:791
7044 msgid ""
7045 "Unlike the other values that can be specified in I<flags>, the I<access "
7046 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
7047 "individual bits.  Rather, they define the low order two bits of I<flags>, "
7048 "and are defined respectively as 0, 1, and 2.  In other words, the "
7049 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
7050 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
7051 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
7052 "and write permission on the file and return a descriptor that can't be used "
7053 "for reading or writing.  This nonstandard access mode is used by some Linux "
7054 "drivers to return a descriptor that is to be used only for device-specific "
7055 "B<ioctl>(2)  operations."
7056 msgstr ""
7057 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
7058 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
7059 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
7060 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
7061 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
7062 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
7063 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
7064 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
7065 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、デバイ"
7066 "ス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使われてい"
7067 "る。"
7068
7069 #.  Linux 2.0, 2.5: truncate
7070 #.  Solaris 5.7, 5.8: truncate
7071 #.  Irix 6.5: truncate
7072 #.  Tru64 5.1B: truncate
7073 #.  HP-UX 11.22: truncate
7074 #.  FreeBSD 4.7: truncate
7075 #. type: Plain text
7076 #: build/C/man2/open.2:802
7077 msgid ""
7078 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
7079 "implementations.  On many systems the file is actually truncated."
7080 msgstr ""
7081 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
7082 "くのシステムではファイルは実際に切り詰められる。"
7083
7084 #. type: Plain text
7085 #: build/C/man2/open.2:806
7086 msgid ""
7087 "There are many infelicities in the protocol underlying NFS, affecting "
7088 "amongst others B<O_SYNC> and B<O_NDELAY>."
7089 msgstr ""
7090 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
7091 "B<O_NDELAY> に影響する。"
7092
7093 #. type: Plain text
7094 #: build/C/man2/open.2:828
7095 msgid ""
7096 "POSIX provides for three different variants of synchronized I/O, "
7097 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
7098 "(2.6.31), Linux implements only B<O_SYNC>, but glibc maps B<O_DSYNC> and "
7099 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux filesystems "
7100 "don't actually implement the POSIX B<O_SYNC> semantics, which require all "
7101 "metadata updates of a write to be on disk on returning to user space, but "
7102 "only the B<O_DSYNC> semantics, which require only actual file data and "
7103 "metadata necessary to retrieve it to be on disk by the time the system call "
7104 "returns."
7105 msgstr ""
7106 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
7107 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
7108 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
7109 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
7110 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
7111 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
7112 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
7113 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
7114 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
7115 "ていればよい。"
7116
7117 #. type: Plain text
7118 #: build/C/man2/open.2:836
7119 msgid ""
7120 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
7121 "create them; use B<mknod>(2)  instead."
7122 msgstr ""
7123 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
7124 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
7125 "用する。"
7126
7127 #. type: Plain text
7128 #: build/C/man2/open.2:849
7129 msgid ""
7130 "On NFS filesystems with UID mapping enabled, B<open>()  may return a file "
7131 "descriptor but, for example, B<read>(2)  requests are denied with "
7132 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
7133 "permissions, but UID mapping is performed by the server upon read and write "
7134 "requests."
7135 msgstr ""
7136 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
7137 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
7138 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
7139 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
7140 "る。"
7141
7142 #. type: Plain text
7143 #: build/C/man2/open.2:868
7144 msgid ""
7145 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
7146 "fields (respectively, time of last access, time of last status change, and "
7147 "time of last modification; see B<stat>(2))  are set to the current time, and "
7148 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
7149 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
7150 "st_ctime and st_mtime fields are set to the current time."
7151 msgstr ""
7152 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
7153 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
7154 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
7155 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
7156 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
7157 "I<st_mtime> フィールドが現在時刻に設定される。"
7158
7159 #. type: SS
7160 #: build/C/man2/open.2:868
7161 #, no-wrap
7162 msgid "O_DIRECT"
7163 msgstr "O_DIRECT"
7164
7165 #. type: Plain text
7166 #: build/C/man2/open.2:885
7167 msgid ""
7168 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
7169 "address of user-space buffers and the file offset of I/Os.  In Linux "
7170 "alignment restrictions vary by filesystem and kernel version and might be "
7171 "absent entirely.  However there is currently no filesystem-independent "
7172 "interface for an application to discover these restrictions for a given file "
7173 "or filesystem.  Some filesystems provide their own interfaces for doing so, "
7174 "for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
7175 msgstr ""
7176 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
7177 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
7178 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
7179 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
7180 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
7181 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
7182 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
7183 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
7184
7185 #. type: Plain text
7186 #: build/C/man2/open.2:890
7187 msgid ""
7188 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
7189 "the file offset must all be multiples of the logical block size of the "
7190 "filesystem.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
7191 msgstr ""
7192 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
7193 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
7194 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
7195
7196 #. type: Plain text
7197 #: build/C/man2/open.2:924
7198 msgid ""
7199 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
7200 "system call, if the memory buffer is a private mapping (i.e., any mapping "
7201 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
7202 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
7203 "whether submitted via an asynchronous I/O interface or from another thread "
7204 "in the process, should be completed before B<fork>(2)  is called.  Failure "
7205 "to do so can result in data corruption and undefined behavior in parent and "
7206 "child processes.  This restriction does not apply when the memory buffer for "
7207 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
7208 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
7209 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
7210 "will not be available to the child after B<fork>(2)."
7211 msgstr ""
7212 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
7213 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
7214 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
7215 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
7216 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
7217 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
7218 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
7219 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
7220 "動作が起こる可能性がある。\n"
7221 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
7222 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
7223 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
7224 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
7225 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
7226 "のである)。"
7227
7228 #. type: Plain text
7229 #: build/C/man2/open.2:934
7230 msgid ""
7231 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
7232 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
7233 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
7234 "flag of the same name, but without alignment restrictions."
7235 msgstr ""
7236 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
7237 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
7238 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
7239 "ラグを導入したが、アラインメントの制限はない。"
7240
7241 #. type: Plain text
7242 #: build/C/man2/open.2:943
7243 msgid ""
7244 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
7245 "Linux kernels simply ignore this flag.  Some filesystems may not implement "
7246 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
7247 msgstr ""
7248 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
7249 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
7250 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
7251 "と B<open>()  は B<EINVAL> で失敗する。"
7252
7253 #. type: Plain text
7254 #: build/C/man2/open.2:954
7255 msgid ""
7256 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
7257 "file, and especially to overlapping byte regions in the same file.  Even "
7258 "when the filesystem correctly handles the coherency issues in this "
7259 "situation, overall I/O throughput is likely to be slower than using either "
7260 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
7261 "with direct I/O to the same files."
7262 msgstr ""
7263 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
7264 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
7265 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
7266 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
7267 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
7268 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
7269
7270 #. type: Plain text
7271 #: build/C/man2/open.2:976
7272 msgid ""
7273 "The behaviour of B<O_DIRECT> with NFS will differ from local filesystems.  "
7274 "Older kernels, or kernels configured in certain ways, may not support this "
7275 "combination.  The NFS protocol does not support passing the flag to the "
7276 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
7277 "the server may still cache the I/O.  The client asks the server to make the "
7278 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
7279 "servers will perform poorly under these circumstances, especially if the I/O "
7280 "size is small.  Some servers may also be configured to lie to clients about "
7281 "the I/O having reached stable storage; this will avoid the performance "
7282 "penalty at some risk to data integrity in the event of server power "
7283 "failure.  The Linux NFS client places no alignment restrictions on "
7284 "B<O_DIRECT> I/O."
7285 msgstr ""
7286 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
7287 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
7288 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
7289 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
7290 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
7291 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
7292 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
7293 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
7294 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
7295 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
7296 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
7297 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
7298
7299 #. type: Plain text
7300 #: build/C/man2/open.2:983
7301 msgid ""
7302 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
7303 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
7304 "as a performance option which is disabled by default."
7305 msgstr ""
7306 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
7307 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
7308 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
7309
7310 #. type: Plain text
7311 #: build/C/man2/open.2:988
7312 msgid ""
7313 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
7314 "interface is just stupid, and was probably designed by a deranged monkey on "
7315 "some serious mind-controlling substances.\"\\(emLinus"
7316 msgstr ""
7317 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
7318 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
7319 "な」 \\(em Linus"
7320
7321 #.  FIXME . Check bugzilla report on open(O_ASYNC)
7322 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
7323 #. type: Plain text
7324 #: build/C/man2/open.2:1000
7325 msgid ""
7326 "Currently, it is not possible to enable signal-driven I/O by specifying "
7327 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
7328 msgstr ""
7329 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
7330 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
7331 "すること。"
7332
7333 #. type: Plain text
7334 #: build/C/man2/open.2:1022
7335 msgid ""
7336 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7337 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7338 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7339 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7340 msgstr ""
7341 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
7342 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
7343 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
7344 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
7345
7346 #. type: TH
7347 #: build/C/man3/perror.3:31
7348 #, no-wrap
7349 msgid "PERROR"
7350 msgstr "PERROR"
7351
7352 #. type: TH
7353 #: build/C/man3/perror.3:31
7354 #, no-wrap
7355 msgid "2012-04-17"
7356 msgstr "2012-04-17"
7357
7358 #. type: Plain text
7359 #: build/C/man3/perror.3:34
7360 msgid "perror - print a system error message"
7361 msgstr "perror - システムエラーメッセージを出力する"
7362
7363 #. type: Plain text
7364 #: build/C/man3/perror.3:38
7365 msgid "B<void perror(const char *>I<s>B<);>"
7366 msgstr "B<void perror(const char *>I<s>B<);>"
7367
7368 #. type: Plain text
7369 #: build/C/man3/perror.3:40
7370 msgid "B<#include E<lt>errno.hE<gt>>"
7371 msgstr "B<#include E<lt>errno.hE<gt>>"
7372
7373 #. type: Plain text
7374 #: build/C/man3/perror.3:42
7375 msgid "B<const char *>I<sys_errlist>B<[];>"
7376 msgstr "B<const char *>I<sys_errlist>B<[];>"
7377
7378 #. type: Plain text
7379 #: build/C/man3/perror.3:44
7380 msgid "B<int >I<sys_nerr>B<;>"
7381 msgstr "B<int >I<sys_nerr>B<;>"
7382
7383 #. type: Plain text
7384 #: build/C/man3/perror.3:46
7385 msgid "B<int >I<errno>B<;>"
7386 msgstr "B<int >I<errno>B<;>"
7387
7388 #. type: Plain text
7389 #: build/C/man3/perror.3:55
7390 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7391 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7392
7393 #. type: Plain text
7394 #: build/C/man3/perror.3:68
7395 msgid ""
7396 "The routine B<perror>()  produces a message on the standard error output, "
7397 "describing the last error encountered during a call to a system or library "
7398 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7399 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7400 "blank.  Then the message and a new-line."
7401 msgstr ""
7402 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7403 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7404 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7405 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7406 "メッセージと改行が出力される。"
7407
7408 #. type: Plain text
7409 #: build/C/man3/perror.3:76
7410 msgid ""
7411 "To be of most use, the argument string should include the name of the "
7412 "function that incurred the error.  The error number is taken from the "
7413 "external variable I<errno>, which is set when errors occur but not cleared "
7414 "when successful calls are made."
7415 msgstr ""
7416 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7417 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7418 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7419
7420 #. type: Plain text
7421 #: build/C/man3/perror.3:90
7422 msgid ""
7423 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7424 "obtain the error message without the newline.  The largest message number "
7425 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7426 "this list because new error values may not have been added to I<sys_errlist>"
7427 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7428 msgstr ""
7429 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7430 "の\n"
7431 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7432 "ジ\n"
7433 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7434 "と。\n"
7435 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7436 "る。\n"
7437 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7438
7439 #. type: Plain text
7440 #: build/C/man3/perror.3:111
7441 msgid ""
7442 "When a system call fails, it usually returns -1 and sets the variable "
7443 "I<errno> to a value describing what went wrong.  (These values can be found "
7444 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7445 "B<perror>()  serves to translate this error code into human-readable form.  "
7446 "Note that I<errno> is undefined after a successful library call: this call "
7447 "may well change this variable, even though it succeeds, for example because "
7448 "it internally used some other library function that failed.  Thus, if a "
7449 "failing call is not immediately followed by a call to B<perror>(), the value "
7450 "of I<errno> should be saved."
7451 msgstr ""
7452 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7453 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7454 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7455 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7456 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7457 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7458 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7459 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7460 "い。"
7461
7462 #. type: Plain text
7463 #: build/C/man3/perror.3:124
7464 msgid ""
7465 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7466 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7467 "I<sys_errlist> conform to BSD."
7468 msgstr ""
7469 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7470 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7471 "に準拠している。"
7472
7473 #.  and only when _BSD_SOURCE is defined.
7474 #.  When
7475 #.  .B _GNU_SOURCE
7476 #.  is defined, the symbols
7477 #.  .I _sys_nerr
7478 #.  and
7479 #.  .I _sys_errlist
7480 #.  are provided.
7481 #. type: Plain text
7482 #: build/C/man3/perror.3:139
7483 msgid ""
7484 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7485 "I<E<lt>stdio.hE<gt>>."
7486 msgstr ""
7487 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7488 "I<E<lt>stdio.hE<gt>> に含まれている。"
7489
7490 #. type: Plain text
7491 #: build/C/man3/perror.3:144
7492 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7493 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7494
7495 #. type: TH
7496 #: build/C/man2/pipe.2:36
7497 #, no-wrap
7498 msgid "PIPE"
7499 msgstr "PIPE"
7500
7501 #. type: TH
7502 #: build/C/man2/pipe.2:36
7503 #, no-wrap
7504 msgid "2012-02-14"
7505 msgstr "2012-02-14"
7506
7507 #. type: Plain text
7508 #: build/C/man2/pipe.2:39
7509 msgid "pipe, pipe2 - create pipe"
7510 msgstr "pipe, pipe2 - パイプを生成する"
7511
7512 #. type: Plain text
7513 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7514 #, no-wrap
7515 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7516 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7517
7518 #. type: Plain text
7519 #: build/C/man2/pipe.2:44
7520 #, no-wrap
7521 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7522 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7523
7524 #. type: Plain text
7525 #: build/C/man2/pipe.2:48
7526 #, no-wrap
7527 msgid ""
7528 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7529 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7530 "B<#include E<lt>unistd.hE<gt>>\n"
7531 msgstr ""
7532 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7533 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7534 "B<#include E<lt>unistd.hE<gt>>\n"
7535
7536 #. type: Plain text
7537 #: build/C/man2/pipe.2:50
7538 #, no-wrap
7539 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7540 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7541
7542 #. type: Plain text
7543 #: build/C/man2/pipe.2:66
7544 msgid ""
7545 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7546 "for interprocess communication.  The array I<pipefd> is used to return two "
7547 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7548 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7549 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7550 "until it is read from the read end of the pipe.  For further details, see "
7551 "B<pipe>(7)."
7552 msgstr ""
7553 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7554 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7555 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7556 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7557 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7558 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7559
7560 #. type: Plain text
7561 #: build/C/man2/pipe.2:76
7562 msgid ""
7563 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7564 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7565 msgstr ""
7566 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7567 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7568 "きる。"
7569
7570 #. type: TP
7571 #: build/C/man2/pipe.2:76
7572 #, no-wrap
7573 msgid "B<O_NONBLOCK>"
7574 msgstr "B<O_NONBLOCK>"
7575
7576 #. type: Plain text
7577 #: build/C/man2/pipe.2:84
7578 msgid ""
7579 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7580 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7581 "the same result."
7582 msgstr ""
7583 "新しく生成される二つのオープンファイル記述 (open file description) の "
7584 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7585 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7586 "なる。"
7587
7588 #. type: TP
7589 #: build/C/man2/pipe.2:84
7590 #, no-wrap
7591 msgid "B<O_CLOEXEC>"
7592 msgstr "B<O_CLOEXEC>"
7593
7594 #. type: Plain text
7595 #: build/C/man2/pipe.2:92
7596 msgid ""
7597 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7598 "descriptors.  See the description of the same flag in B<open>(2)  for "
7599 "reasons why this may be useful."
7600 msgstr ""
7601 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7602 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7603 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7604
7605 #. type: Plain text
7606 #: build/C/man2/pipe.2:102
7607 msgid "I<pipefd> is not valid."
7608 msgstr "I<pipefd> が無効な値である。"
7609
7610 #. type: Plain text
7611 #: build/C/man2/pipe.2:107
7612 msgid "(B<pipe2>())  Invalid value in I<flags>."
7613 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7614
7615 #. type: Plain text
7616 #: build/C/man2/pipe.2:110
7617 msgid "Too many file descriptors are in use by the process."
7618 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7619
7620 #. type: Plain text
7621 #: build/C/man2/pipe.2:118
7622 msgid ""
7623 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7624 "starting with version 2.9."
7625 msgstr ""
7626 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7627 "はバージョン 2.9 以降で利用できる。"
7628
7629 #. type: Plain text
7630 #: build/C/man2/pipe.2:121
7631 msgid "B<pipe>(): POSIX.1-2001."
7632 msgstr "B<pipe>(): POSIX.1-2001."
7633
7634 #. type: Plain text
7635 #: build/C/man2/pipe.2:124
7636 msgid "B<pipe2>()  is Linux-specific."
7637 msgstr "B<pipe2>()  は Linux 固有である。"
7638
7639 #.  fork.2 refers to this example program.
7640 #. type: Plain text
7641 #: build/C/man2/pipe.2:140
7642 msgid ""
7643 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7644 "process; the child inherits a duplicate set of file descriptors that refer "
7645 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7646 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7647 "the string contained in the program's command-line argument to the pipe, and "
7648 "the child reads this string a byte at a time from the pipe and echoes it on "
7649 "standard output."
7650 msgstr ""
7651 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7652 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7653 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7654 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7655 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7656 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7657
7658 #. type: Plain text
7659 #: build/C/man2/pipe.2:147
7660 #, no-wrap
7661 msgid ""
7662 "#include E<lt>sys/wait.hE<gt>\n"
7663 "#include E<lt>stdio.hE<gt>\n"
7664 "#include E<lt>stdlib.hE<gt>\n"
7665 "#include E<lt>unistd.hE<gt>\n"
7666 "#include E<lt>string.hE<gt>\n"
7667 msgstr ""
7668 "#include E<lt>sys/wait.hE<gt>\n"
7669 "#include E<lt>stdio.hE<gt>\n"
7670 "#include E<lt>stdlib.hE<gt>\n"
7671 "#include E<lt>unistd.hE<gt>\n"
7672 "#include E<lt>string.hE<gt>\n"
7673
7674 #. type: Plain text
7675 #: build/C/man2/pipe.2:154
7676 #, no-wrap
7677 msgid ""
7678 "int\n"
7679 "main(int argc, char *argv[])\n"
7680 "{\n"
7681 "    int pipefd[2];\n"
7682 "    pid_t cpid;\n"
7683 "    char buf;\n"
7684 msgstr ""
7685 "int\n"
7686 "main(int argc, char *argv[])\n"
7687 "{\n"
7688 "    int pipefd[2];\n"
7689 "    pid_t cpid;\n"
7690 "    char buf;\n"
7691
7692 #. type: Plain text
7693 #: build/C/man2/pipe.2:159
7694 #, no-wrap
7695 msgid ""
7696 "    if (argc != 2) {\n"
7697 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7698 "\texit(EXIT_FAILURE);\n"
7699 "    }\n"
7700 msgstr ""
7701 "    if (argc != 2) {\n"
7702 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7703 "\texit(EXIT_FAILURE);\n"
7704 "    }\n"
7705
7706 #. type: Plain text
7707 #: build/C/man2/pipe.2:164
7708 #, no-wrap
7709 msgid ""
7710 "    if (pipe(pipefd) == -1) {\n"
7711 "        perror(\"pipe\");\n"
7712 "        exit(EXIT_FAILURE);\n"
7713 "    }\n"
7714 msgstr ""
7715 "    if (pipe(pipefd) == -1) {\n"
7716 "        perror(\"pipe\");\n"
7717 "        exit(EXIT_FAILURE);\n"
7718 "    }\n"
7719
7720 #. type: Plain text
7721 #: build/C/man2/pipe.2:170
7722 #, no-wrap
7723 msgid ""
7724 "    cpid = fork();\n"
7725 "    if (cpid == -1) {\n"
7726 "        perror(\"fork\");\n"
7727 "        exit(EXIT_FAILURE);\n"
7728 "    }\n"
7729 msgstr ""
7730 "    cpid = fork();\n"
7731 "    if (cpid == -1) {\n"
7732 "        perror(\"fork\");\n"
7733 "        exit(EXIT_FAILURE);\n"
7734 "    }\n"
7735
7736 #. type: Plain text
7737 #: build/C/man2/pipe.2:173
7738 #, no-wrap
7739 msgid ""
7740 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7741 "        close(pipefd[1]);          /* Close unused write end */\n"
7742 msgstr ""
7743 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7744 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7745
7746 #. type: Plain text
7747 #: build/C/man2/pipe.2:176
7748 #, no-wrap
7749 msgid ""
7750 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7751 "            write(STDOUT_FILENO, &buf, 1);\n"
7752 msgstr ""
7753 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7754 "            write(STDOUT_FILENO, &buf, 1);\n"
7755
7756 #. type: Plain text
7757 #: build/C/man2/pipe.2:180
7758 #, no-wrap
7759 msgid ""
7760 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7761 "        close(pipefd[0]);\n"
7762 "        _exit(EXIT_SUCCESS);\n"
7763 msgstr ""
7764 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7765 "        close(pipefd[0]);\n"
7766 "        _exit(EXIT_SUCCESS);\n"
7767
7768 #. type: Plain text
7769 #: build/C/man2/pipe.2:189
7770 #, no-wrap
7771 msgid ""
7772 "    } else {            /* Parent writes argv[1] to pipe */\n"
7773 "        close(pipefd[0]);          /* Close unused read end */\n"
7774 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7775 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7776 "        wait(NULL);                /* Wait for child */\n"
7777 "        exit(EXIT_SUCCESS);\n"
7778 "    }\n"
7779 "}\n"
7780 msgstr ""
7781 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7782 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7783 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7784 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7785 "        wait(NULL);                /* 子プロセスを待つ */\n"
7786 "        exit(EXIT_SUCCESS);\n"
7787 "    }\n"
7788 "}\n"
7789
7790 #. type: Plain text
7791 #: build/C/man2/pipe.2:197
7792 msgid ""
7793 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7794 "(7)"
7795 msgstr ""
7796 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7797 "(7)"
7798
7799 #. type: TH
7800 #: build/C/man3/popen.3:40
7801 #, no-wrap
7802 msgid "POPEN"
7803 msgstr "POPEN"
7804
7805 #. type: Plain text
7806 #: build/C/man3/popen.3:43
7807 msgid "popen, pclose - pipe stream to or from a process"
7808 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7809
7810 #. type: Plain text
7811 #: build/C/man3/popen.3:48
7812 #, no-wrap
7813 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7814 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7815
7816 #. type: Plain text
7817 #: build/C/man3/popen.3:50
7818 #, no-wrap
7819 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7820 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7821
7822 #. type: Plain text
7823 #: build/C/man3/popen.3:60
7824 msgid "B<popen>(), B<pclose>():"
7825 msgstr "B<popen>(), B<pclose>():"
7826
7827 #. type: Plain text
7828 #: build/C/man3/popen.3:62
7829 msgid ""
7830 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7831 msgstr ""
7832 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7833
7834 #. type: Plain text
7835 #: build/C/man3/popen.3:73
7836 msgid ""
7837 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7838 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7839 "I<type> argument may specify only reading or writing, not both; the "
7840 "resulting stream is correspondingly read-only or write-only."
7841 msgstr ""
7842 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7843 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7844 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7845 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7846 "たは 書き込み専用のいずれかとなる。"
7847
7848 #. type: Plain text
7849 #: build/C/man3/popen.3:97
7850 msgid ""
7851 "The I<command> argument is a pointer to a null-terminated string containing "
7852 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7853 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7854 "argument is a pointer to a null-terminated string which must contain either "
7855 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7856 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7857 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7858 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7859 "B<open>(2)  for reasons why this may be useful."
7860 msgstr ""
7861 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7862 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7863 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7864 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7865 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7866 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7867 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7868 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7869 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7870
7871 #. type: Plain text
7872 #: build/C/man3/popen.3:113
7873 msgid ""
7874 "The return value from B<popen>()  is a normal standard I/O stream in all "
7875 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7876 "(3).  Writing to such a stream writes to the standard input of the command; "
7877 "the command's standard output is the same as that of the process that called "
7878 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7879 "reading from a \"popened\" stream reads the command's standard output, and "
7880 "the command's standard input is the same as that of the process that called "
7881 "B<popen>()."
7882 msgstr ""
7883 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7884 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7885 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7886 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7887 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7888 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7889 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7890 "セスの標準入力と同一である。"
7891
7892 #. type: Plain text
7893 #: build/C/man3/popen.3:117
7894 msgid "Note that output B<popen>()  streams are fully buffered by default."
7895 msgstr ""
7896 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7897 "に注意しよう。"
7898
7899 #. type: Plain text
7900 #: build/C/man3/popen.3:123
7901 msgid ""
7902 "The B<pclose>()  function waits for the associated process to terminate and "
7903 "returns the exit status of the command as returned by B<wait4>(2)."
7904 msgstr ""
7905 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7906 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7907
7908 #. type: Plain text
7909 #: build/C/man3/popen.3:131
7910 msgid ""
7911 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7912 "calls fail, or if it cannot allocate memory."
7913 msgstr ""
7914 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7915 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7916
7917 #.  These conditions actually give undefined results, so I commented
7918 #.  them out.
7919 #.  .I stream
7920 #.  is not associated with a "popen()ed" command, if
7921 #. .I stream
7922 #.  already "pclose()d", or if
7923 #. type: Plain text
7924 #: build/C/man3/popen.3:146
7925 msgid ""
7926 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7927 "some other error is detected.  In the event of an error, these functions set "
7928 "I<errno> to indicate the cause of the error."
7929 msgstr ""
7930 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7931 "かった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定され"
7932 "る。"
7933
7934 #. type: Plain text
7935 #: build/C/man3/popen.3:165
7936 msgid ""
7937 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7938 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7939 "appropriately.  If the I<type> argument is invalid, and this condition is "
7940 "detected, I<errno> is set to B<EINVAL>."
7941 msgstr ""
7942 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7943 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7944 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7945 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7946
7947 #. type: Plain text
7948 #: build/C/man3/popen.3:172
7949 msgid ""
7950 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7951 msgstr ""
7952 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7953 "B<ECHILD> にセットされる。"
7954
7955 #. type: Plain text
7956 #: build/C/man3/popen.3:178
7957 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7958 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7959
7960 #. type: Plain text
7961 #: build/C/man3/popen.3:191
7962 msgid ""
7963 "Since the standard input of a command opened for reading shares its seek "
7964 "offset with the process that called B<popen>(), if the original process has "
7965 "done a buffered read, the command's input position may not be as expected.  "
7966 "Similarly, the output from a command opened for writing may become "
7967 "intermingled with that of the original process.  The latter can be avoided "
7968 "by calling B<fflush>(3)  before B<popen>()."
7969 msgstr ""
7970 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7971 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7972 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7973 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7974 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7975 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7976
7977 #.  .SH HISTORY
7978 #.  A
7979 #.  .BR popen ()
7980 #.  and a
7981 #.  .BR pclose ()
7982 #.  function appeared in Version 7 AT&T UNIX.
7983 #. type: Plain text
7984 #: build/C/man3/popen.3:201
7985 msgid ""
7986 "Failure to execute the shell is indistinguishable from the shell's failure "
7987 "to execute command, or an immediate exit of the command.  The only hint is "
7988 "an exit status of 127."
7989 msgstr ""
7990 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
7991 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
7992 "なることである。"
7993
7994 #. type: Plain text
7995 #: build/C/man3/popen.3:211
7996 msgid ""
7997 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7998 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7999 msgstr ""
8000 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
8001 "B<fopen>(3), B<stdio>(3), B<system>(3)"
8002
8003 #. type: TH
8004 #: build/C/man3/printf.3:34
8005 #, no-wrap
8006 msgid "PRINTF"
8007 msgstr "PRINTF"
8008
8009 #. type: TH
8010 #: build/C/man3/printf.3:34
8011 #, no-wrap
8012 msgid "2013-09-04"
8013 msgstr "2013-09-04"
8014
8015 #. type: Plain text
8016 #: build/C/man3/printf.3:38
8017 msgid ""
8018 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
8019 "formatted output conversion"
8020 msgstr ""
8021 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
8022 "指定された書式に変換して出力を行う"
8023
8024 #. type: Plain text
8025 #: build/C/man3/printf.3:42
8026 msgid "B<int printf(const char *>I<format>B<, ...);>"
8027 msgstr "B<int printf(const char *>I<format>B<, ...);>"
8028
8029 #. type: Plain text
8030 #: build/C/man3/printf.3:44
8031 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
8032 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
8033
8034 #. type: Plain text
8035 #: build/C/man3/printf.3:46
8036 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
8037 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
8038
8039 #. type: Plain text
8040 #: build/C/man3/printf.3:48
8041 msgid ""
8042 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8043 "*>I<format>B<, ...);>"
8044 msgstr ""
8045 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8046 "*>I<format>B<, ...);>"
8047
8048 #. type: Plain text
8049 #: build/C/man3/printf.3:50
8050 msgid "B<#include E<lt>stdarg.hE<gt>>"
8051 msgstr "B<#include E<lt>stdarg.hE<gt>>"
8052
8053 #. type: Plain text
8054 #: build/C/man3/printf.3:52
8055 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
8056 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
8057
8058 #. type: Plain text
8059 #: build/C/man3/printf.3:54
8060 msgid ""
8061 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8062 ">I<ap>B<);>"
8063 msgstr ""
8064 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8065 ">I<ap>B<);>"
8066
8067 #. type: Plain text
8068 #: build/C/man3/printf.3:56
8069 msgid ""
8070 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
8071 msgstr ""
8072 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
8073
8074 #. type: Plain text
8075 #: build/C/man3/printf.3:59
8076 msgid ""
8077 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8078 "*>I<format>B<, va_list >I<ap>B<);>"
8079 msgstr ""
8080 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
8081 "*>I<format>B<, va_list >I<ap>B<);>"
8082
8083 #. type: Plain text
8084 #: build/C/man3/printf.3:68
8085 msgid "B<snprintf>(), B<vsnprintf>():"
8086 msgstr "B<snprintf>(), B<vsnprintf>():"
8087
8088 #. type: Plain text
8089 #: build/C/man3/printf.3:71
8090 msgid ""
8091 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8092 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8093 msgstr ""
8094 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
8095 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
8096
8097 #. type: Plain text
8098 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
8099 msgid "or I<cc -std=c99>"
8100 msgstr "or I<cc -std=c99>"
8101
8102 #. type: Plain text
8103 #: build/C/man3/printf.3:101
8104 msgid ""
8105 "The functions in the B<printf>()  family produce output according to a "
8106 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
8107 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
8108 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
8109 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
8110 "string I<str>."
8111 msgstr ""
8112 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
8113 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
8114 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
8115 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8116 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
8117
8118 #. type: Plain text
8119 #: build/C/man3/printf.3:110
8120 msgid ""
8121 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
8122 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
8123 msgstr ""
8124 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
8125 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
8126
8127 #. type: Plain text
8128 #: build/C/man3/printf.3:134
8129 msgid ""
8130 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
8131 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
8132 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
8133 "instead of a variable number of arguments.  These functions do not call the "
8134 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
8135 "I<ap> is undefined after the call.  See B<stdarg>(3)."
8136 msgstr ""
8137 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
8138 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
8139 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
8140 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
8141 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
8142 "(3)  を参照のこと。"
8143
8144 #. type: Plain text
8145 #: build/C/man3/printf.3:141
8146 msgid ""
8147 "These eight functions write the output under the control of a I<format> "
8148 "string that specifies how subsequent arguments (or arguments accessed via "
8149 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
8150 "output."
8151 msgstr ""
8152 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
8153 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
8154 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
8155
8156 #. type: Plain text
8157 #: build/C/man3/printf.3:152
8158 msgid ""
8159 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
8160 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
8161 "copying to take place between objects that overlap (e.g., if the target "
8162 "string array and one of the supplied input arguments refer to the same "
8163 "buffer).  See NOTES."
8164 msgstr ""
8165 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8166 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
8167 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
8168 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
8169 "照。"
8170
8171 #. type: SS
8172 #: build/C/man3/printf.3:152
8173 #, no-wrap
8174 msgid "Return value"
8175 msgstr "Return Values"
8176
8177 #. type: Plain text
8178 #: build/C/man3/printf.3:155
8179 msgid ""
8180 "Upon successful return, these functions return the number of characters "
8181 "printed (excluding the null byte used to end output to strings)."
8182 msgstr ""
8183 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
8184 "用する NULL バイトは数に含まれない)。"
8185
8186 #. type: Plain text
8187 #: build/C/man3/printf.3:171
8188 msgid ""
8189 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
8190 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
8191 "the output was truncated due to this limit then the return value is the "
8192 "number of characters (excluding the terminating null byte)  which would have "
8193 "been written to the final string if enough space had been available.  Thus, "
8194 "a return value of I<size> or more means that the output was truncated.  (See "
8195 "also below under NOTES.)"
8196 msgstr ""
8197 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
8198 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
8199 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
8200 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
8201 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
8202 "する (後述の注意も参照のこと)。"
8203
8204 #. type: Plain text
8205 #: build/C/man3/printf.3:173
8206 msgid "If an output error is encountered, a negative value is returned."
8207 msgstr "エラーが発生した場合は、負の数を返す。"
8208
8209 #. type: SS
8210 #: build/C/man3/printf.3:173
8211 #, no-wrap
8212 msgid "Format of the format string"
8213 msgstr "フォーマット文字列のフォーマット"
8214
8215 #. type: Plain text
8216 #: build/C/man3/printf.3:195
8217 msgid ""
8218 "The format string is a character string, beginning and ending in its initial "
8219 "shift state, if any.  The format string is composed of zero or more "
8220 "directives: ordinary characters (not B<%>), which are copied unchanged to "
8221 "the output stream; and conversion specifications, each of which results in "
8222 "fetching zero or more subsequent arguments.  Each conversion specification "
8223 "is introduced by the character B<%>, and ends with a I<conversion "
8224 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
8225 "an optional minimum I<field width>, an optional I<precision> and an optional "
8226 "I<length modifier>."
8227 msgstr ""
8228 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
8229 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
8230 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
8231 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
8232 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
8233 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
8234 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
8235 "子> を (この順序で) 置くことができる。"
8236
8237 #. type: Plain text
8238 #: build/C/man3/printf.3:208
8239 msgid ""
8240 "The arguments must correspond properly (after type promotion) with the "
8241 "conversion specifier.  By default, the arguments are used in the order "
8242 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
8243 "next argument (and it is an error if insufficiently many arguments are "
8244 "given).  One can also specify explicitly which argument is taken, at each "
8245 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
8246 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
8247 "denotes the position in the argument list of the desired argument, indexed "
8248 "starting from 1.  Thus,"
8249 msgstr ""
8250 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
8251 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
8252 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
8253 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
8254 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
8255 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
8256 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
8257
8258 #. type: Plain text
8259 #: build/C/man3/printf.3:212
8260 #, no-wrap
8261 msgid "printf(\"%*d\", width, num);\n"
8262 msgstr "printf(\"%*d\", width, num);\n"
8263
8264 #. type: Plain text
8265 #: build/C/man3/printf.3:216
8266 msgid "and"
8267 msgstr "と"
8268
8269 #. type: Plain text
8270 #: build/C/man3/printf.3:220
8271 #, no-wrap
8272 msgid "printf(\"%2$*1$d\", width, num);\n"
8273 msgstr "printf(\"%2$*1$d\", width, num);\n"
8274
8275 #. type: Plain text
8276 #: build/C/man3/printf.3:236
8277 msgid ""
8278 "are equivalent.  The second style allows repeated references to the same "
8279 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
8280 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
8281 "\\(aq is used, it must be used throughout for all conversions taking an "
8282 "argument and all width and precision arguments, but it may be mixed with \"%%"
8283 "\" formats which do not consume an argument.  There may be no gaps in the "
8284 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
8285 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
8286 "format string."
8287 msgstr ""
8288 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
8289 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
8290 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
8291 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
8292 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
8293 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
8294 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
8295
8296 #. type: Plain text
8297 #: build/C/man3/printf.3:246
8298 msgid ""
8299 "For some numeric conversions a radix character (\"decimal point\") or "
8300 "thousands' grouping character is used.  The actual character used depends on "
8301 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
8302 "radix character, and does not have a grouping character.  Thus,"
8303 msgstr ""
8304 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
8305 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
8306 "\\(aq を用い、 区切り文字は使わない。 従って、"
8307
8308 #. type: Plain text
8309 #: build/C/man3/printf.3:250
8310 #, no-wrap
8311 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
8312 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
8313
8314 #. type: Plain text
8315 #: build/C/man3/printf.3:255
8316 msgid ""
8317 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
8318 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
8319 msgstr ""
8320 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
8321 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
8322
8323 #. type: SS
8324 #: build/C/man3/printf.3:255
8325 #, no-wrap
8326 msgid "The flag characters"
8327 msgstr "フラグ文字"
8328
8329 #. type: Plain text
8330 #: build/C/man3/printf.3:257
8331 msgid "The character % is followed by zero or more of the following flags:"
8332 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
8333
8334 #. type: TP
8335 #: build/C/man3/printf.3:257
8336 #, no-wrap
8337 msgid "B<#>"
8338 msgstr "B<#>"
8339
8340 #. type: Plain text
8341 #: build/C/man3/printf.3:291
8342 msgid ""
8343 "The value should be converted to an \"alternate form\".  For B<o> "
8344 "conversions, the first character of the output string is made zero (by "
8345 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
8346 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
8347 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
8348 "conversions, the result will always contain a decimal point, even if no "
8349 "digits follow it (normally, a decimal point appears in the results of those "
8350 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
8351 "trailing zeros are not removed from the result as they would otherwise be.  "
8352 "For other conversions, the result is undefined."
8353 msgstr ""
8354 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
8355 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
8356 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
8357 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
8358 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
8359 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
8360 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
8361 "変換では、結果は未定義である。"
8362
8363 #. type: TP
8364 #: build/C/man3/printf.3:291
8365 #, no-wrap
8366 msgid "B<\\&0>"
8367 msgstr "B<\\&0>"
8368
8369 #. type: Plain text
8370 #: build/C/man3/printf.3:331
8371 msgid ""
8372 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8373 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8374 "converted value is padded on the left with zeros rather than blanks.  If the "
8375 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8376 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8377 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8378 "is undefined."
8379 msgstr ""
8380 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8381 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8382 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8383 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8384 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8385 "である。"
8386
8387 #. type: TP
8388 #: build/C/man3/printf.3:331
8389 #, no-wrap
8390 msgid "B<->"
8391 msgstr "B<->"
8392
8393 #. type: Plain text
8394 #: build/C/man3/printf.3:344
8395 msgid ""
8396 "The converted value is to be left adjusted on the field boundary.  (The "
8397 "default is right justification.)  Except for B<n> conversions, the converted "
8398 "value is padded on the right with blanks, rather than on the left with "
8399 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8400 msgstr ""
8401 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8402 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8403 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8404
8405 #. type: TP
8406 #: build/C/man3/printf.3:344
8407 #, no-wrap
8408 msgid "B<\\(aq \\(aq>"
8409 msgstr "B<' '>"
8410
8411 #. type: Plain text
8412 #: build/C/man3/printf.3:348
8413 msgid ""
8414 "(a space) A blank should be left before a positive number (or empty string) "
8415 "produced by a signed conversion."
8416 msgstr ""
8417 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8418 "列) が置かれる。"
8419
8420 #. type: TP
8421 #: build/C/man3/printf.3:348
8422 #, no-wrap
8423 msgid "B<+>"
8424 msgstr "B<+>"
8425
8426 #. type: Plain text
8427 #: build/C/man3/printf.3:356
8428 msgid ""
8429 "A sign (+ or -) should always be placed before a number produced by a signed "
8430 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8431 "overrides a space if both are used."
8432 msgstr ""
8433 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8434 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8435 "が使われている場合には、 B<+> が優先される。"
8436
8437 #. type: Plain text
8438 #: build/C/man3/printf.3:359
8439 msgid ""
8440 "The five flag characters above are defined in the C standard.  The SUSv2 "
8441 "specifies one further flag character."
8442 msgstr ""
8443 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8444 "グ文字が規定されている。"
8445
8446 #. type: TP
8447 #: build/C/man3/printf.3:359
8448 #, no-wrap
8449 msgid "B<\\(aq>"
8450 msgstr "B<\\(aq>"
8451
8452 #. type: Plain text
8453 #: build/C/man3/printf.3:376
8454 msgid ""
8455 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8456 "output is to be grouped with thousands' grouping characters if the locale "
8457 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8458 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8459 "\\(aqF>."
8460 msgstr ""
8461 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8462 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8463 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8464 "\\(aqF は SUSv2 には含まれていない。"
8465
8466 #. type: Plain text
8467 #: build/C/man3/printf.3:378
8468 msgid "glibc 2.2 adds one further flag character."
8469 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8470
8471 #. type: TP
8472 #: build/C/man3/printf.3:378
8473 #, no-wrap
8474 msgid "B<I>"
8475 msgstr "B<I>"
8476
8477 #.  outdigits keyword in locale file
8478 #. type: Plain text
8479 #: build/C/man3/printf.3:388
8480 msgid ""
8481 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8482 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8483 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8484 msgstr ""
8485 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8486 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8487 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8488
8489 #. type: SS
8490 #: build/C/man3/printf.3:388
8491 #, no-wrap
8492 msgid "The field width"
8493 msgstr "フィールド幅"
8494
8495 #. type: Plain text
8496 #: build/C/man3/printf.3:404
8497 msgid ""
8498 "An optional decimal digit string (with nonzero first digit) specifying a "
8499 "minimum field width.  If the converted value has fewer characters than the "
8500 "field width, it will be padded with spaces on the left (or right, if the "
8501 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8502 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8503 "the field width is given in the next argument, or in the I<m>-th argument, "
8504 "respectively, which must be of type I<int>.  A negative field width is taken "
8505 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8506 "nonexistent or small field width cause truncation of a field; if the result "
8507 "of a conversion is wider than the field width, the field is expanded to "
8508 "contain the conversion result."
8509 msgstr ""
8510 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8511 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8512 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8513 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8514 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8515 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8516 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8517 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8518 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8519 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8520
8521 #. type: SS
8522 #: build/C/man3/printf.3:404
8523 #, no-wrap
8524 msgid "The precision"
8525 msgstr "精度"
8526
8527 #. type: Plain text
8528 #: build/C/man3/printf.3:441
8529 #, fuzzy
8530 #| msgid ""
8531 #| "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by "
8532 #| "an optional decimal digit string.  Instead of a decimal digit string one "
8533 #| "may write \"*\" or \"*m$\" (for some decimal integer m) to specify that "
8534 #| "the precision is given in the next argument, or in the m-th argument, "
8535 #| "respectively, which must be of type I<int>.  If the precision is given as "
8536 #| "just \\(aq.\\(aq, or the precision is negative, the precision is taken to "
8537 #| "be zero.  This gives the minimum number of digits to appear for B<d>, "
8538 #| "B<i>, B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to "
8539 #| "appear after the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and "
8540 #| "B<F> conversions, the maximum number of significant digits for B<g> and "
8541 #| "B<G> conversions, or the maximum number of characters to be printed from "
8542 #| "a string for B<s> and B<S> conversions."
8543 msgid ""
8544 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8545 "optional decimal digit string.  Instead of a decimal digit string one may "
8546 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8547 "precision is given in the next argument, or in the m-th argument, "
8548 "respectively, which must be of type I<int>.  If the precision is given as "
8549 "just \\(aq.\\(aq, the precision is taken to be zero.  A negative precision "
8550 "is taken as if the precision were omitted.  This gives the minimum number of "
8551 "digits to appear for B<d>, B<i>, B<o>, B<u>, B<x>, and B<X> conversions, the "
8552 "number of digits to appear after the radix character for B<a>, B<A>, B<e>, "
8553 "B<E>, B<f>, and B<F> conversions, the maximum number of significant digits "
8554 "for B<g> and B<G> conversions, or the maximum number of characters to be "
8555 "printed from a string for B<s> and B<S> conversions."
8556 msgstr ""
8557 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8558 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8559 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8560 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8561 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8562 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8563 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8564 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8565 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8566 "る最大文字数を指定する。"
8567
8568 #. type: SS
8569 #: build/C/man3/printf.3:441
8570 #, no-wrap
8571 msgid "The length modifier"
8572 msgstr "長さ修飾子"
8573
8574 #. type: Plain text
8575 #: build/C/man3/printf.3:451
8576 msgid ""
8577 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8578 "B<X> conversion."
8579 msgstr ""
8580 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8581
8582 #. type: TP
8583 #: build/C/man3/printf.3:451 build/C/man3/scanf.3:294
8584 #, no-wrap
8585 msgid "B<hh>"
8586 msgstr "B<hh>"
8587
8588 #. type: Plain text
8589 #: build/C/man3/printf.3:462
8590 msgid ""
8591 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8592 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8593 "I<signed char> argument."
8594 msgstr ""
8595 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8596 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8597
8598 #. type: TP
8599 #: build/C/man3/printf.3:462 build/C/man3/scanf.3:284
8600 #, no-wrap
8601 msgid "B<h>"
8602 msgstr "B<h>"
8603
8604 #. type: Plain text
8605 #: build/C/man3/printf.3:473
8606 msgid ""
8607 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8608 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8609 "to a I<short int> argument."
8610 msgstr ""
8611 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8612 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8613
8614 #. type: TP
8615 #: build/C/man3/printf.3:473 build/C/man3/scanf.3:311
8616 #, no-wrap
8617 msgid "B<l>"
8618 msgstr "B<l>"
8619
8620 #. type: Plain text
8621 #: build/C/man3/printf.3:492
8622 msgid ""
8623 "(ell) A following integer conversion corresponds to a I<long int> or "
8624 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8625 "a pointer to a I<long int> argument, or a following B<c> conversion "
8626 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8627 "corresponds to a pointer to I<wchar_t> argument."
8628 msgstr ""
8629 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8630 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8631 "変換では I<wchar_t> へのポインタであることを示す。"
8632
8633 #. type: TP
8634 #: build/C/man3/printf.3:492
8635 #, no-wrap
8636 msgid "B<ll>"
8637 msgstr "B<ll> (エルエル)"
8638
8639 #. type: Plain text
8640 #: build/C/man3/printf.3:504
8641 msgid ""
8642 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8643 "or I<unsigned long long int> argument, or a following B<n> conversion "
8644 "corresponds to a pointer to a I<long long int> argument."
8645 msgstr ""
8646 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8647 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8648
8649 #. type: TP
8650 #: build/C/man3/printf.3:504 build/C/man3/scanf.3:338
8651 #, no-wrap
8652 msgid "B<L>"
8653 msgstr "B<L>"
8654
8655 #. type: Plain text
8656 #: build/C/man3/printf.3:520
8657 msgid ""
8658 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8659 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8660 "not.)"
8661 msgstr ""
8662 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8663 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8664 "認められていない。)"
8665
8666 #. type: TP
8667 #: build/C/man3/printf.3:520 build/C/man3/scanf.3:354
8668 #, no-wrap
8669 msgid "B<q>"
8670 msgstr "B<q>"
8671
8672 #. type: Plain text
8673 #: build/C/man3/printf.3:526
8674 msgid ""
8675 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8676 "B<ll>."
8677 msgstr ""
8678 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8679 "意味である。"
8680
8681 #. type: TP
8682 #: build/C/man3/printf.3:526 build/C/man3/scanf.3:302
8683 #, no-wrap
8684 msgid "B<j>"
8685 msgstr "B<j>"
8686
8687 #. type: Plain text
8688 #: build/C/man3/printf.3:533
8689 msgid ""
8690 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8691 "argument."
8692 msgstr ""
8693 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8694
8695 #. type: TP
8696 #: build/C/man3/printf.3:533 build/C/man3/scanf.3:366
8697 #, no-wrap
8698 msgid "B<z>"
8699 msgstr "B<z>"
8700
8701 #. type: Plain text
8702 #: build/C/man3/printf.3:544
8703 msgid ""
8704 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8705 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8706 msgstr ""
8707 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8708 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8709
8710 #. type: TP
8711 #: build/C/man3/printf.3:544 build/C/man3/scanf.3:359
8712 #, no-wrap
8713 msgid "B<t>"
8714 msgstr "B<t>"
8715
8716 #. type: Plain text
8717 #: build/C/man3/printf.3:549
8718 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8719 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8720
8721 #. type: Plain text
8722 #: build/C/man3/printf.3:578
8723 msgid ""
8724 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
8725 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8726 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8727 msgstr ""
8728 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8729 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8730 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8731
8732 #. type: SS
8733 #: build/C/man3/printf.3:578
8734 #, no-wrap
8735 msgid "The conversion specifier"
8736 msgstr "変換指定子"
8737
8738 #. type: Plain text
8739 #: build/C/man3/printf.3:581
8740 msgid ""
8741 "A character that specifies the type of conversion to be applied.  The "
8742 "conversion specifiers and their meanings are:"
8743 msgstr ""
8744 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8745
8746 #. type: TP
8747 #: build/C/man3/printf.3:581
8748 #, no-wrap
8749 msgid "B<d>, B<i>"
8750 msgstr "B<d>, B<i>"
8751
8752 #. type: Plain text
8753 #: build/C/man3/printf.3:591
8754 msgid ""
8755 "The I<int> argument is converted to signed decimal notation.  The precision, "
8756 "if any, gives the minimum number of digits that must appear; if the "
8757 "converted value requires fewer digits, it is padded on the left with zeros.  "
8758 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8759 "the output is empty."
8760 msgstr ""
8761 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8762 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8763 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8764 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8765
8766 #. type: TP
8767 #: build/C/man3/printf.3:591
8768 #, no-wrap
8769 msgid "B<o>, B<u>, B<x>, B<X>"
8770 msgstr "B<o>, B<u>, B<x>, B<X>"
8771
8772 #. type: Plain text
8773 #: build/C/man3/printf.3:618
8774 msgid ""
8775 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8776 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8777 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8778 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8779 "of digits that must appear; if the converted value requires fewer digits, it "
8780 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8781 "printed with an explicit precision 0, the output is empty."
8782 msgstr ""
8783 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8784 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8785 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8786 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8787 "られる。"
8788
8789 #. type: TP
8790 #: build/C/man3/printf.3:618
8791 #, no-wrap
8792 msgid "B<e>, B<E>"
8793 msgstr "B<e>, B<E>"
8794
8795 #. type: Plain text
8796 #: build/C/man3/printf.3:637
8797 msgid ""
8798 "The I<double> argument is rounded and converted in the style [-]dB<\\&."
8799 ">dddB<e>\\(+-dd where there is one digit before the decimal-point character "
8800 "and the number of digits after it is equal to the precision; if the "
8801 "precision is missing, it is taken as 6; if the precision is zero, no decimal-"
8802 "point character appears.  An B<E> conversion uses the letter B<E> (rather "
8803 "than B<e>)  to introduce the exponent.  The exponent always contains at "
8804 "least two digits; if the value is zero, the exponent is 00."
8805 msgstr ""
8806 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
8807 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
8808 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
8809 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
8810 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
8811 "指数の値が 0 の場合には、00 と表示される。"
8812
8813 #. type: TP
8814 #: build/C/man3/printf.3:637
8815 #, no-wrap
8816 msgid "B<f>, B<F>"
8817 msgstr "B<f>, B<F>"
8818
8819 #. type: Plain text
8820 #: build/C/man3/printf.3:648
8821 msgid ""
8822 "The I<double> argument is rounded and converted to decimal notation in the "
8823 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8824 "character is equal to the precision specification.  If the precision is "
8825 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8826 "point character appears.  If a decimal point appears, at least one digit "
8827 "appears before it."
8828 msgstr ""
8829 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8830 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8831 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8832 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8833
8834 #. type: Plain text
8835 #: build/C/man3/printf.3:659
8836 msgid ""
8837 "(The SUSv2 does not know about B<F> and says that character string "
8838 "representations for infinity and NaN may be made available.  The C99 "
8839 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8840 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8841 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8842 msgstr ""
8843 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8844 "行ってもよいことになっている。\n"
8845 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8846 "し、\n"
8847 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8848 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8849
8850 #. type: TP
8851 #: build/C/man3/printf.3:659
8852 #, no-wrap
8853 msgid "B<g>, B<G>"
8854 msgstr "B<g>, B<G>"
8855
8856 #. type: Plain text
8857 #: build/C/man3/printf.3:684
8858 msgid ""
8859 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8860 "for B<G> conversions).  The precision specifies the number of significant "
8861 "digits.  If the precision is missing, 6 digits are given; if the precision "
8862 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8863 "conversion is less than -4 or greater than or equal to the precision.  "
8864 "Trailing zeros are removed from the fractional part of the result; a decimal "
8865 "point appears only if it is followed by at least one digit."
8866 msgstr ""
8867 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8868 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8869 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8870 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8871 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8872 "一つある場合にだけである。"
8873
8874 #. type: TP
8875 #: build/C/man3/printf.3:684
8876 #, no-wrap
8877 msgid "B<a>, B<A>"
8878 msgstr "B<a>, B<A>"
8879
8880 #. type: Plain text
8881 #: build/C/man3/printf.3:708
8882 msgid ""
8883 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8884 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8885 "\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters "
8886 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8887 "digit before the decimal point, and the number of digits after it is equal "
8888 "to the precision.  The default precision suffices for an exact "
8889 "representation of the value if an exact representation in base 2 exists and "
8890 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8891 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8892 "and nonzero but otherwise unspecified for normalized numbers."
8893 msgstr ""
8894 "(C99 にはあるが SUSv2 にはない) B<a> 変換では、 I<double> 引き数を\n"
8895 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8896 "16 進表記に変換する。\n"
8897 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8898 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8899 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8900 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8901 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8902 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8903 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8904
8905 #. type: TP
8906 #: build/C/man3/printf.3:708 build/C/man3/scanf.3:459
8907 #: build/C/man3/wprintf.3:151
8908 #, no-wrap
8909 msgid "B<c>"
8910 msgstr "B<c>"
8911
8912 #. type: Plain text
8913 #: build/C/man3/printf.3:726
8914 msgid ""
8915 "If no B<l> modifier is present, the I<int> argument is converted to an "
8916 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8917 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8918 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8919 "conversion state starting in the initial state, and the resulting multibyte "
8920 "string is written."
8921 msgstr ""
8922 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8923 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8924 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8925 "換し、 変換されたマルチバイト文字列を出力する。"
8926
8927 #. type: TP
8928 #: build/C/man3/printf.3:726 build/C/man3/scanf.3:451
8929 #: build/C/man3/wprintf.3:165
8930 #, no-wrap
8931 msgid "B<s>"
8932 msgstr "B<s>"
8933
8934 #. type: Plain text
8935 #: build/C/man3/printf.3:741
8936 msgid ""
8937 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
8938 "to be a pointer to an array of character type (pointer to a string).  "
8939 "Characters from the array are written up to (but not including) a "
8940 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8941 "than the number specified are written.  If a precision is given, no null "
8942 "byte need be present; if the precision is not specified, or is greater than "
8943 "the size of the array, the array must contain a terminating null byte."
8944 msgstr ""
8945 "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポイン"
8946 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8947 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8948 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8949 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8950 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8951 "なければならない。"
8952
8953 #. type: Plain text
8954 #: build/C/man3/printf.3:768
8955 msgid ""
8956 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
8957 "expected to be a pointer to an array of wide characters.  Wide characters "
8958 "from the array are converted to multibyte characters (each by a call to the "
8959 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
8960 "state before the first wide character), up to and including a terminating "
8961 "null wide character.  The resulting multibyte characters are written up to "
8962 "(but not including) the terminating null byte.  If a precision is specified, "
8963 "no more bytes than the number specified are written, but no partial "
8964 "multibyte characters are written.  Note that the precision determines the "
8965 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
8966 "positions>.  The array must contain a terminating null wide character, "
8967 "unless a precision is given and it is so small that the number of bytes "
8968 "written exceeds it before the end of the array is reached."
8969 msgstr ""
8970 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文"
8971 "字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字"
8972 "毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド"
8973 "文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8974 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8975 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8976 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8977 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8978 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8979 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8980 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8981 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8982 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8983 "い。"
8984
8985 #. type: TP
8986 #: build/C/man3/printf.3:768
8987 #, no-wrap
8988 msgid "B<C>"
8989 msgstr "B<C>"
8990
8991 #. type: Plain text
8992 #: build/C/man3/printf.3:774
8993 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8994 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8995
8996 #. type: TP
8997 #: build/C/man3/printf.3:774
8998 #, no-wrap
8999 msgid "B<S>"
9000 msgstr "B<S>"
9001
9002 #. type: Plain text
9003 #: build/C/man3/printf.3:780
9004 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
9005 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
9006
9007 #. type: TP
9008 #: build/C/man3/printf.3:780 build/C/man3/scanf.3:502
9009 #, no-wrap
9010 msgid "B<p>"
9011 msgstr "B<p>"
9012
9013 #. type: Plain text
9014 #: build/C/man3/printf.3:788
9015 msgid ""
9016 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
9017 "or B<%#lx>)."
9018 msgstr ""
9019 "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
9020
9021 #. type: TP
9022 #: build/C/man3/printf.3:788 build/C/man3/scanf.3:510
9023 #, no-wrap
9024 msgid "B<n>"
9025 msgstr "B<n>"
9026
9027 #. type: Plain text
9028 #: build/C/man3/printf.3:795
9029 msgid ""
9030 "The number of characters written so far is stored into the integer indicated "
9031 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
9032 msgstr ""
9033 "これまでに出力された文字数を I<int\\ *> (または類似の型) のポインタ引き数が指"
9034 "す整数に保存する。 引き数の変換は行われない。"
9035
9036 #. type: TP
9037 #: build/C/man3/printf.3:795
9038 #, no-wrap
9039 msgid "B<m>"
9040 msgstr "B<m>"
9041
9042 #. type: Plain text
9043 #: build/C/man3/printf.3:801
9044 msgid ""
9045 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
9046 "required."
9047 msgstr ""
9048 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
9049
9050 #. type: TP
9051 #: build/C/man3/printf.3:801 build/C/man3/scanf.3:377
9052 #, no-wrap
9053 msgid "B<%>"
9054 msgstr "B<%>"
9055
9056 #. type: Plain text
9057 #: build/C/man3/printf.3:807
9058 msgid ""
9059 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
9060 "conversion specification is \\(aq%%\\(aq."
9061 msgstr ""
9062 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
9063 "%\" となる。"
9064
9065 #. type: Plain text
9066 #: build/C/man3/printf.3:822
9067 msgid ""
9068 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9069 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
9070 "B<vsnprintf>()  functions conform to C99."
9071 msgstr ""
9072 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
9073 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
9074 "B<vsnprintf>()  は C99 に準拠している。"
9075
9076 #. type: Plain text
9077 #: build/C/man3/printf.3:835
9078 msgid ""
9079 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
9080 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
9081 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
9082 "this case, and gives the return value (as always)  as the number of "
9083 "characters that would have been written in case the output string has been "
9084 "large enough."
9085 msgstr ""
9086 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
9087 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
9088 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
9089 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
9090 "出力されるであろう文字数を返す。"
9091
9092 #. type: Plain text
9093 #: build/C/man3/printf.3:849
9094 msgid ""
9095 "Linux libc4 knows about the five C standard flags.  It knows about the "
9096 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
9097 "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 "
9098 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
9099 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
9100 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
9101 "dependent radix character, no thousands' separator, no NaN or infinity, no "
9102 "\"%m$\" and \"*m$\"."
9103 msgstr ""
9104 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
9105 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
9106 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
9107 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
9108 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
9109 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
9110 "えない。"
9111
9112 #. type: Plain text
9113 #: build/C/man3/printf.3:860
9114 msgid ""
9115 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
9116 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
9117 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
9118 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
9119 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
9120 "outputs I<strerror(errno)>."
9121 msgstr ""
9122 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
9123 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
9124 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
9125 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
9126 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
9127 "ある。"
9128
9129 #. type: Plain text
9130 #: build/C/man3/printf.3:862
9131 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
9132 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
9133
9134 #. type: Plain text
9135 #: build/C/man3/printf.3:865
9136 msgid ""
9137 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
9138 "characters B<a> and B<A>."
9139 msgstr ""
9140 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
9141 "加された。"
9142
9143 #. type: Plain text
9144 #: build/C/man3/printf.3:868
9145 msgid ""
9146 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
9147 "flag character B<I>."
9148 msgstr ""
9149 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
9150 "追加された。"
9151
9152 #. type: Plain text
9153 #: build/C/man3/printf.3:870
9154 msgid "Some programs imprudently rely on code such as the following"
9155 msgstr ""
9156 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
9157 "ラムがある。"
9158
9159 #. type: Plain text
9160 #: build/C/man3/printf.3:872
9161 #, no-wrap
9162 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
9163 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
9164
9165 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
9166 #. type: Plain text
9167 #: build/C/man3/printf.3:888
9168 msgid ""
9169 "to append text to I<buf>.  However, the standards explicitly note that the "
9170 "results are undefined if source and destination buffers overlap when calling "
9171 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
9172 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
9173 "such as the above will B<not> produce the expected results."
9174 msgstr ""
9175 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
9176 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
9177 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
9178 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
9179 "結果が得られ「ない」ことがある。"
9180
9181 #.  .SH HISTORY
9182 #.  UNIX V7 defines the three routines
9183 #.  .BR printf (),
9184 #.  .BR fprintf (),
9185 #.  .BR sprintf (),
9186 #.  and has the flag \-, the width or precision *, the length modifier l,
9187 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
9188 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
9189 #.  #, + and <space> and no longer mentions D,O,U,X.
9190 #.  2.11BSD has
9191 #.  .BR vprintf (),
9192 #.  .BR vfprintf (),
9193 #.  .BR vsprintf (),
9194 #.  and warns not to use D,O,U,X.
9195 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
9196 #.  and the conversions n, p, E, G, X (with current meaning)
9197 #.  and deprecates D,O,U.
9198 #.  4.4BSD introduces the functions
9199 #.  .BR snprintf ()
9200 #.  and
9201 #.  .BR vsnprintf (),
9202 #.  and the length modifier q.
9203 #.  FreeBSD also has functions
9204 #.  .BR asprintf ()
9205 #.  and
9206 #.  .BR vasprintf (),
9207 #.  that allocate a buffer large enough for
9208 #.  .BR sprintf ().
9209 #.  In glibc there are functions
9210 #.  .BR dprintf ()
9211 #.  and
9212 #.  .BR vdprintf ()
9213 #.  that print to a file descriptor instead of a stream.
9214 #. type: Plain text
9215 #: build/C/man3/printf.3:930
9216 msgid ""
9217 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
9218 "conforms to the C99 standard, that is, behaves as described above, since "
9219 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
9220 "was truncated."
9221 msgstr ""
9222 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
9223 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
9224 "切り詰められた場合は -1 を返す。"
9225
9226 #. type: Plain text
9227 #: build/C/man3/printf.3:947
9228 msgid ""
9229 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
9230 "callers must be careful not to overflow the actual space; this is often "
9231 "impossible to assure.  Note that the length of the strings produced is "
9232 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
9233 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
9234 msgstr ""
9235 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
9236 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
9237 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
9238 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
9239 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
9240
9241 #. type: Plain text
9242 #: build/C/man3/printf.3:960
9243 msgid ""
9244 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
9245 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
9246 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
9247 "libc4 leads to serious security problems."
9248 msgstr ""
9249 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
9250 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
9251 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
9252 "深刻なセキュリティ問題を引き起こすことがある。"
9253
9254 #.  .PP
9255 #.  Some floating-point conversions under early libc4
9256 #.  caused memory leaks.
9257 #. type: Plain text
9258 #: build/C/man3/printf.3:974
9259 msgid ""
9260 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
9261 "contain a % character.  If I<foo> comes from untrusted user input, it may "
9262 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
9263 "a security hole."
9264 msgstr ""
9265 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
9266 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
9267 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
9268 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
9269 "ルを作ることになるかもしれない。"
9270
9271 #. type: Plain text
9272 #: build/C/man3/printf.3:978
9273 msgid "To print I<Pi> to five decimal places:"
9274 msgstr "I<Pi> を 5 桁で出力する。"
9275
9276 #. type: Plain text
9277 #: build/C/man3/printf.3:984
9278 #, no-wrap
9279 msgid ""
9280 "#include E<lt>math.hE<gt>\n"
9281 "#include E<lt>stdio.hE<gt>\n"
9282 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9283 msgstr ""
9284 "#include E<lt>math.hE<gt>\n"
9285 "#include E<lt>stdio.hE<gt>\n"
9286 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
9287
9288 #. type: Plain text
9289 #: build/C/man3/printf.3:993
9290 msgid ""
9291 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
9292 "I<weekday> and I<month> are pointers to strings:"
9293 msgstr ""
9294 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
9295 "I<month> は文字列へのポインタである)"
9296
9297 #. type: Plain text
9298 #: build/C/man3/printf.3:999
9299 #, no-wrap
9300 msgid ""
9301 "#include E<lt>stdio.hE<gt>\n"
9302 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9303 "        weekday, month, day, hour, min);\n"
9304 msgstr ""
9305 "#include E<lt>stdio.hE<gt>\n"
9306 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
9307 "\tweekday, month, day, hour, min);\n"
9308
9309 #. type: Plain text
9310 #: build/C/man3/printf.3:1005
9311 msgid ""
9312 "Many countries use the day-month-year order.  Hence, an internationalized "
9313 "version must be able to print the arguments in an order specified by the "
9314 "format:"
9315 msgstr ""
9316 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
9317 "順番で 引き数を表示できなければならない。"
9318
9319 #. type: Plain text
9320 #: build/C/man3/printf.3:1011
9321 #, no-wrap
9322 msgid ""
9323 "#include E<lt>stdio.hE<gt>\n"
9324 "fprintf(stdout, format,\n"
9325 "        weekday, month, day, hour, min);\n"
9326 msgstr ""
9327 "#include E<lt>stdio.hE<gt>\n"
9328 "fprintf(stdout, format,\n"
9329 "\tweekday, month, day, hour, min);\n"
9330
9331 #. type: Plain text
9332 #: build/C/man3/printf.3:1018
9333 msgid ""
9334 "where I<format> depends on locale, and may permute the arguments.  With the "
9335 "value:"
9336 msgstr ""
9337 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
9338 "I<format> が"
9339
9340 #. type: Plain text
9341 #: build/C/man3/printf.3:1022
9342 #, no-wrap
9343 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9344 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
9345
9346 #. type: Plain text
9347 #: build/C/man3/printf.3:1026
9348 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
9349 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
9350
9351 #. type: Plain text
9352 #: build/C/man3/printf.3:1029
9353 msgid ""
9354 "To allocate a sufficiently large string and print into it (code correct for "
9355 "both glibc 2.0 and glibc 2.1):"
9356 msgstr ""
9357 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
9358 "と glibc 2.1 の両方で正しく動作するコード):"
9359
9360 #. type: Plain text
9361 #: build/C/man3/printf.3:1032
9362 msgid ""
9363 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
9364 "error instead of being handled gracefully."
9365 msgstr ""
9366 "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処"
9367 "理されず、エラーとして扱われる。"
9368
9369 #. type: Plain text
9370 #: build/C/man3/printf.3:1037
9371 #, no-wrap
9372 msgid ""
9373 "#include E<lt>stdio.hE<gt>\n"
9374 "#include E<lt>stdlib.hE<gt>\n"
9375 "#include E<lt>stdarg.hE<gt>\n"
9376 msgstr ""
9377 "#include E<lt>stdio.hE<gt>\n"
9378 "#include E<lt>stdlib.hE<gt>\n"
9379 "#include E<lt>stdarg.hE<gt>\n"
9380
9381 #. type: Plain text
9382 #: build/C/man3/printf.3:1045
9383 #, no-wrap
9384 msgid ""
9385 "char *\n"
9386 "make_message(const char *fmt, ...)\n"
9387 "{\n"
9388 "    int n;\n"
9389 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9390 "    char *p, *np;\n"
9391 "    va_list ap;\n"
9392 msgstr ""
9393 "char *\n"
9394 "make_message(const char *fmt, ...)\n"
9395 "{\n"
9396 "    int n;\n"
9397 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
9398 "    char *p, *np;\n"
9399 "    va_list ap;\n"
9400
9401 #. type: Plain text
9402 #: build/C/man3/printf.3:1048
9403 #, no-wrap
9404 msgid ""
9405 "    if ((p = malloc(size)) == NULL)\n"
9406 "        return NULL;\n"
9407 msgstr ""
9408 "    if ((p = malloc(size)) == NULL)\n"
9409 "        return NULL;\n"
9410
9411 #. type: Plain text
9412 #: build/C/man3/printf.3:1050
9413 #, no-wrap
9414 msgid "    while (1) {\n"
9415 msgstr "    while (1) {\n"
9416
9417 #. type: Plain text
9418 #: build/C/man3/printf.3:1052
9419 #, no-wrap
9420 msgid "        /* Try to print in the allocated space */\n"
9421 msgstr "        /* Try to print in the allocated space */\n"
9422
9423 #. type: Plain text
9424 #: build/C/man3/printf.3:1056
9425 #, no-wrap
9426 msgid ""
9427 "        va_start(ap, fmt);\n"
9428 "        n = vsnprintf(p, size, fmt, ap);\n"
9429 "        va_end(ap);\n"
9430 msgstr ""
9431 "        va_start(ap, fmt);\n"
9432 "        n = vsnprintf(p, size, fmt, ap);\n"
9433 "        va_end(ap);\n"
9434
9435 #. type: Plain text
9436 #: build/C/man3/printf.3:1058
9437 #, no-wrap
9438 msgid "        /* Check error code */\n"
9439 msgstr "        /* Check error code */\n"
9440
9441 #. type: Plain text
9442 #: build/C/man3/printf.3:1061
9443 #, no-wrap
9444 msgid ""
9445 "        if (n E<lt> 0)\n"
9446 "            return NULL;\n"
9447 msgstr ""
9448 "        if (n E<lt> 0)\n"
9449 "            return NULL;\n"
9450
9451 #. type: Plain text
9452 #: build/C/man3/printf.3:1063
9453 #, no-wrap
9454 msgid "        /* If that worked, return the string */\n"
9455 msgstr "        /* If that worked, return the string */\n"
9456
9457 #. type: Plain text
9458 #: build/C/man3/printf.3:1066
9459 #, no-wrap
9460 msgid ""
9461 "        if (n E<lt> size)\n"
9462 "            return p;\n"
9463 msgstr ""
9464 "        if (n E<lt> size)\n"
9465 "            return p;\n"
9466
9467 #. type: Plain text
9468 #: build/C/man3/printf.3:1068
9469 #, no-wrap
9470 msgid "        /* Else try again with more space */\n"
9471 msgstr "        /* Else try again with more space */\n"
9472
9473 #. type: Plain text
9474 #: build/C/man3/printf.3:1070
9475 #, no-wrap
9476 msgid "        size = n + 1;       /* Precisely what is needed */\n"
9477 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
9478
9479 #. type: Plain text
9480 #: build/C/man3/printf.3:1080
9481 #, no-wrap
9482 msgid ""
9483 "        if ((np = realloc (p, size)) == NULL) {\n"
9484 "            free(p);\n"
9485 "            return NULL;\n"
9486 "        } else {\n"
9487 "            p = np;\n"
9488 "        }\n"
9489 "    }\n"
9490 "}\n"
9491 msgstr ""
9492 "        if ((np = realloc (p, size)) == NULL) {\n"
9493 "            free(p);\n"
9494 "            return NULL;\n"
9495 "        } else {\n"
9496 "            p = np;\n"
9497 "        }\n"
9498 "    }\n"
9499 "}\n"
9500
9501 #. type: Plain text
9502 #: build/C/man3/printf.3:1090
9503 msgid ""
9504 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9505 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9506 msgstr ""
9507 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9508 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9509
9510 #. type: TH
9511 #: build/C/man3/puts.3:26
9512 #, no-wrap
9513 msgid "PUTS"
9514 msgstr "PUTS"
9515
9516 #. type: TH
9517 #: build/C/man3/puts.3:26
9518 #, no-wrap
9519 msgid "2011-09-28"
9520 msgstr "2011-09-28"
9521
9522 #. type: Plain text
9523 #: build/C/man3/puts.3:29
9524 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9525 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9526
9527 #. type: Plain text
9528 #: build/C/man3/puts.3:34
9529 #, no-wrap
9530 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9531 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9532
9533 #. type: Plain text
9534 #: build/C/man3/puts.3:36
9535 #, no-wrap
9536 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9537 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9538
9539 #. type: Plain text
9540 #: build/C/man3/puts.3:38
9541 #, no-wrap
9542 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9543 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9544
9545 #. type: Plain text
9546 #: build/C/man3/puts.3:40
9547 #, no-wrap
9548 msgid "B<int putchar(int >I<c>B<);>\n"
9549 msgstr "B<int putchar(int >I<c>B<);>\n"
9550
9551 #. type: Plain text
9552 #: build/C/man3/puts.3:42
9553 #, no-wrap
9554 msgid "B<int puts(const char *>I<s>B<);>\n"
9555 msgstr "B<int puts(const char *>I<s>B<);>\n"
9556
9557 #. type: Plain text
9558 #: build/C/man3/puts.3:51
9559 msgid ""
9560 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9561 "I<stream>."
9562 msgstr ""
9563 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9564 "に書き込む。"
9565
9566 #. type: Plain text
9567 #: build/C/man3/puts.3:58
9568 msgid ""
9569 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9570 "null byte (\\(aq\\e0\\(aq)."
9571 msgstr ""
9572 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9573 "ト (\\(aq\\e0\\(aq) は出力しない。"
9574
9575 #. type: Plain text
9576 #: build/C/man3/puts.3:65
9577 msgid ""
9578 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9579 "a macro which evaluates I<stream> more than once."
9580 msgstr ""
9581 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9582 "れないという点を除き、 B<fputc>()  と同じである。"
9583
9584 #. type: Plain text
9585 #: build/C/man3/puts.3:69
9586 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9587 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9588
9589 #. type: Plain text
9590 #: build/C/man3/puts.3:76
9591 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9592 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9593
9594 #. type: Plain text
9595 #: build/C/man3/puts.3:81
9596 msgid ""
9597 "Calls to the functions described here can be mixed with each other and with "
9598 "calls to other output functions from the I<stdio> library for the same "
9599 "output stream."
9600 msgstr ""
9601 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9602 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9603 "る。"
9604
9605 #. type: Plain text
9606 #: build/C/man3/puts.3:96
9607 msgid ""
9608 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9609 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9610 msgstr ""
9611 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9612 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9613
9614 #. type: Plain text
9615 #: build/C/man3/puts.3:103
9616 msgid ""
9617 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9618 "on error."
9619 msgstr ""
9620 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9621 "は B<EOF> を返す。"
9622
9623 #. type: Plain text
9624 #: build/C/man3/puts.3:112
9625 msgid ""
9626 "It is not advisable to mix calls to output functions from the I<stdio> "
9627 "library with low-level calls to B<write>(2)  for the file descriptor "
9628 "associated with the same output stream; the results will be undefined and "
9629 "very probably not what you want."
9630 msgstr ""
9631 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9632 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9633 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9634 "性が高い。"
9635
9636 #. type: Plain text
9637 #: build/C/man3/puts.3:124
9638 msgid ""
9639 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9640 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9641 "(3)"
9642 msgstr ""
9643 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9644 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9645 "(3)"
9646
9647 #. type: TH
9648 #: build/C/man2/read.2:35
9649 #, no-wrap
9650 msgid "READ"
9651 msgstr "READ"
9652
9653 #. type: TH
9654 #: build/C/man2/read.2:35
9655 #, no-wrap
9656 msgid "2013-02-12"
9657 msgstr "2013-02-12"
9658
9659 #. type: Plain text
9660 #: build/C/man2/read.2:38
9661 msgid "read - read from a file descriptor"
9662 msgstr "read - ファイルディスクリプタから読み込む"
9663
9664 #. type: Plain text
9665 #: build/C/man2/read.2:43
9666 #, no-wrap
9667 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9668 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9669
9670 #. type: Plain text
9671 #: build/C/man2/read.2:52
9672 msgid ""
9673 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9674 "into the buffer starting at I<buf>."
9675 msgstr ""
9676 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9677 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9678
9679 #. type: Plain text
9680 #: build/C/man2/read.2:60
9681 msgid ""
9682 "On files that support seeking, the read operation commences at the current "
9683 "file offset, and the file offset is incremented by the number of bytes "
9684 "read.  If the current file offset is at or past the end of file, no bytes "
9685 "are read, and B<read>()  returns zero."
9686 msgstr ""
9687 "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、"
9688 "ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフ"
9689 "セットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は "
9690 "0 を返す。"
9691
9692 #. type: Plain text
9693 #: build/C/man2/read.2:75
9694 msgid ""
9695 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
9696 "In the absence of any errors, or if B<read>()  does not check for errors, a "
9697 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
9698 msgstr ""
9699 "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある"
9700 ">。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない"
9701 "場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
9702
9703 #. type: Plain text
9704 #: build/C/man2/read.2:81
9705 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9706 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
9707
9708 #. type: Plain text
9709 #: build/C/man2/read.2:95
9710 msgid ""
9711 "On success, the number of bytes read is returned (zero indicates end of "
9712 "file), and the file position is advanced by this number.  It is not an error "
9713 "if this number is smaller than the number of bytes requested; this may "
9714 "happen for example because fewer bytes are actually available right now "
9715 "(maybe because we were close to end-of-file, or because we are reading from "
9716 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9717 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9718 "this case it is left unspecified whether the file position (if any) changes."
9719 msgstr ""
9720 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9721 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9722 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9723 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9724 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9725 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9726 "の場合はファイル位置が変更されるかどうかは 不定である。"
9727
9728 #. type: TP
9729 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
9730 #, no-wrap
9731 msgid "B<EAGAIN>"
9732 msgstr "B<EAGAIN>"
9733
9734 #. type: Plain text
9735 #: build/C/man2/read.2:103
9736 msgid ""
9737 "The file descriptor I<fd> refers to a file other than a socket and has been "
9738 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9739 msgstr ""
9740 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9741 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9742 "する状況にある。"
9743
9744 #. type: TP
9745 #: build/C/man2/read.2:103 build/C/man2/write.2:115
9746 #, no-wrap
9747 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9748 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9749
9750 #.  Actually EAGAIN on Linux
9751 #. type: Plain text
9752 #: build/C/man2/read.2:114
9753 msgid ""
9754 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9755 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9756 "to be returned for this case, and does not require these constants to have "
9757 "the same value, so a portable application should check for both "
9758 "possibilities."
9759 msgstr ""
9760 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9761 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9762 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9763 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9764 "プリケーションでは、両方の可能性を 確認すべきである。"
9765
9766 #. type: Plain text
9767 #: build/C/man2/read.2:118
9768 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9769 msgstr ""
9770 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9771 "(open) されていない。"
9772
9773 #. type: Plain text
9774 #: build/C/man2/read.2:122 build/C/man2/write.2:145
9775 msgid "I<buf> is outside your accessible address space."
9776 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9777
9778 #. type: Plain text
9779 #: build/C/man2/read.2:126
9780 msgid ""
9781 "The call was interrupted by a signal before any data was read; see B<signal>"
9782 "(7)."
9783 msgstr ""
9784 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9785
9786 #. type: Plain text
9787 #: build/C/man2/read.2:137
9788 msgid ""
9789 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9790 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9791 "I<buf>, the value specified in I<count>, or the current file offset is not "
9792 "suitably aligned."
9793 msgstr ""
9794 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9795 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9796 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9797 "ンメントが不適切である。"
9798
9799 #. type: Plain text
9800 #: build/C/man2/read.2:147
9801 msgid ""
9802 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9803 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9804 "information."
9805 msgstr ""
9806 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9807 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9808 "こと。"
9809
9810 #. type: Plain text
9811 #: build/C/man2/read.2:158
9812 msgid ""
9813 "I/O error.  This will happen for example when the process is in a background "
9814 "process group, tries to read from its controlling terminal, and either it is "
9815 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9816 "also occur when there is a low-level I/O error while reading from a disk or "
9817 "tape."
9818 msgstr ""
9819 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを"
9820 "制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9821 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9822 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9823 "た場合にも起こる。"
9824
9825 #. type: Plain text
9826 #: build/C/man2/read.2:162
9827 msgid "I<fd> refers to a directory."
9828 msgstr "I<fd> がディレクトリを参照している。"
9829
9830 #. type: Plain text
9831 #: build/C/man2/read.2:173
9832 msgid ""
9833 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9834 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9835 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9836 "read."
9837 msgstr ""
9838 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9839 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9840 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9841 "数を返してもよい。"
9842
9843 #. type: Plain text
9844 #: build/C/man2/read.2:187
9845 msgid ""
9846 "On NFS filesystems, reading small amounts of data will update the timestamp "
9847 "only the first time, subsequent calls may not do so.  This is caused by "
9848 "client side attribute caching, because most if not all NFS clients leave "
9849 "st_atime (last file access time)  updates to the server and client side "
9850 "reads satisfied from the client's cache will not cause st_atime updates on "
9851 "the server as there are no server side reads.  UNIX semantics can be "
9852 "obtained by disabling client side attribute caching, but in most situations "
9853 "this will substantially increase server load and decrease performance."
9854 msgstr ""
9855 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9856 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9857 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9858 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9859 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9860 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9861 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9862 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9863
9864 #. type: Plain text
9865 #: build/C/man2/read.2:200
9866 msgid ""
9867 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9868 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9869 "B<fread>(3)"
9870 msgstr ""
9871 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9872 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9873 "B<fread>(3)"
9874
9875 #. type: TH
9876 #: build/C/man2/readlink.2:43
9877 #, no-wrap
9878 msgid "READLINK"
9879 msgstr "READLINK"
9880
9881 #. type: TH
9882 #: build/C/man2/readlink.2:43
9883 #, no-wrap
9884 msgid "2013-07-18"
9885 msgstr "2013-07-18"
9886
9887 #. type: Plain text
9888 #: build/C/man2/readlink.2:46
9889 msgid "readlink - read value of a symbolic link"
9890 msgstr "readlink - シンボリックリンクの値を読む"
9891
9892 #. type: Plain text
9893 #: build/C/man2/readlink.2:50
9894 msgid ""
9895 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9896 ">I<bufsiz>B<);>"
9897 msgstr ""
9898 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9899 ">I<bufsiz>B<);>"
9900
9901 #. type: Plain text
9902 #: build/C/man2/readlink.2:58
9903 msgid "B<readlink>():"
9904 msgstr "B<readlink>():"
9905
9906 #. type: Plain text
9907 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
9908 msgid ""
9909 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9910 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9911 msgstr ""
9912 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9913 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9914
9915 #. type: Plain text
9916 #: build/C/man2/readlink.2:77
9917 msgid ""
9918 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9919 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9920 "null byte to I<buf>.  It will truncate the contents (to a length of "
9921 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9922 "contents."
9923 msgstr ""
9924 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9925 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9926 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9927 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9928
9929 #. type: Plain text
9930 #: build/C/man2/readlink.2:85
9931 msgid ""
9932 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9933 "error, -1 is returned and I<errno> is set to indicate the error."
9934 msgstr ""
9935 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9936 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9937
9938 #. type: Plain text
9939 #: build/C/man2/readlink.2:91
9940 msgid ""
9941 "Search permission is denied for a component of the path prefix.  (See also "
9942 "B<path_resolution>(7).)"
9943 msgstr ""
9944 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9945 "参照すること)。"
9946
9947 #. type: Plain text
9948 #: build/C/man2/readlink.2:95
9949 msgid "I<buf> extends outside the process's allocated address space."
9950 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9951
9952 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9953 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9954 #.  and this error can also occur if bufsiz < 0.
9955 #.  See: http://thread.gmane.org/gmane.linux.man/380
9956 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9957 #. type: Plain text
9958 #: build/C/man2/readlink.2:104
9959 msgid "I<bufsiz> is not positive."
9960 msgstr "I<bufsiz> が正でない。"
9961
9962 #. type: Plain text
9963 #: build/C/man2/readlink.2:107
9964 msgid "The named file is not a symbolic link."
9965 msgstr "指定したファイルがシンボリックリンクでない。"
9966
9967 #. type: Plain text
9968 #: build/C/man2/readlink.2:110
9969 msgid "An I/O error occurred while reading from the filesystem."
9970 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9971
9972 #. type: Plain text
9973 #: build/C/man2/readlink.2:113
9974 msgid "Too many symbolic links were encountered in translating the pathname."
9975 msgstr "パス名にシンボリックリンクが多すぎる。"
9976
9977 #. type: Plain text
9978 #: build/C/man2/readlink.2:116
9979 msgid "A pathname, or a component of a pathname, was too long."
9980 msgstr "パス名かパス名の一部分が長過ぎる。"
9981
9982 #. type: Plain text
9983 #: build/C/man2/readlink.2:119
9984 msgid "The named file does not exist."
9985 msgstr "その名前のファイルが存在しない。"
9986
9987 #. type: Plain text
9988 #: build/C/man2/readlink.2:125
9989 msgid "A component of the path prefix is not a directory."
9990 msgstr "パスのディレクトリ部分がディレクトリでない。"
9991
9992 #. type: Plain text
9993 #: build/C/man2/readlink.2:130
9994 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9995 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9996
9997 #. type: Plain text
9998 #: build/C/man2/readlink.2:138
9999 msgid ""
10000 "In versions of glibc up to and including glibc 2.4, the return type of "
10001 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
10002 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
10003 msgstr ""
10004 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
10005 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
10006 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
10007
10008 #. type: Plain text
10009 #: build/C/man2/readlink.2:157
10010 msgid ""
10011 "Using a statically sized buffer might not provide enough room for the "
10012 "symbolic link contents.  The required size for the buffer can be obtained "
10013 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
10014 "link.  However, the number of bytes written by B<readlink>()  should be "
10015 "checked to make sure that the size of the symbolic link did not increase "
10016 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
10017 "also addresses a common portability problem when using I<PATH_MAX> for the "
10018 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
10019 "the system does not have such limit."
10020 msgstr ""
10021 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
10022 "格納するのに十分な領域がない場合がある。\n"
10023 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
10024 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
10025 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
10026 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
10027 "の間で増えていないことを確認すべきである。\n"
10028 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
10029 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
10030 "問題を解決することができる。なぜなら、POSIX では、\n"
10031 "システムがそのような上限値を定義していない場合には、\n"
10032 "I<PATH_MAX> が定義されることが保証されていないからである。"
10033
10034 #. type: Plain text
10035 #: build/C/man2/readlink.2:163
10036 msgid ""
10037 "The following program allocates the buffer needed by B<readlink>()  "
10038 "dynamically from the information provided by B<lstat>(), making sure there's "
10039 "no race condition between the calls."
10040 msgstr ""
10041 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
10042 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
10043 "また、両方の呼び出し間で競合条件がないことを保証している。"
10044
10045 #. type: Plain text
10046 #: build/C/man2/readlink.2:170
10047 #, no-wrap
10048 msgid ""
10049 "#include E<lt>sys/types.hE<gt>\n"
10050 "#include E<lt>sys/stat.hE<gt>\n"
10051 "#include E<lt>stdio.hE<gt>\n"
10052 "#include E<lt>stdlib.hE<gt>\n"
10053 "#include E<lt>unistd.hE<gt>\n"
10054 msgstr ""
10055 "#include E<lt>sys/types.hE<gt>\n"
10056 "#include E<lt>sys/stat.hE<gt>\n"
10057 "#include E<lt>stdio.hE<gt>\n"
10058 "#include E<lt>stdlib.hE<gt>\n"
10059 "#include E<lt>unistd.hE<gt>\n"
10060
10061 #. type: Plain text
10062 #: build/C/man2/readlink.2:177
10063 #, no-wrap
10064 msgid ""
10065 "int\n"
10066 "main(int argc, char *argv[])\n"
10067 "{\n"
10068 "    struct stat sb;\n"
10069 "    char *linkname;\n"
10070 "    ssize_t r;\n"
10071 msgstr ""
10072 "int\n"
10073 "main(int argc, char *argv[])\n"
10074 "{\n"
10075 "    struct stat sb;\n"
10076 "    char *linkname;\n"
10077 "    ssize_t r;\n"
10078
10079 #. type: Plain text
10080 #: build/C/man2/readlink.2:182
10081 #, no-wrap
10082 msgid ""
10083 "    if (argc != 2) {\n"
10084 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10085 "        exit(EXIT_FAILURE);\n"
10086 "    }\n"
10087 msgstr ""
10088 "    if (argc != 2) {\n"
10089 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
10090 "        exit(EXIT_FAILURE);\n"
10091 "    }\n"
10092
10093 #. type: Plain text
10094 #: build/C/man2/readlink.2:187
10095 #, no-wrap
10096 msgid ""
10097 "    if (lstat(argv[1], &sb) == -1) {\n"
10098 "        perror(\"lstat\");\n"
10099 "        exit(EXIT_FAILURE);\n"
10100 "    }\n"
10101 msgstr ""
10102 "    if (lstat(argv[1], &sb) == -1) {\n"
10103 "        perror(\"lstat\");\n"
10104 "        exit(EXIT_FAILURE);\n"
10105 "    }\n"
10106
10107 #. type: Plain text
10108 #: build/C/man2/readlink.2:193
10109 #, no-wrap
10110 msgid ""
10111 "    linkname = malloc(sb.st_size + 1);\n"
10112 "    if (linkname == NULL) {\n"
10113 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10114 "        exit(EXIT_FAILURE);\n"
10115 "    }\n"
10116 msgstr ""
10117 "    linkname = malloc(sb.st_size + 1);\n"
10118 "    if (linkname == NULL) {\n"
10119 "        fprintf(stderr, \"insufficient memory\\en\");\n"
10120 "        exit(EXIT_FAILURE);\n"
10121 "    }\n"
10122
10123 #. type: Plain text
10124 #: build/C/man2/readlink.2:195
10125 #, no-wrap
10126 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10127 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
10128
10129 #. type: Plain text
10130 #: build/C/man2/readlink.2:200
10131 #, no-wrap
10132 msgid ""
10133 "    if (r == -1) {\n"
10134 "        perror(\"lstat\");\n"
10135 "        exit(EXIT_FAILURE);\n"
10136 "    }\n"
10137 msgstr ""
10138 "    if (r == -1) {\n"
10139 "        perror(\"lstat\");\n"
10140 "        exit(EXIT_FAILURE);\n"
10141 "    }\n"
10142
10143 #. type: Plain text
10144 #: build/C/man2/readlink.2:206
10145 #, no-wrap
10146 msgid ""
10147 "    if (r E<gt> sb.st_size) {\n"
10148 "        fprintf(stderr, \"symlink increased in size \"\n"
10149 "                        \"between lstat() and readlink()\\en\");\n"
10150 "        exit(EXIT_FAILURE);\n"
10151 "    }\n"
10152 msgstr ""
10153 "    if (r E<gt> sb.st_size) {\n"
10154 "        fprintf(stderr, \"symlink increased in size \"\n"
10155 "                        \"between lstat() and readlink()\\en\");\n"
10156 "        exit(EXIT_FAILURE);\n"
10157 "    }\n"
10158
10159 #. type: Plain text
10160 #: build/C/man2/readlink.2:208
10161 #, no-wrap
10162 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
10163 msgstr "    linkname[r] = \\(aq\\e0\\(aq;\n"
10164
10165 #. type: Plain text
10166 #: build/C/man2/readlink.2:210
10167 #, no-wrap
10168 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10169 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
10170
10171 #. type: Plain text
10172 #: build/C/man2/readlink.2:222
10173 msgid ""
10174 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
10175 "B<path_resolution>(7), B<symlink>(7)"
10176 msgstr ""
10177 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
10178 "B<path_resolution>(7), B<symlink>(7)"
10179
10180 #. type: TH
10181 #: build/C/man2/readv.2:32
10182 #, no-wrap
10183 msgid "READV"
10184 msgstr "READV"
10185
10186 #. type: TH
10187 #: build/C/man2/readv.2:32
10188 #, no-wrap
10189 msgid "2010-11-17"
10190 msgstr "2010-11-17"
10191
10192 #. type: Plain text
10193 #: build/C/man2/readv.2:35
10194 msgid ""
10195 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
10196 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
10197
10198 #. type: Plain text
10199 #: build/C/man2/readv.2:38
10200 #, no-wrap
10201 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
10202 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
10203
10204 #. type: Plain text
10205 #: build/C/man2/readv.2:40
10206 #, no-wrap
10207 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10208 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10209
10210 #. type: Plain text
10211 #: build/C/man2/readv.2:42
10212 #, no-wrap
10213 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10214 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
10215
10216 #. type: Plain text
10217 #: build/C/man2/readv.2:45
10218 #, no-wrap
10219 msgid ""
10220 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10221 "B<               off_t >I<offset>B<);>\n"
10222 msgstr ""
10223 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10224 "B<               off_t >I<offset>B<);>\n"
10225
10226 #. type: Plain text
10227 #: build/C/man2/readv.2:48
10228 #, no-wrap
10229 msgid ""
10230 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10231 "B<                off_t >I<offset>B<);>\n"
10232 msgstr ""
10233 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
10234 "B<                off_t >I<offset>B<);>\n"
10235
10236 #. type: Plain text
10237 #: build/C/man2/readv.2:58
10238 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10239 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
10240
10241 #. type: Plain text
10242 #: build/C/man2/readv.2:68
10243 msgid ""
10244 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
10245 "with the file descriptor I<fd> into the buffers described by I<iov> "
10246 "(\"scatter input\")."
10247 msgstr ""
10248 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
10249 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
10250 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
10251
10252 #. type: Plain text
10253 #: build/C/man2/readv.2:78
10254 msgid ""
10255 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
10256 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
10257 "\")."
10258 msgstr ""
10259 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
10260 "I<iovcnt>\n"
10261 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
10262 "ら\n"
10263 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
10264
10265 #. type: Plain text
10266 #: build/C/man2/readv.2:87
10267 msgid ""
10268 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
10269 "I<E<lt>sys/uio.hE<gt>> as:"
10270 msgstr ""
10271 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
10272 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10273
10274 #. type: Plain text
10275 #: build/C/man2/readv.2:95
10276 #, no-wrap
10277 msgid ""
10278 "struct iovec {\n"
10279 "    void  *iov_base;    /* Starting address */\n"
10280 "    size_t iov_len;     /* Number of bytes to transfer */\n"
10281 "};\n"
10282 msgstr ""
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
10288 #. type: Plain text
10289 #: build/C/man2/readv.2:103
10290 msgid ""
10291 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
10292 "buffers are filled."
10293 msgstr ""
10294 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
10295 "B<read>(2) と全く同様の動作を行う。"
10296
10297 #. type: Plain text
10298 #: build/C/man2/readv.2:109
10299 msgid ""
10300 "The B<writev>()  system call works just like B<write>(2)  except that "
10301 "multiple buffers are written out."
10302 msgstr ""
10303 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
10304 "B<write>(2) と全く同様の動作を行う。"
10305
10306 #. type: Plain text
10307 #: build/C/man2/readv.2:128
10308 msgid ""
10309 "Buffers are processed in array order.  This means that B<readv>()  "
10310 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
10311 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
10312 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
10313 "[0] before proceeding to I<iov>[1], and so on."
10314 msgstr ""
10315 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
10316 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
10317 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
10318 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
10319
10320 #. type: Plain text
10321 #: build/C/man2/readv.2:146
10322 msgid ""
10323 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
10324 "data written by B<writev>()  is written as a single block that is not "
10325 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
10326 "for an exception); analogously, B<readv>()  is guaranteed to read a "
10327 "contiguous block of data from the file, regardless of read operations "
10328 "performed in other threads or processes that have file descriptors referring "
10329 "to the same open file description (see B<open>(2))."
10330 msgstr ""
10331 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
10332 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
10333 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
10334 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
10335 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
10336 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
10337 "作の影響を受けることはない。"
10338
10339 #. type: SS
10340 #: build/C/man2/readv.2:146
10341 #, no-wrap
10342 msgid "preadv() and pwritev()"
10343 msgstr "preadv() と pwritev()"
10344
10345 #. type: Plain text
10346 #: build/C/man2/readv.2:159
10347 msgid ""
10348 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
10349 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
10350 "argument, I<offset>, which specifies the file offset at which the input "
10351 "operation is to be performed."
10352 msgstr ""
10353 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
10354 "組み合わせたものである。\n"
10355 "B<readv>() と同じ処理を実行するが、\n"
10356 "4 番目の引き数 I<offset> が追加されており、\n"
10357 "この引き数は入力操作を行うファイルオフセットを指定する。"
10358
10359 #. type: Plain text
10360 #: build/C/man2/readv.2:172
10361 msgid ""
10362 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
10363 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
10364 "argument, I<offset>, which specifies the file offset at which the output "
10365 "operation is to be performed."
10366 msgstr ""
10367 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
10368 "組み合わせたものである。\n"
10369 "B<writev>() と同じ処理を実行するが、\n"
10370 "4 番目の引き数 I<offset> が追加されており、\n"
10371 "この引き数は出力操作を行うファイルオフセットを指定する。"
10372
10373 #. type: Plain text
10374 #: build/C/man2/readv.2:177
10375 msgid ""
10376 "The file offset is not changed by these system calls.  The file referred to "
10377 "by I<fd> must be capable of seeking."
10378 msgstr ""
10379 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
10380 "I<fd> が参照するファイルは seek 可能でなければならない。"
10381
10382 #. type: Plain text
10383 #: build/C/man2/readv.2:188
10384 msgid ""
10385 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
10386 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
10387 "error, -1 is returned, and I<errno> is set appropriately."
10388 msgstr ""
10389 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
10390 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
10391 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
10392
10393 #. type: Plain text
10394 #: build/C/man2/readv.2:200
10395 msgid ""
10396 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
10397 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
10398 "(2).  Additionally, the following error is defined:"
10399 msgstr ""
10400 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
10401 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
10402 "る。\n"
10403 "また、追加で以下のエラーが定義されている:"
10404
10405 #. type: Plain text
10406 #: build/C/man2/readv.2:209
10407 msgid ""
10408 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
10409 "vector count I<iovcnt> is less than zero or greater than the permitted "
10410 "maximum."
10411 msgstr ""
10412 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
10413 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
10414
10415 #. type: Plain text
10416 #: build/C/man2/readv.2:214
10417 msgid ""
10418 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10419 "support was added in glibc 2.10."
10420 msgstr ""
10421 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10422 "ライブラリによるサポートは glibc 2.10 で追加された。"
10423
10424 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10425 #.  (Says release.libc.)
10426 #. type: Plain text
10427 #: build/C/man2/readv.2:222
10428 msgid ""
10429 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10430 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10431 "I<iovcnt> argument, and I<int> as the return type."
10432 msgstr ""
10433 "B<readv>(), B<writev>(): \n"
10434 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10435 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10436 "返り値の型として I<int> を使用していた。"
10437
10438 #. type: Plain text
10439 #: build/C/man2/readv.2:226
10440 msgid ""
10441 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10442 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10443
10444 #. type: SS
10445 #: build/C/man2/readv.2:227
10446 #, no-wrap
10447 msgid "Linux notes"
10448 msgstr "Linux での注意"
10449
10450 #. type: Plain text
10451 #: build/C/man2/readv.2:258
10452 msgid ""
10453 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10454 "items that can be passed in I<iov>.  An implementation can advertise its "
10455 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10456 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10457 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10458 "glibc wrapper functions do some extra work if they detect that the "
10459 "underlying kernel system call failed because this limit was exceeded.  In "
10460 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10461 "large enough for all of the items specified by I<iov>, passes that buffer in "
10462 "a call to B<read>(2), copies data from the buffer to the locations specified "
10463 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10464 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10465 "using a temporary buffer and a call to B<write>(2)."
10466 msgstr ""
10467 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10468 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10469 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10470 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10471 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10472 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10473 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10474 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10475 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10476 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10477 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10478 "(2)  を呼び出す。"
10479
10480 #. type: Plain text
10481 #: build/C/man2/readv.2:265
10482 msgid ""
10483 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10484 "operate on file descriptors, with the functions from the stdio library; the "
10485 "results will be undefined and probably not what you want."
10486 msgstr ""
10487 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10488 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10489 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10490 "得られないだろう。"
10491
10492 #. type: Plain text
10493 #: build/C/man2/readv.2:268
10494 msgid "The following code sample demonstrates the use of B<writev>():"
10495 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10496
10497 #. type: Plain text
10498 #: build/C/man2/readv.2:275
10499 #, no-wrap
10500 msgid ""
10501 "char *str0 = \"hello \";\n"
10502 "char *str1 = \"world\\en\";\n"
10503 "struct iovec iov[2];\n"
10504 "ssize_t nwritten;\n"
10505 msgstr ""
10506 "char *str0 = \"hello \";\n"
10507 "char *str1 = \"world\\en\";\n"
10508 "struct iovec iov[2];\n"
10509 "ssize_t nwritten;\n"
10510
10511 #. type: Plain text
10512 #: build/C/man2/readv.2:280
10513 #, no-wrap
10514 msgid ""
10515 "iov[0].iov_base = str0;\n"
10516 "iov[0].iov_len = strlen(str0);\n"
10517 "iov[1].iov_base = str1;\n"
10518 "iov[1].iov_len = strlen(str1);\n"
10519 msgstr ""
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
10525 #. type: Plain text
10526 #: build/C/man2/readv.2:282
10527 #, no-wrap
10528 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10529 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10530
10531 #. type: Plain text
10532 #: build/C/man2/readv.2:288
10533 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10534 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10535
10536 #. type: TH
10537 #: build/C/man3/remove.3:31
10538 #, no-wrap
10539 msgid "REMOVE"
10540 msgstr "REMOVE"
10541
10542 #. type: TH
10543 #: build/C/man3/remove.3:31
10544 #, no-wrap
10545 msgid "2008-12-03"
10546 msgstr "2008-12-03"
10547
10548 #. type: Plain text
10549 #: build/C/man3/remove.3:34
10550 msgid "remove - remove a file or directory"
10551 msgstr "remove - ファイルやディレクトリを削除する"
10552
10553 #. type: Plain text
10554 #: build/C/man3/remove.3:38
10555 msgid "B<int remove(const char *>I<pathname>B<);>"
10556 msgstr "B<int remove(const char *>I<pathname>B<);>"
10557
10558 #. type: Plain text
10559 #: build/C/man3/remove.3:46
10560 msgid ""
10561 "B<remove>()  deletes a name from the filesystem.  It calls B<unlink>(2)  for "
10562 "files, and B<rmdir>(2)  for directories."
10563 msgstr ""
10564 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10565 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10566
10567 #. type: Plain text
10568 #: build/C/man3/remove.3:50
10569 msgid ""
10570 "If the removed name was the last link to a file and no processes have the "
10571 "file open, the file is deleted and the space it was using is made available "
10572 "for reuse."
10573 msgstr ""
10574 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10575 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10576 "ことができるようになる。"
10577
10578 #. type: Plain text
10579 #: build/C/man3/remove.3:55
10580 msgid ""
10581 "If the name was the last link to a file, but any processes still have the "
10582 "file open, the file will remain in existence until the last file descriptor "
10583 "referring to it is closed."
10584 msgstr ""
10585 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10586 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10587 "でファイルは存在し続ける。"
10588
10589 #. type: Plain text
10590 #: build/C/man3/remove.3:57
10591 msgid "If the name referred to a symbolic link, the link is removed."
10592 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10593
10594 #. type: Plain text
10595 #: build/C/man3/remove.3:60
10596 msgid ""
10597 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10598 "processes which have the object open may continue to use it."
10599 msgstr ""
10600 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10601 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10602
10603 #. type: Plain text
10604 #: build/C/man3/remove.3:70
10605 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10606 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10607
10608 #. type: Plain text
10609 #: build/C/man3/remove.3:72
10610 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10611 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10612
10613 #. type: Plain text
10614 #: build/C/man3/remove.3:78
10615 msgid ""
10616 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10617 "hence would not remove directories)."
10618 msgstr ""
10619 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10620 "(従ってディレクトリを削除できなかった)。"
10621
10622 #. type: Plain text
10623 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10624 msgid ""
10625 "Infelicities in the protocol underlying NFS can cause the unexpected "
10626 "disappearance of files which are still being used."
10627 msgstr ""
10628 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10629 "うことがありえる。"
10630
10631 #. type: Plain text
10632 #: build/C/man3/remove.3:92
10633 msgid ""
10634 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10635 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10636 msgstr ""
10637 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10638 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10639
10640 #. type: TH
10641 #: build/C/man2/rename.2:32
10642 #, no-wrap
10643 msgid "RENAME"
10644 msgstr "RENAME"
10645
10646 #. type: Plain text
10647 #: build/C/man2/rename.2:35
10648 msgid "rename - change the name or location of a file"
10649 msgstr "rename - ファイルの名前や位置を変更する"
10650
10651 #. type: Plain text
10652 #: build/C/man2/rename.2:39
10653 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10654 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10655
10656 #. type: Plain text
10657 #: build/C/man2/rename.2:48
10658 msgid ""
10659 "B<rename>()  renames a file, moving it between directories if required.  Any "
10660 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10661 "Open file descriptors for I<oldpath> are also unaffected."
10662 msgstr ""
10663 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10664 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10665 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10666 "リプタにも影響はない。"
10667
10668 #. type: Plain text
10669 #: build/C/man2/rename.2:56
10670 msgid ""
10671 "If I<newpath> already exists it will be atomically replaced (subject to a "
10672 "few conditions; see ERRORS below), so that there is no point at which "
10673 "another process attempting to access I<newpath> will find it missing."
10674 msgstr ""
10675 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10676 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10677 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10678 "とはない (訳註: 常にアクセス可能である)。"
10679
10680 #. type: Plain text
10681 #: build/C/man2/rename.2:64
10682 msgid ""
10683 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10684 "file, then B<rename>()  does nothing, and returns a success status."
10685 msgstr ""
10686 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10687 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10688
10689 #. type: Plain text
10690 #: build/C/man2/rename.2:72
10691 msgid ""
10692 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10693 "guarantees to leave an instance of I<newpath> in place."
10694 msgstr ""
10695 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10696 "I<newpath> の実体を元のまま残すことを保証する。"
10697
10698 #. type: Plain text
10699 #: build/C/man2/rename.2:78
10700 msgid ""
10701 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10702 "not exist, or it must specify an empty directory."
10703 msgstr ""
10704 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10705 "存在しないか、空のディレクトリでなければならない。"
10706
10707 #. type: Plain text
10708 #: build/C/man2/rename.2:85
10709 msgid ""
10710 "However, when overwriting there will probably be a window in which both "
10711 "I<oldpath> and I<newpath> refer to the file being renamed."
10712 msgstr ""
10713 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10714 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10715
10716 #. type: Plain text
10717 #: build/C/man2/rename.2:91
10718 msgid ""
10719 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10720 "refers to a symbolic link the link will be overwritten."
10721 msgstr ""
10722 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10723 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10724 "は、リンクが上書きされる。"
10725
10726 #. type: Plain text
10727 #: build/C/man2/rename.2:116
10728 msgid ""
10729 "Write permission is denied for the directory containing I<oldpath> or "
10730 "I<newpath>, or, search permission is denied for one of the directories in "
10731 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10732 "and does not allow write permission (needed to update the I<..> entry).  "
10733 "(See also B<path_resolution>(7).)"
10734 msgstr ""
10735 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10736 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10737 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10738 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10739
10740 #. type: TP
10741 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10742 #, no-wrap
10743 msgid "B<EBUSY>"
10744 msgstr "B<EBUSY>"
10745
10746 #. type: Plain text
10747 #: build/C/man2/rename.2:133
10748 msgid ""
10749 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10750 "use by some process (perhaps as current working directory, or as root "
10751 "directory, or because it was open for reading) or is in use by the system "
10752 "(for example as mount point), while the system considers this an error.  "
10753 "(Note that there is no requirement to return B<EBUSY> in such cases"
10754 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10755 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10756 "situations.)"
10757 msgstr ""
10758 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10759 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10760 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10761 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10762 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10763 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10764 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10765 "B<EBUSY> を返すことが許されている。)"
10766
10767 #. type: Plain text
10768 #: build/C/man2/rename.2:143
10769 msgid ""
10770 "The new pathname contained a path prefix of the old, or, more generally, an "
10771 "attempt was made to make a directory a subdirectory of itself."
10772 msgstr ""
10773 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10774 "ディレクトリに 変更しようとした場合がほとんどである。"
10775
10776 #. type: Plain text
10777 #: build/C/man2/rename.2:149
10778 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10779 msgstr ""
10780 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10781 "い。"
10782
10783 #. type: Plain text
10784 #: build/C/man2/rename.2:160
10785 msgid ""
10786 "I<oldpath> already has the maximum number of links to it, or it was a "
10787 "directory and the directory containing I<newpath> has the maximum number of "
10788 "links."
10789 msgstr ""
10790 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10791 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10792
10793 #. type: Plain text
10794 #: build/C/man2/rename.2:176
10795 msgid ""
10796 "The link named by I<oldpath> does not exist; or, a directory component in "
10797 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10798 msgstr ""
10799 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10800 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10801
10802 #. type: Plain text
10803 #: build/C/man2/rename.2:193
10804 msgid ""
10805 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10806 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10807 "not a directory."
10808 msgstr ""
10809 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10810 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10811 "トリでない。"
10812
10813 #. type: TP
10814 #: build/C/man2/rename.2:193
10815 #, no-wrap
10816 msgid "B<ENOTEMPTY> or B<EEXIST>"
10817 msgstr "B<ENOTEMPTY  または  EEXIST>"
10818
10819 #. type: Plain text
10820 #: build/C/man2/rename.2:197
10821 msgid ""
10822 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10823 "\" and \"..\"."
10824 msgstr ""
10825 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10826 "でいる。"
10827
10828 #. type: TP
10829 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
10830 #, no-wrap
10831 msgid "B<EPERM> or B<EACCES>"
10832 msgstr "B<EPERM> または B<EACCES>"
10833
10834 #. type: Plain text
10835 #: build/C/man2/rename.2:221
10836 msgid ""
10837 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10838 "the process's effective user ID is neither the user ID of the file to be "
10839 "deleted nor that of the directory containing it, and the process is not "
10840 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10841 "I<newpath> is an existing file and the directory containing it has the "
10842 "sticky bit set and the process's effective user ID is neither the user ID of "
10843 "the file to be replaced nor that of the directory containing it, and the "
10844 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10845 "capability); or the filesystem containing I<pathname> does not support "
10846 "renaming of the type requested."
10847 msgstr ""
10848 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10849 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10850 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10851 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10852 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10853 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10854 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10855 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10856 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10857 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10858
10859 #. type: Plain text
10860 #: build/C/man2/rename.2:232
10861 msgid ""
10862 "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux "
10863 "permits a filesystem to be mounted at multiple points, but B<rename>()  does "
10864 "not work across different mount points, even if the same filesystem is "
10865 "mounted on both.)"
10866 msgstr ""
10867 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10868 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10869 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10870 "別々のマウント位置を跨いでは動作しない。)"
10871
10872 #. type: Plain text
10873 #: build/C/man2/rename.2:234
10874 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10875 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10876
10877 #. type: Plain text
10878 #: build/C/man2/rename.2:245
10879 msgid ""
10880 "On NFS filesystems, you can not assume that if the operation failed the file "
10881 "was not renamed.  If the server does the rename operation and then crashes, "
10882 "the retransmitted RPC which will be processed when the server is up again "
10883 "causes a failure.  The application is expected to deal with this.  See "
10884 "B<link>(2)  for a similar problem."
10885 msgstr ""
10886 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10887 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10888 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10889 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10890 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10891
10892 #. type: Plain text
10893 #: build/C/man2/rename.2:254
10894 msgid ""
10895 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10896 "(2), B<path_resolution>(7), B<symlink>(7)"
10897 msgstr ""
10898 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10899 "(2), B<path_resolution>(7), B<symlink>(7)"
10900
10901 #. type: TH
10902 #: build/C/man2/rmdir.2:30
10903 #, no-wrap
10904 msgid "RMDIR"
10905 msgstr "RMDIR"
10906
10907 #. type: TH
10908 #: build/C/man2/rmdir.2:30
10909 #, no-wrap
10910 msgid "2008-05-08"
10911 msgstr "2008-05-08"
10912
10913 #. type: Plain text
10914 #: build/C/man2/rmdir.2:33
10915 msgid "rmdir - delete a directory"
10916 msgstr "rmdir - ディレクトリを削除する"
10917
10918 #. type: Plain text
10919 #: build/C/man2/rmdir.2:37
10920 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10921 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10922
10923 #. type: Plain text
10924 #: build/C/man2/rmdir.2:40
10925 msgid "B<rmdir>()  deletes a directory, which must be empty."
10926 msgstr ""
10927 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10928 "ない。"
10929
10930 #. type: Plain text
10931 #: build/C/man2/rmdir.2:55
10932 msgid ""
10933 "Write access to the directory containing I<pathname> was not allowed, or one "
10934 "of the directories in the path prefix of I<pathname> did not allow search "
10935 "permission.  (See also B<path_resolution>(7)."
10936 msgstr ""
10937 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10938 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10939 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10940 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10941 "と)"
10942
10943 #. type: Plain text
10944 #: build/C/man2/rmdir.2:64
10945 msgid ""
10946 "I<pathname> is currently in use by the system or some process that prevents "
10947 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10948 "point or is the root directory of the calling process."
10949 msgstr ""
10950 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10951 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10952 "たプロセスのルートディレクトリであることを意味する。"
10953
10954 #. type: Plain text
10955 #: build/C/man2/rmdir.2:73
10956 msgid "I<pathname> has I<.> as last component."
10957 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10958
10959 #. type: Plain text
10960 #: build/C/man2/rmdir.2:77
10961 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10962 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10963
10964 #. type: Plain text
10965 #: build/C/man2/rmdir.2:85
10966 msgid ""
10967 "A directory component in I<pathname> does not exist or is a dangling "
10968 "symbolic link."
10969 msgstr ""
10970 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10971 "リックリンク (symbolic link) である。"
10972
10973 #. type: Plain text
10974 #: build/C/man2/rmdir.2:94
10975 msgid ""
10976 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10977 "fact, a directory."
10978 msgstr ""
10979 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10980 "クトリでない。"
10981
10982 #. type: TP
10983 #: build/C/man2/rmdir.2:94
10984 #, no-wrap
10985 msgid "B<ENOTEMPTY>"
10986 msgstr "B<ENOTEMPTY>"
10987
10988 #. type: Plain text
10989 #: build/C/man2/rmdir.2:107
10990 msgid ""
10991 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10992 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10993 "condition."
10994 msgstr ""
10995 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
10996 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
10997 "で B<EEXIST> を返すことを認めている。"
10998
10999 #. type: Plain text
11000 #: build/C/man2/rmdir.2:118
11001 msgid ""
11002 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
11003 "and the process's effective user ID is neither the user ID of the file to be "
11004 "deleted nor that of the directory containing it, and the process is not "
11005 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
11006 msgstr ""
11007 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
11008 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
11009 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
11010 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
11011
11012 #. type: Plain text
11013 #: build/C/man2/rmdir.2:123
11014 msgid ""
11015 "The filesystem containing I<pathname> does not support the removal of "
11016 "directories."
11017 msgstr ""
11018 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
11019 "ない。"
11020
11021 #. type: Plain text
11022 #: build/C/man2/rmdir.2:127
11023 msgid "I<pathname> refers to a directory on a read-only filesystem."
11024 msgstr ""
11025 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
11026
11027 #. type: Plain text
11028 #: build/C/man2/rmdir.2:132
11029 msgid ""
11030 "Infelicities in the protocol underlying NFS can cause the unexpected "
11031 "disappearance of directories which are still being used."
11032 msgstr ""
11033 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
11034 "する現象が引き起こされることがある。"
11035
11036 #. type: Plain text
11037 #: build/C/man2/rmdir.2:141
11038 msgid ""
11039 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
11040 "B<unlink>(2), B<unlinkat>(2)"
11041 msgstr ""
11042 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
11043 "B<unlink>(2), B<unlinkat>(2)"
11044
11045 #. type: TH
11046 #: build/C/man3/scanf.3:52
11047 #, no-wrap
11048 msgid "SCANF"
11049 msgstr "SCANF"
11050
11051 #. type: TH
11052 #: build/C/man3/scanf.3:52
11053 #, no-wrap
11054 msgid "2013-01-30"
11055 msgstr "2013-01-30"
11056
11057 #. type: Plain text
11058 #: build/C/man3/scanf.3:55
11059 msgid ""
11060 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
11061 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
11062
11063 #. type: Plain text
11064 #: build/C/man3/scanf.3:62
11065 #, no-wrap
11066 msgid ""
11067 "B<int scanf(const char *>I<format>B<, ...);>\n"
11068 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11069 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11070 msgstr ""
11071 "B<int scanf(const char *>I<format>B<, ...);>\n"
11072 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
11073 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
11074
11075 #. type: Plain text
11076 #: build/C/man3/scanf.3:64
11077 #, no-wrap
11078 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
11079 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
11080
11081 #. type: Plain text
11082 #: build/C/man3/scanf.3:68
11083 #, no-wrap
11084 msgid ""
11085 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11086 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11087 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11088 msgstr ""
11089 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
11090 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11091 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
11092
11093 #. type: Plain text
11094 #: build/C/man3/scanf.3:79
11095 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11096 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
11097
11098 #. type: Plain text
11099 #: build/C/man3/scanf.3:82
11100 msgid ""
11101 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11102 "200112L;"
11103 msgstr ""
11104 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
11105 "200112L;"
11106
11107 #. type: Plain text
11108 #: build/C/man3/scanf.3:104
11109 msgid ""
11110 "The B<scanf>()  family of functions scans input according to I<format> as "
11111 "described below.  This format may contain I<conversion specifications>; the "
11112 "results from such conversions, if any, are stored in the locations pointed "
11113 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
11114 "argument must be of a type that is appropriate for the value returned by the "
11115 "corresponding conversion specification."
11116 msgstr ""
11117 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
11118 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
11119 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
11120 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
11121 "は、対応する変換指定が返す値に 適合していなければならない。"
11122
11123 #. type: Plain text
11124 #: build/C/man3/scanf.3:115
11125 msgid ""
11126 "If the number of conversion specifications in I<format> exceeds the number "
11127 "of I<pointer> arguments, the results are undefined.  If the number of "
11128 "I<pointer> arguments exceeds the number of conversion specifications, then "
11129 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
11130 msgstr ""
11131 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
11132 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
11133 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
11134
11135 #. type: Plain text
11136 #: build/C/man3/scanf.3:127
11137 msgid ""
11138 "The B<scanf>()  function reads input from the standard input stream "
11139 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
11140 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
11141 msgstr ""
11142 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
11143 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
11144 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
11145
11146 #. type: Plain text
11147 #: build/C/man3/scanf.3:145
11148 msgid ""
11149 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
11150 "from the stream pointer I<stream> using a variable argument list of pointers "
11151 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
11152 "from the standard input and the B<vsscanf>()  function scans it from a "
11153 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
11154 "functions respectively."
11155 msgstr ""
11156 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
11157 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
11158 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
11159 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
11160 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
11161
11162 #. type: Plain text
11163 #: build/C/man3/scanf.3:159
11164 msgid ""
11165 "The I<format> string consists of a sequence of I<directives> which describe "
11166 "how to process the sequence of input characters.  If processing of a "
11167 "directive fails, no further input is read, and B<scanf>()  returns.  A "
11168 "\"failure\" can be either of the following: I<input failure>, meaning that "
11169 "input characters were unavailable, or I<matching failure>, meaning that the "
11170 "input was inappropriate (see below)."
11171 msgstr ""
11172 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
11173 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
11174 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
11175 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
11176 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
11177 "であったこと (下記参照) を意味する。"
11178
11179 #. type: Plain text
11180 #: build/C/man3/scanf.3:161
11181 msgid "A directive is one of the following:"
11182 msgstr "命令は以下のいずれかである:"
11183
11184 #. type: TP
11185 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
11186 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
11187 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
11188 #, no-wrap
11189 msgid "\\(bu"
11190 msgstr "\\(bu"
11191
11192 #. type: Plain text
11193 #: build/C/man3/scanf.3:167
11194 msgid ""
11195 "A sequence of white-space characters (space, tab, newline, etc.; see "
11196 "B<isspace>(3)).  This directive matches any amount of white space, including "
11197 "none, in the input."
11198 msgstr ""
11199 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
11200 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
11201 "致する)。"
11202
11203 #. type: Plain text
11204 #: build/C/man3/scanf.3:171
11205 msgid ""
11206 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
11207 "This character must exactly match the next character of input."
11208 msgstr ""
11209 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
11210 "の次の文字に正確に一致しなければならない。"
11211
11212 #. type: Plain text
11213 #: build/C/man3/scanf.3:182
11214 msgid ""
11215 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
11216 "character.  A sequence of characters from the input is converted according "
11217 "to this specification, and the result is placed in the corresponding "
11218 "I<pointer> argument.  If the next item of input does not match the "
11219 "conversion specification, the conversion fails\\(emthis is a I<matching "
11220 "failure>."
11221 msgstr ""
11222 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
11223 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
11224 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
11225 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
11226
11227 #. type: Plain text
11228 #: build/C/man3/scanf.3:190
11229 msgid ""
11230 "Each I<conversion specification> in I<format> begins with either the "
11231 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
11232 "for the distinction) followed by:"
11233 msgstr ""
11234 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
11235 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
11236
11237 #. type: Plain text
11238 #: build/C/man3/scanf.3:201
11239 msgid ""
11240 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
11241 "input as directed by the conversion specification, but discards the input.  "
11242 "No corresponding I<pointer> argument is required, and this specification is "
11243 "not included in the count of successful assignments returned by B<scanf>()."
11244 msgstr ""
11245 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
11246 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
11247 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
11248
11249 #. type: Plain text
11250 #: build/C/man3/scanf.3:220
11251 msgid ""
11252 "An optional \\(aqm\\(aq character.  This is used with string conversions (I<"
11253 "%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
11254 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
11255 "buffer of sufficient size, and assigns the address of this buffer to the "
11256 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
11257 "*> variable (this variable does not need to be initialized before the "
11258 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
11259 "longer required."
11260 msgstr ""
11261 "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに"
11262 "使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必"
11263 "要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、この"
11264 "バッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数"
11265 "は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に"
11266 "初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファ"
11267 "を B<free>(3) すべきである。"
11268
11269 #. type: Plain text
11270 #: build/C/man3/scanf.3:232
11271 msgid ""
11272 "An optional decimal integer which specifies the I<maximum field width>.  "
11273 "Reading of characters stops either when this maximum is reached or when a "
11274 "nonmatching character is found, whichever happens first.  Most conversions "
11275 "discard initial white space characters (the exceptions are noted below), and "
11276 "these discarded characters don't count toward the maximum field width.  "
11277 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
11278 "mark the end of the input; the maximum field width does not include this "
11279 "terminator."
11280 msgstr ""
11281 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
11282 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
11283 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
11284 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
11285 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
11286 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
11287
11288 #. type: Plain text
11289 #: build/C/man3/scanf.3:246
11290 msgid ""
11291 "An optional I<type modifier character>.  For example, the B<l> type modifier "
11292 "is used with integer conversions such as B<%d> to specify that the "
11293 "corresponding I<pointer> argument refers to a I<long int> rather than a "
11294 "pointer to an I<int>."
11295 msgstr ""
11296 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
11297 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
11298 "I<int> ではなく I<long int> を参照していることを指定できる。"
11299
11300 #. type: Plain text
11301 #: build/C/man3/scanf.3:251
11302 msgid ""
11303 "A I<conversion specifier> that specifies the type of input conversion to be "
11304 "performed."
11305 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
11306
11307 #. type: Plain text
11308 #: build/C/man3/scanf.3:280
11309 msgid ""
11310 "The conversion specifications in I<format> are of two forms, either "
11311 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
11312 "forms should not be mixed in the same I<format> string, except that a string "
11313 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
11314 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
11315 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
11316 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
11317 "specifies that the converted input should be placed in the location referred "
11318 "to by the I<n>-th I<pointer> argument following I<format>."
11319 msgstr ""
11320 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
11321 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
11322 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
11323 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
11324 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
11325 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
11326 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
11327 "I<pointer> 引き数が参照する場所に格納することを指定する。"
11328
11329 #. type: SS
11330 #: build/C/man3/scanf.3:280
11331 #, no-wrap
11332 msgid "Conversions"
11333 msgstr "変換"
11334
11335 #. type: Plain text
11336 #: build/C/man3/scanf.3:284
11337 msgid ""
11338 "The following I<type modifier characters> can appear in a conversion "
11339 "specification:"
11340 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
11341
11342 #. type: Plain text
11343 #: build/C/man3/scanf.3:294
11344 msgid ""
11345 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
11346 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
11347 "I<unsigned short int> (rather than I<int>)."
11348 msgstr ""
11349 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
11350 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
11351 "あることを示す。"
11352
11353 #. type: Plain text
11354 #: build/C/man3/scanf.3:302
11355 msgid ""
11356 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
11357 "I<unsigned char>."
11358 msgstr ""
11359 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
11360 "タであることを示す。"
11361
11362 #. type: Plain text
11363 #: build/C/man3/scanf.3:311
11364 msgid ""
11365 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
11366 "I<uintmax_t>.  This modifier was introduced in C99."
11367 msgstr ""
11368 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
11369 "ることを示す。 この修飾子は C99 で導入された。"
11370
11371 #.  This use of l was introduced in Amendment 1 to ISO C90.
11372 #. type: Plain text
11373 #: build/C/man3/scanf.3:338
11374 msgid ""
11375 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
11376 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
11377 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
11378 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
11379 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
11380 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
11381 "as a pointer to a wide character or wide-character string respectively."
11382 msgstr ""
11383 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
11384 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
11385 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
11386 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
11387 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
11388 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
11389 "ンタであると みなされる。"
11390
11391 #.  MTK, Jul 05: The following is no longer true for modern
11392 #.  ANSI C (i.e., C99):
11393 #.  (Note that long long is not an
11394 #.  ANSI C
11395 #.  type. Any program using this will not be portable to all
11396 #.  architectures).
11397 #. type: Plain text
11398 #: build/C/man3/scanf.3:354
11399 msgid ""
11400 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
11401 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
11402 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
11403 msgstr ""
11404 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
11405 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
11406 "I<long long> へのポインタであることのいずれかであることを示す。"
11407
11408 #. type: Plain text
11409 #: build/C/man3/scanf.3:359
11410 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
11411 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
11412
11413 #. type: Plain text
11414 #: build/C/man3/scanf.3:366
11415 msgid ""
11416 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11417 "modifier was introduced in C99."
11418 msgstr ""
11419 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11420 "この修飾子は C99 で導入された。"
11421
11422 #. type: Plain text
11423 #: build/C/man3/scanf.3:373
11424 msgid ""
11425 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11426 "modifier was introduced in C99."
11427 msgstr ""
11428 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11429 "修飾子は C99 で導入された。"
11430
11431 #. type: Plain text
11432 #: build/C/man3/scanf.3:377
11433 msgid "The following I<conversion specifiers> are available:"
11434 msgstr "以下の I<「変換指定子」> が利用可能である。"
11435
11436 #. type: Plain text
11437 #: build/C/man3/scanf.3:386
11438 msgid ""
11439 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11440 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11441 "initial white space characters are discarded), and assignment does not occur."
11442 msgstr ""
11443 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11444 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11445 "る)、 変数への代入は生じない。"
11446
11447 #. type: TP
11448 #: build/C/man3/scanf.3:386
11449 #, no-wrap
11450 msgid "B<d>"
11451 msgstr "B<d>"
11452
11453 #. type: Plain text
11454 #: build/C/man3/scanf.3:391
11455 msgid ""
11456 "Matches an optionally signed decimal integer; the next pointer must be a "
11457 "pointer to I<int>."
11458 msgstr ""
11459 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11460 "ばならない。"
11461
11462 #. type: TP
11463 #: build/C/man3/scanf.3:391
11464 #, no-wrap
11465 msgid "B<D>"
11466 msgstr "B<D>"
11467
11468 #. type: Plain text
11469 #: build/C/man3/scanf.3:400
11470 msgid ""
11471 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11472 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11473 "causing old programs to fail mysteriously.)"
11474 msgstr ""
11475 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11476 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11477 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11478
11479 #. type: TP
11480 #: build/C/man3/scanf.3:400
11481 #, no-wrap
11482 msgid "B<i>"
11483 msgstr "B<i>"
11484
11485 #. type: Plain text
11486 #: build/C/man3/scanf.3:412
11487 msgid ""
11488 "Matches an optionally signed integer; the next pointer must be a pointer to "
11489 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11490 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11491 "that correspond to the base are used."
11492 msgstr ""
11493 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11494 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11495 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11496 "される文字は、これらの基数に対応しているものだけである。"
11497
11498 #. type: TP
11499 #: build/C/man3/scanf.3:412
11500 #, no-wrap
11501 msgid "B<o>"
11502 msgstr "B<o>"
11503
11504 #. type: Plain text
11505 #: build/C/man3/scanf.3:416
11506 msgid ""
11507 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11508 "I<unsigned int>."
11509 msgstr ""
11510 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11511 "らない。"
11512
11513 #. type: TP
11514 #: build/C/man3/scanf.3:416
11515 #, no-wrap
11516 msgid "B<u>"
11517 msgstr "B<u>"
11518
11519 #. type: Plain text
11520 #: build/C/man3/scanf.3:421
11521 msgid ""
11522 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11523 "I<unsigned int>."
11524 msgstr ""
11525 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11526 "でなければならない。"
11527
11528 #. type: Plain text
11529 #: build/C/man3/scanf.3:426
11530 msgid ""
11531 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11532 "to I<unsigned int>."
11533 msgstr ""
11534 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11535 "タでなければならない。"
11536
11537 #. type: TP
11538 #: build/C/man3/scanf.3:426
11539 #, no-wrap
11540 msgid "B<X>"
11541 msgstr "B<X>"
11542
11543 #. type: Plain text
11544 #: build/C/man3/scanf.3:430
11545 msgid "Equivalent to B<x>."
11546 msgstr "B<x> と同一である。"
11547
11548 #. type: TP
11549 #: build/C/man3/scanf.3:430
11550 #, no-wrap
11551 msgid "B<f>"
11552 msgstr "B<f>"
11553
11554 #. type: Plain text
11555 #: build/C/man3/scanf.3:435
11556 msgid ""
11557 "Matches an optionally signed floating-point number; the next pointer must be "
11558 "a pointer to I<float>."
11559 msgstr ""
11560 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11561 "ればならない。"
11562
11563 #. type: TP
11564 #: build/C/man3/scanf.3:435
11565 #, no-wrap
11566 msgid "B<e>"
11567 msgstr "B<e>"
11568
11569 #. type: Plain text
11570 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
11571 msgid "Equivalent to B<f>."
11572 msgstr "B<f> と同一である。"
11573
11574 #. type: TP
11575 #: build/C/man3/scanf.3:439
11576 #, no-wrap
11577 msgid "B<g>"
11578 msgstr "B<g>"
11579
11580 #. type: TP
11581 #: build/C/man3/scanf.3:443
11582 #, no-wrap
11583 msgid "B<E>"
11584 msgstr "B<E>"
11585
11586 #. type: Plain text
11587 #: build/C/man3/scanf.3:451
11588 msgid "(C99) Equivalent to B<f>."
11589 msgstr "(C99)  B<f> と同一である。"
11590
11591 #. type: Plain text
11592 #: build/C/man3/scanf.3:459
11593 msgid ""
11594 "Matches a sequence of non-white-space characters; the next pointer must be a "
11595 "pointer to character array that is long enough to hold the input sequence "
11596 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11597 "automatically.  The input string stops at white space or at the maximum "
11598 "field width, whichever occurs first."
11599 msgstr ""
11600 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11601 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11602 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11603 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11604 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11605
11606 #. type: Plain text
11607 #: build/C/man3/scanf.3:469
11608 msgid ""
11609 "Matches a sequence of characters whose length is specified by the I<maximum "
11610 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11611 "there must be enough room for all the characters (no terminating null byte "
11612 "is added).  The usual skip of leading white space is suppressed.  To skip "
11613 "white space first, use an explicit space in the format."
11614 msgstr ""
11615 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11616 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11617 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11618 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11619 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11620
11621 #. type: TP
11622 #: build/C/man3/scanf.3:469
11623 #, no-wrap
11624 msgid "B<\\&[>"
11625 msgstr "B<\\&[>"
11626
11627 #. type: Plain text
11628 #: build/C/man3/scanf.3:502
11629 msgid ""
11630 "Matches a nonempty sequence of characters from the specified set of accepted "
11631 "characters; the next pointer must be a pointer to I<char>, and there must be "
11632 "enough room for all the characters in the string, plus a terminating null "
11633 "byte.  The usual skip of leading white space is suppressed.  The string is "
11634 "to be made up of characters in (or not in) a particular set; the set is "
11635 "defined by the characters between the open bracket B<[> character and a "
11636 "close bracket B<]> character.  The set I<excludes> those characters if the "
11637 "first character after the open bracket is a circumflex (B<^>).  To include a "
11638 "close bracket in the set, make it the first character after the open bracket "
11639 "or the circumflex; any other position will end the set.  The hyphen "
11640 "character B<-> is also special; when placed between two other characters, it "
11641 "adds all intervening characters to the set.  To include a hyphen, make it "
11642 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11643 "> means the set \"everything except close bracket, zero through nine, and "
11644 "hyphen\".  The string ends with the appearance of a character not in the "
11645 "(or, with a circumflex, in) set or when the field width runs out."
11646 msgstr ""
11647 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11648 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11649 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11650 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11651 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11652 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11653 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11654 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11655 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11656 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11657 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11658 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11659 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11660 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11661 "文字の 出現または確保された領域が使い切られた時に終了する。"
11662
11663 #. type: Plain text
11664 #: build/C/man3/scanf.3:510
11665 msgid ""
11666 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11667 "pointer must be a pointer to a pointer to I<void>."
11668 msgstr ""
11669 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11670 "タは I<void> へのポインタへのポインタでなければならない。"
11671
11672 #. type: Plain text
11673 #: build/C/man3/scanf.3:530
11674 msgid ""
11675 "Nothing is expected; instead, the number of characters consumed thus far "
11676 "from the input is stored through the next pointer, which must be a pointer "
11677 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11678 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11679 "of a B<%n> directive does not increment the assignment count returned at the "
11680 "completion of execution\" but the Corrigendum seems to contradict this.  "
11681 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11682 "conversions on the return value."
11683 msgstr ""
11684 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11685 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11686 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11687 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11688 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11689 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11690 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11691
11692 #. type: Plain text
11693 #: build/C/man3/scanf.3:535
11694 msgid ""
11695 "These functions return the number of input items successfully matched and "
11696 "assigned, which can be fewer than provided for, or even zero in the event of "
11697 "an early matching failure."
11698 msgstr ""
11699 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11700 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11701 "ることもある。"
11702
11703 #. type: Plain text
11704 #: build/C/man3/scanf.3:547
11705 msgid ""
11706 "The value B<EOF> is returned if the end of input is reached before either "
11707 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11708 "also returned if a read error occurs, in which case the error indicator for "
11709 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11710 "error."
11711 msgstr ""
11712 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11713 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11714 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11715 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11716
11717 #. type: Plain text
11718 #: build/C/man3/scanf.3:553
11719 msgid ""
11720 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11721 "operation would block."
11722 msgstr ""
11723 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11724 "込み操作は停止 (block) することになる。"
11725
11726 #. type: Plain text
11727 #: build/C/man3/scanf.3:558
11728 msgid ""
11729 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11730 msgstr ""
11731 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11732 "ンされていない。"
11733
11734 #. type: Plain text
11735 #: build/C/man3/scanf.3:561
11736 msgid "Input byte sequence does not form a valid character."
11737 msgstr "入力されたバイト列が有効な文字を構成していない。"
11738
11739 #. type: Plain text
11740 #: build/C/man3/scanf.3:565
11741 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11742 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11743
11744 #. type: Plain text
11745 #: build/C/man3/scanf.3:570
11746 msgid "Not enough arguments; or I<format> is NULL."
11747 msgstr "引き数が十分でない。または I<format> が NULL である。"
11748
11749 #. type: Plain text
11750 #: build/C/man3/scanf.3:573
11751 msgid "Out of memory."
11752 msgstr "メモリ不足。"
11753
11754 #. type: TP
11755 #: build/C/man3/scanf.3:573
11756 #, no-wrap
11757 msgid "B<ERANGE>"
11758 msgstr "B<ERANGE>"
11759
11760 #. type: Plain text
11761 #: build/C/man3/scanf.3:577
11762 msgid ""
11763 "The result of an integer conversion would exceed the size that can be stored "
11764 "in the corresponding integer type."
11765 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11766
11767 #. type: Plain text
11768 #: build/C/man3/scanf.3:587
11769 msgid ""
11770 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11771 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11772 msgstr ""
11773 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11774 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11775
11776 #. type: Plain text
11777 #: build/C/man3/scanf.3:597
11778 msgid ""
11779 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11780 "the usage of B<L> in integer conversions is the GNU notation."
11781 msgstr ""
11782 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11783 "B<ll> または B<L> の使用は GNU での拡張である。"
11784
11785 #. type: Plain text
11786 #: build/C/man3/scanf.3:608
11787 msgid ""
11788 "The Linux version of these functions is based on the I<GNU> I<libio> "
11789 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11790 "(glibc-1.08)> for a more concise description."
11791 msgstr ""
11792 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11793 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11794
11795 #. type: Plain text
11796 #: build/C/man3/scanf.3:614
11797 msgid ""
11798 "The GNU C library supported the dynamic allocation conversion specifier (as "
11799 "a nonstandard extension) via the B<a> character.  This feature seems to be "
11800 "present at least as far back as glibc 2.0."
11801 msgstr ""
11802 "GNU C ライブラリ (glibc) では、 B<a> 文字による動的割り当て変換指定子 "
11803 "(dynamic allocation conversion specifier) を (非標準の拡張として) サポートし"
11804 "ている。この機能は少なくとも glibc 2.0 以降で存在しているようである。"
11805
11806 #. type: Plain text
11807 #: build/C/man3/scanf.3:624
11808 msgid ""
11809 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
11810 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
11811 "the B<a> is interpreted as a specifier for floating-point numbers (see "
11812 "above)."
11813 msgstr ""
11814 "この修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプロ"
11815 "グラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない。この場"
11816 "合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11817
11818 #. type: Plain text
11819 #: build/C/man3/scanf.3:633
11820 msgid ""
11821 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11822 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11823 "advantages:"
11824 msgstr ""
11825 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11826 "ている。 B<m> 修飾子は以下の利点がある。"
11827
11828 #. type: Plain text
11829 #: build/C/man3/scanf.3:638
11830 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11831 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11832
11833 #. type: Plain text
11834 #: build/C/man3/scanf.3:644
11835 msgid ""
11836 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11837 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11838 msgstr ""
11839 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11840 "std=c99> などの影響も避けられる)。"
11841
11842 #. type: Plain text
11843 #: build/C/man3/scanf.3:646
11844 msgid "It is specified in the POSIX.1-2008 standard."
11845 msgstr "POSIX.1-2008 標準で規定されている。"
11846
11847 #. type: Plain text
11848 #: build/C/man3/scanf.3:659
11849 msgid ""
11850 "All functions are fully C89 conformant, but provide the additional "
11851 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11852 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11853 "the behavior of specifiers defined in C89."
11854 msgstr ""
11855 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11856 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11857 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11858 "れない。"
11859
11860 #. type: Plain text
11861 #: build/C/man3/scanf.3:675
11862 msgid ""
11863 "Some combinations of the type modifiers and conversion specifiers defined by "
11864 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
11865 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11866 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11867 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11868 "B<u>, B<x>, and B<X> conversions or B<ll>."
11869 msgstr ""
11870 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
11871 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
11872 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
11873 "他のアーキテクチャでも同様になっているとは限らない。\n"
11874 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
11875 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
11876 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11877
11878 #. type: Plain text
11879 #: build/C/man3/scanf.3:681
11880 msgid ""
11881 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11882 "conversions equivalently to B<L>."
11883 msgstr ""
11884 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11885 "動小数の変換に使用される。"
11886
11887 #. type: Plain text
11888 #: build/C/man3/scanf.3:691
11889 msgid ""
11890 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
11891 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
11892 "the returned string, as in the following example:"
11893 msgstr ""
11894 "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つま"
11895 "り、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、"
11896 "呼び出し側は返された文字列を B<free>(3) しなければならない。"
11897
11898 #. type: Plain text
11899 #: build/C/man3/scanf.3:696
11900 #, no-wrap
11901 msgid ""
11902 "char *p;\n"
11903 "int n;\n"
11904 msgstr ""
11905 "char *p;\n"
11906 "int n;\n"
11907
11908 #. type: Plain text
11909 #: build/C/man3/scanf.3:707
11910 #, no-wrap
11911 msgid ""
11912 "errno = 0;\n"
11913 "n = scanf(\"%m[a-z]\", &p);\n"
11914 "if (n == 1) {\n"
11915 "    printf(\"read: %s\\en\", p);\n"
11916 "    free(p);\n"
11917 "} else if (errno != 0) {\n"
11918 "    perror(\"scanf\");\n"
11919 "} else {\n"
11920 "    fprintf(stderr, \"No matching characters\\en\");\n"
11921 "}\n"
11922 msgstr ""
11923 "errno = 0;\n"
11924 "n = scanf(\"%m[a-z]\", &p);\n"
11925 "if (n == 1) {\n"
11926 "    printf(\"read: %s\\en\", p);\n"
11927 "    free(p);\n"
11928 "} else if (errno != 0) {\n"
11929 "    perror(\"scanf\");\n"
11930 "} else {\n"
11931 "    fprintf(stderr, \"No matching characters\\en\");\n"
11932 "}\n"
11933
11934 #. type: Plain text
11935 #: build/C/man3/scanf.3:715
11936 msgid ""
11937 "As shown in the above example, it is necessary to call B<free>(3)  only if "
11938 "the B<scanf>()  call successfully read a string."
11939 msgstr ""
11940 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11941 "B<free>(3)  を呼び出す必要がある。"
11942
11943 #. type: Plain text
11944 #: build/C/man3/scanf.3:722
11945 msgid ""
11946 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11947 "B<strtoul>(3)"
11948 msgstr ""
11949 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11950 "B<strtoul>(3),"
11951
11952 #. type: TH
11953 #: build/C/man3/setbuf.3:48
11954 #, no-wrap
11955 msgid "SETBUF"
11956 msgstr "SETBUF"
11957
11958 #. type: TH
11959 #: build/C/man3/setbuf.3:48
11960 #, no-wrap
11961 msgid "2012-08-03"
11962 msgstr "2012-08-03"
11963
11964 #. type: Plain text
11965 #: build/C/man3/setbuf.3:51
11966 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11967 msgstr ""
11968 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11969
11970 #. type: Plain text
11971 #: build/C/man3/setbuf.3:56
11972 #, no-wrap
11973 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11974 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11975
11976 #. type: Plain text
11977 #: build/C/man3/setbuf.3:58
11978 #, no-wrap
11979 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11980 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11981
11982 #. type: Plain text
11983 #: build/C/man3/setbuf.3:60
11984 #, no-wrap
11985 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11986 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11987
11988 #. type: Plain text
11989 #: build/C/man3/setbuf.3:63
11990 #, no-wrap
11991 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11992 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11993
11994 #. type: Plain text
11995 #: build/C/man3/setbuf.3:73
11996 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11997 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11998
11999 #. type: Plain text
12000 #: build/C/man3/setbuf.3:96
12001 msgid ""
12002 "The three types of buffering available are unbuffered, block buffered, and "
12003 "line buffered.  When an output stream is unbuffered, information appears on "
12004 "the destination file or terminal as soon as written; when it is block "
12005 "buffered many characters are saved up and written as a block; when it is "
12006 "line buffered characters are saved up until a newline is output or input is "
12007 "read from any stream attached to a terminal device (typically I<stdin>).  "
12008 "The function B<fflush>(3)  may be used to force the block out early.  (See "
12009 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
12010 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
12011 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
12012 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
12013 "by default."
12014 msgstr ""
12015 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
12016 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
12017 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
12018 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
12019 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
12020 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
12021 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
12022 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
12023 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
12024 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
12025 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
12026 "unbuffered である。"
12027
12028 #. type: Plain text
12029 #: build/C/man3/setbuf.3:103
12030 msgid ""
12031 "The B<setvbuf>()  function may be used on any open stream to change its "
12032 "buffer.  The I<mode> argument must be one of the following three macros:"
12033 msgstr ""
12034 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
12035 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
12036
12037 #. type: TP
12038 #: build/C/man3/setbuf.3:104
12039 #, no-wrap
12040 msgid "B<_IONBF>"
12041 msgstr "B<_IONBF>"
12042
12043 #. type: Plain text
12044 #: build/C/man3/setbuf.3:107
12045 msgid "unbuffered"
12046 msgstr "unbuffered"
12047
12048 #. type: TP
12049 #: build/C/man3/setbuf.3:107
12050 #, no-wrap
12051 msgid "B<_IOLBF>"
12052 msgstr "B<_IOLBF>"
12053
12054 #. type: Plain text
12055 #: build/C/man3/setbuf.3:110
12056 msgid "line buffered"
12057 msgstr "line buffered"
12058
12059 #. type: TP
12060 #: build/C/man3/setbuf.3:110
12061 #, no-wrap
12062 msgid "B<_IOFBF>"
12063 msgstr "B<_IOFBF>"
12064
12065 #. type: Plain text
12066 #: build/C/man3/setbuf.3:113
12067 msgid "fully buffered"
12068 msgstr "fully buffered"
12069
12070 #. type: Plain text
12071 #: build/C/man3/setbuf.3:129
12072 msgid ""
12073 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
12074 "least I<size> bytes long; this buffer will be used instead of the current "
12075 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
12076 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
12077 "()  function may be used only after opening a stream and before any other "
12078 "operations have been performed on it."
12079 msgstr ""
12080 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
12081 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
12082 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
12083 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
12084 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
12085
12086 #. type: Plain text
12087 #: build/C/man3/setbuf.3:135
12088 msgid ""
12089 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
12090 "().  The B<setbuf>()  function is exactly equivalent to the call"
12091 msgstr ""
12092 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
12093 "B<setbuf>()  関数は、"
12094
12095 #. type: Plain text
12096 #: build/C/man3/setbuf.3:138
12097 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12098 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
12099
12100 #. type: Plain text
12101 #: build/C/man3/setbuf.3:148
12102 msgid ""
12103 "The B<setbuffer>()  function is the same, except that the size of the buffer "
12104 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
12105 "The B<setlinebuf>()  function is exactly equivalent to the call:"
12106 msgstr ""
12107 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
12108 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
12109 "は以下と同じである。"
12110
12111 #. type: Plain text
12112 #: build/C/man3/setbuf.3:151
12113 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
12114 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
12115
12116 #. type: Plain text
12117 #: build/C/man3/setbuf.3:162
12118 msgid ""
12119 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
12120 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
12121 "I<errno> on failure."
12122 msgstr ""
12123 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
12124 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
12125 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
12126
12127 #. type: Plain text
12128 #: build/C/man3/setbuf.3:164
12129 msgid "The other functions do not return a value."
12130 msgstr "その他の関数は値を返さない。"
12131
12132 #. type: Plain text
12133 #: build/C/man3/setbuf.3:170
12134 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
12135 msgstr ""
12136 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
12137
12138 #. type: Plain text
12139 #: build/C/man3/setbuf.3:180
12140 msgid ""
12141 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
12142 "versions of BSD before 4.2BSD, and are available under Linux since libc "
12143 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
12144 "buffer size and should be avoided."
12145 msgstr ""
12146 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
12147 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
12148 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
12149 "ズを使用するので、これも使うべきでない。"
12150
12151 #. type: Plain text
12152 #: build/C/man3/setbuf.3:187
12153 msgid ""
12154 "You must make sure that the space that I<buf> points to still exists by the "
12155 "time I<stream> is closed, which also happens at program termination.  For "
12156 "example, the following is invalid:"
12157 msgstr ""
12158 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
12159 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
12160 "な使い方は許されない:"
12161
12162 #. type: Plain text
12163 #: build/C/man3/setbuf.3:190
12164 #, no-wrap
12165 msgid "#include E<lt>stdio.hE<gt>\n"
12166 msgstr "#include E<lt>stdio.hE<gt>\n"
12167
12168 #. type: Plain text
12169 #: build/C/man3/setbuf.3:199
12170 #, no-wrap
12171 msgid ""
12172 "int\n"
12173 "main(void)\n"
12174 "{\n"
12175 "    char buf[BUFSIZ];\n"
12176 "    setbuf(stdin, buf);\n"
12177 "    printf(\"Hello, world!\\en\");\n"
12178 "    return 0;\n"
12179 "}\n"
12180 msgstr ""
12181 "int\n"
12182 "main(void)\n"
12183 "{\n"
12184 "    char buf[BUFSIZ];\n"
12185 "    setbuf(stdin, buf);\n"
12186 "    printf(\"Hello, world!\\en\");\n"
12187 "    return 0;\n"
12188 "}\n"
12189
12190 #. type: Plain text
12191 #: build/C/man3/setbuf.3:208
12192 msgid ""
12193 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12194 "(3), B<puts>(3)"
12195 msgstr ""
12196 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
12197 "(3), B<puts>(3)"
12198
12199 #. type: TH
12200 #: build/C/man3/stdin.3:13
12201 #, no-wrap
12202 msgid "STDIN"
12203 msgstr "STDIN"
12204
12205 #. type: TH
12206 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
12207 #, no-wrap
12208 msgid "2008-07-14"
12209 msgstr "2008-07-14"
12210
12211 #. type: Plain text
12212 #: build/C/man3/stdin.3:16
12213 msgid "stdin, stdout, stderr - standard I/O streams"
12214 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
12215
12216 #. type: Plain text
12217 #: build/C/man3/stdin.3:23
12218 #, no-wrap
12219 msgid ""
12220 "B<extern FILE *>I<stdin>B<;>\n"
12221 "B<extern FILE *>I<stdout>B<;>\n"
12222 "B<extern FILE *>I<stderr>B<;>\n"
12223 msgstr ""
12224 "B<extern FILE *>I<stdin>B<;>\n"
12225 "B<extern FILE *>I<stdout>B<;>\n"
12226 "B<extern FILE *>I<stderr>B<;>\n"
12227
12228 #. type: Plain text
12229 #: build/C/man3/stdin.3:35
12230 msgid ""
12231 "Under normal circumstances every UNIX program has three streams opened for "
12232 "it when it starts up, one for input, one for output, and one for printing "
12233 "diagnostic or error messages.  These are typically attached to the user's "
12234 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
12235 "depending on what the parent process chose to set up.  (See also the "
12236 "\"Redirection\" section of B<sh>(1).)"
12237 msgstr ""
12238 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
12239 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
12240 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
12241 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
12242 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
12243
12244 #. type: Plain text
12245 #: build/C/man3/stdin.3:45
12246 msgid ""
12247 "The input stream is referred to as \"standard input\"; the output stream is "
12248 "referred to as \"standard output\"; and the error stream is referred to as "
12249 "\"standard error\".  These terms are abbreviated to form the symbols used to "
12250 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
12251 msgstr ""
12252 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
12253 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
12254 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
12255 "I<stdout>, I<stderr> である。"
12256
12257 #. type: Plain text
12258 #: build/C/man3/stdin.3:54
12259 msgid ""
12260 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
12261 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
12262 msgstr ""
12263 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
12264 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
12265
12266 #. type: Plain text
12267 #: build/C/man3/stdin.3:63
12268 msgid ""
12269 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
12270 "same underlying files may also be accessed using the raw UNIX file "
12271 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
12272 msgstr ""
12273 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
12274 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
12275 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
12276 "る。"
12277
12278 #. type: Plain text
12279 #: build/C/man3/stdin.3:82
12280 msgid ""
12281 "On program startup, the integer file descriptors associated with the streams "
12282 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
12283 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
12284 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
12285 "(3)  to one of these streams can change the file descriptor number "
12286 "associated with the stream.)"
12287 msgstr ""
12288 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
12289 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
12290 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
12291 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
12292 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
12293 "たファイルディスクリプタ の番号を変更することができる。)"
12294
12295 #. type: Plain text
12296 #: build/C/man3/stdin.3:95
12297 msgid ""
12298 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
12299 "unexpected results and should generally be avoided.  (For the masochistic "
12300 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
12301 "is supposed to work.)  A general rule is that file descriptors are handled "
12302 "in the kernel, while stdio is just a library.  This means for example, that "
12303 "after an B<exec>(3), the child inherits all open file descriptors, but all "
12304 "old streams have become inaccessible."
12305 msgstr ""
12306 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
12307 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
12308 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
12309 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
12310 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
12311 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
12312 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
12313
12314 #. type: Plain text
12315 #: build/C/man3/stdin.3:113
12316 msgid ""
12317 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
12318 "macros, assigning to them is nonportable.  The standard streams can be made "
12319 "to refer to different files with help of the library function B<freopen>(3), "
12320 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
12321 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
12322 "by normal program termination."
12323 msgstr ""
12324 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
12325 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
12326 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
12327 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
12328 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
12329 "グラムの正常終了によってクローズされる。"
12330
12331 #. type: Plain text
12332 #: build/C/man3/stdin.3:122
12333 msgid ""
12334 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
12335 "standard also stipulates that these three streams shall be open at program "
12336 "startup."
12337 msgstr ""
12338 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
12339 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
12340 "とが規定されている。"
12341
12342 #. type: Plain text
12343 #: build/C/man3/stdin.3:154
12344 msgid ""
12345 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
12346 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
12347 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
12348 "unexpected results, especially with debugging output.  The buffering mode of "
12349 "the standard streams (or any other stream)  can be changed using the "
12350 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
12351 "associated with a terminal, there may also be input buffering in the "
12352 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
12353 "terminal input is line buffered in the kernel.)  This kernel input handling "
12354 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
12355 "B<termios>(3)."
12356 msgstr ""
12357 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
12358 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
12359 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
12360 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
12361 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
12362 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
12363 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
12364 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
12365 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
12366 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
12367 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
12368 "B<termios>(3)  も参照すること。"
12369
12370 #. type: Plain text
12371 #: build/C/man3/stdin.3:160
12372 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12373 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
12374
12375 #. type: TH
12376 #: build/C/man3/stdio.3:39
12377 #, no-wrap
12378 msgid "STDIO"
12379 msgstr "STDIO"
12380
12381 #. type: TH
12382 #: build/C/man3/stdio.3:39
12383 #, no-wrap
12384 msgid "2001-12-26"
12385 msgstr "2001-12-26"
12386
12387 #. type: Plain text
12388 #: build/C/man3/stdio.3:42
12389 msgid "stdio - standard input/output library functions"
12390 msgstr "stdio - 標準入出力ライブラリ関数"
12391
12392 #. type: Plain text
12393 #: build/C/man3/stdio.3:46
12394 msgid "B<FILE *>I<stdin>B<;>"
12395 msgstr "B<FILE *>I<stdin>B<;>"
12396
12397 #. type: Plain text
12398 #: build/C/man3/stdio.3:48
12399 msgid "B<FILE *>I<stdout>B<;>"
12400 msgstr "B<FILE *>I<stdout>B<;>"
12401
12402 #. type: Plain text
12403 #: build/C/man3/stdio.3:50
12404 msgid "B<FILE *>I<stderr>B<;>"
12405 msgstr "B<FILE *>I<stderr>B<;>"
12406
12407 #. type: Plain text
12408 #: build/C/man3/stdio.3:57
12409 msgid ""
12410 "The standard I/O library provides a simple and efficient buffered stream I/O "
12411 "interface.  Input and output is mapped into logical data streams and the "
12412 "physical I/O characteristics are concealed.  The functions and macros are "
12413 "listed below; more information is available from the individual man pages."
12414 msgstr ""
12415 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
12416 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
12417 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12418 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12419
12420 #. type: Plain text
12421 #: build/C/man3/stdio.3:80
12422 msgid ""
12423 "A stream is associated with an external file (which may be a physical "
12424 "device) by I<opening> a file, which may involve creating a new file.  "
12425 "Creating an existing file causes its former contents to be discarded.  If a "
12426 "file can support positioning requests (such as a disk file, as opposed to a "
12427 "terminal) then a I<file position indicator> associated with the stream is "
12428 "positioned at the start of the file (byte zero), unless the file is opened "
12429 "with append mode.  If append mode is used, it is unspecified whether the "
12430 "position indicator will be placed at the start or the end of the file.  The "
12431 "position indicator is maintained by subsequent reads, writes and positioning "
12432 "requests.  All input occurs as if the characters were read by successive "
12433 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12434 "characters were written by successive calls to the B<fputc>(3)  function."
12435 msgstr ""
12436 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12437 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12438 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12439 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12440 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12441 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12442 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12443 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12444 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12445 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12446 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12447 "字を書き込んだかのように行われる。"
12448
12449 #. type: Plain text
12450 #: build/C/man3/stdio.3:90
12451 msgid ""
12452 "A file is disassociated from a stream by I<closing> the file.  Output "
12453 "streams are flushed (any unwritten buffer contents are transferred to the "
12454 "host environment) before the stream is disassociated from the file.  The "
12455 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12456 "closed (garbage)."
12457 msgstr ""
12458 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12459 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12460 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12461 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12462 "確定になる (ゴミになってしまう)。"
12463
12464 #. type: Plain text
12465 #: build/C/man3/stdio.3:103
12466 msgid ""
12467 "A file may be subsequently reopened, by the same or another program "
12468 "execution, and its contents reclaimed or modified (if it can be repositioned "
12469 "at the start).  If the main function returns to its original caller, or the "
12470 "B<exit>(3)  function is called, all open files are closed (hence all output "
12471 "streams are flushed) before program termination.  Other methods of program "
12472 "termination, such as B<abort>(3)  do not bother about closing files properly."
12473 msgstr ""
12474 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12475 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12476 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12477 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12478 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12479 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12480 "保証はない。"
12481
12482 #. type: Plain text
12483 #: build/C/man3/stdio.3:119
12484 msgid ""
12485 "At program startup, three text streams are predefined and need not be opened "
12486 "explicitly: I<standard input> (for reading conventional input), I<standard "
12487 "output> (for writing conventional input), and I<standard error> (for writing "
12488 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12489 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12490 "the standard input and output streams are fully buffered if and only if the "
12491 "streams do not refer to an interactive device."
12492 msgstr ""
12493 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12494 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12495 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12496 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12497 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12498 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12499 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12500 "スを参照していなければ、 完全にバッファリングされている。"
12501
12502 #. type: Plain text
12503 #: build/C/man3/stdio.3:129
12504 msgid ""
12505 "Output streams that refer to terminal devices are always line buffered by "
12506 "default; pending output to such streams is written automatically whenever an "
12507 "input stream that refers to a terminal device is read.  In cases where a "
12508 "large amount of computation is done after printing part of a line on an "
12509 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12510 "going off and computing so that the output will appear."
12511 msgstr ""
12512 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12513 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12514 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12515 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12516 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12517 "必要がある。"
12518
12519 #. type: Plain text
12520 #: build/C/man3/stdio.3:143
12521 msgid ""
12522 "The I<stdio> library is a part of the library B<libc> and routines are "
12523 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12524 "SYNOPSIS sections of the following manual pages indicate which include files "
12525 "are to be used, what the compiler declaration for the function looks like "
12526 "and which external variables are of interest."
12527 msgstr ""
12528 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12529 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12530 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12531 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12532 "数が関係するのかが示されている。"
12533
12534 #.  Not on Linux: .BR fropen ,
12535 #.  Not on Linux: .BR fwopen ,
12536 #. type: Plain text
12537 #: build/C/man3/stdio.3:183
12538 msgid ""
12539 "The following are defined as macros; these names may not be reused without "
12540 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12541 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12542 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12543 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12544 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12545 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12546 "and B<putchar> exist and will be used if the macros definitions are "
12547 "explicitly removed."
12548 msgstr ""
12549 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12550 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12551 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12552 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12553 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12554 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12555 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12556 "示的に消去されている場合には、 これらを使用することになるだろう。"
12557
12558 #. type: SS
12559 #: build/C/man3/stdio.3:183
12560 #, no-wrap
12561 msgid "List of functions"
12562 msgstr "関数のリスト"
12563
12564 #. type: tbl table
12565 #: build/C/man3/stdio.3:188
12566 #, no-wrap
12567 msgid "Function\tDescription\n"
12568 msgstr "関数\t説明\n"
12569
12570 #. type: tbl table
12571 #: build/C/man3/stdio.3:189
12572 #, no-wrap
12573 msgid "_\n"
12574 msgstr "_\n"
12575
12576 #. type: tbl table
12577 #: build/C/man3/stdio.3:190
12578 #, no-wrap
12579 msgid "clearerr\tcheck and reset stream status\n"
12580 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12581
12582 #. type: tbl table
12583 #: build/C/man3/stdio.3:191
12584 #, no-wrap
12585 msgid "fclose\tclose a stream\n"
12586 msgstr "fclose\tストリームをクローズする\n"
12587
12588 #. type: tbl table
12589 #: build/C/man3/stdio.3:192
12590 #, no-wrap
12591 msgid "fdopen\tstream open functions\n"
12592 msgstr "fdopen\tストリームをオープンする\n"
12593
12594 #. type: tbl table
12595 #: build/C/man3/stdio.3:193
12596 #, no-wrap
12597 msgid "feof\tcheck and reset stream status\n"
12598 msgstr "feof\tストリームの状態の確認とリセット\n"
12599
12600 #. type: tbl table
12601 #: build/C/man3/stdio.3:194
12602 #, no-wrap
12603 msgid "ferror\tcheck and reset stream status\n"
12604 msgstr "ferror\tストリームの状態の確認とリセット\n"
12605
12606 #. type: tbl table
12607 #: build/C/man3/stdio.3:195
12608 #, no-wrap
12609 msgid "fflush\tflush a stream\n"
12610 msgstr "fflush\tストリームをフラッシュする\n"
12611
12612 #. type: tbl table
12613 #: build/C/man3/stdio.3:196
12614 #, no-wrap
12615 msgid "fgetc\tget next character or word from input stream\n"
12616 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12617
12618 #. type: tbl table
12619 #: build/C/man3/stdio.3:197
12620 #, no-wrap
12621 msgid "fgetpos\treposition a stream\n"
12622 msgstr "fgetpos\tストリームの位置を取得する\n"
12623
12624 #. type: tbl table
12625 #: build/C/man3/stdio.3:198
12626 #, no-wrap
12627 msgid "fgets\tget a line from a stream\n"
12628 msgstr "fgets\tストリームから行を取得する\n"
12629
12630 #. type: tbl table
12631 #: build/C/man3/stdio.3:199
12632 #, no-wrap
12633 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12634 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12635
12636 #. type: tbl table
12637 #: build/C/man3/stdio.3:200
12638 #, no-wrap
12639 msgid "fopen\tstream open functions\n"
12640 msgstr "fopen\tストリームをオープンする\n"
12641
12642 #. type: tbl table
12643 #: build/C/man3/stdio.3:201
12644 #, no-wrap
12645 msgid "fprintf\tformatted output conversion\n"
12646 msgstr "fprintf\t書式付き出力変換\n"
12647
12648 #. type: tbl table
12649 #: build/C/man3/stdio.3:202
12650 #, no-wrap
12651 msgid "fpurge\tflush a stream\n"
12652 msgstr "fpurge\tストリームをフラッシュする\n"
12653
12654 #. type: tbl table
12655 #: build/C/man3/stdio.3:203
12656 #, no-wrap
12657 msgid "fputc\toutput a character or word to a stream\n"
12658 msgstr "fputc\t文字または語をストリームに出力する\n"
12659
12660 #. type: tbl table
12661 #: build/C/man3/stdio.3:204
12662 #, no-wrap
12663 msgid "fputs\toutput a line to a stream\n"
12664 msgstr "fputs\t行をストリームに出力する\n"
12665
12666 #. type: tbl table
12667 #: build/C/man3/stdio.3:205
12668 #, no-wrap
12669 msgid "fread\tbinary stream input/output\n"
12670 msgstr "fread\tバイナリーストリーム入出力\n"
12671
12672 #. type: tbl table
12673 #: build/C/man3/stdio.3:206
12674 #, no-wrap
12675 msgid "freopen\tstream open functions\n"
12676 msgstr "freopen\tストリームをオープンする\n"
12677
12678 #. type: tbl table
12679 #: build/C/man3/stdio.3:207
12680 #, no-wrap
12681 msgid "fscanf\tinput format conversion\n"
12682 msgstr "fscanf\t書式付き入力変換\n"
12683
12684 #. type: tbl table
12685 #: build/C/man3/stdio.3:208
12686 #, no-wrap
12687 msgid "fseek\treposition a stream\n"
12688 msgstr "fseek\tストリームの位置指示子を移動する\n"
12689
12690 #. type: tbl table
12691 #: build/C/man3/stdio.3:209
12692 #, no-wrap
12693 msgid "fsetpos\treposition a stream\n"
12694 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12695
12696 #. type: tbl table
12697 #: build/C/man3/stdio.3:210
12698 #, no-wrap
12699 msgid "ftell\treposition a stream\n"
12700 msgstr "ftell\tストリームの位置を取得する\n"
12701
12702 #. type: tbl table
12703 #: build/C/man3/stdio.3:211
12704 #, no-wrap
12705 msgid "fwrite\tbinary stream input/output\n"
12706 msgstr "fwrite\tバイナリーストリーム入出力\n"
12707
12708 #. type: tbl table
12709 #: build/C/man3/stdio.3:212
12710 #, no-wrap
12711 msgid "getc\tget next character or word from input stream\n"
12712 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12713
12714 #. type: tbl table
12715 #: build/C/man3/stdio.3:213
12716 #, no-wrap
12717 msgid "getchar\tget next character or word from input stream\n"
12718 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12719
12720 #. type: tbl table
12721 #: build/C/man3/stdio.3:214
12722 #, no-wrap
12723 msgid "gets\tget a line from a stream\n"
12724 msgstr "gets\t行を入力ストリームから取得する\n"
12725
12726 #. type: tbl table
12727 #: build/C/man3/stdio.3:215
12728 #, no-wrap
12729 msgid "getw\tget next character or word from input stream\n"
12730 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12731
12732 #. type: tbl table
12733 #: build/C/man3/stdio.3:216
12734 #, no-wrap
12735 msgid "mktemp\tmake temporary filename (unique)\n"
12736 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12737
12738 #. type: tbl table
12739 #: build/C/man3/stdio.3:217
12740 #, no-wrap
12741 msgid "perror\tsystem error messages\n"
12742 msgstr "perror\tシステムエラーメッセージ\n"
12743
12744 #. type: tbl table
12745 #: build/C/man3/stdio.3:218
12746 #, no-wrap
12747 msgid "printf\tformatted output conversion\n"
12748 msgstr "printf\t書式付き出力変換\n"
12749
12750 #. type: tbl table
12751 #: build/C/man3/stdio.3:219
12752 #, no-wrap
12753 msgid "putc\toutput a character or word to a stream\n"
12754 msgstr "putc\t文字または語をストリームに出力する\n"
12755
12756 #. type: tbl table
12757 #: build/C/man3/stdio.3:220
12758 #, no-wrap
12759 msgid "putchar\toutput a character or word to a stream\n"
12760 msgstr "putchar\t文字または語をストリームに出力する\n"
12761
12762 #. type: tbl table
12763 #: build/C/man3/stdio.3:221
12764 #, no-wrap
12765 msgid "puts\toutput a line to a stream\n"
12766 msgstr "puts\t行をストリームに出力する\n"
12767
12768 #. type: tbl table
12769 #: build/C/man3/stdio.3:222
12770 #, no-wrap
12771 msgid "putw\toutput a character or word to a stream\n"
12772 msgstr "putw\t文字または語をストリームに出力する\n"
12773
12774 #. type: tbl table
12775 #: build/C/man3/stdio.3:223
12776 #, no-wrap
12777 msgid "remove\tremove directory entry\n"
12778 msgstr "remove\tディレクトリエントリを削除する\n"
12779
12780 #. type: tbl table
12781 #: build/C/man3/stdio.3:224
12782 #, no-wrap
12783 msgid "rewind\treposition a stream\n"
12784 msgstr "rewind\tストリームの位置指示子を移動する\n"
12785
12786 #. type: tbl table
12787 #: build/C/man3/stdio.3:225
12788 #, no-wrap
12789 msgid "scanf\tinput format conversion\n"
12790 msgstr "scanf\t書式付き入力変換\n"
12791
12792 #. type: tbl table
12793 #: build/C/man3/stdio.3:226
12794 #, no-wrap
12795 msgid "setbuf\tstream buffering operations\n"
12796 msgstr "setbuf\tストリームのバッファリングの操作\n"
12797
12798 #. type: tbl table
12799 #: build/C/man3/stdio.3:227
12800 #, no-wrap
12801 msgid "setbuffer\tstream buffering operations\n"
12802 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12803
12804 #. type: tbl table
12805 #: build/C/man3/stdio.3:228
12806 #, no-wrap
12807 msgid "setlinebuf\tstream buffering operations\n"
12808 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12809
12810 #. type: tbl table
12811 #: build/C/man3/stdio.3:229
12812 #, no-wrap
12813 msgid "setvbuf\tstream buffering operations\n"
12814 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12815
12816 #. type: tbl table
12817 #: build/C/man3/stdio.3:230
12818 #, no-wrap
12819 msgid "sprintf\tformatted output conversion\n"
12820 msgstr "sprintf\t書式付き出力変換\n"
12821
12822 #. type: tbl table
12823 #: build/C/man3/stdio.3:231
12824 #, no-wrap
12825 msgid "sscanf\tinput format conversion\n"
12826 msgstr "sscanf\t書式付き入力変換\n"
12827
12828 #. type: tbl table
12829 #: build/C/man3/stdio.3:232
12830 #, no-wrap
12831 msgid "strerror\tsystem error messages\n"
12832 msgstr "strerror\tシステムエラーメッセージ\n"
12833
12834 #. type: tbl table
12835 #: build/C/man3/stdio.3:233
12836 #, no-wrap
12837 msgid "sys_errlist\tsystem error messages\n"
12838 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12839
12840 #. type: tbl table
12841 #: build/C/man3/stdio.3:234
12842 #, no-wrap
12843 msgid "sys_nerr\tsystem error messages\n"
12844 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12845
12846 #. type: tbl table
12847 #: build/C/man3/stdio.3:235
12848 #, no-wrap
12849 msgid "tempnam\ttemporary file routines\n"
12850 msgstr "tempnam\tテンポラリファイルの操作\n"
12851
12852 #. type: tbl table
12853 #: build/C/man3/stdio.3:236
12854 #, no-wrap
12855 msgid "tmpfile\ttemporary file routines\n"
12856 msgstr "tmpfile\tテンポラリファイルの操作\n"
12857
12858 #. type: tbl table
12859 #: build/C/man3/stdio.3:237
12860 #, no-wrap
12861 msgid "tmpnam\ttemporary file routines\n"
12862 msgstr "tmpnam\tテンポラリファイルの操作\n"
12863
12864 #. type: tbl table
12865 #: build/C/man3/stdio.3:238
12866 #, no-wrap
12867 msgid "ungetc\tun-get character from input stream\n"
12868 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12869
12870 #. type: tbl table
12871 #: build/C/man3/stdio.3:239
12872 #, no-wrap
12873 msgid "vfprintf\tformatted output conversion\n"
12874 msgstr "vfprintf\t書式付き出力変換\n"
12875
12876 #. type: tbl table
12877 #: build/C/man3/stdio.3:240
12878 #, no-wrap
12879 msgid "vfscanf\tinput format conversion\n"
12880 msgstr "vfscanf\t書式付き入力変換\n"
12881
12882 #. type: tbl table
12883 #: build/C/man3/stdio.3:241
12884 #, no-wrap
12885 msgid "vprintf\tformatted output conversion\n"
12886 msgstr "vprintf\t書式付き出力変換\n"
12887
12888 #. type: tbl table
12889 #: build/C/man3/stdio.3:242
12890 #, no-wrap
12891 msgid "vscanf\tinput format conversion\n"
12892 msgstr "vscanf\t書式付き入力変換\n"
12893
12894 #. type: tbl table
12895 #: build/C/man3/stdio.3:243
12896 #, no-wrap
12897 msgid "vsprintf\tformatted output conversion\n"
12898 msgstr "vsprintf\t書式付き出力変換\n"
12899
12900 #. type: tbl table
12901 #: build/C/man3/stdio.3:244
12902 #, no-wrap
12903 msgid "vsscanf\tinput format conversion\n"
12904 msgstr "vsscanf\t書式付き入力変換\n"
12905
12906 #. type: Plain text
12907 #: build/C/man3/stdio.3:250
12908 msgid "The I<stdio> library conforms to C89."
12909 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12910
12911 #. type: Plain text
12912 #: build/C/man3/stdio.3:257
12913 msgid ""
12914 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12915 "B<unlocked_stdio>(3)"
12916 msgstr ""
12917 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12918 "B<unlocked_stdio>(3)"
12919
12920 #. type: TH
12921 #: build/C/man3/stdio_ext.3:25
12922 #, no-wrap
12923 msgid "STDIO_EXT"
12924 msgstr "STDIO_EXT"
12925
12926 #. type: Plain text
12927 #: build/C/man3/stdio_ext.3:30
12928 msgid ""
12929 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12930 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12931 "structure"
12932 msgstr ""
12933 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12934 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12935 "へのインタフェース"
12936
12937 #. type: Plain text
12938 #: build/C/man3/stdio_ext.3:34
12939 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12940 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12941
12942 #. type: Plain text
12943 #: build/C/man3/stdio_ext.3:36
12944 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12945 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12946
12947 #. type: Plain text
12948 #: build/C/man3/stdio_ext.3:38
12949 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12950 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12951
12952 #. type: Plain text
12953 #: build/C/man3/stdio_ext.3:40
12954 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12955 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12956
12957 #. type: Plain text
12958 #: build/C/man3/stdio_ext.3:42
12959 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12960 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12961
12962 #. type: Plain text
12963 #: build/C/man3/stdio_ext.3:44
12964 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12965 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12966
12967 #. type: Plain text
12968 #: build/C/man3/stdio_ext.3:46
12969 msgid "B<int __freading(FILE *>I<stream>B<);>"
12970 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12971
12972 #. type: Plain text
12973 #: build/C/man3/stdio_ext.3:48
12974 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12975 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12976
12977 #. type: Plain text
12978 #: build/C/man3/stdio_ext.3:50
12979 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12980 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12981
12982 #. type: Plain text
12983 #: build/C/man3/stdio_ext.3:52
12984 msgid "B<void _flushlbf(void);>"
12985 msgstr "B<void _flushlbf(void);>"
12986
12987 #. type: Plain text
12988 #: build/C/man3/stdio_ext.3:54
12989 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12990 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12991
12992 #. type: Plain text
12993 #: build/C/man3/stdio_ext.3:59
12994 msgid ""
12995 "Solaris introduced routines to allow portable access to the internals of the "
12996 "I<FILE> structure, and glibc also implemented these."
12997 msgstr ""
12998 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
12999 "が導入されており、これらは glibc でも実装されている。"
13000
13001 #. type: Plain text
13002 #: build/C/man3/stdio_ext.3:64
13003 msgid ""
13004 "The B<__fbufsize>()  function returns the size of the buffer currently used "
13005 "by the given stream."
13006 msgstr ""
13007 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
13008 "す。"
13009
13010 #. type: Plain text
13011 #: build/C/man3/stdio_ext.3:71
13012 msgid ""
13013 "The B<__fpending>()  function returns the number of bytes in the output "
13014 "buffer.  For wide-oriented streams the unit is wide characters.  This "
13015 "function is undefined on buffers in reading mode, or opened read-only."
13016 msgstr ""
13017 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
13018 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
13019 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
13020 "は未定義である。"
13021
13022 #. type: Plain text
13023 #: build/C/man3/stdio_ext.3:76
13024 msgid ""
13025 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
13026 "buffered, and zero otherwise."
13027 msgstr ""
13028 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
13029 "場合は 0 を返す。"
13030
13031 #. type: Plain text
13032 #: build/C/man3/stdio_ext.3:81
13033 msgid ""
13034 "The B<__freadable>()  function returns a nonzero value if the stream allows "
13035 "reading, and zero otherwise."
13036 msgstr ""
13037 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
13038 "外の場合は 0 を返す。"
13039
13040 #. type: Plain text
13041 #: build/C/man3/stdio_ext.3:86
13042 msgid ""
13043 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
13044 "writing, and zero otherwise."
13045 msgstr ""
13046 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
13047 "外の場合は 0 を返す。"
13048
13049 #. type: Plain text
13050 #: build/C/man3/stdio_ext.3:92
13051 msgid ""
13052 "The B<__freading>()  function returns a nonzero value if the stream is read-"
13053 "only, or if the last operation on the stream was a read operation, and zero "
13054 "otherwise."
13055 msgstr ""
13056 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
13057 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
13058 "を返す。"
13059
13060 #. type: Plain text
13061 #: build/C/man3/stdio_ext.3:98
13062 msgid ""
13063 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
13064 "only (or append-only), or if the last operation on the stream was a write "
13065 "operation, and zero otherwise."
13066 msgstr ""
13067 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
13068 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
13069 "し、 それ以外の場合は 0 を返す。"
13070
13071 #. type: Plain text
13072 #: build/C/man3/stdio_ext.3:106
13073 msgid ""
13074 "The B<__fsetlocking>()  function can be used to select the desired type of "
13075 "locking on the stream.  It returns the current type.  The I<type> argument "
13076 "can take the following three values:"
13077 msgstr ""
13078 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
13079 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
13080 "ることができる :"
13081
13082 #. type: TP
13083 #: build/C/man3/stdio_ext.3:106
13084 #, no-wrap
13085 msgid "B<FSETLOCKING_INTERNAL>"
13086 msgstr "B<FSETLOCKING_INTERNAL>"
13087
13088 #. type: Plain text
13089 #: build/C/man3/stdio_ext.3:111
13090 msgid ""
13091 "Perform implicit locking around every operation on the given stream (except "
13092 "for the *_unlocked ones).  This is the default."
13093 msgstr ""
13094 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
13095 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
13096 "である)。 これがデフォルトのロック形式である。"
13097
13098 #. type: TP
13099 #: build/C/man3/stdio_ext.3:111
13100 #, no-wrap
13101 msgid "B<FSETLOCKING_BYCALLER>"
13102 msgstr "B<FSETLOCKING_BYCALLER>"
13103
13104 #. type: Plain text
13105 #: build/C/man3/stdio_ext.3:118
13106 msgid ""
13107 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
13108 "case there is more than one thread), and the stdio routines will not do "
13109 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
13110 msgstr ""
13111 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
13112 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
13113 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
13114 "理を行わない。"
13115
13116 #. type: TP
13117 #: build/C/man3/stdio_ext.3:118
13118 #, no-wrap
13119 msgid "B<FSETLOCKING_QUERY>"
13120 msgstr "B<FSETLOCKING_QUERY>"
13121
13122 #. type: Plain text
13123 #: build/C/man3/stdio_ext.3:122
13124 msgid "Don't change the type of locking.  (Only return it.)"
13125 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
13126
13127 #. type: Plain text
13128 #: build/C/man3/stdio_ext.3:128
13129 msgid ""
13130 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
13131 "so that output to a terminal is forced out, say before reading keyboard "
13132 "input.)"
13133 msgstr ""
13134 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
13135 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
13136 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
13137 "いだろう)"
13138
13139 #. type: Plain text
13140 #: build/C/man3/stdio_ext.3:132
13141 msgid ""
13142 "The B<__fpurge>()  function discards the contents of the stream's buffer."
13143 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
13144
13145 #. type: Plain text
13146 #: build/C/man3/stdio_ext.3:141
13147 msgid ""
13148 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
13149 "functions do not lock the stream, so they are not thread-safe."
13150 msgstr ""
13151 "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() "
13152 "は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
13153
13154 #. type: Plain text
13155 #: build/C/man3/stdio_ext.3:151
13156 msgid ""
13157 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13158 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
13159 msgstr ""
13160 "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
13161 "B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
13162
13163 #. type: Plain text
13164 #: build/C/man3/stdio_ext.3:154
13165 msgid "B<flockfile>(3), B<fpurge>(3)"
13166 msgstr "B<flockfile>(3), B<fpurge>(3)"
13167
13168 #. type: TH
13169 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
13170 #, no-wrap
13171 msgid "SYMLINK"
13172 msgstr "SYMLINK"
13173
13174 #. type: Plain text
13175 #: build/C/man2/symlink.2:35
13176 msgid "symlink - make a new name for a file"
13177 msgstr "symlink - ファイルに新しい名前を付ける"
13178
13179 #. type: Plain text
13180 #: build/C/man2/symlink.2:39
13181 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13182 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
13183
13184 #. type: Plain text
13185 #: build/C/man2/symlink.2:47
13186 msgid "B<symlink>():"
13187 msgstr "B<symlink>():"
13188
13189 #. type: Plain text
13190 #: build/C/man2/symlink.2:58
13191 msgid ""
13192 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
13193 "string I<oldpath>."
13194 msgstr ""
13195 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
13196 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
13197
13198 #. type: Plain text
13199 #: build/C/man2/symlink.2:62
13200 msgid ""
13201 "Symbolic links are interpreted at run time as if the contents of the link "
13202 "had been substituted into the path being followed to find a file or "
13203 "directory."
13204 msgstr ""
13205 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
13206 "スを辿ることで、 ファイルやディレクトリに到達する。"
13207
13208 #. type: Plain text
13209 #: build/C/man2/symlink.2:67
13210 msgid ""
13211 "Symbolic links may contain I<..> path components, which (if used at the "
13212 "start of the link) refer to the parent directories of that in which the link "
13213 "resides."
13214 msgstr ""
13215 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
13216 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
13217 "される。"
13218
13219 #. type: Plain text
13220 #: build/C/man2/symlink.2:71
13221 msgid ""
13222 "A symbolic link (also known as a soft link) may point to an existing file or "
13223 "to a nonexistent one; the latter case is known as a dangling link."
13224 msgstr ""
13225 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
13226 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
13227 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
13228
13229 #. type: Plain text
13230 #: build/C/man2/symlink.2:78
13231 msgid ""
13232 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
13233 "when following the link, but is checked when removal or renaming of the link "
13234 "is requested and the link is in a directory with the sticky bit "
13235 "(B<S_ISVTX>)  set."
13236 msgstr ""
13237 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
13238 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
13239 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
13240 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
13241
13242 #. type: Plain text
13243 #: build/C/man2/symlink.2:99
13244 msgid ""
13245 "Write access to the directory containing I<newpath> is denied, or one of the "
13246 "directories in the path prefix of I<newpath> did not allow search "
13247 "permission.  (See also B<path_resolution>(7).)"
13248 msgstr ""
13249 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
13250 "含まれているディレクトリのどれかに検索許可が与えられていない "
13251 "(B<path_resolution>(7)  も参照すること)。"
13252
13253 #. type: Plain text
13254 #: build/C/man2/symlink.2:104
13255 msgid ""
13256 "The user's quota of resources on the filesystem has been exhausted.  The "
13257 "resources could be inodes or disk blocks, depending on the filesystem "
13258 "implementation."
13259 msgstr ""
13260 "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となる"
13261 "リソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装"
13262 "依存である。"
13263
13264 #. type: Plain text
13265 #: build/C/man2/symlink.2:118
13266 msgid "Too many symbolic links were encountered in resolving I<newpath>."
13267 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13268
13269 #. type: Plain text
13270 #: build/C/man2/symlink.2:128
13271 msgid ""
13272 "A directory component in I<newpath> does not exist or is a dangling symbolic "
13273 "link, or I<oldpath> is the empty string."
13274 msgstr ""
13275 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
13276 "I<oldpath> が空文字列である。"
13277
13278 #. type: Plain text
13279 #: build/C/man2/symlink.2:140
13280 msgid ""
13281 "A component used as a directory in I<newpath> is not, in fact, a directory."
13282 msgstr ""
13283 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
13284
13285 #. type: Plain text
13286 #: build/C/man2/symlink.2:145
13287 msgid ""
13288 "The filesystem containing I<newpath> does not support the creation of "
13289 "symbolic links."
13290 msgstr ""
13291 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
13292 "作成をサポートしていない。"
13293
13294 #. type: Plain text
13295 #: build/C/man2/symlink.2:149
13296 msgid "I<newpath> is on a read-only filesystem."
13297 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
13298
13299 #. type: Plain text
13300 #: build/C/man2/symlink.2:159
13301 msgid "No checking of I<oldpath> is done."
13302 msgstr "I<oldpath> についてのチェックは行なわれない。"
13303
13304 #. type: Plain text
13305 #: build/C/man2/symlink.2:164
13306 msgid ""
13307 "Deleting the name referred to by a symlink will actually delete the file "
13308 "(unless it also has other hard links).  If this behavior is not desired, use "
13309 "B<link>(2)."
13310 msgstr ""
13311 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
13312 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
13313 "場合は、 B<link>(2)  を使用すること。"
13314
13315 #. type: Plain text
13316 #: build/C/man2/symlink.2:176
13317 msgid ""
13318 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13319 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13320 "B<symlink>(7)"
13321 msgstr ""
13322 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
13323 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
13324 "B<symlink>(7)"
13325
13326 #. type: TH
13327 #: build/C/man7/symlink.7:36
13328 #, no-wrap
13329 msgid "2008-06-18"
13330 msgstr "2008-06-18"
13331
13332 #. type: Plain text
13333 #: build/C/man7/symlink.7:39
13334 msgid "symlink - symbolic link handling"
13335 msgstr ""
13336
13337 #. type: SH
13338 #: build/C/man7/symlink.7:39
13339 #, no-wrap
13340 msgid "SYMBOLIC LINK HANDLING"
13341 msgstr ""
13342
13343 #. type: Plain text
13344 #: build/C/man7/symlink.7:43
13345 msgid ""
13346 "Symbolic links are files that act as pointers to other files.  To understand "
13347 "their behavior, you must first understand how hard links work."
13348 msgstr ""
13349
13350 #. type: Plain text
13351 #: build/C/man7/symlink.7:59
13352 msgid ""
13353 "A hard link to a file is indistinguishable from the original file because it "
13354 "is a reference to the object underlying the original filename.  (To be "
13355 "precise: each of the hard links to a file is a reference to the same I<i-"
13356 "node number>, where an i-node number is an index into the i-node table, "
13357 "which contains metadata about all files on a filesystem.  See B<stat>(2).)  "
13358 "Changes to a file are independent of the name used to reference the file.  "
13359 "Hard links may not refer to directories (to prevent the possibility of loops "
13360 "within the filesystem tree, which would confuse many programs)  and may not "
13361 "refer to files on different filesystems (because i-node numbers are not "
13362 "unique across filesystems)."
13363 msgstr ""
13364
13365 #. type: Plain text
13366 #: build/C/man7/symlink.7:66
13367 msgid ""
13368 "A symbolic link is a special type of file whose contents are a string that "
13369 "is the pathname another file, the file to which the link refers.  In other "
13370 "words, a symbolic link is a pointer to another name, and not to an "
13371 "underlying object.  For this reason, symbolic links may refer to directories "
13372 "and may cross filesystem boundaries."
13373 msgstr ""
13374
13375 #. type: Plain text
13376 #: build/C/man7/symlink.7:72
13377 msgid ""
13378 "There is no requirement that the pathname referred to by a symbolic link "
13379 "should exist.  A symbolic link that refers to a pathname that does not exist "
13380 "is said to be a I<dangling link>."
13381 msgstr ""
13382
13383 #. type: Plain text
13384 #: build/C/man7/symlink.7:84
13385 msgid ""
13386 "Because a symbolic link and its referenced object coexist in the filesystem "
13387 "name space, confusion can arise in distinguishing between the link itself "
13388 "and the referenced object.  On historical systems, commands and system calls "
13389 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
13390 "Rules for a more uniform approach, as they are implemented on Linux and "
13391 "other systems, are outlined here.  It is important that site-local "
13392 "applications also conform to these rules, so that the user interface can be "
13393 "as consistent as possible."
13394 msgstr ""
13395
13396 #. type: SS
13397 #: build/C/man7/symlink.7:84
13398 #, no-wrap
13399 msgid "Symbolic link ownership, permissions, and timestamps"
13400 msgstr ""
13401
13402 #. type: Plain text
13403 #: build/C/man7/symlink.7:92
13404 msgid ""
13405 "The owner and group of an existing symbolic link can be changed using "
13406 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
13407 "is when the link is being removed or renamed in a directory that has the "
13408 "sticky bit set (see B<stat>(2))."
13409 msgstr ""
13410
13411 #. type: Plain text
13412 #: build/C/man7/symlink.7:98
13413 msgid ""
13414 "The last access and last modification timestamps of a symbolic link can be "
13415 "changed using B<utimensat>(2)  or B<lutimes>(3)."
13416 msgstr ""
13417
13418 #.  Linux does not currently implement an lchmod(2).
13419 #.  The
13420 #.  4.4BSD
13421 #.  system differs from historical
13422 #.  4BSD
13423 #.  systems in that the system call
13424 #.  .BR chown (2)
13425 #.  has been changed to follow symbolic links.
13426 #.  The
13427 #.  .BR lchown (2)
13428 #.  system call was added later when the limitations of the new
13429 #.  .BR chown (2)
13430 #.  became apparent.
13431 #. type: Plain text
13432 #: build/C/man7/symlink.7:117
13433 msgid ""
13434 "On Linux, the permissions of a symbolic link are not used in any operations; "
13435 "the permissions are always 0777 (read, write, and execute for all user "
13436 "categories), and can't be changed."
13437 msgstr ""
13438
13439 #. type: SS
13440 #: build/C/man7/symlink.7:117
13441 #, no-wrap
13442 msgid "Handling of symbolic links by system calls and commands"
13443 msgstr ""
13444
13445 #. type: Plain text
13446 #: build/C/man7/symlink.7:132
13447 msgid ""
13448 "Symbolic links are handled either by operating on the link itself, or by "
13449 "operating on the object referred to by the link.  In the latter case, an "
13450 "application or system call is said to I<follow> the link.  Symbolic links "
13451 "may refer to other symbolic links, in which case the links are dereferenced "
13452 "until an object that is not a symbolic link is found, a symbolic link that "
13453 "refers to a file which does not exist is found, or a loop is detected.  "
13454 "(Loop detection is done by placing an upper limit on the number of links "
13455 "that may be followed, and an error results if this limit is exceeded.)"
13456 msgstr ""
13457
13458 #. type: Plain text
13459 #: build/C/man7/symlink.7:135
13460 msgid ""
13461 "There are three separate areas that need to be discussed.  They are as "
13462 "follows:"
13463 msgstr ""
13464
13465 #. type: IP
13466 #: build/C/man7/symlink.7:135
13467 #, no-wrap
13468 msgid "1."
13469 msgstr "1."
13470
13471 #. type: Plain text
13472 #: build/C/man7/symlink.7:137
13473 msgid "Symbolic links used as filename arguments for system calls."
13474 msgstr ""
13475
13476 #. type: IP
13477 #: build/C/man7/symlink.7:137
13478 #, no-wrap
13479 msgid "2."
13480 msgstr "2."
13481
13482 #. type: Plain text
13483 #: build/C/man7/symlink.7:140
13484 msgid ""
13485 "Symbolic links specified as command-line arguments to utilities that are not "
13486 "traversing a file tree."
13487 msgstr ""
13488
13489 #. type: IP
13490 #: build/C/man7/symlink.7:140
13491 #, no-wrap
13492 msgid "3."
13493 msgstr "3."
13494
13495 #. type: Plain text
13496 #: build/C/man7/symlink.7:144
13497 msgid ""
13498 "Symbolic links encountered by utilities that are traversing a file tree "
13499 "(either specified on the command line or encountered as part of the file "
13500 "hierarchy walk)."
13501 msgstr ""
13502
13503 #. type: SS
13504 #: build/C/man7/symlink.7:144
13505 #, no-wrap
13506 msgid "System calls"
13507 msgstr ""
13508
13509 #. type: Plain text
13510 #: build/C/man7/symlink.7:147
13511 msgid ""
13512 "The first area is symbolic links used as filename arguments for system calls."
13513 msgstr ""
13514
13515 #. type: Plain text
13516 #: build/C/man7/symlink.7:157
13517 msgid ""
13518 "Except as noted below, all system calls follow symbolic links.  For example, "
13519 "if there were a symbolic link I<slink> which pointed to a file named "
13520 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13521 "descriptor referring to the file I<afile>."
13522 msgstr ""
13523
13524 #.  Maybe one day: .BR fchownat (2)
13525 #. type: Plain text
13526 #: build/C/man7/symlink.7:207
13527 msgid ""
13528 "Various system calls do not follow links, and operate on the symbolic link "
13529 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13530 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13531 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13532 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13533 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13534 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13535 "(2), that library function also does not follow symbolic links.  When "
13536 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13537 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13538 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13539 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13540 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13541 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13542 "to allow either behavior in an implementation."
13543 msgstr ""
13544
13545 #. type: SS
13546 #: build/C/man7/symlink.7:207
13547 #, no-wrap
13548 msgid "Commands not traversing a file tree"
13549 msgstr ""
13550
13551 #. type: Plain text
13552 #: build/C/man7/symlink.7:210
13553 msgid ""
13554 "The second area is symbolic links, specified as command-line filename "
13555 "arguments, to commands which are not traversing a file tree."
13556 msgstr ""
13557
13558 #. type: Plain text
13559 #: build/C/man7/symlink.7:221
13560 msgid ""
13561 "Except as noted below, commands follow symbolic links named as command-line "
13562 "arguments.  For example, if there were a symbolic link I<slink> which "
13563 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13564 "contents of the file I<afile>."
13565 msgstr ""
13566
13567 #. type: Plain text
13568 #: build/C/man7/symlink.7:229
13569 msgid ""
13570 "It is important to realize that this rule includes commands which may "
13571 "optionally traverse file trees, e.g., the command I<chown file> is included "
13572 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13573 "traversal, is not.  (The latter is described in the third area, below.)"
13574 msgstr ""
13575
13576 #. type: Plain text
13577 #: build/C/man7/symlink.7:247
13578 msgid ""
13579 "If it is explicitly intended that the command operate on the symbolic link "
13580 "instead of following the symbolic link, e.g., it is desired that I<chown "
13581 "slink> change the ownership of the file that I<slink> is, whether it is a "
13582 "symbolic link or not, the I<-h> option should be used.  In the above "
13583 "example, I<chown root slink> would change the ownership of the file referred "
13584 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13585 "I<slink> itself."
13586 msgstr ""
13587
13588 #. type: Plain text
13589 #: build/C/man7/symlink.7:249
13590 msgid "There are some exceptions to this rule:"
13591 msgstr ""
13592
13593 #. type: Plain text
13594 #: build/C/man7/symlink.7:259
13595 msgid ""
13596 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13597 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13598 "the symbolic link references a file via a relative path, moving it to "
13599 "another directory may very well cause it to stop working, since the path may "
13600 "no longer be correct.)"
13601 msgstr ""
13602
13603 #. type: Plain text
13604 #: build/C/man7/symlink.7:289
13605 msgid ""
13606 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13607 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13608 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13609 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13610 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13611 "the only command where the I<-H> and I<-L> options affect its behavior even "
13612 "though it is not doing a walk of a file tree.)"
13613 msgstr ""
13614
13615 #. The 4.4BSD system differs from historical 4BSD systems in that the
13616 #. .BR chown (1)
13617 #. and
13618 #. .BR chgrp (1)
13619 #. commands follow symbolic links specified on the command line.
13620 #. type: Plain text
13621 #: build/C/man7/symlink.7:307
13622 msgid ""
13623 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13624 "command does not follow symbolic links named as argument by default.  The "
13625 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13626 "L> option is specified."
13627 msgstr ""
13628
13629 #. type: SS
13630 #: build/C/man7/symlink.7:307
13631 #, no-wrap
13632 msgid "Commands traversing a file tree"
13633 msgstr ""
13634
13635 #. type: Plain text
13636 #: build/C/man7/symlink.7:320
13637 msgid ""
13638 "The following commands either optionally or always traverse file trees: "
13639 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13640 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13641 msgstr ""
13642
13643 #. type: Plain text
13644 #: build/C/man7/symlink.7:324
13645 msgid ""
13646 "It is important to realize that the following rules apply equally to "
13647 "symbolic links encountered during the file tree traversal and symbolic links "
13648 "listed as command-line arguments."
13649 msgstr ""
13650
13651 #. type: Plain text
13652 #: build/C/man7/symlink.7:329
13653 msgid ""
13654 "The I<first rule> applies to symbolic links that reference files other than "
13655 "directories.  Operations that apply to symbolic links are performed on the "
13656 "links themselves, but otherwise the links are ignored."
13657 msgstr ""
13658
13659 #. type: Plain text
13660 #: build/C/man7/symlink.7:341
13661 msgid ""
13662 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13663 "symbolic links encountered in the tree traversal of I<directory>, because "
13664 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13665 "referred to by I<slink>."
13666 msgstr ""
13667
13668 #. type: Plain text
13669 #: build/C/man7/symlink.7:346
13670 msgid ""
13671 "The I<second rule> applies to symbolic links that refer to directories.  "
13672 "Symbolic links that refer to directories are never followed by default.  "
13673 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13674 "\" walk (where symbolic links the refer to directories are followed)."
13675 msgstr ""
13676
13677 #. type: Plain text
13678 #: build/C/man7/symlink.7:349
13679 msgid ""
13680 "Certain conventions are (should be) followed as consistently as possible by "
13681 "commands that perform file tree walks:"
13682 msgstr ""
13683
13684 #. type: Plain text
13685 #: build/C/man7/symlink.7:362
13686 msgid ""
13687 "A command can be made to follow any symbolic links named on the command "
13688 "line, regardless of the type of file they reference, by specifying the I<-H> "
13689 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13690 "name space look like the logical name space.  (Note, for commands that do "
13691 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13692 "R> flag is not also specified.)"
13693 msgstr ""
13694
13695 #. type: Plain text
13696 #: build/C/man7/symlink.7:378
13697 msgid ""
13698 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13699 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13700 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13701 "symbolic links specified on the command line to be dereferenced for the "
13702 "purposes of both the action to be performed and the tree walk, and it is as "
13703 "if the user had specified the name of the file to which the symbolic link "
13704 "pointed."
13705 msgstr ""
13706
13707 #. type: Plain text
13708 #: build/C/man7/symlink.7:392
13709 msgid ""
13710 "A command can be made to follow any symbolic links named on the command "
13711 "line, as well as any symbolic links encountered during the traversal, "
13712 "regardless of the type of file they reference, by specifying the I<-L> (for "
13713 "\"logical\") flag.  This flag is intended to make the entire name space look "
13714 "like the logical name space.  (Note, for commands that do not always do file "
13715 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13716 "also specified.)"
13717 msgstr ""
13718
13719 #. type: Plain text
13720 #: build/C/man7/symlink.7:407
13721 msgid ""
13722 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13723 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13724 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13725 "references.  In addition, if any symbolic links are encountered in any file "
13726 "tree that B<chown> traverses, they will be treated in the same fashion as "
13727 "I<slink>."
13728 msgstr ""
13729
13730 #. type: Plain text
13731 #: build/C/man7/symlink.7:414
13732 msgid ""
13733 "A command can be made to provide the default behavior by specifying the I<-"
13734 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13735 "space look like the physical name space."
13736 msgstr ""
13737
13738 #. type: Plain text
13739 #: build/C/man7/symlink.7:432
13740 msgid ""
13741 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13742 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13743 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13744 "once; the last one specified determines the command's behavior.  This is "
13745 "intended to permit you to alias commands to behave one way or the other, and "
13746 "then override that behavior on the command line."
13747 msgstr ""
13748
13749 #. type: Plain text
13750 #: build/C/man7/symlink.7:438
13751 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13752 msgstr ""
13753
13754 #. type: Plain text
13755 #: build/C/man7/symlink.7:451
13756 msgid ""
13757 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13758 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13759 "command does not support the I<-H>, I<-L>, or I<-P> options."
13760 msgstr ""
13761
13762 #. type: Plain text
13763 #: build/C/man7/symlink.7:471
13764 msgid ""
13765 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13766 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13767 "options, B<ls>(1)  will follow symbolic links specified on the command "
13768 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13769 "regardless of their type, whether specified on the command line or "
13770 "encountered in the tree walk."
13771 msgstr ""
13772
13773 #. type: Plain text
13774 #: build/C/man7/symlink.7:489
13775 msgid ""
13776 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13777 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13778 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13779 "B<path_resolution>(7)"
13780 msgstr ""
13781 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13782 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13783 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13784 "B<lutimes>(3), B<path_resolution>(7)"
13785
13786 #. type: TH
13787 #: build/C/man3/tempnam.3:25
13788 #, no-wrap
13789 msgid "TEMPNAM"
13790 msgstr "TEMPNAM"
13791
13792 #. type: Plain text
13793 #: build/C/man3/tempnam.3:28
13794 msgid "tempnam - create a name for a temporary file"
13795 msgstr "tempnam - テンポラリファイルの名前を作成する"
13796
13797 #. type: Plain text
13798 #: build/C/man3/tempnam.3:33
13799 #, no-wrap
13800 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13801 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13802
13803 #. type: Plain text
13804 #: build/C/man3/tempnam.3:42
13805 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13806 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13807
13808 #. type: Plain text
13809 #: build/C/man3/tempnam.3:56
13810 msgid ""
13811 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13812 "filename, and such that a file with this name did not exist when B<tempnam>"
13813 "()  checked.  The filename suffix of the pathname generated will start with "
13814 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13815 "directory prefix part of the pathname generated is required to be "
13816 "\"appropriate\" (often that at least implies writable)."
13817 msgstr ""
13818 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13819 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13820 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13821 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13822 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13823 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13824
13825 #. type: Plain text
13826 #: build/C/man3/tempnam.3:59
13827 msgid ""
13828 "Attempts to find an appropriate directory go through the following steps:"
13829 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13830
13831 #. type: TP
13832 #: build/C/man3/tempnam.3:59
13833 #, no-wrap
13834 msgid "a)"
13835 msgstr "a)"
13836
13837 #. type: Plain text
13838 #: build/C/man3/tempnam.3:65
13839 msgid ""
13840 "In case the environment variable B<TMPDIR> exists and contains the name of "
13841 "an appropriate directory, that is used."
13842 msgstr ""
13843 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13844 "ら、それを用いる。"
13845
13846 #. type: TP
13847 #: build/C/man3/tempnam.3:65
13848 #, no-wrap
13849 msgid "b)"
13850 msgstr "b)"
13851
13852 #. type: Plain text
13853 #: build/C/man3/tempnam.3:70
13854 msgid ""
13855 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13856 msgstr ""
13857 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13858 "る。"
13859
13860 #. type: TP
13861 #: build/C/man3/tempnam.3:70
13862 #, no-wrap
13863 msgid "c)"
13864 msgstr "c)"
13865
13866 #. type: Plain text
13867 #: build/C/man3/tempnam.3:77
13868 msgid ""
13869 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13870 "appropriate."
13871 msgstr ""
13872 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13873 "なら、それを用いる。"
13874
13875 #. type: TP
13876 #: build/C/man3/tempnam.3:77
13877 #, no-wrap
13878 msgid "d)"
13879 msgstr "d)"
13880
13881 #. type: Plain text
13882 #: build/C/man3/tempnam.3:80
13883 msgid "Finally an implementation-defined directory may be used."
13884 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13885
13886 #. type: Plain text
13887 #: build/C/man3/tempnam.3:87
13888 msgid ""
13889 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13890 "hence should be freed by B<free>(3)."
13891 msgstr ""
13892 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13893 "B<free>(3)  で解放すべきである。"
13894
13895 #. type: Plain text
13896 #: build/C/man3/tempnam.3:94
13897 msgid ""
13898 "On success, the B<tempnam>()  function returns a pointer to a unique "
13899 "temporary filename.  It returns NULL if a unique name cannot be generated, "
13900 "with I<errno> set to indicate the cause of the error."
13901 msgstr ""
13902 "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返"
13903 "す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す"
13904 "値を設定する。"
13905
13906 #. type: Plain text
13907 #: build/C/man3/tempnam.3:98
13908 msgid "Allocation of storage failed."
13909 msgstr "保存領域の割り当てに失敗した。"
13910
13911 #. type: Plain text
13912 #: build/C/man3/tempnam.3:103
13913 msgid ""
13914 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13915 msgstr ""
13916 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13917 "る。"
13918
13919 #. type: Plain text
13920 #: build/C/man3/tempnam.3:122
13921 msgid ""
13922 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13923 "nevertheless possible that between the time that B<tempnam>()  returns a "
13924 "pathname, and the time that the program opens it, another program might "
13925 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13926 "This can lead to security holes.  To avoid such possibilities, use the "
13927 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13928 "B<mkstemp>(3)  or B<tmpfile>(3)."
13929 msgstr ""
13930 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13931 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13932 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13933 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13934 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13935 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13936 "B<tmpfile>(3)  を使うことである。"
13937
13938 #. type: Plain text
13939 #: build/C/man3/tempnam.3:130
13940 msgid ""
13941 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13942 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13943 "tmp> (and this is what glibc does)."
13944 msgstr ""
13945 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13946 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13947 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13948
13949 #. type: Plain text
13950 #: build/C/man3/tempnam.3:135
13951 msgid ""
13952 "Because it dynamically allocates memory used to return the pathname, "
13953 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13954 msgstr ""
13955 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13956 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13957
13958 #. type: Plain text
13959 #: build/C/man3/tempnam.3:148
13960 msgid ""
13961 "The B<tempnam>()  function generates a different string each time it is "
13962 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13963 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13964 msgstr ""
13965 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13966 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13967 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13968
13969 #. type: Plain text
13970 #: build/C/man3/tempnam.3:152
13971 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13972 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13973
13974 #. type: Plain text
13975 #: build/C/man3/tempnam.3:158
13976 msgid ""
13977 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13978 "upon failure to find a unique name."
13979 msgstr ""
13980 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13981 "ラー B<EEXIST> で失敗する。"
13982
13983 #. type: Plain text
13984 #: build/C/man3/tempnam.3:161
13985 msgid ""
13986 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13987 "accessibility of a directory is determined."
13988 msgstr ""
13989 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13990 "度のアクセス権限が必要なのかは指定されていない。"
13991
13992 #. type: Plain text
13993 #: build/C/man3/tempnam.3:168 build/C/man3/tmpnam.3:163
13994 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
13995 msgstr ""
13996 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
13997 "を使うこと。"
13998
13999 #. type: Plain text
14000 #: build/C/man3/tempnam.3:173
14001 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
14002 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
14003
14004 #. type: TH
14005 #: build/C/man3/tmpfile.3:31
14006 #, no-wrap
14007 msgid "TMPFILE"
14008 msgstr "TMPFILE"
14009
14010 #. type: Plain text
14011 #: build/C/man3/tmpfile.3:34
14012 msgid "tmpfile - create a temporary file"
14013 msgstr "tmpfile - テンポラリファイルを作成する"
14014
14015 #. type: Plain text
14016 #: build/C/man3/tmpfile.3:39
14017 #, no-wrap
14018 msgid "B<FILE *tmpfile(void);>\n"
14019 msgstr "B<FILE *tmpfile(void);>\n"
14020
14021 #. type: Plain text
14022 #: build/C/man3/tmpfile.3:47
14023 msgid ""
14024 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
14025 "write (w+b) mode.  The file will be automatically deleted when it is closed "
14026 "or the program terminates."
14027 msgstr ""
14028 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
14029 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
14030 "自動的に削除される。"
14031
14032 #. type: Plain text
14033 #: build/C/man3/tmpfile.3:56
14034 msgid ""
14035 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
14036 "filename cannot be generated or the unique file cannot be opened.  In the "
14037 "latter case, I<errno> is set to indicate the error."
14038 msgstr ""
14039 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
14040 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
14041 "I<errno> を設定する。"
14042
14043 #. type: Plain text
14044 #: build/C/man3/tmpfile.3:60
14045 msgid "Search permission denied for directory in file's path prefix."
14046 msgstr ""
14047 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
14048
14049 #. type: Plain text
14050 #: build/C/man3/tmpfile.3:63
14051 msgid "Unable to generate a unique filename."
14052 msgstr "ユニークなファイル名が作成できなかった。"
14053
14054 #. type: Plain text
14055 #: build/C/man3/tmpfile.3:66
14056 msgid "The call was interrupted by a signal."
14057 msgstr "呼び出しがシグナルによって中断された。"
14058
14059 #. type: Plain text
14060 #: build/C/man3/tmpfile.3:69
14061 msgid "Too many file descriptors in use by the process."
14062 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
14063
14064 #. type: Plain text
14065 #: build/C/man3/tmpfile.3:72
14066 msgid "Too many files open in the system."
14067 msgstr "システム全体でオープン可能なファイル数を超過した。"
14068
14069 #. type: Plain text
14070 #: build/C/man3/tmpfile.3:75
14071 msgid "There was no room in the directory to add the new filename."
14072 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
14073
14074 #. type: Plain text
14075 #: build/C/man3/tmpfile.3:78
14076 msgid "Read-only filesystem."
14077 msgstr "読みだし専用ファイルシステムである。"
14078
14079 #. type: Plain text
14080 #: build/C/man3/tmpfile.3:80
14081 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14082 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
14083
14084 #. type: Plain text
14085 #: build/C/man3/tmpfile.3:86
14086 msgid ""
14087 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
14088 "stream cannot be opened."
14089 msgstr ""
14090 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
14091 "メッセージが書き出される、と規定されている。"
14092
14093 #. type: Plain text
14094 #: build/C/man3/tmpfile.3:97
14095 msgid ""
14096 "The standard does not specify the directory that B<tmpfile>()  will use.  "
14097 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
14098 "and if that fails the directory I</tmp>."
14099 msgstr ""
14100 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
14101 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
14102 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
14103
14104 #. type: Plain text
14105 #: build/C/man3/tmpfile.3:103
14106 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14107 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
14108
14109 #. type: TH
14110 #: build/C/man3/tmpnam.3:27
14111 #, no-wrap
14112 msgid "TMPNAM"
14113 msgstr "TMPNAM"
14114
14115 #. type: Plain text
14116 #: build/C/man3/tmpnam.3:30
14117 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
14118 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
14119
14120 #. type: Plain text
14121 #: build/C/man3/tmpnam.3:35
14122 #, no-wrap
14123 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
14124 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
14125
14126 #. type: Plain text
14127 #: build/C/man3/tmpnam.3:58
14128 msgid ""
14129 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
14130 "filename, and such that a file with this name did not exist at some point in "
14131 "time, so that naive programmers may think it a suitable name for a temporary "
14132 "file.  If the argument I<s> is NULL this name is generated in an internal "
14133 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
14134 "I<s> is not NULL, the name is copied to the character array (of length at "
14135 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
14136 "case of success."
14137 msgstr ""
14138 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
14139 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
14140 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
14141 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
14142 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
14143 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
14144 "ピーされ、 成功した場合は I<s> が返される。"
14145
14146 #. type: Plain text
14147 #: build/C/man3/tmpnam.3:70
14148 msgid ""
14149 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
14150 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
14151 "the B<TMP_MAX> mentioned below.)"
14152 msgstr ""
14153 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
14154 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
14155 "hE<gt>> で定義されている。)"
14156
14157 #. type: Plain text
14158 #: build/C/man3/tmpnam.3:75
14159 msgid ""
14160 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
14161 "or NULL if a unique name cannot be generated."
14162 msgstr ""
14163 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
14164 "が作成できなかった場合は NULL を返す。"
14165
14166 #. type: Plain text
14167 #: build/C/man3/tmpnam.3:77
14168 msgid "No errors are defined."
14169 msgstr "エラーは定義されていない。"
14170
14171 #. type: Plain text
14172 #: build/C/man3/tmpnam.3:83
14173 msgid ""
14174 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-"
14175 "safe if called with a NULL parameter."
14176 msgstr ""
14177 "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出さ"
14178 "れた場合はスレッドセーフではない。"
14179
14180 #. type: Plain text
14181 #: build/C/man3/tmpnam.3:87
14182 msgid "The B<tmpnam_r>()  function is thread-safe."
14183 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
14184
14185 #. type: Plain text
14186 #: build/C/man3/tmpnam.3:92
14187 msgid ""
14188 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
14189 "obsolete."
14190 msgstr ""
14191 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
14192 "定としている。"
14193
14194 #. type: Plain text
14195 #: build/C/man3/tmpnam.3:103
14196 msgid ""
14197 "The B<tmpnam>()  function generates a different string each time it is "
14198 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
14199 "the behavior is implementation defined."
14200 msgstr ""
14201 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
14202 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
14203
14204 #. type: Plain text
14205 #: build/C/man3/tmpnam.3:122
14206 msgid ""
14207 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
14208 "nevertheless possible that between the time that B<tmpnam>()  returns a "
14209 "pathname, and the time that the program opens it, another program might "
14210 "create that pathname using B<open>(2), or create it as a symbolic link.  "
14211 "This can lead to security holes.  To avoid such possibilities, use the "
14212 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
14213 "B<mkstemp>(3)  or B<tmpfile>(3)."
14214 msgstr ""
14215 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
14216 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
14217 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
14218 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
14219 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
14220 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
14221 "B<tmpfile>(3)  を使うことである。"
14222
14223 #. type: Plain text
14224 #: build/C/man3/tmpnam.3:130
14225 msgid ""
14226 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
14227 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
14228 "defined."
14229 msgstr ""
14230 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
14231 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
14232 "NULL 引き数で呼び出してはならない。"
14233
14234 #. type: Plain text
14235 #: build/C/man3/tmpnam.3:134
14236 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
14237 msgstr ""
14238 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
14239 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
14240 "扱いしている。"
14241
14242 #. type: Plain text
14243 #: build/C/man3/tmpnam.3:142
14244 #, no-wrap
14245 msgid ""
14246 "char *\n"
14247 "tmpnam_r(char *s)\n"
14248 "{\n"
14249 "    return s ? tmpnam(s) : NULL;\n"
14250 "}\n"
14251 msgstr ""
14252 "char *\n"
14253 "tmpnam_r(char *s)\n"
14254 "{\n"
14255 "    return s ? tmpnam(s) : NULL;\n"
14256 "}\n"
14257
14258 #. type: Plain text
14259 #: build/C/man3/tmpnam.3:156
14260 msgid ""
14261 "apparently as a warning not to use NULL.  A few systems implement it.  To "
14262 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
14263 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
14264 msgstr ""
14265 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
14266 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
14267 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
14268 "がある。"
14269
14270 #. type: Plain text
14271 #: build/C/man3/tmpnam.3:168
14272 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14273 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
14274
14275 #. type: TH
14276 #: build/C/man2/unlink.2:32
14277 #, no-wrap
14278 msgid "UNLINK"
14279 msgstr "UNLINK"
14280
14281 #. type: TH
14282 #: build/C/man2/unlink.2:32
14283 #, no-wrap
14284 msgid "2011-09-15"
14285 msgstr "2011-09-15"
14286
14287 #. type: Plain text
14288 #: build/C/man2/unlink.2:35
14289 msgid "unlink - delete a name and possibly the file it refers to"
14290 msgstr ""
14291 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
14292
14293 #. type: Plain text
14294 #: build/C/man2/unlink.2:39
14295 msgid "B<int unlink(const char *>I<pathname>B<);>"
14296 msgstr "B<int unlink(const char *>I<pathname>B<);>"
14297
14298 #. type: Plain text
14299 #: build/C/man2/unlink.2:45
14300 msgid ""
14301 "B<unlink>()  deletes a name from the filesystem.  If that name was the last "
14302 "link to a file and no processes have the file open the file is deleted and "
14303 "the space it was using is made available for reuse."
14304 msgstr ""
14305 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
14306 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
14307 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
14308 "は再利用が可能になる。"
14309
14310 #. type: Plain text
14311 #: build/C/man2/unlink.2:49
14312 msgid ""
14313 "If the name was the last link to a file but any processes still have the "
14314 "file open the file will remain in existence until the last file descriptor "
14315 "referring to it is closed."
14316 msgstr ""
14317 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
14318 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
14319 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
14320 "ける。"
14321
14322 #. type: Plain text
14323 #: build/C/man2/unlink.2:51
14324 msgid "If the name referred to a symbolic link the link is removed."
14325 msgstr ""
14326 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
14327 "削除される。"
14328
14329 #. type: Plain text
14330 #: build/C/man2/unlink.2:55
14331 msgid ""
14332 "If the name referred to a socket, fifo or device the name for it is removed "
14333 "but processes which have the object open may continue to use it."
14334 msgstr ""
14335 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
14336 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
14337 "とができる。"
14338
14339 #. type: Plain text
14340 #: build/C/man2/unlink.2:71
14341 msgid ""
14342 "Write access to the directory containing I<pathname> is not allowed for the "
14343 "process's effective UID, or one of the directories in I<pathname> did not "
14344 "allow search permission.  (See also B<path_resolution>(7).)"
14345 msgstr ""
14346 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
14347 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
14348 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
14349 "と)。"
14350
14351 #. type: Plain text
14352 #: build/C/man2/unlink.2:80
14353 msgid ""
14354 "The file I<pathname> cannot be unlinked because it is being used by the "
14355 "system or another process; for example, it is a mount point or the NFS "
14356 "client software created it to represent an active but otherwise nameless "
14357 "inode (\"NFS silly renamed\")."
14358 msgstr ""
14359 "システムか別のプロセスがそのファイルを使用中のため、\n"
14360 "ファイル I<pathname> を unlink できない。\n"
14361 "例えば、そのファイルがマウントポイントの場合や、\n"
14362 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
14363 "名前なし inode (nameless inode) であることを示すために作成した\n"
14364 "場合 (\"NFS silly renamed\") などがある。"
14365
14366 #. type: Plain text
14367 #: build/C/man2/unlink.2:92
14368 msgid ""
14369 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
14370 "Linux since 2.1.132.)"
14371 msgstr ""
14372 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
14373 "で、Linux 2.1.132 以降で返される。)"
14374
14375 #. type: Plain text
14376 #: build/C/man2/unlink.2:96
14377 msgid "Too many symbolic links were encountered in translating I<pathname>."
14378 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
14379
14380 #. type: Plain text
14381 #: build/C/man2/unlink.2:106
14382 msgid ""
14383 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14384 "I<pathname> is empty."
14385 msgstr ""
14386 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
14387 "I<pathname> が空である。"
14388
14389 #. type: Plain text
14390 #: build/C/man2/unlink.2:114
14391 msgid ""
14392 "A component used as a directory in I<pathname> is not, in fact, a directory."
14393 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14394
14395 #. type: Plain text
14396 #: build/C/man2/unlink.2:123
14397 msgid ""
14398 "The system does not allow unlinking of directories, or unlinking of "
14399 "directories requires privileges that the calling process doesn't have.  "
14400 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14401 "B<EISDIR> for this case.)"
14402 msgstr ""
14403 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14404 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14405 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14406 "合には Linux は B<EISDIR> を返す。)"
14407
14408 #. type: TP
14409 #: build/C/man2/unlink.2:123
14410 #, no-wrap
14411 msgid "B<EPERM> (Linux only)"
14412 msgstr "B<EPERM> (Linux のみ)"
14413
14414 #. type: Plain text
14415 #: build/C/man2/unlink.2:126
14416 msgid "The filesystem does not allow unlinking of files."
14417 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14418
14419 #. type: Plain text
14420 #: build/C/man2/unlink.2:137
14421 msgid ""
14422 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14423 "and the process's effective UID is neither the UID of the file to be deleted "
14424 "nor that of the directory containing it, and the process is not privileged "
14425 "(Linux: does not have the B<CAP_FOWNER> capability)."
14426 msgstr ""
14427 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14428 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14429 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14430 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14431
14432 #. type: Plain text
14433 #: build/C/man2/unlink.2:141
14434 msgid "I<pathname> refers to a file on a read-only filesystem."
14435 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14436
14437 #. type: Plain text
14438 #: build/C/man2/unlink.2:161
14439 msgid ""
14440 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14441 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14442 "(7), B<symlink>(7)"
14443 msgstr ""
14444 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14445 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14446 "(7), B<symlink>(7)"
14447
14448 #. type: TH
14449 #: build/C/man3/unlocked_stdio.3:25
14450 #, no-wrap
14451 msgid "UNLOCKED_STDIO"
14452 msgstr "UNLOCKED_STDIO"
14453
14454 #. type: TH
14455 #: build/C/man3/unlocked_stdio.3:25
14456 #, no-wrap
14457 msgid "2008-08-29"
14458 msgstr "2008-08-29"
14459
14460 #. type: Plain text
14461 #: build/C/man3/unlocked_stdio.3:29
14462 msgid ""
14463 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14464 "nonlocking stdio functions"
14465 msgstr ""
14466 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14467 "わずに標準入出力を行う関数群"
14468
14469 #. type: Plain text
14470 #: build/C/man3/unlocked_stdio.3:37
14471 #, no-wrap
14472 msgid ""
14473 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14474 "B<int getchar_unlocked(void);>\n"
14475 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14476 "B<int putchar_unlocked(int >I<c>B<);>\n"
14477 msgstr ""
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
14483 #. type: Plain text
14484 #: build/C/man3/unlocked_stdio.3:49
14485 #, no-wrap
14486 msgid ""
14487 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14488 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14489 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14490 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14491 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14492 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14493 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14494 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14495 "B<                      FILE *>I<stream>B<);>\n"
14496 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14497 "B<                      FILE *>I<stream>B<);>\n"
14498 msgstr ""
14499 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14500 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14501 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14502 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14503 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14504 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14505 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14506 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14507 "B<                      FILE *>I<stream>B<);>\n"
14508 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14509 "B<                      FILE *>I<stream>B<);>\n"
14510
14511 #. type: Plain text
14512 #: build/C/man3/unlocked_stdio.3:52
14513 #, no-wrap
14514 msgid ""
14515 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14516 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14517 msgstr ""
14518 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14519 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14520
14521 #. type: Plain text
14522 #: build/C/man3/unlocked_stdio.3:63
14523 #, no-wrap
14524 msgid ""
14525 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14526 "B<wint_t getwchar_unlocked(void);>\n"
14527 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14528 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14529 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14530 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14531 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14532 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14533 msgstr ""
14534 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14535 "B<wint_t getwchar_unlocked(void);>\n"
14536 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14537 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14538 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14539 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14540 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14541 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14542
14543 #. type: Plain text
14544 #: build/C/man3/unlocked_stdio.3:75
14545 msgid ""
14546 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14547 "B<putchar_unlocked>():"
14548 msgstr ""
14549 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14550 "B<putchar_unlocked>():"
14551
14552 #. type: Plain text
14553 #: build/C/man3/unlocked_stdio.3:78
14554 msgid ""
14555 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14556 "_BSD_SOURCE || _SVID_SOURCE"
14557 msgstr ""
14558 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14559 "_BSD_SOURCE || _SVID_SOURCE"
14560
14561 #. type: Plain text
14562 #: build/C/man3/unlocked_stdio.3:89
14563 msgid ""
14564 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14565 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14566 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14567 msgstr ""
14568 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14569 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14570 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14571
14572 #. type: Plain text
14573 #: build/C/man3/unlocked_stdio.3:91
14574 msgid "_BSD_SOURCE || _SVID_SOURCE"
14575 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14576
14577 #. type: Plain text
14578 #: build/C/man3/unlocked_stdio.3:102
14579 msgid ""
14580 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14581 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14582 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14583 msgstr ""
14584 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14585 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14586 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14587
14588 #. type: Plain text
14589 #: build/C/man3/unlocked_stdio.3:113
14590 msgid ""
14591 "Each of these functions has the same behavior as its counterpart without the "
14592 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14593 "locks themselves, and do not test for the presence of locks set by others) "
14594 "and hence are thread-unsafe.  See B<flockfile>(3)."
14595 msgstr ""
14596 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14597 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14598 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14599 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14600 "B<flockfile>(3)  を参照のこと。"
14601
14602 #. type: Plain text
14603 #: build/C/man3/unlocked_stdio.3:120
14604 msgid ""
14605 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14606 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14607 msgstr ""
14608 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14609 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14610
14611 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14612 #.  moved to a compatibility library.
14613 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14614 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14615 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14616 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14617 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14618 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14619 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14620 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14621 #.  ungetc_unlocked, ungetwc_unlocked.
14622 #. type: Plain text
14623 #: build/C/man3/unlocked_stdio.3:136
14624 msgid ""
14625 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14626 "are available in recent glibc.  They should probably not be used."
14627 msgstr ""
14628 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14629 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14630
14631 #. type: Plain text
14632 #: build/C/man3/unlocked_stdio.3:139
14633 msgid "B<flockfile>(3), B<stdio>(3)"
14634 msgstr "B<flockfile>(3), B<stdio>(3)"
14635
14636 #. type: TH
14637 #: build/C/man3/wprintf.3:16
14638 #, no-wrap
14639 msgid "WPRINTF"
14640 msgstr "WPRINTF"
14641
14642 #. type: TH
14643 #: build/C/man3/wprintf.3:16
14644 #, no-wrap
14645 msgid "2011-09-17"
14646 msgstr "2011-09-17"
14647
14648 #. type: Plain text
14649 #: build/C/man3/wprintf.3:20
14650 msgid ""
14651 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14652 "character output conversion"
14653 msgstr ""
14654 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14655 "フォーマットして出力する"
14656
14657 #. type: Plain text
14658 #: build/C/man3/wprintf.3:24
14659 #, no-wrap
14660 msgid ""
14661 "B<#include E<lt>stdio.hE<gt>>\n"
14662 "B<#include E<lt>wchar.hE<gt>>\n"
14663 msgstr ""
14664 "B<#include E<lt>stdio.hE<gt>>\n"
14665 "B<#include E<lt>wchar.hE<gt>>\n"
14666
14667 #. type: Plain text
14668 #: build/C/man3/wprintf.3:29
14669 #, no-wrap
14670 msgid ""
14671 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14672 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14673 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14674 "B<             const wchar_t *>I<format>B<, ...);>\n"
14675 msgstr ""
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
14681 #. type: Plain text
14682 #: build/C/man3/wprintf.3:34
14683 #, no-wrap
14684 msgid ""
14685 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14686 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14687 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14688 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14689 msgstr ""
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
14695 #.  .BR wprintf (),
14696 #.  .BR fwprintf (),
14697 #.  .BR swprintf (),
14698 #.  .BR vwprintf (),
14699 #.  .BR vfwprintf (),
14700 #.  .BR vswprintf ():
14701 #. type: Plain text
14702 #: build/C/man3/wprintf.3:51
14703 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14704 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14705
14706 #. type: Plain text
14707 #: build/C/man3/wprintf.3:53
14708 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14709 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14710
14711 #. type: Plain text
14712 #: build/C/man3/wprintf.3:55
14713 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14714 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14715
14716 #. type: Plain text
14717 #: build/C/man3/wprintf.3:58
14718 msgid "or I<cc\\ -std=c99>"
14719 msgstr "or I<cc\\ -std=c99>"
14720
14721 #. type: Plain text
14722 #: build/C/man3/wprintf.3:69
14723 msgid ""
14724 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14725 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14726 "characters."
14727 msgstr ""
14728 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14729 "版である。これらはワイド文字をフォーマットして出力する。"
14730
14731 #. type: Plain text
14732 #: build/C/man3/wprintf.3:81
14733 msgid ""
14734 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14735 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14736 "more information."
14737 msgstr ""
14738 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14739 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14740 "ること。"
14741
14742 #. type: Plain text
14743 #: build/C/man3/wprintf.3:93
14744 msgid ""
14745 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14746 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14747 "for more information."
14748 msgstr ""
14749 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14750 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14751 "B<fwide>(3)  を参照すること。"
14752
14753 #. type: Plain text
14754 #: build/C/man3/wprintf.3:107
14755 msgid ""
14756 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14757 "output to an array of wide characters.  The programmer must ensure that "
14758 "there is room for at least I<maxlen> wide characters at I<wcs>."
14759 msgstr ""
14760 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14761 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14762 "空きがあることを保証しなければ ならない。"
14763
14764 #. type: Plain text
14765 #: build/C/man3/wprintf.3:118
14766 msgid ""
14767 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14768 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14769 "following differences:"
14770 msgstr ""
14771 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14772 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14773
14774 #. type: TP
14775 #: build/C/man3/wprintf.3:118 build/C/man3/wprintf.3:123
14776 #: build/C/man3/wprintf.3:126
14777 #, no-wrap
14778 msgid "B<\\(bu>"
14779 msgstr "B<\\(bu>"
14780
14781 #. type: Plain text
14782 #: build/C/man3/wprintf.3:123
14783 msgid "The I<format> string is a wide-character string."
14784 msgstr "I<format> がワイド文字列で与えられる。"
14785
14786 #. type: Plain text
14787 #: build/C/man3/wprintf.3:126
14788 msgid "The output consists of wide characters, not bytes."
14789 msgstr "出力がバイトではなくワイド文字で構成される。"
14790
14791 #. type: Plain text
14792 #: build/C/man3/wprintf.3:145
14793 msgid ""
14794 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14795 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14796 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14797 "overflow on Linux.)"
14798 msgstr ""
14799 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14800 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14801 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14802 "も -1 を返さない)。"
14803
14804 #. type: Plain text
14805 #: build/C/man3/wprintf.3:151
14806 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14807 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14808
14809 #. type: Plain text
14810 #: build/C/man3/wprintf.3:165
14811 msgid ""
14812 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14813 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14814 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14815 "character) argument is written."
14816 msgstr ""
14817 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14818 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14819 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14820
14821 #. type: Plain text
14822 #: build/C/man3/wprintf.3:205
14823 msgid ""
14824 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14825 "to be a pointer to an array of character type (pointer to a string) "
14826 "containing a multibyte character sequence beginning in the initial shift "
14827 "state.  Characters from the array are converted to wide characters (each by "
14828 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14829 "the initial state before the first byte).  The resulting wide characters are "
14830 "written up to (but not including) the terminating null wide character (L\\(aq"
14831 "\\e0\\(aq).  If a precision is specified, no more wide characters than the "
14832 "number specified are written.  Note that the precision determines the number "
14833 "of I<wide characters> written, not the number of I<bytes> or I<screen "
14834 "positions>.  The array must contain a terminating null byte (\\(aq"
14835 "\\e0\\(aq), unless a precision is given and it is so small that the number "
14836 "of converted wide characters reaches it before the end of the array is "
14837 "reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
14838 "argument is expected to be a pointer to an array of wide characters.  Wide "
14839 "characters from the array are written up to (but not including) a "
14840 "terminating null wide character.  If a precision is specified, no more than "
14841 "the number specified are written.  The array must contain a terminating null "
14842 "wide character, unless a precision is given and it is smaller than or equal "
14843 "to the number of wide characters in the array."
14844 msgstr ""
14845 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14846 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14847 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14848 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14849 "字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度"
14850 "(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれな"
14851 "い。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字"
14852 "> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイ"
14853 "ト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到"
14854 "着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数"
14855 "でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> "
14856 "引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端の"
14857 "ナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精"
14858 "度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含"
14859 "む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さ"
14860 "くな ければならない。"
14861
14862 #. type: Plain text
14863 #: build/C/man3/wprintf.3:213
14864 msgid ""
14865 "The functions return the number of wide characters written, excluding the "
14866 "terminating null wide character in case of the functions B<swprintf>()  and "
14867 "B<vswprintf>().  They return -1 when an error occurs."
14868 msgstr ""
14869 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14870 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14871 "場合は -1 を返す。"
14872
14873 #. type: Plain text
14874 #: build/C/man3/wprintf.3:215
14875 msgid "C99."
14876 msgstr "C99."
14877
14878 #. type: Plain text
14879 #: build/C/man3/wprintf.3:223
14880 msgid ""
14881 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14882 "the current locale."
14883 msgstr ""
14884 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14885
14886 #. type: Plain text
14887 #: build/C/man3/wprintf.3:253
14888 msgid ""
14889 "If the I<format> string contains non-ASCII wide characters, the program will "
14890 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
14891 "time is the same as the B<LC_CTYPE> category of the current locale at "
14892 "compile time.  This is because the I<wchar_t> representation is platform- "
14893 "and locale-dependent.  (The glibc represents wide characters using their "
14894 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14895 "the use of C99 universal character names of the form \\eunnnn does not solve "
14896 "this problem.)  Therefore, in internationalized programs, the I<format> "
14897 "string should consist of ASCII wide characters only, or should be "
14898 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14899 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14900 msgstr ""
14901 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14902 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14903 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14904 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14905 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14906 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14907 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14908 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14909 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14910
14911 #.  .BR wscanf (3)
14912 #. type: Plain text
14913 #: build/C/man3/wprintf.3:260
14914 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14915 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14916
14917 #. type: TH
14918 #: build/C/man2/write.2:39
14919 #, no-wrap
14920 msgid "WRITE"
14921 msgstr "WRITE"
14922
14923 #. type: Plain text
14924 #: build/C/man2/write.2:42
14925 msgid "write - write to a file descriptor"
14926 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14927
14928 #. type: Plain text
14929 #: build/C/man2/write.2:46
14930 msgid ""
14931 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14932 msgstr ""
14933 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14934
14935 #. type: Plain text
14936 #: build/C/man2/write.2:54
14937 msgid ""
14938 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14939 "the file referred to by the file descriptor I<fd>."
14940 msgstr ""
14941 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14942 "照するファイルへ、最大 I<count> バイトを書き込む。"
14943
14944 #. type: Plain text
14945 #: build/C/man2/write.2:68
14946 msgid ""
14947 "The number of bytes written may be less than I<count> if, for example, there "
14948 "is insufficient space on the underlying physical medium, or the "
14949 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14950 "call was interrupted by a signal handler after having written less than "
14951 "I<count> bytes.  (See also B<pipe>(7).)"
14952 msgstr ""
14953 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14954 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14955 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14956 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14957 "(7)  も参照のこと。)"
14958
14959 #. type: Plain text
14960 #: build/C/man2/write.2:82
14961 msgid ""
14962 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14963 "example, a regular file)  writing takes place at the current file offset, "
14964 "and the file offset is incremented by the number of bytes actually written.  "
14965 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14966 "to the end of the file before writing.  The adjustment of the file offset "
14967 "and the write operation are performed as an atomic step."
14968 msgstr ""
14969 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14970 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14971 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14972 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14973 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14974 "処理として 実行される。"
14975
14976 #. type: Plain text
14977 #: build/C/man2/write.2:89
14978 msgid ""
14979 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14980 "B<write>()  has returned returns the new data.  Note that not all "
14981 "filesystems are POSIX conforming."
14982 msgstr ""
14983 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14984 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14985 "ること。"
14986
14987 #. type: Plain text
14988 #: build/C/man2/write.2:94
14989 msgid ""
14990 "On success, the number of bytes written is returned (zero indicates nothing "
14991 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14992 msgstr ""
14993 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14994 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
14995
14996 #. type: Plain text
14997 #: build/C/man2/write.2:107
14998 msgid ""
14999 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
15000 "return a failure status if one of the errors below is detected.  If no "
15001 "errors are detected, 0 will be returned without causing any other effect.  "
15002 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
15003 "the results are not specified."
15004 msgstr ""
15005 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
15006 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
15007 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
15008 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
15009 "その結果は規定されていない。"
15010
15011 #. type: Plain text
15012 #: build/C/man2/write.2:115
15013 msgid ""
15014 "The file descriptor I<fd> refers to a file other than a socket and has been "
15015 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
15016 msgstr ""
15017 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
15018 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
15019 "する状況にある。"
15020
15021 #.  Actually EAGAIN on Linux
15022 #. type: Plain text
15023 #: build/C/man2/write.2:126
15024 msgid ""
15025 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
15026 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
15027 "error to be returned for this case, and does not require these constants to "
15028 "have the same value, so a portable application should check for both "
15029 "possibilities."
15030 msgstr ""
15031 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
15032 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
15033 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
15034 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
15035 "プリケーションでは、両方の可能性を 確認すべきである。"
15036
15037 #. type: Plain text
15038 #: build/C/man2/write.2:130
15039 msgid "I<fd> is not a valid file descriptor or is not open for writing."
15040 msgstr ""
15041 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
15042 "されていない。"
15043
15044 #. type: TP
15045 #: build/C/man2/write.2:130
15046 #, no-wrap
15047 msgid "B<EDESTADDRREQ>"
15048 msgstr "B<EDESTADDRREQ>"
15049
15050 #. type: Plain text
15051 #: build/C/man2/write.2:135
15052 msgid ""
15053 "I<fd> refers to a datagram socket for which a peer address has not been set "
15054 "using B<connect>(2)."
15055 msgstr ""
15056 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
15057 "グラムソケットを 参照している。"
15058
15059 #. type: Plain text
15060 #: build/C/man2/write.2:141
15061 msgid ""
15062 "The user's quota of disk blocks on the filesystem containing the file "
15063 "referred to by I<fd> has been exhausted."
15064 msgstr ""
15065 "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザ"
15066 "クォータの上限に達している。"
15067
15068 #. type: Plain text
15069 #: build/C/man2/write.2:150
15070 msgid ""
15071 "An attempt was made to write a file that exceeds the implementation-defined "
15072 "maximum file size or the process's file size limit, or to write at a "
15073 "position past the maximum allowed offset."
15074 msgstr ""
15075 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
15076 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
15077 "書き込もうとした。"
15078
15079 #. type: Plain text
15080 #: build/C/man2/write.2:154
15081 msgid ""
15082 "The call was interrupted by a signal before any data was written; see "
15083 "B<signal>(7)."
15084 msgstr ""
15085 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
15086 "(7)  参照。"
15087
15088 #. type: Plain text
15089 #: build/C/man2/write.2:165
15090 msgid ""
15091 "I<fd> is attached to an object which is unsuitable for writing; or the file "
15092 "was opened with the B<O_DIRECT> flag, and either the address specified in "
15093 "I<buf>, the value specified in I<count>, or the current file offset is not "
15094 "suitably aligned."
15095 msgstr ""
15096 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
15097 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
15098 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
15099 "メントが不適切である。"
15100
15101 #. type: Plain text
15102 #: build/C/man2/write.2:168
15103 msgid "A low-level I/O error occurred while modifying the inode."
15104 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
15105
15106 #. type: Plain text
15107 #: build/C/man2/write.2:173
15108 msgid ""
15109 "The device containing the file referred to by I<fd> has no room for the data."
15110 msgstr ""
15111 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
15112
15113 #. type: TP
15114 #: build/C/man2/write.2:173
15115 #, no-wrap
15116 msgid "B<EPIPE>"
15117 msgstr "B<EPIPE>"
15118
15119 #. type: Plain text
15120 #: build/C/man2/write.2:182
15121 msgid ""
15122 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
15123 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
15124 "(Thus, the write return value is seen only if the program catches, blocks or "
15125 "ignores this signal.)"
15126 msgstr ""
15127 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
15128 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
15129 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
15130 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
15131 "write の返り値を参照できる。)"
15132
15133 #. type: Plain text
15134 #: build/C/man2/write.2:185
15135 msgid "Other errors may occur, depending on the object connected to I<fd>."
15136 msgstr ""
15137 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
15138
15139 #. type: Plain text
15140 #: build/C/man2/write.2:194
15141 msgid ""
15142 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
15143 "just before any data is written."
15144 msgstr ""
15145 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
15146 "で B<EINTR> が返る。"
15147
15148 #. type: Plain text
15149 #: build/C/man2/write.2:203
15150 msgid ""
15151 "A successful return from B<write>()  does not make any guarantee that data "
15152 "has been committed to disk.  In fact, on some buggy implementations, it does "
15153 "not even guarantee that space has successfully been reserved for the data.  "
15154 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
15155 "all your data."
15156 msgstr ""
15157 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
15158 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
15159 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
15160 "write した後に B<fsync>(2)  を呼び出すことである。"
15161
15162 #. type: Plain text
15163 #: build/C/man2/write.2:211
15164 msgid ""
15165 "If a B<write>()  is interrupted by a signal handler before any bytes are "
15166 "written, then the call fails with the error B<EINTR>; if it is interrupted "
15167 "after at least one byte has been written, the call succeeds, and returns the "
15168 "number of bytes written."
15169 msgstr ""
15170 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
15171 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
15172 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
15173
15174 #. type: Plain text
15175 #: build/C/man2/write.2:223
15176 msgid ""
15177 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15178 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15179 msgstr ""
15180 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
15181 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
15182
15183 #~ msgid "2004-12-11"
15184 #~ msgstr "2004-12-11"
15185
15186 #~ msgid "2013-07-21"
15187 #~ msgstr "2013-07-21"
15188
15189 #~ msgid "2013-03-05"
15190 #~ msgstr "2013-03-05"