OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[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: 2012-04-25 05:37+0900\n"
10 "PO-Revision-Date: 2012-04-30 19:11+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:25
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:25
26 #, no-wrap
27 msgid "2001-12-18"
28 msgstr "2001-12-18"
29
30 #. type: TH
31 #: build/C/man3/asprintf.3:25 build/C/man3/ctermid.3:24
32 #: build/C/man3/dprintf.3:25 build/C/man3/fclose.3:42
33 #: build/C/man3/fcloseall.3:24 build/C/man3/fflush.3:43
34 #: build/C/man3/fgetwc.3:16 build/C/man3/fmemopen.3:6 build/C/man3/fopen.3:42
35 #: build/C/man3/fputwc.3:14 build/C/man3/fread.3:43 build/C/man3/fseek.3:40
36 #: build/C/man3/getline.3:24 build/C/man3/gets.3:25 build/C/man3/getw.3:23
37 #: build/C/man3/popen.3:38 build/C/man3/printf.3:34 build/C/man3/puts.3:24
38 #: build/C/man3/remove.3:31 build/C/man3/scanf.3:50 build/C/man3/wprintf.3:14
39 #, no-wrap
40 msgid "GNU"
41 msgstr "GNU"
42
43 #. type: TH
44 #: build/C/man3/asprintf.3:25 build/C/man3/ctermid.3:24
45 #: build/C/man3/dprintf.3:25 build/C/man3/fclose.3:42
46 #: build/C/man3/fcloseall.3:24 build/C/man3/ferror.3:42
47 #: build/C/man3/fflush.3:43 build/C/man3/fgetwc.3:16
48 #: build/C/man3/flockfile.3:23 build/C/man3/fmemopen.3:6
49 #: build/C/man3/fmtmsg.3:9 build/C/man3/fopen.3:42
50 #: build/C/man3/fopencookie.3:24 build/C/man3/fpurge.3:23
51 #: build/C/man3/fputwc.3:14 build/C/man3/fread.3:43 build/C/man3/fseek.3:40
52 #: build/C/man3/fseeko.3:23 build/C/man3/getline.3:24 build/C/man3/gets.3:25
53 #: build/C/man3/getw.3:23 build/C/man2/link.2:31 build/C/man2/llseek.2:26
54 #: build/C/man2/lseek.2:45 build/C/man3/lseek64.3:23 build/C/man2/open.2:52
55 #: build/C/man3/perror.3:30 build/C/man2/pipe.2:36 build/C/man3/popen.3:38
56 #: build/C/man3/printf.3:34 build/C/man3/puts.3:24 build/C/man2/read.2:35
57 #: build/C/man2/readlink.2:41 build/C/man2/readv.2:30 build/C/man3/remove.3:31
58 #: build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:50
59 #: build/C/man3/setbuf.3:46 build/C/man3/stdin.3:9 build/C/man3/stdio.3:37
60 #: build/C/man3/stdio_ext.3:23 build/C/man2/symlink.2:32
61 #: build/C/man7/symlink.7:35 build/C/man3/tempnam.3:23
62 #: build/C/man3/tmpfile.3:29 build/C/man3/tmpnam.3:25 build/C/man2/unlink.2:32
63 #: build/C/man3/unlocked_stdio.3:23 build/C/man3/wprintf.3:14
64 #: build/C/man2/write.2:39
65 #, no-wrap
66 msgid "Linux Programmer's Manual"
67 msgstr "Linux Programmer's Manual"
68
69 #. type: SH
70 #: build/C/man3/asprintf.3:26 build/C/man3/ctermid.3:25
71 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:43
72 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:43
73 #: build/C/man3/fflush.3:44 build/C/man3/fgetwc.3:17
74 #: build/C/man3/flockfile.3:24 build/C/man3/fmemopen.3:7
75 #: build/C/man3/fmtmsg.3:10 build/C/man3/fopen.3:43
76 #: build/C/man3/fopencookie.3:25 build/C/man3/fpurge.3:24
77 #: build/C/man3/fputwc.3:15 build/C/man3/fread.3:44 build/C/man3/fseek.3:41
78 #: build/C/man3/fseeko.3:24 build/C/man3/getline.3:25 build/C/man3/gets.3:26
79 #: build/C/man3/getw.3:24 build/C/man2/link.2:32 build/C/man2/llseek.2:27
80 #: build/C/man2/lseek.2:46 build/C/man3/lseek64.3:24 build/C/man2/open.2:53
81 #: build/C/man3/perror.3:31 build/C/man2/pipe.2:37 build/C/man3/popen.3:39
82 #: build/C/man3/printf.3:35 build/C/man3/puts.3:25 build/C/man2/read.2:36
83 #: build/C/man2/readlink.2:42 build/C/man2/readv.2:31 build/C/man3/remove.3:32
84 #: build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:51
85 #: build/C/man3/setbuf.3:47 build/C/man3/stdin.3:10 build/C/man3/stdio.3:38
86 #: build/C/man3/stdio_ext.3:24 build/C/man2/symlink.2:33
87 #: build/C/man7/symlink.7:36 build/C/man3/tempnam.3:24
88 #: build/C/man3/tmpfile.3:30 build/C/man3/tmpnam.3:26 build/C/man2/unlink.2:33
89 #: build/C/man3/unlocked_stdio.3:24 build/C/man3/wprintf.3:15
90 #: build/C/man2/write.2:40
91 #, no-wrap
92 msgid "NAME"
93 msgstr "名前"
94
95 #. type: Plain text
96 #: build/C/man3/asprintf.3:28
97 msgid "asprintf, vasprintf - print to allocated string"
98 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
99
100 #. type: SH
101 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
102 #: build/C/man3/dprintf.3:28 build/C/man3/fclose.3:45
103 #: build/C/man3/fcloseall.3:27 build/C/man3/ferror.3:45
104 #: build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19
105 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:9
106 #: build/C/man3/fmtmsg.3:12 build/C/man3/fopen.3:45
107 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
108 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
109 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28
110 #: build/C/man3/getw.3:26 build/C/man2/link.2:34 build/C/man2/llseek.2:29
111 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:55
112 #: build/C/man3/perror.3:33 build/C/man2/pipe.2:39 build/C/man3/popen.3:41
113 #: build/C/man3/printf.3:38 build/C/man3/puts.3:27 build/C/man2/read.2:38
114 #: build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:34
115 #: build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:53
116 #: build/C/man3/setbuf.3:49 build/C/man3/stdin.3:12 build/C/man3/stdio.3:40
117 #: build/C/man3/stdio_ext.3:28 build/C/man2/symlink.2:35
118 #: build/C/man3/tempnam.3:26 build/C/man3/tmpfile.3:32
119 #: build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:35
120 #: build/C/man3/unlocked_stdio.3:27 build/C/man3/wprintf.3:18
121 #: build/C/man2/write.2:42
122 #, no-wrap
123 msgid "SYNOPSIS"
124 msgstr "書式"
125
126 #. type: Plain text
127 #: build/C/man3/asprintf.3:30
128 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
129 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
130
131 #. type: Plain text
132 #: build/C/man3/asprintf.3:32 build/C/man3/dprintf.3:30
133 #: build/C/man3/fclose.3:47 build/C/man3/ferror.3:47 build/C/man3/fflush.3:48
134 #: build/C/man3/fseek.3:45 build/C/man3/perror.3:35 build/C/man3/printf.3:40
135 #: build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:42
136 #: build/C/man3/stdio_ext.3:30
137 msgid "B<#include E<lt>stdio.hE<gt>>"
138 msgstr "B<#include E<lt>stdio.hE<gt>>"
139
140 #. type: Plain text
141 #: build/C/man3/asprintf.3:34
142 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
143 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
144
145 #. type: Plain text
146 #: build/C/man3/asprintf.3:36
147 msgid ""
148 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
149 msgstr ""
150 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
151
152 #. type: SH
153 #: build/C/man3/asprintf.3:36 build/C/man3/ctermid.3:44
154 #: build/C/man3/dprintf.3:54 build/C/man3/fclose.3:49
155 #: build/C/man3/fcloseall.3:34 build/C/man3/ferror.3:63
156 #: build/C/man3/fflush.3:50 build/C/man3/fgetwc.3:28
157 #: build/C/man3/flockfile.3:49 build/C/man3/fmemopen.3:42
158 #: build/C/man3/fmtmsg.3:22 build/C/man3/fopen.3:63
159 #: build/C/man3/fopencookie.3:35 build/C/man3/fpurge.3:40
160 #: build/C/man3/fputwc.3:26 build/C/man3/fread.3:56 build/C/man3/fseek.3:55
161 #: build/C/man3/fseeko.3:35 build/C/man3/getline.3:56 build/C/man3/gets.3:44
162 #: build/C/man3/getw.3:57 build/C/man2/link.2:38 build/C/man2/llseek.2:38
163 #: build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34 build/C/man2/open.2:66
164 #: build/C/man3/perror.3:54 build/C/man2/pipe.2:51 build/C/man3/popen.3:62
165 #: build/C/man3/printf.3:76 build/C/man3/puts.3:41 build/C/man2/read.2:44
166 #: build/C/man2/readlink.2:61 build/C/man2/readv.2:56 build/C/man3/remove.3:38
167 #: build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:85
168 #: build/C/man3/setbuf.3:71 build/C/man3/stdin.3:20 build/C/man3/stdio.3:48
169 #: build/C/man3/stdio_ext.3:52 build/C/man2/symlink.2:52
170 #: build/C/man3/tempnam.3:40 build/C/man3/tmpfile.3:38
171 #: build/C/man3/tmpnam.3:34 build/C/man2/unlink.2:39
172 #: build/C/man3/unlocked_stdio.3:104 build/C/man3/wprintf.3:58
173 #: build/C/man2/write.2:46
174 #, no-wrap
175 msgid "DESCRIPTION"
176 msgstr "説明"
177
178 #. type: Plain text
179 #: build/C/man3/asprintf.3:51
180 msgid ""
181 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>"
182 "(3)  and B<vsprintf>(3), except that they allocate a string large enough to "
183 "hold the output including the terminating null byte, and return a pointer to "
184 "it via the first argument.  This pointer should be passed to B<free>(3)  to "
185 "release the allocated storage when it is no longer needed."
186 msgstr ""
187 "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数"
188 "と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端の NULL バイトも含"
189 "めて)  保持するのに十分な大きさのメモリを確保し、 最初の引数にその文字列への"
190 "ポインタを返す。 このポインタは、不要になったら B<free>(3)  に渡し、割り当て"
191 "られた記憶領域を解放すべきである。"
192
193 #. type: SH
194 #: build/C/man3/asprintf.3:51 build/C/man3/ctermid.3:57
195 #: build/C/man3/fclose.3:57 build/C/man3/fcloseall.3:49
196 #: build/C/man3/fflush.3:72 build/C/man3/fgetwc.3:53
197 #: build/C/man3/flockfile.3:112 build/C/man3/fmemopen.3:172
198 #: build/C/man3/fmtmsg.3:148 build/C/man3/fopen.3:189
199 #: build/C/man3/fopencookie.3:235 build/C/man3/fpurge.3:56
200 #: build/C/man3/fputwc.3:52 build/C/man3/fread.3:81 build/C/man3/fseek.3:117
201 #: build/C/man3/fseeko.3:63 build/C/man3/getline.3:108 build/C/man3/gets.3:109
202 #: build/C/man3/getw.3:71 build/C/man2/link.2:52 build/C/man2/llseek.2:57
203 #: build/C/man2/lseek.2:151 build/C/man2/open.2:464 build/C/man2/pipe.2:92
204 #: build/C/man3/popen.3:121 build/C/man3/puts.3:82 build/C/man2/read.2:63
205 #: build/C/man2/readlink.2:75 build/C/man2/readv.2:175
206 #: build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40
207 #: build/C/man3/scanf.3:528 build/C/man3/setbuf.3:150
208 #: build/C/man2/symlink.2:84 build/C/man3/tempnam.3:85
209 #: build/C/man3/tmpfile.3:45 build/C/man3/tmpnam.3:68 build/C/man2/unlink.2:55
210 #: build/C/man3/wprintf.3:185 build/C/man2/write.2:89
211 #, no-wrap
212 msgid "RETURN VALUE"
213 msgstr "返り値"
214
215 #. type: Plain text
216 #: build/C/man3/asprintf.3:59
217 msgid ""
218 "When successful, these functions return the number of bytes printed, just "
219 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
220 "error occurs, these functions will return -1, and the contents of I<strp> is "
221 "undefined."
222 msgstr ""
223 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
224 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
225 "は -1 を返し、 I<strp> の内容は未定義となる。"
226
227 #. type: SH
228 #: build/C/man3/asprintf.3:59 build/C/man3/ctermid.3:59
229 #: build/C/man3/dprintf.3:68 build/C/man3/fclose.3:88
230 #: build/C/man3/fcloseall.3:54 build/C/man3/ferror.3:105
231 #: build/C/man3/fflush.3:91 build/C/man3/fgetwc.3:65
232 #: build/C/man3/flockfile.3:119 build/C/man3/fmemopen.3:191
233 #: build/C/man3/fmtmsg.3:221 build/C/man3/fopen.3:246
234 #: build/C/man3/fopencookie.3:242 build/C/man3/fpurge.3:68
235 #: build/C/man3/fputwc.3:63 build/C/man3/fread.3:101 build/C/man3/fseek.3:164
236 #: build/C/man3/fseeko.3:75 build/C/man3/getline.3:132 build/C/man3/gets.3:136
237 #: build/C/man3/getw.3:78 build/C/man2/link.2:128 build/C/man2/llseek.2:76
238 #: build/C/man2/lseek.2:189 build/C/man2/open.2:610 build/C/man3/perror.3:111
239 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:167 build/C/man3/printf.3:807
240 #: build/C/man3/puts.3:101 build/C/man2/read.2:155 build/C/man2/readlink.2:123
241 #: build/C/man2/readv.2:212 build/C/man3/remove.3:70 build/C/man2/rename.2:229
242 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:575 build/C/man3/setbuf.3:162
243 #: build/C/man3/stdin.3:109 build/C/man3/stdio.3:244
244 #: build/C/man2/symlink.2:144 build/C/man3/tempnam.3:94
245 #: build/C/man3/tmpfile.3:74 build/C/man3/tmpnam.3:75
246 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:111
247 #: build/C/man3/wprintf.3:193 build/C/man2/write.2:179
248 #, no-wrap
249 msgid "CONFORMING TO"
250 msgstr "準拠"
251
252 #. type: Plain text
253 #: build/C/man3/asprintf.3:65
254 msgid ""
255 "These functions are GNU extensions, not in C or POSIX.  They are also "
256 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
257 "error."
258 msgstr ""
259 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
260 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
261 "る。"
262
263 #. type: SH
264 #: build/C/man3/asprintf.3:65 build/C/man3/ctermid.3:69
265 #: build/C/man3/dprintf.3:94 build/C/man3/fclose.3:100
266 #: build/C/man3/fcloseall.3:56 build/C/man3/ferror.3:112
267 #: build/C/man3/fflush.3:106 build/C/man3/fgetwc.3:82
268 #: build/C/man3/flockfile.3:127 build/C/man3/fmemopen.3:273
269 #: build/C/man3/fmtmsg.3:293 build/C/man3/fopen.3:302
270 #: build/C/man3/fopencookie.3:434 build/C/man3/fpurge.3:78
271 #: build/C/man3/fputwc.3:80 build/C/man3/fread.3:103 build/C/man3/fseek.3:166
272 #: build/C/man3/fseeko.3:81 build/C/man3/getline.3:166 build/C/man3/gets.3:171
273 #: build/C/man3/getw.3:84 build/C/man2/link.2:177 build/C/man2/llseek.2:82
274 #: build/C/man2/lseek.2:234 build/C/man3/lseek64.3:157 build/C/man2/open.2:849
275 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:196
276 #: build/C/man3/printf.3:1074 build/C/man3/puts.3:110 build/C/man2/read.2:178
277 #: build/C/man2/readlink.2:212 build/C/man2/readv.2:282
278 #: build/C/man3/remove.3:81 build/C/man2/rename.2:242 build/C/man2/rmdir.2:132
279 #: build/C/man3/scanf.3:717 build/C/man3/setbuf.3:198 build/C/man3/stdin.3:150
280 #: build/C/man3/stdio.3:248 build/C/man3/stdio_ext.3:130
281 #: build/C/man2/symlink.2:159 build/C/man7/symlink.7:470
282 #: build/C/man3/tempnam.3:164 build/C/man3/tmpfile.3:86
283 #: build/C/man3/tmpnam.3:151 build/C/man2/unlink.2:148
284 #: build/C/man3/unlocked_stdio.3:134 build/C/man3/wprintf.3:229
285 #: build/C/man2/write.2:205
286 #, no-wrap
287 msgid "SEE ALSO"
288 msgstr "関連項目"
289
290 #. type: Plain text
291 #: build/C/man3/asprintf.3:68
292 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
293 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
294
295 #. type: TH
296 #: build/C/man3/ctermid.3:24
297 #, no-wrap
298 msgid "CTERMID"
299 msgstr "CTERMID"
300
301 #. type: TH
302 #: build/C/man3/ctermid.3:24
303 #, no-wrap
304 msgid "2007-07-26"
305 msgstr "2007-07-26"
306
307 #. type: Plain text
308 #: build/C/man3/ctermid.3:27
309 msgid "ctermid - get controlling terminal name"
310 msgstr "ctermid - 制御端末名の取得"
311
312 #. type: Plain text
313 #: build/C/man3/ctermid.3:32 build/C/man3/fgetwc.3:22
314 #: build/C/man3/flockfile.3:29 build/C/man3/fmemopen.3:12
315 #: build/C/man3/fopen.3:48 build/C/man3/fputwc.3:20 build/C/man3/fread.3:49
316 #: build/C/man3/fseeko.3:29 build/C/man3/getline.3:30 build/C/man3/gets.3:31
317 #: build/C/man3/getw.3:29 build/C/man3/popen.3:44 build/C/man3/puts.3:30
318 #: build/C/man3/scanf.3:56 build/C/man3/setbuf.3:52 build/C/man3/stdin.3:15
319 #: build/C/man3/tempnam.3:29 build/C/man3/tmpfile.3:35
320 #: build/C/man3/tmpnam.3:31 build/C/man3/unlocked_stdio.3:30
321 #, no-wrap
322 msgid "B<#include E<lt>stdio.hE<gt>>\n"
323 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
324
325 #. type: Plain text
326 #: build/C/man3/ctermid.3:34
327 #, no-wrap
328 msgid "B<char *ctermid(char *>I<s>B<);>\n"
329 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
330
331 #. type: Plain text
332 #: build/C/man3/ctermid.3:39 build/C/man3/dprintf.3:38
333 #: build/C/man3/ferror.3:59 build/C/man3/flockfile.3:40
334 #: build/C/man3/fmemopen.3:25 build/C/man3/fopen.3:59
335 #: build/C/man3/getline.3:40 build/C/man3/getw.3:38 build/C/man3/perror.3:49
336 #: build/C/man3/popen.3:53 build/C/man3/printf.3:63 build/C/man2/readlink.2:52
337 #: build/C/man2/readv.2:51 build/C/man3/scanf.3:71 build/C/man3/setbuf.3:66
338 #: build/C/man2/symlink.2:43 build/C/man3/tempnam.3:36
339 #: build/C/man3/unlocked_stdio.3:66 build/C/man3/wprintf.3:37
340 msgid ""
341 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
342 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
343
344 #.  From <unistd.h>: _XOPEN_SOURCE
345 #. type: Plain text
346 #: build/C/man3/ctermid.3:44
347 msgid ""
348 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
349 msgstr ""
350 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
351
352 #. type: Plain text
353 #: build/C/man3/ctermid.3:57
354 msgid ""
355 "B<ctermid>()  returns a string which is the pathname for the current "
356 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
357 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
358 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
359 "the returned pathname."
360 msgstr ""
361 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
362 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
363 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
364 "ス名の最大文字数である。"
365
366 #. type: Plain text
367 #: build/C/man3/ctermid.3:59
368 msgid "The pointer to the pathname."
369 msgstr "パス名へのポインタ。"
370
371 #. type: Plain text
372 #: build/C/man3/ctermid.3:61
373 msgid "Svr4, POSIX.1-2001."
374 msgstr "SVr4, POSIX.1-2001."
375
376 #. type: SH
377 #: build/C/man3/ctermid.3:61 build/C/man3/fmemopen.3:201
378 #: build/C/man3/gets.3:150 build/C/man3/getw.3:80 build/C/man2/link.2:171
379 #: build/C/man2/open.2:838 build/C/man3/popen.3:173 build/C/man3/printf.3:930
380 #: build/C/man3/puts.3:103 build/C/man2/readv.2:256 build/C/man3/remove.3:78
381 #: build/C/man2/rename.2:231 build/C/man2/rmdir.2:129 build/C/man3/scanf.3:682
382 #: build/C/man3/setbuf.3:168 build/C/man3/tempnam.3:154
383 #: build/C/man3/tmpnam.3:144 build/C/man2/unlink.2:145
384 #, no-wrap
385 msgid "BUGS"
386 msgstr "バグ"
387
388 #. type: Plain text
389 #: build/C/man3/ctermid.3:65
390 msgid ""
391 "The path returned may not uniquely identify the controlling terminal; it "
392 "may, for example, be I</dev/tty>."
393 msgstr ""
394 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
395 "ように。"
396
397 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
398 #.  if ctermid() was given an argument; fixed in 2.4.
399 #. type: Plain text
400 #: build/C/man3/ctermid.3:69
401 msgid "It is not assured that the program can open the terminal."
402 msgstr "プログラムが端末をオープンできることは保証されていない。"
403
404 #. type: Plain text
405 #: build/C/man3/ctermid.3:70
406 msgid "B<ttyname>(3)"
407 msgstr "B<ttyname>(3)"
408
409 #. type: TH
410 #: build/C/man3/dprintf.3:25
411 #, no-wrap
412 msgid "DPRINTF"
413 msgstr "DPRINTF"
414
415 #. type: TH
416 #: build/C/man3/dprintf.3:25 build/C/man3/fmemopen.3:6
417 #, no-wrap
418 msgid "2010-09-15"
419 msgstr "2010-09-15"
420
421 #. type: Plain text
422 #: build/C/man3/dprintf.3:28
423 msgid "dprintf, vdprintf - print to a file descriptor"
424 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
425
426 #. type: Plain text
427 #: build/C/man3/dprintf.3:32
428 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
429 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
430
431 #. type: Plain text
432 #: build/C/man3/dprintf.3:34
433 msgid ""
434 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
435 msgstr ""
436 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
437
438 #. type: Plain text
439 #: build/C/man3/dprintf.3:42
440 msgid "B<dprintf>(), B<vdprintf>():"
441 msgstr "B<dprintf>(), B<vdprintf>():"
442
443 #. type: TP
444 #: build/C/man3/dprintf.3:45 build/C/man3/fmemopen.3:33
445 #: build/C/man3/getline.3:47
446 #, no-wrap
447 msgid "Since glibc 2.10:"
448 msgstr "glibc 2.10 以降:"
449
450 #. type: Plain text
451 #: build/C/man3/dprintf.3:48 build/C/man3/fmemopen.3:36
452 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
453 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
454
455 #. type: TP
456 #: build/C/man3/dprintf.3:48 build/C/man3/fmemopen.3:36
457 #: build/C/man3/getline.3:50
458 #, no-wrap
459 msgid "Before glibc 2.10:"
460 msgstr "glibc 2.10 より前:"
461
462 #. type: Plain text
463 #: build/C/man3/dprintf.3:51 build/C/man3/fmemopen.3:39
464 #: build/C/man3/getline.3:53 build/C/man3/unlocked_stdio.3:102
465 msgid "_GNU_SOURCE"
466 msgstr "_GNU_SOURCE"
467
468 #. type: Plain text
469 #: build/C/man3/dprintf.3:68
470 msgid ""
471 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
472 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
473 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
474 msgstr ""
475 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
476 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
477 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力"
478 "を行う。"
479
480 #.  .SH NOTES
481 #.  These functions are GNU extensions, not in C or POSIX.
482 #.  Clearly, the names were badly chosen.
483 #.  Many systems (like MacOS) have incompatible functions called
484 #.  .BR dprintf (),
485 #.  usually some debugging version of
486 #.  .BR printf (3),
487 #.  perhaps with a prototype like
488 #.  .BI "void dprintf(int level, const char *" format ", ...);"
489 #.  where the first argument is a debugging level (and output is to
490 #.  .IR stderr ).
491 #.  Moreover,
492 #.  .BR dprintf ()
493 #.  (or
494 #.  .BR DPRINTF )
495 #.  is also a popular macro name for a debugging printf.
496 #.  So, probably, it is better to avoid this function in programs
497 #.  intended to be portable.
498 #.  A better name would have been
499 #.  .BR fdprintf ().
500 #. type: Plain text
501 #: build/C/man3/dprintf.3:94
502 msgid ""
503 "These functions are GNU extensions that are nowadays specified in "
504 "POSIX.1-2008."
505 msgstr ""
506 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
507 "る。"
508
509 #. type: Plain text
510 #: build/C/man3/dprintf.3:95
511 msgid "B<printf>(3)"
512 msgstr "B<printf>(3)"
513
514 #. type: TH
515 #: build/C/man3/fclose.3:42
516 #, no-wrap
517 msgid "FCLOSE"
518 msgstr "FCLOSE"
519
520 #. type: TH
521 #: build/C/man3/fclose.3:42 build/C/man3/fopen.3:42 build/C/man2/read.2:35
522 #, no-wrap
523 msgid "2009-02-23"
524 msgstr "2009-02-23"
525
526 #. type: Plain text
527 #: build/C/man3/fclose.3:45
528 msgid "fclose - close a stream"
529 msgstr "fclose - ストリームを閉じる"
530
531 #. type: Plain text
532 #: build/C/man3/fclose.3:49
533 msgid "B<int fclose(FILE *>I<fp>B<);>"
534 msgstr "B<int fclose(FILE *>I<fp>B<);>"
535
536 #. type: Plain text
537 #: build/C/man3/fclose.3:57
538 msgid ""
539 "The B<fclose>()  function will flushes the stream pointed to by I<fp> "
540 "(writing any buffered output data using B<fflush>(3))  and closes the "
541 "underlying file descriptor."
542 msgstr ""
543 "B<fclose>()  関数は I<fp> で指されるストリームを (バッファリングされていた全"
544 "ての出力データを B<fflush>(3)  を用いて書き込んで) フラッシュし、 その基とな"
545 "るファイルディスクリプタをクローズする。"
546
547 #. type: Plain text
548 #: build/C/man3/fclose.3:68
549 msgid ""
550 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
551 "I<errno> is set to indicate the error.  In either case any further access "
552 "(including another call to B<fclose>())  to the stream results in undefined "
553 "behavior."
554 msgstr ""
555 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
556 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
557 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
558 "は 未定義の動作を生じさせる。"
559
560 #. type: SH
561 #: build/C/man3/fclose.3:68 build/C/man3/ferror.3:95 build/C/man3/fflush.3:79
562 #: build/C/man3/fgetwc.3:59 build/C/man3/flockfile.3:117
563 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:63 build/C/man3/fputwc.3:58
564 #: build/C/man3/fseek.3:132 build/C/man3/fseeko.3:72
565 #: build/C/man3/getline.3:120 build/C/man2/link.2:57 build/C/man2/llseek.2:64
566 #: build/C/man2/lseek.2:159 build/C/man2/open.2:472 build/C/man2/pipe.2:97
567 #: build/C/man3/popen.3:141 build/C/man2/read.2:77 build/C/man2/readlink.2:83
568 #: build/C/man2/readv.2:186 build/C/man3/remove.3:65 build/C/man2/rename.2:96
569 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:545 build/C/man2/symlink.2:89
570 #: build/C/man3/tempnam.3:90 build/C/man3/tmpfile.3:52
571 #: build/C/man3/tmpnam.3:73 build/C/man2/unlink.2:60 build/C/man2/write.2:107
572 #, no-wrap
573 msgid "ERRORS"
574 msgstr "エラー"
575
576 #. type: TP
577 #: build/C/man3/fclose.3:69 build/C/man3/fflush.3:80 build/C/man3/fpurge.3:64
578 #: build/C/man3/fseek.3:133 build/C/man2/llseek.2:65 build/C/man2/lseek.2:160
579 #: build/C/man2/read.2:96 build/C/man3/scanf.3:551 build/C/man2/write.2:126
580 #, no-wrap
581 msgid "B<EBADF>"
582 msgstr "B<EBADF>"
583
584 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
585 #.   low-level file operations on the same stream. If you do get this error,
586 #.   you must have closed the stream's low-level file descriptor using
587 #.   something like close(fileno(fp)).
588 #. type: Plain text
589 #: build/C/man3/fclose.3:78
590 msgid "The file descriptor underlying I<fp> is not valid."
591 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
592
593 #. type: Plain text
594 #: build/C/man3/fclose.3:88
595 msgid ""
596 "The B<fclose>()  function may also fail and set I<errno> for any of the "
597 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
598 msgstr ""
599 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
600 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
601 "された値に設定される。"
602
603 #. type: Plain text
604 #: build/C/man3/fclose.3:90 build/C/man3/fseek.3:166 build/C/man3/puts.3:103
605 msgid "C89, C99."
606 msgstr "C89, C99."
607
608 #. type: SH
609 #: build/C/man3/fclose.3:90 build/C/man3/fflush.3:97 build/C/man3/fgetwc.3:67
610 #: build/C/man3/fmemopen.3:195 build/C/man3/fmtmsg.3:236
611 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:76 build/C/man3/fputwc.3:65
612 #: build/C/man3/fseeko.3:77 build/C/man2/link.2:133 build/C/man2/llseek.2:79
613 #: build/C/man2/lseek.2:199 build/C/man2/open.2:636 build/C/man3/perror.3:124
614 #: build/C/man3/printf.3:868 build/C/man2/read.2:157
615 #: build/C/man2/readlink.2:128 build/C/man2/readv.2:224
616 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:606 build/C/man3/stdin.3:118
617 #: build/C/man2/symlink.2:150 build/C/man3/tempnam.3:99
618 #: build/C/man3/tmpfile.3:76 build/C/man3/tmpnam.3:80
619 #: build/C/man3/wprintf.3:195 build/C/man2/write.2:188
620 #, no-wrap
621 msgid "NOTES"
622 msgstr "注意"
623
624 #. type: Plain text
625 #: build/C/man3/fclose.3:100
626 msgid ""
627 "Note that B<fclose>()  only flushes the user space buffers provided by the C "
628 "library.  To ensure that the data is physically stored on disk the kernel "
629 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
630 msgstr ""
631 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
632 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
633 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
634 "ればならない。"
635
636 #. type: Plain text
637 #: build/C/man3/fclose.3:105
638 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
639 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
640
641 #. type: TH
642 #: build/C/man3/fcloseall.3:24
643 #, no-wrap
644 msgid "FCLOSEALL"
645 msgstr "FCLOSEALL"
646
647 #. type: TH
648 #: build/C/man3/fcloseall.3:24
649 #, no-wrap
650 msgid "2006-12-27"
651 msgstr "2006-12-27"
652
653 #. type: Plain text
654 #: build/C/man3/fcloseall.3:27
655 msgid "fcloseall - close all open streams"
656 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
657
658 #. type: Plain text
659 #: build/C/man3/fcloseall.3:31 build/C/man3/fopencookie.3:31
660 #, no-wrap
661 msgid ""
662 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
663 "B<#include E<lt>stdio.hE<gt>>\n"
664 msgstr ""
665 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
666 "B<#include E<lt>stdio.hE<gt>>\n"
667
668 #. type: Plain text
669 #: build/C/man3/fcloseall.3:33
670 #, no-wrap
671 msgid "B<int fcloseall(void);>\n"
672 msgstr "B<int fcloseall(void);>\n"
673
674 #. type: Plain text
675 #: build/C/man3/fcloseall.3:42
676 msgid ""
677 "The B<fcloseall>()  function closes all of the calling process's open "
678 "streams.  Buffered output for each stream is written before it is closed (as "
679 "for B<fflush>(3)); buffered input is discarded."
680 msgstr ""
681 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
682 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
683 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
684 "れる。"
685
686 #. type: Plain text
687 #: build/C/man3/fcloseall.3:49
688 msgid ""
689 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
690 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
691
692 #. type: Plain text
693 #: build/C/man3/fcloseall.3:54
694 msgid ""
695 "This function returns 0 if all files were successfully closed; on error, "
696 "B<EOF> is returned."
697 msgstr ""
698 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
699 "B<EOF> を返す。"
700
701 #. type: Plain text
702 #: build/C/man3/fcloseall.3:56
703 msgid "This function is a GNU extension."
704 msgstr "この関数は GNU 拡張である。"
705
706 #. type: Plain text
707 #: build/C/man3/fcloseall.3:61
708 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
709 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
710
711 #. type: TH
712 #: build/C/man3/ferror.3:42
713 #, no-wrap
714 msgid "FERROR"
715 msgstr "FERROR"
716
717 #. type: TH
718 #: build/C/man3/ferror.3:42 build/C/man3/flockfile.3:23
719 #: build/C/man3/unlocked_stdio.3:23
720 #, no-wrap
721 msgid "2008-08-29"
722 msgstr "2008-08-29"
723
724 #. type: Plain text
725 #: build/C/man3/ferror.3:45
726 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
727 msgstr ""
728 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
729
730 #. type: Plain text
731 #: build/C/man3/ferror.3:49
732 msgid "B<void clearerr(FILE *>I<stream>B<);>"
733 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
734
735 #. type: Plain text
736 #: build/C/man3/ferror.3:51
737 msgid "B<int feof(FILE *>I<stream>B<);>"
738 msgstr "B<int feof(FILE *>I<stream>B<);>"
739
740 #. type: Plain text
741 #: build/C/man3/ferror.3:53
742 msgid "B<int ferror(FILE *>I<stream>B<);>"
743 msgstr "B<int ferror(FILE *>I<stream>B<);>"
744
745 #. type: Plain text
746 #: build/C/man3/ferror.3:55
747 msgid "B<int fileno(FILE *>I<stream>B<);>"
748 msgstr "B<int fileno(FILE *>I<stream>B<);>"
749
750 #. type: Plain text
751 #: build/C/man3/ferror.3:63
752 msgid ""
753 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
754 msgstr ""
755 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
756
757 #. type: Plain text
758 #: build/C/man3/ferror.3:68
759 msgid ""
760 "The function B<clearerr>()  clears the end-of-file and error indicators for "
761 "the stream pointed to by I<stream>."
762 msgstr ""
763 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
764 "子とエラー指示子をクリアする。"
765
766 #. type: Plain text
767 #: build/C/man3/ferror.3:77
768 msgid ""
769 "The function B<feof>()  tests the end-of-file indicator for the stream "
770 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
771 "indicator can only be cleared by the function B<clearerr>()."
772 msgstr ""
773 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
774 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
775 "よってのみクリアすることができる。"
776
777 #. type: Plain text
778 #: build/C/man3/ferror.3:86
779 msgid ""
780 "The function B<ferror>()  tests the error indicator for the stream pointed "
781 "to by I<stream>, returning nonzero if it is set.  The error indicator can "
782 "only be reset by the B<clearerr>()  function."
783 msgstr ""
784 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
785 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
786 "()  によってのみリセットすることができる。"
787
788 #. type: Plain text
789 #: build/C/man3/ferror.3:92
790 msgid ""
791 "The function B<fileno>()  examines the argument I<stream> and returns its "
792 "integer descriptor."
793 msgstr ""
794 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返"
795 "す。"
796
797 #. type: Plain text
798 #: build/C/man3/ferror.3:95 build/C/man3/fgetwc.3:53 build/C/man3/fputwc.3:52
799 #: build/C/man3/fread.3:81 build/C/man3/gets.3:109 build/C/man3/puts.3:82
800 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
801 msgstr ""
802 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
803
804 #. type: Plain text
805 #: build/C/man3/ferror.3:105
806 msgid ""
807 "These functions should not fail and do not set the external variable "
808 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
809 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
810 msgstr ""
811 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
812 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
813 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
814
815 #. type: Plain text
816 #: build/C/man3/ferror.3:112
817 msgid ""
818 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
819 "C99."
820 msgstr ""
821 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
822
823 #. type: Plain text
824 #: build/C/man3/ferror.3:116
825 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
826 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
827
828 #. type: TH
829 #: build/C/man3/fflush.3:43
830 #, no-wrap
831 msgid "FFLUSH"
832 msgstr "FFLUSH"
833
834 #. type: TH
835 #: build/C/man3/fflush.3:43
836 #, no-wrap
837 msgid "2009-09-06"
838 msgstr "2009-09-06"
839
840 #. type: Plain text
841 #: build/C/man3/fflush.3:46
842 msgid "fflush - flush a stream"
843 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
844
845 #. type: Plain text
846 #: build/C/man3/fflush.3:50
847 msgid "B<int fflush(FILE *>I<stream>B<);>"
848 msgstr "B<int fflush(FILE *>I<stream>B<);>"
849
850 #. type: Plain text
851 #: build/C/man3/fflush.3:61
852 msgid ""
853 "For output streams, B<fflush>()  forces a write of all user-space buffered "
854 "data for the given output or update I<stream> via the stream's underlying "
855 "write function.  For input streams, B<fflush>()  discards any buffered data "
856 "that has been fetched from the underlying file, but has not been consumed by "
857 "the application.  The open status of the stream is unaffected."
858 msgstr ""
859 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
860 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
861 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
862 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
863 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
864 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
865 "い。"
866
867 #. type: Plain text
868 #: build/C/man3/fflush.3:69
869 msgid ""
870 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
871 "streams."
872 msgstr ""
873 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
874 "トリームをフラッシュする。"
875
876 #. type: Plain text
877 #: build/C/man3/fflush.3:72
878 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
879 msgstr ""
880 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
881 "と。"
882
883 #. type: Plain text
884 #: build/C/man3/fflush.3:79
885 msgid ""
886 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
887 "I<errno> is set to indicate the error."
888 msgstr ""
889 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
890 "ラーに対応した値に設定される。"
891
892 #. type: Plain text
893 #: build/C/man3/fflush.3:84
894 msgid "I<Stream> is not an open stream, or is not open for writing."
895 msgstr ""
896 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
897 "ない。"
898
899 #. type: Plain text
900 #: build/C/man3/fflush.3:91
901 msgid ""
902 "The function B<fflush>()  may also fail and set I<errno> for any of the "
903 "errors specified for B<write>(2)."
904 msgstr ""
905 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
906 "ある。 この場合 I<errno> もその値に設定される。"
907
908 #. type: Plain text
909 #: build/C/man3/fflush.3:93
910 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
911 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
912
913 #.  Verified on: Solaris 8.
914 #. type: Plain text
915 #: build/C/man3/fflush.3:97
916 msgid ""
917 "The standards do not specify the behavior for input streams.  Most other "
918 "implementations behave the same as Linux."
919 msgstr ""
920 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
921 "は Linux と同じ動作をする。"
922
923 #. type: Plain text
924 #: build/C/man3/fflush.3:106
925 msgid ""
926 "Note that B<fflush>()  only flushes the user space buffers provided by the C "
927 "library.  To ensure that the data is physically stored on disk the kernel "
928 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
929 msgstr ""
930 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
931 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
932 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
933 "B<fsync>(2)  を用いる。"
934
935 #. type: Plain text
936 #: build/C/man3/fflush.3:113
937 msgid ""
938 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
939 "(3), B<unlocked_stdio>(3)"
940 msgstr ""
941 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
942 "(3), B<unlocked_stdio>(3)"
943
944 #. type: TH
945 #: build/C/man3/fgetwc.3:16
946 #, no-wrap
947 msgid "FGETWC"
948 msgstr "FGETWC"
949
950 #. type: TH
951 #: build/C/man3/fgetwc.3:16 build/C/man3/fputwc.3:14
952 #, no-wrap
953 msgid "1999-07-25"
954 msgstr "1999-07-25"
955
956 #. type: Plain text
957 #: build/C/man3/fgetwc.3:19
958 msgid "fgetwc, getwc - read a wide character from a FILE stream"
959 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
960
961 #. type: Plain text
962 #: build/C/man3/fgetwc.3:24 build/C/man3/fmemopen.3:18
963 #: build/C/man3/fputwc.3:22 build/C/man3/unlocked_stdio.3:52
964 #, no-wrap
965 msgid "B<#include E<lt>wchar.hE<gt>>\n"
966 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
967
968 #. type: Plain text
969 #: build/C/man3/fgetwc.3:27
970 #, no-wrap
971 msgid ""
972 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
973 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
974 msgstr ""
975 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
976 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
977
978 #. type: Plain text
979 #: build/C/man3/fgetwc.3:42
980 msgid ""
981 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
982 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
983 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
984 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
985 "I<errno> to B<EILSEQ> and returns B<WEOF>."
986 msgstr ""
987 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
988 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
989 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
990 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
991 "し、 B<WEOF> を返す。"
992
993 #. type: Plain text
994 #: build/C/man3/fgetwc.3:50
995 msgid ""
996 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
997 "may be implemented as a macro, and may evaluate its argument more than "
998 "once.  There is no reason ever to use it."
999 msgstr ""
1000 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1001 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1002 "ない。この関数を使う理由はもはや存在しない。"
1003
1004 #. type: Plain text
1005 #: build/C/man3/fgetwc.3:59
1006 msgid ""
1007 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1008 "or B<WEOF>."
1009 msgstr ""
1010 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。"
1011
1012 #. type: Plain text
1013 #: build/C/man3/fgetwc.3:61 build/C/man3/fputwc.3:60
1014 msgid "Apart from the usual ones, there is"
1015 msgstr "通常のエラーに加えて、以下のエラーがある:"
1016
1017 #. type: TP
1018 #: build/C/man3/fgetwc.3:61 build/C/man3/fputwc.3:60 build/C/man3/scanf.3:556
1019 #, no-wrap
1020 msgid "B<EILSEQ>"
1021 msgstr "B<EILSEQ>"
1022
1023 #. type: Plain text
1024 #: build/C/man3/fgetwc.3:65
1025 msgid ""
1026 "The data obtained from the input stream does not form a valid character."
1027 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1028
1029 #. type: Plain text
1030 #: build/C/man3/fgetwc.3:67 build/C/man3/fputwc.3:65
1031 msgid "C99, POSIX.1-2001."
1032 msgstr "C99, POSIX.1-2001."
1033
1034 #. type: Plain text
1035 #: build/C/man3/fgetwc.3:74
1036 msgid ""
1037 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1038 "current locale."
1039 msgstr ""
1040 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1041
1042 #. type: Plain text
1043 #: build/C/man3/fgetwc.3:82
1044 msgid ""
1045 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1046 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1047 "sequence from the stream and then convert it to a wide character."
1048 msgstr ""
1049 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1050 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1051 "換すると期待することは適切である。"
1052
1053 #. type: Plain text
1054 #: build/C/man3/fgetwc.3:86
1055 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1056 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1057
1058 #. type: TH
1059 #: build/C/man3/flockfile.3:23
1060 #, no-wrap
1061 msgid "FLOCKFILE"
1062 msgstr "FLOCKFILE"
1063
1064 #. type: Plain text
1065 #: build/C/man3/flockfile.3:26
1066 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1067 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1068
1069 #. type: Plain text
1070 #: build/C/man3/flockfile.3:31
1071 #, no-wrap
1072 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1073 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1074
1075 #. type: Plain text
1076 #: build/C/man3/flockfile.3:33
1077 #, no-wrap
1078 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1079 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1080
1081 #. type: Plain text
1082 #: build/C/man3/flockfile.3:35
1083 #, no-wrap
1084 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1085 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1086
1087 #. type: Plain text
1088 #: build/C/man3/flockfile.3:44 build/C/man3/wprintf.3:41
1089 msgid "All functions shown above:"
1090 msgstr "上記の全ての関数:"
1091
1092 #. type: Plain text
1093 #: build/C/man3/flockfile.3:47
1094 msgid ""
1095 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1096 "|| _POSIX_SOURCE"
1097 msgstr ""
1098 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1099 "|| _POSIX_SOURCE"
1100
1101 #. type: Plain text
1102 #: build/C/man3/flockfile.3:61
1103 msgid ""
1104 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1105 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1106 "thread.  For each library call, these functions wait until the I<FILE> "
1107 "object is no longer locked by a different thread, then lock it, do the "
1108 "requested I/O, and unlock the object again."
1109 msgstr ""
1110 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1111 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1112 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1113 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1114 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1115 "オブジェクトのロックを解除する。"
1116
1117 #. type: Plain text
1118 #: build/C/man3/flockfile.3:67
1119 msgid ""
1120 "(Note: this locking has nothing to do with the file locking done by "
1121 "functions like B<flock>(2)  and B<lockf>(3).)"
1122 msgstr ""
1123 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1124 "全く無関係である。)"
1125
1126 #. type: Plain text
1127 #: build/C/man3/flockfile.3:75
1128 msgid ""
1129 "All this is invisible to the C-programmer, but there may be two reasons to "
1130 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1131 "actions by one thread belongs together, and should not be interrupted by the "
1132 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1133 "should be avoided for greater efficiency."
1134 msgstr ""
1135 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1136 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1137 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1138 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1139 "避ける必要があるということであろう。"
1140
1141 #. type: Plain text
1142 #: build/C/man3/flockfile.3:92
1143 msgid ""
1144 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1145 "series of I/O actions, then unlock.  This prevents other threads from coming "
1146 "in between.  If the reason for doing this was to achieve greater efficiency, "
1147 "one does the I/O with the nonlocking versions of the stdio functions: with "
1148 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1149 "B<putc>(3)."
1150 msgstr ""
1151 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1152 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1153 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1154 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1155 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1156 "B<putc_unlocked>(3)  を使用する。"
1157
1158 #. type: Plain text
1159 #: build/C/man3/flockfile.3:99
1160 msgid ""
1161 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1162 "by a different thread, then makes the current thread owner of "
1163 "I<*filehandle>, and increments the lockcount."
1164 msgstr ""
1165 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1166 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1167 "ロック数を加算する。"
1168
1169 #. type: Plain text
1170 #: build/C/man3/flockfile.3:103
1171 msgid "The B<funlockfile>()  function decrements the lock count."
1172 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1173
1174 #. type: Plain text
1175 #: build/C/man3/flockfile.3:112
1176 msgid ""
1177 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1178 "It does nothing in case some other thread owns I<*filehandle>, and it "
1179 "obtains ownership and increments the lockcount otherwise."
1180 msgstr ""
1181 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1182 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1183 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1184
1185 #. type: Plain text
1186 #: build/C/man3/flockfile.3:117
1187 msgid ""
1188 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1189 "obtained), and nonzero for failure."
1190 msgstr ""
1191 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1192 "の値を返す。"
1193
1194 #. type: Plain text
1195 #: build/C/man3/flockfile.3:119
1196 msgid "None."
1197 msgstr "なし。"
1198
1199 #. type: Plain text
1200 #: build/C/man3/flockfile.3:121 build/C/man3/popen.3:169
1201 msgid "POSIX.1-2001."
1202 msgstr "POSIX.1-2001."
1203
1204 #. type: SH
1205 #: build/C/man3/flockfile.3:121
1206 #, no-wrap
1207 msgid "AVAILABILITY"
1208 msgstr "可用性"
1209
1210 #. type: Plain text
1211 #: build/C/man3/flockfile.3:127
1212 msgid ""
1213 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1214 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1215 msgstr ""
1216 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1217 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1218
1219 #. type: Plain text
1220 #: build/C/man3/flockfile.3:128
1221 msgid "B<unlocked_stdio>(3)"
1222 msgstr "B<unlocked_stdio>(3)"
1223
1224 #. type: TH
1225 #: build/C/man3/fmemopen.3:6
1226 #, no-wrap
1227 msgid "FMEMOPEN"
1228 msgstr "FMEMOPEN"
1229
1230 #. type: Plain text
1231 #: build/C/man3/fmemopen.3:9
1232 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1233 msgstr ""
1234 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1235 "する"
1236
1237 #. type: Plain text
1238 #: build/C/man3/fmemopen.3:14
1239 #, no-wrap
1240 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1241 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1242
1243 #. type: Plain text
1244 #: build/C/man3/fmemopen.3:16
1245 #, no-wrap
1246 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1247 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1248
1249 #. type: Plain text
1250 #: build/C/man3/fmemopen.3:20
1251 #, no-wrap
1252 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1253 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1254
1255 #. type: Plain text
1256 #: build/C/man3/fmemopen.3:30
1257 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1258 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1259
1260 #. type: Plain text
1261 #: build/C/man3/fmemopen.3:53
1262 msgid ""
1263 "The B<fmemopen>()  function opens a stream that permits the access specified "
1264 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1265 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1266 "long."
1267 msgstr ""
1268 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1269 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1270 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1271 "I<size> バイトの長さでなければならない。"
1272
1273 #. type: Plain text
1274 #: build/C/man3/fmemopen.3:73
1275 msgid ""
1276 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1277 "an append mode, then the initial file position is set to the location of the "
1278 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1279 "position is set to the start of the buffer.  Since glibc 2.9, the letter 'b' "
1280 "may be specified as the second character in I<mode>.  This provides \"binary"
1281 "\" mode: writes don't implicitly add a terminating null byte, and B<fseek>"
1282 "(3)  B<SEEK_END> is relative to the end of the buffer (i.e., the value "
1283 "specified by the I<size> argument), rather than the current string length."
1284 msgstr ""
1285 "引き数 I<mode> は B<fopen>(3)  の場合と同じである。 I<mode> で追記モード "
1286 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の最初の "
1287 "NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。 それ以外の場合は、ファイル"
1288 "位置の初期値はバッファの先頭になる。 glibc 2.9 以降では、文字 'b' を I<mode> "
1289 "の二番目の文字として指定することができる。 この文字は「バイナリ」モードを指定"
1290 "するものである。 このモードでは、書き込み時に文字列終端のヌルバイトが黙って追"
1291 "加 されることはない。また、 B<fseek>(3)  B<SEEK_END> は、文字列の長さからの相"
1292 "対値ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1293
1294 #. type: Plain text
1295 #: build/C/man3/fmemopen.3:85
1296 msgid ""
1297 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1298 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1299 "there is space.  The caller should ensure that an extra byte is available in "
1300 "the buffer (and that I<size> counts that byte)  to allow for this."
1301 msgstr ""
1302 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1303 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1304 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1305 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1306
1307 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1308 #.  and
1309 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1310 #. type: Plain text
1311 #: build/C/man3/fmemopen.3:103
1312 msgid ""
1313 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1314 "(By default, such errors will only be visible when the I<stdio> buffer is "
1315 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1316 "detect errors at the time of an output operation.  Alternatively, the caller "
1317 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1318 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1319 msgstr ""
1320 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1321 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1322 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1323 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1324 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1325 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1326 "stdio に教える方法がある。)"
1327
1328 #. type: Plain text
1329 #: build/C/man3/fmemopen.3:111
1330 msgid ""
1331 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1332 "not cause read operations to return an end-of-file indication.  A read from "
1333 "the buffer will only indicate end-of-file when the file pointer advances "
1334 "I<size> bytes past the start of the buffer."
1335 msgstr ""
1336 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1337 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1338 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1339 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1340
1341 #. type: Plain text
1342 #: build/C/man3/fmemopen.3:126
1343 msgid ""
1344 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1345 "buffer I<size> bytes long.  This is useful for an application that wants to "
1346 "write data to a temporary buffer and then read it back again.  The buffer is "
1347 "automatically freed when the stream is closed.  Note that the caller has no "
1348 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1349 "see B<open_memstream>()  below)."
1350 msgstr ""
1351 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1352 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1353 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1354 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1355 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1356 "の B<open_memstream>()  も参照)。"
1357
1358 #. type: Plain text
1359 #: build/C/man3/fmemopen.3:137
1360 msgid ""
1361 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1362 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1363 "automatically grows as required.  After closing the stream, the caller "
1364 "should B<free>(3)  this buffer."
1365 msgstr ""
1366 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1367 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1368 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1369 "B<free>(3)  すべきである。"
1370
1371 #. type: Plain text
1372 #: build/C/man3/fmemopen.3:152
1373 msgid ""
1374 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1375 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1376 "respectively, a pointer to the buffer and the current size of the buffer.  "
1377 "These values remain valid only as long as the caller performs no further "
1378 "output on the stream.  If further output is performed, then the stream must "
1379 "again be flushed before trying to access these variables."
1380 msgstr ""
1381 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1382 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1383 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1384 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1385 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1386
1387 #. type: Plain text
1388 #: build/C/man3/fmemopen.3:158
1389 msgid ""
1390 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1391 "included in the size value stored at I<sizeloc>."
1392 msgstr ""
1393 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1394 "されるサイズには「含まれない」。"
1395
1396 #. type: Plain text
1397 #: build/C/man3/fmemopen.3:166
1398 msgid ""
1399 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1400 "(3).  Moving the file position past the end of the data already written "
1401 "fills the intervening space with zeros."
1402 msgstr ""
1403 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1404 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1405 "は 0 で埋められる。"
1406
1407 #. type: Plain text
1408 #: build/C/man3/fmemopen.3:172
1409 msgid ""
1410 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1411 "wide characters instead of bytes."
1412 msgstr ""
1413 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1414 "ド文字に対して操作を行う点が異なる。"
1415
1416 #. type: Plain text
1417 #: build/C/man3/fmemopen.3:184
1418 msgid ""
1419 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1420 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1421 "and I<errno> is set to indicate the error."
1422 msgstr ""
1423 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1424 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1425 "し、 I<errno> にエラーを示す値をセットする。"
1426
1427 #. type: SH
1428 #: build/C/man3/fmemopen.3:184 build/C/man3/fmtmsg.3:218
1429 #: build/C/man3/getline.3:130 build/C/man2/pipe.2:113 build/C/man2/readv.2:207
1430 #, no-wrap
1431 msgid "VERSIONS"
1432 msgstr "バージョン"
1433
1434 #. type: Plain text
1435 #: build/C/man3/fmemopen.3:191
1436 msgid ""
1437 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1438 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1439 msgstr ""
1440 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1441 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1442
1443 #. type: Plain text
1444 #: build/C/man3/fmemopen.3:195
1445 msgid ""
1446 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1447 "not widely available on other systems."
1448 msgstr ""
1449 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1450 "のシステムで広く利用可能である。"
1451
1452 #. type: Plain text
1453 #: build/C/man3/fmemopen.3:201
1454 msgid ""
1455 "There is no file descriptor associated with the file stream returned by "
1456 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1457 "returned stream)."
1458 msgstr ""
1459 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1460 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1461 "とになる)。"
1462
1463 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1464 #. type: Plain text
1465 #: build/C/man3/fmemopen.3:208
1466 msgid ""
1467 "In glibc before version 2.7, seeking past the end of a stream created by "
1468 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1469 "call fails, returning -1."
1470 msgstr ""
1471 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1472 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1473 "B<fseek>(3)  が失敗し -1 が返る。"
1474
1475 #. type: SH
1476 #: build/C/man3/fmemopen.3:208 build/C/man3/fmtmsg.3:240
1477 #: build/C/man3/fopencookie.3:244 build/C/man3/getline.3:139
1478 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:974
1479 #: build/C/man2/readlink.2:155 build/C/man2/readv.2:263
1480 #, no-wrap
1481 msgid "EXAMPLE"
1482 msgstr "例"
1483
1484 #. type: Plain text
1485 #: build/C/man3/fmemopen.3:218
1486 msgid ""
1487 "The program below uses B<fmemopen>()  to open an input buffer, and "
1488 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1489 "scans its input string (taken from the program's first command-line "
1490 "argument) reading integers, and writes the squares of these integers to the "
1491 "output buffer.  An example of the output produced by this program is the "
1492 "following:"
1493 msgstr ""
1494 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1495 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1496 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1497 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1498 "ムの実行例は以下のようになる。"
1499
1500 #. type: Plain text
1501 #: build/C/man3/fmemopen.3:223
1502 #, no-wrap
1503 msgid ""
1504 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1505 "size=11; ptr=1 529 1849\n"
1506 msgstr ""
1507 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1508 "size=11; ptr=1 529 1849\n"
1509
1510 #. type: SS
1511 #: build/C/man3/fmemopen.3:225 build/C/man3/fopencookie.3:268
1512 #, no-wrap
1513 msgid "Program source"
1514 msgstr "プログラムのソース"
1515
1516 #. type: Plain text
1517 #: build/C/man3/fmemopen.3:232
1518 #, no-wrap
1519 msgid ""
1520 "#define _GNU_SOURCE\n"
1521 "#include E<lt>string.hE<gt>\n"
1522 "#include E<lt>stdio.hE<gt>\n"
1523 "#include E<lt>stdlib.hE<gt>\n"
1524 msgstr ""
1525 "#define _GNU_SOURCE\n"
1526 "#include E<lt>string.hE<gt>\n"
1527 "#include E<lt>stdio.hE<gt>\n"
1528 "#include E<lt>stdlib.hE<gt>\n"
1529
1530 #. type: Plain text
1531 #: build/C/man3/fmemopen.3:235
1532 #, no-wrap
1533 msgid ""
1534 "#define handle_error(msg) \\e\n"
1535 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1536 msgstr ""
1537 "#define handle_error(msg) \\e\n"
1538 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1539
1540 #. type: Plain text
1541 #: build/C/man3/fmemopen.3:243
1542 #, no-wrap
1543 msgid ""
1544 "int\n"
1545 "main(int argc, char *argv[])\n"
1546 "{\n"
1547 "    FILE *out, *in;\n"
1548 "    int v, s;\n"
1549 "    size_t size;\n"
1550 "    char *ptr;\n"
1551 msgstr ""
1552 "int\n"
1553 "main(int argc, char *argv[])\n"
1554 "{\n"
1555 "    FILE *out, *in;\n"
1556 "    int v, s;\n"
1557 "    size_t size;\n"
1558 "    char *ptr;\n"
1559
1560 #. type: Plain text
1561 #: build/C/man3/fmemopen.3:248
1562 #, no-wrap
1563 msgid ""
1564 "    if (argc != 2) {\n"
1565 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1566 "\texit(EXIT_FAILURE);\n"
1567 "    }\n"
1568 msgstr ""
1569 "    if (argc != 2) {\n"
1570 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1571 "\texit(EXIT_FAILURE);\n"
1572 "    }\n"
1573
1574 #. type: Plain text
1575 #: build/C/man3/fmemopen.3:252
1576 #, no-wrap
1577 msgid ""
1578 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1579 "    if (in == NULL)\n"
1580 "        handle_error(\"fmemopen\");\n"
1581 msgstr ""
1582 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1583 "    if (in == NULL)\n"
1584 "        handle_error(\"fmemopen\");\n"
1585
1586 #. type: Plain text
1587 #: build/C/man3/fmemopen.3:256
1588 #, no-wrap
1589 msgid ""
1590 "    out = open_memstream(&ptr, &size);\n"
1591 "    if (out == NULL)\n"
1592 "        handle_error(\"open_memstream\");\n"
1593 msgstr ""
1594 "    out = open_memstream(&ptr, &size);\n"
1595 "    if (out == NULL)\n"
1596 "        handle_error(\"open_memstream\");\n"
1597
1598 #. type: Plain text
1599 #: build/C/man3/fmemopen.3:261
1600 #, no-wrap
1601 msgid ""
1602 "    for (;;) {\n"
1603 "        s = fscanf(in, \"%d\", &v);\n"
1604 "        if (s E<lt>= 0)\n"
1605 "            break;\n"
1606 msgstr ""
1607 "    for (;;) {\n"
1608 "        s = fscanf(in, \"%d\", &v);\n"
1609 "        if (s E<lt>= 0)\n"
1610 "            break;\n"
1611
1612 #. type: Plain text
1613 #: build/C/man3/fmemopen.3:272
1614 #, no-wrap
1615 msgid ""
1616 "        s = fprintf(out, \"%d \", v * v);\n"
1617 "        if (s == -1)\n"
1618 "            handle_error(\"fprintf\");\n"
1619 "    }\n"
1620 "    fclose(in);\n"
1621 "    fclose(out);\n"
1622 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1623 "    free(ptr);\n"
1624 "    exit(EXIT_SUCCESS);\n"
1625 "}\n"
1626 msgstr ""
1627 "        s = fprintf(out, \"%d \", v * v);\n"
1628 "        if (s == -1)\n"
1629 "            handle_error(\"fprintf\");\n"
1630 "    }\n"
1631 "    fclose(in);\n"
1632 "    fclose(out);\n"
1633 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1634 "    free(ptr);\n"
1635 "    exit(EXIT_SUCCESS);\n"
1636 "}\n"
1637
1638 #. type: Plain text
1639 #: build/C/man3/fmemopen.3:275
1640 msgid "B<fopen>(3), B<fopencookie>(3)"
1641 msgstr "B<fopen>(3), B<fopencookie>(3)"
1642
1643 #. type: TH
1644 #: build/C/man3/fmtmsg.3:9
1645 #, no-wrap
1646 msgid "FMTMSG"
1647 msgstr "FMTMSG"
1648
1649 #. type: TH
1650 #: build/C/man3/fmtmsg.3:9
1651 #, no-wrap
1652 msgid "2008-06-14"
1653 msgstr "2008-06-14"
1654
1655 #. type: Plain text
1656 #: build/C/man3/fmtmsg.3:12
1657 msgid "fmtmsg - print formatted error messages"
1658 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1659
1660 #. type: Plain text
1661 #: build/C/man3/fmtmsg.3:15
1662 #, no-wrap
1663 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1664 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1665
1666 #. type: Plain text
1667 #: build/C/man3/fmtmsg.3:17
1668 #, no-wrap
1669 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1670 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1671
1672 #. type: Plain text
1673 #: build/C/man3/fmtmsg.3:19
1674 #, no-wrap
1675 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1676 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1677
1678 #. type: Plain text
1679 #: build/C/man3/fmtmsg.3:21
1680 #, no-wrap
1681 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1682 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1683
1684 #. type: Plain text
1685 #: build/C/man3/fmtmsg.3:32
1686 msgid ""
1687 "This function displays a message described by its arguments on the device"
1688 "(s)  specified in the I<classification> argument.  For messages written to "
1689 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1690 msgstr ""
1691 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1692 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1693 "は、 B<MSGVERB> 環境変数に依存する。"
1694
1695 #. type: Plain text
1696 #: build/C/man3/fmtmsg.3:39
1697 msgid ""
1698 "The I<label> argument identifies the source of the message.  The string must "
1699 "consist of two colon separated parts where the first part has not more than "
1700 "10 and the second part not more than 14 characters."
1701 msgstr ""
1702 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1703 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1704 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1705
1706 #. type: Plain text
1707 #: build/C/man3/fmtmsg.3:43
1708 msgid "The I<text> argument describes the condition of the error."
1709 msgstr "I<text> 引き数にはエラー条件を記述する。"
1710
1711 #. type: Plain text
1712 #: build/C/man3/fmtmsg.3:48
1713 msgid ""
1714 "The I<action> argument describes possible steps to recover from the error.  "
1715 "If it is printed, it is prefixed by \"TO FIX: \"."
1716 msgstr ""
1717 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1718 "れが表示される場合、\"TO FIX: \" が前に付く。"
1719
1720 #. type: Plain text
1721 #: build/C/man3/fmtmsg.3:56
1722 msgid ""
1723 "The I<tag> argument is a reference to the online documentation where more "
1724 "information can be found.  It should contain the I<label> value and a unique "
1725 "identification number."
1726 msgstr ""
1727 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1728 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1729
1730 #. type: SS
1731 #: build/C/man3/fmtmsg.3:56
1732 #, no-wrap
1733 msgid "Dummy arguments"
1734 msgstr "ダミー引き数"
1735
1736 #. type: Plain text
1737 #: build/C/man3/fmtmsg.3:75
1738 msgid ""
1739 "Each of the arguments can have a dummy value.  The dummy classification "
1740 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1741 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1742 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1743 "synonyms for I<((char *) 0)>, the empty string, and B<MM_NULLSEV> is a "
1744 "synonym for B<NO_SEV>."
1745 msgstr ""
1746 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1747 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1748 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1749 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1750 "((char *) 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名であ"
1751 "る。"
1752
1753 #. type: SS
1754 #: build/C/man3/fmtmsg.3:75
1755 #, no-wrap
1756 msgid "The classification argument"
1757 msgstr "classification 引き数"
1758
1759 #. type: Plain text
1760 #: build/C/man3/fmtmsg.3:79
1761 msgid ""
1762 "The I<classification> argument is the sum of values describing 4 types of "
1763 "information."
1764 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1765
1766 #. type: Plain text
1767 #: build/C/man3/fmtmsg.3:82
1768 msgid "The first value defines the output channel."
1769 msgstr "最初の値は出力チャンネルを定義する。"
1770
1771 #. type: TP
1772 #: build/C/man3/fmtmsg.3:82
1773 #, no-wrap
1774 msgid "B<MM_PRINT>"
1775 msgstr "B<MM_PRINT>"
1776
1777 #. type: Plain text
1778 #: build/C/man3/fmtmsg.3:86
1779 msgid "Output to I<stderr>."
1780 msgstr "I<stderr> に出力する。"
1781
1782 #. type: TP
1783 #: build/C/man3/fmtmsg.3:86
1784 #, no-wrap
1785 msgid "B<MM_CONSOLE>"
1786 msgstr "B<MM_CONSOLE>"
1787
1788 #. type: Plain text
1789 #: build/C/man3/fmtmsg.3:89
1790 msgid "Output to the system console."
1791 msgstr "システムコンソールに出力する。"
1792
1793 #. type: TP
1794 #: build/C/man3/fmtmsg.3:89
1795 #, no-wrap
1796 msgid "B<MM_PRINT | MM_CONSOLE>"
1797 msgstr "B<MM_PRINT | MM_CONSOLE>"
1798
1799 #. type: Plain text
1800 #: build/C/man3/fmtmsg.3:92
1801 msgid "Output to both."
1802 msgstr "両方に出力する。"
1803
1804 #. type: Plain text
1805 #: build/C/man3/fmtmsg.3:94
1806 msgid "The second value is the source of the error:"
1807 msgstr "2 番目の値はエラーの発生源である:"
1808
1809 #. type: TP
1810 #: build/C/man3/fmtmsg.3:94
1811 #, no-wrap
1812 msgid "B<MM_HARD>"
1813 msgstr "B<MM_HARD>"
1814
1815 #. type: Plain text
1816 #: build/C/man3/fmtmsg.3:97
1817 msgid "A hardware error occurred."
1818 msgstr "ハードウェアエラーが起こった。"
1819
1820 #. type: TP
1821 #: build/C/man3/fmtmsg.3:97
1822 #, no-wrap
1823 msgid "B<MM_FIRM>"
1824 msgstr "B<MM_FIRM>"
1825
1826 #. type: Plain text
1827 #: build/C/man3/fmtmsg.3:100
1828 msgid "A firmware error occurred."
1829 msgstr "ファームウェアエラーが起こった。"
1830
1831 #. type: TP
1832 #: build/C/man3/fmtmsg.3:100
1833 #, no-wrap
1834 msgid "B<MM_SOFT>"
1835 msgstr "B<MM_SOFT>"
1836
1837 #. type: Plain text
1838 #: build/C/man3/fmtmsg.3:103
1839 msgid "A software error occurred."
1840 msgstr "ソフトウェアエラーが起こった。"
1841
1842 #. type: Plain text
1843 #: build/C/man3/fmtmsg.3:105
1844 msgid "The third value encodes the detector of the problem:"
1845 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
1846
1847 #. type: TP
1848 #: build/C/man3/fmtmsg.3:105
1849 #, no-wrap
1850 msgid "B<MM_APPL>"
1851 msgstr "B<MM_APPL>"
1852
1853 #. type: Plain text
1854 #: build/C/man3/fmtmsg.3:108
1855 msgid "It is detected by an application."
1856 msgstr "アプリケーションによって検知された。"
1857
1858 #. type: TP
1859 #: build/C/man3/fmtmsg.3:108
1860 #, no-wrap
1861 msgid "B<MM_UTIL>"
1862 msgstr "B<MM_UTIL>"
1863
1864 #. type: Plain text
1865 #: build/C/man3/fmtmsg.3:111
1866 msgid "It is detected by a utility."
1867 msgstr "ユーティリティによって検知された。"
1868
1869 #. type: TP
1870 #: build/C/man3/fmtmsg.3:111
1871 #, no-wrap
1872 msgid "B<MM_OPSYS>"
1873 msgstr "B<MM_OPSYS>"
1874
1875 #. type: Plain text
1876 #: build/C/man3/fmtmsg.3:114
1877 msgid "It is detected by the operating system."
1878 msgstr "オペレーティングシステムによって検知された。"
1879
1880 #. type: Plain text
1881 #: build/C/man3/fmtmsg.3:116
1882 msgid "The fourth value shows the severity of the incident:"
1883 msgstr "4 番目の値は問題の重大度を表す:"
1884
1885 #. type: TP
1886 #: build/C/man3/fmtmsg.3:116
1887 #, no-wrap
1888 msgid "B<MM_RECOVER>"
1889 msgstr "B<MM_RECOVER>"
1890
1891 #. type: Plain text
1892 #: build/C/man3/fmtmsg.3:119
1893 msgid "It is a recoverable error."
1894 msgstr "回復可能なエラーである。"
1895
1896 #. type: TP
1897 #: build/C/man3/fmtmsg.3:119
1898 #, no-wrap
1899 msgid "B<MM_NRECOV>"
1900 msgstr "B<MM_NRECOV>"
1901
1902 #. type: Plain text
1903 #: build/C/man3/fmtmsg.3:122
1904 msgid "It is a nonrecoverable error."
1905 msgstr "回復不可能なエラーである。"
1906
1907 #. type: SS
1908 #: build/C/man3/fmtmsg.3:122
1909 #, no-wrap
1910 msgid "The severity argument"
1911 msgstr "severity 引き数"
1912
1913 #. type: Plain text
1914 #: build/C/man3/fmtmsg.3:126
1915 msgid "The I<severity> argument can take one of the following values:"
1916 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
1917
1918 #. type: TP
1919 #: build/C/man3/fmtmsg.3:126
1920 #, no-wrap
1921 msgid "B<MM_NOSEV>"
1922 msgstr "B<MM_NOSEV>"
1923
1924 #. type: Plain text
1925 #: build/C/man3/fmtmsg.3:129
1926 msgid "No severity is printed."
1927 msgstr "重大度は表示されない。"
1928
1929 #. type: TP
1930 #: build/C/man3/fmtmsg.3:129
1931 #, no-wrap
1932 msgid "B<MM_HALT>"
1933 msgstr "B<MM_HALT>"
1934
1935 #. type: Plain text
1936 #: build/C/man3/fmtmsg.3:132
1937 msgid "This value is printed as HALT."
1938 msgstr "この値は HALT として表示される。"
1939
1940 #. type: TP
1941 #: build/C/man3/fmtmsg.3:132
1942 #, no-wrap
1943 msgid "B<MM_ERROR>"
1944 msgstr "B<MM_ERROR>"
1945
1946 #. type: Plain text
1947 #: build/C/man3/fmtmsg.3:135
1948 msgid "This value is printed as ERROR."
1949 msgstr "この値は ERROR として表示される。"
1950
1951 #. type: TP
1952 #: build/C/man3/fmtmsg.3:135
1953 #, no-wrap
1954 msgid "B<MM_WARNING>"
1955 msgstr "B<MM_WARNING>"
1956
1957 #. type: Plain text
1958 #: build/C/man3/fmtmsg.3:138
1959 msgid "This value is printed as WARNING."
1960 msgstr "この値は WARNING として表示される。"
1961
1962 #. type: TP
1963 #: build/C/man3/fmtmsg.3:138
1964 #, no-wrap
1965 msgid "B<MM_INFO>"
1966 msgstr "B<MM_INFO>"
1967
1968 #. type: Plain text
1969 #: build/C/man3/fmtmsg.3:141
1970 msgid "This value is printed as INFO."
1971 msgstr "この値は INFO として表示される。"
1972
1973 #. type: Plain text
1974 #: build/C/man3/fmtmsg.3:148
1975 msgid ""
1976 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
1977 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
1978 "print."
1979 msgstr ""
1980 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
1981 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
1982
1983 #. type: Plain text
1984 #: build/C/man3/fmtmsg.3:150
1985 msgid "The function can return 4 values:"
1986 msgstr "関数は 4 つの値を返す:"
1987
1988 #. type: TP
1989 #: build/C/man3/fmtmsg.3:150
1990 #, no-wrap
1991 msgid "B<MM_OK>"
1992 msgstr "B<MM_OK>"
1993
1994 #. type: Plain text
1995 #: build/C/man3/fmtmsg.3:153
1996 msgid "Everything went smooth."
1997 msgstr "全てがうまくいった。"
1998
1999 #. type: TP
2000 #: build/C/man3/fmtmsg.3:153
2001 #, no-wrap
2002 msgid "B<MM_NOTOK>"
2003 msgstr "B<MM_NOTOK>"
2004
2005 #. type: Plain text
2006 #: build/C/man3/fmtmsg.3:156
2007 msgid "Complete failure."
2008 msgstr "完全に失敗した。"
2009
2010 #. type: TP
2011 #: build/C/man3/fmtmsg.3:156
2012 #, no-wrap
2013 msgid "B<MM_NOMSG>"
2014 msgstr "B<MM_NOMSG>"
2015
2016 #. type: Plain text
2017 #: build/C/man3/fmtmsg.3:160
2018 msgid "Error writing to I<stderr>."
2019 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2020
2021 #. type: TP
2022 #: build/C/man3/fmtmsg.3:160
2023 #, no-wrap
2024 msgid "B<MM_NOCON>"
2025 msgstr "B<MM_NOCON>"
2026
2027 #. type: Plain text
2028 #: build/C/man3/fmtmsg.3:163
2029 msgid "Error writing to the console."
2030 msgstr "コンソールに書き込むときにエラーが起こった。"
2031
2032 #. type: SH
2033 #: build/C/man3/fmtmsg.3:163
2034 #, no-wrap
2035 msgid "ENVIRONMENT"
2036 msgstr "環境変数"
2037
2038 #. type: Plain text
2039 #: build/C/man3/fmtmsg.3:174
2040 msgid ""
2041 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2042 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2043 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2044 "separated list of valid keywords, then only the parts of the message "
2045 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2046 "\"severity\", \"text\", \"action\" and \"tag\"."
2047 msgstr ""
2048 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2049 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2050 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2051 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2052 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2053
2054 #. type: Plain text
2055 #: build/C/man3/fmtmsg.3:186
2056 msgid ""
2057 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2058 "levels.  By default, only the five severity levels described above are "
2059 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2060 "If the user puts B<SEV_LEVEL> with a format like"
2061 msgstr ""
2062 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2063 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2064 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2065 "B<SEV_LEVEL> を"
2066
2067 #. type: Plain text
2068 #: build/C/man3/fmtmsg.3:189
2069 msgid "SEV_LEVEL=[description[:description[:...]]]"
2070 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2071
2072 #. type: Plain text
2073 #: build/C/man3/fmtmsg.3:194
2074 msgid ""
2075 "in the environment of the process before the first call to B<fmtmsg>(), "
2076 "where each description is of the form"
2077 msgstr ""
2078 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2079 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2080 "指定された printstring を表示する。 各 description は"
2081
2082 #. type: Plain text
2083 #: build/C/man3/fmtmsg.3:197
2084 msgid "severity-keyword,level,printstring"
2085 msgstr "severity-keyword,level,printstring"
2086
2087 #. type: Plain text
2088 #: build/C/man3/fmtmsg.3:204
2089 msgid ""
2090 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2091 "addition to the standard levels 0-4), and use the indicated printstring when "
2092 "such a level occurs."
2093 msgstr "という形式である。"
2094
2095 #. type: Plain text
2096 #: build/C/man3/fmtmsg.3:218
2097 msgid ""
2098 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2099 "present.  The level part is a string representation of a number.  The "
2100 "numeric value must be a number greater than 4.  This value must be used in "
2101 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2102 "possible to overwrite any of the predefined classes.  The printstring is the "
2103 "string printed when a message of this class is processed by B<fmtmsg>()."
2104 msgstr ""
2105 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2106 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2107 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2108 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2109 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2110 "た場合に表示される文字列である。"
2111
2112 #. type: Plain text
2113 #: build/C/man3/fmtmsg.3:221
2114 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2115 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2116
2117 #. type: Plain text
2118 #: build/C/man3/fmtmsg.3:236
2119 msgid ""
2120 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2121 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2122 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2123 msgstr ""
2124 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2125 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2126 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2127
2128 #. type: Plain text
2129 #: build/C/man3/fmtmsg.3:240
2130 msgid ""
2131 "System V and UnixWare man pages tell us that these functions have been "
2132 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2133 "vlfmt()\", and will be removed later."
2134 msgstr ""
2135 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2136 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2137 "は削除される予定である」と書かれている。"
2138
2139 #. type: Plain text
2140 #: build/C/man3/fmtmsg.3:245
2141 #, no-wrap
2142 msgid ""
2143 "#include E<lt>stdio.hE<gt>\n"
2144 "#include E<lt>stdlib.hE<gt>\n"
2145 "#include E<lt>fmtmsg.hE<gt>\n"
2146 msgstr ""
2147 "#include E<lt>stdio.hE<gt>\n"
2148 "#include E<lt>stdlib.hE<gt>\n"
2149 "#include E<lt>fmtmsg.hE<gt>\n"
2150
2151 #. type: Plain text
2152 #: build/C/man3/fmtmsg.3:251
2153 #, no-wrap
2154 msgid ""
2155 "int\n"
2156 "main(void)\n"
2157 "{\n"
2158 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2159 "    int err;\n"
2160 msgstr ""
2161 "int\n"
2162 "main(void)\n"
2163 "{\n"
2164 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2165 "    int err;\n"
2166
2167 #. type: Plain text
2168 #: build/C/man3/fmtmsg.3:272
2169 #, no-wrap
2170 msgid ""
2171 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2172 "                \"unknown mount option\", \"See mount(8).\",\n"
2173 "                \"util-linux:mount:017\");\n"
2174 "    switch (err) {\n"
2175 "    case MM_OK:\n"
2176 "        break;\n"
2177 "    case MM_NOTOK:\n"
2178 "        printf(\"Nothing printed\\en\");\n"
2179 "        break;\n"
2180 "    case MM_NOMSG:\n"
2181 "        printf(\"Nothing printed to stderr\\en\");\n"
2182 "        break;\n"
2183 "    case MM_NOCON:\n"
2184 "        printf(\"No console output\\en\");\n"
2185 "        break;\n"
2186 "    default:\n"
2187 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2188 "    }\n"
2189 "    exit(EXIT_SUCCESS);\n"
2190 "}\n"
2191 msgstr ""
2192 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2193 "                \"unknown mount option\", \"See mount(8).\",\n"
2194 "                \"util-linux:mount:017\");\n"
2195 "    switch (err) {\n"
2196 "    case MM_OK:\n"
2197 "      break;\n"
2198 "    case MM_NOTOK:\n"
2199 "        printf(\"Nothing printed\\en\");\n"
2200 "        break;\n"
2201 "    case MM_NOMSG:\n"
2202 "        printf(\"Nothing printed to stderr\\en\");\n"
2203 "        break;\n"
2204 "    case MM_NOCON:\n"
2205 "        printf(\"No console output\\en\");\n"
2206 "        break;\n"
2207 "    default:\n"
2208 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2209 "    }\n"
2210 "    exit(EXIT_SUCCESS);\n"
2211 "}\n"
2212
2213 #. type: Plain text
2214 #: build/C/man3/fmtmsg.3:275
2215 msgid "The output should be:"
2216 msgstr "出力は"
2217
2218 #. type: Plain text
2219 #: build/C/man3/fmtmsg.3:279
2220 #, no-wrap
2221 msgid ""
2222 "    util-linux:mount: ERROR: unknown mount option\n"
2223 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2224 msgstr ""
2225 "    util-linux:mount: ERROR: unknown mount option\n"
2226 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2227
2228 #. type: Plain text
2229 #: build/C/man3/fmtmsg.3:282
2230 msgid "and after"
2231 msgstr "のようになり、"
2232
2233 #. type: Plain text
2234 #: build/C/man3/fmtmsg.3:285
2235 #, no-wrap
2236 msgid "    MSGVERB=text:action; export MSGVERB\n"
2237 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2238
2239 #. type: Plain text
2240 #: build/C/man3/fmtmsg.3:288
2241 msgid "the output becomes:"
2242 msgstr "を実行すると、次のようになる。"
2243
2244 #. type: Plain text
2245 #: build/C/man3/fmtmsg.3:292
2246 #, no-wrap
2247 msgid ""
2248 "    unknown mount option\n"
2249 "    TO FIX: See mount(8).\n"
2250 msgstr ""
2251 "    unknown mount option\n"
2252 "    TO FIX: See mount(8).\n"
2253
2254 #. type: Plain text
2255 #: build/C/man3/fmtmsg.3:295
2256 msgid "B<addseverity>(3), B<perror>(3)"
2257 msgstr "B<addseverity>(3), B<perror>(3)"
2258
2259 #. type: TH
2260 #: build/C/man3/fopen.3:42
2261 #, no-wrap
2262 msgid "FOPEN"
2263 msgstr "FOPEN"
2264
2265 #. type: Plain text
2266 #: build/C/man3/fopen.3:45
2267 msgid "fopen, fdopen, freopen - stream open functions"
2268 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2269
2270 #. type: Plain text
2271 #: build/C/man3/fopen.3:50
2272 #, no-wrap
2273 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2274 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2275
2276 #. type: Plain text
2277 #: build/C/man3/fopen.3:52
2278 #, no-wrap
2279 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2280 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2281
2282 #. type: Plain text
2283 #: build/C/man3/fopen.3:54
2284 #, no-wrap
2285 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2286 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2287
2288 #. type: Plain text
2289 #: build/C/man3/fopen.3:63
2290 msgid ""
2291 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2292 msgstr ""
2293 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2294
2295 #. type: Plain text
2296 #: build/C/man3/fopen.3:69
2297 msgid ""
2298 "The B<fopen>()  function opens the file whose name is the string pointed to "
2299 "by I<path> and associates a stream with it."
2300 msgstr ""
2301 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2302 "びつける。"
2303
2304 #. type: Plain text
2305 #: build/C/man3/fopen.3:74
2306 msgid ""
2307 "The argument I<mode> points to a string beginning with one of the following "
2308 "sequences (Additional characters may follow these sequences.):"
2309 msgstr ""
2310 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタである (追"
2311 "加の文字がこの文字の後に続くこともある):"
2312
2313 #. type: TP
2314 #: build/C/man3/fopen.3:74
2315 #, no-wrap
2316 msgid "B<r>"
2317 msgstr "B<r>"
2318
2319 #. type: Plain text
2320 #: build/C/man3/fopen.3:78
2321 msgid ""
2322 "Open text file for reading.  The stream is positioned at the beginning of "
2323 "the file."
2324 msgstr ""
2325 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2326 "る。"
2327
2328 #. type: TP
2329 #: build/C/man3/fopen.3:78
2330 #, no-wrap
2331 msgid "B<r+>"
2332 msgstr "B<r+>"
2333
2334 #. type: Plain text
2335 #: build/C/man3/fopen.3:82
2336 msgid ""
2337 "Open for reading and writing.  The stream is positioned at the beginning of "
2338 "the file."
2339 msgstr ""
2340 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2341 "る。"
2342
2343 #. type: TP
2344 #: build/C/man3/fopen.3:82
2345 #, no-wrap
2346 msgid "B<w>"
2347 msgstr "B<w>"
2348
2349 #. type: Plain text
2350 #: build/C/man3/fopen.3:86
2351 msgid ""
2352 "Truncate file to zero length or create text file for writing.  The stream is "
2353 "positioned at the beginning of the file."
2354 msgstr ""
2355 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2356 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2357 "頭に位置される。"
2358
2359 #. type: TP
2360 #: build/C/man3/fopen.3:86
2361 #, no-wrap
2362 msgid "B<w+>"
2363 msgstr "B<w+>"
2364
2365 #. type: Plain text
2366 #: build/C/man3/fopen.3:92
2367 msgid ""
2368 "Open for reading and writing.  The file is created if it does not exist, "
2369 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2370 "file."
2371 msgstr ""
2372 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2373 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2374 "の先頭に位置される。"
2375
2376 #. type: TP
2377 #: build/C/man3/fopen.3:92 build/C/man3/scanf.3:444
2378 #, no-wrap
2379 msgid "B<a>"
2380 msgstr "B<a>"
2381
2382 #. type: Plain text
2383 #: build/C/man3/fopen.3:97
2384 msgid ""
2385 "Open for appending (writing at end of file).  The file is created if it does "
2386 "not exist.  The stream is positioned at the end of the file."
2387 msgstr ""
2388 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2389 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2390
2391 #. type: TP
2392 #: build/C/man3/fopen.3:97
2393 #, no-wrap
2394 msgid "B<a+>"
2395 msgstr "B<a+>"
2396
2397 #. type: Plain text
2398 #: build/C/man3/fopen.3:103
2399 msgid ""
2400 "Open for reading and appending (writing at end of file).  The file is "
2401 "created if it does not exist.  The initial file position for reading is at "
2402 "the beginning of the file, but output is always appended to the end of the "
2403 "file."
2404 msgstr ""
2405 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2406 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2407 "あるが、 書き込みは常にファイルの最後に追加される。"
2408
2409 #. type: Plain text
2410 #: build/C/man3/fopen.3:116
2411 msgid ""
2412 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2413 "character or as a character between the characters in any of the two-"
2414 "character strings described above.  This is strictly for compatibility with "
2415 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2416 "systems, including Linux.  (Other systems may treat text files and binary "
2417 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2418 "O to a binary file and expect that your program may be ported to non-UNIX "
2419 "environments.)"
2420 msgstr ""
2421 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2422 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2423 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2424 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2425 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2426 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2427 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2428 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2429
2430 #. type: Plain text
2431 #: build/C/man3/fopen.3:119
2432 msgid "See NOTES below for details of glibc extensions for I<mode>."
2433 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2434
2435 #. type: Plain text
2436 #: build/C/man3/fopen.3:124
2437 msgid ""
2438 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2439 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2440 "umask value (see B<umask>(2))."
2441 msgstr ""
2442 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2443 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2444 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2445
2446 #. type: Plain text
2447 #: build/C/man3/fopen.3:139
2448 msgid ""
2449 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2450 "that ANSI C requires that a file positioning function intervene between "
2451 "output and input, unless an input operation encounters end-of-file.  (If "
2452 "this condition is not met, then a read is allowed to return the result of "
2453 "writes other than the most recent.)  Therefore it is good practice (and "
2454 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2455 "(3)  operation between write and read operations on such a stream.  This "
2456 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2457 "for its synchronizing side effect."
2458 msgstr ""
2459 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2460 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2461 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2462 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2463 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2464 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2465 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2466 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2467 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2468 "い)。"
2469
2470 #. type: Plain text
2471 #: build/C/man3/fopen.3:144
2472 msgid ""
2473 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2474 "causes all subsequent write operations to this stream to occur at end-of-"
2475 "file, as if preceded by an"
2476 msgstr ""
2477 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、 このスト"
2478 "リームに対する書き込み操作は (先に"
2479
2480 #. type: Plain text
2481 #: build/C/man3/fopen.3:147
2482 #, no-wrap
2483 msgid "    fseek(stream,0,SEEK_END);\n"
2484 msgstr "    fseek(stream,0,SEEK_END);\n"
2485
2486 #. type: Plain text
2487 #: build/C/man3/fopen.3:150
2488 msgid "call."
2489 msgstr "の呼び出しを実行したかのように) ファイル末尾に対して行われる。"
2490
2491 #. type: Plain text
2492 #: build/C/man3/fopen.3:171
2493 msgid ""
2494 "The B<fdopen>()  function associates a stream with the existing file "
2495 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2496 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2497 "file descriptor.  The file position indicator of the new stream is set to "
2498 "that belonging to I<fd>, and the error and end-of-file indicators are "
2499 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2500 "file descriptor is not dup'ed, and will be closed when the stream created by "
2501 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2502 "memory object is undefined."
2503 msgstr ""
2504 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2505 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2506 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2507 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2508 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2509 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2510 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2511 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2512
2513 #. type: Plain text
2514 #: build/C/man3/fopen.3:189
2515 msgid ""
2516 "The B<freopen>()  function opens the file whose name is the string pointed "
2517 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2518 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2519 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2520 "function is to change the file associated with a standard text stream "
2521 "(I<stderr>, I<stdin>, or I<stdout>)."
2522 msgstr ""
2523 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2524 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2525 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2526 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2527 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2528
2529 #. type: Plain text
2530 #: build/C/man3/fopen.3:201
2531 msgid ""
2532 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2533 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2534 "indicate the error."
2535 msgstr ""
2536 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2537 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2538
2539 #. type: TP
2540 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:138
2541 #: build/C/man3/getline.3:121 build/C/man2/llseek.2:72
2542 #: build/C/man2/lseek.2:164 build/C/man2/pipe.2:102 build/C/man2/read.2:108
2543 #: build/C/man2/read.2:119 build/C/man2/readlink.2:93
2544 #: build/C/man2/readlink.2:102 build/C/man2/readv.2:198
2545 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:563
2546 #: build/C/man2/write.2:148
2547 #, no-wrap
2548 msgid "B<EINVAL>"
2549 msgstr "B<EINVAL>"
2550
2551 #. type: Plain text
2552 #: build/C/man3/fopen.3:212
2553 msgid ""
2554 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2555 "invalid."
2556 msgstr ""
2557 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2558
2559 #. type: Plain text
2560 #: build/C/man3/fopen.3:222
2561 msgid ""
2562 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2563 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2564 msgstr ""
2565 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2566 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2567 "する。"
2568
2569 #. type: Plain text
2570 #: build/C/man3/fopen.3:229
2571 msgid ""
2572 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2573 "errors specified for the routine B<open>(2)."
2574 msgstr ""
2575 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2576 "があり、 その時は対応する値に I<errno> をセットする。"
2577
2578 #. type: Plain text
2579 #: build/C/man3/fopen.3:236
2580 msgid ""
2581 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2582 "errors specified for the routine B<fcntl>(2)."
2583 msgstr ""
2584 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2585 "とがあり、 その時は対応する値に I<errno> をセットする。"
2586
2587 #. type: Plain text
2588 #: build/C/man3/fopen.3:246
2589 msgid ""
2590 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2591 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2592 msgstr ""
2593 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2594 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2595 "トする。"
2596
2597 #. type: Plain text
2598 #: build/C/man3/fopen.3:255
2599 msgid ""
2600 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2601 "()  function conforms to POSIX.1-1990."
2602 msgstr ""
2603 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2604 "は POSIX.1-1990 に準拠している。"
2605
2606 #. type: SS
2607 #: build/C/man3/fopen.3:256
2608 #, no-wrap
2609 msgid "Glibc Notes"
2610 msgstr "glibc での注意"
2611
2612 #. type: Plain text
2613 #: build/C/man3/fopen.3:259
2614 msgid ""
2615 "The GNU C library allows the following extensions for the string specified "
2616 "in I<mode>:"
2617 msgstr ""
2618 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2619 "いる:"
2620
2621 #. type: TP
2622 #: build/C/man3/fopen.3:259
2623 #, no-wrap
2624 msgid "B<c> (since glibc 2.3.3)"
2625 msgstr "B<c> (glibc 2.3.3 以降)"
2626
2627 #. type: Plain text
2628 #: build/C/man3/fopen.3:264
2629 msgid ""
2630 "Do not make the open operation, or subsequent read and write operations, "
2631 "thread cancellation points."
2632 msgstr ""
2633 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント "
2634 "(cancellation points)  を作成しない。"
2635
2636 #. type: TP
2637 #: build/C/man3/fopen.3:264
2638 #, no-wrap
2639 msgid "B<e> (since glibc 2.7)"
2640 msgstr "B<e> (glibc 2.7 以降)"
2641
2642 #. type: Plain text
2643 #: build/C/man3/fopen.3:272
2644 msgid ""
2645 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2646 "information."
2647 msgstr ""
2648 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。 詳細は B<open>(2)  を"
2649 "参照。"
2650
2651 #. type: TP
2652 #: build/C/man3/fopen.3:272
2653 #, no-wrap
2654 msgid "B<m> (since glibc 2.3)"
2655 msgstr "B<m> (glibc 2.3 以降)"
2656
2657 #.  As at glibc 2.4:
2658 #. type: Plain text
2659 #: build/C/man3/fopen.3:284
2660 msgid ""
2661 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2662 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is only attempted "
2663 "for a file opened for reading."
2664 msgstr ""
2665 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2666 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2667 "オープンするファイルについてだけである。"
2668
2669 #. type: TP
2670 #: build/C/man3/fopen.3:284 build/C/man3/scanf.3:418
2671 #, no-wrap
2672 msgid "B<x>"
2673 msgstr "B<x>"
2674
2675 #.  Since glibc 2.0?
2676 #.  FIXME C11 specifies this flag
2677 #.  FIXME document /,ccs= charset/
2678 #. type: Plain text
2679 #: build/C/man3/fopen.3:302
2680 msgid ""
2681 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2682 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2683 "This flag is ignored for B<fdopen>()."
2684 msgstr ""
2685 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2686 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2687 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2688
2689 #. type: Plain text
2690 #: build/C/man3/fopen.3:307
2691 msgid ""
2692 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2693 msgstr ""
2694 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2695
2696 #. type: TH
2697 #: build/C/man3/fopencookie.3:24
2698 #, no-wrap
2699 msgid "FOPENCOOKIE"
2700 msgstr "FOPENCOOKIE"
2701
2702 #. type: TH
2703 #: build/C/man3/fopencookie.3:24
2704 #, no-wrap
2705 msgid "2008-12-05"
2706 msgstr "2008-12-05"
2707
2708 #. type: TH
2709 #: build/C/man3/fopencookie.3:24 build/C/man2/link.2:31
2710 #: build/C/man2/llseek.2:26 build/C/man2/lseek.2:45 build/C/man3/lseek64.3:23
2711 #: build/C/man2/open.2:52 build/C/man2/pipe.2:36 build/C/man2/read.2:35
2712 #: build/C/man2/readlink.2:41 build/C/man2/readv.2:30 build/C/man2/rename.2:32
2713 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:46 build/C/man3/stdin.3:9
2714 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:35
2715 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
2716 #, no-wrap
2717 msgid "Linux"
2718 msgstr "Linux"
2719
2720 #. type: Plain text
2721 #: build/C/man3/fopencookie.3:27
2722 msgid "fopencookie - opening a custom stream"
2723 msgstr "fopencookie - opening a custom stream"
2724
2725 #. type: Plain text
2726 #: build/C/man3/fopencookie.3:34
2727 #, no-wrap
2728 msgid ""
2729 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2730 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2731 msgstr ""
2732 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2733 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2734
2735 #. type: Plain text
2736 #: build/C/man3/fopencookie.3:47
2737 msgid ""
2738 "The B<fopencookie>()  function allows the programmer to create a custom "
2739 "implementation for a standard I/O stream.  This implementation can store the "
2740 "stream's data at a location of its own choosing; for example, B<fopencookie>"
2741 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
2742 "to data that is stored in a buffer in memory."
2743 msgstr ""
2744 "The B<fopencookie>()  function allows the programmer to create a custom "
2745 "implementation for a standard I/O stream.  This implementation can store the "
2746 "stream's data at a location of its own choosing; for example, B<fopencookie>"
2747 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
2748 "to data that is stored in a buffer in memory."
2749
2750 #. type: Plain text
2751 #: build/C/man3/fopencookie.3:49
2752 msgid "In order to create a custom stream the programmer must:"
2753 msgstr "In order to create a custom stream the programmer must:"
2754
2755 #. type: IP
2756 #: build/C/man3/fopencookie.3:49 build/C/man3/fopencookie.3:52
2757 #: build/C/man3/fopencookie.3:63 build/C/man3/scanf.3:669
2758 #: build/C/man3/scanf.3:674 build/C/man3/scanf.3:680
2759 #: build/C/man7/symlink.7:248 build/C/man7/symlink.7:258
2760 #: build/C/man7/symlink.7:288 build/C/man7/symlink.7:348
2761 #: build/C/man7/symlink.7:377 build/C/man7/symlink.7:406
2762 #: build/C/man7/symlink.7:437 build/C/man7/symlink.7:450
2763 #, no-wrap
2764 msgid "*"
2765 msgstr "*"
2766
2767 #. type: Plain text
2768 #: build/C/man3/fopencookie.3:52
2769 msgid ""
2770 "Implement four \"hook\" functions that are used internally by the standard I/"
2771 "O library when performing I/O on the stream."
2772 msgstr ""
2773 "Implement four \"hook\" functions that are used internally by the standard I/"
2774 "O library when performing I/O on the stream."
2775
2776 #. type: Plain text
2777 #: build/C/man3/fopencookie.3:63
2778 msgid ""
2779 "Define a \"cookie\" data type, a structure that provides bookkeeping "
2780 "information (e.g., where to store data) used by the aforementioned hook "
2781 "functions.  The standard I/O package knows nothing about the contents of "
2782 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
2783 "()), but automatically supplies the cookie as the first argument when "
2784 "calling the hook functions."
2785 msgstr ""
2786 "Define a \"cookie\" data type, a structure that provides bookkeeping "
2787 "information (e.g., where to store data) used by the aforementioned hook "
2788 "functions.  The standard I/O package knows nothing about the contents of "
2789 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
2790 "()), but automatically supplies the cookie as the first argument when "
2791 "calling the hook functions."
2792
2793 #. type: Plain text
2794 #: build/C/man3/fopencookie.3:68
2795 msgid ""
2796 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
2797 "hook functions with that stream."
2798 msgstr ""
2799 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
2800 "hook functions with that stream."
2801
2802 #. type: Plain text
2803 #: build/C/man3/fopencookie.3:76
2804 msgid ""
2805 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
2806 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
2807 "operate on that stream."
2808 msgstr ""
2809 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
2810 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
2811 "operate on that stream."
2812
2813 #. type: Plain text
2814 #: build/C/man3/fopencookie.3:83
2815 msgid ""
2816 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
2817 "to be associated with the new stream.  This pointer is supplied as the first "
2818 "argument when the standard I/O library invokes any of the hook functions "
2819 "described below."
2820 msgstr ""
2821 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
2822 "to be associated with the new stream.  This pointer is supplied as the first "
2823 "argument when the standard I/O library invokes any of the hook functions "
2824 "described below."
2825
2826 #. type: Plain text
2827 #: build/C/man3/fopencookie.3:99
2828 msgid ""
2829 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
2830 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
2831 "See B<fopen>(3)  for details."
2832 msgstr ""
2833 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
2834 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
2835 "See B<fopen>(3)  for details."
2836
2837 #. type: Plain text
2838 #: build/C/man3/fopencookie.3:105
2839 msgid ""
2840 "The I<io_funcs> argument is a structure that contains four fields pointing "
2841 "to the programmer-defined hook functions that are used to implement this "
2842 "stream.  The structure is defined as follows"
2843 msgstr ""
2844 "The I<io_funcs> argument is a structure that contains four fields pointing "
2845 "to the programmer-defined hook functions that are used to implement this "
2846 "stream.  The structure is defined as follows"
2847
2848 #. type: Plain text
2849 #: build/C/man3/fopencookie.3:114
2850 #, no-wrap
2851 msgid ""
2852 "struct cookie_io_functions_t {\n"
2853 "    cookie_read_function_t  *read;\n"
2854 "    cookie_write_function_t *write;\n"
2855 "    cookie_seek_function_t  *seek;\n"
2856 "    cookie_close_function_t *close;\n"
2857 "};\n"
2858 msgstr ""
2859 "struct cookie_io_functions_t {\n"
2860 "    cookie_read_function_t  *read;\n"
2861 "    cookie_write_function_t *write;\n"
2862 "    cookie_seek_function_t  *seek;\n"
2863 "    cookie_close_function_t *close;\n"
2864 "};\n"
2865
2866 #. type: Plain text
2867 #: build/C/man3/fopencookie.3:118
2868 msgid "The four fields are as follows:"
2869 msgstr "The four fields are as follows:"
2870
2871 #. type: TP
2872 #: build/C/man3/fopencookie.3:118
2873 #, no-wrap
2874 msgid "I<cookie_read_function_t *read>"
2875 msgstr "I<cookie_read_function_t *read>"
2876
2877 #. type: Plain text
2878 #: build/C/man3/fopencookie.3:122
2879 msgid ""
2880 "This function implements read operations for the stream.  When called, it "
2881 "receives three arguments:"
2882 msgstr ""
2883 "This function implements read operations for the stream.  When called, it "
2884 "receives three arguments:"
2885
2886 #. type: Plain text
2887 #: build/C/man3/fopencookie.3:124
2888 #, no-wrap
2889 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2890 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2891
2892 #. type: Plain text
2893 #: build/C/man3/fopencookie.3:139
2894 msgid ""
2895 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
2896 "input data can be placed and the size of that buffer.  As its function "
2897 "result, the I<read> function should return the number of bytes copied into "
2898 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
2899 "update the stream offset appropriately."
2900 msgstr ""
2901 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
2902 "input data can be placed and the size of that buffer.  As its function "
2903 "result, the I<read> function should return the number of bytes copied into "
2904 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
2905 "update the stream offset appropriately."
2906
2907 #. type: Plain text
2908 #: build/C/man3/fopencookie.3:144
2909 msgid ""
2910 "If I<*read> is a NULL pointer, then reads from the custom stream always "
2911 "return end of file."
2912 msgstr ""
2913 "If I<*read> is a NULL pointer, then reads from the custom stream always "
2914 "return end of file."
2915
2916 #. type: TP
2917 #: build/C/man3/fopencookie.3:144
2918 #, no-wrap
2919 msgid "I<cookie_write_function_t *write>"
2920 msgstr "I<cookie_write_function_t *write>"
2921
2922 #. type: Plain text
2923 #: build/C/man3/fopencookie.3:148
2924 msgid ""
2925 "This function implements write operations for the stream.  When called, it "
2926 "receives three arguments:"
2927 msgstr ""
2928 "This function implements write operations for the stream.  When called, it "
2929 "receives three arguments:"
2930
2931 #. type: Plain text
2932 #: build/C/man3/fopencookie.3:150
2933 #, no-wrap
2934 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
2935 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
2936
2937 #. type: Plain text
2938 #: build/C/man3/fopencookie.3:165
2939 msgid ""
2940 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
2941 "output to the stream and the size of that buffer.  As its function result, "
2942 "the I<write> function should return the number of bytes copied from I<buf>, "
2943 "or -1 on error.  The I<write> function should update the stream offset "
2944 "appropriately."
2945 msgstr ""
2946 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
2947 "output to the stream and the size of that buffer.  As its function result, "
2948 "the I<write> function should return the number of bytes copied from I<buf>, "
2949 "or -1 on error.  The I<write> function should update the stream offset "
2950 "appropriately."
2951
2952 #. type: Plain text
2953 #: build/C/man3/fopencookie.3:170
2954 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
2955 msgstr ""
2956 "If I<*write> is a NULL pointer, then output to the stream is discarded."
2957
2958 #. type: TP
2959 #: build/C/man3/fopencookie.3:170
2960 #, no-wrap
2961 msgid "I<cookie_seek_function_t *seek>"
2962 msgstr "I<cookie_seek_function_t *seek>"
2963
2964 #. type: Plain text
2965 #: build/C/man3/fopencookie.3:174
2966 msgid ""
2967 "This function implements seek operations on the stream.  When called, it "
2968 "receives three arguments:"
2969 msgstr ""
2970 "This function implements seek operations on the stream.  When called, it "
2971 "receives three arguments:"
2972
2973 #. type: Plain text
2974 #: build/C/man3/fopencookie.3:176
2975 #, no-wrap
2976 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
2977 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
2978
2979 #. type: Plain text
2980 #: build/C/man3/fopencookie.3:182
2981 msgid ""
2982 "The I<*offset> argument specifies the new file offset depending on which of "
2983 "the following three values is supplied in I<whence>:"
2984 msgstr ""
2985 "The I<*offset> argument specifies the new file offset depending on which of "
2986 "the following three values is supplied in I<whence>:"
2987
2988 #. type: TP
2989 #: build/C/man3/fopencookie.3:183 build/C/man2/lseek.2:65
2990 #, no-wrap
2991 msgid "B<SEEK_SET>"
2992 msgstr "B<SEEK_SET>"
2993
2994 #. type: Plain text
2995 #: build/C/man3/fopencookie.3:188
2996 msgid ""
2997 "The stream offset should be set I<*offset> bytes from the start of the "
2998 "stream."
2999 msgstr ""
3000 "The stream offset should be set I<*offset> bytes from the start of the "
3001 "stream."
3002
3003 #. type: TP
3004 #: build/C/man3/fopencookie.3:188 build/C/man2/lseek.2:70
3005 #, no-wrap
3006 msgid "B<SEEK_CUR>"
3007 msgstr "B<SEEK_CUR>"
3008
3009 #. type: Plain text
3010 #: build/C/man3/fopencookie.3:192
3011 msgid "I<*offset> should be added to the current stream offset."
3012 msgstr "I<*offset> should be added to the current stream offset."
3013
3014 #. type: TP
3015 #: build/C/man3/fopencookie.3:192 build/C/man2/lseek.2:75
3016 #, no-wrap
3017 msgid "B<SEEK_END>"
3018 msgstr "B<SEEK_END>"
3019
3020 #. type: Plain text
3021 #: build/C/man3/fopencookie.3:196
3022 msgid ""
3023 "The stream offset should be set to the size of the stream plus I<*offset>."
3024 msgstr ""
3025 "The stream offset should be set to the size of the stream plus I<*offset>."
3026
3027 #. type: Plain text
3028 #: build/C/man3/fopencookie.3:203
3029 msgid ""
3030 "Before returning, the I<seek> function should update I<*offset> to indicate "
3031 "the new stream offset."
3032 msgstr ""
3033 "Before returning, the I<seek> function should update I<*offset> to indicate "
3034 "the new stream offset."
3035
3036 #. type: Plain text
3037 #: build/C/man3/fopencookie.3:207
3038 msgid ""
3039 "As its function result, the I<seek> function should return 0 on success, and "
3040 "-1 on error."
3041 msgstr ""
3042 "As its function result, the I<seek> function should return 0 on success, and "
3043 "-1 on error."
3044
3045 #. type: Plain text
3046 #: build/C/man3/fopencookie.3:212
3047 msgid ""
3048 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3049 "operations on the stream."
3050 msgstr ""
3051 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3052 "operations on the stream."
3053
3054 #. type: TP
3055 #: build/C/man3/fopencookie.3:212
3056 #, no-wrap
3057 msgid "I<cookie_close_function_t *close>"
3058 msgstr "I<cookie_close_function_t *close>"
3059
3060 #. type: Plain text
3061 #: build/C/man3/fopencookie.3:218
3062 msgid ""
3063 "This function closes the stream.  The hook function can do things such as "
3064 "freeing buffers allocated for the stream.  When called, it receives one "
3065 "argument:"
3066 msgstr ""
3067 "This function closes the stream.  The hook function can do things such as "
3068 "freeing buffers allocated for the stream.  When called, it receives one "
3069 "argument:"
3070
3071 #. type: Plain text
3072 #: build/C/man3/fopencookie.3:220
3073 #, no-wrap
3074 msgid "    int close(void *cookie);\n"
3075 msgstr "    int close(void *cookie);\n"
3076
3077 #. type: Plain text
3078 #: build/C/man3/fopencookie.3:225
3079 msgid ""
3080 "The I<cookie> argument is the cookie that the programmer supplied when "
3081 "calling B<fopencookie>()."
3082 msgstr ""
3083 "The I<cookie> argument is the cookie that the programmer supplied when "
3084 "calling B<fopencookie>()."
3085
3086 #. type: Plain text
3087 #: build/C/man3/fopencookie.3:231
3088 msgid ""
3089 "As its function result, the I<close> function should return 0 on success, "
3090 "and B<EOF> on error."
3091 msgstr ""
3092 "As its function result, the I<close> function should return 0 on success, "
3093 "and B<EOF> on error."
3094
3095 #. type: Plain text
3096 #: build/C/man3/fopencookie.3:235
3097 msgid ""
3098 "If I<*close> is NULL, then no special action is performed when the stream is "
3099 "closed."
3100 msgstr ""
3101 "If I<*close> is NULL, then no special action is performed when the stream is "
3102 "closed."
3103
3104 #.  .SH ERRORS
3105 #.  It's not clear if errno ever gets set...
3106 #. type: Plain text
3107 #: build/C/man3/fopencookie.3:242
3108 msgid ""
3109 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3110 "NULL is returned."
3111 msgstr ""
3112 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3113 "NULL is returned."
3114
3115 #. type: Plain text
3116 #: build/C/man3/fopencookie.3:244
3117 msgid "This function is a nonstandard GNU extension."
3118 msgstr "This function is a nonstandard GNU extension."
3119
3120 #. type: Plain text
3121 #: build/C/man3/fopencookie.3:253
3122 msgid ""
3123 "The program below implements a custom stream whose functionality is similar "
3124 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3125 "stream whose data is stored in a memory buffer.  The program writes its "
3126 "command-line arguments to the stream, and then seeks through the stream "
3127 "reading two out of every five characters and writing them to standard "
3128 "output.  The following shell session demonstrates the use of the program:"
3129 msgstr ""
3130 "The program below implements a custom stream whose functionality is similar "
3131 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3132 "stream whose data is stored in a memory buffer.  The program writes its "
3133 "command-line arguments to the stream, and then seeks through the stream "
3134 "reading two out of every five characters and writing them to standard "
3135 "output.  The following shell session demonstrates the use of the program:"
3136
3137 #. type: Plain text
3138 #: build/C/man3/fopencookie.3:261
3139 #, no-wrap
3140 msgid ""
3141 "$B< ./a.out \\(aqhello world\\(aq>\n"
3142 "/he/\n"
3143 "/ w/\n"
3144 "/d/\n"
3145 "Reached end of file\n"
3146 msgstr ""
3147 "$B< ./a.out \\(aqhello world\\(aq>\n"
3148 "/he/\n"
3149 "/ w/\n"
3150 "/d/\n"
3151 "Reached end of file\n"
3152
3153 #. type: Plain text
3154 #: build/C/man3/fopencookie.3:268
3155 msgid ""
3156 "Note that a more general version of the program below could be improved to "
3157 "more robustly handle various error situations (e.g., opening a stream with a "
3158 "cookie that already has an open stream; closing a stream that has already "
3159 "been closed)."
3160 msgstr ""
3161 "Note that a more general version of the program below could be improved to "
3162 "more robustly handle various error situations (e.g., opening a stream with a "
3163 "cookie that already has an open stream; closing a stream that has already "
3164 "been closed)."
3165
3166 #. type: Plain text
3167 #: build/C/man3/fopencookie.3:277
3168 #, no-wrap
3169 msgid ""
3170 "#define _GNU_SOURCE\n"
3171 "#include E<lt>sys/types.hE<gt>\n"
3172 "#include E<lt>stdio.hE<gt>\n"
3173 "#include E<lt>stdlib.hE<gt>\n"
3174 "#include E<lt>unistd.hE<gt>\n"
3175 "#include E<lt>string.hE<gt>\n"
3176 msgstr ""
3177 "#define _GNU_SOURCE\n"
3178 "#include E<lt>sys/types.hE<gt>\n"
3179 "#include E<lt>stdio.hE<gt>\n"
3180 "#include E<lt>stdlib.hE<gt>\n"
3181 "#include E<lt>unistd.hE<gt>\n"
3182 "#include E<lt>string.hE<gt>\n"
3183
3184 #. type: Plain text
3185 #: build/C/man3/fopencookie.3:279
3186 #, no-wrap
3187 msgid "#define INIT_BUF_SIZE 4\n"
3188 msgstr "#define INIT_BUF_SIZE 4\n"
3189
3190 #. type: Plain text
3191 #: build/C/man3/fopencookie.3:286
3192 #, no-wrap
3193 msgid ""
3194 "struct memfile_cookie {\n"
3195 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3196 "    size_t  allocated;  /* Size of buf */\n"
3197 "    size_t  endpos;     /* Number of characters in buf */\n"
3198 "    off_t   offset;     /* Current file offset in buf */\n"
3199 "};\n"
3200 msgstr ""
3201 "struct memfile_cookie {\n"
3202 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3203 "    size_t  allocated;  /* Size of buf */\n"
3204 "    size_t  endpos;     /* Number of characters in buf */\n"
3205 "    off_t   offset;     /* Current file offset in buf */\n"
3206 "};\n"
3207
3208 #. type: Plain text
3209 #: build/C/man3/fopencookie.3:292
3210 #, no-wrap
3211 msgid ""
3212 "ssize_t\n"
3213 "memfile_write(void *c, const char *buf, size_t size)\n"
3214 "{\n"
3215 "    char *new_buff;\n"
3216 "    struct memfile_cookie *cookie = c;\n"
3217 msgstr ""
3218 "ssize_t\n"
3219 "memfile_write(void *c, const char *buf, size_t size)\n"
3220 "{\n"
3221 "    char *new_buff;\n"
3222 "    struct memfile_cookie *cookie = c;\n"
3223
3224 #. type: Plain text
3225 #: build/C/man3/fopencookie.3:294
3226 #, no-wrap
3227 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3228 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3229
3230 #. type: Plain text
3231 #: build/C/man3/fopencookie.3:304
3232 #, no-wrap
3233 msgid ""
3234 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3235 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3236 "        if (new_buff == NULL) {\n"
3237 "            return -1;\n"
3238 "        } else {\n"
3239 "            cookie-E<gt>allocated *= 2;\n"
3240 "            cookie-E<gt>buf = new_buff;\n"
3241 "        }\n"
3242 "    }\n"
3243 msgstr ""
3244 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3245 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3246 "        if (new_buff == NULL) {\n"
3247 "            return -1;\n"
3248 "        } else {\n"
3249 "            cookie-E<gt>allocated *= 2;\n"
3250 "            cookie-E<gt>buf = new_buff;\n"
3251 "        }\n"
3252 "    }\n"
3253
3254 #. type: Plain text
3255 #: build/C/man3/fopencookie.3:306
3256 #, no-wrap
3257 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3258 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3259
3260 #. type: Plain text
3261 #: build/C/man3/fopencookie.3:310
3262 #, no-wrap
3263 msgid ""
3264 "    cookie-E<gt>offset += size;\n"
3265 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3266 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3267 msgstr ""
3268 "    cookie-E<gt>offset += size;\n"
3269 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3270 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3271
3272 #. type: Plain text
3273 #: build/C/man3/fopencookie.3:313
3274 #, no-wrap
3275 msgid ""
3276 "    return size;\n"
3277 "}\n"
3278 msgstr ""
3279 "    return size;\n"
3280 "}\n"
3281
3282 #. type: Plain text
3283 #: build/C/man3/fopencookie.3:319
3284 #, no-wrap
3285 msgid ""
3286 "ssize_t\n"
3287 "memfile_read(void *c, char *buf, size_t size)\n"
3288 "{\n"
3289 "    ssize_t xbytes;\n"
3290 "    struct memfile_cookie *cookie = c;\n"
3291 msgstr ""
3292 "ssize_t\n"
3293 "memfile_read(void *c, char *buf, size_t size)\n"
3294 "{\n"
3295 "    ssize_t xbytes;\n"
3296 "    struct memfile_cookie *cookie = c;\n"
3297
3298 #. type: Plain text
3299 #: build/C/man3/fopencookie.3:321
3300 #, no-wrap
3301 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3302 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3303
3304 #. type: Plain text
3305 #: build/C/man3/fopencookie.3:327
3306 #, no-wrap
3307 msgid ""
3308 "    xbytes = size;\n"
3309 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3310 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3311 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3312 "       xbytes = 0;\n"
3313 msgstr ""
3314 "    xbytes = size;\n"
3315 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3316 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3317 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3318 "       xbytes = 0;\n"
3319
3320 #. type: Plain text
3321 #: build/C/man3/fopencookie.3:329
3322 #, no-wrap
3323 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3324 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3325
3326 #. type: Plain text
3327 #: build/C/man3/fopencookie.3:333
3328 #, no-wrap
3329 msgid ""
3330 "    cookie-E<gt>offset += xbytes;\n"
3331 "    return xbytes;\n"
3332 "}\n"
3333 msgstr ""
3334 "    cookie-E<gt>offset += xbytes;\n"
3335 "    return xbytes;\n"
3336 "}\n"
3337
3338 #. type: Plain text
3339 #: build/C/man3/fopencookie.3:339
3340 #, no-wrap
3341 msgid ""
3342 "int\n"
3343 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3344 "{\n"
3345 "    off64_t new_offset;\n"
3346 "    struct memfile_cookie *cookie = c;\n"
3347 msgstr ""
3348 "int\n"
3349 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3350 "{\n"
3351 "    off64_t new_offset;\n"
3352 "    struct memfile_cookie *cookie = c;\n"
3353
3354 #. type: Plain text
3355 #: build/C/man3/fopencookie.3:348
3356 #, no-wrap
3357 msgid ""
3358 "    if (whence == SEEK_SET)\n"
3359 "        new_offset = *offset;\n"
3360 "    else if (whence == SEEK_END)\n"
3361 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3362 "    else if (whence == SEEK_CUR)\n"
3363 "        new_offset = cookie-E<gt>offset + *offset;\n"
3364 "    else\n"
3365 "        return -1;\n"
3366 msgstr ""
3367 "    if (whence == SEEK_SET)\n"
3368 "        new_offset = *offset;\n"
3369 "    else if (whence == SEEK_END)\n"
3370 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3371 "    else if (whence == SEEK_CUR)\n"
3372 "        new_offset = cookie-E<gt>offset + *offset;\n"
3373 "    else\n"
3374 "        return -1;\n"
3375
3376 #. type: Plain text
3377 #: build/C/man3/fopencookie.3:351
3378 #, no-wrap
3379 msgid ""
3380 "    if (new_offset E<lt> 0)\n"
3381 "        return -1;\n"
3382 msgstr ""
3383 "    if (new_offset E<lt> 0)\n"
3384 "        return -1;\n"
3385
3386 #. type: Plain text
3387 #: build/C/man3/fopencookie.3:356
3388 #, no-wrap
3389 msgid ""
3390 "    cookie-E<gt>offset = new_offset;\n"
3391 "    *offset = new_offset;\n"
3392 "    return 0;\n"
3393 "}\n"
3394 msgstr ""
3395 "    cookie-E<gt>offset = new_offset;\n"
3396 "    *offset = new_offset;\n"
3397 "    return 0;\n"
3398 "}\n"
3399
3400 #. type: Plain text
3401 #: build/C/man3/fopencookie.3:361
3402 #, no-wrap
3403 msgid ""
3404 "int\n"
3405 "memfile_close(void *c)\n"
3406 "{\n"
3407 "    struct memfile_cookie *cookie = c;\n"
3408 msgstr ""
3409 "int\n"
3410 "memfile_close(void *c)\n"
3411 "{\n"
3412 "    struct memfile_cookie *cookie = c;\n"
3413
3414 #. type: Plain text
3415 #: build/C/man3/fopencookie.3:365
3416 #, no-wrap
3417 msgid ""
3418 "    free(cookie-E<gt>buf);\n"
3419 "    cookie-E<gt>allocated = 0;\n"
3420 "    cookie-E<gt>buf = NULL;\n"
3421 msgstr ""
3422 "    free(cookie-E<gt>buf);\n"
3423 "    cookie-E<gt>allocated = 0;\n"
3424 "    cookie-E<gt>buf = NULL;\n"
3425
3426 #. type: Plain text
3427 #: build/C/man3/fopencookie.3:368
3428 #, no-wrap
3429 msgid ""
3430 "    return 0;\n"
3431 "}\n"
3432 msgstr ""
3433 "    return 0;\n"
3434 "}\n"
3435
3436 #. type: Plain text
3437 #: build/C/man3/fopencookie.3:384
3438 #, no-wrap
3439 msgid ""
3440 "int\n"
3441 "main(int argc, char *argv[])\n"
3442 "{\n"
3443 "    cookie_io_functions_t  memfile_func = {\n"
3444 "        .read  = memfile_read,\n"
3445 "        .write = memfile_write,\n"
3446 "        .seek  = memfile_seek,\n"
3447 "        .close = memfile_close\n"
3448 "    };\n"
3449 "    FILE *fp;\n"
3450 "    struct memfile_cookie mycookie;\n"
3451 "    ssize_t nread;\n"
3452 "    long p;\n"
3453 "    int j;\n"
3454 "    char buf[1000];\n"
3455 msgstr ""
3456 "int\n"
3457 "main(int argc, char *argv[])\n"
3458 "{\n"
3459 "    cookie_io_functions_t  memfile_func = {\n"
3460 "        .read  = memfile_read,\n"
3461 "        .write = memfile_write,\n"
3462 "        .seek  = memfile_seek,\n"
3463 "        .close = memfile_close\n"
3464 "    };\n"
3465 "    FILE *fp;\n"
3466 "    struct memfile_cookie mycookie;\n"
3467 "    ssize_t nread;\n"
3468 "    long p;\n"
3469 "    int j;\n"
3470 "    char buf[1000];\n"
3471
3472 #. type: Plain text
3473 #: build/C/man3/fopencookie.3:386
3474 #, no-wrap
3475 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3476 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3477
3478 #. type: Plain text
3479 #: build/C/man3/fopencookie.3:392
3480 #, no-wrap
3481 msgid ""
3482 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3483 "    if (mycookie.buf == NULL) {\n"
3484 "        perror(\"malloc\");\n"
3485 "        exit(EXIT_FAILURE);\n"
3486 "    }\n"
3487 msgstr ""
3488 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3489 "    if (mycookie.buf == NULL) {\n"
3490 "        perror(\"malloc\");\n"
3491 "        exit(EXIT_FAILURE);\n"
3492 "    }\n"
3493
3494 #. type: Plain text
3495 #: build/C/man3/fopencookie.3:396
3496 #, no-wrap
3497 msgid ""
3498 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3499 "    mycookie.offset = 0;\n"
3500 "    mycookie.endpos = 0;\n"
3501 msgstr ""
3502 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3503 "    mycookie.offset = 0;\n"
3504 "    mycookie.endpos = 0;\n"
3505
3506 #. type: Plain text
3507 #: build/C/man3/fopencookie.3:402
3508 #, no-wrap
3509 msgid ""
3510 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3511 "    if (fp == NULL) {\n"
3512 "        perror(\"fopencookie\");\n"
3513 "        exit(EXIT_FAILURE);\n"
3514 "    }\n"
3515 msgstr ""
3516 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3517 "    if (fp == NULL) {\n"
3518 "        perror(\"fopencookie\");\n"
3519 "        exit(EXIT_FAILURE);\n"
3520 "    }\n"
3521
3522 #. type: Plain text
3523 #: build/C/man3/fopencookie.3:404
3524 #, no-wrap
3525 msgid "    /* Write command-line arguments to our file */\n"
3526 msgstr "    /* Write command-line arguments to our file */\n"
3527
3528 #. type: Plain text
3529 #: build/C/man3/fopencookie.3:410
3530 #, no-wrap
3531 msgid ""
3532 "    for (j = 1; j E<lt> argc; j++)\n"
3533 "        if (fputs(argv[j], fp) == EOF) {\n"
3534 "            perror(\"fputs\");\n"
3535 "            exit(EXIT_FAILURE);\n"
3536 "        }\n"
3537 msgstr ""
3538 "    for (j = 1; j E<lt> argc; j++)\n"
3539 "        if (fputs(argv[j], fp) == EOF) {\n"
3540 "            perror(\"fputs\");\n"
3541 "            exit(EXIT_FAILURE);\n"
3542 "        }\n"
3543
3544 #. type: Plain text
3545 #: build/C/man3/fopencookie.3:412
3546 #, no-wrap
3547 msgid "    /* Read two bytes out of every five, until EOF */\n"
3548 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3549
3550 #. type: Plain text
3551 #: build/C/man3/fopencookie.3:427
3552 #, no-wrap
3553 msgid ""
3554 "    for (p = 0; ; p += 5) {\n"
3555 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3556 "            perror(\"fseek\");\n"
3557 "            exit(EXIT_FAILURE);\n"
3558 "        }\n"
3559 "        nread = fread(buf, 1, 2, fp);\n"
3560 "        if (nread == -1) {\n"
3561 "            perror(\"fread\");\n"
3562 "            exit(EXIT_FAILURE);\n"
3563 "        }\n"
3564 "        if (nread == 0) {\n"
3565 "            printf(\"Reached end of file\\en\");\n"
3566 "            break;\n"
3567 "        }\n"
3568 msgstr ""
3569 "    for (p = 0; ; p += 5) {\n"
3570 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3571 "            perror(\"fseek\");\n"
3572 "            exit(EXIT_FAILURE);\n"
3573 "        }\n"
3574 "        nread = fread(buf, 1, 2, fp);\n"
3575 "        if (nread == -1) {\n"
3576 "            perror(\"fread\");\n"
3577 "            exit(EXIT_FAILURE);\n"
3578 "        }\n"
3579 "        if (nread == 0) {\n"
3580 "            printf(\"Reached end of file\\en\");\n"
3581 "            break;\n"
3582 "        }\n"
3583
3584 #. type: Plain text
3585 #: build/C/man3/fopencookie.3:430
3586 #, no-wrap
3587 msgid ""
3588 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3589 "    }\n"
3590 msgstr ""
3591 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3592 "    }\n"
3593
3594 #. type: Plain text
3595 #: build/C/man3/fopencookie.3:433 build/C/man2/readlink.2:211
3596 #, no-wrap
3597 msgid ""
3598 "    exit(EXIT_SUCCESS);\n"
3599 "}\n"
3600 msgstr ""
3601 "    exit(EXIT_SUCCESS);\n"
3602 "}\n"
3603
3604 #. type: Plain text
3605 #: build/C/man3/fopencookie.3:438
3606 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3607 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3608
3609 #. type: TH
3610 #: build/C/man3/fpurge.3:23
3611 #, no-wrap
3612 msgid "FPURGE"
3613 msgstr "FPURGE"
3614
3615 #. type: TH
3616 #: build/C/man3/fpurge.3:23
3617 #, no-wrap
3618 msgid "2001-12-15"
3619 msgstr "2001-12-15"
3620
3621 #. type: Plain text
3622 #: build/C/man3/fpurge.3:26
3623 msgid "fpurge, __fpurge - purge a stream"
3624 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3625
3626 #. type: Plain text
3627 #: build/C/man3/fpurge.3:30
3628 #, no-wrap
3629 msgid ""
3630 "/* unsupported */\n"
3631 "B<#include E<lt>stdio.hE<gt>>\n"
3632 msgstr ""
3633 "/* unsupported */\n"
3634 "B<#include E<lt>stdio.hE<gt>>\n"
3635
3636 #. type: Plain text
3637 #: build/C/man3/fpurge.3:32
3638 #, no-wrap
3639 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3640 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3641
3642 #. type: Plain text
3643 #: build/C/man3/fpurge.3:35
3644 #, no-wrap
3645 msgid ""
3646 "/* supported */\n"
3647 "B<#include E<lt>stdio.hE<gt>>\n"
3648 msgstr ""
3649 "/* supported */\n"
3650 "B<#include E<lt>stdio.hE<gt>>\n"
3651
3652 #. type: Plain text
3653 #: build/C/man3/fpurge.3:37
3654 #, no-wrap
3655 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3656 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3657
3658 #. type: Plain text
3659 #: build/C/man3/fpurge.3:39
3660 #, no-wrap
3661 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3662 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3663
3664 #. type: Plain text
3665 #: build/C/man3/fpurge.3:52
3666 msgid ""
3667 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3668 "output streams this discards any unwritten output.  For input streams this "
3669 "discards any input read from the underlying object but not yet obtained via "
3670 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3671 "B<fflush>(3)."
3672 msgstr ""
3673 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3674 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3675 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3676 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3677 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3678
3679 #. type: Plain text
3680 #: build/C/man3/fpurge.3:56
3681 msgid ""
3682 "The function B<__fpurge>()  does precisely the same, but without returning a "
3683 "value."
3684 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3685
3686 #. type: Plain text
3687 #: build/C/man3/fpurge.3:63
3688 msgid ""
3689 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3690 "and sets I<errno> appropriately."
3691 msgstr ""
3692 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3693 "を適切な値に設定する。"
3694
3695 #. type: Plain text
3696 #: build/C/man3/fpurge.3:68
3697 msgid "I<stream> is not an open stream."
3698 msgstr "I<stream> がオープンされていない。"
3699
3700 #. type: Plain text
3701 #: build/C/man3/fpurge.3:76
3702 msgid ""
3703 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3704 "was introduced in 4.4BSD and is not available under Linux.  The function "
3705 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3706 "later."
3707 msgstr ""
3708 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3709 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3710 "され、glibc 2.1.95 以降には存在している。"
3711
3712 #. type: Plain text
3713 #: build/C/man3/fpurge.3:78
3714 msgid "Usually it is a mistake to want to discard input buffers."
3715 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3716
3717 #.  .BR fclean (3),
3718 #. type: Plain text
3719 #: build/C/man3/fpurge.3:82
3720 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3721 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3722
3723 #. type: TH
3724 #: build/C/man3/fputwc.3:14
3725 #, no-wrap
3726 msgid "FPUTWC"
3727 msgstr "FPUTWC"
3728
3729 #. type: Plain text
3730 #: build/C/man3/fputwc.3:17
3731 msgid "fputwc, putwc - write a wide character to a FILE stream"
3732 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3733
3734 #. type: Plain text
3735 #: build/C/man3/fputwc.3:25
3736 #, no-wrap
3737 msgid ""
3738 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3739 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3740 msgstr ""
3741 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3742 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3743
3744 #. type: Plain text
3745 #: build/C/man3/fputwc.3:41
3746 msgid ""
3747 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3748 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3749 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3750 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3751 "it returns I<wc>."
3752 msgstr ""
3753 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3754 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3755 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3756 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3757 "関数は I<wc> を返す。"
3758
3759 #. type: Plain text
3760 #: build/C/man3/fputwc.3:49
3761 msgid ""
3762 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3763 "may be implemented as a macro, and may evaluate its argument more than "
3764 "once.  There is no reason ever to use it."
3765 msgstr ""
3766 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3767 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3768 "ない。この関数を使う理由はもはや存在しない。"
3769
3770 #. type: Plain text
3771 #: build/C/man3/fputwc.3:58
3772 msgid ""
3773 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3774 "indicate an error."
3775 msgstr ""
3776 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3777 "B<WEOF> を返す。"
3778
3779 #. type: Plain text
3780 #: build/C/man3/fputwc.3:63
3781 msgid "Conversion of I<wc> to the stream's encoding fails."
3782 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3783
3784 #. type: Plain text
3785 #: build/C/man3/fputwc.3:72
3786 msgid ""
3787 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3788 "current locale."
3789 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
3790
3791 #. type: Plain text
3792 #: build/C/man3/fputwc.3:80
3793 msgid ""
3794 "In the absence of additional information passed to the B<fopen>(3)  call, it "
3795 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
3796 "sequence corresponding to the wide character I<wc>."
3797 msgstr ""
3798 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
3799 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
3800 "よい。"
3801
3802 #. type: Plain text
3803 #: build/C/man3/fputwc.3:83
3804 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3805 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3806
3807 #. type: TH
3808 #: build/C/man3/fread.3:43
3809 #, no-wrap
3810 msgid "FREAD"
3811 msgstr "FREAD"
3812
3813 #. type: TH
3814 #: build/C/man3/fread.3:43
3815 #, no-wrap
3816 msgid "2012-03-30"
3817 msgstr "2012-03-30"
3818
3819 #. type: Plain text
3820 #: build/C/man3/fread.3:46
3821 msgid "fread, fwrite - binary stream input/output"
3822 msgstr "fread, fwrite - バイナリストリームの入出力"
3823
3824 #. type: Plain text
3825 #: build/C/man3/fread.3:52
3826 #, no-wrap
3827 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3828 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3829
3830 #. type: Plain text
3831 #: build/C/man3/fread.3:55
3832 #, no-wrap
3833 msgid ""
3834 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3835 "B<              FILE *>I<stream>B<);>\n"
3836 msgstr ""
3837 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3838 "B<              FILE *>I<stream>B<);>\n"
3839
3840 #. type: Plain text
3841 #: build/C/man3/fread.3:67
3842 msgid ""
3843 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
3844 "long, from the stream pointed to by I<stream>, storing them at the location "
3845 "given by I<ptr>."
3846 msgstr ""
3847 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
3848 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
3849 "I<size> バイトの長さを持つ。"
3850
3851 #. type: Plain text
3852 #: build/C/man3/fread.3:78
3853 msgid ""
3854 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
3855 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
3856 "location given by I<ptr>."
3857 msgstr ""
3858 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
3859 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
3860 "バイトの長さを持つ。"
3861
3862 #. type: Plain text
3863 #: build/C/man3/fread.3:94
3864 msgid ""
3865 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
3866 "or written.  This number equals the number of bytes transferred only when "
3867 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
3868 "return value is a short item count (or zero)."
3869 msgstr ""
3870 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
3871 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
3872 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
3873 "返り値は指定した個数よりも小さい値 (または 0) となる。"
3874
3875 #. type: Plain text
3876 #: build/C/man3/fread.3:101
3877 msgid ""
3878 "B<fread>()  does not distinguish between end-of-file and error, and callers "
3879 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
3880 msgstr ""
3881 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
3882 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
3883 "らない。"
3884
3885 #. type: Plain text
3886 #: build/C/man3/fread.3:103
3887 msgid "C89, POSIX.1-2001."
3888 msgstr "C89, POSIX.1-2001."
3889
3890 #. type: Plain text
3891 #: build/C/man3/fread.3:108
3892 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3893 msgstr ""
3894 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3895
3896 #. type: TH
3897 #: build/C/man3/fseek.3:40
3898 #, no-wrap
3899 msgid "FSEEK"
3900 msgstr "FSEEK"
3901
3902 #. type: TH
3903 #: build/C/man3/fseek.3:40
3904 #, no-wrap
3905 msgid "1993-11-29"
3906 msgstr "1993-11-29"
3907
3908 #. type: Plain text
3909 #: build/C/man3/fseek.3:43
3910 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
3911 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
3912
3913 #. type: Plain text
3914 #: build/C/man3/fseek.3:47
3915 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3916 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3917
3918 #. type: Plain text
3919 #: build/C/man3/fseek.3:49
3920 msgid "B<long ftell(FILE *>I<stream>B<);>"
3921 msgstr "B<long ftell(FILE *>I<stream>B<);>"
3922
3923 #. type: Plain text
3924 #: build/C/man3/fseek.3:51
3925 msgid "B<void rewind(FILE *>I<stream>B<);>"
3926 msgstr "B<void rewind(FILE *>I<stream>B<);>"
3927
3928 #. type: Plain text
3929 #: build/C/man3/fseek.3:53
3930 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3931 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3932
3933 #. type: Plain text
3934 #: build/C/man3/fseek.3:55
3935 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3936 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3937
3938 #. type: Plain text
3939 #: build/C/man3/fseek.3:79
3940 msgid ""
3941 "The B<fseek>()  function sets the file position indicator for the stream "
3942 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
3943 "by adding I<offset> bytes to the position specified by I<whence>.  If "
3944 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
3945 "relative to the start of the file, the current position indicator, or end-of-"
3946 "file, respectively.  A successful call to the B<fseek>()  function clears "
3947 "the end-of-file indicator for the stream and undoes any effects of the "
3948 "B<ungetc>(3)  function on the same stream."
3949 msgstr ""
3950 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
3951 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
3952 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
3953 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
3954 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
3955 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
3956 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
3957 "かったことになる。"
3958
3959 #. type: Plain text
3960 #: build/C/man3/fseek.3:85
3961 msgid ""
3962 "The B<ftell>()  function obtains the current value of the file position "
3963 "indicator for the stream pointed to by I<stream>."
3964 msgstr ""
3965 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
3966 "置表示子 の現時点での値を与える。"
3967
3968 #. type: Plain text
3969 #: build/C/man3/fseek.3:92
3970 msgid ""
3971 "The B<rewind>()  function sets the file position indicator for the stream "
3972 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
3973 msgstr ""
3974 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
3975 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
3976
3977 #. type: Plain text
3978 #: build/C/man3/fseek.3:95
3979 msgid "(void) fseek(stream, 0L, SEEK_SET)"
3980 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
3981
3982 #. type: Plain text
3983 #: build/C/man3/fseek.3:99
3984 msgid ""
3985 "except that the error indicator for the stream is also cleared (see "
3986 "B<clearerr>(3))."
3987 msgstr ""
3988 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
3989 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
3990
3991 #. type: Plain text
3992 #: build/C/man3/fseek.3:117
3993 msgid ""
3994 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
3995 "equivalent to B<ftell>()  and B<fseek>()  (with whence set to B<SEEK_SET>), "
3996 "setting and storing the current value of the file offset into or from the "
3997 "object referenced by I<pos>.  On some non-UNIX systems an I<fpos_t> object "
3998 "may be a complex object and these routines may be the only way to portably "
3999 "reposition a text stream."
4000 msgstr ""
4001 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4002 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4003 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4004 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4005 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4006 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4007 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4008
4009 #. type: Plain text
4010 #: build/C/man3/fseek.3:132
4011 msgid ""
4012 "The B<rewind>()  function returns no value.  Upon successful completion, "
4013 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4014 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4015 "indicate the error."
4016 msgstr ""
4017 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4018 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4019 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4020
4021 #. type: Plain text
4022 #: build/C/man3/fseek.3:138
4023 msgid "The I<stream> specified is not a seekable stream."
4024 msgstr "指定した I<stream> がシークできない。"
4025
4026 #. type: Plain text
4027 #: build/C/man3/fseek.3:149
4028 msgid ""
4029 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4030 "B<SEEK_CUR>."
4031 msgstr ""
4032 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4033 "B<SEEK_CUR> 以外の値であった。"
4034
4035 #. type: Plain text
4036 #: build/C/man3/fseek.3:164
4037 msgid ""
4038 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4039 "also fail and set I<errno> for any of the errors specified for the routines "
4040 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4041 msgstr ""
4042 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4043 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4044 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4045
4046 #. type: Plain text
4047 #: build/C/man3/fseek.3:168
4048 msgid "B<lseek>(2), B<fseeko>(3)"
4049 msgstr "B<lseek>(2), B<fseeko>(3)"
4050
4051 #. type: TH
4052 #: build/C/man3/fseeko.3:23
4053 #, no-wrap
4054 msgid "FSEEKO"
4055 msgstr "FSEEKO"
4056
4057 #. type: TH
4058 #: build/C/man3/fseeko.3:23
4059 #, no-wrap
4060 msgid "2001-11-05"
4061 msgstr "2001-11-05"
4062
4063 #. type: Plain text
4064 #: build/C/man3/fseeko.3:26
4065 msgid "fseeko, ftello - seek to or report file position"
4066 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4067
4068 #. type: Plain text
4069 #: build/C/man3/fseeko.3:31
4070 #, no-wrap
4071 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4072 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4073
4074 #. type: Plain text
4075 #: build/C/man3/fseeko.3:34
4076 #, no-wrap
4077 msgid ""
4078 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4079 "\n"
4080 msgstr ""
4081 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4082 "\n"
4083
4084 #. type: Plain text
4085 #: build/C/man3/fseeko.3:52
4086 msgid ""
4087 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4088 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4089 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4090 "I<off_t> instead of I<long>."
4091 msgstr ""
4092 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4093 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4094 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4095 "I<off_t> になっている。"
4096
4097 #. type: Plain text
4098 #: build/C/man3/fseeko.3:55
4099 msgid ""
4100 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4101 "compilation with"
4102 msgstr ""
4103 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4104
4105 #. type: Plain text
4106 #: build/C/man3/fseeko.3:59 build/C/man3/lseek64.3:79
4107 #, no-wrap
4108 msgid "#define _FILE_OFFSET_BITS 64\n"
4109 msgstr "#define _FILE_OFFSET_BITS 64\n"
4110
4111 #. type: Plain text
4112 #: build/C/man3/fseeko.3:63
4113 msgid "will turn I<off_t> into a 64-bit type."
4114 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4115
4116 #. type: Plain text
4117 #: build/C/man3/fseeko.3:72
4118 msgid ""
4119 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4120 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4121 "indicate the error."
4122 msgstr ""
4123 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4124 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4125
4126 #. type: Plain text
4127 #: build/C/man3/fseeko.3:75
4128 msgid "See the ERRORS in B<fseek>(3)."
4129 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4130
4131 #. type: Plain text
4132 #: build/C/man3/fseeko.3:77
4133 msgid "SUSv2, POSIX.1-2001."
4134 msgstr "SUSv2, POSIX.1-2001."
4135
4136 #. type: Plain text
4137 #: build/C/man3/fseeko.3:81
4138 msgid ""
4139 "These functions are found on System V-like systems.  They are not present in "
4140 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4141 msgstr ""
4142 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4143 "かったが、 glibc 2.1 から使えるようになった。"
4144
4145 #. type: Plain text
4146 #: build/C/man3/fseeko.3:82
4147 msgid "B<fseek>(3)"
4148 msgstr "B<fseek>(3)"
4149
4150 #. type: TH
4151 #: build/C/man3/getline.3:24
4152 #, no-wrap
4153 msgid "GETLINE"
4154 msgstr "GETLINE"
4155
4156 #. type: TH
4157 #: build/C/man3/getline.3:24
4158 #, no-wrap
4159 msgid "2010-06-12"
4160 msgstr "2010-06-12"
4161
4162 #. type: Plain text
4163 #: build/C/man3/getline.3:27
4164 msgid "getline, getdelim - delimited string input"
4165 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4166
4167 #. type: Plain text
4168 #: build/C/man3/getline.3:32
4169 #, no-wrap
4170 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4171 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4172
4173 #. type: Plain text
4174 #: build/C/man3/getline.3:35
4175 #, no-wrap
4176 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4177 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4178
4179 #. type: Plain text
4180 #: build/C/man3/getline.3:45
4181 msgid "B<getline>(), B<getdelim>():"
4182 msgstr "B<getline>(), B<getdelim>():"
4183
4184 #. type: Plain text
4185 #: build/C/man3/getline.3:50
4186 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4187 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4188
4189 #. type: Plain text
4190 #: build/C/man3/getline.3:63
4191 msgid ""
4192 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4193 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4194 "terminated and includes the newline character, if one was found."
4195 msgstr ""
4196 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4197 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4198 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4199
4200 #. type: Plain text
4201 #: build/C/man3/getline.3:73
4202 msgid ""
4203 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4204 "storing the line, which should be freed by the user program.  (In this case, "
4205 "the value in I<*n> is ignored.)"
4206 msgstr ""
4207 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4208 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4209 "合、 I<*n> の値は無視される)。"
4210
4211 #. type: Plain text
4212 #: build/C/man3/getline.3:91
4213 msgid ""
4214 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4215 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4216 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4217 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4218 msgstr ""
4219 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4220 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4221 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4222 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4223 "I<*n> を更新する。"
4224
4225 #. type: Plain text
4226 #: build/C/man3/getline.3:97
4227 msgid ""
4228 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4229 "to reflect the buffer address and allocated size respectively."
4230 msgstr ""
4231 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4232 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4233
4234 #. type: Plain text
4235 #: build/C/man3/getline.3:108
4236 msgid ""
4237 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4238 "than newline can be specified as the I<delimiter> argument.  As with "
4239 "B<getline>(), a delimiter character is not added if one was not present in "
4240 "the input before end of file was reached."
4241 msgstr ""
4242 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4243 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4244 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4245 "ファに追加しない。"
4246
4247 #. type: Plain text
4248 #: build/C/man3/getline.3:117
4249 msgid ""
4250 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4251 "read, including the delimiter character, but not including the terminating "
4252 "null byte.  This value can be used to handle embedded null bytes in the line "
4253 "read."
4254 msgstr ""
4255 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4256 "字数には区切り文字は含まれるが、終端に使う NULL バイトは含まれない。 この値に"
4257 "よって、読み込んだ行に含まれる NULL バイトを操作することができる。"
4258
4259 #. type: Plain text
4260 #: build/C/man3/getline.3:120
4261 msgid ""
4262 "Both functions return -1 on failure to read a line (including end-of-file "
4263 "condition)."
4264 msgstr ""
4265 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4266 "した場合にも -1 を返す)。"
4267
4268 #. type: Plain text
4269 #: build/C/man3/getline.3:130
4270 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4271 msgstr ""
4272 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4273 "I<stream> が有効でない)。"
4274
4275 #. type: Plain text
4276 #: build/C/man3/getline.3:132
4277 msgid "These functions are available since libc 4.6.27."
4278 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4279
4280 #. type: Plain text
4281 #: build/C/man3/getline.3:139
4282 msgid ""
4283 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4284 "were standardized in POSIX.1-2008."
4285 msgstr ""
4286 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4287 "POSIX.1-2008 で標準化された。"
4288
4289 #. type: Plain text
4290 #: build/C/man3/getline.3:144
4291 #, no-wrap
4292 msgid ""
4293 "#define _GNU_SOURCE\n"
4294 "#include E<lt>stdio.hE<gt>\n"
4295 "#include E<lt>stdlib.hE<gt>\n"
4296 msgstr ""
4297 "#define _GNU_SOURCE\n"
4298 "#include E<lt>stdio.hE<gt>\n"
4299 "#include E<lt>stdlib.hE<gt>\n"
4300
4301 #. type: Plain text
4302 #: build/C/man3/getline.3:152
4303 #, no-wrap
4304 msgid ""
4305 "int\n"
4306 "main(void)\n"
4307 "{\n"
4308 "    FILE *fp;\n"
4309 "    char *line = NULL;\n"
4310 "    size_t len = 0;\n"
4311 "    ssize_t read;\n"
4312 msgstr ""
4313 "int\n"
4314 "main(void)\n"
4315 "{\n"
4316 "    FILE *fp;\n"
4317 "    char *line = NULL;\n"
4318 "    size_t len = 0;\n"
4319 "    ssize_t read;\n"
4320
4321 #. type: Plain text
4322 #: build/C/man3/getline.3:156
4323 #, no-wrap
4324 msgid ""
4325 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4326 "    if (fp == NULL)\n"
4327 "        exit(EXIT_FAILURE);\n"
4328 msgstr ""
4329 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4330 "    if (fp == NULL)\n"
4331 "        exit(EXIT_FAILURE);\n"
4332
4333 #. type: Plain text
4334 #: build/C/man3/getline.3:161
4335 #, no-wrap
4336 msgid ""
4337 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4338 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4339 "        printf(\"%s\", line);\n"
4340 "    }\n"
4341 msgstr ""
4342 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4343 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4344 "        printf(\"%s\", line);\n"
4345 "    }\n"
4346
4347 #. type: Plain text
4348 #: build/C/man3/getline.3:165
4349 #, no-wrap
4350 msgid ""
4351 "    free(line);\n"
4352 "    exit(EXIT_SUCCESS);\n"
4353 "}\n"
4354 msgstr ""
4355 "    free(line);\n"
4356 "    exit(EXIT_SUCCESS);\n"
4357 "}\n"
4358
4359 #. type: Plain text
4360 #: build/C/man3/getline.3:172
4361 msgid ""
4362 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4363 msgstr ""
4364 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4365
4366 #. type: TH
4367 #: build/C/man3/gets.3:25
4368 #, no-wrap
4369 msgid "GETS"
4370 msgstr "GETS"
4371
4372 #. type: TH
4373 #: build/C/man3/gets.3:25
4374 #, no-wrap
4375 msgid "2012-01-18"
4376 msgstr "2012-01-18"
4377
4378 #. type: Plain text
4379 #: build/C/man3/gets.3:28
4380 msgid ""
4381 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4382 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4383
4384 #. type: Plain text
4385 #: build/C/man3/gets.3:33
4386 #, no-wrap
4387 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4388 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4389
4390 #. type: Plain text
4391 #: build/C/man3/gets.3:35
4392 #, no-wrap
4393 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4394 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4395
4396 #. type: Plain text
4397 #: build/C/man3/gets.3:37
4398 #, no-wrap
4399 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4400 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4401
4402 #. type: Plain text
4403 #: build/C/man3/gets.3:39
4404 #, no-wrap
4405 msgid "B<int getchar(void);>\n"
4406 msgstr "B<int getchar(void);>\n"
4407
4408 #. type: Plain text
4409 #: build/C/man3/gets.3:41
4410 #, no-wrap
4411 msgid "B<char *gets(char *>I<s>B<);>\n"
4412 msgstr "B<char *gets(char *>I<s>B<);>\n"
4413
4414 #. type: Plain text
4415 #: build/C/man3/gets.3:43
4416 #, no-wrap
4417 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4418 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4419
4420 #. type: Plain text
4421 #: build/C/man3/gets.3:55
4422 msgid ""
4423 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4424 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4425 msgstr ""
4426 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4427 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4428 "す。"
4429
4430 #. type: Plain text
4431 #: build/C/man3/gets.3:62
4432 msgid ""
4433 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4434 "a macro which evaluates I<stream> more than once."
4435 msgstr ""
4436 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4437 "実装されているかもしれない。"
4438
4439 #. type: Plain text
4440 #: build/C/man3/gets.3:66
4441 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4442 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4443
4444 #. type: Plain text
4445 #: build/C/man3/gets.3:76
4446 msgid ""
4447 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4448 "until either a terminating newline or B<EOF>, which it replaces with a null "
4449 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4450 "below)."
4451 msgstr ""
4452 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4453 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4454 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない "
4455 "(下記の「バグ」を参照)。"
4456
4457 #. type: Plain text
4458 #: build/C/man3/gets.3:90
4459 msgid ""
4460 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4461 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4462 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4463 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4464 "in the buffer."
4465 msgstr ""
4466 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4467 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4468 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4469 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4470
4471 #. type: Plain text
4472 #: build/C/man3/gets.3:101
4473 msgid ""
4474 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4475 "it is available for subsequent read operations.  Pushed-back characters will "
4476 "be returned in reverse order; only one pushback is guaranteed."
4477 msgstr ""
4478 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4479 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4480 "しとして保証されているのは、一文字だけである。"
4481
4482 #. type: Plain text
4483 #: build/C/man3/gets.3:106
4484 msgid ""
4485 "Calls to the functions described here can be mixed with each other and with "
4486 "calls to other input functions from the I<stdio> library for the same input "
4487 "stream."
4488 msgstr ""
4489 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4490 "互いに混ぜて使うことができる。"
4491
4492 #. type: Plain text
4493 #: build/C/man3/gets.3:121
4494 msgid ""
4495 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4496 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4497 msgstr ""
4498 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4499 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4500 "す。"
4501
4502 #. type: Plain text
4503 #: build/C/man3/gets.3:129
4504 msgid ""
4505 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4506 "end of file occurs while no characters have been read."
4507 msgstr ""
4508 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4509 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4510
4511 #. type: Plain text
4512 #: build/C/man3/gets.3:136
4513 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4514 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4515
4516 #. type: Plain text
4517 #: build/C/man3/gets.3:138
4518 msgid "C89, C99, POSIX.1-2001."
4519 msgstr "C89, C99, POSIX.1-2001."
4520
4521 #. type: Plain text
4522 #: build/C/man3/gets.3:150
4523 msgid ""
4524 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4525 "C11 removes the specification of B<gets>()  from the C language, and since "
4526 "version 2.16, glibc header files don't expose the function declaration if "
4527 "the B<_ISOC11_SOURCE> feature test macro is defined."
4528 msgstr ""
4529 "LSB は B<gets>() を非推奨としている。\n"
4530 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4531 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4532 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義された\n"
4533 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4534
4535 #. type: Plain text
4536 #: build/C/man3/gets.3:164
4537 msgid ""
4538 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4539 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4540 "()  will continue to store characters past the end of the buffer, it is "
4541 "extremely dangerous to use.  It has been used to break computer security.  "
4542 "Use B<fgets>()  instead."
4543 msgstr ""
4544 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4545 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4546 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4547 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4548 "と。"
4549
4550 #. type: Plain text
4551 #: build/C/man3/gets.3:171
4552 msgid ""
4553 "It is not advisable to mix calls to input functions from the I<stdio> "
4554 "library with low-level calls to B<read>(2)  for the file descriptor "
4555 "associated with the input stream; the results will be undefined and very "
4556 "probably not what you want."
4557 msgstr ""
4558 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4559 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4560 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4561
4562 #. type: Plain text
4563 #: build/C/man3/gets.3:186
4564 msgid ""
4565 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4566 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4567 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4568 msgstr ""
4569 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4570 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4571 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4572 "B<feature_test_macros>(7)"
4573
4574 #. type: TH
4575 #: build/C/man3/getw.3:23
4576 #, no-wrap
4577 msgid "GETW"
4578 msgstr "GETW"
4579
4580 #. type: TH
4581 #: build/C/man3/getw.3:23
4582 #, no-wrap
4583 msgid "2010-09-26"
4584 msgstr "2010-09-26"
4585
4586 #. type: Plain text
4587 #: build/C/man3/getw.3:26
4588 msgid "getw, putw - input and output of words (ints)"
4589 msgstr "getw, putw - ワード(int)の入出力"
4590
4591 #. type: Plain text
4592 #: build/C/man3/getw.3:31
4593 #, no-wrap
4594 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4595 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4596
4597 #. type: Plain text
4598 #: build/C/man3/getw.3:33
4599 #, no-wrap
4600 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4601 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4602
4603 #. type: Plain text
4604 #: build/C/man3/getw.3:42
4605 msgid "B<getw>(), B<putw>():"
4606 msgstr "B<getw>(), B<putw>():"
4607
4608 #. type: TP
4609 #: build/C/man3/getw.3:45
4610 #, no-wrap
4611 msgid "Since glibc 2.3.3:"
4612 msgstr "glibc 2.3.3 以降:"
4613
4614 #. type: Plain text
4615 #: build/C/man3/getw.3:48
4616 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4617 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4618
4619 #. type: Plain text
4620 #: build/C/man3/getw.3:51
4621 #, no-wrap
4622 msgid ""
4623 "(_XOPEN_SOURCE &&\n"
4624 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4625 msgstr ""
4626 "(_XOPEN_SOURCE &&\n"
4627 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4628
4629 #. type: TP
4630 #: build/C/man3/getw.3:51
4631 #, no-wrap
4632 msgid "Before glibc 2.3.3:"
4633 msgstr "glibc 2.3.3 より前:"
4634
4635 #. type: Plain text
4636 #: build/C/man3/getw.3:54
4637 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4638 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4639
4640 #. type: Plain text
4641 #: build/C/man3/getw.3:64
4642 msgid ""
4643 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4644 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4645 msgstr ""
4646 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4647 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4648 "ことを勧める。"
4649
4650 #. type: Plain text
4651 #: build/C/man3/getw.3:71
4652 msgid ""
4653 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4654 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4655 "instead."
4656 msgstr ""
4657 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4658 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4659 "使用することを勧める。"
4660
4661 #. type: Plain text
4662 #: build/C/man3/getw.3:78
4663 msgid ""
4664 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4665 "error, they return B<EOF>."
4666 msgstr ""
4667 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4668 "が発生した場合、これらの関数は B<EOF> を返す。"
4669
4670 #. type: Plain text
4671 #: build/C/man3/getw.3:80
4672 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4673 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4674
4675 #. type: Plain text
4676 #: build/C/man3/getw.3:84
4677 msgid ""
4678 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4679 "can be used to distinguish between the two cases."
4680 msgstr ""
4681 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4682 "(3)  を用いると、この二つの場合を区別することが出来る。"
4683
4684 #. type: Plain text
4685 #: build/C/man3/getw.3:89
4686 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4687 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4688
4689 #. type: TH
4690 #: build/C/man2/link.2:31
4691 #, no-wrap
4692 msgid "LINK"
4693 msgstr "LINK"
4694
4695 #. type: TH
4696 #: build/C/man2/link.2:31
4697 #, no-wrap
4698 msgid "2008-08-21"
4699 msgstr "2008-08-21"
4700
4701 #. type: Plain text
4702 #: build/C/man2/link.2:34
4703 msgid "link - make a new name for a file"
4704 msgstr "link - ファイルの新しい名前を作成する"
4705
4706 #. type: Plain text
4707 #: build/C/man2/link.2:36 build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
4708 #: build/C/man2/readlink.2:46 build/C/man2/rmdir.2:35
4709 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4710 msgid "B<#include E<lt>unistd.hE<gt>>"
4711 msgstr "B<#include E<lt>unistd.hE<gt>>"
4712
4713 #. type: Plain text
4714 #: build/C/man2/link.2:38
4715 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4716 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4717
4718 #. type: Plain text
4719 #: build/C/man2/link.2:41
4720 msgid ""
4721 "B<link>()  creates a new link (also known as a hard link) to an existing "
4722 "file."
4723 msgstr ""
4724 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4725 "link) ともいう) を作成する。"
4726
4727 #. type: Plain text
4728 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4729 msgid "If I<newpath> exists it will I<not> be overwritten."
4730 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4731
4732 #. type: Plain text
4733 #: build/C/man2/link.2:52
4734 msgid ""
4735 "This new name may be used exactly as the old one for any operation; both "
4736 "names refer to the same file (and so have the same permissions and "
4737 "ownership) and it is impossible to tell which name was the \"original\"."
4738 msgstr ""
4739 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4740 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4741 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4742
4743 #. type: Plain text
4744 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4745 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4746 #: build/C/man2/unlink.2:60
4747 msgid ""
4748 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4749 "appropriately."
4750 msgstr ""
4751 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4752 "定される。"
4753
4754 #. type: TP
4755 #: build/C/man2/link.2:58 build/C/man2/open.2:473 build/C/man2/readlink.2:84
4756 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4757 #: build/C/man3/tmpfile.3:53 build/C/man2/unlink.2:61
4758 #, no-wrap
4759 msgid "B<EACCES>"
4760 msgstr "B<EACCES>"
4761
4762 #. type: Plain text
4763 #: build/C/man2/link.2:69
4764 msgid ""
4765 "Write access to the directory containing I<newpath> is denied, or search "
4766 "permission is denied for one of the directories in the path prefix of "
4767 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4768 msgstr ""
4769 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4770 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4771 "(B<path_resolution>(7)  を参照)。"
4772
4773 #. type: TP
4774 #: build/C/man2/link.2:69 build/C/man2/open.2:482 build/C/man2/symlink.2:99
4775 #: build/C/man3/tmpfile.3:56
4776 #, no-wrap
4777 msgid "B<EEXIST>"
4778 msgstr "B<EEXIST>"
4779
4780 #. type: Plain text
4781 #: build/C/man2/link.2:73 build/C/man2/symlink.2:103
4782 msgid "I<newpath> already exists."
4783 msgstr "I<newpath> が既に存在する。"
4784
4785 #. type: TP
4786 #: build/C/man2/link.2:73 build/C/man2/llseek.2:69 build/C/man2/open.2:488
4787 #: build/C/man2/pipe.2:98 build/C/man2/read.2:100 build/C/man2/readlink.2:89
4788 #: build/C/man2/rename.2:133 build/C/man2/rmdir.2:64
4789 #: build/C/man2/symlink.2:103 build/C/man2/unlink.2:80
4790 #: build/C/man2/write.2:135
4791 #, no-wrap
4792 msgid "B<EFAULT>"
4793 msgstr "B<EFAULT>"
4794
4795 #. type: Plain text
4796 #: build/C/man2/link.2:76 build/C/man2/rename.2:136 build/C/man2/symlink.2:106
4797 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
4798 msgstr ""
4799 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
4800
4801 #. type: TP
4802 #: build/C/man2/link.2:76 build/C/man2/read.2:129 build/C/man2/readlink.2:105
4803 #: build/C/man2/symlink.2:106 build/C/man2/unlink.2:84
4804 #: build/C/man2/write.2:159
4805 #, no-wrap
4806 msgid "B<EIO>"
4807 msgstr "B<EIO>"
4808
4809 #. type: Plain text
4810 #: build/C/man2/link.2:79 build/C/man2/symlink.2:109 build/C/man2/unlink.2:87
4811 msgid "An I/O error occurred."
4812 msgstr "I/O エラーが発生した。"
4813
4814 #. type: TP
4815 #: build/C/man2/link.2:79 build/C/man2/open.2:512 build/C/man2/readlink.2:108
4816 #: build/C/man2/rename.2:146 build/C/man2/rmdir.2:73
4817 #: build/C/man2/symlink.2:109 build/C/man2/unlink.2:92
4818 #, no-wrap
4819 msgid "B<ELOOP>"
4820 msgstr "B<ELOOP>"
4821
4822 #. type: Plain text
4823 #: build/C/man2/link.2:83 build/C/man2/rename.2:150
4824 msgid ""
4825 "Too many symbolic links were encountered in resolving I<oldpath> or "
4826 "I<newpath>."
4827 msgstr ""
4828 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過"
4829 "ぎる。"
4830
4831 #. type: TP
4832 #: build/C/man2/link.2:83 build/C/man2/rename.2:150
4833 #, no-wrap
4834 msgid "B<EMLINK>"
4835 msgstr "B<EMLINK>"
4836
4837 #. type: Plain text
4838 #: build/C/man2/link.2:88
4839 msgid ""
4840 "The file referred to by I<oldpath> already has the maximum number of links "
4841 "to it."
4842 msgstr ""
4843 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
4844
4845 #. type: TP
4846 #: build/C/man2/link.2:88 build/C/man2/open.2:522 build/C/man2/readlink.2:111
4847 #: build/C/man2/rename.2:157 build/C/man2/rmdir.2:77
4848 #: build/C/man2/symlink.2:113 build/C/man2/unlink.2:96
4849 #, no-wrap
4850 msgid "B<ENAMETOOLONG>"
4851 msgstr "B<ENAMETOOLONG>"
4852
4853 #. type: Plain text
4854 #: build/C/man2/link.2:91 build/C/man2/rename.2:160 build/C/man2/symlink.2:116
4855 msgid "I<oldpath> or I<newpath> was too long."
4856 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
4857
4858 #. type: TP
4859 #: build/C/man2/link.2:91 build/C/man2/open.2:536 build/C/man2/readlink.2:114
4860 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:80
4861 #: build/C/man2/symlink.2:116 build/C/man2/unlink.2:99
4862 #, no-wrap
4863 msgid "B<ENOENT>"
4864 msgstr "B<ENOENT>"
4865
4866 #. type: Plain text
4867 #: build/C/man2/link.2:96
4868 msgid ""
4869 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
4870 "dangling symbolic link."
4871 msgstr ""
4872 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
4873 "(dangling)シンボリックリンクである。"
4874
4875 #. type: TP
4876 #: build/C/man2/link.2:96 build/C/man2/open.2:543 build/C/man2/readlink.2:117
4877 #: build/C/man2/rename.2:173 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:568
4878 #: build/C/man2/symlink.2:123 build/C/man3/tempnam.3:91
4879 #: build/C/man2/unlink.2:106
4880 #, no-wrap
4881 msgid "B<ENOMEM>"
4882 msgstr "B<ENOMEM>"
4883
4884 #. type: Plain text
4885 #: build/C/man2/link.2:99 build/C/man2/open.2:546 build/C/man2/readlink.2:120
4886 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:88
4887 #: build/C/man2/symlink.2:126 build/C/man2/unlink.2:109
4888 msgid "Insufficient kernel memory was available."
4889 msgstr "十分なカーネルメモリーがない。"
4890
4891 #. type: TP
4892 #: build/C/man2/link.2:99 build/C/man2/open.2:546 build/C/man2/rename.2:176
4893 #: build/C/man2/symlink.2:126 build/C/man3/tmpfile.3:68
4894 #: build/C/man2/write.2:162
4895 #, no-wrap
4896 msgid "B<ENOSPC>"
4897 msgstr "B<ENOSPC>"
4898
4899 #. type: Plain text
4900 #: build/C/man2/link.2:103 build/C/man2/rename.2:180
4901 #: build/C/man2/symlink.2:130
4902 msgid "The device containing the file has no room for the new directory entry."
4903 msgstr ""
4904 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するため"
4905 "の空きがない。"
4906
4907 #. type: TP
4908 #: build/C/man2/link.2:103 build/C/man2/open.2:552 build/C/man2/readlink.2:120
4909 #: build/C/man2/rename.2:180 build/C/man2/rmdir.2:88
4910 #: build/C/man2/symlink.2:130 build/C/man2/unlink.2:109
4911 #, no-wrap
4912 msgid "B<ENOTDIR>"
4913 msgstr "B<ENOTDIR>"
4914
4915 #. type: Plain text
4916 #: build/C/man2/link.2:108
4917 msgid ""
4918 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
4919 "a directory."
4920 msgstr ""
4921 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
4922 "い。"
4923
4924 #. type: TP
4925 #: build/C/man2/link.2:108 build/C/man2/link.2:112 build/C/man2/open.2:585
4926 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
4927 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:114
4928 #, no-wrap
4929 msgid "B<EPERM>"
4930 msgstr "B<EPERM>"
4931
4932 #. type: Plain text
4933 #: build/C/man2/link.2:112
4934 msgid "I<oldpath> is a directory."
4935 msgstr "I<oldpath> がディレクトリである。"
4936
4937 #. type: Plain text
4938 #: build/C/man2/link.2:117
4939 msgid ""
4940 "The file system containing I<oldpath> and I<newpath> does not support the "
4941 "creation of hard links."
4942 msgstr ""
4943 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサ"
4944 "ポートしていない。"
4945
4946 #. type: TP
4947 #: build/C/man2/link.2:117 build/C/man2/open.2:593 build/C/man2/rename.2:218
4948 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:140
4949 #: build/C/man3/tmpfile.3:71 build/C/man2/unlink.2:137
4950 #, no-wrap
4951 msgid "B<EROFS>"
4952 msgstr "B<EROFS>"
4953
4954 #. type: Plain text
4955 #: build/C/man2/link.2:120 build/C/man2/rename.2:221
4956 msgid "The file is on a read-only file system."
4957 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
4958
4959 #. type: TP
4960 #: build/C/man2/link.2:120 build/C/man2/rename.2:221
4961 #, no-wrap
4962 msgid "B<EXDEV>"
4963 msgstr "B<EXDEV>"
4964
4965 #. type: Plain text
4966 #: build/C/man2/link.2:128
4967 msgid ""
4968 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
4969 "permits a file system to be mounted at multiple points, but B<link>()  does "
4970 "not work across different mount points, even if the same file system is "
4971 "mounted on both.)"
4972 msgstr ""
4973 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しな"
4974 "い。 (Linux は 1 つのファイルシステムを複数のマウント位置に マウントするこ"
4975 "とを許可している。 しかし B<link>()  は、たとえ同じファイルシステムであって"
4976 "も、 別々のマウント位置を跨いでは動作しない。)"
4977
4978 #.  SVr4 documents additional ENOLINK and
4979 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
4980 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
4981 #. type: Plain text
4982 #: build/C/man2/link.2:133
4983 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
4984 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
4985
4986 #. type: Plain text
4987 #: build/C/man2/link.2:140
4988 msgid ""
4989 "Hard links, as created by B<link>(), cannot span file systems.  Use "
4990 "B<symlink>(2)  if this is required."
4991 msgstr ""
4992 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできな"
4993 "い。 このような場合は B<symlink>(2)  を使用すること。"
4994
4995 #.  more precisely: since kernel 1.3.56
4996 #.  For example, the default Solaris compilation environment
4997 #.  behaves like Linux, and contributors to a March 2005
4998 #.  thread in the Austin mailing list reported that some
4999 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5000 #. type: Plain text
5001 #: build/C/man2/link.2:171
5002 msgid ""
5003 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5004 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5005 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5006 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5007 "the same file that I<oldpath> refers to).  Some other implementations behave "
5008 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5009 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5010 "dereferenced if it is a symbolic link.  For precise control over the "
5011 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5012 msgstr ""
5013 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5014 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5015 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリン"
5016 "クである場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リ"
5017 "ンクとして作成される (つまり I<newpath> は I<oldpath> が参照していた同じファ"
5018 "イルへのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように"
5019 "動作する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシン"
5020 "ボリックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依"
5021 "存となった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に "
5022 "関しては B<linkat>(2)  を参照のこと。"
5023
5024 #. type: Plain text
5025 #: build/C/man2/link.2:177
5026 msgid ""
5027 "On NFS file systems, the return code may be wrong in case the NFS server "
5028 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5029 "to find out if the link got created."
5030 msgstr ""
5031 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える"
5032 "前に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つけ"
5033 "るためには B<stat>(2)  を使用すること。"
5034
5035 #. type: Plain text
5036 #: build/C/man2/link.2:186
5037 msgid ""
5038 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5039 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5040 msgstr ""
5041 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5042 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5043
5044 #. type: TH
5045 #: build/C/man2/llseek.2:26
5046 #, no-wrap
5047 msgid "LLSEEK"
5048 msgstr "LLSEEK"
5049
5050 #. type: TH
5051 #: build/C/man2/llseek.2:26
5052 #, no-wrap
5053 msgid "2007-06-01"
5054 msgstr "2007-06-01"
5055
5056 #. type: Plain text
5057 #: build/C/man2/llseek.2:29
5058 msgid "_llseek - reposition read/write file offset"
5059 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5060
5061 #. type: Plain text
5062 #: build/C/man2/llseek.2:33
5063 #, no-wrap
5064 msgid ""
5065 "B<#include E<lt>sys/types.hE<gt>>\n"
5066 "B<#include E<lt>unistd.hE<gt>>\n"
5067 msgstr ""
5068 "B<#include E<lt>sys/types.hE<gt>>\n"
5069 "B<#include E<lt>unistd.hE<gt>>\n"
5070
5071 #. type: Plain text
5072 #: build/C/man2/llseek.2:37
5073 #, no-wrap
5074 msgid ""
5075 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5076 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5077 "B<            unsigned int >I<whence>B<);>\n"
5078 msgstr ""
5079 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5080 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5081 "B<            unsigned int >I<whence>B<);>\n"
5082
5083 #. type: Plain text
5084 #: build/C/man2/llseek.2:57
5085 msgid ""
5086 "The B<_llseek>()  function repositions the offset of the open file "
5087 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5088 "offset_low> bytes relative to the beginning of the file, the current "
5089 "position in the file, or the end of the file, depending on whether I<whence> "
5090 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5091 "resulting file position in the argument I<result>."
5092 msgstr ""
5093 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づ"
5094 "けられたオープンされたファイルのオフセットの位置を、相対的に I<"
5095 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5096 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5097 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5098 "のファイル位置を I<result> 引き数に返す。"
5099
5100 #. type: Plain text
5101 #: build/C/man2/llseek.2:64
5102 msgid ""
5103 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5104 "-1 is returned and I<errno> is set to indicate the error."
5105 msgstr ""
5106 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5107 "エラーを示す I<errno> が設定される。"
5108
5109 #. type: Plain text
5110 #: build/C/man2/llseek.2:69 build/C/man2/lseek.2:164
5111 msgid "I<fd> is not an open file descriptor."
5112 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5113
5114 #. type: Plain text
5115 #: build/C/man2/llseek.2:72
5116 msgid "Problem with copying results to user space."
5117 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5118
5119 #. type: Plain text
5120 #: build/C/man2/llseek.2:76
5121 msgid "I<whence> is invalid."
5122 msgstr "I<whence> が不正である。"
5123
5124 #. type: Plain text
5125 #: build/C/man2/llseek.2:79
5126 msgid ""
5127 "This function is Linux-specific, and should not be used in programs intended "
5128 "to be portable."
5129 msgstr ""
5130 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5131
5132 #. type: Plain text
5133 #: build/C/man2/llseek.2:82
5134 msgid ""
5135 "Glibc does not provide a wrapper for this system call; call it using "
5136 "B<syscall>(2)."
5137 msgstr ""
5138 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5139 "(2)  を使って呼び出すこと。"
5140
5141 #. type: Plain text
5142 #: build/C/man2/llseek.2:84
5143 msgid "B<lseek>(2), B<lseek64>(3)"
5144 msgstr "B<lseek>(2), B<lseek64>(3)"
5145
5146 #. type: TH
5147 #: build/C/man2/lseek.2:45
5148 #, no-wrap
5149 msgid "LSEEK"
5150 msgstr "LSEEK"
5151
5152 #. type: TH
5153 #: build/C/man2/lseek.2:45
5154 #, no-wrap
5155 msgid "2011-09-25"
5156 msgstr "2011-09-25"
5157
5158 #. type: Plain text
5159 #: build/C/man2/lseek.2:48
5160 msgid "lseek - reposition read/write file offset"
5161 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5162
5163 #. type: Plain text
5164 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:30
5165 msgid "B<#include E<lt>sys/types.hE<gt>>"
5166 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5167
5168 #. type: Plain text
5169 #: build/C/man2/lseek.2:54
5170 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5171 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5172
5173 #. type: Plain text
5174 #: build/C/man2/lseek.2:65
5175 msgid ""
5176 "The B<lseek>()  function repositions the offset of the open file associated "
5177 "with the file descriptor I<fd> to the argument I<offset> according to the "
5178 "directive I<whence> as follows:"
5179 msgstr ""
5180 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5181 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5182 "へ以下のように変更する:"
5183
5184 #. type: Plain text
5185 #: build/C/man2/lseek.2:70
5186 msgid "The offset is set to I<offset> bytes."
5187 msgstr "オフセットは I<offset> バイトに設定される。"
5188
5189 #. type: Plain text
5190 #: build/C/man2/lseek.2:75
5191 msgid "The offset is set to its current location plus I<offset> bytes."
5192 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5193
5194 #. type: Plain text
5195 #: build/C/man2/lseek.2:80
5196 msgid "The offset is set to the size of the file plus I<offset> bytes."
5197 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5198
5199 #. type: Plain text
5200 #: build/C/man2/lseek.2:88
5201 msgid ""
5202 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5203 "the file (but this does not change the size of the file).  If data is later "
5204 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5205 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5206 "gap."
5207 msgstr ""
5208 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5209 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5210 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5211 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5212 "される。"
5213
5214 #. type: SS
5215 #: build/C/man2/lseek.2:88
5216 #, no-wrap
5217 msgid "Seeking file data and holes"
5218 msgstr ""
5219
5220 #. type: Plain text
5221 #: build/C/man2/lseek.2:91
5222 msgid ""
5223 "Since version 3.1, Linux supports the following additional values for "
5224 "I<whence>:"
5225 msgstr ""
5226
5227 #. type: TP
5228 #: build/C/man2/lseek.2:91
5229 #, no-wrap
5230 msgid "B<SEEK_DATA>"
5231 msgstr "B<SEEK_DATA>"
5232
5233 #. type: Plain text
5234 #: build/C/man2/lseek.2:102
5235 msgid ""
5236 "Adjust the file offset to the next location in the file greater than or "
5237 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5238 "file offset is set to I<offset>."
5239 msgstr ""
5240
5241 #. type: TP
5242 #: build/C/man2/lseek.2:102
5243 #, no-wrap
5244 msgid "B<SEEK_HOLE>"
5245 msgstr "B<SEEK_HOLE>"
5246
5247 #. type: Plain text
5248 #: build/C/man2/lseek.2:116
5249 msgid ""
5250 "Adjust the file offset to the next hole in the file greater than or equal to "
5251 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5252 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5253 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5254 "hole at the end of any file)."
5255 msgstr ""
5256
5257 #. type: Plain text
5258 #: build/C/man2/lseek.2:122
5259 msgid ""
5260 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5261 "end of the file."
5262 msgstr ""
5263
5264 #. type: Plain text
5265 #: build/C/man2/lseek.2:128
5266 msgid ""
5267 "These operations allow applications to map holes in a sparsely allocated "
5268 "file.  This can be useful for applications such as file backup tools, which "
5269 "can save space when creating backups and preserve holes, if they have a "
5270 "mechanism for discovering holes."
5271 msgstr ""
5272
5273 #.  https://lkml.org/lkml/2011/4/22/79
5274 #.  http://lwn.net/Articles/440255/
5275 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5276 #. type: Plain text
5277 #: build/C/man2/lseek.2:151
5278 msgid ""
5279 "For the purposes of these operations, a hole is a sequence of zeros that "
5280 "(normally) has not been allocated in the underlying file storage.  However, "
5281 "a file system is not obliged to report holes, so these operations are not a "
5282 "guaranteed mechanism for mapping the storage space actually allocated to a "
5283 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5284 "the underlying storage may not be reported as a hole.)  In the simplest "
5285 "implementation, a file system can support the operations by making "
5286 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5287 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5288 "by I<offset> is a hole, it can be considered to consist of data that is a "
5289 "sequence of zeros)."
5290 msgstr ""
5291
5292 #. type: Plain text
5293 #: build/C/man2/lseek.2:159
5294 msgid ""
5295 "Upon successful completion, B<lseek>()  returns the resulting offset "
5296 "location as measured in bytes from the beginning of the file.  On error, the "
5297 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5298 msgstr ""
5299 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5300 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5301 "される。"
5302
5303 #.  Some systems may allow negative offsets for character devices
5304 #.  and/or for remote file systems.
5305 #. type: Plain text
5306 #: build/C/man2/lseek.2:172
5307 msgid ""
5308 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5309 "beyond the end of a seekable device."
5310 msgstr ""
5311 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5312 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5313
5314 #. type: TP
5315 #: build/C/man2/lseek.2:172 build/C/man2/open.2:565
5316 #, no-wrap
5317 msgid "B<EOVERFLOW>"
5318 msgstr "B<EOVERFLOW>"
5319
5320 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5321 #. type: Plain text
5322 #: build/C/man2/lseek.2:177
5323 msgid "The resulting file offset cannot be represented in an I<off_t>."
5324 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5325
5326 #. type: TP
5327 #: build/C/man2/lseek.2:177
5328 #, no-wrap
5329 msgid "B<ESPIPE>"
5330 msgstr "B<ESPIPE>"
5331
5332 #. type: Plain text
5333 #: build/C/man2/lseek.2:181
5334 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5335 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5336
5337 #. type: TP
5338 #: build/C/man2/lseek.2:181 build/C/man2/open.2:559
5339 #, no-wrap
5340 msgid "B<ENXIO>"
5341 msgstr "B<ENXIO>"
5342
5343 #. type: Plain text
5344 #: build/C/man2/lseek.2:189
5345 msgid ""
5346 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5347 "beyond the end of the file."
5348 msgstr ""
5349 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5350 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5351
5352 #.  SVr4 documents additional error
5353 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5354 #. type: Plain text
5355 #: build/C/man2/lseek.2:191 build/C/man2/read.2:157 build/C/man2/rmdir.2:129
5356 #: build/C/man2/symlink.2:150 build/C/man2/unlink.2:145
5357 #: build/C/man2/write.2:183
5358 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5359 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5360
5361 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5362 #. type: Plain text
5363 #: build/C/man2/lseek.2:199
5364 msgid ""
5365 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5366 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5367 "next POSIX revision (Issue 8)."
5368 msgstr ""
5369
5370 #. type: Plain text
5371 #: build/C/man2/lseek.2:203
5372 msgid ""
5373 "Some devices are incapable of seeking and POSIX does not specify which "
5374 "devices must support B<lseek>()."
5375 msgstr ""
5376 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5377 "に対応すべきかは規定していない。"
5378
5379 #.  Other systems return the number of written characters,
5380 #.  using SEEK_SET to set the counter. (Of written characters.)
5381 #. type: Plain text
5382 #: build/C/man2/lseek.2:210
5383 msgid "On Linux, using B<lseek>()  on a tty device returns B<ESPIPE>."
5384 msgstr ""
5385 "Linux では、 tty デバイスに B<lseek>()  を使用すると B<ESPIPE> を返す。"
5386
5387 #. type: Plain text
5388 #: build/C/man2/lseek.2:213
5389 msgid ""
5390 "When converting old code, substitute values for I<whence> with the following "
5391 "macros:"
5392 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5393
5394 #. type: tbl table
5395 #: build/C/man2/lseek.2:216
5396 #, no-wrap
5397 msgid "old\tnew\n"
5398 msgstr "old \tnew\n"
5399
5400 #. type: tbl table
5401 #: build/C/man2/lseek.2:217
5402 #, no-wrap
5403 msgid "0\tSEEK_SET\n"
5404 msgstr "0\tSEEK_SET\n"
5405
5406 #. type: tbl table
5407 #: build/C/man2/lseek.2:218
5408 #, no-wrap
5409 msgid "1\tSEEK_CUR\n"
5410 msgstr "1\tSEEK_CUR\n"
5411
5412 #. type: tbl table
5413 #: build/C/man2/lseek.2:219
5414 #, no-wrap
5415 msgid "2\tSEEK_END\n"
5416 msgstr "2\tSEEK_END\n"
5417
5418 #. type: tbl table
5419 #: build/C/man2/lseek.2:220
5420 #, no-wrap
5421 msgid "L_SET\tSEEK_SET\n"
5422 msgstr "L_SET\tSEEK_SET\n"
5423
5424 #. type: tbl table
5425 #: build/C/man2/lseek.2:221
5426 #, no-wrap
5427 msgid "L_INCR\tSEEK_CUR\n"
5428 msgstr "L_INCR\tSEEK_CUR\n"
5429
5430 #. type: tbl table
5431 #: build/C/man2/lseek.2:222
5432 #, no-wrap
5433 msgid "L_XTND\tSEEK_END\n"
5434 msgstr "L_XTND\tSEEK_END\n"
5435
5436 #. type: Plain text
5437 #: build/C/man2/lseek.2:234
5438 msgid ""
5439 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5440 "current file position pointer, so seeking on such files may be subject to "
5441 "race conditions."
5442 msgstr ""
5443 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5444 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5445 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5446
5447 #. type: Plain text
5448 #: build/C/man2/lseek.2:240
5449 msgid ""
5450 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5451 "B<posix_fallocate>(3)"
5452 msgstr ""
5453 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5454 "B<posix_fallocate>(3)"
5455
5456 #. type: TH
5457 #: build/C/man3/lseek64.3:23
5458 #, no-wrap
5459 msgid "LSEEK64"
5460 msgstr "LSEEK64"
5461
5462 #. type: TH
5463 #: build/C/man3/lseek64.3:23
5464 #, no-wrap
5465 msgid "2004-12-11"
5466 msgstr "2004-12-11"
5467
5468 #. type: Plain text
5469 #: build/C/man3/lseek64.3:26
5470 msgid "lseek64 - reposition 64-bit read/write file offset"
5471 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5472
5473 #. type: Plain text
5474 #: build/C/man3/lseek64.3:28
5475 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5476 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5477
5478 #. type: Plain text
5479 #: build/C/man3/lseek64.3:34
5480 msgid ""
5481 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5482 msgstr ""
5483 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5484
5485 #. type: Plain text
5486 #: build/C/man3/lseek64.3:51
5487 msgid ""
5488 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5489 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5490 "start, current position, or end of the file, when I<whence> has the value "
5491 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5492 msgstr ""
5493 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5494 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5495 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5496 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5497
5498 #. type: Plain text
5499 #: build/C/man3/lseek64.3:54
5500 msgid "For more details, return value, and errors, see B<lseek>(2)."
5501 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5502
5503 #. type: Plain text
5504 #: build/C/man3/lseek64.3:61
5505 msgid ""
5506 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5507 "the raw system call B<_llseek>(2)."
5508 msgstr ""
5509 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5510 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5511
5512 #. type: SS
5513 #: build/C/man3/lseek64.3:61
5514 #, no-wrap
5515 msgid "lseek"
5516 msgstr "lseek"
5517
5518 #. type: Plain text
5519 #: build/C/man3/lseek64.3:63 build/C/man3/lseek64.3:85
5520 #: build/C/man3/lseek64.3:114
5521 msgid "Prototype:"
5522 msgstr "プロトタイプ:"
5523
5524 #. type: Plain text
5525 #: build/C/man3/lseek64.3:67
5526 #, no-wrap
5527 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5528 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5529
5530 #. type: Plain text
5531 #: build/C/man3/lseek64.3:75
5532 msgid ""
5533 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5534 "architectures, unless one compiles with"
5535 msgstr ""
5536 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5537 "ビット符号付き型である。 ただし、"
5538
5539 #. type: Plain text
5540 #: build/C/man3/lseek64.3:83
5541 msgid "in which case it is a 64-bit signed type."
5542 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5543
5544 #. type: SS
5545 #: build/C/man3/lseek64.3:83
5546 #, no-wrap
5547 msgid "lseek64"
5548 msgstr "lseek64"
5549
5550 #. type: Plain text
5551 #: build/C/man3/lseek64.3:89
5552 #, no-wrap
5553 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5554 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5555
5556 #. type: Plain text
5557 #: build/C/man3/lseek64.3:100
5558 msgid ""
5559 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5560 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5561 "when one compiles with"
5562 msgstr ""
5563 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5564 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5565 "ルした場合にのみ使用可能である。"
5566
5567 #. type: Plain text
5568 #: build/C/man3/lseek64.3:104
5569 #, no-wrap
5570 msgid "#define _LARGEFILE64_SOURCE\n"
5571 msgstr "#define _LARGEFILE64_SOURCE\n"
5572
5573 #.  in glibc 2.0.94, not in 2.0.6
5574 #. type: Plain text
5575 #: build/C/man3/lseek64.3:112
5576 msgid ""
5577 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5578 "be an alias for B<llseek>()."
5579 msgstr ""
5580 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5581 "アスとして定義されている。"
5582
5583 #. type: SS
5584 #: build/C/man3/lseek64.3:112
5585 #, no-wrap
5586 msgid "llseek"
5587 msgstr "llseek"
5588
5589 #. type: Plain text
5590 #: build/C/man3/lseek64.3:118
5591 #, no-wrap
5592 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5593 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5594
5595 #.  in libc 5.0.9, not in 4.7.6
5596 #. type: Plain text
5597 #: build/C/man3/lseek64.3:137
5598 msgid ""
5599 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5600 "()  is available in libc5 and glibc and works without special defines.  Its "
5601 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5602 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5603 "should add the above prototype, or something equivalent, to their own "
5604 "source.  When users complained about data loss caused by a miscompilation of "
5605 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5606 msgstr ""
5607 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5608 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5609 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5610 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5611 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5612 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5613 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5614
5615 #. type: Plain text
5616 #: build/C/man3/lseek64.3:140
5617 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5618 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5619
5620 #. type: Plain text
5621 #: build/C/man3/lseek64.3:144
5622 msgid ""
5623 "This makes this function unusable if one desires a warning-free compilation."
5624 msgstr ""
5625 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5626
5627 #. type: SS
5628 #: build/C/man3/lseek64.3:144
5629 #, no-wrap
5630 msgid "_llseek"
5631 msgstr "_llseek"
5632
5633 #. type: Plain text
5634 #: build/C/man3/lseek64.3:147
5635 msgid ""
5636 "All the above functions are implemented in terms of this system call.  The "
5637 "prototype is:"
5638 msgstr ""
5639 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5640 "下の通り:"
5641
5642 #. type: Plain text
5643 #: build/C/man3/lseek64.3:152
5644 #, no-wrap
5645 msgid ""
5646 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5647 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5648 msgstr ""
5649 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5650 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5651
5652 #. type: Plain text
5653 #: build/C/man3/lseek64.3:157
5654 msgid "For more details, see B<llseek>(2)."
5655 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5656
5657 #. type: Plain text
5658 #: build/C/man3/lseek64.3:159
5659 msgid "B<llseek>(2), B<lseek>(2)"
5660 msgstr "B<llseek>(2), B<lseek>(2)"
5661
5662 #. type: TH
5663 #: build/C/man2/open.2:52
5664 #, no-wrap
5665 msgid "OPEN"
5666 msgstr "OPEN"
5667
5668 #. type: TH
5669 #: build/C/man2/open.2:52
5670 #, no-wrap
5671 msgid "2012-02-27"
5672 msgstr "2012-02-27"
5673
5674 #. type: Plain text
5675 #: build/C/man2/open.2:55
5676 msgid "open, creat - open and possibly create a file or device"
5677 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5678
5679 #. type: Plain text
5680 #: build/C/man2/open.2:60
5681 #, no-wrap
5682 msgid ""
5683 "B<#include E<lt>sys/types.hE<gt>>\n"
5684 "B<#include E<lt>sys/stat.hE<gt>>\n"
5685 "B<#include E<lt>fcntl.hE<gt>>\n"
5686 msgstr ""
5687 "B<#include E<lt>sys/types.hE<gt>>\n"
5688 "B<#include E<lt>sys/stat.hE<gt>>\n"
5689 "B<#include E<lt>fcntl.hE<gt>>\n"
5690
5691 #. type: Plain text
5692 #: build/C/man2/open.2:63
5693 #, no-wrap
5694 msgid ""
5695 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5696 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5697 msgstr ""
5698 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5699 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5700
5701 #. type: Plain text
5702 #: build/C/man2/open.2:65
5703 #, no-wrap
5704 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5705 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5706
5707 #. type: Plain text
5708 #: build/C/man2/open.2:76
5709 msgid ""
5710 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
5711 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
5712 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
5713 "by a successful call will be the lowest-numbered file descriptor not "
5714 "currently open for the process."
5715 msgstr ""
5716 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
5717 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
5718 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
5719 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは そ"
5720 "のプロセスがその時点でオープンしていないファイルディスクリプタの うち最小の"
5721 "数字のものとなる。"
5722
5723 #. type: Plain text
5724 #: build/C/man2/open.2:88
5725 msgid ""
5726 "By default, the new file descriptor is set to remain open across an B<execve>"
5727 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
5728 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
5729 "to change this default).  The file offset is set to the beginning of the "
5730 "file (see B<lseek>(2))."
5731 msgstr ""
5732 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
5733 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
5734 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
5735 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
5736 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
5737
5738 #. type: Plain text
5739 #: build/C/man2/open.2:107
5740 msgid ""
5741 "A call to B<open>()  creates a new I<open file description>, an entry in the "
5742 "system-wide table of open files.  This entry records the file offset and the "
5743 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
5744 "file descriptor is a reference to one of these entries; this reference is "
5745 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
5746 "different file.  The new open file description is initially not shared with "
5747 "any other process, but sharing may arise via B<fork>(2)."
5748 msgstr ""
5749 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
5750 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
5751 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
5752 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスク"
5753 "リプタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除さ"
5754 "れたり、他のファイルを参照するように変更されたりしても、 この参照は影響を受け"
5755 "ない。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていな"
5756 "いが、 B<fork>(2)  で共有が起こる場合がある。"
5757
5758 #. type: Plain text
5759 #: build/C/man2/open.2:115
5760 msgid ""
5761 "The argument I<flags> must include one of the following I<access modes>: "
5762 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
5763 "only, write-only, or read/write, respectively."
5764 msgstr ""
5765 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
5766 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
5767 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
5768
5769 #.  FIXME . Actually is it true that the "file status flags" are all of the
5770 #.  remaining flags listed below?  SUSv4 divides the flags into:
5771 #.  * Access mode
5772 #.  * File creation
5773 #.  * File status
5774 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
5775 #.  though it's not clear what the difference between "other" and
5776 #.  "File creation" flags is.  (I've raised an Aardvark to see if this
5777 #.  can be clarified in SUSv4; 10 Oct 2008.)
5778 #. type: Plain text
5779 #: build/C/man2/open.2:142
5780 msgid ""
5781 "In addition, zero or more file creation flags and file status flags can be "
5782 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CREAT>, "
5783 "B<O_EXCL>, B<O_NOCTTY>, and B<O_TRUNC>.  The I<file status flags> are all of "
5784 "the remaining flags listed below.  The distinction between these two groups "
5785 "of flags is that the file status flags can be retrieved and (in some cases)  "
5786 "modified using B<fcntl>(2).  The full list of file creation flags and file "
5787 "status flags is as follows:"
5788 msgstr ""
5789 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
5790 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
5791 "定することができる。 I<ファイル作成フラグ> は B<O_CREAT>, B<O_EXCL>, "
5792 "B<O_NOCTTY>, B<O_TRUNC> である。 I<ファイル状態フラグ> は以下のリストのうち上"
5793 "記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は "
5794 "B<fcntl>(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点"
5795 "にある。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
5796
5797 #. type: TP
5798 #: build/C/man2/open.2:142
5799 #, no-wrap
5800 msgid "B<O_APPEND>"
5801 msgstr "B<O_APPEND>"
5802
5803 #.  For more background, see
5804 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
5805 #.  http://nfs.sourceforge.net/
5806 #. type: Plain text
5807 #: build/C/man2/open.2:159
5808 msgid ""
5809 "The file is opened in append mode.  Before each B<write>(2), the file offset "
5810 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
5811 "may lead to corrupted files on NFS file systems if more than one process "
5812 "appends data to a file at once.  This is because NFS does not support "
5813 "appending to a file, so the client kernel has to simulate it, which can't be "
5814 "done without a race condition."
5815 msgstr ""
5816 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
5817 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
5818 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひ"
5819 "とつのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
5820 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
5821 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
5822 "とはできないからである。"
5823
5824 #. type: TP
5825 #: build/C/man2/open.2:159
5826 #, no-wrap
5827 msgid "B<O_ASYNC>"
5828 msgstr "B<O_ASYNC>"
5829
5830 #. type: Plain text
5831 #: build/C/man2/open.2:172
5832 msgid ""
5833 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
5834 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
5835 "this file descriptor.  This feature is only available for terminals, "
5836 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
5837 "B<fcntl>(2)  for further details."
5838 msgstr ""
5839 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプ"
5840 "タへの 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
5841 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
5842 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
5843 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
5844
5845 #. type: TP
5846 #: build/C/man2/open.2:172
5847 #, no-wrap
5848 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
5849 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
5850
5851 #.  This flag fixes only one form of the race condition;
5852 #.  The race can also occur with, for example, descriptors
5853 #.  returned by accept(), pipe(), etc.
5854 #. type: Plain text
5855 #: build/C/man2/open.2:197
5856 msgid ""
5857 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
5858 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
5859 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
5860 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
5861 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
5862 "race conditions where one thread opens a file descriptor at the same time as "
5863 "another thread does a B<fork>(2)  plus B<execve>(2)."
5864 msgstr ""
5865 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 こ"
5866 "のフラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするため"
5867 "の B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種の"
5868 "マルチスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別"
5869 "に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したと"
5870 "しても、あるスレッドがファイルディスクリプタを オープンするのと同時に別のス"
5871 "レッドが B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには"
5872 "十分ではないからである。"
5873
5874 #. type: TP
5875 #: build/C/man2/open.2:197
5876 #, no-wrap
5877 msgid "B<O_CREAT>"
5878 msgstr "B<O_CREAT>"
5879
5880 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
5881 #.  XFS (since 2.6.14).
5882 #. type: Plain text
5883 #: build/C/man2/open.2:213
5884 msgid ""
5885 "If the file does not exist it will be created.  The owner (user ID) of the "
5886 "file is set to the effective user ID of the process.  The group ownership "
5887 "(group ID) is set either to the effective group ID of the process or to the "
5888 "group ID of the parent directory (depending on file system type and mount "
5889 "options, and the mode of the parent directory, see the mount options "
5890 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
5891 msgstr ""
5892 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
5893 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
5894 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
5895 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
5896 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
5897 "I<bsdgroups> と I<sysvgroups> を参照)。"
5898
5899 #. type: Plain text
5900 #: build/C/man2/open.2:236
5901 msgid ""
5902 "I<mode> specifies the permissions to use in case a new file is created.  "
5903 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
5904 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
5905 "permissions are modified by the process's I<umask> in the usual way: The "
5906 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
5907 "mode only applies to future accesses of the newly created file; the B<open>"
5908 "()  call that creates a read-only file may well return a read/write file "
5909 "descriptor."
5910 msgstr ""
5911 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
5912 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
5913 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
5914 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
5915 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
5916 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
5917 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
5918 "可能なファイルディスクリプタを返すことがありうる。"
5919
5920 #. type: Plain text
5921 #: build/C/man2/open.2:239
5922 msgid "The following symbolic constants are provided for I<mode>:"
5923 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
5924
5925 #. type: TP
5926 #: build/C/man2/open.2:239
5927 #, no-wrap
5928 msgid "B<S_IRWXU>"
5929 msgstr "B<S_IRWXU>"
5930
5931 #. type: Plain text
5932 #: build/C/man2/open.2:242
5933 msgid "00700 user (file owner) has read, write and execute permission"
5934 msgstr ""
5935 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
5936
5937 #. type: TP
5938 #: build/C/man2/open.2:242
5939 #, no-wrap
5940 msgid "B<S_IRUSR>"
5941 msgstr "B<S_IRUSR>"
5942
5943 #. type: Plain text
5944 #: build/C/man2/open.2:245
5945 msgid "00400 user has read permission"
5946 msgstr "00400 ユーザーに読み込みの許可がある。"
5947
5948 #. type: TP
5949 #: build/C/man2/open.2:245
5950 #, no-wrap
5951 msgid "B<S_IWUSR>"
5952 msgstr "B<S_IWUSR>"
5953
5954 #. type: Plain text
5955 #: build/C/man2/open.2:248
5956 msgid "00200 user has write permission"
5957 msgstr "00200 ユーザーに書き込みの許可がある。"
5958
5959 #. type: TP
5960 #: build/C/man2/open.2:248
5961 #, no-wrap
5962 msgid "B<S_IXUSR>"
5963 msgstr "B<S_IXUSR>"
5964
5965 #. type: Plain text
5966 #: build/C/man2/open.2:251
5967 msgid "00100 user has execute permission"
5968 msgstr "00100 ユーザーに実行の許可がある。"
5969
5970 #. type: TP
5971 #: build/C/man2/open.2:251
5972 #, no-wrap
5973 msgid "B<S_IRWXG>"
5974 msgstr "B<S_IRWXG>"
5975
5976 #. type: Plain text
5977 #: build/C/man2/open.2:254
5978 msgid "00070 group has read, write and execute permission"
5979 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
5980
5981 #. type: TP
5982 #: build/C/man2/open.2:254
5983 #, no-wrap
5984 msgid "B<S_IRGRP>"
5985 msgstr "B<S_IRGRP>"
5986
5987 #. type: Plain text
5988 #: build/C/man2/open.2:257
5989 msgid "00040 group has read permission"
5990 msgstr "00040 グループに読み込みの許可がある。"
5991
5992 #. type: TP
5993 #: build/C/man2/open.2:257
5994 #, no-wrap
5995 msgid "B<S_IWGRP>"
5996 msgstr "B<S_IWGRP>"
5997
5998 #. type: Plain text
5999 #: build/C/man2/open.2:260
6000 msgid "00020 group has write permission"
6001 msgstr "00020 グループに書き込みの許可がある。"
6002
6003 #. type: TP
6004 #: build/C/man2/open.2:260
6005 #, no-wrap
6006 msgid "B<S_IXGRP>"
6007 msgstr "B<S_IXGRP>"
6008
6009 #. type: Plain text
6010 #: build/C/man2/open.2:263
6011 msgid "00010 group has execute permission"
6012 msgstr "00010 グループに実行の許可がある。"
6013
6014 #. type: TP
6015 #: build/C/man2/open.2:263
6016 #, no-wrap
6017 msgid "B<S_IRWXO>"
6018 msgstr "B<S_IRWXO>"
6019
6020 #. type: Plain text
6021 #: build/C/man2/open.2:266
6022 msgid "00007 others have read, write and execute permission"
6023 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6024
6025 #. type: TP
6026 #: build/C/man2/open.2:266
6027 #, no-wrap
6028 msgid "B<S_IROTH>"
6029 msgstr "B<S_IROTH>"
6030
6031 #. type: Plain text
6032 #: build/C/man2/open.2:269
6033 msgid "00004 others have read permission"
6034 msgstr "00004 他人に読み込みの許可がある。"
6035
6036 #. type: TP
6037 #: build/C/man2/open.2:269
6038 #, no-wrap
6039 msgid "B<S_IWOTH>"
6040 msgstr "B<S_IWOTH>"
6041
6042 #. type: Plain text
6043 #: build/C/man2/open.2:272
6044 msgid "00002 others have write permission"
6045 msgstr "00002 他人に書き込みの許可がある。"
6046
6047 #. type: TP
6048 #: build/C/man2/open.2:272
6049 #, no-wrap
6050 msgid "B<S_IXOTH>"
6051 msgstr "B<S_IXOTH>"
6052
6053 #. type: Plain text
6054 #: build/C/man2/open.2:275
6055 msgid "00001 others have execute permission"
6056 msgstr "00001 他人に実行の許可がある。"
6057
6058 #. type: TP
6059 #: build/C/man2/open.2:276
6060 #, no-wrap
6061 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6062 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6063
6064 #. type: Plain text
6065 #: build/C/man2/open.2:293
6066 msgid ""
6067 "Try to minimize cache effects of the I/O to and from this file.  In general "
6068 "this will degrade performance, but it is useful in special situations, such "
6069 "as when applications do their own caching.  File I/O is done directly to/"
6070 "from user space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6071 "transfer data synchronously, but does not give the guarantees of the "
6072 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6073 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6074 "B<O_DIRECT>.  See NOTES below for further discussion."
6075 msgstr ""
6076 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを\n"
6077 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを\n"
6078 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッファ\n"
6079 "に対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようとはす\n"
6080 "るが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証されるわけ\n"
6081 "ではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を使用\n"
6082 "しなければならない。下記の「注意」の節の議論も参照。"
6083
6084 #. type: Plain text
6085 #: build/C/man2/open.2:297
6086 msgid ""
6087 "A semantically similar (but deprecated) interface for block devices is "
6088 "described in B<raw>(8)."
6089 msgstr ""
6090 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6091 "れている (但し、このインタフェースは非推奨である)。"
6092
6093 #. type: TP
6094 #: build/C/man2/open.2:297
6095 #, no-wrap
6096 msgid "B<O_DIRECTORY>"
6097 msgstr "B<O_DIRECTORY>"
6098
6099 #.  But see the following and its replies:
6100 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6101 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6102 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6103 #. type: Plain text
6104 #: build/C/man2/open.2:311
6105 msgid ""
6106 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6107 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6108 "service problems if B<opendir>(3)  is called on a FIFO or tape device, but "
6109 "should not be used outside of the implementation of B<opendir>(3)."
6110 msgstr ""
6111 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6112 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6113 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6114 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6115
6116 #. type: TP
6117 #: build/C/man2/open.2:311
6118 #, no-wrap
6119 msgid "B<O_EXCL>"
6120 msgstr "B<O_EXCL>"
6121
6122 #. type: Plain text
6123 #: build/C/man2/open.2:321
6124 msgid ""
6125 "Ensure that this call creates the file: if this flag is specified in "
6126 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6127 "will fail."
6128 msgstr ""
6129 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> と\n"
6130 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失敗\n"
6131 "する。"
6132
6133 #.  POSIX.1-2001 explicitly requires this behavior.
6134 #. type: Plain text
6135 #: build/C/man2/open.2:329
6136 msgid ""
6137 "When these two flags are specified, symbolic links are not followed: if "
6138 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6139 "the symbolic link points to."
6140 msgstr ""
6141 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6142 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6143 "かに関わらず B<open>()  は失敗する。"
6144
6145 #. type: Plain text
6146 #: build/C/man2/open.2:345
6147 msgid ""
6148 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6149 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6150 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6151 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6152 "the error B<EBUSY>."
6153 msgstr ""
6154
6155 #. type: Plain text
6156 #: build/C/man2/open.2:367
6157 msgid ""
6158 "On NFS, B<O_EXCL> is only supported when using NFSv3 or later on kernel 2.6 "
6159 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6160 "programs that rely on it for performing locking tasks will contain a race "
6161 "condition.  Portable programs that want to perform atomic file locking using "
6162 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6163 "create a unique file on the same file system (e.g., incorporating hostname "
6164 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6165 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6166 "unique file to check if its link count has increased to 2, in which case the "
6167 "lock is also successful."
6168 msgstr ""
6169 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6170 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6171 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6172 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6173 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6174 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6175 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6176 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6177 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6178 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6179 "じくロックに成功しているということである。"
6180
6181 #. type: TP
6182 #: build/C/man2/open.2:367
6183 #, no-wrap
6184 msgid "B<O_LARGEFILE>"
6185 msgstr "B<O_LARGEFILE>"
6186
6187 #. type: Plain text
6188 #: build/C/man2/open.2:389
6189 msgid ""
6190 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6191 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6192 "macro must be defined (before including I<any> header files)  in order to "
6193 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6194 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6195 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6196 msgstr ""
6197 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)ファ\n"
6198 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファイ\n"
6199 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなければ\n"
6200 "ならない。\n"
6201 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6202 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6203 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6204
6205 #. type: TP
6206 #: build/C/man2/open.2:389
6207 #, no-wrap
6208 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6209 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6210
6211 #.  The O_NOATIME flag also affects the treatment of st_atime
6212 #.  by mmap() and readdir(2), MTK, Dec 04.
6213 #. type: Plain text
6214 #: build/C/man2/open.2:400
6215 msgid ""
6216 "Do not update the file last access time (st_atime in the inode)  when the "
6217 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6218 "programs, where its use can significantly reduce the amount of disk "
6219 "activity.  This flag may not be effective on all file systems.  One example "
6220 "is NFS, where the server maintains the access time."
6221 msgstr ""
6222 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6223 "st_atime) を更新しない。 このフラグはインデックス作成やバックアッププログラム"
6224 "で使うことを意図している。 これを使うとディスクに対する操作を大幅に減らすこと"
6225 "ができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6226 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6227
6228 #. type: TP
6229 #: build/C/man2/open.2:400
6230 #, no-wrap
6231 msgid "B<O_NOCTTY>"
6232 msgstr "B<O_NOCTTY>"
6233
6234 #. type: Plain text
6235 #: build/C/man2/open.2:408
6236 msgid ""
6237 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(em it will "
6238 "not become the process's controlling terminal even if the process does not "
6239 "have one."
6240 msgstr ""
6241 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指している\n"
6242 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイル\n"
6243 "は制御端末にはならない。"
6244
6245 #. type: TP
6246 #: build/C/man2/open.2:408
6247 #, no-wrap
6248 msgid "B<O_NOFOLLOW>"
6249 msgstr "B<O_NOFOLLOW>"
6250
6251 #.  The headers from glibc 2.0.100 and later include a
6252 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6253 #.  used\fP.
6254 #. type: Plain text
6255 #: build/C/man2/open.2:417
6256 msgid ""
6257 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6258 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6259 "earlier components of the pathname will still be followed."
6260 msgstr ""
6261 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6262 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6263 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6264 "が シンボリックリンクである場合には、それが指す先が参照される。"
6265
6266 #. type: TP
6267 #: build/C/man2/open.2:417
6268 #, no-wrap
6269 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6270 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6271
6272 #. type: Plain text
6273 #: build/C/man2/open.2:430
6274 msgid ""
6275 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6276 "()  nor any subsequent operations on the file descriptor which is returned "
6277 "will cause the calling process to wait.  For the handling of FIFOs (named "
6278 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6279 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6280 "see B<fcntl>(2)."
6281 msgstr ""
6282 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6283 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び出\n"
6284 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6285 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファイ\n"
6286 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6287 "議論は、 B<fcntl>(2) を参照すること。"
6288
6289 #. type: TP
6290 #: build/C/man2/open.2:430
6291 #, no-wrap
6292 msgid "B<O_SYNC>"
6293 msgstr "B<O_SYNC>"
6294
6295 #. type: Plain text
6296 #: build/C/man2/open.2:438
6297 msgid ""
6298 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6299 "file descriptor will block the calling process until the data has been "
6300 "physically written to the underlying hardware.  I<But see NOTES below>."
6301 msgstr ""
6302 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6303 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセ"
6304 "スをブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下"
6305 "の「注意」の章も参照。>"
6306
6307 #. type: TP
6308 #: build/C/man2/open.2:438
6309 #, no-wrap
6310 msgid "B<O_TRUNC>"
6311 msgstr "B<O_TRUNC>"
6312
6313 #. type: Plain text
6314 #: build/C/man2/open.2:452
6315 msgid ""
6316 "If the file already exists and is a regular file and the open mode allows "
6317 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6318 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6319 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6320 msgstr ""
6321 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6322 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6323 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6324 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6325 "ある。"
6326
6327 #. type: Plain text
6328 #: build/C/man2/open.2:456
6329 msgid ""
6330 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6331 "file has been opened."
6332 msgstr ""
6333 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6334 "用して変更することができる。"
6335
6336 #. type: Plain text
6337 #: build/C/man2/open.2:464
6338 msgid ""
6339 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6340 "O_WRONLY|O_TRUNC>."
6341 msgstr ""
6342 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6343 "を行うのと等価である。"
6344
6345 #. type: Plain text
6346 #: build/C/man2/open.2:472
6347 msgid ""
6348 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6349 "occurred (in which case, I<errno> is set appropriately)."
6350 msgstr ""
6351 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発"
6352 "生した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6353
6354 #. type: Plain text
6355 #: build/C/man2/open.2:482
6356 msgid ""
6357 "The requested access to the file is not allowed, or search permission is "
6358 "denied for one of the directories in the path prefix of I<pathname>, or the "
6359 "file did not exist yet and write access to the parent directory is not "
6360 "allowed.  (See also B<path_resolution>(7).)"
6361 msgstr ""
6362 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6363 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6364 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6365 "すること。)"
6366
6367 #. type: Plain text
6368 #: build/C/man2/open.2:488
6369 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6370 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6371
6372 #. type: Plain text
6373 #: build/C/man2/open.2:492 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6374 msgid "I<pathname> points outside your accessible address space."
6375 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6376
6377 #. type: TP
6378 #: build/C/man2/open.2:492 build/C/man2/write.2:139
6379 #, no-wrap
6380 msgid "B<EFBIG>"
6381 msgstr "B<EFBIG>"
6382
6383 #. type: Plain text
6384 #: build/C/man2/open.2:496
6385 msgid "See B<EOVERFLOW>."
6386 msgstr "B<EOVERFLOW> 参照。"
6387
6388 #. type: TP
6389 #: build/C/man2/open.2:496 build/C/man2/read.2:104 build/C/man3/scanf.3:559
6390 #: build/C/man3/tmpfile.3:59 build/C/man2/write.2:144
6391 #, no-wrap
6392 msgid "B<EINTR>"
6393 msgstr "B<EINTR>"
6394
6395 #. type: Plain text
6396 #: build/C/man2/open.2:503
6397 msgid ""
6398 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6399 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6400 "(7)."
6401 msgstr ""
6402 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6403 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6404 "B<signal>(7)  参照。"
6405
6406 #. type: TP
6407 #: build/C/man2/open.2:503 build/C/man2/read.2:140 build/C/man2/rename.2:140
6408 #: build/C/man2/unlink.2:87
6409 #, no-wrap
6410 msgid "B<EISDIR>"
6411 msgstr "B<EISDIR>"
6412
6413 #. type: Plain text
6414 #: build/C/man2/open.2:512
6415 msgid ""
6416 "I<pathname> refers to a directory and the access requested involved writing "
6417 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6418 msgstr ""
6419 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6420 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6421
6422 #. type: Plain text
6423 #: build/C/man2/open.2:519
6424 msgid ""
6425 "Too many symbolic links were encountered in resolving I<pathname>, or "
6426 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6427 msgstr ""
6428 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6429 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6430
6431 #. type: TP
6432 #: build/C/man2/open.2:519 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:62
6433 #, no-wrap
6434 msgid "B<EMFILE>"
6435 msgstr "B<EMFILE>"
6436
6437 #. type: Plain text
6438 #: build/C/man2/open.2:522
6439 msgid "The process already has the maximum number of files open."
6440 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6441
6442 #. type: Plain text
6443 #: build/C/man2/open.2:526 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6444 msgid "I<pathname> was too long."
6445 msgstr "I<pathname> が長過ぎる。"
6446
6447 #. type: TP
6448 #: build/C/man2/open.2:526 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:65
6449 #, no-wrap
6450 msgid "B<ENFILE>"
6451 msgstr "B<ENFILE>"
6452
6453 #. type: Plain text
6454 #: build/C/man2/open.2:529 build/C/man2/pipe.2:113
6455 msgid "The system limit on the total number of open files has been reached."
6456 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6457
6458 #. type: TP
6459 #: build/C/man2/open.2:529
6460 #, no-wrap
6461 msgid "B<ENODEV>"
6462 msgstr "B<ENODEV>"
6463
6464 #. type: Plain text
6465 #: build/C/man2/open.2:536
6466 msgid ""
6467 "I<pathname> refers to a device special file and no corresponding device "
6468 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6469 "returned.)"
6470 msgstr ""
6471 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイス"
6472 "が存在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返"
6473 "されるべきである)"
6474
6475 #. type: Plain text
6476 #: build/C/man2/open.2:543
6477 msgid ""
6478 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6479 "component in I<pathname> does not exist or is a dangling symbolic link."
6480 msgstr ""
6481 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6482 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリック"
6483 "リンクである。"
6484
6485 #. type: Plain text
6486 #: build/C/man2/open.2:552
6487 msgid ""
6488 "I<pathname> was to be created but the device containing I<pathname> has no "
6489 "room for the new file."
6490 msgstr ""
6491 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6492 "ファイルのための空き容量がない。"
6493
6494 #. type: Plain text
6495 #: build/C/man2/open.2:559
6496 msgid ""
6497 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6498 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6499 msgstr ""
6500 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6501 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6502
6503 #. type: Plain text
6504 #: build/C/man2/open.2:565
6505 msgid ""
6506 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6507 "has the file open for reading.  Or, the file is a device special file and no "
6508 "corresponding device exists."
6509 msgstr ""
6510 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6511 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6512 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6513
6514 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6515 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6516 #.  Reported 2006-10-03
6517 #. type: Plain text
6518 #: build/C/man2/open.2:585
6519 msgid ""
6520 "I<pathname> refers to a regular file that is too large to be opened.  The "
6521 "usual scenario here is that an application compiled on a 32-bit platform "
6522 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6523 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6524 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6525 "B<EFBIG> for this case."
6526 msgstr ""
6527 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6528 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6529 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6530 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6531 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6532 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6533 "いた。"
6534
6535 #.  Strictly speaking, it's the file system UID... (MTK)
6536 #. type: Plain text
6537 #: build/C/man2/open.2:593
6538 msgid ""
6539 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6540 "did not match the owner of the file and the caller was not privileged "
6541 "(B<CAP_FOWNER>)."
6542 msgstr ""
6543 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6544 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6545
6546 #. type: Plain text
6547 #: build/C/man2/open.2:598
6548 msgid ""
6549 "I<pathname> refers to a file on a read-only file system and write access was "
6550 "requested."
6551 msgstr ""
6552 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6553 "込みアクセスが要求された。"
6554
6555 #. type: TP
6556 #: build/C/man2/open.2:598
6557 #, no-wrap
6558 msgid "B<ETXTBSY>"
6559 msgstr "B<ETXTBSY>"
6560
6561 #. type: Plain text
6562 #: build/C/man2/open.2:603
6563 msgid ""
6564 "I<pathname> refers to an executable image which is currently being executed "
6565 "and write access was requested."
6566 msgstr ""
6567 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6568
6569 #. type: TP
6570 #: build/C/man2/open.2:603
6571 #, no-wrap
6572 msgid "B<EWOULDBLOCK>"
6573 msgstr "B<EWOULDBLOCK>"
6574
6575 #. type: Plain text
6576 #: build/C/man2/open.2:610
6577 msgid ""
6578 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6579 "the file (see B<fcntl>(2))."
6580 msgstr ""
6581 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6582 "ていた (B<fcntl>(2)  参照)。"
6583
6584 #. type: Plain text
6585 #: build/C/man2/open.2:623
6586 msgid ""
6587 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
6588 "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
6589 "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
6590 "definitions."
6591 msgstr ""
6592 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
6593 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
6594 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
6595 "定義する必要があるかもしれない。"
6596
6597 #. type: Plain text
6598 #: build/C/man2/open.2:628
6599 msgid ""
6600 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
6601 "POSIX.1-2008."
6602 msgstr ""
6603 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
6604 "定されている。"
6605
6606 #. type: Plain text
6607 #: build/C/man2/open.2:636
6608 msgid ""
6609 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
6610 "(before including I<any> header files)  to get its definition."
6611 msgstr ""
6612 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
6613 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
6614 "なければならない。"
6615
6616 #. type: Plain text
6617 #: build/C/man2/open.2:644
6618 msgid ""
6619 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
6620 "does not necessarily have the intention to read or write.  This is typically "
6621 "used to open devices in order to get a file descriptor for use with B<ioctl>"
6622 "(2)."
6623 msgstr ""
6624 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
6625 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
6626 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
6627 "られる。"
6628
6629 #.  See for example util-linux's disk-utils/setfdprm.c
6630 #.  For some background on access mode 3, see
6631 #.  http://thread.gmane.org/gmane.linux.kernel/653123
6632 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
6633 #.  LKML, 12 Mar 2008
6634 #. type: Plain text
6635 #: build/C/man2/open.2:673
6636 msgid ""
6637 "Unlike the other values that can be specified in I<flags>, the I<access "
6638 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
6639 "individual bits.  Rather, they define the low order two bits of I<flags>, "
6640 "and are defined respectively as 0, 1, and 2.  In other words, the "
6641 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
6642 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
6643 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
6644 "and write permission on the file and return a descriptor that can't be used "
6645 "for reading or writing.  This nonstandard access mode is used by some Linux "
6646 "drivers to return a descriptor that is only to be used for device-specific "
6647 "B<ioctl>(2)  operations."
6648 msgstr ""
6649 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
6650 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
6651 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
6652 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
6653 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
6654 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
6655 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
6656 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
6657 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで使用され"
6658 "ており、 デバイス固有の B<ioctl>(2)  操作にのみ使用されるディスクリプタを返す"
6659 "ために使われている。"
6660
6661 #.  Linux 2.0, 2.5: truncate
6662 #.  Solaris 5.7, 5.8: truncate
6663 #.  Irix 6.5: truncate
6664 #.  Tru64 5.1B: truncate
6665 #.  HP-UX 11.22: truncate
6666 #.  FreeBSD 4.7: truncate
6667 #. type: Plain text
6668 #: build/C/man2/open.2:684
6669 msgid ""
6670 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
6671 "implementations.  On many systems the file is actually truncated."
6672 msgstr ""
6673 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
6674 "くのシステムではファイルは実際に切り詰められる。"
6675
6676 #. type: Plain text
6677 #: build/C/man2/open.2:688
6678 msgid ""
6679 "There are many infelicities in the protocol underlying NFS, affecting "
6680 "amongst others B<O_SYNC> and B<O_NDELAY>."
6681 msgstr ""
6682 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
6683 "B<O_NDELAY> に影響する。"
6684
6685 #. type: Plain text
6686 #: build/C/man2/open.2:710
6687 msgid ""
6688 "POSIX provides for three different variants of synchronized I/O, "
6689 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
6690 "(2.6.31), Linux only implements B<O_SYNC>, but glibc maps B<O_DSYNC> and "
6691 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
6692 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
6693 "require all metadata updates of a write to be on disk on returning to "
6694 "userspace, but only the B<O_DSYNC> semantics, which require only actual file "
6695 "data and metadata necessary to retrieve it to be on disk by the time the "
6696 "system call returns."
6697 msgstr ""
6698 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
6699 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
6700 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
6701 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
6702 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
6703 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
6704 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
6705 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
6706 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
6707 "ていればよい。"
6708
6709 #. type: Plain text
6710 #: build/C/man2/open.2:718
6711 msgid ""
6712 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
6713 "create them; use B<mknod>(2)  instead."
6714 msgstr ""
6715 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  "
6716 "でスペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  "
6717 "を使用する。"
6718
6719 #. type: Plain text
6720 #: build/C/man2/open.2:731
6721 msgid ""
6722 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
6723 "descriptor but, for example, B<read>(2)  requests are denied with "
6724 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
6725 "permissions, but UID mapping is performed by the server upon read and write "
6726 "requests."
6727 msgstr ""
6728 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイ"
6729 "ルディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合"
6730 "がある。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行"
6731 "するが、読み込みや書き込みの際には サーバーで UID マッピングが行われるためで"
6732 "ある。"
6733
6734 #. type: Plain text
6735 #: build/C/man2/open.2:750
6736 msgid ""
6737 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
6738 "fields (respectively, time of last access, time of last status change, and "
6739 "time of last modification; see B<stat>(2))  are set to the current time, and "
6740 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
6741 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
6742 "st_ctime and st_mtime fields are set to the current time."
6743 msgstr ""
6744 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
6745 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
6746 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
6747 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
6748 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
6749 "I<st_mtime> フィールドが現在時刻に設定される。"
6750
6751 #. type: SS
6752 #: build/C/man2/open.2:750
6753 #, no-wrap
6754 msgid "O_DIRECT"
6755 msgstr "O_DIRECT"
6756
6757 #. type: Plain text
6758 #: build/C/man2/open.2:767
6759 msgid ""
6760 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
6761 "address of userspace buffers and the file offset of I/Os.  In Linux "
6762 "alignment restrictions vary by file system and kernel version and might be "
6763 "absent entirely.  However there is currently no file system-independent "
6764 "interface for an application to discover these restrictions for a given file "
6765 "or file system.  Some file systems provide their own interfaces for doing "
6766 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
6767 msgstr ""
6768 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
6769 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
6770 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
6771 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
6772 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
6773 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
6774 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
6775 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
6776
6777 #. type: Plain text
6778 #: build/C/man2/open.2:773
6779 msgid ""
6780 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
6781 "the file offset must all be multiples of the logical block size of the file "
6782 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
6783 msgstr ""
6784 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
6785 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
6786 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
6787
6788 #. type: Plain text
6789 #: build/C/man2/open.2:783
6790 msgid ""
6791 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
6792 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
6793 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
6794 "flag of the same name, but without alignment restrictions."
6795 msgstr ""
6796 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
6797 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
6798 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
6799 "ラグを導入したが、アラインメントの制限はない。"
6800
6801 #. type: Plain text
6802 #: build/C/man2/open.2:792
6803 msgid ""
6804 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
6805 "Linux kernels simply ignore this flag.  Some file systems may not implement "
6806 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
6807 msgstr ""
6808 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
6809 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
6810 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
6811 "と B<open>()  は B<EINVAL> で失敗する。"
6812
6813 #. type: Plain text
6814 #: build/C/man2/open.2:803
6815 msgid ""
6816 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
6817 "file, and especially to overlapping byte regions in the same file.  Even "
6818 "when the file system correctly handles the coherency issues in this "
6819 "situation, overall I/O throughput is likely to be slower than using either "
6820 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
6821 "with direct I/O to the same files."
6822 msgstr ""
6823 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
6824 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
6825 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
6826 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
6827 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
6828 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
6829
6830 #. type: Plain text
6831 #: build/C/man2/open.2:825
6832 msgid ""
6833 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
6834 "Older kernels, or kernels configured in certain ways, may not support this "
6835 "combination.  The NFS protocol does not support passing the flag to the "
6836 "server, so B<O_DIRECT> I/O will only bypass the page cache on the client; "
6837 "the server may still cache the I/O.  The client asks the server to make the "
6838 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
6839 "servers will perform poorly under these circumstances, especially if the I/O "
6840 "size is small.  Some servers may also be configured to lie to clients about "
6841 "the I/O having reached stable storage; this will avoid the performance "
6842 "penalty at some risk to data integrity in the event of server power "
6843 "failure.  The Linux NFS client places no alignment restrictions on "
6844 "B<O_DIRECT> I/O."
6845 msgstr ""
6846 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
6847 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
6848 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
6849 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
6850 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
6851 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
6852 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
6853 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
6854 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
6855 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
6856 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
6857 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
6858
6859 #. type: Plain text
6860 #: build/C/man2/open.2:832
6861 msgid ""
6862 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
6863 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
6864 "as a performance option which is disabled by default."
6865 msgstr ""
6866 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
6867 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
6868 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
6869
6870 #. type: Plain text
6871 #: build/C/man2/open.2:837
6872 msgid ""
6873 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
6874 "interface is just stupid, and was probably designed by a deranged monkey on "
6875 "some serious mind-controlling substances.\"\\(emLinus"
6876 msgstr ""
6877 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
6878 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
6879 "な」 \\(em Linus"
6880
6881 #.  FIXME . Check bugzilla report on open(O_ASYNC)
6882 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
6883 #. type: Plain text
6884 #: build/C/man2/open.2:849
6885 msgid ""
6886 "Currently, it is not possible to enable signal-driven I/O by specifying "
6887 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
6888 msgstr ""
6889 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
6890 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
6891 "すること。"
6892
6893 #. type: Plain text
6894 #: build/C/man2/open.2:870
6895 msgid ""
6896 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
6897 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
6898 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
6899 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
6900 msgstr ""
6901 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
6902 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
6903 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
6904 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
6905
6906 #. type: TH
6907 #: build/C/man3/perror.3:30
6908 #, no-wrap
6909 msgid "PERROR"
6910 msgstr "PERROR"
6911
6912 #. type: TH
6913 #: build/C/man3/perror.3:30
6914 #, no-wrap
6915 msgid "2012-04-17"
6916 msgstr "2012-04-17"
6917
6918 #. type: Plain text
6919 #: build/C/man3/perror.3:33
6920 msgid "perror - print a system error message"
6921 msgstr "perror - システムエラーメッセージを出力する"
6922
6923 #. type: Plain text
6924 #: build/C/man3/perror.3:37
6925 msgid "B<void perror(const char *>I<s>B<);>"
6926 msgstr "B<void perror(const char *>I<s>B<);>"
6927
6928 #. type: Plain text
6929 #: build/C/man3/perror.3:39
6930 msgid "B<#include E<lt>errno.hE<gt>>"
6931 msgstr "B<#include E<lt>errno.hE<gt>>"
6932
6933 #. type: Plain text
6934 #: build/C/man3/perror.3:41
6935 msgid "B<const char *>I<sys_errlist>B<[];>"
6936 msgstr "B<const char *>I<sys_errlist>B<[];>"
6937
6938 #. type: Plain text
6939 #: build/C/man3/perror.3:43
6940 msgid "B<int >I<sys_nerr>B<;>"
6941 msgstr "B<int >I<sys_nerr>B<;>"
6942
6943 #. type: Plain text
6944 #: build/C/man3/perror.3:45
6945 msgid "B<int >I<errno>B<;>"
6946 msgstr "B<int >I<errno>B<;>"
6947
6948 #. type: Plain text
6949 #: build/C/man3/perror.3:54
6950 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
6951 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
6952
6953 #. type: Plain text
6954 #: build/C/man3/perror.3:67
6955 msgid ""
6956 "The routine B<perror>()  produces a message on the standard error output, "
6957 "describing the last error encountered during a call to a system or library "
6958 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
6959 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
6960 "blank.  Then the message and a new-line."
6961 msgstr ""
6962 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
6963 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
6964 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
6965 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
6966 "メッセージと改行が出力される。"
6967
6968 #. type: Plain text
6969 #: build/C/man3/perror.3:75
6970 msgid ""
6971 "To be of most use, the argument string should include the name of the "
6972 "function that incurred the error.  The error number is taken from the "
6973 "external variable I<errno>, which is set when errors occur but not cleared "
6974 "when successful calls are made."
6975 msgstr ""
6976 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
6977 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
6978 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
6979
6980 #. type: Plain text
6981 #: build/C/man3/perror.3:89
6982 msgid ""
6983 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
6984 "obtain the error message without the newline.  The largest message number "
6985 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
6986 "this list because new error values may not have been added to I<sys_errlist>"
6987 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
6988 msgstr ""
6989 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、この\n"
6990 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセージ\n"
6991 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意すること。\n"
6992 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからである。\n"
6993 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
6994
6995 #. type: Plain text
6996 #: build/C/man3/perror.3:111
6997 msgid ""
6998 "When a system call fails, it usually returns -1 and sets the variable "
6999 "I<errno> to a value describing what went wrong.  (These values can be found "
7000 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7001 "B<perror>()  serves to translate this error code into human-readable form.  "
7002 "Note that I<errno> is undefined after a successful library call: this call "
7003 "may well change this variable, even though it succeeds, for example because "
7004 "it internally used some other library function that failed.  Thus, if a "
7005 "failing call is not immediately followed by a call to B<perror>(), the value "
7006 "of I<errno> should be saved."
7007 msgstr ""
7008 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7009 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7010 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7011 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7012 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7013 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7014 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7015 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7016 "い。"
7017
7018 #. type: Plain text
7019 #: build/C/man3/perror.3:124
7020 msgid ""
7021 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7022 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7023 "I<sys_errlist> conform to BSD."
7024 msgstr ""
7025 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7026 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7027 "に準拠している。"
7028
7029 #.  and only when _BSD_SOURCE is defined.
7030 #.  When
7031 #.  .B _GNU_SOURCE
7032 #.  is defined, the symbols
7033 #.  .I _sys_nerr
7034 #.  and
7035 #.  .I _sys_errlist
7036 #.  are provided.
7037 #. type: Plain text
7038 #: build/C/man3/perror.3:139
7039 msgid ""
7040 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7041 "I<E<lt>stdio.hE<gt>>."
7042 msgstr ""
7043 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7044 "I<E<lt>stdio.hE<gt>> に含まれている。"
7045
7046 #. type: Plain text
7047 #: build/C/man3/perror.3:143
7048 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7049 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7050
7051 #. type: TH
7052 #: build/C/man2/pipe.2:36
7053 #, no-wrap
7054 msgid "PIPE"
7055 msgstr "PIPE"
7056
7057 #. type: TH
7058 #: build/C/man2/pipe.2:36
7059 #, no-wrap
7060 msgid "2012-02-14"
7061 msgstr "2012-02-14"
7062
7063 #. type: Plain text
7064 #: build/C/man2/pipe.2:39
7065 msgid "pipe, pipe2 - create pipe"
7066 msgstr "pipe, pipe2 - パイプを生成する"
7067
7068 #. type: Plain text
7069 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7070 #, no-wrap
7071 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7072 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7073
7074 #. type: Plain text
7075 #: build/C/man2/pipe.2:44
7076 #, no-wrap
7077 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7078 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7079
7080 #. type: Plain text
7081 #: build/C/man2/pipe.2:48
7082 #, no-wrap
7083 msgid ""
7084 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7085 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7086 "B<#include E<lt>unistd.hE<gt>>\n"
7087 msgstr ""
7088 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7089 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7090 "B<#include E<lt>unistd.hE<gt>>\n"
7091
7092 #. type: Plain text
7093 #: build/C/man2/pipe.2:50
7094 #, no-wrap
7095 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7096 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7097
7098 #. type: Plain text
7099 #: build/C/man2/pipe.2:66
7100 msgid ""
7101 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7102 "for interprocess communication.  The array I<pipefd> is used to return two "
7103 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7104 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7105 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7106 "until it is read from the read end of the pipe.  For further details, see "
7107 "B<pipe>(7)."
7108 msgstr ""
7109 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7110 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7111 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7112 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7113 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7114 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7115
7116 #. type: Plain text
7117 #: build/C/man2/pipe.2:76
7118 msgid ""
7119 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7120 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7121 msgstr ""
7122 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7123 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7124 "きる。"
7125
7126 #. type: TP
7127 #: build/C/man2/pipe.2:76
7128 #, no-wrap
7129 msgid "B<O_NONBLOCK>"
7130 msgstr "B<O_NONBLOCK>"
7131
7132 #. type: Plain text
7133 #: build/C/man2/pipe.2:84
7134 msgid ""
7135 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7136 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7137 "the same result."
7138 msgstr ""
7139 "新しく生成される二つのオープンファイル記述 (open file description) の "
7140 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7141 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7142 "なる。"
7143
7144 #. type: TP
7145 #: build/C/man2/pipe.2:84
7146 #, no-wrap
7147 msgid "B<O_CLOEXEC>"
7148 msgstr "B<O_CLOEXEC>"
7149
7150 #. type: Plain text
7151 #: build/C/man2/pipe.2:92
7152 msgid ""
7153 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7154 "descriptors.  See the description of the same flag in B<open>(2)  for "
7155 "reasons why this may be useful."
7156 msgstr ""
7157 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7158 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7159 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7160
7161 #. type: Plain text
7162 #: build/C/man2/pipe.2:102
7163 msgid "I<pipefd> is not valid."
7164 msgstr "I<pipefd> が無効な値である。"
7165
7166 #. type: Plain text
7167 #: build/C/man2/pipe.2:107
7168 msgid "(B<pipe2>())  Invalid value in I<flags>."
7169 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7170
7171 #. type: Plain text
7172 #: build/C/man2/pipe.2:110
7173 msgid "Too many file descriptors are in use by the process."
7174 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7175
7176 #. type: Plain text
7177 #: build/C/man2/pipe.2:118
7178 msgid ""
7179 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7180 "starting with version 2.9."
7181 msgstr ""
7182 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7183 "はバージョン 2.9 以降で利用できる。"
7184
7185 #. type: Plain text
7186 #: build/C/man2/pipe.2:121
7187 msgid "B<pipe>(): POSIX.1-2001."
7188 msgstr "B<pipe>(): POSIX.1-2001."
7189
7190 #. type: Plain text
7191 #: build/C/man2/pipe.2:124
7192 msgid "B<pipe2>()  is Linux-specific."
7193 msgstr "B<pipe2>()  は Linux 固有である。"
7194
7195 #.  fork.2 refers to this example program.
7196 #. type: Plain text
7197 #: build/C/man2/pipe.2:140
7198 msgid ""
7199 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7200 "process; the child inherits a duplicate set of file descriptors that refer "
7201 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7202 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7203 "the string contained in the program's command-line argument to the pipe, and "
7204 "the child reads this string a byte at a time from the pipe and echoes it on "
7205 "standard output."
7206 msgstr ""
7207 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7208 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7209 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7210 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7211 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7212 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7213
7214 #. type: Plain text
7215 #: build/C/man2/pipe.2:147
7216 #, no-wrap
7217 msgid ""
7218 "#include E<lt>sys/wait.hE<gt>\n"
7219 "#include E<lt>stdio.hE<gt>\n"
7220 "#include E<lt>stdlib.hE<gt>\n"
7221 "#include E<lt>unistd.hE<gt>\n"
7222 "#include E<lt>string.hE<gt>\n"
7223 msgstr ""
7224 "#include E<lt>sys/wait.hE<gt>\n"
7225 "#include E<lt>stdio.hE<gt>\n"
7226 "#include E<lt>stdlib.hE<gt>\n"
7227 "#include E<lt>unistd.hE<gt>\n"
7228 "#include E<lt>string.hE<gt>\n"
7229
7230 #. type: Plain text
7231 #: build/C/man2/pipe.2:154
7232 #, no-wrap
7233 msgid ""
7234 "int\n"
7235 "main(int argc, char *argv[])\n"
7236 "{\n"
7237 "    int pipefd[2];\n"
7238 "    pid_t cpid;\n"
7239 "    char buf;\n"
7240 msgstr ""
7241 "int\n"
7242 "main(int argc, char *argv[])\n"
7243 "{\n"
7244 "    int pipefd[2];\n"
7245 "    pid_t cpid;\n"
7246 "    char buf;\n"
7247
7248 #. type: Plain text
7249 #: build/C/man2/pipe.2:159
7250 #, no-wrap
7251 msgid ""
7252 "    if (argc != 2) {\n"
7253 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7254 "\texit(EXIT_FAILURE);\n"
7255 "    }\n"
7256 msgstr ""
7257 "    if (argc != 2) {\n"
7258 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7259 "\texit(EXIT_FAILURE);\n"
7260 "    }\n"
7261
7262 #. type: Plain text
7263 #: build/C/man2/pipe.2:164
7264 #, no-wrap
7265 msgid ""
7266 "    if (pipe(pipefd) == -1) {\n"
7267 "        perror(\"pipe\");\n"
7268 "        exit(EXIT_FAILURE);\n"
7269 "    }\n"
7270 msgstr ""
7271 "    if (pipe(pipefd) == -1) {\n"
7272 "        perror(\"pipe\");\n"
7273 "        exit(EXIT_FAILURE);\n"
7274 "    }\n"
7275
7276 #. type: Plain text
7277 #: build/C/man2/pipe.2:170
7278 #, no-wrap
7279 msgid ""
7280 "    cpid = fork();\n"
7281 "    if (cpid == -1) {\n"
7282 "        perror(\"fork\");\n"
7283 "        exit(EXIT_FAILURE);\n"
7284 "    }\n"
7285 msgstr ""
7286 "    cpid = fork();\n"
7287 "    if (cpid == -1) {\n"
7288 "        perror(\"fork\");\n"
7289 "        exit(EXIT_FAILURE);\n"
7290 "    }\n"
7291
7292 #. type: Plain text
7293 #: build/C/man2/pipe.2:173
7294 #, no-wrap
7295 msgid ""
7296 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7297 "        close(pipefd[1]);          /* Close unused write end */\n"
7298 msgstr ""
7299 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7300 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7301
7302 #. type: Plain text
7303 #: build/C/man2/pipe.2:176
7304 #, no-wrap
7305 msgid ""
7306 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7307 "            write(STDOUT_FILENO, &buf, 1);\n"
7308 msgstr ""
7309 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7310 "            write(STDOUT_FILENO, &buf, 1);\n"
7311
7312 #. type: Plain text
7313 #: build/C/man2/pipe.2:180
7314 #, no-wrap
7315 msgid ""
7316 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7317 "        close(pipefd[0]);\n"
7318 "        _exit(EXIT_SUCCESS);\n"
7319 msgstr ""
7320 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7321 "        close(pipefd[0]);\n"
7322 "        _exit(EXIT_SUCCESS);\n"
7323
7324 #. type: Plain text
7325 #: build/C/man2/pipe.2:189
7326 #, no-wrap
7327 msgid ""
7328 "    } else {            /* Parent writes argv[1] to pipe */\n"
7329 "        close(pipefd[0]);          /* Close unused read end */\n"
7330 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7331 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7332 "        wait(NULL);                /* Wait for child */\n"
7333 "        exit(EXIT_SUCCESS);\n"
7334 "    }\n"
7335 "}\n"
7336 msgstr ""
7337 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7338 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7339 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7340 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7341 "        wait(NULL);                /* 子プロセスを待つ */\n"
7342 "        exit(EXIT_SUCCESS);\n"
7343 "    }\n"
7344 "}\n"
7345
7346 #. type: Plain text
7347 #: build/C/man2/pipe.2:196
7348 msgid ""
7349 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7350 "(7)"
7351 msgstr ""
7352 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7353 "(7)"
7354
7355 #. type: TH
7356 #: build/C/man3/popen.3:38
7357 #, no-wrap
7358 msgid "POPEN"
7359 msgstr "POPEN"
7360
7361 #. type: TH
7362 #: build/C/man3/popen.3:38
7363 #, no-wrap
7364 msgid "2010-02-03"
7365 msgstr "2010-02-03"
7366
7367 #. type: Plain text
7368 #: build/C/man3/popen.3:41
7369 msgid "popen, pclose - pipe stream to or from a process"
7370 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7371
7372 #. type: Plain text
7373 #: build/C/man3/popen.3:46
7374 #, no-wrap
7375 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7376 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7377
7378 #. type: Plain text
7379 #: build/C/man3/popen.3:48
7380 #, no-wrap
7381 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7382 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7383
7384 #. type: Plain text
7385 #: build/C/man3/popen.3:58
7386 msgid "B<popen>(), B<pclose>():"
7387 msgstr "B<popen>(), B<pclose>():"
7388
7389 #. type: Plain text
7390 #: build/C/man3/popen.3:60
7391 msgid ""
7392 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7393 msgstr ""
7394 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7395
7396 #. type: Plain text
7397 #: build/C/man3/popen.3:71
7398 msgid ""
7399 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7400 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7401 "I<type> argument may specify only reading or writing, not both; the "
7402 "resulting stream is correspondingly read-only or write-only."
7403 msgstr ""
7404 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7405 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7406 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7407 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7408 "たは 書き込み専用のいずれかとなる。"
7409
7410 #. type: Plain text
7411 #: build/C/man3/popen.3:95
7412 msgid ""
7413 "The I<command> argument is a pointer to a null-terminated string containing "
7414 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7415 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7416 "argument is a pointer to a null-terminated string which must contain either "
7417 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7418 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7419 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7420 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7421 "B<open>(2)  for reasons why this may be useful."
7422 msgstr ""
7423 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7424 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7425 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7426 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7427 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7428 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7429 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7430 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7431 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7432
7433 #. type: Plain text
7434 #: build/C/man3/popen.3:111
7435 msgid ""
7436 "The return value from B<popen>()  is a normal standard I/O stream in all "
7437 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7438 "(3).  Writing to such a stream writes to the standard input of the command; "
7439 "the command's standard output is the same as that of the process that called "
7440 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7441 "reading from a \"popened\" stream reads the command's standard output, and "
7442 "the command's standard input is the same as that of the process that called "
7443 "B<popen>()."
7444 msgstr ""
7445 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7446 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7447 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7448 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7449 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7450 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7451 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7452 "セスの標準入力と同一である。"
7453
7454 #. type: Plain text
7455 #: build/C/man3/popen.3:115
7456 msgid "Note that output B<popen>()  streams are fully buffered by default."
7457 msgstr ""
7458 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7459 "に注意しよう。"
7460
7461 #. type: Plain text
7462 #: build/C/man3/popen.3:121
7463 msgid ""
7464 "The B<pclose>()  function waits for the associated process to terminate and "
7465 "returns the exit status of the command as returned by B<wait4>(2)."
7466 msgstr ""
7467 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7468 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7469
7470 #. type: Plain text
7471 #: build/C/man3/popen.3:129
7472 msgid ""
7473 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7474 "calls fail, or if it cannot allocate memory."
7475 msgstr ""
7476 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7477 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7478
7479 #.  These conditions actually give undefined results, so I commented
7480 #.  them out.
7481 #.  .I stream
7482 #.  is not associated with a "popen()ed" command, if
7483 #. .I stream
7484 #.  already "pclose()d", or if
7485 #. type: Plain text
7486 #: build/C/man3/popen.3:141
7487 msgid ""
7488 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7489 "some other error is detected."
7490 msgstr ""
7491 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7492 "かった場合、 -1 を返す。"
7493
7494 #. type: Plain text
7495 #: build/C/man3/popen.3:160
7496 msgid ""
7497 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7498 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7499 "appropriately.  If the I<type> argument is invalid, and this condition is "
7500 "detected, I<errno> is set to B<EINVAL>."
7501 msgstr ""
7502 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7503 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7504 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7505 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7506
7507 #. type: Plain text
7508 #: build/C/man3/popen.3:167
7509 msgid ""
7510 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7511 msgstr ""
7512 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7513 "B<ECHILD> にセットされる。"
7514
7515 #. type: Plain text
7516 #: build/C/man3/popen.3:173
7517 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7518 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7519
7520 #. type: Plain text
7521 #: build/C/man3/popen.3:186
7522 msgid ""
7523 "Since the standard input of a command opened for reading shares its seek "
7524 "offset with the process that called B<popen>(), if the original process has "
7525 "done a buffered read, the command's input position may not be as expected.  "
7526 "Similarly, the output from a command opened for writing may become "
7527 "intermingled with that of the original process.  The latter can be avoided "
7528 "by calling B<fflush>(3)  before B<popen>()."
7529 msgstr ""
7530 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7531 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7532 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7533 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7534 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7535 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7536
7537 #.  .SH HISTORY
7538 #.  A
7539 #.  .BR popen ()
7540 #.  and a
7541 #.  .BR pclose ()
7542 #.  function appeared in Version 7 AT&T UNIX.
7543 #. type: Plain text
7544 #: build/C/man3/popen.3:196
7545 msgid ""
7546 "Failure to execute the shell is indistinguishable from the shell's failure "
7547 "to execute command, or an immediate exit of the command.  The only hint is "
7548 "an exit status of 127."
7549 msgstr ""
7550 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
7551 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
7552 "なることである。"
7553
7554 #. type: Plain text
7555 #: build/C/man3/popen.3:205
7556 msgid ""
7557 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7558 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7559 msgstr ""
7560 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7561 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7562
7563 #. type: TH
7564 #: build/C/man3/printf.3:34
7565 #, no-wrap
7566 msgid "PRINTF"
7567 msgstr "PRINTF"
7568
7569 #. type: TH
7570 #: build/C/man3/printf.3:34 build/C/man3/puts.3:24 build/C/man3/scanf.3:50
7571 #, no-wrap
7572 msgid "2011-09-28"
7573 msgstr "2011-09-28"
7574
7575 #. type: Plain text
7576 #: build/C/man3/printf.3:38
7577 msgid ""
7578 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7579 "formatted output conversion"
7580 msgstr ""
7581 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7582 "指定された書式に変換して出力を行う"
7583
7584 #. type: Plain text
7585 #: build/C/man3/printf.3:42
7586 msgid "B<int printf(const char *>I<format>B<, ...);>"
7587 msgstr "B<int printf(const char *>I<format>B<, ...);>"
7588
7589 #. type: Plain text
7590 #: build/C/man3/printf.3:44
7591 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7592 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7593
7594 #. type: Plain text
7595 #: build/C/man3/printf.3:46
7596 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7597 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7598
7599 #. type: Plain text
7600 #: build/C/man3/printf.3:48
7601 msgid ""
7602 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7603 "*>I<format>B<, ...);>"
7604 msgstr ""
7605 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7606 "*>I<format>B<, ...);>"
7607
7608 #. type: Plain text
7609 #: build/C/man3/printf.3:50
7610 msgid "B<#include E<lt>stdarg.hE<gt>>"
7611 msgstr "B<#include E<lt>stdarg.hE<gt>>"
7612
7613 #. type: Plain text
7614 #: build/C/man3/printf.3:52
7615 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7616 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7617
7618 #. type: Plain text
7619 #: build/C/man3/printf.3:54
7620 msgid ""
7621 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7622 ">I<ap>B<);>"
7623 msgstr ""
7624 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7625 ">I<ap>B<);>"
7626
7627 #. type: Plain text
7628 #: build/C/man3/printf.3:56
7629 msgid ""
7630 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7631 msgstr ""
7632 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7633
7634 #. type: Plain text
7635 #: build/C/man3/printf.3:59
7636 msgid ""
7637 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7638 "*>I<format>B<, va_list >I<ap>B<);>"
7639 msgstr ""
7640 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7641 "*>I<format>B<, va_list >I<ap>B<);>"
7642
7643 #. type: Plain text
7644 #: build/C/man3/printf.3:68
7645 msgid "B<snprintf>(), B<vsnprintf>():"
7646 msgstr "B<snprintf>(), B<vsnprintf>():"
7647
7648 #. type: Plain text
7649 #: build/C/man3/printf.3:71
7650 msgid ""
7651 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7652 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7653 msgstr ""
7654 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7655 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7656
7657 #. type: Plain text
7658 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:83
7659 msgid "or I<cc -std=c99>"
7660 msgstr "or I<cc -std=c99>"
7661
7662 #. type: Plain text
7663 #: build/C/man3/printf.3:101
7664 msgid ""
7665 "The functions in the B<printf>()  family produce output according to a "
7666 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
7667 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
7668 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
7669 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
7670 "string I<str>."
7671 msgstr ""
7672 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
7673 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
7674 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
7675 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
7676 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
7677
7678 #. type: Plain text
7679 #: build/C/man3/printf.3:110
7680 msgid ""
7681 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
7682 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
7683 msgstr ""
7684 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
7685 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
7686
7687 #. type: Plain text
7688 #: build/C/man3/printf.3:134
7689 msgid ""
7690 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
7691 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
7692 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
7693 "instead of a variable number of arguments.  These functions do not call the "
7694 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
7695 "I<ap> is undefined after the call.  See B<stdarg>(3)."
7696 msgstr ""
7697 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
7698 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
7699 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
7700 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
7701 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
7702 "(3)  を参照のこと。"
7703
7704 #. type: Plain text
7705 #: build/C/man3/printf.3:141
7706 msgid ""
7707 "These eight functions write the output under the control of a I<format> "
7708 "string that specifies how subsequent arguments (or arguments accessed via "
7709 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
7710 "output."
7711 msgstr ""
7712 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
7713 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
7714 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
7715
7716 #. type: Plain text
7717 #: build/C/man3/printf.3:152
7718 msgid ""
7719 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
7720 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
7721 "copying to take place between objects that overlap (e.g., if the target "
7722 "string array and one of the supplied input arguments refer to the same "
7723 "buffer).  See NOTES."
7724 msgstr ""
7725 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
7726 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
7727 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
7728 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
7729 "照。"
7730
7731 #. type: SS
7732 #: build/C/man3/printf.3:152
7733 #, no-wrap
7734 msgid "Return value"
7735 msgstr "Return Values"
7736
7737 #. type: Plain text
7738 #: build/C/man3/printf.3:155
7739 msgid ""
7740 "Upon successful return, these functions return the number of characters "
7741 "printed (excluding the null byte used to end output to strings)."
7742 msgstr ""
7743 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
7744 "用する NULL バイトは数に含まれない)。"
7745
7746 #. type: Plain text
7747 #: build/C/man3/printf.3:171
7748 msgid ""
7749 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
7750 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
7751 "the output was truncated due to this limit then the return value is the "
7752 "number of characters (excluding the terminating null byte)  which would have "
7753 "been written to the final string if enough space had been available.  Thus, "
7754 "a return value of I<size> or more means that the output was truncated.  (See "
7755 "also below under NOTES.)"
7756 msgstr ""
7757 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
7758 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
7759 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
7760 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
7761 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
7762 "する (後述の注意も参照のこと)。"
7763
7764 #. type: Plain text
7765 #: build/C/man3/printf.3:173
7766 msgid "If an output error is encountered, a negative value is returned."
7767 msgstr "エラーが発生した場合は、負の数を返す。"
7768
7769 #. type: SS
7770 #: build/C/man3/printf.3:173
7771 #, no-wrap
7772 msgid "Format of the format string"
7773 msgstr "フォーマット文字列のフォーマット"
7774
7775 #. type: Plain text
7776 #: build/C/man3/printf.3:195
7777 msgid ""
7778 "The format string is a character string, beginning and ending in its initial "
7779 "shift state, if any.  The format string is composed of zero or more "
7780 "directives: ordinary characters (not B<%>), which are copied unchanged to "
7781 "the output stream; and conversion specifications, each of which results in "
7782 "fetching zero or more subsequent arguments.  Each conversion specification "
7783 "is introduced by the character B<%>, and ends with a I<conversion "
7784 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
7785 "an optional minimum I<field width>, an optional I<precision> and an optional "
7786 "I<length modifier>."
7787 msgstr ""
7788 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
7789 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
7790 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
7791 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
7792 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
7793 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
7794 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
7795 "子> を (この順序で) 置くことができる。"
7796
7797 #. type: Plain text
7798 #: build/C/man3/printf.3:208
7799 msgid ""
7800 "The arguments must correspond properly (after type promotion) with the "
7801 "conversion specifier.  By default, the arguments are used in the order "
7802 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
7803 "next argument (and it is an error if insufficiently many arguments are "
7804 "given).  One can also specify explicitly which argument is taken, at each "
7805 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
7806 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
7807 "denotes the position in the argument list of the desired argument, indexed "
7808 "starting from 1.  Thus,"
7809 msgstr ""
7810 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
7811 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
7812 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
7813 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
7814 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
7815 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
7816 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
7817
7818 #. type: Plain text
7819 #: build/C/man3/printf.3:212
7820 #, no-wrap
7821 msgid "printf(\"%*d\", width, num);\n"
7822 msgstr "printf(\"%*d\", width, num);\n"
7823
7824 #. type: Plain text
7825 #: build/C/man3/printf.3:216
7826 msgid "and"
7827 msgstr "と"
7828
7829 #. type: Plain text
7830 #: build/C/man3/printf.3:220
7831 #, no-wrap
7832 msgid "printf(\"%2$*1$d\", width, num);\n"
7833 msgstr "printf(\"%2$*1$d\", width, num);\n"
7834
7835 #. type: Plain text
7836 #: build/C/man3/printf.3:236
7837 msgid ""
7838 "are equivalent.  The second style allows repeated references to the same "
7839 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
7840 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
7841 "\\(aq is used, it must be used throughout for all conversions taking an "
7842 "argument and all width and precision arguments, but it may be mixed with \"%%"
7843 "\" formats which do not consume an argument.  There may be no gaps in the "
7844 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
7845 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
7846 "format string."
7847 msgstr ""
7848 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
7849 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
7850 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
7851 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
7852 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
7853 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
7854 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
7855
7856 #. type: Plain text
7857 #: build/C/man3/printf.3:246
7858 msgid ""
7859 "For some numeric conversions a radix character (\"decimal point\") or "
7860 "thousands' grouping character is used.  The actual character used depends on "
7861 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
7862 "radix character, and does not have a grouping character.  Thus,"
7863 msgstr ""
7864 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
7865 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
7866 "\\(aq を用い、 区切り文字は使わない。 従って、"
7867
7868 #. type: Plain text
7869 #: build/C/man3/printf.3:250
7870 #, no-wrap
7871 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
7872 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
7873
7874 #. type: Plain text
7875 #: build/C/man3/printf.3:255
7876 msgid ""
7877 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
7878 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
7879 msgstr ""
7880 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
7881 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
7882
7883 #. type: SS
7884 #: build/C/man3/printf.3:255
7885 #, no-wrap
7886 msgid "The flag characters"
7887 msgstr "フラグ文字"
7888
7889 #. type: Plain text
7890 #: build/C/man3/printf.3:257
7891 msgid "The character % is followed by zero or more of the following flags:"
7892 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
7893
7894 #. type: TP
7895 #: build/C/man3/printf.3:257
7896 #, no-wrap
7897 msgid "B<#>"
7898 msgstr "B<#>"
7899
7900 #. type: Plain text
7901 #: build/C/man3/printf.3:291
7902 msgid ""
7903 "The value should be converted to an \"alternate form\".  For B<o> "
7904 "conversions, the first character of the output string is made zero (by "
7905 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
7906 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
7907 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
7908 "conversions, the result will always contain a decimal point, even if no "
7909 "digits follow it (normally, a decimal point appears in the results of those "
7910 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
7911 "trailing zeros are not removed from the result as they would otherwise be.  "
7912 "For other conversions, the result is undefined."
7913 msgstr ""
7914 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
7915 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
7916 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
7917 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
7918 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
7919 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
7920 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
7921 "変換では、結果は未定義である。"
7922
7923 #. type: TP
7924 #: build/C/man3/printf.3:291
7925 #, no-wrap
7926 msgid "B<\\&0>"
7927 msgstr "B<\\&0>"
7928
7929 #. type: Plain text
7930 #: build/C/man3/printf.3:331
7931 msgid ""
7932 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
7933 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
7934 "converted value is padded on the left with zeros rather than blanks.  If the "
7935 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
7936 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
7937 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
7938 "is undefined."
7939 msgstr ""
7940 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
7941 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
7942 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
7943 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
7944 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
7945 "である。"
7946
7947 #. type: TP
7948 #: build/C/man3/printf.3:331
7949 #, no-wrap
7950 msgid "B<->"
7951 msgstr "B<->"
7952
7953 #. type: Plain text
7954 #: build/C/man3/printf.3:344
7955 msgid ""
7956 "The converted value is to be left adjusted on the field boundary.  (The "
7957 "default is right justification.)  Except for B<n> conversions, the converted "
7958 "value is padded on the right with blanks, rather than on the left with "
7959 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
7960 msgstr ""
7961 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
7962 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
7963 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
7964
7965 #. type: TP
7966 #: build/C/man3/printf.3:344
7967 #, no-wrap
7968 msgid "B<\\(aq \\(aq>"
7969 msgstr "B<' '>"
7970
7971 #. type: Plain text
7972 #: build/C/man3/printf.3:348
7973 msgid ""
7974 "(a space) A blank should be left before a positive number (or empty string) "
7975 "produced by a signed conversion."
7976 msgstr ""
7977 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
7978 "列) が置かれる。"
7979
7980 #. type: TP
7981 #: build/C/man3/printf.3:348
7982 #, no-wrap
7983 msgid "B<+>"
7984 msgstr "B<+>"
7985
7986 #. type: Plain text
7987 #: build/C/man3/printf.3:356
7988 msgid ""
7989 "A sign (+ or -) should always be placed before a number produced by a signed "
7990 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
7991 "overrides a space if both are used."
7992 msgstr ""
7993 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
7994 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
7995 "が使われている場合には、 B<+> が優先される。"
7996
7997 #. type: Plain text
7998 #: build/C/man3/printf.3:359
7999 msgid ""
8000 "The five flag characters above are defined in the C standard.  The SUSv2 "
8001 "specifies one further flag character."
8002 msgstr ""
8003 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8004 "グ文字が規定されている。"
8005
8006 #. type: TP
8007 #: build/C/man3/printf.3:359
8008 #, no-wrap
8009 msgid "B<\\(aq>"
8010 msgstr "B<\\(aq>"
8011
8012 #. type: Plain text
8013 #: build/C/man3/printf.3:376
8014 msgid ""
8015 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8016 "output is to be grouped with thousands' grouping characters if the locale "
8017 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8018 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8019 "\\(aqF>."
8020 msgstr ""
8021 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8022 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8023 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8024 "\\(aqF は SUSv2 には含まれていない。"
8025
8026 #. type: Plain text
8027 #: build/C/man3/printf.3:378
8028 msgid "glibc 2.2 adds one further flag character."
8029 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8030
8031 #. type: TP
8032 #: build/C/man3/printf.3:378
8033 #, no-wrap
8034 msgid "B<I>"
8035 msgstr "B<I>"
8036
8037 #.  outdigits keyword in locale file
8038 #. type: Plain text
8039 #: build/C/man3/printf.3:388
8040 msgid ""
8041 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8042 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8043 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8044 msgstr ""
8045 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8046 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8047 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8048
8049 #. type: SS
8050 #: build/C/man3/printf.3:388
8051 #, no-wrap
8052 msgid "The field width"
8053 msgstr "フィールド幅"
8054
8055 #. type: Plain text
8056 #: build/C/man3/printf.3:404
8057 msgid ""
8058 "An optional decimal digit string (with nonzero first digit) specifying a "
8059 "minimum field width.  If the converted value has fewer characters than the "
8060 "field width, it will be padded with spaces on the left (or right, if the "
8061 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8062 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8063 "the field width is given in the next argument, or in the I<m>-th argument, "
8064 "respectively, which must be of type I<int>.  A negative field width is taken "
8065 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8066 "nonexistent or small field width cause truncation of a field; if the result "
8067 "of a conversion is wider than the field width, the field is expanded to "
8068 "contain the conversion result."
8069 msgstr ""
8070 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8071 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8072 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8073 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8074 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8075 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8076 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8077 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8078 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8079 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8080
8081 #. type: SS
8082 #: build/C/man3/printf.3:404
8083 #, no-wrap
8084 msgid "The precision"
8085 msgstr "精度"
8086
8087 #. type: Plain text
8088 #: build/C/man3/printf.3:440
8089 msgid ""
8090 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8091 "optional decimal digit string.  Instead of a decimal digit string one may "
8092 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8093 "precision is given in the next argument, or in the m-th argument, "
8094 "respectively, which must be of type I<int>.  If the precision is given as "
8095 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8096 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8097 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8098 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8099 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8100 "the maximum number of characters to be printed from a string for B<s> and "
8101 "B<S> conversions."
8102 msgstr ""
8103 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8104 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8105 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8106 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8107 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8108 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8109 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8110 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8111 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8112 "る最大文字数を指定する。"
8113
8114 #. type: SS
8115 #: build/C/man3/printf.3:440
8116 #, no-wrap
8117 msgid "The length modifier"
8118 msgstr "長さ修飾子"
8119
8120 #. type: Plain text
8121 #: build/C/man3/printf.3:450
8122 msgid ""
8123 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8124 "B<X> conversion."
8125 msgstr ""
8126 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8127
8128 #. type: TP
8129 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:291
8130 #, no-wrap
8131 msgid "B<hh>"
8132 msgstr "B<hh>"
8133
8134 #. type: Plain text
8135 #: build/C/man3/printf.3:461
8136 msgid ""
8137 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8138 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8139 "I<signed char> argument."
8140 msgstr ""
8141 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8142 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8143
8144 #. type: TP
8145 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:281
8146 #, no-wrap
8147 msgid "B<h>"
8148 msgstr "B<h>"
8149
8150 #. type: Plain text
8151 #: build/C/man3/printf.3:472
8152 msgid ""
8153 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8154 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8155 "to a I<short int> argument."
8156 msgstr ""
8157 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8158 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8159
8160 #. type: TP
8161 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:308
8162 #, no-wrap
8163 msgid "B<l>"
8164 msgstr "B<l>"
8165
8166 #. type: Plain text
8167 #: build/C/man3/printf.3:491
8168 msgid ""
8169 "(ell) A following integer conversion corresponds to a I<long int> or "
8170 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8171 "a pointer to a I<long int> argument, or a following B<c> conversion "
8172 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8173 "corresponds to a pointer to I<wchar_t> argument."
8174 msgstr ""
8175 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8176 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8177 "変換では I<wchar_t> へのポインタであることを示す。"
8178
8179 #. type: TP
8180 #: build/C/man3/printf.3:491
8181 #, no-wrap
8182 msgid "B<ll>"
8183 msgstr "B<ll> (エルエル)"
8184
8185 #. type: Plain text
8186 #: build/C/man3/printf.3:503
8187 msgid ""
8188 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8189 "or I<unsigned long long int> argument, or a following B<n> conversion "
8190 "corresponds to a pointer to a I<long long int> argument."
8191 msgstr ""
8192 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8193 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8194
8195 #. type: TP
8196 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:335
8197 #, no-wrap
8198 msgid "B<L>"
8199 msgstr "B<L>"
8200
8201 #. type: Plain text
8202 #: build/C/man3/printf.3:519
8203 msgid ""
8204 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8205 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8206 "not.)"
8207 msgstr ""
8208 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8209 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8210 "認められていない。)"
8211
8212 #. type: TP
8213 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:351
8214 #, no-wrap
8215 msgid "B<q>"
8216 msgstr "B<q>"
8217
8218 #. type: Plain text
8219 #: build/C/man3/printf.3:525
8220 msgid ""
8221 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8222 "B<ll>."
8223 msgstr ""
8224 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8225 "意味である。"
8226
8227 #. type: TP
8228 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:299
8229 #, no-wrap
8230 msgid "B<j>"
8231 msgstr "B<j>"
8232
8233 #. type: Plain text
8234 #: build/C/man3/printf.3:532
8235 msgid ""
8236 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8237 "argument."
8238 msgstr ""
8239 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8240
8241 #. type: TP
8242 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:363
8243 #, no-wrap
8244 msgid "B<z>"
8245 msgstr "B<z>"
8246
8247 #. type: Plain text
8248 #: build/C/man3/printf.3:543
8249 msgid ""
8250 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8251 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8252 msgstr ""
8253 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8254 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8255
8256 #. type: TP
8257 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:356
8258 #, no-wrap
8259 msgid "B<t>"
8260 msgstr "B<t>"
8261
8262 #. type: Plain text
8263 #: build/C/man3/printf.3:548
8264 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8265 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8266
8267 #. type: Plain text
8268 #: build/C/man3/printf.3:577
8269 msgid ""
8270 "The SUSv2 only knows about the length modifiers B<h> (in B<hd>, B<hi>, "
8271 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8272 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8273 msgstr ""
8274 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8275 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8276 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8277
8278 #. type: SS
8279 #: build/C/man3/printf.3:577
8280 #, no-wrap
8281 msgid "The conversion specifier"
8282 msgstr "変換指定子"
8283
8284 #. type: Plain text
8285 #: build/C/man3/printf.3:580
8286 msgid ""
8287 "A character that specifies the type of conversion to be applied.  The "
8288 "conversion specifiers and their meanings are:"
8289 msgstr ""
8290 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8291
8292 #. type: TP
8293 #: build/C/man3/printf.3:580
8294 #, no-wrap
8295 msgid "B<d>, B<i>"
8296 msgstr "B<d>, B<i>"
8297
8298 #. type: Plain text
8299 #: build/C/man3/printf.3:590
8300 msgid ""
8301 "The I<int> argument is converted to signed decimal notation.  The precision, "
8302 "if any, gives the minimum number of digits that must appear; if the "
8303 "converted value requires fewer digits, it is padded on the left with zeros.  "
8304 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8305 "the output is empty."
8306 msgstr ""
8307 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8308 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8309 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8310 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8311
8312 #. type: TP
8313 #: build/C/man3/printf.3:590
8314 #, no-wrap
8315 msgid "B<o>, B<u>, B<x>, B<X>"
8316 msgstr "B<o>, B<u>, B<x>, B<X>"
8317
8318 #. type: Plain text
8319 #: build/C/man3/printf.3:617
8320 msgid ""
8321 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8322 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8323 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8324 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8325 "of digits that must appear; if the converted value requires fewer digits, it "
8326 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8327 "printed with an explicit precision 0, the output is empty."
8328 msgstr ""
8329 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8330 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8331 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8332 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8333 "られる。"
8334
8335 #. type: TP
8336 #: build/C/man3/printf.3:617
8337 #, no-wrap
8338 msgid "B<e>, B<E>"
8339 msgstr "B<e>, B<E>"
8340
8341 #. type: Plain text
8342 #: build/C/man3/printf.3:622
8343 msgid "The I<double> argument is rounded and converted in the style"
8344 msgstr "I<double> 引き数を丸めて"
8345
8346 #. type: Plain text
8347 #: build/C/man3/printf.3:637
8348 msgid ""
8349 "[-]dB<\\&.>dddB<e>\\*(Pmdd where there is one digit before the decimal-point "
8350 "character and the number of digits after it is equal to the precision; if "
8351 "the precision is missing, it is taken as 6; if the precision is zero, no "
8352 "decimal-point character appears.  An B<E> conversion uses the letter B<E> "
8353 "(rather than B<e>)  to introduce the exponent.  The exponent always contains "
8354 "at least two digits; if the value is zero, the exponent is 00."
8355 msgstr ""
8356 "[-]dB<\\&.>dddB<e>\\*(Pmdd の形に変換する。 小数点の前には一桁の数字があり、"
8357 "小数点以下の桁数は精度で指定された 桁数になる。精度は指定されなかった場合 6 "
8358 "とみなされる。 精度が 0 の場合には、小数点以下は表示されない。 B<E> 変換で"
8359 "は、指数を表現するときに (B<e> ではなく)  B<E> が使われる。 指数部分は少なく"
8360 "とも 2桁表示される。 つまり、指数の値が 0 の場合には、00 と表示される。"
8361
8362 #. type: TP
8363 #: build/C/man3/printf.3:637
8364 #, no-wrap
8365 msgid "B<f>, B<F>"
8366 msgstr "B<f>, B<F>"
8367
8368 #. type: Plain text
8369 #: build/C/man3/printf.3:648
8370 msgid ""
8371 "The I<double> argument is rounded and converted to decimal notation in the "
8372 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8373 "character is equal to the precision specification.  If the precision is "
8374 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8375 "point character appears.  If a decimal point appears, at least one digit "
8376 "appears before it."
8377 msgstr ""
8378 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8379 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8380 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8381 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8382
8383 #. type: Plain text
8384 #: build/C/man3/printf.3:659
8385 msgid ""
8386 "(The SUSv2 does not know about B<F> and says that character string "
8387 "representations for infinity and NaN may be made available.  The C99 "
8388 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8389 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8390 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8391 msgstr ""
8392 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8393 "行ってもよいことになっている。\n"
8394 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8395 "し、\n"
8396 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8397 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8398
8399 #. type: TP
8400 #: build/C/man3/printf.3:659
8401 #, no-wrap
8402 msgid "B<g>, B<G>"
8403 msgstr "B<g>, B<G>"
8404
8405 #. type: Plain text
8406 #: build/C/man3/printf.3:684
8407 msgid ""
8408 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8409 "for B<G> conversions).  The precision specifies the number of significant "
8410 "digits.  If the precision is missing, 6 digits are given; if the precision "
8411 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8412 "conversion is less than -4 or greater than or equal to the precision.  "
8413 "Trailing zeros are removed from the fractional part of the result; a decimal "
8414 "point appears only if it is followed by at least one digit."
8415 msgstr ""
8416 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8417 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8418 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8419 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8420 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8421 "一つある場合にだけである。"
8422
8423 #. type: TP
8424 #: build/C/man3/printf.3:684
8425 #, no-wrap
8426 msgid "B<a>, B<A>"
8427 msgstr "B<a>, B<A>"
8428
8429 #. type: Plain text
8430 #: build/C/man3/printf.3:708
8431 msgid ""
8432 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8433 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8434 "\\&.>hhhhB<p>\\*(Pmd; for B<A> conversion the prefix B<0X>, the letters "
8435 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8436 "digit before the decimal point, and the number of digits after it is equal "
8437 "to the precision.  The default precision suffices for an exact "
8438 "representation of the value if an exact representation in base 2 exists and "
8439 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8440 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8441 "and nonzero but otherwise unspecified for normalized numbers."
8442 msgstr ""
8443 "(C99 にはあるが SUSv2 にはない)  B<a> 変換では、 I<double> 引き数を (abcdef "
8444 "の文字を使って)  [-]B<0x>hB<\\&.>hhhhB<p>\\*(Pmd; 形式の 16 進表記に変換す"
8445 "る。 B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。 "
8446 "小数点の前には 1桁の16進数が置かれ、小数点の後ろの桁数は 精度で指定された値と"
8447 "なる。 デフォルトの精度は、その値が 2進数で正確に表現できる場合には、 その値"
8448 "を正確に表現できる桁数となる。それ以外の場合は、 I<double> 型の値を区別するの"
8449 "に十分な大きさとなる。 小数点の前の数字は、正規化されていない数の場合はいくつ"
8450 "になるか分からない。 正規化された数の場合は、 0 以外の値になるが、いくつにな"
8451 "るかは分からない。"
8452
8453 #. type: TP
8454 #: build/C/man3/printf.3:708 build/C/man3/scanf.3:456
8455 #: build/C/man3/wprintf.3:132
8456 #, no-wrap
8457 msgid "B<c>"
8458 msgstr "B<c>"
8459
8460 #. type: Plain text
8461 #: build/C/man3/printf.3:726
8462 msgid ""
8463 "If no B<l> modifier is present, the I<int> argument is converted to an "
8464 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8465 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8466 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8467 "conversion state starting in the initial state, and the resulting multibyte "
8468 "string is written."
8469 msgstr ""
8470 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8471 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8472 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8473 "換し、 変換されたマルチバイト文字列を出力する。"
8474
8475 #. type: TP
8476 #: build/C/man3/printf.3:726 build/C/man3/scanf.3:448
8477 #: build/C/man3/wprintf.3:146
8478 #, no-wrap
8479 msgid "B<s>"
8480 msgstr "B<s>"
8481
8482 #. type: Plain text
8483 #: build/C/man3/printf.3:741
8484 msgid ""
8485 "If no B<l> modifier is present: The I<const char *> argument is expected to "
8486 "be a pointer to an array of character type (pointer to a string).  "
8487 "Characters from the array are written up to (but not including) a "
8488 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8489 "than the number specified are written.  If a precision is given, no null "
8490 "byte need be present; if the precision is not specified, or is greater than "
8491 "the size of the array, the array must contain a terminating null byte."
8492 msgstr ""
8493 "B<l> 修飾子がない場合、 引き数は I<const char *> 型で文字型の配列へのポイン"
8494 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8495 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8496 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8497 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8498 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8499 "なければならない。"
8500
8501 #. type: Plain text
8502 #: build/C/man3/printf.3:768
8503 msgid ""
8504 "If an B<l> modifier is present: The I<const wchar_t *> argument is expected "
8505 "to be a pointer to an array of wide characters.  Wide characters from the "
8506 "array are converted to multibyte characters (each by a call to the B<wcrtomb>"
8507 "(3)  function, with a conversion state starting in the initial state before "
8508 "the first wide character), up to and including a terminating null wide "
8509 "character.  The resulting multibyte characters are written up to (but not "
8510 "including) the terminating null byte.  If a precision is specified, no more "
8511 "bytes than the number specified are written, but no partial multibyte "
8512 "characters are written.  Note that the precision determines the number of "
8513 "I<bytes> written, not the number of I<wide characters> or I<screen "
8514 "positions>.  The array must contain a terminating null wide character, "
8515 "unless a precision is given and it is so small that the number of bytes "
8516 "written exceeds it before the end of the array is reached."
8517 msgstr ""
8518 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t *> 型でワイド文字"
8519 "の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字毎"
8520 "に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド文"
8521 "字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8522 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8523 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8524 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8525 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8526 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8527 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8528 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8529 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8530 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8531 "い。"
8532
8533 #. type: TP
8534 #: build/C/man3/printf.3:768
8535 #, no-wrap
8536 msgid "B<C>"
8537 msgstr "B<C>"
8538
8539 #. type: Plain text
8540 #: build/C/man3/printf.3:774
8541 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8542 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8543
8544 #. type: TP
8545 #: build/C/man3/printf.3:774
8546 #, no-wrap
8547 msgid "B<S>"
8548 msgstr "B<S>"
8549
8550 #. type: Plain text
8551 #: build/C/man3/printf.3:780
8552 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
8553 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
8554
8555 #. type: TP
8556 #: build/C/man3/printf.3:780 build/C/man3/scanf.3:500
8557 #, no-wrap
8558 msgid "B<p>"
8559 msgstr "B<p>"
8560
8561 #. type: Plain text
8562 #: build/C/man3/printf.3:788
8563 msgid ""
8564 "The I<void *> pointer argument is printed in hexadecimal (as if by B<%#x> or "
8565 "B<%#lx>)."
8566 msgstr ""
8567 "I<void *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
8568
8569 #. type: TP
8570 #: build/C/man3/printf.3:788 build/C/man3/scanf.3:508
8571 #, no-wrap
8572 msgid "B<n>"
8573 msgstr "B<n>"
8574
8575 #. type: Plain text
8576 #: build/C/man3/printf.3:795
8577 msgid ""
8578 "The number of characters written so far is stored into the integer indicated "
8579 "by the I<int *> (or variant) pointer argument.  No argument is converted."
8580 msgstr ""
8581 "これまでに出力された文字数を I<int *> (または類似の型) のポインタ引き数が指す"
8582 "整数に保存する。 引き数の変換は行われない。"
8583
8584 #. type: TP
8585 #: build/C/man3/printf.3:795
8586 #, no-wrap
8587 msgid "B<m>"
8588 msgstr "B<m>"
8589
8590 #. type: Plain text
8591 #: build/C/man3/printf.3:801
8592 msgid ""
8593 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
8594 "required."
8595 msgstr ""
8596 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
8597
8598 #. type: TP
8599 #: build/C/man3/printf.3:801 build/C/man3/scanf.3:374
8600 #, no-wrap
8601 msgid "B<%>"
8602 msgstr "B<%>"
8603
8604 #. type: Plain text
8605 #: build/C/man3/printf.3:807
8606 msgid ""
8607 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
8608 "conversion specification is \\(aq%%\\(aq."
8609 msgstr ""
8610 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
8611 "%\" となる。"
8612
8613 #. type: Plain text
8614 #: build/C/man3/printf.3:822
8615 msgid ""
8616 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8617 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
8618 "B<vsnprintf>()  functions conform to C99."
8619 msgstr ""
8620 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8621 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
8622 "B<vsnprintf>()  は C99 に準拠している。"
8623
8624 #. type: Plain text
8625 #: build/C/man3/printf.3:835
8626 msgid ""
8627 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
8628 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
8629 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
8630 "this case, and gives the return value (as always)  as the number of "
8631 "characters that would have been written in case the output string has been "
8632 "large enough."
8633 msgstr ""
8634 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
8635 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
8636 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
8637 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
8638 "出力されるであろう文字数を返す。"
8639
8640 #. type: Plain text
8641 #: build/C/man3/printf.3:849
8642 msgid ""
8643 "Linux libc4 knows about the five C standard flags.  It knows about the "
8644 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
8645 "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 "
8646 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
8647 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
8648 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
8649 "dependent radix character, no thousands' separator, no NaN or infinity, no "
8650 "\"%m$\" and \"*m$\"."
8651 msgstr ""
8652 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
8653 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
8654 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
8655 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
8656 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
8657 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
8658 "えない。"
8659
8660 #. type: Plain text
8661 #: build/C/man3/printf.3:860
8662 msgid ""
8663 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
8664 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
8665 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
8666 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
8667 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
8668 "outputs I<strerror(errno)>."
8669 msgstr ""
8670 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
8671 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
8672 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
8673 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
8674 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
8675 "ある。"
8676
8677 #. type: Plain text
8678 #: build/C/man3/printf.3:862
8679 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
8680 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
8681
8682 #. type: Plain text
8683 #: build/C/man3/printf.3:865
8684 msgid ""
8685 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
8686 "characters B<a> and B<A>."
8687 msgstr ""
8688 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
8689 "加された。"
8690
8691 #. type: Plain text
8692 #: build/C/man3/printf.3:868
8693 msgid ""
8694 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
8695 "flag character B<I>."
8696 msgstr ""
8697 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
8698 "追加された。"
8699
8700 #. type: Plain text
8701 #: build/C/man3/printf.3:870
8702 msgid "Some programs imprudently rely on code such as the following"
8703 msgstr ""
8704 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
8705 "ラムがある。"
8706
8707 #. type: Plain text
8708 #: build/C/man3/printf.3:872
8709 #, no-wrap
8710 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
8711 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
8712
8713 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
8714 #. type: Plain text
8715 #: build/C/man3/printf.3:888
8716 msgid ""
8717 "to append text to I<buf>.  However, the standards explicitly note that the "
8718 "results are undefined if source and destination buffers overlap when calling "
8719 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
8720 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
8721 "such as the above will B<not> produce the expected results."
8722 msgstr ""
8723 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8724 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
8725 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
8726 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
8727 "結果が得られ「ない」ことがある。"
8728
8729 #.  .SH HISTORY
8730 #.  UNIX V7 defines the three routines
8731 #.  .BR printf (),
8732 #.  .BR fprintf (),
8733 #.  .BR sprintf (),
8734 #.  and has the flag \-, the width or precision *, the length modifier l,
8735 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
8736 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
8737 #.  #, + and <space> and no longer mentions D,O,U,X.
8738 #.  2.11BSD has
8739 #.  .BR vprintf (),
8740 #.  .BR vfprintf (),
8741 #.  .BR vsprintf (),
8742 #.  and warns not to use D,O,U,X.
8743 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
8744 #.  and the conversions n, p, E, G, X (with current meaning)
8745 #.  and deprecates D,O,U.
8746 #.  4.4BSD introduces the functions
8747 #.  .BR snprintf ()
8748 #.  and
8749 #.  .BR vsnprintf (),
8750 #.  and the length modifier q.
8751 #.  FreeBSD also has functions
8752 #.  .BR asprintf ()
8753 #.  and
8754 #.  .BR vasprintf (),
8755 #.  that allocate a buffer large enough for
8756 #.  .BR sprintf ().
8757 #.  In glibc there are functions
8758 #.  .BR dprintf ()
8759 #.  and
8760 #.  .BR vdprintf ()
8761 #.  that print to a file descriptor instead of a stream.
8762 #. type: Plain text
8763 #: build/C/man3/printf.3:930
8764 msgid ""
8765 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
8766 "conforms to the C99 standard, that is, behaves as described above, since "
8767 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
8768 "was truncated."
8769 msgstr ""
8770 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
8771 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
8772 "切り詰められた場合は -1 を返す。"
8773
8774 #. type: Plain text
8775 #: build/C/man3/printf.3:947
8776 msgid ""
8777 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
8778 "callers must be careful not to overflow the actual space; this is often "
8779 "impossible to assure.  Note that the length of the strings produced is "
8780 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
8781 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
8782 msgstr ""
8783 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
8784 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
8785 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
8786 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
8787 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
8788
8789 #. type: Plain text
8790 #: build/C/man3/printf.3:960
8791 msgid ""
8792 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
8793 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
8794 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
8795 "libc4 leads to serious security problems."
8796 msgstr ""
8797 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
8798 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
8799 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
8800 "深刻なセキュリティ問題を引き起こすことがある。"
8801
8802 #.  .PP
8803 #.  Some floating-point conversions under early libc4
8804 #.  caused memory leaks.
8805 #. type: Plain text
8806 #: build/C/man3/printf.3:974
8807 msgid ""
8808 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
8809 "contain a % character.  If I<foo> comes from untrusted user input, it may "
8810 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
8811 "a security hole."
8812 msgstr ""
8813 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
8814 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
8815 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
8816 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
8817 "ルを作ることになるかもしれない。"
8818
8819 #. type: Plain text
8820 #: build/C/man3/printf.3:977
8821 msgid "To print \\*(Pi to five decimal places:"
8822 msgstr "\\*(Pi を 5 桁で出力する。"
8823
8824 #. type: Plain text
8825 #: build/C/man3/printf.3:983
8826 #, no-wrap
8827 msgid ""
8828 "#include E<lt>math.hE<gt>\n"
8829 "#include E<lt>stdio.hE<gt>\n"
8830 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
8831 msgstr ""
8832 "#include E<lt>math.hE<gt>\n"
8833 "#include E<lt>stdio.hE<gt>\n"
8834 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
8835
8836 #. type: Plain text
8837 #: build/C/man3/printf.3:992
8838 msgid ""
8839 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
8840 "I<weekday> and I<month> are pointers to strings:"
8841 msgstr ""
8842 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
8843 "I<month> は文字列へのポインタである)"
8844
8845 #. type: Plain text
8846 #: build/C/man3/printf.3:998
8847 #, no-wrap
8848 msgid ""
8849 "#include E<lt>stdio.hE<gt>\n"
8850 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
8851 "        weekday, month, day, hour, min);\n"
8852 msgstr ""
8853 "#include E<lt>stdio.hE<gt>\n"
8854 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
8855 "\tweekday, month, day, hour, min);\n"
8856
8857 #. type: Plain text
8858 #: build/C/man3/printf.3:1004
8859 msgid ""
8860 "Many countries use the day-month-year order.  Hence, an internationalized "
8861 "version must be able to print the arguments in an order specified by the "
8862 "format:"
8863 msgstr ""
8864 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
8865 "順番で 引き数を表示できなければならない。"
8866
8867 #. type: Plain text
8868 #: build/C/man3/printf.3:1010
8869 #, no-wrap
8870 msgid ""
8871 "#include E<lt>stdio.hE<gt>\n"
8872 "fprintf(stdout, format,\n"
8873 "        weekday, month, day, hour, min);\n"
8874 msgstr ""
8875 "#include E<lt>stdio.hE<gt>\n"
8876 "fprintf(stdout, format,\n"
8877 "\tweekday, month, day, hour, min);\n"
8878
8879 #. type: Plain text
8880 #: build/C/man3/printf.3:1017
8881 msgid ""
8882 "where I<format> depends on locale, and may permute the arguments.  With the "
8883 "value:"
8884 msgstr ""
8885 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
8886 "I<format> が"
8887
8888 #. type: Plain text
8889 #: build/C/man3/printf.3:1021
8890 #, no-wrap
8891 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
8892 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
8893
8894 #. type: Plain text
8895 #: build/C/man3/printf.3:1025
8896 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
8897 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
8898
8899 #. type: Plain text
8900 #: build/C/man3/printf.3:1028
8901 msgid ""
8902 "To allocate a sufficiently large string and print into it (code correct for "
8903 "both glibc 2.0 and glibc 2.1):"
8904 msgstr ""
8905 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
8906 "と glibc 2.1 の両方で正しく動作するコード):"
8907
8908 #. type: Plain text
8909 #: build/C/man3/printf.3:1033
8910 #, no-wrap
8911 msgid ""
8912 "#include E<lt>stdio.hE<gt>\n"
8913 "#include E<lt>stdlib.hE<gt>\n"
8914 "#include E<lt>stdarg.hE<gt>\n"
8915 msgstr ""
8916 "#include E<lt>stdio.hE<gt>\n"
8917 "#include E<lt>stdlib.hE<gt>\n"
8918 "#include E<lt>stdarg.hE<gt>\n"
8919
8920 #. type: Plain text
8921 #: build/C/man3/printf.3:1041
8922 #, no-wrap
8923 msgid ""
8924 "char *\n"
8925 "make_message(const char *fmt, ...)\n"
8926 "{\n"
8927 "    int n;\n"
8928 "    int size = 100;     /* Guess we need no more than 100 bytes. */\n"
8929 "    char *p, *np;\n"
8930 "    va_list ap;\n"
8931 msgstr ""
8932 "char *\n"
8933 "make_message(const char *fmt, ...)\n"
8934 "{\n"
8935 "    int n;\n"
8936 "    int size = 100;     /* Guess we need no more than 100 bytes. */\n"
8937 "    char *p, *np;\n"
8938 "    va_list ap;\n"
8939
8940 #. type: Plain text
8941 #: build/C/man3/printf.3:1044
8942 #, no-wrap
8943 msgid ""
8944 "    if ((p = malloc(size)) == NULL)\n"
8945 "        return NULL;\n"
8946 msgstr ""
8947 "    if ((p = malloc(size)) == NULL)\n"
8948 "        return NULL;\n"
8949
8950 #. type: Plain text
8951 #: build/C/man3/printf.3:1046
8952 #, no-wrap
8953 msgid "    while (1) {\n"
8954 msgstr "    while (1) {\n"
8955
8956 #. type: Plain text
8957 #: build/C/man3/printf.3:1048
8958 #, no-wrap
8959 msgid "        /* Try to print in the allocated space. */\n"
8960 msgstr "        /* Try to print in the allocated space. */\n"
8961
8962 #. type: Plain text
8963 #: build/C/man3/printf.3:1052
8964 #, no-wrap
8965 msgid ""
8966 "        va_start(ap, fmt);\n"
8967 "        n = vsnprintf(p, size, fmt, ap);\n"
8968 "        va_end(ap);\n"
8969 msgstr ""
8970 "        va_start(ap, fmt);\n"
8971 "        n = vsnprintf(p, size, fmt, ap);\n"
8972 "        va_end(ap);\n"
8973
8974 #. type: Plain text
8975 #: build/C/man3/printf.3:1054
8976 #, no-wrap
8977 msgid "        /* If that worked, return the string. */\n"
8978 msgstr "        /* If that worked, return the string. */\n"
8979
8980 #. type: Plain text
8981 #: build/C/man3/printf.3:1057
8982 #, no-wrap
8983 msgid ""
8984 "        if (n E<gt> -1 && n E<lt> size)\n"
8985 "            return p;\n"
8986 msgstr ""
8987 "        if (n E<gt> -1 && n E<lt> size)\n"
8988 "            return p;\n"
8989
8990 #. type: Plain text
8991 #: build/C/man3/printf.3:1059
8992 #, no-wrap
8993 msgid "        /* Else try again with more space. */\n"
8994 msgstr "        /* Else try again with more space. */\n"
8995
8996 #. type: Plain text
8997 #: build/C/man3/printf.3:1064
8998 #, no-wrap
8999 msgid ""
9000 "        if (n E<gt> -1)    /* glibc 2.1 */\n"
9001 "            size = n+1; /* precisely what is needed */\n"
9002 "        else           /* glibc 2.0 */\n"
9003 "            size *= 2;  /* twice the old size */\n"
9004 msgstr ""
9005 "        if (n E<gt> -1)    /* glibc 2.1 */\n"
9006 "            size = n+1; /* precisely what is needed */\n"
9007 "        else           /* glibc 2.0 */\n"
9008 "            size *= 2;  /* twice the old size */\n"
9009
9010 #. type: Plain text
9011 #: build/C/man3/printf.3:1073
9012 #, no-wrap
9013 msgid ""
9014 "        if ((np = realloc (p, size)) == NULL) {\n"
9015 "            free(p);\n"
9016 "            return NULL;\n"
9017 "        } else {\n"
9018 "            p = np;\n"
9019 "        }\n"
9020 "    }\n"
9021 "}\n"
9022 msgstr ""
9023 "        if ((np = realloc (p, size)) == NULL) {\n"
9024 "            free(p);\n"
9025 "            return NULL;\n"
9026 "        } else {\n"
9027 "            p = np;\n"
9028 "        }\n"
9029 "    }\n"
9030 "}\n"
9031
9032 #. type: Plain text
9033 #: build/C/man3/printf.3:1082
9034 msgid ""
9035 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9036 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9037 msgstr ""
9038 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9039 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9040
9041 #. type: TH
9042 #: build/C/man3/puts.3:24
9043 #, no-wrap
9044 msgid "PUTS"
9045 msgstr "PUTS"
9046
9047 #. type: Plain text
9048 #: build/C/man3/puts.3:27
9049 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9050 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9051
9052 #. type: Plain text
9053 #: build/C/man3/puts.3:32
9054 #, no-wrap
9055 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9056 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9057
9058 #. type: Plain text
9059 #: build/C/man3/puts.3:34
9060 #, no-wrap
9061 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9062 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9063
9064 #. type: Plain text
9065 #: build/C/man3/puts.3:36
9066 #, no-wrap
9067 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9068 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9069
9070 #. type: Plain text
9071 #: build/C/man3/puts.3:38
9072 #, no-wrap
9073 msgid "B<int putchar(int >I<c>B<);>\n"
9074 msgstr "B<int putchar(int >I<c>B<);>\n"
9075
9076 #. type: Plain text
9077 #: build/C/man3/puts.3:40
9078 #, no-wrap
9079 msgid "B<int puts(const char *>I<s>B<);>\n"
9080 msgstr "B<int puts(const char *>I<s>B<);>\n"
9081
9082 #. type: Plain text
9083 #: build/C/man3/puts.3:49
9084 msgid ""
9085 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9086 "I<stream>."
9087 msgstr ""
9088 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9089 "に書き込む。"
9090
9091 #. type: Plain text
9092 #: build/C/man3/puts.3:56
9093 msgid ""
9094 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9095 "null byte (\\(aq\\e0\\(aq)."
9096 msgstr ""
9097 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9098 "ト (\\(aq\\e0\\(aq) は出力しない。"
9099
9100 #. type: Plain text
9101 #: build/C/man3/puts.3:63
9102 msgid ""
9103 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9104 "a macro which evaluates I<stream> more than once."
9105 msgstr ""
9106 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9107 "れないという点を除き、 B<fputc>()  と同じである。"
9108
9109 #. type: Plain text
9110 #: build/C/man3/puts.3:67
9111 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9112 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9113
9114 #. type: Plain text
9115 #: build/C/man3/puts.3:74
9116 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9117 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9118
9119 #. type: Plain text
9120 #: build/C/man3/puts.3:79
9121 msgid ""
9122 "Calls to the functions described here can be mixed with each other and with "
9123 "calls to other output functions from the I<stdio> library for the same "
9124 "output stream."
9125 msgstr ""
9126 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9127 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9128 "る。"
9129
9130 #. type: Plain text
9131 #: build/C/man3/puts.3:94
9132 msgid ""
9133 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9134 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9135 msgstr ""
9136 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9137 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9138
9139 #. type: Plain text
9140 #: build/C/man3/puts.3:101
9141 msgid ""
9142 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9143 "on error."
9144 msgstr ""
9145 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9146 "は B<EOF> を返す。"
9147
9148 #. type: Plain text
9149 #: build/C/man3/puts.3:110
9150 msgid ""
9151 "It is not advisable to mix calls to output functions from the I<stdio> "
9152 "library with low-level calls to B<write>(2)  for the file descriptor "
9153 "associated with the same output stream; the results will be undefined and "
9154 "very probably not what you want."
9155 msgstr ""
9156 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9157 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9158 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9159 "性が高い。"
9160
9161 #. type: Plain text
9162 #: build/C/man3/puts.3:121
9163 msgid ""
9164 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9165 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9166 "(3)"
9167 msgstr ""
9168 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9169 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9170 "(3)"
9171
9172 #. type: TH
9173 #: build/C/man2/read.2:35
9174 #, no-wrap
9175 msgid "READ"
9176 msgstr "READ"
9177
9178 #. type: Plain text
9179 #: build/C/man2/read.2:38
9180 msgid "read - read from a file descriptor"
9181 msgstr "read - ファイルディスクリプタから読み込む"
9182
9183 #. type: Plain text
9184 #: build/C/man2/read.2:43
9185 #, no-wrap
9186 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9187 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9188
9189 #. type: Plain text
9190 #: build/C/man2/read.2:52
9191 msgid ""
9192 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9193 "into the buffer starting at I<buf>."
9194 msgstr ""
9195 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9196 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9197
9198 #. type: Plain text
9199 #: build/C/man2/read.2:63
9200 msgid ""
9201 "If I<count> is zero, B<read>()  returns zero and has no other results.  If "
9202 "I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9203 msgstr ""
9204 "I<count> が 0 ならば、 B<read>()  は 0 を返し、他に何も起きない。 I<count> "
9205 "が B<SSIZE_MAX> より大きければ、結果は特定できない。"
9206
9207 #. type: Plain text
9208 #: build/C/man2/read.2:77
9209 msgid ""
9210 "On success, the number of bytes read is returned (zero indicates end of "
9211 "file), and the file position is advanced by this number.  It is not an error "
9212 "if this number is smaller than the number of bytes requested; this may "
9213 "happen for example because fewer bytes are actually available right now "
9214 "(maybe because we were close to end-of-file, or because we are reading from "
9215 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9216 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9217 "this case it is left unspecified whether the file position (if any) changes."
9218 msgstr ""
9219 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9220 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9221 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9222 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9223 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9224 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9225 "の場合はファイル位置が変更されるかどうかは 不定である。"
9226
9227 #. type: TP
9228 #: build/C/man2/read.2:78 build/C/man3/scanf.3:546 build/C/man2/write.2:108
9229 #, no-wrap
9230 msgid "B<EAGAIN>"
9231 msgstr "B<EAGAIN>"
9232
9233 #. type: Plain text
9234 #: build/C/man2/read.2:85
9235 msgid ""
9236 "The file descriptor I<fd> refers to a file other than a socket and has been "
9237 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9238 msgstr ""
9239 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非"
9240 "停止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと"
9241 "停止する状況にある。"
9242
9243 #. type: TP
9244 #: build/C/man2/read.2:85 build/C/man2/write.2:115
9245 #, no-wrap
9246 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9247 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9248
9249 #.  Actually EAGAIN on Linux
9250 #. type: Plain text
9251 #: build/C/man2/read.2:96
9252 msgid ""
9253 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9254 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9255 "to be returned for this case, and does not require these constants to have "
9256 "the same value, so a portable application should check for both "
9257 "possibilities."
9258 msgstr ""
9259 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 "
9260 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9261 "する状況にある。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めて"
9262 "おり、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性"
9263 "が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
9264
9265 #. type: Plain text
9266 #: build/C/man2/read.2:100
9267 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9268 msgstr ""
9269 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9270 "(open) されていない。"
9271
9272 #. type: Plain text
9273 #: build/C/man2/read.2:104 build/C/man2/write.2:139
9274 msgid "I<buf> is outside your accessible address space."
9275 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9276
9277 #. type: Plain text
9278 #: build/C/man2/read.2:108
9279 msgid ""
9280 "The call was interrupted by a signal before any data was read; see B<signal>"
9281 "(7)."
9282 msgstr ""
9283 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9284
9285 #. type: Plain text
9286 #: build/C/man2/read.2:119
9287 msgid ""
9288 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9289 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9290 "I<buf>, the value specified in I<count>, or the current file offset is not "
9291 "suitably aligned."
9292 msgstr ""
9293 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9294 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9295 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9296 "ンメントが不適切である。"
9297
9298 #. type: Plain text
9299 #: build/C/man2/read.2:129
9300 msgid ""
9301 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9302 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9303 "information."
9304 msgstr ""
9305 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9306 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9307 "こと。"
9308
9309 #. type: Plain text
9310 #: build/C/man2/read.2:140
9311 msgid ""
9312 "I/O error.  This will happen for example when the process is in a background "
9313 "process group, tries to read from its controlling tty, and either it is "
9314 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9315 "also occur when there is a low-level I/O error while reading from a disk or "
9316 "tape."
9317 msgstr ""
9318 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、 それ"
9319 "を制御している tty から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁"
9320 "止 (blocking) されている場合や、 そのプロセスグループが孤立 (orphan) してい"
9321 "る場合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発"
9322 "生した場合にも起こる。"
9323
9324 #. type: Plain text
9325 #: build/C/man2/read.2:144
9326 msgid "I<fd> refers to a directory."
9327 msgstr "I<fd> がディレクトリを参照している。"
9328
9329 #. type: Plain text
9330 #: build/C/man2/read.2:155
9331 msgid ""
9332 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9333 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9334 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9335 "read."
9336 msgstr ""
9337 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9338 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9339 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9340 "数を返してもよい。"
9341
9342 #. type: Plain text
9343 #: build/C/man2/read.2:169
9344 msgid ""
9345 "On NFS file systems, reading small amounts of data will only update the "
9346 "timestamp the first time, subsequent calls may not do so.  This is caused by "
9347 "client side attribute caching, because most if not all NFS clients leave "
9348 "st_atime (last file access time)  updates to the server and client side "
9349 "reads satisfied from the client's cache will not cause st_atime updates on "
9350 "the server as there are no server side reads.  UNIX semantics can be "
9351 "obtained by disabling client side attribute caching, but in most situations "
9352 "this will substantially increase server load and decrease performance."
9353 msgstr ""
9354 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9355 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9356 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9357 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9358 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9359 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9360 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9361 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9362
9363 #. type: Plain text
9364 #: build/C/man2/read.2:178
9365 msgid ""
9366 "Many file systems and disks were considered to be fast enough that the "
9367 "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, B<O_NONBLOCK> "
9368 "may not be available on files and/or disks."
9369 msgstr ""
9370 "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むくらい"
9371 "に十分に高速であると考えられている。 それでそのようなファイルやディスクには "
9372 "B<O_NONBLOCK> は利用できないかもしれない。"
9373
9374 #. type: Plain text
9375 #: build/C/man2/read.2:190
9376 msgid ""
9377 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9378 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9379 "B<fread>(3)"
9380 msgstr ""
9381 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9382 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9383 "B<fread>(3)"
9384
9385 #. type: TH
9386 #: build/C/man2/readlink.2:41
9387 #, no-wrap
9388 msgid "READLINK"
9389 msgstr "READLINK"
9390
9391 #. type: TH
9392 #: build/C/man2/readlink.2:41
9393 #, no-wrap
9394 msgid "2011-09-20"
9395 msgstr "2011-09-20"
9396
9397 #. type: Plain text
9398 #: build/C/man2/readlink.2:44
9399 msgid "readlink - read value of a symbolic link"
9400 msgstr "readlink - シンボリックリンクの値を読む"
9401
9402 #. type: Plain text
9403 #: build/C/man2/readlink.2:48
9404 msgid ""
9405 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9406 ">I<bufsiz>B<);>"
9407 msgstr ""
9408 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9409 ">I<bufsiz>B<);>"
9410
9411 #. type: Plain text
9412 #: build/C/man2/readlink.2:56
9413 msgid "B<readlink>():"
9414 msgstr "B<readlink>():"
9415
9416 #. type: Plain text
9417 #: build/C/man2/readlink.2:59 build/C/man2/symlink.2:50
9418 msgid ""
9419 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9420 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9421 msgstr ""
9422 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9423 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9424
9425 #. type: Plain text
9426 #: build/C/man2/readlink.2:75
9427 msgid ""
9428 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9429 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9430 "null byte to I<buf>.  It will truncate the contents (to a length of "
9431 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9432 "contents."
9433 msgstr ""
9434 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> "
9435 "バッファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  "
9436 "は NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが"
9437 "小さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9438
9439 #. type: Plain text
9440 #: build/C/man2/readlink.2:83
9441 msgid ""
9442 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9443 "error, -1 is returned and I<errno> is set to indicate the error."
9444 msgstr ""
9445 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9446 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9447
9448 #. type: Plain text
9449 #: build/C/man2/readlink.2:89
9450 msgid ""
9451 "Search permission is denied for a component of the path prefix.  (See also "
9452 "B<path_resolution>(7).)"
9453 msgstr ""
9454 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9455 "参照すること)。"
9456
9457 #. type: Plain text
9458 #: build/C/man2/readlink.2:93
9459 msgid "I<buf> extends outside the process's allocated address space."
9460 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9461
9462 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9463 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9464 #.  and this error can also occur if bufsiz < 0.
9465 #.  See: http://thread.gmane.org/gmane.linux.man/380
9466 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9467 #. type: Plain text
9468 #: build/C/man2/readlink.2:102
9469 msgid "I<bufsiz> is not positive."
9470 msgstr "I<bufsiz> が正でない。"
9471
9472 #. type: Plain text
9473 #: build/C/man2/readlink.2:105
9474 msgid "The named file is not a symbolic link."
9475 msgstr "指定したファイルがシンボリックリンクでない。"
9476
9477 #. type: Plain text
9478 #: build/C/man2/readlink.2:108
9479 msgid "An I/O error occurred while reading from the file system."
9480 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9481
9482 #. type: Plain text
9483 #: build/C/man2/readlink.2:111
9484 msgid "Too many symbolic links were encountered in translating the pathname."
9485 msgstr "パス名にシンボリックリンクが多すぎる。"
9486
9487 #. type: Plain text
9488 #: build/C/man2/readlink.2:114
9489 msgid "A pathname, or a component of a pathname, was too long."
9490 msgstr "パス名かパス名の一部分が長過ぎる。"
9491
9492 #. type: Plain text
9493 #: build/C/man2/readlink.2:117
9494 msgid "The named file does not exist."
9495 msgstr "その名前のファイルが存在しない。"
9496
9497 #. type: Plain text
9498 #: build/C/man2/readlink.2:123
9499 msgid "A component of the path prefix is not a directory."
9500 msgstr "パスのディレクトリ部分がディレクトリでない。"
9501
9502 #. type: Plain text
9503 #: build/C/man2/readlink.2:128
9504 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9505 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9506
9507 #. type: Plain text
9508 #: build/C/man2/readlink.2:136
9509 msgid ""
9510 "In versions of glibc up to and including glibc 2.4, the return type of "
9511 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
9512 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
9513 msgstr ""
9514 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
9515 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
9516 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
9517
9518 #. type: Plain text
9519 #: build/C/man2/readlink.2:155
9520 msgid ""
9521 "Using a statically sized buffer might not provide enough room for the "
9522 "symbolic link contents.  The required size for the buffer can be obtained "
9523 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
9524 "link.  However, the number of bytes written by B<readlink>()  should be "
9525 "checked to make sure that the size of the symbolic link did not increase "
9526 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
9527 "also addresses a common portability problem when using I<PATH_MAX> for the "
9528 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
9529 "the system does not have such limit."
9530 msgstr ""
9531
9532 #. type: Plain text
9533 #: build/C/man2/readlink.2:161
9534 msgid ""
9535 "The following program allocates the buffer needed by B<readlink>()  "
9536 "dynamically from the information provided by B<lstat>(), making sure there's "
9537 "no race condition between the calls."
9538 msgstr ""
9539
9540 #. type: Plain text
9541 #: build/C/man2/readlink.2:168
9542 #, no-wrap
9543 msgid ""
9544 "#include E<lt>sys/types.hE<gt>\n"
9545 "#include E<lt>sys/stat.hE<gt>\n"
9546 "#include E<lt>stdio.hE<gt>\n"
9547 "#include E<lt>stdlib.hE<gt>\n"
9548 "#include E<lt>unistd.hE<gt>\n"
9549 msgstr ""
9550 "#include E<lt>sys/types.hE<gt>\n"
9551 "#include E<lt>sys/stat.hE<gt>\n"
9552 "#include E<lt>stdio.hE<gt>\n"
9553 "#include E<lt>stdlib.hE<gt>\n"
9554 "#include E<lt>unistd.hE<gt>\n"
9555
9556 #. type: Plain text
9557 #: build/C/man2/readlink.2:175
9558 #, no-wrap
9559 msgid ""
9560 "int\n"
9561 "main(int argc, char *argv[])\n"
9562 "{\n"
9563 "    struct stat sb;\n"
9564 "    char *linkname;\n"
9565 "    ssize_t r;\n"
9566 msgstr ""
9567 "int\n"
9568 "main(int argc, char *argv[])\n"
9569 "{\n"
9570 "    struct stat sb;\n"
9571 "    char *linkname;\n"
9572 "    ssize_t r;\n"
9573
9574 #. type: Plain text
9575 #: build/C/man2/readlink.2:180
9576 #, no-wrap
9577 msgid ""
9578 "    if (argc != 2) {\n"
9579 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9580 "        exit(EXIT_FAILURE);\n"
9581 "    }\n"
9582 msgstr ""
9583 "    if (argc != 2) {\n"
9584 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9585 "        exit(EXIT_FAILURE);\n"
9586 "    }\n"
9587
9588 #. type: Plain text
9589 #: build/C/man2/readlink.2:185
9590 #, no-wrap
9591 msgid ""
9592 "    if (lstat(argv[1], &sb) == -1) {\n"
9593 "        perror(\"lstat\");\n"
9594 "        exit(EXIT_FAILURE);\n"
9595 "    }\n"
9596 msgstr ""
9597 "    if (lstat(argv[1], &sb) == -1) {\n"
9598 "        perror(\"lstat\");\n"
9599 "        exit(EXIT_FAILURE);\n"
9600 "    }\n"
9601
9602 #. type: Plain text
9603 #: build/C/man2/readlink.2:191
9604 #, no-wrap
9605 msgid ""
9606 "    linkname = malloc(sb.st_size + 1);\n"
9607 "    if (linkname == NULL) {\n"
9608 "        fprintf(stderr, \"insufficient memory\\en\");\n"
9609 "        exit(EXIT_FAILURE);\n"
9610 "    }\n"
9611 msgstr ""
9612 "    linkname = malloc(sb.st_size + 1);\n"
9613 "    if (linkname == NULL) {\n"
9614 "        fprintf(stderr, \"insufficient memory\\en\");\n"
9615 "        exit(EXIT_FAILURE);\n"
9616 "    }\n"
9617
9618 #. type: Plain text
9619 #: build/C/man2/readlink.2:193
9620 #, no-wrap
9621 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
9622 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
9623
9624 #. type: Plain text
9625 #: build/C/man2/readlink.2:198
9626 #, no-wrap
9627 msgid ""
9628 "    if (r E<lt> 0) {\n"
9629 "        perror(\"lstat\");\n"
9630 "        exit(EXIT_FAILURE);\n"
9631 "    }\n"
9632 msgstr ""
9633 "    if (r E<lt> 0) {\n"
9634 "        perror(\"lstat\");\n"
9635 "        exit(EXIT_FAILURE);\n"
9636 "    }\n"
9637
9638 #. type: Plain text
9639 #: build/C/man2/readlink.2:204
9640 #, no-wrap
9641 msgid ""
9642 "    if (r E<gt> sb.st_size) {\n"
9643 "        fprintf(stderr, \"symlink increased in size \"\n"
9644 "                        \"between lstat() and readlink()\\en\");\n"
9645 "        exit(EXIT_FAILURE);\n"
9646 "    }\n"
9647 msgstr ""
9648 "    if (r E<gt> sb.st_size) {\n"
9649 "        fprintf(stderr, \"symlink increased in size \"\n"
9650 "                        \"between lstat() and readlink()\\en\");\n"
9651 "        exit(EXIT_FAILURE);\n"
9652 "    }\n"
9653
9654 #. type: Plain text
9655 #: build/C/man2/readlink.2:206
9656 #, no-wrap
9657 msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
9658 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
9659
9660 #. type: Plain text
9661 #: build/C/man2/readlink.2:208
9662 #, no-wrap
9663 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
9664 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
9665
9666 #. type: Plain text
9667 #: build/C/man2/readlink.2:219
9668 msgid ""
9669 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
9670 "B<path_resolution>(7), B<symlink>(7)"
9671 msgstr ""
9672 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
9673 "B<path_resolution>(7), B<symlink>(7)"
9674
9675 #. type: TH
9676 #: build/C/man2/readv.2:30
9677 #, no-wrap
9678 msgid "READV"
9679 msgstr "READV"
9680
9681 #. type: TH
9682 #: build/C/man2/readv.2:30
9683 #, no-wrap
9684 msgid "2010-11-17"
9685 msgstr "2010-11-17"
9686
9687 #. type: Plain text
9688 #: build/C/man2/readv.2:33
9689 msgid ""
9690 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
9691 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
9692
9693 #. type: Plain text
9694 #: build/C/man2/readv.2:36
9695 #, no-wrap
9696 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
9697 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
9698
9699 #. type: Plain text
9700 #: build/C/man2/readv.2:38
9701 #, no-wrap
9702 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9703 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9704
9705 #. type: Plain text
9706 #: build/C/man2/readv.2:40
9707 #, no-wrap
9708 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9709 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9710
9711 #. type: Plain text
9712 #: build/C/man2/readv.2:43
9713 #, no-wrap
9714 msgid ""
9715 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9716 "B<               off_t >I<offset>B<);>\n"
9717 msgstr ""
9718 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9719 "B<               off_t >I<offset>B<);>\n"
9720
9721 #. type: Plain text
9722 #: build/C/man2/readv.2:46
9723 #, no-wrap
9724 msgid ""
9725 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9726 "B<                off_t >I<offset>B<);>\n"
9727 msgstr ""
9728 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9729 "B<                off_t >I<offset>B<);>\n"
9730
9731 #. type: Plain text
9732 #: build/C/man2/readv.2:56
9733 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
9734 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
9735
9736 #. type: Plain text
9737 #: build/C/man2/readv.2:66
9738 msgid ""
9739 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
9740 "with the file descriptor I<fd> into the buffers described by I<iov> "
9741 "(\"scatter input\")."
9742 msgstr ""
9743 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
9744 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
9745 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
9746
9747 #. type: Plain text
9748 #: build/C/man2/readv.2:76
9749 msgid ""
9750 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
9751 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
9752 "\")."
9753 msgstr ""
9754 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 I<iovcnt>\n"
9755 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付けら\n"
9756 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
9757
9758 #. type: Plain text
9759 #: build/C/man2/readv.2:85
9760 msgid ""
9761 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
9762 "I<E<lt>sys/uio.hE<gt>> as:"
9763 msgstr ""
9764 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
9765 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
9766
9767 #. type: Plain text
9768 #: build/C/man2/readv.2:93
9769 #, no-wrap
9770 msgid ""
9771 "struct iovec {\n"
9772 "    void  *iov_base;    /* Starting address */\n"
9773 "    size_t iov_len;     /* Number of bytes to transfer */\n"
9774 "};\n"
9775 msgstr ""
9776 "struct iovec {\n"
9777 "    void  *iov_base;    /* Starting address */\n"
9778 "    size_t iov_len;     /* Number of bytes to transfer */\n"
9779 "};\n"
9780
9781 #. type: Plain text
9782 #: build/C/man2/readv.2:101
9783 msgid ""
9784 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
9785 "buffers are filled."
9786 msgstr ""
9787 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
9788 "B<read>(2) と全く同様の動作を行う。"
9789
9790 #. type: Plain text
9791 #: build/C/man2/readv.2:107
9792 msgid ""
9793 "The B<writev>()  system call works just like B<write>(2)  except that "
9794 "multiple buffers are written out."
9795 msgstr ""
9796 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
9797 "B<write>(2) と全く同様の動作を行う。"
9798
9799 #. type: Plain text
9800 #: build/C/man2/readv.2:126
9801 msgid ""
9802 "Buffers are processed in array order.  This means that B<readv>()  "
9803 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
9804 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
9805 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
9806 "[0] before proceeding to I<iov>[1], and so on."
9807 msgstr ""
9808 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
9809 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
9810 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
9811 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
9812
9813 #. type: Plain text
9814 #: build/C/man2/readv.2:144
9815 msgid ""
9816 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
9817 "data written by B<writev>()  is written as a single block that is not "
9818 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
9819 "for an exception); analogously, B<readv>()  is guaranteed to read a "
9820 "contiguous block of data from the file, regardless of read operations "
9821 "performed in other threads or processes that have file descriptors referring "
9822 "to the same open file description (see B<open>(2))."
9823 msgstr ""
9824 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
9825 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
9826 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
9827 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
9828 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
9829 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
9830 "作の影響を受けることはない。"
9831
9832 #. type: SS
9833 #: build/C/man2/readv.2:144
9834 #, no-wrap
9835 msgid "preadv() and pwritev()"
9836 msgstr "preadv() と pwritev()"
9837
9838 #. type: Plain text
9839 #: build/C/man2/readv.2:157
9840 msgid ""
9841 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
9842 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
9843 "argument, I<offset>, which specifies the file offset at which the input "
9844 "operation is to be performed."
9845 msgstr ""
9846
9847 #. type: Plain text
9848 #: build/C/man2/readv.2:170
9849 msgid ""
9850 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
9851 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
9852 "argument, I<offset>, which specifies the file offset at which the output "
9853 "operation is to be performed."
9854 msgstr ""
9855
9856 #. type: Plain text
9857 #: build/C/man2/readv.2:175
9858 msgid ""
9859 "The file offset is not changed by these system calls.  The file referred to "
9860 "by I<fd> must be capable of seeking."
9861 msgstr ""
9862
9863 #. type: Plain text
9864 #: build/C/man2/readv.2:186
9865 msgid ""
9866 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
9867 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
9868 "error, -1 is returned, and I<errno> is set appropriately."
9869 msgstr ""
9870 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
9871 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
9872 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
9873
9874 #. type: Plain text
9875 #: build/C/man2/readv.2:198
9876 msgid ""
9877 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
9878 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
9879 "(2).  Additionally, the following error is defined:"
9880 msgstr ""
9881 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
9882 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗する。\n"
9883 "また、追加で以下のエラーが定義されている:"
9884
9885 #. type: Plain text
9886 #: build/C/man2/readv.2:207
9887 msgid ""
9888 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
9889 "vector count I<iovcnt> is less than zero or greater than the permitted "
9890 "maximum."
9891 msgstr ""
9892 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
9893 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
9894
9895 #. type: Plain text
9896 #: build/C/man2/readv.2:212
9897 msgid ""
9898 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
9899 "support was added in glibc 2.10."
9900 msgstr ""
9901
9902 #.  The readv/writev system calls were buggy before Linux 1.3.40.
9903 #.  (Says release.libc.)
9904 #. type: Plain text
9905 #: build/C/man2/readv.2:220
9906 msgid ""
9907 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
9908 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
9909 "I<iovcnt> argument, and I<int> as the return type."
9910 msgstr ""
9911 "B<readv>(), B<writev>(): \n"
9912 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
9913 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
9914 "返り値の型として I<int> を使用していた。"
9915
9916 #. type: Plain text
9917 #: build/C/man2/readv.2:224
9918 msgid ""
9919 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
9920 msgstr ""
9921
9922 #. type: SS
9923 #: build/C/man2/readv.2:225
9924 #, no-wrap
9925 msgid "Linux Notes"
9926 msgstr "Linux での注意"
9927
9928 #. type: Plain text
9929 #: build/C/man2/readv.2:256
9930 msgid ""
9931 "POSIX.1-2001 allows an implementation to place a limit on the number of "
9932 "items that can be passed in I<iov>.  An implementation can advertise its "
9933 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
9934 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
9935 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
9936 "glibc wrapper functions do some extra work if they detect that the "
9937 "underlying kernel system call failed because this limit was exceeded.  In "
9938 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
9939 "large enough for all of the items specified by I<iov>, passes that buffer in "
9940 "a call to B<read>(2), copies data from the buffer to the locations specified "
9941 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
9942 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
9943 "using a temporary buffer and a call to B<write>(2)."
9944 msgstr ""
9945 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
9946 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
9947 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
9948 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
9949 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
9950 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
9951 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
9952 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
9953 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
9954 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
9955 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
9956 "(2)  を呼び出す。"
9957
9958 #. type: Plain text
9959 #: build/C/man2/readv.2:263
9960 msgid ""
9961 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
9962 "operate on file descriptors, with the functions from the stdio library; the "
9963 "results will be undefined and probably not what you want."
9964 msgstr ""
9965 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
9966 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
9967 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
9968 "得られないだろう。"
9969
9970 #. type: Plain text
9971 #: build/C/man2/readv.2:266
9972 msgid "The following code sample demonstrates the use of B<writev>():"
9973 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
9974
9975 #. type: Plain text
9976 #: build/C/man2/readv.2:273
9977 #, no-wrap
9978 msgid ""
9979 "char *str0 = \"hello \";\n"
9980 "char *str1 = \"world\\en\";\n"
9981 "struct iovec iov[2];\n"
9982 "ssize_t nwritten;\n"
9983 msgstr ""
9984 "char *str0 = \"hello \";\n"
9985 "char *str1 = \"world\\en\";\n"
9986 "struct iovec iov[2];\n"
9987 "ssize_t nwritten;\n"
9988
9989 #. type: Plain text
9990 #: build/C/man2/readv.2:278
9991 #, no-wrap
9992 msgid ""
9993 "iov[0].iov_base = str0;\n"
9994 "iov[0].iov_len = strlen(str0);\n"
9995 "iov[1].iov_base = str1;\n"
9996 "iov[1].iov_len = strlen(str1);\n"
9997 msgstr ""
9998 "iov[0].iov_base = str0;\n"
9999 "iov[0].iov_len = strlen(str0);\n"
10000 "iov[1].iov_base = str1;\n"
10001 "iov[1].iov_len = strlen(str1);\n"
10002
10003 #. type: Plain text
10004 #: build/C/man2/readv.2:280
10005 #, no-wrap
10006 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10007 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10008
10009 #. type: Plain text
10010 #: build/C/man2/readv.2:285
10011 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10012 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10013
10014 #. type: TH
10015 #: build/C/man3/remove.3:31
10016 #, no-wrap
10017 msgid "REMOVE"
10018 msgstr "REMOVE"
10019
10020 #. type: TH
10021 #: build/C/man3/remove.3:31
10022 #, no-wrap
10023 msgid "2008-12-03"
10024 msgstr "2008-12-03"
10025
10026 #. type: Plain text
10027 #: build/C/man3/remove.3:34
10028 msgid "remove - remove a file or directory"
10029 msgstr "remove - ファイルやディレクトリを削除する"
10030
10031 #. type: Plain text
10032 #: build/C/man3/remove.3:38
10033 msgid "B<int remove(const char *>I<pathname>B<);>"
10034 msgstr "B<int remove(const char *>I<pathname>B<);>"
10035
10036 #. type: Plain text
10037 #: build/C/man3/remove.3:46
10038 msgid ""
10039 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10040 "for files, and B<rmdir>(2)  for directories."
10041 msgstr ""
10042 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10043 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10044
10045 #. type: Plain text
10046 #: build/C/man3/remove.3:50
10047 msgid ""
10048 "If the removed name was the last link to a file and no processes have the "
10049 "file open, the file is deleted and the space it was using is made available "
10050 "for reuse."
10051 msgstr ""
10052 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10053 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10054 "ことができるようになる。"
10055
10056 #. type: Plain text
10057 #: build/C/man3/remove.3:55
10058 msgid ""
10059 "If the name was the last link to a file, but any processes still have the "
10060 "file open, the file will remain in existence until the last file descriptor "
10061 "referring to it is closed."
10062 msgstr ""
10063 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10064 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10065 "でファイルは存在し続ける。"
10066
10067 #. type: Plain text
10068 #: build/C/man3/remove.3:57
10069 msgid "If the name referred to a symbolic link, the link is removed."
10070 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10071
10072 #. type: Plain text
10073 #: build/C/man3/remove.3:60
10074 msgid ""
10075 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10076 "processes which have the object open may continue to use it."
10077 msgstr ""
10078 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10079 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10080
10081 #. type: Plain text
10082 #: build/C/man3/remove.3:70
10083 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10084 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10085
10086 #. type: Plain text
10087 #: build/C/man3/remove.3:72
10088 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10089 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10090
10091 #. type: Plain text
10092 #: build/C/man3/remove.3:78
10093 msgid ""
10094 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10095 "hence would not remove directories)."
10096 msgstr ""
10097 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10098 "(従ってディレクトリを削除できなかった)。"
10099
10100 #. type: Plain text
10101 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10102 msgid ""
10103 "Infelicities in the protocol underlying NFS can cause the unexpected "
10104 "disappearance of files which are still being used."
10105 msgstr ""
10106 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10107 "うことがありえる。"
10108
10109 #. type: Plain text
10110 #: build/C/man3/remove.3:91
10111 msgid ""
10112 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10113 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10114 msgstr ""
10115 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10116 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10117
10118 #. type: TH
10119 #: build/C/man2/rename.2:32
10120 #, no-wrap
10121 msgid "RENAME"
10122 msgstr "RENAME"
10123
10124 #. type: TH
10125 #: build/C/man2/rename.2:32
10126 #, no-wrap
10127 msgid "2009-03-30"
10128 msgstr "2009-03-30"
10129
10130 #. type: Plain text
10131 #: build/C/man2/rename.2:35
10132 msgid "rename - change the name or location of a file"
10133 msgstr "rename - ファイルの名前や位置を変更する"
10134
10135 #. type: Plain text
10136 #: build/C/man2/rename.2:39
10137 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10138 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10139
10140 #. type: Plain text
10141 #: build/C/man2/rename.2:48
10142 msgid ""
10143 "B<rename>()  renames a file, moving it between directories if required.  Any "
10144 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10145 "Open file descriptors for I<oldpath> are also unaffected."
10146 msgstr ""
10147 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10148 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10149 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10150 "リプタにも影響はない。"
10151
10152 #. type: Plain text
10153 #: build/C/man2/rename.2:56
10154 msgid ""
10155 "If I<newpath> already exists it will be atomically replaced (subject to a "
10156 "few conditions; see ERRORS below), so that there is no point at which "
10157 "another process attempting to access I<newpath> will find it missing."
10158 msgstr ""
10159 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10160 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10161 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10162 "とはない (訳註: 常にアクセス可能である)。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/rename.2:64
10166 msgid ""
10167 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10168 "file, then B<rename>()  does nothing, and returns a success status."
10169 msgstr ""
10170 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10171 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10172
10173 #. type: Plain text
10174 #: build/C/man2/rename.2:72
10175 msgid ""
10176 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10177 "guarantees to leave an instance of I<newpath> in place."
10178 msgstr ""
10179 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10180 "I<newpath> の実体を元のまま残すことを保証する。"
10181
10182 #. type: Plain text
10183 #: build/C/man2/rename.2:78
10184 msgid ""
10185 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10186 "not exist, or it must specify an empty directory."
10187 msgstr ""
10188 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10189 "存在しないか、空のディレクトリでなければならない。"
10190
10191 #. type: Plain text
10192 #: build/C/man2/rename.2:85
10193 msgid ""
10194 "However, when overwriting there will probably be a window in which both "
10195 "I<oldpath> and I<newpath> refer to the file being renamed."
10196 msgstr ""
10197 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10198 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10199
10200 #. type: Plain text
10201 #: build/C/man2/rename.2:91
10202 msgid ""
10203 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10204 "refers to a symbolic link the link will be overwritten."
10205 msgstr ""
10206 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リン"
10207 "クの名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している"
10208 "場合は、リンクが上書きされる。"
10209
10210 #. type: Plain text
10211 #: build/C/man2/rename.2:116
10212 msgid ""
10213 "Write permission is denied for the directory containing I<oldpath> or "
10214 "I<newpath>, or, search permission is denied for one of the directories in "
10215 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10216 "and does not allow write permission (needed to update the I<..> entry).  "
10217 "(See also B<path_resolution>(7).)"
10218 msgstr ""
10219 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10220 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10221 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10222 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10223
10224 #. type: TP
10225 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10226 #, no-wrap
10227 msgid "B<EBUSY>"
10228 msgstr "B<EBUSY>"
10229
10230 #. type: Plain text
10231 #: build/C/man2/rename.2:133
10232 msgid ""
10233 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10234 "use by some process (perhaps as current working directory, or as root "
10235 "directory, or because it was open for reading) or is in use by the system "
10236 "(for example as mount point), while the system considers this an error.  "
10237 "(Note that there is no requirement to return B<EBUSY> in such cases"
10238 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10239 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10240 "situations.)"
10241 msgstr ""
10242 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10243 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのた"
10244 "めにオープンされているかでろう)  もしくは、システムが使用中 (例えばマウント"
10245 "ポイントである)  であり、システムがこれをエラーであると判断したために rename "
10246 "が失敗した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない"
10247 "点に注意すること。 このような場合に、rename をとにかく実行してみるのは何の問"
10248 "題もない。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10249 "B<EBUSY> を返すことが許されている。)"
10250
10251 #. type: Plain text
10252 #: build/C/man2/rename.2:140
10253 msgid ""
10254 "The new pathname contained a path prefix of the old, or, more generally, an "
10255 "attempt was made to make a directory a subdirectory of itself."
10256 msgstr ""
10257 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10258 "ディレクトリに 変更しようとした場合がほとんどである。"
10259
10260 #. type: Plain text
10261 #: build/C/man2/rename.2:146
10262 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10263 msgstr ""
10264 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10265 "い。"
10266
10267 #. type: Plain text
10268 #: build/C/man2/rename.2:157
10269 msgid ""
10270 "I<oldpath> already has the maximum number of links to it, or it was a "
10271 "directory and the directory containing I<newpath> has the maximum number of "
10272 "links."
10273 msgstr ""
10274 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10275 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10276
10277 #. type: Plain text
10278 #: build/C/man2/rename.2:173
10279 msgid ""
10280 "The link named by I<oldpath> does not exist; or, a directory component in "
10281 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10282 msgstr ""
10283 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10284 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10285
10286 #. type: Plain text
10287 #: build/C/man2/rename.2:190
10288 msgid ""
10289 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10290 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10291 "not a directory."
10292 msgstr ""
10293 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10294 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10295 "トリでない。"
10296
10297 #. type: TP
10298 #: build/C/man2/rename.2:190
10299 #, no-wrap
10300 msgid "B<ENOTEMPTY> or B<EEXIST>"
10301 msgstr "B<ENOTEMPTY  または  EEXIST>"
10302
10303 #. type: Plain text
10304 #: build/C/man2/rename.2:194
10305 msgid ""
10306 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10307 "\" and \"..\"."
10308 msgstr ""
10309 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10310 "でいる。"
10311
10312 #. type: TP
10313 #: build/C/man2/rename.2:194 build/C/man2/unlink.2:126
10314 #, no-wrap
10315 msgid "B<EPERM> or B<EACCES>"
10316 msgstr "B<EPERM> または B<EACCES>"
10317
10318 #. type: Plain text
10319 #: build/C/man2/rename.2:218
10320 msgid ""
10321 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10322 "the process's effective user ID is neither the user ID of the file to be "
10323 "deleted nor that of the directory containing it, and the process is not "
10324 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10325 "I<newpath> is an existing file and the directory containing it has the "
10326 "sticky bit set and the process's effective user ID is neither the user ID of "
10327 "the file to be replaced nor that of the directory containing it, and the "
10328 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10329 "capability); or the file system containing I<pathname> does not support "
10330 "renaming of the type requested."
10331 msgstr ""
10332 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10333 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10334 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10335 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10336 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10337 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10338 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10339 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10340 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10341 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていな"
10342 "い。"
10343
10344 #. type: Plain text
10345 #: build/C/man2/rename.2:229
10346 msgid ""
10347 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10348 "permits a file system to be mounted at multiple points, but B<rename>()  "
10349 "does not work across different mount points, even if the same file system is "
10350 "mounted on both.)"
10351 msgstr ""
10352 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しな"
10353 "い。 (Linux は 1 つのファイルシステムを複数のマウント位置に マウントするこ"
10354 "とを許可している。 しかし B<rename>()  は、たとえ同じファイルシステムであっ"
10355 "ても、 別々のマウント位置を跨いでは動作しない。)"
10356
10357 #. type: Plain text
10358 #: build/C/man2/rename.2:231
10359 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10360 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10361
10362 #. type: Plain text
10363 #: build/C/man2/rename.2:242
10364 msgid ""
10365 "On NFS file systems, you can not assume that if the operation failed the "
10366 "file was not renamed.  If the server does the rename operation and then "
10367 "crashes, the retransmitted RPC which will be processed when the server is up "
10368 "again causes a failure.  The application is expected to deal with this.  See "
10369 "B<link>(2)  for a similar problem."
10370 msgstr ""
10371 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更"
10372 "できなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10373 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10374 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10375 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10376
10377 #. type: Plain text
10378 #: build/C/man2/rename.2:250
10379 msgid ""
10380 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10381 "(2), B<path_resolution>(7), B<symlink>(7)"
10382 msgstr ""
10383 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10384 "(2), B<path_resolution>(7), B<symlink>(7)"
10385
10386 #. type: TH
10387 #: build/C/man2/rmdir.2:30
10388 #, no-wrap
10389 msgid "RMDIR"
10390 msgstr "RMDIR"
10391
10392 #. type: TH
10393 #: build/C/man2/rmdir.2:30
10394 #, no-wrap
10395 msgid "2008-05-08"
10396 msgstr "2008-05-08"
10397
10398 #. type: Plain text
10399 #: build/C/man2/rmdir.2:33
10400 msgid "rmdir - delete a directory"
10401 msgstr "rmdir - ディレクトリを削除する"
10402
10403 #. type: Plain text
10404 #: build/C/man2/rmdir.2:37
10405 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10406 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10407
10408 #. type: Plain text
10409 #: build/C/man2/rmdir.2:40
10410 msgid "B<rmdir>()  deletes a directory, which must be empty."
10411 msgstr ""
10412 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10413 "ない。"
10414
10415 #. type: Plain text
10416 #: build/C/man2/rmdir.2:55
10417 msgid ""
10418 "Write access to the directory containing I<pathname> was not allowed, or one "
10419 "of the directories in the path prefix of I<pathname> did not allow search "
10420 "permission.  (See also B<path_resolution>(7)."
10421 msgstr ""
10422 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10423 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10424 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10425 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10426 "と)"
10427
10428 #. type: Plain text
10429 #: build/C/man2/rmdir.2:64
10430 msgid ""
10431 "I<pathname> is currently in use by the system or some process that prevents "
10432 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10433 "point or is the root directory of the calling process."
10434 msgstr ""
10435 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10436 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10437 "たプロセスのルートディレクトリであることを意味する。"
10438
10439 #. type: Plain text
10440 #: build/C/man2/rmdir.2:73
10441 msgid "I<pathname> has I<.> as last component."
10442 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10443
10444 #. type: Plain text
10445 #: build/C/man2/rmdir.2:77
10446 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10447 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10448
10449 #. type: Plain text
10450 #: build/C/man2/rmdir.2:85
10451 msgid ""
10452 "A directory component in I<pathname> does not exist or is a dangling "
10453 "symbolic link."
10454 msgstr ""
10455 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10456 "リックリンク (symbolic link) である。"
10457
10458 #. type: Plain text
10459 #: build/C/man2/rmdir.2:94
10460 msgid ""
10461 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10462 "fact, a directory."
10463 msgstr ""
10464 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10465 "クトリでない。"
10466
10467 #. type: TP
10468 #: build/C/man2/rmdir.2:94
10469 #, no-wrap
10470 msgid "B<ENOTEMPTY>"
10471 msgstr "B<ENOTEMPTY>"
10472
10473 #. type: Plain text
10474 #: build/C/man2/rmdir.2:107
10475 msgid ""
10476 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10477 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10478 "condition."
10479 msgstr ""
10480 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
10481 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
10482 "で B<EEXIST> を返すことを認めている。"
10483
10484 #. type: Plain text
10485 #: build/C/man2/rmdir.2:118
10486 msgid ""
10487 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
10488 "and the process's effective user ID is neither the user ID of the file to be "
10489 "deleted nor that of the directory containing it, and the process is not "
10490 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
10491 msgstr ""
10492 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
10493 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
10494 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
10495 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
10496
10497 #. type: Plain text
10498 #: build/C/man2/rmdir.2:123
10499 msgid ""
10500 "The file system containing I<pathname> does not support the removal of "
10501 "directories."
10502 msgstr ""
10503 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートして"
10504 "いない。"
10505
10506 #. type: Plain text
10507 #: build/C/man2/rmdir.2:127
10508 msgid "I<pathname> refers to a directory on a read-only file system."
10509 msgstr ""
10510 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照してい"
10511 "る。"
10512
10513 #. type: Plain text
10514 #: build/C/man2/rmdir.2:132
10515 msgid ""
10516 "Infelicities in the protocol underlying NFS can cause the unexpected "
10517 "disappearance of directories which are still being used."
10518 msgstr ""
10519 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
10520 "する現象が引き起こされることがある。"
10521
10522 #. type: Plain text
10523 #: build/C/man2/rmdir.2:140
10524 msgid ""
10525 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10526 "B<unlink>(2), B<unlinkat>(2)"
10527 msgstr ""
10528 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10529 "B<unlink>(2), B<unlinkat>(2)"
10530
10531 #. type: TH
10532 #: build/C/man3/scanf.3:50
10533 #, no-wrap
10534 msgid "SCANF"
10535 msgstr "SCANF"
10536
10537 #. type: Plain text
10538 #: build/C/man3/scanf.3:53
10539 msgid ""
10540 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
10541 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
10542
10543 #. type: Plain text
10544 #: build/C/man3/scanf.3:60
10545 #, no-wrap
10546 msgid ""
10547 "B<int scanf(const char *>I<format>B<, ...);>\n"
10548 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10549 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10550 msgstr ""
10551 "B<int scanf(const char *>I<format>B<, ...);>\n"
10552 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10553 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10554
10555 #. type: Plain text
10556 #: build/C/man3/scanf.3:62
10557 #, no-wrap
10558 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
10559 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
10560
10561 #. type: Plain text
10562 #: build/C/man3/scanf.3:66
10563 #, no-wrap
10564 msgid ""
10565 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10566 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10567 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10568 msgstr ""
10569 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10570 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10571 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10572
10573 #. type: Plain text
10574 #: build/C/man3/scanf.3:77
10575 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10576 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10577
10578 #. type: Plain text
10579 #: build/C/man3/scanf.3:80
10580 msgid ""
10581 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
10582 "200112L;"
10583 msgstr ""
10584 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
10585 "200112L;"
10586
10587 #. type: Plain text
10588 #: build/C/man3/scanf.3:102
10589 msgid ""
10590 "The B<scanf>()  family of functions scans input according to I<format> as "
10591 "described below.  This format may contain I<conversion specifications>; the "
10592 "results from such conversions, if any, are stored in the locations pointed "
10593 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
10594 "argument must be of a type that is appropriate for the value returned by the "
10595 "corresponding conversion specification."
10596 msgstr ""
10597 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
10598 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
10599 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
10600 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
10601 "は、対応する変換指定が返す値に 適合していなければならない。"
10602
10603 #. type: Plain text
10604 #: build/C/man3/scanf.3:113
10605 msgid ""
10606 "If the number of conversion specifications in I<format> exceeds the number "
10607 "of I<pointer> arguments, the results are undefined.  If the number of "
10608 "I<pointer> arguments exceeds the number of conversion specifications, then "
10609 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
10610 msgstr ""
10611 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
10612 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
10613 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
10614
10615 #. type: Plain text
10616 #: build/C/man3/scanf.3:125
10617 msgid ""
10618 "The B<scanf>()  function reads input from the standard input stream "
10619 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
10620 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
10621 msgstr ""
10622 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
10623 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
10624 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
10625
10626 #. type: Plain text
10627 #: build/C/man3/scanf.3:143
10628 msgid ""
10629 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
10630 "from the stream pointer I<stream> using a variable argument list of pointers "
10631 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
10632 "from the standard input and the B<vsscanf>()  function scans it from a "
10633 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
10634 "functions respectively."
10635 msgstr ""
10636 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
10637 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
10638 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
10639 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
10640 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
10641
10642 #. type: Plain text
10643 #: build/C/man3/scanf.3:157
10644 msgid ""
10645 "The I<format> string consists of a sequence of I<directives> which describe "
10646 "how to process the sequence of input characters.  If processing of a "
10647 "directive fails, no further input is read, and B<scanf>()  returns.  A "
10648 "\"failure\" can be either of the following: I<input failure>, meaning that "
10649 "input characters were unavailable, or I<matching failure>, meaning that the "
10650 "input was inappropriate (see below)."
10651 msgstr ""
10652 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
10653 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
10654 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
10655 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
10656 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
10657 "であったこと (下記参照) を意味する。"
10658
10659 #. type: Plain text
10660 #: build/C/man3/scanf.3:159
10661 msgid "A directive is one of the following:"
10662 msgstr "命令は以下のいずれかである:"
10663
10664 #. type: TP
10665 #: build/C/man3/scanf.3:159 build/C/man3/scanf.3:165 build/C/man3/scanf.3:169
10666 #: build/C/man3/scanf.3:188 build/C/man3/scanf.3:199 build/C/man3/scanf.3:217
10667 #: build/C/man3/scanf.3:229 build/C/man3/scanf.3:243
10668 #, no-wrap
10669 msgid "\\(bu"
10670 msgstr "\\(bu"
10671
10672 #. type: Plain text
10673 #: build/C/man3/scanf.3:165
10674 msgid ""
10675 "A sequence of white-space characters (space, tab, newline, etc.; see "
10676 "B<isspace>(3)).  This directive matches any amount of white space, including "
10677 "none, in the input."
10678 msgstr ""
10679 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
10680 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
10681 "致する)。"
10682
10683 #. type: Plain text
10684 #: build/C/man3/scanf.3:169
10685 msgid ""
10686 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
10687 "This character must exactly match the next character of input."
10688 msgstr ""
10689 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
10690 "の次の文字に正確に一致しなければならない。"
10691
10692 #. type: Plain text
10693 #: build/C/man3/scanf.3:180
10694 msgid ""
10695 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
10696 "character.  A sequence of characters from the input is converted according "
10697 "to this specification, and the result is placed in the corresponding "
10698 "I<pointer> argument.  If the next item of input does not match the "
10699 "conversion specification, the conversion fails\\(emthis is a I<matching "
10700 "failure>."
10701 msgstr ""
10702 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
10703 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
10704 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
10705 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
10706
10707 #. type: Plain text
10708 #: build/C/man3/scanf.3:188
10709 msgid ""
10710 "Each I<conversion specification> in I<format> begins with either the "
10711 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
10712 "for the distinction) followed by:"
10713 msgstr ""
10714 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
10715 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
10716
10717 #. type: Plain text
10718 #: build/C/man3/scanf.3:199
10719 msgid ""
10720 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
10721 "input as directed by the conversion specification, but discards the input.  "
10722 "No corresponding I<pointer> argument is required, and this specification is "
10723 "not included in the count of successful assignments returned by B<scanf>()."
10724 msgstr ""
10725 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
10726 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
10727 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
10728
10729 #. type: Plain text
10730 #: build/C/man3/scanf.3:217
10731 msgid ""
10732 "An optional \\(aqa\\(aq character.  This is used with string conversions, "
10733 "and relieves the caller of the need to allocate a corresponding buffer to "
10734 "hold the input: instead, B<scanf>()  allocates a buffer of sufficient size, "
10735 "and assigns the address of this buffer to the corresponding I<pointer> "
10736 "argument, which should be a pointer to a I<char *> variable (this variable "
10737 "does not need to be initialized before the call).  The caller should "
10738 "subsequently B<free>(3)  this buffer when it is no longer required.  This is "
10739 "a GNU extension; C99 employs the \\(aqa\\(aq character as a conversion "
10740 "specifier (and it can also be used as such in the GNU implementation)."
10741 msgstr ""
10742 "文字 \\(aqa\\(aq (省略可能)。これは文字列変換とともに使用され、これを使うと "
10743 "呼び出し元が入力を保持する対応するバッファを確保する必要がなくなる。 代わり"
10744 "に B<scanf>()  が必要な大きさのバッファを確保し、このバッファのアドレスを 対"
10745 "応する I<pointer> 引き数に代入する。 I<pointer> 引き数は I<char *> 型の変数へ"
10746 "のポインタでなければならない (変数自体は呼び出し前に初期化されている必要はな"
10747 "い)。 呼び出し元は、不要になった時点で、このバッファを B<free>(3)  すべきであ"
10748 "る。この機能は GNU による拡張である。 C99 は \\(aqa\\(aq 文字を変換指定として"
10749 "使用している (こちらも GNU の実装と同じように使用することができる)。"
10750
10751 #. type: Plain text
10752 #: build/C/man3/scanf.3:229
10753 msgid ""
10754 "An optional decimal integer which specifies the I<maximum field width>.  "
10755 "Reading of characters stops either when this maximum is reached or when a "
10756 "nonmatching character is found, whichever happens first.  Most conversions "
10757 "discard initial white space characters (the exceptions are noted below), and "
10758 "these discarded characters don't count toward the maximum field width.  "
10759 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
10760 "mark the end of the input; the maximum field width does not include this "
10761 "terminator."
10762 msgstr ""
10763 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
10764 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
10765 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
10766 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
10767 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
10768 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
10769
10770 #. type: Plain text
10771 #: build/C/man3/scanf.3:243
10772 msgid ""
10773 "An optional I<type modifier character>.  For example, the B<l> type modifier "
10774 "is used with integer conversions such as B<%d> to specify that the "
10775 "corresponding I<pointer> argument refers to a I<long int> rather than a "
10776 "pointer to an I<int>."
10777 msgstr ""
10778 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
10779 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
10780 "I<int> ではなく I<long int> を参照していることを指定できる。"
10781
10782 #. type: Plain text
10783 #: build/C/man3/scanf.3:248
10784 msgid ""
10785 "A I<conversion specifier> that specifies the type of input conversion to be "
10786 "performed."
10787 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
10788
10789 #. type: Plain text
10790 #: build/C/man3/scanf.3:277
10791 msgid ""
10792 "The conversion specifications in I<format> are of two forms, either "
10793 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
10794 "forms should not be mixed in the same I<format> string, except that a string "
10795 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
10796 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
10797 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
10798 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
10799 "specifies that the converted input should be placed in the location referred "
10800 "to by the I<n>-th I<pointer> argument following I<format>."
10801 msgstr ""
10802 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
10803 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
10804 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
10805 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
10806 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
10807 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
10808 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
10809 "I<pointer> 引き数が参照する場所に格納することを指定する。"
10810
10811 #. type: SS
10812 #: build/C/man3/scanf.3:277
10813 #, no-wrap
10814 msgid "Conversions"
10815 msgstr "変換"
10816
10817 #. type: Plain text
10818 #: build/C/man3/scanf.3:281
10819 msgid ""
10820 "The following I<type modifier characters> can appear in a conversion "
10821 "specification:"
10822 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
10823
10824 #. type: Plain text
10825 #: build/C/man3/scanf.3:291
10826 msgid ""
10827 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
10828 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
10829 "I<unsigned short int> (rather than I<int>)."
10830 msgstr ""
10831 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
10832 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
10833 "あることを示す。"
10834
10835 #. type: Plain text
10836 #: build/C/man3/scanf.3:299
10837 msgid ""
10838 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
10839 "I<unsigned char>."
10840 msgstr ""
10841 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
10842 "タであることを示す。"
10843
10844 #. type: Plain text
10845 #: build/C/man3/scanf.3:308
10846 msgid ""
10847 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
10848 "I<uintmax_t>.  This modifier was introduced in C99."
10849 msgstr ""
10850 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
10851 "ることを示す。 この修飾子は C99 で導入された。"
10852
10853 #.  This use of l was introduced in Amendment 1 to ISO C90.
10854 #. type: Plain text
10855 #: build/C/man3/scanf.3:335
10856 msgid ""
10857 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
10858 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
10859 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
10860 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
10861 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
10862 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
10863 "as a pointer to a wide character or wide-character string respectively."
10864 msgstr ""
10865 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
10866 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
10867 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
10868 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
10869 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
10870 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
10871 "ンタであると みなされる。"
10872
10873 #.  MTK, Jul 05: The following is no longer true for modern
10874 #.  ANSI C (i.e., C99):
10875 #.  (Note that long long is not an
10876 #.  ANSI C
10877 #.  type. Any program using this will not be portable to all
10878 #.  architectures).
10879 #. type: Plain text
10880 #: build/C/man3/scanf.3:351
10881 msgid ""
10882 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
10883 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
10884 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
10885 msgstr ""
10886 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
10887 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
10888 "I<long long> へのポインタであることのいずれかであることを示す。"
10889
10890 #. type: Plain text
10891 #: build/C/man3/scanf.3:356
10892 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
10893 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
10894
10895 #. type: Plain text
10896 #: build/C/man3/scanf.3:363
10897 msgid ""
10898 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
10899 "modifier was introduced in C99."
10900 msgstr ""
10901 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
10902 "この修飾子は C99 で導入された。"
10903
10904 #. type: Plain text
10905 #: build/C/man3/scanf.3:370
10906 msgid ""
10907 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
10908 "modifier was introduced in C99."
10909 msgstr ""
10910 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
10911 "修飾子は C99 で導入された。"
10912
10913 #. type: Plain text
10914 #: build/C/man3/scanf.3:374
10915 msgid "The following I<conversion specifiers> are available:"
10916 msgstr "以下の I<「変換指定子」> が利用可能である。"
10917
10918 #. type: Plain text
10919 #: build/C/man3/scanf.3:383
10920 msgid ""
10921 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
10922 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
10923 "initial white space characters are discarded), and assignment does not occur."
10924 msgstr ""
10925 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
10926 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
10927 "る)、 変数への代入は生じない。"
10928
10929 #. type: TP
10930 #: build/C/man3/scanf.3:383
10931 #, no-wrap
10932 msgid "B<d>"
10933 msgstr "B<d>"
10934
10935 #. type: Plain text
10936 #: build/C/man3/scanf.3:388
10937 msgid ""
10938 "Matches an optionally signed decimal integer; the next pointer must be a "
10939 "pointer to I<int>."
10940 msgstr ""
10941 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
10942 "ばならない。"
10943
10944 #. type: TP
10945 #: build/C/man3/scanf.3:388
10946 #, no-wrap
10947 msgid "B<D>"
10948 msgstr "B<D>"
10949
10950 #. type: Plain text
10951 #: build/C/man3/scanf.3:397
10952 msgid ""
10953 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
10954 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
10955 "causing old programs to fail mysteriously.)"
10956 msgstr ""
10957 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
10958 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
10959 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
10960
10961 #. type: TP
10962 #: build/C/man3/scanf.3:397
10963 #, no-wrap
10964 msgid "B<i>"
10965 msgstr "B<i>"
10966
10967 #. type: Plain text
10968 #: build/C/man3/scanf.3:409
10969 msgid ""
10970 "Matches an optionally signed integer; the next pointer must be a pointer to "
10971 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
10972 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
10973 "that correspond to the base are used."
10974 msgstr ""
10975 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
10976 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
10977 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
10978 "される文字は、これらの基数に対応しているものだけである。"
10979
10980 #. type: TP
10981 #: build/C/man3/scanf.3:409
10982 #, no-wrap
10983 msgid "B<o>"
10984 msgstr "B<o>"
10985
10986 #. type: Plain text
10987 #: build/C/man3/scanf.3:413
10988 msgid ""
10989 "Matches an unsigned octal integer; the next pointer must be a pointer to "
10990 "I<unsigned int>."
10991 msgstr ""
10992 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
10993 "らない。"
10994
10995 #. type: TP
10996 #: build/C/man3/scanf.3:413
10997 #, no-wrap
10998 msgid "B<u>"
10999 msgstr "B<u>"
11000
11001 #. type: Plain text
11002 #: build/C/man3/scanf.3:418
11003 msgid ""
11004 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11005 "I<unsigned int>."
11006 msgstr ""
11007 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11008 "でなければならない。"
11009
11010 #. type: Plain text
11011 #: build/C/man3/scanf.3:423
11012 msgid ""
11013 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11014 "to I<unsigned int>."
11015 msgstr ""
11016 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11017 "タでなければならない。"
11018
11019 #. type: TP
11020 #: build/C/man3/scanf.3:423
11021 #, no-wrap
11022 msgid "B<X>"
11023 msgstr "B<X>"
11024
11025 #. type: Plain text
11026 #: build/C/man3/scanf.3:427
11027 msgid "Equivalent to B<x>."
11028 msgstr "B<x> と同一である。"
11029
11030 #. type: TP
11031 #: build/C/man3/scanf.3:427
11032 #, no-wrap
11033 msgid "B<f>"
11034 msgstr "B<f>"
11035
11036 #. type: Plain text
11037 #: build/C/man3/scanf.3:432
11038 msgid ""
11039 "Matches an optionally signed floating-point number; the next pointer must be "
11040 "a pointer to I<float>."
11041 msgstr ""
11042 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11043 "ればならない。"
11044
11045 #. type: TP
11046 #: build/C/man3/scanf.3:432
11047 #, no-wrap
11048 msgid "B<e>"
11049 msgstr "B<e>"
11050
11051 #. type: Plain text
11052 #: build/C/man3/scanf.3:436 build/C/man3/scanf.3:440 build/C/man3/scanf.3:444
11053 msgid "Equivalent to B<f>."
11054 msgstr "B<f> と同一である。"
11055
11056 #. type: TP
11057 #: build/C/man3/scanf.3:436
11058 #, no-wrap
11059 msgid "B<g>"
11060 msgstr "B<g>"
11061
11062 #. type: TP
11063 #: build/C/man3/scanf.3:440
11064 #, no-wrap
11065 msgid "B<E>"
11066 msgstr "B<E>"
11067
11068 #. type: Plain text
11069 #: build/C/man3/scanf.3:448
11070 msgid "(C99) Equivalent to B<f>."
11071 msgstr "(C99)  B<f> と同一である。"
11072
11073 #. type: Plain text
11074 #: build/C/man3/scanf.3:456
11075 msgid ""
11076 "Matches a sequence of non-white-space characters; the next pointer must be a "
11077 "pointer to character array that is long enough to hold the input sequence "
11078 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11079 "automatically.  The input string stops at white space or at the maximum "
11080 "field width, whichever occurs first."
11081 msgstr ""
11082 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11083 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11084 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11085 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11086 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11087
11088 #. type: Plain text
11089 #: build/C/man3/scanf.3:467
11090 msgid ""
11091 "Matches a sequence of characters whose length is specified by the I<maximum "
11092 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11093 "there must be enough room for all the characters (no terminating null byte "
11094 "is added).  The usual skip of leading white space is suppressed.  To skip "
11095 "white space first, use an explicit space in the format."
11096 msgstr ""
11097 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11098 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11099 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11100 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11101 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11102
11103 #. type: TP
11104 #: build/C/man3/scanf.3:467
11105 #, no-wrap
11106 msgid "B<\\&[>"
11107 msgstr "B<\\&[>"
11108
11109 #. type: Plain text
11110 #: build/C/man3/scanf.3:500
11111 msgid ""
11112 "Matches a nonempty sequence of characters from the specified set of accepted "
11113 "characters; the next pointer must be a pointer to I<char>, and there must be "
11114 "enough room for all the characters in the string, plus a terminating null "
11115 "byte.  The usual skip of leading white space is suppressed.  The string is "
11116 "to be made up of characters in (or not in) a particular set; the set is "
11117 "defined by the characters between the open bracket B<[> character and a "
11118 "close bracket B<]> character.  The set I<excludes> those characters if the "
11119 "first character after the open bracket is a circumflex (B<^>).  To include a "
11120 "close bracket in the set, make it the first character after the open bracket "
11121 "or the circumflex; any other position will end the set.  The hyphen "
11122 "character B<-> is also special; when placed between two other characters, it "
11123 "adds all intervening characters to the set.  To include a hyphen, make it "
11124 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11125 "> means the set \"everything except close bracket, zero through nine, and "
11126 "hyphen\".  The string ends with the appearance of a character not in the "
11127 "(or, with a circumflex, in) set or when the field width runs out."
11128 msgstr ""
11129 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11130 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11131 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11132 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11133 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11134 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11135 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11136 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11137 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11138 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11139 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11140 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11141 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11142 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11143 "文字の 出現または確保された領域が使い切られた時に終了する。"
11144
11145 #. type: Plain text
11146 #: build/C/man3/scanf.3:508
11147 msgid ""
11148 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11149 "pointer must be a pointer to a pointer to I<void>."
11150 msgstr ""
11151 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11152 "タは I<void> へのポインタへのポインタでなければならない。"
11153
11154 #. type: Plain text
11155 #: build/C/man3/scanf.3:528
11156 msgid ""
11157 "Nothing is expected; instead, the number of characters consumed thus far "
11158 "from the input is stored through the next pointer, which must be a pointer "
11159 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11160 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11161 "of a B<%n> directive does not increment the assignment count returned at the "
11162 "completion of execution\" but the Corrigendum seems to contradict this.  "
11163 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11164 "conversions on the return value."
11165 msgstr ""
11166 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11167 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11168 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11169 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11170 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11171 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11172 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11173
11174 #. type: Plain text
11175 #: build/C/man3/scanf.3:533
11176 msgid ""
11177 "These functions return the number of input items successfully matched and "
11178 "assigned, which can be fewer than provided for, or even zero in the event of "
11179 "an early matching failure."
11180 msgstr ""
11181 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11182 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11183 "ることもある。"
11184
11185 #. type: Plain text
11186 #: build/C/man3/scanf.3:545
11187 msgid ""
11188 "The value B<EOF> is returned if the end of input is reached before either "
11189 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11190 "also returned if a read error occurs, in which case the error indicator for "
11191 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11192 "error."
11193 msgstr ""
11194 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11195 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11196 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11197 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11198
11199 #. type: Plain text
11200 #: build/C/man3/scanf.3:551
11201 msgid ""
11202 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11203 "operation would block."
11204 msgstr ""
11205 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11206 "込み操作は停止 (block) することになる。"
11207
11208 #. type: Plain text
11209 #: build/C/man3/scanf.3:556
11210 msgid ""
11211 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11212 msgstr ""
11213 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11214 "ンされていない。"
11215
11216 #. type: Plain text
11217 #: build/C/man3/scanf.3:559
11218 msgid "Input byte sequence does not form a valid character."
11219 msgstr "入力されたバイト列が有効な文字を構成していない。"
11220
11221 #. type: Plain text
11222 #: build/C/man3/scanf.3:563
11223 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11224 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11225
11226 #. type: Plain text
11227 #: build/C/man3/scanf.3:568
11228 msgid "Not enough arguments; or I<format> is NULL."
11229 msgstr "引き数が十分でない。または I<format> が NULL である。"
11230
11231 #. type: Plain text
11232 #: build/C/man3/scanf.3:571
11233 msgid "Out of memory."
11234 msgstr "メモリ不足。"
11235
11236 #. type: TP
11237 #: build/C/man3/scanf.3:571
11238 #, no-wrap
11239 msgid "B<ERANGE>"
11240 msgstr "B<ERANGE>"
11241
11242 #. type: Plain text
11243 #: build/C/man3/scanf.3:575
11244 msgid ""
11245 "The result of an integer conversion would exceed the size that can be stored "
11246 "in the corresponding integer type."
11247 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11248
11249 #. type: Plain text
11250 #: build/C/man3/scanf.3:585
11251 msgid ""
11252 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11253 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11254 msgstr ""
11255 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11256 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11257
11258 #. type: Plain text
11259 #: build/C/man3/scanf.3:595
11260 msgid ""
11261 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11262 "the usage of B<L> in integer conversions is the GNU notation."
11263 msgstr ""
11264 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11265 "B<ll> または B<L> の使用は GNU での拡張である。"
11266
11267 #. type: Plain text
11268 #: build/C/man3/scanf.3:606
11269 msgid ""
11270 "The Linux version of these functions is based on the I<GNU> I<libio> "
11271 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11272 "(glibc-1.08)> for a more concise description."
11273 msgstr ""
11274 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11275 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11276
11277 #.  This feature seems to be present at least as far back as glibc 2.0.
11278 #. type: Plain text
11279 #: build/C/man3/scanf.3:624
11280 msgid ""
11281 "The GNU C library supports a nonstandard extension that causes the library "
11282 "to dynamically allocate a string of sufficient size for input strings for "
11283 "the B<%s> and B<%a[>I<range>B<]> conversion specifiers.  To make use of this "
11284 "feature, specify B<a> as a length modifier (thus B<%as> or B<%a[>I<range>B<]"
11285 ">).  The caller must B<free>(3)  the returned string, as in the following "
11286 "example:"
11287 msgstr ""
11288 "GNU C ライブラリ (glibc) では非標準のオプションをサポートしており、 このオプ"
11289 "ションを使うと変換指定子 B<%s> や B<%a[>I<range>B<]> への入力文字列に対して十"
11290 "分な大きさの文字列をライブラリが動的に確保する ようになる。 この機能を使用す"
11291 "るには、長さ修飾子として B<a> を指定する (したがって、全体としては B<%as> や "
11292 "B<%a[>I<range>B<]> となる)。 以下の例にあるように、呼び出し側は返された文字列"
11293 "を B<free>(3)  しなければならない。"
11294
11295 #. type: Plain text
11296 #: build/C/man3/scanf.3:629
11297 #, no-wrap
11298 msgid ""
11299 "char *p;\n"
11300 "int n;\n"
11301 msgstr ""
11302 "char *p;\n"
11303 "int n;\n"
11304
11305 #. type: Plain text
11306 #: build/C/man3/scanf.3:640
11307 #, no-wrap
11308 msgid ""
11309 "errno = 0;\n"
11310 "n = scanf(\"%a[a-z]\", &p);\n"
11311 "if (n == 1) {\n"
11312 "    printf(\"read: %s\\en\", p);\n"
11313 "    free(p);\n"
11314 "} else if (errno != 0) {\n"
11315 "    perror(\"scanf\");\n"
11316 "} else {\n"
11317 "    fprintf(stderr, \"No matching characters\\en\");\n"
11318 "}\n"
11319 msgstr ""
11320 "errno = 0;\n"
11321 "n = scanf(\"%a[a-z]\", &p);\n"
11322 "if (n == 1) {\n"
11323 "    printf(\"read: %s\\en\", p);\n"
11324 "    free(p);\n"
11325 "} else if (errno != 0) {\n"
11326 "    perror(\"scanf\");\n"
11327 "} else {\n"
11328 "    fprintf(stderr, \"No matching characters\\en\");\n"
11329 "}\n"
11330
11331 #. type: Plain text
11332 #: build/C/man3/scanf.3:648
11333 msgid ""
11334 "As shown in the above example, it is only necessary to call B<free>(3)  if "
11335 "the B<scanf>()  call successfully read a string."
11336 msgstr ""
11337 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11338 "B<free>(3)  を呼び出す必要がある。"
11339
11340 #. type: Plain text
11341 #: build/C/man3/scanf.3:660
11342 msgid ""
11343 "The B<a> modifier is not available if the program is compiled with I<gcc -"
11344 "std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also "
11345 "specified), in which case the B<a> is interpreted as a specifier for "
11346 "floating-point numbers (see above)."
11347 msgstr ""
11348 "I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプログラムでは "
11349 "(B<_GNU_SOURCE> も同時に指定していない場合)、 B<a> 修飾子は利用できない。 上"
11350 "記の場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11351
11352 #. type: Plain text
11353 #: build/C/man3/scanf.3:669
11354 msgid ""
11355 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11356 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11357 "advantages:"
11358 msgstr ""
11359 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11360 "ている。 B<m> 修飾子は以下の利点がある。"
11361
11362 #. type: Plain text
11363 #: build/C/man3/scanf.3:674
11364 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11365 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11366
11367 #. type: Plain text
11368 #: build/C/man3/scanf.3:680
11369 msgid ""
11370 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11371 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11372 msgstr ""
11373 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11374 "std=c99> などの影響も避けられる)。"
11375
11376 #. type: Plain text
11377 #: build/C/man3/scanf.3:682
11378 msgid "It is specified in the upcoming revision of the POSIX.1 standard."
11379 msgstr "POSIX.1 標準の次の改訂版で規定される。"
11380
11381 #. type: Plain text
11382 #: build/C/man3/scanf.3:695
11383 msgid ""
11384 "All functions are fully C89 conformant, but provide the additional "
11385 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11386 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11387 "the behavior of specifiers defined in C89."
11388 msgstr ""
11389 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11390 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11391 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11392 "れない。"
11393
11394 #. type: Plain text
11395 #: build/C/man3/scanf.3:711
11396 msgid ""
11397 "Some combinations of the type modifiers and conversion specifiers defined by "
11398 "ANSI C do not make sense (e.g.  B<%Ld>).  While they may have a well-defined "
11399 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11400 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11401 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11402 "B<u>, B<x>, and B<X> conversions or B<ll>."
11403 msgstr ""
11404 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味をなさないも"
11405 "のがある (例えば、 B<%Ld>)。 これらが指定された場合、 Linux 上でははっきりと"
11406 "定義された振る舞いをするかもしれないが、 他のアーキテクチャでも同様になってい"
11407 "るとは限らない。 それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子"
11408 "を使用した方が良い。 すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や "
11409 "B<ll> と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11410
11411 #. type: Plain text
11412 #: build/C/man3/scanf.3:717
11413 msgid ""
11414 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11415 "conversions equivalently to B<L>."
11416 msgstr ""
11417 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11418 "動小数の変換に使用される。"
11419
11420 #. type: Plain text
11421 #: build/C/man3/scanf.3:723
11422 msgid ""
11423 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11424 "B<strtoul>(3)"
11425 msgstr ""
11426 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11427 "B<strtoul>(3),"
11428
11429 #. type: TH
11430 #: build/C/man3/setbuf.3:46
11431 #, no-wrap
11432 msgid "SETBUF"
11433 msgstr "SETBUF"
11434
11435 #. type: TH
11436 #: build/C/man3/setbuf.3:46
11437 #, no-wrap
11438 msgid "2008-06-26"
11439 msgstr "2008-06-26"
11440
11441 #. type: Plain text
11442 #: build/C/man3/setbuf.3:49
11443 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11444 msgstr ""
11445 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11446
11447 #. type: Plain text
11448 #: build/C/man3/setbuf.3:54
11449 #, no-wrap
11450 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11451 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11452
11453 #. type: Plain text
11454 #: build/C/man3/setbuf.3:56
11455 #, no-wrap
11456 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11457 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11458
11459 #. type: Plain text
11460 #: build/C/man3/setbuf.3:58
11461 #, no-wrap
11462 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11463 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11464
11465 #. type: Plain text
11466 #: build/C/man3/setbuf.3:61
11467 #, no-wrap
11468 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11469 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11470
11471 #. type: Plain text
11472 #: build/C/man3/setbuf.3:71
11473 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11474 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11475
11476 #. type: Plain text
11477 #: build/C/man3/setbuf.3:94
11478 msgid ""
11479 "The three types of buffering available are unbuffered, block buffered, and "
11480 "line buffered.  When an output stream is unbuffered, information appears on "
11481 "the destination file or terminal as soon as written; when it is block "
11482 "buffered many characters are saved up and written as a block; when it is "
11483 "line buffered characters are saved up until a newline is output or input is "
11484 "read from any stream attached to a terminal device (typically I<stdin>).  "
11485 "The function B<fflush>(3)  may be used to force the block out early.  (See "
11486 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
11487 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
11488 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
11489 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
11490 "by default."
11491 msgstr ""
11492 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
11493 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
11494 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
11495 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
11496 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
11497 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
11498 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
11499 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
11500 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
11501 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
11502 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
11503 "unbuffered である。"
11504
11505 #. type: Plain text
11506 #: build/C/man3/setbuf.3:101
11507 msgid ""
11508 "The B<setvbuf>()  function may be used on any open stream to change its "
11509 "buffer.  The I<mode> argument must be one of the following three macros:"
11510 msgstr ""
11511 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
11512 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
11513
11514 #. type: TP
11515 #: build/C/man3/setbuf.3:102
11516 #, no-wrap
11517 msgid "B<_IONBF>"
11518 msgstr "B<_IONBF>"
11519
11520 #. type: Plain text
11521 #: build/C/man3/setbuf.3:105
11522 msgid "unbuffered"
11523 msgstr "unbuffered"
11524
11525 #. type: TP
11526 #: build/C/man3/setbuf.3:105
11527 #, no-wrap
11528 msgid "B<_IOLBF>"
11529 msgstr "B<_IOLBF>"
11530
11531 #. type: Plain text
11532 #: build/C/man3/setbuf.3:108
11533 msgid "line buffered"
11534 msgstr "line buffered"
11535
11536 #. type: TP
11537 #: build/C/man3/setbuf.3:108
11538 #, no-wrap
11539 msgid "B<_IOFBF>"
11540 msgstr "B<_IOFBF>"
11541
11542 #. type: Plain text
11543 #: build/C/man3/setbuf.3:111
11544 msgid "fully buffered"
11545 msgstr "fully buffered"
11546
11547 #. type: Plain text
11548 #: build/C/man3/setbuf.3:127
11549 msgid ""
11550 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
11551 "least I<size> bytes long; this buffer will be used instead of the current "
11552 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
11553 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
11554 "()  function may only be used after opening a stream and before any other "
11555 "operations have been performed on it."
11556 msgstr ""
11557 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
11558 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
11559 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
11560 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
11561 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
11562
11563 #. type: Plain text
11564 #: build/C/man3/setbuf.3:133
11565 msgid ""
11566 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
11567 "().  The B<setbuf>()  function is exactly equivalent to the call"
11568 msgstr ""
11569 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
11570 "B<setbuf>()  関数は、"
11571
11572 #. type: Plain text
11573 #: build/C/man3/setbuf.3:136
11574 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
11575 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
11576
11577 #. type: Plain text
11578 #: build/C/man3/setbuf.3:146
11579 msgid ""
11580 "The B<setbuffer>()  function is the same, except that the size of the buffer "
11581 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
11582 "The B<setlinebuf>()  function is exactly equivalent to the call:"
11583 msgstr ""
11584 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
11585 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
11586 "は以下と同じである。"
11587
11588 #. type: Plain text
11589 #: build/C/man3/setbuf.3:149
11590 msgid "setvbuf(stream, (char *) NULL, _IOLBF, 0);"
11591 msgstr "setvbuf(stream, (char *) NULL, _IOLBF, 0);"
11592
11593 #. type: Plain text
11594 #: build/C/man3/setbuf.3:160
11595 msgid ""
11596 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
11597 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
11598 "I<errno> on failure."
11599 msgstr ""
11600 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
11601 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
11602 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
11603
11604 #. type: Plain text
11605 #: build/C/man3/setbuf.3:162
11606 msgid "The other functions do not return a value."
11607 msgstr "その他の関数は値を返さない。"
11608
11609 #. type: Plain text
11610 #: build/C/man3/setbuf.3:168
11611 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
11612 msgstr ""
11613 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
11614
11615 #. type: Plain text
11616 #: build/C/man3/setbuf.3:178
11617 msgid ""
11618 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
11619 "versions of BSD before 4.2BSD, and are available under Linux since libc "
11620 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
11621 "buffer size and should be avoided."
11622 msgstr ""
11623 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
11624 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
11625 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
11626 "ズを使用するので、これも使うべきでない。"
11627
11628 #. type: Plain text
11629 #: build/C/man3/setbuf.3:185
11630 msgid ""
11631 "You must make sure that the space that I<buf> points to still exists by the "
11632 "time I<stream> is closed, which also happens at program termination.  For "
11633 "example, the following is invalid:"
11634 msgstr ""
11635 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
11636 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
11637 "な使い方は許されない:"
11638
11639 #. type: Plain text
11640 #: build/C/man3/setbuf.3:188
11641 #, no-wrap
11642 msgid "#include E<lt>stdio.hE<gt>\n"
11643 msgstr "#include E<lt>stdio.hE<gt>\n"
11644
11645 #. type: Plain text
11646 #: build/C/man3/setbuf.3:197
11647 #, no-wrap
11648 msgid ""
11649 "int\n"
11650 "main(void)\n"
11651 "{\n"
11652 "    char buf[BUFSIZ];\n"
11653 "    setbuf(stdin, buf);\n"
11654 "    printf(\"Hello, world!\\en\");\n"
11655 "    return 0;\n"
11656 "}\n"
11657 msgstr ""
11658 "int\n"
11659 "main(void)\n"
11660 "{\n"
11661 "    char buf[BUFSIZ];\n"
11662 "    setbuf(stdin, buf);\n"
11663 "    printf(\"Hello, world!\\en\");\n"
11664 "    return 0;\n"
11665 "}\n"
11666
11667 #. type: Plain text
11668 #: build/C/man3/setbuf.3:205
11669 msgid ""
11670 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
11671 "(3), B<puts>(3)"
11672 msgstr ""
11673 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
11674 "(3), B<puts>(3)"
11675
11676 #. type: TH
11677 #: build/C/man3/stdin.3:9
11678 #, no-wrap
11679 msgid "STDIN"
11680 msgstr "STDIN"
11681
11682 #. type: TH
11683 #: build/C/man3/stdin.3:9 build/C/man3/tmpfile.3:29
11684 #, no-wrap
11685 msgid "2008-07-14"
11686 msgstr "2008-07-14"
11687
11688 #. type: Plain text
11689 #: build/C/man3/stdin.3:12
11690 msgid "stdin, stdout, stderr - standard I/O streams"
11691 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
11692
11693 #. type: Plain text
11694 #: build/C/man3/stdin.3:19
11695 #, no-wrap
11696 msgid ""
11697 "B<extern FILE *>I<stdin>B<;>\n"
11698 "B<extern FILE *>I<stdout>B<;>\n"
11699 "B<extern FILE *>I<stderr>B<;>\n"
11700 msgstr ""
11701 "B<extern FILE *>I<stdin>B<;>\n"
11702 "B<extern FILE *>I<stdout>B<;>\n"
11703 "B<extern FILE *>I<stderr>B<;>\n"
11704
11705 #. type: Plain text
11706 #: build/C/man3/stdin.3:31
11707 msgid ""
11708 "Under normal circumstances every UNIX program has three streams opened for "
11709 "it when it starts up, one for input, one for output, and one for printing "
11710 "diagnostic or error messages.  These are typically attached to the user's "
11711 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
11712 "depending on what the parent process chose to set up.  (See also the "
11713 "\"Redirection\" section of B<sh>(1).)"
11714 msgstr ""
11715 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
11716 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
11717 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
11718 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
11719 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
11720
11721 #. type: Plain text
11722 #: build/C/man3/stdin.3:41
11723 msgid ""
11724 "The input stream is referred to as \"standard input\"; the output stream is "
11725 "referred to as \"standard output\"; and the error stream is referred to as "
11726 "\"standard error\".  These terms are abbreviated to form the symbols used to "
11727 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
11728 msgstr ""
11729 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
11730 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
11731 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
11732 "I<stdout>, I<stderr> である。"
11733
11734 #. type: Plain text
11735 #: build/C/man3/stdin.3:50
11736 msgid ""
11737 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
11738 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
11739 msgstr ""
11740 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
11741 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
11742
11743 #. type: Plain text
11744 #: build/C/man3/stdin.3:59
11745 msgid ""
11746 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
11747 "same underlying files may also be accessed using the raw UNIX file "
11748 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
11749 msgstr ""
11750 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
11751 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
11752 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
11753 "る。"
11754
11755 #. type: Plain text
11756 #: build/C/man3/stdin.3:78
11757 msgid ""
11758 "On program startup, the integer file descriptors associated with the streams "
11759 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
11760 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
11761 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
11762 "(3)  to one of these streams can change the file descriptor number "
11763 "associated with the stream.)"
11764 msgstr ""
11765 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
11766 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
11767 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
11768 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
11769 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
11770 "たファイルディスクリプタ の番号を変更することができる。)"
11771
11772 #. type: Plain text
11773 #: build/C/man3/stdin.3:91
11774 msgid ""
11775 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
11776 "unexpected results and should generally be avoided.  (For the masochistic "
11777 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
11778 "is supposed to work.)  A general rule is that file descriptors are handled "
11779 "in the kernel, while stdio is just a library.  This means for example, that "
11780 "after an B<exec>(3), the child inherits all open file descriptors, but all "
11781 "old streams have become inaccessible."
11782 msgstr ""
11783 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
11784 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
11785 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
11786 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
11787 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
11788 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
11789 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
11790
11791 #. type: Plain text
11792 #: build/C/man3/stdin.3:109
11793 msgid ""
11794 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
11795 "macros, assigning to them is nonportable.  The standard streams can be made "
11796 "to refer to different files with help of the library function B<freopen>(3), "
11797 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
11798 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
11799 "by normal program termination."
11800 msgstr ""
11801 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
11802 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
11803 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
11804 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
11805 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
11806 "グラムの正常終了によってクローズされる。"
11807
11808 #. type: Plain text
11809 #: build/C/man3/stdin.3:118
11810 msgid ""
11811 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
11812 "standard also stipulates that these three streams shall be open at program "
11813 "startup."
11814 msgstr ""
11815 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
11816 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
11817 "とが規定されている。"
11818
11819 #. type: Plain text
11820 #: build/C/man3/stdin.3:150
11821 msgid ""
11822 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
11823 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
11824 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
11825 "unexpected results, especially with debugging output.  The buffering mode of "
11826 "the standard streams (or any other stream)  can be changed using the "
11827 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
11828 "associated with a terminal, there may also be input buffering in the "
11829 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
11830 "terminal input is line buffered in the kernel.)  This kernel input handling "
11831 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
11832 "B<termios>(3)."
11833 msgstr ""
11834 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
11835 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
11836 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
11837 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
11838 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
11839 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
11840 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
11841 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
11842 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
11843 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
11844 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
11845 "B<termios>(3)  も参照すること。"
11846
11847 #. type: Plain text
11848 #: build/C/man3/stdin.3:155
11849 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
11850 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
11851
11852 #. type: TH
11853 #: build/C/man3/stdio.3:37
11854 #, no-wrap
11855 msgid "STDIO"
11856 msgstr "STDIO"
11857
11858 #. type: TH
11859 #: build/C/man3/stdio.3:37
11860 #, no-wrap
11861 msgid "2001-12-26"
11862 msgstr "2001-12-26"
11863
11864 #. type: Plain text
11865 #: build/C/man3/stdio.3:40
11866 msgid "stdio - standard input/output library functions"
11867 msgstr "stdio - 標準入出力ライブラリ関数"
11868
11869 #. type: Plain text
11870 #: build/C/man3/stdio.3:44
11871 msgid "B<FILE *>I<stdin>B<;>"
11872 msgstr "B<FILE *>I<stdin>B<;>"
11873
11874 #. type: Plain text
11875 #: build/C/man3/stdio.3:46
11876 msgid "B<FILE *>I<stdout>B<;>"
11877 msgstr "B<FILE *>I<stdout>B<;>"
11878
11879 #. type: Plain text
11880 #: build/C/man3/stdio.3:48
11881 msgid "B<FILE *>I<stderr>B<;>"
11882 msgstr "B<FILE *>I<stderr>B<;>"
11883
11884 #. type: Plain text
11885 #: build/C/man3/stdio.3:55
11886 msgid ""
11887 "The standard I/O library provides a simple and efficient buffered stream I/O "
11888 "interface.  Input and output is mapped into logical data streams and the "
11889 "physical I/O characteristics are concealed.  The functions and macros are "
11890 "listed below; more information is available from the individual man pages."
11891 msgstr ""
11892 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
11893 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
11894 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
11895 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
11896
11897 #. type: Plain text
11898 #: build/C/man3/stdio.3:78
11899 msgid ""
11900 "A stream is associated with an external file (which may be a physical "
11901 "device) by I<opening> a file, which may involve creating a new file.  "
11902 "Creating an existing file causes its former contents to be discarded.  If a "
11903 "file can support positioning requests (such as a disk file, as opposed to a "
11904 "terminal) then a I<file position indicator> associated with the stream is "
11905 "positioned at the start of the file (byte zero), unless the file is opened "
11906 "with append mode.  If append mode is used, it is unspecified whether the "
11907 "position indicator will be placed at the start or the end of the file.  The "
11908 "position indicator is maintained by subsequent reads, writes and positioning "
11909 "requests.  All input occurs as if the characters were read by successive "
11910 "calls to the B<fgetc>(3)  function; all output takes place as if all "
11911 "characters were written by successive calls to the B<fputc>(3)  function."
11912 msgstr ""
11913 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
11914 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
11915 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
11916 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
11917 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
11918 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
11919 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
11920 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
11921 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
11922 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
11923 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
11924 "字を書き込んだかのように行われる。"
11925
11926 #. type: Plain text
11927 #: build/C/man3/stdio.3:88
11928 msgid ""
11929 "A file is disassociated from a stream by I<closing> the file.  Output "
11930 "streams are flushed (any unwritten buffer contents are transferred to the "
11931 "host environment) before the stream is disassociated from the file.  The "
11932 "value of a pointer to a I<FILE> object is indeterminate after a file is "
11933 "closed (garbage)."
11934 msgstr ""
11935 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
11936 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
11937 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
11938 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
11939 "確定になる (ゴミになってしまう)。"
11940
11941 #. type: Plain text
11942 #: build/C/man3/stdio.3:101
11943 msgid ""
11944 "A file may be subsequently reopened, by the same or another program "
11945 "execution, and its contents reclaimed or modified (if it can be repositioned "
11946 "at the start).  If the main function returns to its original caller, or the "
11947 "B<exit>(3)  function is called, all open files are closed (hence all output "
11948 "streams are flushed) before program termination.  Other methods of program "
11949 "termination, such as B<abort>(3)  do not bother about closing files properly."
11950 msgstr ""
11951 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
11952 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
11953 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
11954 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
11955 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
11956 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
11957 "保証はない。"
11958
11959 #. type: Plain text
11960 #: build/C/man3/stdio.3:117
11961 msgid ""
11962 "At program startup, three text streams are predefined and need not be opened "
11963 "explicitly: I<standard input> (for reading conventional input), I<standard "
11964 "output> (for writing conventional input), and I<standard error> (for writing "
11965 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
11966 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
11967 "the standard input and output streams are fully buffered if and only if the "
11968 "streams do not to refer to an interactive device."
11969 msgstr ""
11970 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
11971 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
11972 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
11973 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
11974 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
11975 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
11976 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
11977 "スを参照していなければ、 完全にバッファリングされている。"
11978
11979 #. type: Plain text
11980 #: build/C/man3/stdio.3:127
11981 msgid ""
11982 "Output streams that refer to terminal devices are always line buffered by "
11983 "default; pending output to such streams is written automatically whenever an "
11984 "input stream that refers to a terminal device is read.  In cases where a "
11985 "large amount of computation is done after printing part of a line on an "
11986 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
11987 "going off and computing so that the output will appear."
11988 msgstr ""
11989 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
11990 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
11991 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
11992 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
11993 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
11994 "必要がある。"
11995
11996 #. type: Plain text
11997 #: build/C/man3/stdio.3:141
11998 msgid ""
11999 "The I<stdio> library is a part of the library B<libc> and routines are "
12000 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12001 "SYNOPSIS sections of the following manual pages indicate which include files "
12002 "are to be used, what the compiler declaration for the function looks like "
12003 "and which external variables are of interest."
12004 msgstr ""
12005 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12006 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12007 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12008 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12009 "数が関係するのかが示されている。"
12010
12011 #.  Not on Linux: .BR fropen ,
12012 #.  Not on Linux: .BR fwopen ,
12013 #. type: Plain text
12014 #: build/C/man3/stdio.3:181
12015 msgid ""
12016 "The following are defined as macros; these names may not be reused without "
12017 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12018 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12019 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12020 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12021 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12022 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12023 "and B<putchar> exist and will be used if the macros definitions are "
12024 "explicitly removed."
12025 msgstr ""
12026 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12027 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12028 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12029 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12030 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12031 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12032 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12033 "示的に消去されている場合には、 これらを使用することになるだろう。"
12034
12035 #. type: SS
12036 #: build/C/man3/stdio.3:181
12037 #, no-wrap
12038 msgid "List of Functions"
12039 msgstr "関数のリスト"
12040
12041 #. type: tbl table
12042 #: build/C/man3/stdio.3:186
12043 #, no-wrap
12044 msgid "Function\tDescription\n"
12045 msgstr "関数\t説明\n"
12046
12047 #. type: tbl table
12048 #: build/C/man3/stdio.3:187
12049 #, no-wrap
12050 msgid "_\n"
12051 msgstr "_\n"
12052
12053 #. type: tbl table
12054 #: build/C/man3/stdio.3:188
12055 #, no-wrap
12056 msgid "clearerr\tcheck and reset stream status\n"
12057 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12058
12059 #. type: tbl table
12060 #: build/C/man3/stdio.3:189
12061 #, no-wrap
12062 msgid "fclose\tclose a stream\n"
12063 msgstr "fclose\tストリームをクローズする\n"
12064
12065 #. type: tbl table
12066 #: build/C/man3/stdio.3:190
12067 #, no-wrap
12068 msgid "fdopen\tstream open functions\n"
12069 msgstr "fdopen\tストリームをオープンする\n"
12070
12071 #. type: tbl table
12072 #: build/C/man3/stdio.3:191
12073 #, no-wrap
12074 msgid "feof\tcheck and reset stream status\n"
12075 msgstr "feof\tストリームの状態の確認とリセット\n"
12076
12077 #. type: tbl table
12078 #: build/C/man3/stdio.3:192
12079 #, no-wrap
12080 msgid "ferror\tcheck and reset stream status\n"
12081 msgstr "ferror\tストリームの状態の確認とリセット\n"
12082
12083 #. type: tbl table
12084 #: build/C/man3/stdio.3:193
12085 #, no-wrap
12086 msgid "fflush\tflush a stream\n"
12087 msgstr "fflush\tストリームをフラッシュする\n"
12088
12089 #. type: tbl table
12090 #: build/C/man3/stdio.3:194
12091 #, no-wrap
12092 msgid "fgetc\tget next character or word from input stream\n"
12093 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12094
12095 #. type: tbl table
12096 #: build/C/man3/stdio.3:195
12097 #, no-wrap
12098 msgid "fgetpos\treposition a stream\n"
12099 msgstr "fgetpos\tストリームの位置を取得する\n"
12100
12101 #. type: tbl table
12102 #: build/C/man3/stdio.3:196
12103 #, no-wrap
12104 msgid "fgets\tget a line from a stream\n"
12105 msgstr "fgets\tストリームから行を取得する\n"
12106
12107 #. type: tbl table
12108 #: build/C/man3/stdio.3:197
12109 #, no-wrap
12110 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12111 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12112
12113 #. type: tbl table
12114 #: build/C/man3/stdio.3:198
12115 #, no-wrap
12116 msgid "fopen\tstream open functions\n"
12117 msgstr "fopen\tストリームをオープンする\n"
12118
12119 #. type: tbl table
12120 #: build/C/man3/stdio.3:199
12121 #, no-wrap
12122 msgid "fprintf\tformatted output conversion\n"
12123 msgstr "fprintf\t書式付き出力変換\n"
12124
12125 #. type: tbl table
12126 #: build/C/man3/stdio.3:200
12127 #, no-wrap
12128 msgid "fpurge\tflush a stream\n"
12129 msgstr "fpurge\tストリームをフラッシュする\n"
12130
12131 #. type: tbl table
12132 #: build/C/man3/stdio.3:201
12133 #, no-wrap
12134 msgid "fputc\toutput a character or word to a stream\n"
12135 msgstr "fputc\t文字または語をストリームに出力する\n"
12136
12137 #. type: tbl table
12138 #: build/C/man3/stdio.3:202
12139 #, no-wrap
12140 msgid "fputs\toutput a line to a stream\n"
12141 msgstr "fputs\t行をストリームに出力する\n"
12142
12143 #. type: tbl table
12144 #: build/C/man3/stdio.3:203
12145 #, no-wrap
12146 msgid "fread\tbinary stream input/output\n"
12147 msgstr "fread\tバイナリーストリーム入出力\n"
12148
12149 #. type: tbl table
12150 #: build/C/man3/stdio.3:204
12151 #, no-wrap
12152 msgid "freopen\tstream open functions\n"
12153 msgstr "freopen\tストリームをオープンする\n"
12154
12155 #. type: tbl table
12156 #: build/C/man3/stdio.3:205
12157 #, no-wrap
12158 msgid "fscanf\tinput format conversion\n"
12159 msgstr "fscanf\t書式付き入力変換\n"
12160
12161 #. type: tbl table
12162 #: build/C/man3/stdio.3:206
12163 #, no-wrap
12164 msgid "fseek\treposition a stream\n"
12165 msgstr "fseek\tストリームの位置指示子を移動する\n"
12166
12167 #. type: tbl table
12168 #: build/C/man3/stdio.3:207
12169 #, no-wrap
12170 msgid "fsetpos\treposition a stream\n"
12171 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12172
12173 #. type: tbl table
12174 #: build/C/man3/stdio.3:208
12175 #, no-wrap
12176 msgid "ftell\treposition a stream\n"
12177 msgstr "ftell\tストリームの位置を取得する\n"
12178
12179 #. type: tbl table
12180 #: build/C/man3/stdio.3:209
12181 #, no-wrap
12182 msgid "fwrite\tbinary stream input/output\n"
12183 msgstr "fwrite\tバイナリーストリーム入出力\n"
12184
12185 #. type: tbl table
12186 #: build/C/man3/stdio.3:210
12187 #, no-wrap
12188 msgid "getc\tget next character or word from input stream\n"
12189 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12190
12191 #. type: tbl table
12192 #: build/C/man3/stdio.3:211
12193 #, no-wrap
12194 msgid "getchar\tget next character or word from input stream\n"
12195 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12196
12197 #. type: tbl table
12198 #: build/C/man3/stdio.3:212
12199 #, no-wrap
12200 msgid "gets\tget a line from a stream\n"
12201 msgstr "gets\t行を入力ストリームから取得する\n"
12202
12203 #. type: tbl table
12204 #: build/C/man3/stdio.3:213
12205 #, no-wrap
12206 msgid "getw\tget next character or word from input stream\n"
12207 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12208
12209 #. type: tbl table
12210 #: build/C/man3/stdio.3:214
12211 #, no-wrap
12212 msgid "mktemp\tmake temporary filename (unique)\n"
12213 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12214
12215 #. type: tbl table
12216 #: build/C/man3/stdio.3:215
12217 #, no-wrap
12218 msgid "perror\tsystem error messages\n"
12219 msgstr "perror\tシステムエラーメッセージ\n"
12220
12221 #. type: tbl table
12222 #: build/C/man3/stdio.3:216
12223 #, no-wrap
12224 msgid "printf\tformatted output conversion\n"
12225 msgstr "printf\t書式付き出力変換\n"
12226
12227 #. type: tbl table
12228 #: build/C/man3/stdio.3:217
12229 #, no-wrap
12230 msgid "putc\toutput a character or word to a stream\n"
12231 msgstr "putc\t文字または語をストリームに出力する\n"
12232
12233 #. type: tbl table
12234 #: build/C/man3/stdio.3:218
12235 #, no-wrap
12236 msgid "putchar\toutput a character or word to a stream\n"
12237 msgstr "putchar\t文字または語をストリームに出力する\n"
12238
12239 #. type: tbl table
12240 #: build/C/man3/stdio.3:219
12241 #, no-wrap
12242 msgid "puts\toutput a line to a stream\n"
12243 msgstr "puts\t行をストリームに出力する\n"
12244
12245 #. type: tbl table
12246 #: build/C/man3/stdio.3:220
12247 #, no-wrap
12248 msgid "putw\toutput a character or word to a stream\n"
12249 msgstr "putw\t文字または語をストリームに出力する\n"
12250
12251 #. type: tbl table
12252 #: build/C/man3/stdio.3:221
12253 #, no-wrap
12254 msgid "remove\tremove directory entry\n"
12255 msgstr "remove\tディレクトリエントリを削除する\n"
12256
12257 #. type: tbl table
12258 #: build/C/man3/stdio.3:222
12259 #, no-wrap
12260 msgid "rewind\treposition a stream\n"
12261 msgstr "rewind\tストリームの位置指示子を移動する\n"
12262
12263 #. type: tbl table
12264 #: build/C/man3/stdio.3:223
12265 #, no-wrap
12266 msgid "scanf\tinput format conversion\n"
12267 msgstr "scanf\t書式付き入力変換\n"
12268
12269 #. type: tbl table
12270 #: build/C/man3/stdio.3:224
12271 #, no-wrap
12272 msgid "setbuf\tstream buffering operations\n"
12273 msgstr "setbuf\tストリームのバッファリングの操作\n"
12274
12275 #. type: tbl table
12276 #: build/C/man3/stdio.3:225
12277 #, no-wrap
12278 msgid "setbuffer\tstream buffering operations\n"
12279 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12280
12281 #. type: tbl table
12282 #: build/C/man3/stdio.3:226
12283 #, no-wrap
12284 msgid "setlinebuf\tstream buffering operations\n"
12285 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12286
12287 #. type: tbl table
12288 #: build/C/man3/stdio.3:227
12289 #, no-wrap
12290 msgid "setvbuf\tstream buffering operations\n"
12291 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12292
12293 #. type: tbl table
12294 #: build/C/man3/stdio.3:228
12295 #, no-wrap
12296 msgid "sprintf\tformatted output conversion\n"
12297 msgstr "sprintf\t書式付き出力変換\n"
12298
12299 #. type: tbl table
12300 #: build/C/man3/stdio.3:229
12301 #, no-wrap
12302 msgid "sscanf\tinput format conversion\n"
12303 msgstr "sscanf\t書式付き入力変換\n"
12304
12305 #. type: tbl table
12306 #: build/C/man3/stdio.3:230
12307 #, no-wrap
12308 msgid "strerror\tsystem error messages\n"
12309 msgstr "strerror\tシステムエラーメッセージ\n"
12310
12311 #. type: tbl table
12312 #: build/C/man3/stdio.3:231
12313 #, no-wrap
12314 msgid "sys_errlist\tsystem error messages\n"
12315 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12316
12317 #. type: tbl table
12318 #: build/C/man3/stdio.3:232
12319 #, no-wrap
12320 msgid "sys_nerr\tsystem error messages\n"
12321 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12322
12323 #. type: tbl table
12324 #: build/C/man3/stdio.3:233
12325 #, no-wrap
12326 msgid "tempnam\ttemporary file routines\n"
12327 msgstr "tempnam\tテンポラリファイルの操作\n"
12328
12329 #. type: tbl table
12330 #: build/C/man3/stdio.3:234
12331 #, no-wrap
12332 msgid "tmpfile\ttemporary file routines\n"
12333 msgstr "tmpfile\tテンポラリファイルの操作\n"
12334
12335 #. type: tbl table
12336 #: build/C/man3/stdio.3:235
12337 #, no-wrap
12338 msgid "tmpnam\ttemporary file routines\n"
12339 msgstr "tmpnam\tテンポラリファイルの操作\n"
12340
12341 #. type: tbl table
12342 #: build/C/man3/stdio.3:236
12343 #, no-wrap
12344 msgid "ungetc\tun-get character from input stream\n"
12345 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12346
12347 #. type: tbl table
12348 #: build/C/man3/stdio.3:237
12349 #, no-wrap
12350 msgid "vfprintf\tformatted output conversion\n"
12351 msgstr "vfprintf\t書式付き出力変換\n"
12352
12353 #. type: tbl table
12354 #: build/C/man3/stdio.3:238
12355 #, no-wrap
12356 msgid "vfscanf\tinput format conversion\n"
12357 msgstr "vfscanf\t書式付き入力変換\n"
12358
12359 #. type: tbl table
12360 #: build/C/man3/stdio.3:239
12361 #, no-wrap
12362 msgid "vprintf\tformatted output conversion\n"
12363 msgstr "vprintf\t書式付き出力変換\n"
12364
12365 #. type: tbl table
12366 #: build/C/man3/stdio.3:240
12367 #, no-wrap
12368 msgid "vscanf\tinput format conversion\n"
12369 msgstr "vscanf\t書式付き入力変換\n"
12370
12371 #. type: tbl table
12372 #: build/C/man3/stdio.3:241
12373 #, no-wrap
12374 msgid "vsprintf\tformatted output conversion\n"
12375 msgstr "vsprintf\t書式付き出力変換\n"
12376
12377 #. type: tbl table
12378 #: build/C/man3/stdio.3:242
12379 #, no-wrap
12380 msgid "vsscanf\tinput format conversion\n"
12381 msgstr "vsscanf\t書式付き入力変換\n"
12382
12383 #. type: Plain text
12384 #: build/C/man3/stdio.3:248
12385 msgid "The I<stdio> library conforms to C89."
12386 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12387
12388 #. type: Plain text
12389 #: build/C/man3/stdio.3:254
12390 msgid ""
12391 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12392 "B<unlocked_stdio>(3)"
12393 msgstr ""
12394 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12395 "B<unlocked_stdio>(3)"
12396
12397 #. type: TH
12398 #: build/C/man3/stdio_ext.3:23
12399 #, no-wrap
12400 msgid "STDIO_EXT"
12401 msgstr "STDIO_EXT"
12402
12403 #. type: TH
12404 #: build/C/man3/stdio_ext.3:23
12405 #, no-wrap
12406 msgid "2001-12-16"
12407 msgstr "2001-12-16"
12408
12409 #. type: Plain text
12410 #: build/C/man3/stdio_ext.3:28
12411 msgid ""
12412 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12413 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12414 "structure"
12415 msgstr ""
12416 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12417 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12418 "へのインタフェース"
12419
12420 #. type: Plain text
12421 #: build/C/man3/stdio_ext.3:32
12422 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12423 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12424
12425 #. type: Plain text
12426 #: build/C/man3/stdio_ext.3:34
12427 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12428 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12429
12430 #. type: Plain text
12431 #: build/C/man3/stdio_ext.3:36
12432 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12433 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12434
12435 #. type: Plain text
12436 #: build/C/man3/stdio_ext.3:38
12437 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12438 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12439
12440 #. type: Plain text
12441 #: build/C/man3/stdio_ext.3:40
12442 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12443 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12444
12445 #. type: Plain text
12446 #: build/C/man3/stdio_ext.3:42
12447 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12448 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12449
12450 #. type: Plain text
12451 #: build/C/man3/stdio_ext.3:44
12452 msgid "B<int __freading(FILE *>I<stream>B<);>"
12453 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12454
12455 #. type: Plain text
12456 #: build/C/man3/stdio_ext.3:46
12457 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12458 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12459
12460 #. type: Plain text
12461 #: build/C/man3/stdio_ext.3:48
12462 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12463 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12464
12465 #. type: Plain text
12466 #: build/C/man3/stdio_ext.3:50
12467 msgid "B<void _flushlbf(void);>"
12468 msgstr "B<void _flushlbf(void);>"
12469
12470 #. type: Plain text
12471 #: build/C/man3/stdio_ext.3:52
12472 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12473 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12474
12475 #. type: Plain text
12476 #: build/C/man3/stdio_ext.3:57
12477 msgid ""
12478 "Solaris introduced routines to allow portable access to the internals of the "
12479 "I<FILE> structure, and glibc also implemented these."
12480 msgstr ""
12481 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
12482 "が導入されており、これらは glibc でも実装されている。"
12483
12484 #. type: Plain text
12485 #: build/C/man3/stdio_ext.3:62
12486 msgid ""
12487 "The B<__fbufsize>()  function returns the size of the buffer currently used "
12488 "by the given stream."
12489 msgstr ""
12490 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを"
12491 "返す。"
12492
12493 #. type: Plain text
12494 #: build/C/man3/stdio_ext.3:69
12495 msgid ""
12496 "The B<__fpending>()  function returns the number of bytes in the output "
12497 "buffer.  For wide-oriented streams the unit is wide characters.  This "
12498 "function is undefined on buffers in reading mode, or opened read-only."
12499 msgstr ""
12500 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
12501 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
12502 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
12503 "は未定義である。"
12504
12505 #. type: Plain text
12506 #: build/C/man3/stdio_ext.3:74
12507 msgid ""
12508 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
12509 "buffered, and zero otherwise."
12510 msgstr ""
12511 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
12512 "場合は 0 を返す。"
12513
12514 #. type: Plain text
12515 #: build/C/man3/stdio_ext.3:79
12516 msgid ""
12517 "The B<__freadable>()  function returns a nonzero value if the stream allows "
12518 "reading, and zero otherwise."
12519 msgstr ""
12520 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
12521 "外の場合は 0 を返す。"
12522
12523 #. type: Plain text
12524 #: build/C/man3/stdio_ext.3:84
12525 msgid ""
12526 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
12527 "writing, and zero otherwise."
12528 msgstr ""
12529 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
12530 "外の場合は 0 を返す。"
12531
12532 #. type: Plain text
12533 #: build/C/man3/stdio_ext.3:90
12534 msgid ""
12535 "The B<__freading>()  function returns a nonzero value if the stream is read-"
12536 "only, or if the last operation on the stream was a read operation, and zero "
12537 "otherwise."
12538 msgstr ""
12539 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
12540 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
12541 "を返す。"
12542
12543 #. type: Plain text
12544 #: build/C/man3/stdio_ext.3:96
12545 msgid ""
12546 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
12547 "only (or append-only), or if the last operation on the stream was a write "
12548 "operation, and zero otherwise."
12549 msgstr ""
12550 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
12551 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
12552 "し、 それ以外の場合は 0 を返す。"
12553
12554 #. type: Plain text
12555 #: build/C/man3/stdio_ext.3:104
12556 msgid ""
12557 "The B<__fsetlocking>()  function can be used to select the desired type of "
12558 "locking on the stream.  It returns the current type.  The I<type> argument "
12559 "can take the following three values:"
12560 msgstr ""
12561 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
12562 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
12563 "ることができる :"
12564
12565 #. type: TP
12566 #: build/C/man3/stdio_ext.3:104
12567 #, no-wrap
12568 msgid "B<FSETLOCKING_INTERNAL>"
12569 msgstr "B<FSETLOCKING_INTERNAL>"
12570
12571 #. type: Plain text
12572 #: build/C/man3/stdio_ext.3:109
12573 msgid ""
12574 "Perform implicit locking around every operation on the given stream (except "
12575 "for the *_unlocked ones).  This is the default."
12576 msgstr ""
12577 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
12578 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
12579 "である)。 これがデフォルトのロック形式である。"
12580
12581 #. type: TP
12582 #: build/C/man3/stdio_ext.3:109
12583 #, no-wrap
12584 msgid "B<FSETLOCKING_BYCALLER>"
12585 msgstr "B<FSETLOCKING_BYCALLER>"
12586
12587 #. type: Plain text
12588 #: build/C/man3/stdio_ext.3:116
12589 msgid ""
12590 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
12591 "case there is more than one thread), and the stdio routines will not do "
12592 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
12593 msgstr ""
12594 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
12595 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
12596 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
12597 "理を行わない。"
12598
12599 #. type: TP
12600 #: build/C/man3/stdio_ext.3:116
12601 #, no-wrap
12602 msgid "B<FSETLOCKING_QUERY>"
12603 msgstr "B<FSETLOCKING_QUERY>"
12604
12605 #. type: Plain text
12606 #: build/C/man3/stdio_ext.3:120
12607 msgid "Don't change the type of locking.  (Only return it.)"
12608 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
12609
12610 #. type: Plain text
12611 #: build/C/man3/stdio_ext.3:126
12612 msgid ""
12613 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
12614 "so that output to a terminal is forced out, say before reading keyboard "
12615 "input.)"
12616 msgstr ""
12617 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
12618 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
12619 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
12620 "いだろう)"
12621
12622 #. type: Plain text
12623 #: build/C/man3/stdio_ext.3:130
12624 msgid ""
12625 "The B<__fpurge>()  function discards the contents of the stream's buffer."
12626 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
12627
12628 #. type: Plain text
12629 #: build/C/man3/stdio_ext.3:132
12630 msgid "B<flockfile>(3), B<fpurge>(3)"
12631 msgstr "B<flockfile>(3), B<fpurge>(3)"
12632
12633 #. type: TH
12634 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:35
12635 #, no-wrap
12636 msgid "SYMLINK"
12637 msgstr "SYMLINK"
12638
12639 #. type: TH
12640 #: build/C/man2/symlink.2:32
12641 #, no-wrap
12642 msgid "2010-09-20"
12643 msgstr "2010-09-20"
12644
12645 #. type: Plain text
12646 #: build/C/man2/symlink.2:35
12647 msgid "symlink - make a new name for a file"
12648 msgstr "symlink - ファイルに新しい名前を付ける"
12649
12650 #. type: Plain text
12651 #: build/C/man2/symlink.2:39
12652 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
12653 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
12654
12655 #. type: Plain text
12656 #: build/C/man2/symlink.2:47
12657 msgid "B<symlink>():"
12658 msgstr "B<symlink>():"
12659
12660 #. type: Plain text
12661 #: build/C/man2/symlink.2:58
12662 msgid ""
12663 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
12664 "string I<oldpath>."
12665 msgstr ""
12666 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
12667 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
12668
12669 #. type: Plain text
12670 #: build/C/man2/symlink.2:62
12671 msgid ""
12672 "Symbolic links are interpreted at run time as if the contents of the link "
12673 "had been substituted into the path being followed to find a file or "
12674 "directory."
12675 msgstr ""
12676 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、その"
12677 "パスを辿ることで、 ファイルやディレクトリに到達する。"
12678
12679 #. type: Plain text
12680 #: build/C/man2/symlink.2:67
12681 msgid ""
12682 "Symbolic links may contain I<..> path components, which (if used at the "
12683 "start of the link) refer to the parent directories of that in which the link "
12684 "resides."
12685 msgstr ""
12686 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリン"
12687 "クの最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参"
12688 "照される。"
12689
12690 #. type: Plain text
12691 #: build/C/man2/symlink.2:71
12692 msgid ""
12693 "A symbolic link (also known as a soft link) may point to an existing file or "
12694 "to a nonexistent one; the latter case is known as a dangling link."
12695 msgstr ""
12696 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファ"
12697 "イルを指しているかもしれないし、 存在しないファイルを指しているかもしれない; "
12698 "後者の場合は壊れたリンク (dangling link) とも呼ばれる。"
12699
12700 #. type: Plain text
12701 #: build/C/man2/symlink.2:78
12702 msgid ""
12703 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
12704 "when following the link, but is checked when removal or renaming of the link "
12705 "is requested and the link is in a directory with the sticky bit "
12706 "(B<S_ISVTX>)  set."
12707 msgstr ""
12708 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合"
12709 "には所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求"
12710 "され、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
12711 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
12712
12713 #. type: Plain text
12714 #: build/C/man2/symlink.2:99
12715 msgid ""
12716 "Write access to the directory containing I<newpath> is denied, or one of the "
12717 "directories in the path prefix of I<newpath> did not allow search "
12718 "permission.  (See also B<path_resolution>(7).)"
12719 msgstr ""
12720 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
12721 "含まれているディレクトリのどれかに検索許可が与えられていない "
12722 "(B<path_resolution>(7)  も参照すること)。"
12723
12724 #. type: Plain text
12725 #: build/C/man2/symlink.2:113
12726 msgid "Too many symbolic links were encountered in resolving I<newpath>."
12727 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
12728
12729 #. type: Plain text
12730 #: build/C/man2/symlink.2:123
12731 msgid ""
12732 "A directory component in I<newpath> does not exist or is a dangling symbolic "
12733 "link, or I<oldpath> is the empty string."
12734 msgstr ""
12735 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
12736 "I<oldpath> が空文字列である。"
12737
12738 #. type: Plain text
12739 #: build/C/man2/symlink.2:135
12740 msgid ""
12741 "A component used as a directory in I<newpath> is not, in fact, a directory."
12742 msgstr ""
12743 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
12744
12745 #. type: Plain text
12746 #: build/C/man2/symlink.2:140
12747 msgid ""
12748 "The file system containing I<newpath> does not support the creation of "
12749 "symbolic links."
12750 msgstr ""
12751 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリン"
12752 "クの作成をサポートしていない。"
12753
12754 #. type: Plain text
12755 #: build/C/man2/symlink.2:144
12756 msgid "I<newpath> is on a read-only file system."
12757 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
12758
12759 #. type: Plain text
12760 #: build/C/man2/symlink.2:154
12761 msgid "No checking of I<oldpath> is done."
12762 msgstr "I<oldpath> についてのチェックは行なわれない。"
12763
12764 #. type: Plain text
12765 #: build/C/man2/symlink.2:159
12766 msgid ""
12767 "Deleting the name referred to by a symlink will actually delete the file "
12768 "(unless it also has other hard links).  If this behavior is not desired, use "
12769 "B<link>(2)."
12770 msgstr ""
12771 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
12772 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
12773 "場合は、 B<link>(2)  を使用すること。"
12774
12775 #. type: Plain text
12776 #: build/C/man2/symlink.2:170
12777 msgid ""
12778 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
12779 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
12780 "B<symlink>(7)"
12781 msgstr ""
12782 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
12783 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
12784 "B<symlink>(7)"
12785
12786 #. type: TH
12787 #: build/C/man7/symlink.7:35
12788 #, no-wrap
12789 msgid "2008-06-18"
12790 msgstr "2008-06-18"
12791
12792 #. type: Plain text
12793 #: build/C/man7/symlink.7:38
12794 msgid "symlink - symbolic link handling"
12795 msgstr "symlink - symbolic link handling"
12796
12797 #. type: SH
12798 #: build/C/man7/symlink.7:38
12799 #, no-wrap
12800 msgid "SYMBOLIC LINK HANDLING"
12801 msgstr "SYMBOLIC LINK HANDLING"
12802
12803 #. type: Plain text
12804 #: build/C/man7/symlink.7:42
12805 msgid ""
12806 "Symbolic links are files that act as pointers to other files.  To understand "
12807 "their behavior, you must first understand how hard links work."
12808 msgstr ""
12809 "Symbolic links are files that act as pointers to other files.  To understand "
12810 "their behavior, you must first understand how hard links work."
12811
12812 #. type: Plain text
12813 #: build/C/man7/symlink.7:58
12814 msgid ""
12815 "A hard link to a file is indistinguishable from the original file because it "
12816 "is a reference to the object underlying the original filename.  (To be "
12817 "precise: each of the hard links to a file is a reference to the same I<i-"
12818 "node number>, where an i-node number is an index into the i-node table, "
12819 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
12820 "Changes to a file are independent of the name used to reference the file.  "
12821 "Hard links may not refer to directories (to prevent the possibility of loops "
12822 "within the file system tree, which would confuse many programs)  and may not "
12823 "refer to files on different file systems (because i-node numbers are not "
12824 "unique across file systems)."
12825 msgstr ""
12826 "A hard link to a file is indistinguishable from the original file because it "
12827 "is a reference to the object underlying the original filename.  (To be "
12828 "precise: each of the hard links to a file is a reference to the same I<i-"
12829 "node number>, where an i-node number is an index into the i-node table, "
12830 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
12831 "Changes to a file are independent of the name used to reference the file.  "
12832 "Hard links may not refer to directories (to prevent the possibility of loops "
12833 "within the file system tree, which would confuse many programs)  and may not "
12834 "refer to files on different file systems (because i-node numbers are not "
12835 "unique across file systems)."
12836
12837 #. type: Plain text
12838 #: build/C/man7/symlink.7:65
12839 msgid ""
12840 "A symbolic link is a special type of file whose contents are a string that "
12841 "is the pathname another file, the file to which the link refers.  In other "
12842 "words, a symbolic link is a pointer to another name, and not to an "
12843 "underlying object.  For this reason, symbolic links may refer to directories "
12844 "and may cross file system boundaries."
12845 msgstr ""
12846 "A symbolic link is a special type of file whose contents are a string that "
12847 "is the pathname another file, the file to which the link refers.  In other "
12848 "words, a symbolic link is a pointer to another name, and not to an "
12849 "underlying object.  For this reason, symbolic links may refer to directories "
12850 "and may cross file system boundaries."
12851
12852 #. type: Plain text
12853 #: build/C/man7/symlink.7:71
12854 msgid ""
12855 "There is no requirement that the pathname referred to by a symbolic link "
12856 "should exist.  A symbolic link that refers to a pathname that does not exist "
12857 "is said to be a I<dangling link>."
12858 msgstr ""
12859 "There is no requirement that the pathname referred to by a symbolic link "
12860 "should exist.  A symbolic link that refers to a pathname that does not exist "
12861 "is said to be a I<dangling link>."
12862
12863 #. type: Plain text
12864 #: build/C/man7/symlink.7:83
12865 msgid ""
12866 "Because a symbolic link and its referenced object coexist in the file system "
12867 "name space, confusion can arise in distinguishing between the link itself "
12868 "and the referenced object.  On historical systems, commands and system calls "
12869 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
12870 "Rules for a more uniform approach, as they are implemented on Linux and "
12871 "other systems, are outlined here.  It is important that site-local "
12872 "applications also conform to these rules, so that the user interface can be "
12873 "as consistent as possible."
12874 msgstr ""
12875 "Because a symbolic link and its referenced object coexist in the file system "
12876 "name space, confusion can arise in distinguishing between the link itself "
12877 "and the referenced object.  On historical systems, commands and system calls "
12878 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
12879 "Rules for a more uniform approach, as they are implemented on Linux and "
12880 "other systems, are outlined here.  It is important that site-local "
12881 "applications also conform to these rules, so that the user interface can be "
12882 "as consistent as possible."
12883
12884 #. type: SS
12885 #: build/C/man7/symlink.7:83
12886 #, no-wrap
12887 msgid "Symbolic link ownership, permissions, and timestamps"
12888 msgstr "Symbolic link ownership, permissions, and timestamps"
12889
12890 #. type: Plain text
12891 #: build/C/man7/symlink.7:91
12892 msgid ""
12893 "The owner and group of an existing symbolic link can be changed using "
12894 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
12895 "is when the link is being removed or renamed in a directory that has the "
12896 "sticky bit set (see B<stat>(2))."
12897 msgstr ""
12898 "The owner and group of an existing symbolic link can be changed using "
12899 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
12900 "is when the link is being removed or renamed in a directory that has the "
12901 "sticky bit set (see B<stat>(2))."
12902
12903 #. type: Plain text
12904 #: build/C/man7/symlink.7:97
12905 msgid ""
12906 "The last access and last modification timestamps of a symbolic link can be "
12907 "changed using B<utimensat>(2)  or B<lutimes>(3)."
12908 msgstr ""
12909 "The last access and last modification timestamps of a symbolic link can be "
12910 "changed using B<utimensat>(2)  or B<lutimes>(3)."
12911
12912 #.  Linux does not currently implement an lchmod(2).
12913 #.  The
12914 #.  4.4BSD
12915 #.  system differs from historical
12916 #.  4BSD
12917 #.  systems in that the system call
12918 #.  .BR chown (2)
12919 #.  has been changed to follow symbolic links.
12920 #.  The
12921 #.  .BR lchown (2)
12922 #.  system call was added later when the limitations of the new
12923 #.  .BR chown (2)
12924 #.  became apparent.
12925 #. type: Plain text
12926 #: build/C/man7/symlink.7:116
12927 msgid ""
12928 "On Linux, the permissions of a symbolic link are not used in any operations; "
12929 "the permissions are always 0777 (read, write, and execute for all user "
12930 "categories), and can't be changed."
12931 msgstr ""
12932 "On Linux, the permissions of a symbolic link are not used in any operations; "
12933 "the permissions are always 0777 (read, write, and execute for all user "
12934 "categories), and can't be changed."
12935
12936 #. type: SS
12937 #: build/C/man7/symlink.7:116
12938 #, no-wrap
12939 msgid "Handling of symbolic links by system calls and commands"
12940 msgstr "Handling of symbolic links by system calls and commands"
12941
12942 #. type: Plain text
12943 #: build/C/man7/symlink.7:131
12944 msgid ""
12945 "Symbolic links are handled either by operating on the link itself, or by "
12946 "operating on the object referred to by the link.  In the latter case, an "
12947 "application or system call is said to I<follow> the link.  Symbolic links "
12948 "may refer to other symbolic links, in which case the links are dereferenced "
12949 "until an object that is not a symbolic link is found, a symbolic link that "
12950 "refers to a file which does not exist is found, or a loop is detected.  "
12951 "(Loop detection is done by placing an upper limit on the number of links "
12952 "that may be followed, and an error results if this limit is exceeded.)"
12953 msgstr ""
12954 "Symbolic links are handled either by operating on the link itself, or by "
12955 "operating on the object referred to by the link.  In the latter case, an "
12956 "application or system call is said to I<follow> the link.  Symbolic links "
12957 "may refer to other symbolic links, in which case the links are dereferenced "
12958 "until an object that is not a symbolic link is found, a symbolic link that "
12959 "refers to a file which does not exist is found, or a loop is detected.  "
12960 "(Loop detection is done by placing an upper limit on the number of links "
12961 "that may be followed, and an error results if this limit is exceeded.)"
12962
12963 #. type: Plain text
12964 #: build/C/man7/symlink.7:134
12965 msgid ""
12966 "There are three separate areas that need to be discussed.  They are as "
12967 "follows:"
12968 msgstr ""
12969 "There are three separate areas that need to be discussed.  They are as "
12970 "follows:"
12971
12972 #. type: IP
12973 #: build/C/man7/symlink.7:134
12974 #, no-wrap
12975 msgid "1."
12976 msgstr "1."
12977
12978 #. type: Plain text
12979 #: build/C/man7/symlink.7:136
12980 msgid "Symbolic links used as filename arguments for system calls."
12981 msgstr "Symbolic links used as filename arguments for system calls."
12982
12983 #. type: IP
12984 #: build/C/man7/symlink.7:136
12985 #, no-wrap
12986 msgid "2."
12987 msgstr "2."
12988
12989 #. type: Plain text
12990 #: build/C/man7/symlink.7:139
12991 msgid ""
12992 "Symbolic links specified as command-line arguments to utilities that are not "
12993 "traversing a file tree."
12994 msgstr ""
12995 "Symbolic links specified as command-line arguments to utilities that are not "
12996 "traversing a file tree."
12997
12998 #. type: IP
12999 #: build/C/man7/symlink.7:139
13000 #, no-wrap
13001 msgid "3."
13002 msgstr "3."
13003
13004 #. type: Plain text
13005 #: build/C/man7/symlink.7:143
13006 msgid ""
13007 "Symbolic links encountered by utilities that are traversing a file tree "
13008 "(either specified on the command line or encountered as part of the file "
13009 "hierarchy walk)."
13010 msgstr ""
13011 "Symbolic links encountered by utilities that are traversing a file tree "
13012 "(either specified on the command line or encountered as part of the file "
13013 "hierarchy walk)."
13014
13015 #. type: SS
13016 #: build/C/man7/symlink.7:143
13017 #, no-wrap
13018 msgid "System calls"
13019 msgstr "System calls"
13020
13021 #. type: Plain text
13022 #: build/C/man7/symlink.7:146
13023 msgid ""
13024 "The first area is symbolic links used as filename arguments for system calls."
13025 msgstr ""
13026 "The first area is symbolic links used as filename arguments for system calls."
13027
13028 #. type: Plain text
13029 #: build/C/man7/symlink.7:156
13030 msgid ""
13031 "Except as noted below, all system calls follow symbolic links.  For example, "
13032 "if there were a symbolic link I<slink> which pointed to a file named "
13033 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13034 "descriptor referring to the file I<afile>."
13035 msgstr ""
13036 "Except as noted below, all system calls follow symbolic links.  For example, "
13037 "if there were a symbolic link I<slink> which pointed to a file named "
13038 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13039 "descriptor referring to the file I<afile>."
13040
13041 #.  Maybe one day: .BR fchownat (2)
13042 #. type: Plain text
13043 #: build/C/man7/symlink.7:206
13044 msgid ""
13045 "Various system calls do not follow links, and operate on the symbolic link "
13046 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13047 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13048 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13049 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13050 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13051 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13052 "(2), that library function also does not follow symbolic links.  When "
13053 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13054 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13055 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13056 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13057 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13058 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13059 "to allow either behavior in an implementation."
13060 msgstr ""
13061 "Various system calls do not follow links, and operate on the symbolic link "
13062 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13063 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13064 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13065 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13066 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13067 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13068 "(2), that library function also does not follow symbolic links.  When "
13069 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13070 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13071 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13072 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13073 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13074 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13075 "to allow either behavior in an implementation."
13076
13077 #. type: SS
13078 #: build/C/man7/symlink.7:206
13079 #, no-wrap
13080 msgid "Commands not traversing a file tree"
13081 msgstr "Commands not traversing a file tree"
13082
13083 #. type: Plain text
13084 #: build/C/man7/symlink.7:209
13085 msgid ""
13086 "The second area is symbolic links, specified as command-line filename "
13087 "arguments, to commands which are not traversing a file tree."
13088 msgstr ""
13089 "The second area is symbolic links, specified as command-line filename "
13090 "arguments, to commands which are not traversing a file tree."
13091
13092 #. type: Plain text
13093 #: build/C/man7/symlink.7:220
13094 msgid ""
13095 "Except as noted below, commands follow symbolic links named as command-line "
13096 "arguments.  For example, if there were a symbolic link I<slink> which "
13097 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13098 "contents of the file I<afile>."
13099 msgstr ""
13100 "Except as noted below, commands follow symbolic links named as command-line "
13101 "arguments.  For example, if there were a symbolic link I<slink> which "
13102 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13103 "contents of the file I<afile>."
13104
13105 #. type: Plain text
13106 #: build/C/man7/symlink.7:228
13107 msgid ""
13108 "It is important to realize that this rule includes commands which may "
13109 "optionally traverse file trees, e.g., the command I<chown file> is included "
13110 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13111 "traversal, is not.  (The latter is described in the third area, below.)"
13112 msgstr ""
13113 "It is important to realize that this rule includes commands which may "
13114 "optionally traverse file trees, e.g., the command I<chown file> is included "
13115 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13116 "traversal, is not.  (The latter is described in the third area, below.)"
13117
13118 #. type: Plain text
13119 #: build/C/man7/symlink.7:246
13120 msgid ""
13121 "If it is explicitly intended that the command operate on the symbolic link "
13122 "instead of following the symbolic link, e.g., it is desired that I<chown "
13123 "slink> change the ownership of the file that I<slink> is, whether it is a "
13124 "symbolic link or not, the I<-h> option should be used.  In the above "
13125 "example, I<chown root slink> would change the ownership of the file referred "
13126 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13127 "I<slink> itself."
13128 msgstr ""
13129 "If it is explicitly intended that the command operate on the symbolic link "
13130 "instead of following the symbolic link, e.g., it is desired that I<chown "
13131 "slink> change the ownership of the file that I<slink> is, whether it is a "
13132 "symbolic link or not, the I<-h> option should be used.  In the above "
13133 "example, I<chown root slink> would change the ownership of the file referred "
13134 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13135 "I<slink> itself."
13136
13137 #. type: Plain text
13138 #: build/C/man7/symlink.7:248
13139 msgid "There are some exceptions to this rule:"
13140 msgstr "There are some exceptions to this rule:"
13141
13142 #. type: Plain text
13143 #: build/C/man7/symlink.7:258
13144 msgid ""
13145 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13146 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13147 "the symbolic link references a file via a relative path, moving it to "
13148 "another directory may very well cause it to stop working, since the path may "
13149 "no longer be correct.)"
13150 msgstr ""
13151 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13152 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13153 "the symbolic link references a file via a relative path, moving it to "
13154 "another directory may very well cause it to stop working, since the path may "
13155 "no longer be correct.)"
13156
13157 #. type: Plain text
13158 #: build/C/man7/symlink.7:288
13159 msgid ""
13160 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13161 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13162 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13163 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13164 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13165 "the only command where the I<-H> and I<-L> options affect its behavior even "
13166 "though it is not doing a walk of a file tree.)"
13167 msgstr ""
13168 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13169 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13170 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13171 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13172 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13173 "the only command where the I<-H> and I<-L> options affect its behavior even "
13174 "though it is not doing a walk of a file tree.)"
13175
13176 #. The 4.4BSD system differs from historical 4BSD systems in that the
13177 #. .BR chown (1)
13178 #. and
13179 #. .BR chgrp (1)
13180 #. commands follow symbolic links specified on the command line.
13181 #. type: Plain text
13182 #: build/C/man7/symlink.7:306
13183 msgid ""
13184 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13185 "command does not follow symbolic links named as argument by default.  The "
13186 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13187 "L> option is specified."
13188 msgstr ""
13189 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13190 "command does not follow symbolic links named as argument by default.  The "
13191 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13192 "L> option is specified."
13193
13194 #. type: SS
13195 #: build/C/man7/symlink.7:306
13196 #, no-wrap
13197 msgid "Commands traversing a file tree"
13198 msgstr "Commands traversing a file tree"
13199
13200 #. type: Plain text
13201 #: build/C/man7/symlink.7:319
13202 msgid ""
13203 "The following commands either optionally or always traverse file trees: "
13204 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13205 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13206 msgstr ""
13207 "The following commands either optionally or always traverse file trees: "
13208 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>"
13209 "(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
13210
13211 #. type: Plain text
13212 #: build/C/man7/symlink.7:323
13213 msgid ""
13214 "It is important to realize that the following rules apply equally to "
13215 "symbolic links encountered during the file tree traversal and symbolic links "
13216 "listed as command-line arguments."
13217 msgstr ""
13218 "It is important to realize that the following rules apply equally to "
13219 "symbolic links encountered during the file tree traversal and symbolic links "
13220 "listed as command-line arguments."
13221
13222 #. type: Plain text
13223 #: build/C/man7/symlink.7:328
13224 msgid ""
13225 "The I<first rule> applies to symbolic links that reference files other than "
13226 "directories.  Operations that apply to symbolic links are performed on the "
13227 "links themselves, but otherwise the links are ignored."
13228 msgstr ""
13229 "The I<first rule> applies to symbolic links that reference files other than "
13230 "directories.  Operations that apply to symbolic links are performed on the "
13231 "links themselves, but otherwise the links are ignored."
13232
13233 #. type: Plain text
13234 #: build/C/man7/symlink.7:340
13235 msgid ""
13236 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13237 "symbolic links encountered in the tree traversal of I<directory>, because "
13238 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13239 "referred to by I<slink>."
13240 msgstr ""
13241 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13242 "symbolic links encountered in the tree traversal of I<directory>, because "
13243 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13244 "referred to by I<slink>."
13245
13246 #. type: Plain text
13247 #: build/C/man7/symlink.7:345
13248 msgid ""
13249 "The I<second rule> applies to symbolic links that refer to directories.  "
13250 "Symbolic links that refer to directories are never followed by default.  "
13251 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13252 "\" walk (where symbolic links the refer to directories are followed)."
13253 msgstr ""
13254 "The I<second rule> applies to symbolic links that refer to directories.  "
13255 "Symbolic links that refer to directories are never followed by default.  "
13256 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13257 "\" walk (where symbolic links the refer to directories are followed)."
13258
13259 #. type: Plain text
13260 #: build/C/man7/symlink.7:348
13261 msgid ""
13262 "Certain conventions are (should be) followed as consistently as possible by "
13263 "commands that perform file tree walks:"
13264 msgstr ""
13265 "Certain conventions are (should be) followed as consistently as possible by "
13266 "commands that perform file tree walks:"
13267
13268 #. type: Plain text
13269 #: build/C/man7/symlink.7:361
13270 msgid ""
13271 "A command can be made to follow any symbolic links named on the command "
13272 "line, regardless of the type of file they reference, by specifying the I<-H> "
13273 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13274 "name space look like the logical name space.  (Note, for commands that do "
13275 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13276 "R> flag is not also specified.)"
13277 msgstr ""
13278 "A command can be made to follow any symbolic links named on the command "
13279 "line, regardless of the type of file they reference, by specifying the I<-H> "
13280 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13281 "name space look like the logical name space.  (Note, for commands that do "
13282 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13283 "R> flag is not also specified.)"
13284
13285 #. type: Plain text
13286 #: build/C/man7/symlink.7:377
13287 msgid ""
13288 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13289 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13290 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13291 "symbolic links specified on the command line to be dereferenced for the "
13292 "purposes of both the action to be performed and the tree walk, and it is as "
13293 "if the user had specified the name of the file to which the symbolic link "
13294 "pointed."
13295 msgstr ""
13296 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13297 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13298 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13299 "symbolic links specified on the command line to be dereferenced for the "
13300 "purposes of both the action to be performed and the tree walk, and it is as "
13301 "if the user had specified the name of the file to which the symbolic link "
13302 "pointed."
13303
13304 #. type: Plain text
13305 #: build/C/man7/symlink.7:391
13306 msgid ""
13307 "A command can be made to follow any symbolic links named on the command "
13308 "line, as well as any symbolic links encountered during the traversal, "
13309 "regardless of the type of file they reference, by specifying the I<-L> (for "
13310 "\"logical\") flag.  This flag is intended to make the entire name space look "
13311 "like the logical name space.  (Note, for commands that do not always do file "
13312 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13313 "also specified.)"
13314 msgstr ""
13315 "A command can be made to follow any symbolic links named on the command "
13316 "line, as well as any symbolic links encountered during the traversal, "
13317 "regardless of the type of file they reference, by specifying the I<-L> (for "
13318 "\"logical\") flag.  This flag is intended to make the entire name space look "
13319 "like the logical name space.  (Note, for commands that do not always do file "
13320 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13321 "also specified.)"
13322
13323 #. type: Plain text
13324 #: build/C/man7/symlink.7:406
13325 msgid ""
13326 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13327 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13328 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13329 "references.  In addition, if any symbolic links are encountered in any file "
13330 "tree that B<chown> traverses, they will be treated in the same fashion as "
13331 "I<slink>."
13332 msgstr ""
13333 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13334 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13335 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13336 "references.  In addition, if any symbolic links are encountered in any file "
13337 "tree that B<chown> traverses, they will be treated in the same fashion as "
13338 "I<slink>."
13339
13340 #. type: Plain text
13341 #: build/C/man7/symlink.7:413
13342 msgid ""
13343 "A command can be made to provide the default behavior by specifying the I<-"
13344 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13345 "space look like the physical name space."
13346 msgstr ""
13347 "A command can be made to provide the default behavior by specifying the I<-"
13348 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13349 "space look like the physical name space."
13350
13351 #. type: Plain text
13352 #: build/C/man7/symlink.7:431
13353 msgid ""
13354 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13355 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13356 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13357 "once; the last one specified determines the command's behavior.  This is "
13358 "intended to permit you to alias commands to behave one way or the other, and "
13359 "then override that behavior on the command line."
13360 msgstr ""
13361 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13362 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13363 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13364 "once; the last one specified determines the command's behavior.  This is "
13365 "intended to permit you to alias commands to behave one way or the other, and "
13366 "then override that behavior on the command line."
13367
13368 #. type: Plain text
13369 #: build/C/man7/symlink.7:437
13370 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13371 msgstr "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13372
13373 #. type: Plain text
13374 #: build/C/man7/symlink.7:450
13375 msgid ""
13376 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13377 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13378 "command does not support the I<-H>, I<-L>, or I<-P> options."
13379 msgstr ""
13380 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13381 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13382 "command does not support the I<-H>, I<-L>, or I<-P> options."
13383
13384 #. type: Plain text
13385 #: build/C/man7/symlink.7:470
13386 msgid ""
13387 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13388 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13389 "options, B<ls>(1)  will follow symbolic links specified on the command "
13390 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13391 "regardless of their type, whether specified on the command line or "
13392 "encountered in the tree walk."
13393 msgstr ""
13394 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13395 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13396 "options, B<ls>(1)  will follow symbolic links specified on the command "
13397 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13398 "regardless of their type, whether specified on the command line or "
13399 "encountered in the tree walk."
13400
13401 #. type: Plain text
13402 #: build/C/man7/symlink.7:487
13403 msgid ""
13404 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13405 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13406 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13407 "B<path_resolution>(7)"
13408 msgstr ""
13409 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13410 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13411 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13412 "B<path_resolution>(7)"
13413
13414 #. type: TH
13415 #: build/C/man3/tempnam.3:23
13416 #, no-wrap
13417 msgid "TEMPNAM"
13418 msgstr "TEMPNAM"
13419
13420 #. type: TH
13421 #: build/C/man3/tempnam.3:23
13422 #, no-wrap
13423 msgid "2008-08-06"
13424 msgstr "2008-08-06"
13425
13426 #. type: Plain text
13427 #: build/C/man3/tempnam.3:26
13428 msgid "tempnam - create a name for a temporary file"
13429 msgstr "tempnam - テンポラリファイルの名前を作成する"
13430
13431 #. type: Plain text
13432 #: build/C/man3/tempnam.3:31
13433 #, no-wrap
13434 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13435 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13436
13437 #. type: Plain text
13438 #: build/C/man3/tempnam.3:40
13439 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13440 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13441
13442 #. type: Plain text
13443 #: build/C/man3/tempnam.3:54
13444 msgid ""
13445 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13446 "filename, and such that a file with this name did not exist when B<tempnam>"
13447 "()  checked.  The filename suffix of the pathname generated will start with "
13448 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13449 "directory prefix part of the pathname generated is required to be "
13450 "\"appropriate\" (often that at least implies writable)."
13451 msgstr ""
13452 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 この"
13453 "ファイル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在し"
13454 "ない (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成"
13455 "されるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成され"
13456 "るディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」であ"
13457 "るためにはまず少なくとも 書き込み可能でなければならない)。"
13458
13459 #. type: Plain text
13460 #: build/C/man3/tempnam.3:57
13461 msgid ""
13462 "Attempts to find an appropriate directory go through the following steps:"
13463 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13464
13465 #. type: TP
13466 #: build/C/man3/tempnam.3:57
13467 #, no-wrap
13468 msgid "a)"
13469 msgstr "a)"
13470
13471 #. type: Plain text
13472 #: build/C/man3/tempnam.3:63
13473 msgid ""
13474 "In case the environment variable B<TMPDIR> exists and contains the name of "
13475 "an appropriate directory, that is used."
13476 msgstr ""
13477 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13478 "ら、それを用いる。"
13479
13480 #. type: TP
13481 #: build/C/man3/tempnam.3:63
13482 #, no-wrap
13483 msgid "b)"
13484 msgstr "b)"
13485
13486 #. type: Plain text
13487 #: build/C/man3/tempnam.3:68
13488 msgid ""
13489 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13490 msgstr ""
13491 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13492 "る。"
13493
13494 #. type: TP
13495 #: build/C/man3/tempnam.3:68
13496 #, no-wrap
13497 msgid "c)"
13498 msgstr "c)"
13499
13500 #. type: Plain text
13501 #: build/C/man3/tempnam.3:75
13502 msgid ""
13503 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13504 "appropriate."
13505 msgstr ""
13506 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13507 "なら、それを用いる。"
13508
13509 #. type: TP
13510 #: build/C/man3/tempnam.3:75
13511 #, no-wrap
13512 msgid "d)"
13513 msgstr "d)"
13514
13515 #. type: Plain text
13516 #: build/C/man3/tempnam.3:78
13517 msgid "Finally an implementation-defined directory may be used."
13518 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13519
13520 #. type: Plain text
13521 #: build/C/man3/tempnam.3:85
13522 msgid ""
13523 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13524 "hence should be freed by B<free>(3)."
13525 msgstr ""
13526 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13527 "B<free>(3)  で解放すべきである。"
13528
13529 #. type: Plain text
13530 #: build/C/man3/tempnam.3:90
13531 msgid ""
13532 "The B<tempnam>()  function returns a pointer to a unique temporary filename, "
13533 "or NULL if a unique name cannot be generated."
13534 msgstr ""
13535 "B<tempnam>()  関数は他と重ならないテンポラリファイル名へのポインタを返す。 他"
13536 "と重ならない名前が生成できなければ NULL を返す。"
13537
13538 #. type: Plain text
13539 #: build/C/man3/tempnam.3:94
13540 msgid "Allocation of storage failed."
13541 msgstr "保存領域の割り当てに失敗した。"
13542
13543 #. type: Plain text
13544 #: build/C/man3/tempnam.3:99
13545 msgid ""
13546 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13547 msgstr ""
13548 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13549 "る。"
13550
13551 #. type: Plain text
13552 #: build/C/man3/tempnam.3:118
13553 msgid ""
13554 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13555 "nevertheless possible that between the time that B<tempnam>()  returns a "
13556 "pathname, and the time that the program opens it, another program might "
13557 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13558 "This can lead to security holes.  To avoid such possibilities, use the "
13559 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13560 "B<mkstemp>(3)  or B<tmpfile>(3)."
13561 msgstr ""
13562 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13563 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13564 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13565 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13566 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13567 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13568 "B<tmpfile>(3)  を使うことである。"
13569
13570 #. type: Plain text
13571 #: build/C/man3/tempnam.3:126
13572 msgid ""
13573 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13574 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13575 "tmp> (and this is what glibc does)."
13576 msgstr ""
13577 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13578 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13579 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13580
13581 #. type: Plain text
13582 #: build/C/man3/tempnam.3:131
13583 msgid ""
13584 "Because it dynamically allocates memory used to return the pathname, "
13585 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13586 msgstr ""
13587 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13588 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13589
13590 #. type: Plain text
13591 #: build/C/man3/tempnam.3:144
13592 msgid ""
13593 "The B<tempnam>()  function generates a different string each time it is "
13594 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13595 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13596 msgstr ""
13597 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13598 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13599 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13600
13601 #. type: Plain text
13602 #: build/C/man3/tempnam.3:148
13603 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13604 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13605
13606 #. type: Plain text
13607 #: build/C/man3/tempnam.3:154
13608 msgid ""
13609 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13610 "upon failure to find a unique name."
13611 msgstr ""
13612 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13613 "ラー B<EEXIST> で失敗する。"
13614
13615 #. type: Plain text
13616 #: build/C/man3/tempnam.3:157
13617 msgid ""
13618 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13619 "accessibility of a directory is determined."
13620 msgstr ""
13621 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13622 "度のアクセス権限が必要なのかは指定されていない。"
13623
13624 #. type: Plain text
13625 #: build/C/man3/tempnam.3:164 build/C/man3/tmpnam.3:151
13626 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
13627 msgstr ""
13628 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
13629 "を使うこと。"
13630
13631 #. type: Plain text
13632 #: build/C/man3/tempnam.3:168
13633 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13634 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13635
13636 #. type: TH
13637 #: build/C/man3/tmpfile.3:29
13638 #, no-wrap
13639 msgid "TMPFILE"
13640 msgstr "TMPFILE"
13641
13642 #. type: Plain text
13643 #: build/C/man3/tmpfile.3:32
13644 msgid "tmpfile - create a temporary file"
13645 msgstr "tmpfile - テンポラリファイルを作成する"
13646
13647 #. type: Plain text
13648 #: build/C/man3/tmpfile.3:37
13649 #, no-wrap
13650 msgid "B<FILE *tmpfile(void);>\n"
13651 msgstr "B<FILE *tmpfile(void);>\n"
13652
13653 #. type: Plain text
13654 #: build/C/man3/tmpfile.3:45
13655 msgid ""
13656 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
13657 "write (w+b) mode.  The file will be automatically deleted when it is closed "
13658 "or the program terminates."
13659 msgstr ""
13660 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
13661 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
13662 "自動的に削除される。"
13663
13664 #. type: Plain text
13665 #: build/C/man3/tmpfile.3:52
13666 msgid ""
13667 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
13668 "filename cannot be generated or the unique file cannot be opened.  In the "
13669 "latter case, I<errno> is set to indicate the error."
13670 msgstr ""
13671 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
13672 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
13673 "I<errno> を設定する。"
13674
13675 #. type: Plain text
13676 #: build/C/man3/tmpfile.3:56
13677 msgid "Search permission denied for directory in file's path prefix."
13678 msgstr ""
13679 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
13680
13681 #. type: Plain text
13682 #: build/C/man3/tmpfile.3:59
13683 msgid "Unable to generate a unique filename."
13684 msgstr "ユニークなファイル名が作成できなかった。"
13685
13686 #. type: Plain text
13687 #: build/C/man3/tmpfile.3:62
13688 msgid "The call was interrupted by a signal."
13689 msgstr "呼び出しがシグナルによって中断された。"
13690
13691 #. type: Plain text
13692 #: build/C/man3/tmpfile.3:65
13693 msgid "Too many file descriptors in use by the process."
13694 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
13695
13696 #. type: Plain text
13697 #: build/C/man3/tmpfile.3:68
13698 msgid "Too many files open in the system."
13699 msgstr "システム全体でオープン可能なファイル数を超過した。"
13700
13701 #. type: Plain text
13702 #: build/C/man3/tmpfile.3:71
13703 msgid "There was no room in the directory to add the new filename."
13704 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
13705
13706 #. type: Plain text
13707 #: build/C/man3/tmpfile.3:74
13708 msgid "Read-only file system."
13709 msgstr "読みだし専用ファイルシステムである。"
13710
13711 #. type: Plain text
13712 #: build/C/man3/tmpfile.3:76
13713 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
13714 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
13715
13716 #. type: Plain text
13717 #: build/C/man3/tmpfile.3:80
13718 msgid ""
13719 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
13720 "stream cannot be opened."
13721 msgstr ""
13722 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
13723 "メッセージが書き出される、と規定されている。"
13724
13725 #. type: Plain text
13726 #: build/C/man3/tmpfile.3:86
13727 msgid ""
13728 "The standard does not specify the directory that B<tmpfile>()  will use.  "
13729 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
13730 "and if that fails the directory I</tmp>."
13731 msgstr ""
13732 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
13733 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
13734 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
13735
13736 #. type: Plain text
13737 #: build/C/man3/tmpfile.3:91
13738 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
13739 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
13740
13741 #. type: TH
13742 #: build/C/man3/tmpnam.3:25
13743 #, no-wrap
13744 msgid "TMPNAM"
13745 msgstr "TMPNAM"
13746
13747 #. type: TH
13748 #: build/C/man3/tmpnam.3:25
13749 #, no-wrap
13750 msgid "2010-09-10"
13751 msgstr "2010-09-10"
13752
13753 #. type: Plain text
13754 #: build/C/man3/tmpnam.3:28
13755 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
13756 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
13757
13758 #. type: Plain text
13759 #: build/C/man3/tmpnam.3:33
13760 #, no-wrap
13761 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
13762 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
13763
13764 #. type: Plain text
13765 #: build/C/man3/tmpnam.3:56
13766 msgid ""
13767 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
13768 "filename, and such that a file with this name did not exist at some point in "
13769 "time, so that naive programmers may think it a suitable name for a temporary "
13770 "file.  If the argument I<s> is NULL this name is generated in an internal "
13771 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
13772 "I<s> is not NULL, the name is copied to the character array (of length at "
13773 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
13774 "case of success."
13775 msgstr ""
13776 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
13777 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
13778 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
13779 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
13780 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
13781 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
13782 "ピーされ、 成功した場合は I<s> が返される。"
13783
13784 #. type: Plain text
13785 #: build/C/man3/tmpnam.3:68
13786 msgid ""
13787 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
13788 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
13789 "the B<TMP_MAX> mentioned below.)"
13790 msgstr ""
13791 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
13792 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
13793 "hE<gt>> で定義されている。)"
13794
13795 #. type: Plain text
13796 #: build/C/man3/tmpnam.3:73
13797 msgid ""
13798 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
13799 "or NULL if a unique name cannot be generated."
13800 msgstr ""
13801 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
13802 "が作成できなかった場合は NULL を返す。"
13803
13804 #. type: Plain text
13805 #: build/C/man3/tmpnam.3:75
13806 msgid "No errors are defined."
13807 msgstr "エラーは定義されていない。"
13808
13809 #. type: Plain text
13810 #: build/C/man3/tmpnam.3:80
13811 msgid ""
13812 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
13813 "obsolete."
13814 msgstr ""
13815 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
13816 "定としている。"
13817
13818 #. type: Plain text
13819 #: build/C/man3/tmpnam.3:91
13820 msgid ""
13821 "The B<tmpnam>()  function generates a different string each time it is "
13822 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
13823 "the behavior is implementation defined."
13824 msgstr ""
13825 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
13826 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
13827
13828 #. type: Plain text
13829 #: build/C/man3/tmpnam.3:110
13830 msgid ""
13831 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
13832 "nevertheless possible that between the time that B<tmpnam>()  returns a "
13833 "pathname, and the time that the program opens it, another program might "
13834 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13835 "This can lead to security holes.  To avoid such possibilities, use the "
13836 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13837 "B<mkstemp>(3)  or B<tmpfile>(3)."
13838 msgstr ""
13839 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
13840 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13841 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13842 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13843 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13844 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13845 "B<tmpfile>(3)  を使うことである。"
13846
13847 #. type: Plain text
13848 #: build/C/man3/tmpnam.3:118
13849 msgid ""
13850 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
13851 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
13852 "defined."
13853 msgstr ""
13854 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
13855 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
13856 "NULL 引き数で呼び出してはならない。"
13857
13858 #. type: Plain text
13859 #: build/C/man3/tmpnam.3:122
13860 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
13861 msgstr ""
13862 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
13863 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
13864 "扱いしている。"
13865
13866 #. type: Plain text
13867 #: build/C/man3/tmpnam.3:130
13868 #, no-wrap
13869 msgid ""
13870 "char *\n"
13871 "tmpnam_r(char *s)\n"
13872 "{\n"
13873 "    return s ? tmpnam(s) : NULL;\n"
13874 "}\n"
13875 msgstr ""
13876 "char *\n"
13877 "tmpnam_r(char *s)\n"
13878 "{\n"
13879 "    return s ? tmpnam(s) : NULL;\n"
13880 "}\n"
13881
13882 #. type: Plain text
13883 #: build/C/man3/tmpnam.3:144
13884 msgid ""
13885 "apparently as a warning not to use NULL.  A few systems implement it.  To "
13886 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
13887 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
13888 msgstr ""
13889 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
13890 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
13891 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
13892 "がある。"
13893
13894 #. type: Plain text
13895 #: build/C/man3/tmpnam.3:155
13896 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
13897 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
13898
13899 #. type: TH
13900 #: build/C/man2/unlink.2:32
13901 #, no-wrap
13902 msgid "UNLINK"
13903 msgstr "UNLINK"
13904
13905 #. type: TH
13906 #: build/C/man2/unlink.2:32
13907 #, no-wrap
13908 msgid "2011-09-15"
13909 msgstr "2011-09-15"
13910
13911 #. type: Plain text
13912 #: build/C/man2/unlink.2:35
13913 msgid "unlink - delete a name and possibly the file it refers to"
13914 msgstr ""
13915 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
13916
13917 #. type: Plain text
13918 #: build/C/man2/unlink.2:39
13919 msgid "B<int unlink(const char *>I<pathname>B<);>"
13920 msgstr "B<int unlink(const char *>I<pathname>B<);>"
13921
13922 #. type: Plain text
13923 #: build/C/man2/unlink.2:45
13924 msgid ""
13925 "B<unlink>()  deletes a name from the file system.  If that name was the last "
13926 "link to a file and no processes have the file open the file is deleted and "
13927 "the space it was using is made available for reuse."
13928 msgstr ""
13929 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
13930 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
13931 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
13932 "は再利用が可能になる。"
13933
13934 #. type: Plain text
13935 #: build/C/man2/unlink.2:49
13936 msgid ""
13937 "If the name was the last link to a file but any processes still have the "
13938 "file open the file will remain in existence until the last file descriptor "
13939 "referring to it is closed."
13940 msgstr ""
13941 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
13942 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
13943 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し"
13944 "続ける。"
13945
13946 #. type: Plain text
13947 #: build/C/man2/unlink.2:51
13948 msgid "If the name referred to a symbolic link the link is removed."
13949 msgstr ""
13950 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンク"
13951 "は削除される。"
13952
13953 #. type: Plain text
13954 #: build/C/man2/unlink.2:55
13955 msgid ""
13956 "If the name referred to a socket, fifo or device the name for it is removed "
13957 "but processes which have the object open may continue to use it."
13958 msgstr ""
13959 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
13960 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
13961 "とができる。"
13962
13963 #. type: Plain text
13964 #: build/C/man2/unlink.2:71
13965 msgid ""
13966 "Write access to the directory containing I<pathname> is not allowed for the "
13967 "process's effective UID, or one of the directories in I<pathname> did not "
13968 "allow search permission.  (See also B<path_resolution>(7).)"
13969 msgstr ""
13970 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
13971 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
13972 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
13973 "と)。"
13974
13975 #. type: Plain text
13976 #: build/C/man2/unlink.2:80
13977 msgid ""
13978 "The file I<pathname> cannot be unlinked because it is being used by the "
13979 "system or another process; for example, it is a mount point or the NFS "
13980 "client software created it to represent an active but otherwise nameless "
13981 "inode (\"NFS silly renamed\")."
13982 msgstr ""
13983
13984 #. type: Plain text
13985 #: build/C/man2/unlink.2:92
13986 msgid ""
13987 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
13988 "Linux since 2.1.132.)"
13989 msgstr ""
13990 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
13991 "で、Linux 2.1.132 以降で返される。)"
13992
13993 #. type: Plain text
13994 #: build/C/man2/unlink.2:96
13995 msgid "Too many symbolic links were encountered in translating I<pathname>."
13996 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13997
13998 #. type: Plain text
13999 #: build/C/man2/unlink.2:106
14000 msgid ""
14001 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
14002 "I<pathname> is empty."
14003 msgstr ""
14004 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクである"
14005 "か、 I<pathname> が空である。"
14006
14007 #. type: Plain text
14008 #: build/C/man2/unlink.2:114
14009 msgid ""
14010 "A component used as a directory in I<pathname> is not, in fact, a directory."
14011 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
14012
14013 #. type: Plain text
14014 #: build/C/man2/unlink.2:123
14015 msgid ""
14016 "The system does not allow unlinking of directories, or unlinking of "
14017 "directories requires privileges that the calling process doesn't have.  "
14018 "(This is the POSIX prescribed error return; as noted above, Linux returns "
14019 "B<EISDIR> for this case.)"
14020 msgstr ""
14021 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
14022 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
14023 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
14024 "合には Linux は B<EISDIR> を返す。)"
14025
14026 #. type: TP
14027 #: build/C/man2/unlink.2:123
14028 #, no-wrap
14029 msgid "B<EPERM> (Linux only)"
14030 msgstr "B<EPERM> (Linux のみ)"
14031
14032 #. type: Plain text
14033 #: build/C/man2/unlink.2:126
14034 msgid "The file system does not allow unlinking of files."
14035 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
14036
14037 #. type: Plain text
14038 #: build/C/man2/unlink.2:137
14039 msgid ""
14040 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
14041 "and the process's effective UID is neither the UID of the file to be deleted "
14042 "nor that of the directory containing it, and the process is not privileged "
14043 "(Linux: does not have the B<CAP_FOWNER> capability)."
14044 msgstr ""
14045 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
14046 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
14047 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
14048 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
14049
14050 #. type: Plain text
14051 #: build/C/man2/unlink.2:141
14052 msgid "I<pathname> refers to a file on a read-only file system."
14053 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
14054
14055 #. type: Plain text
14056 #: build/C/man2/unlink.2:160
14057 msgid ""
14058 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14059 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14060 "(7), B<symlink>(7)"
14061 msgstr ""
14062 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14063 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14064 "(7), B<symlink>(7)"
14065
14066 #. type: TH
14067 #: build/C/man3/unlocked_stdio.3:23
14068 #, no-wrap
14069 msgid "UNLOCKED_STDIO"
14070 msgstr "UNLOCKED_STDIO"
14071
14072 #. type: Plain text
14073 #: build/C/man3/unlocked_stdio.3:27
14074 msgid ""
14075 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14076 "nonlocking stdio functions"
14077 msgstr ""
14078 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14079 "わずに標準入出力を行う関数群"
14080
14081 #. type: Plain text
14082 #: build/C/man3/unlocked_stdio.3:35
14083 #, no-wrap
14084 msgid ""
14085 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14086 "B<int getchar_unlocked(void);>\n"
14087 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14088 "B<int putchar_unlocked(int >I<c>B<);>\n"
14089 msgstr ""
14090 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14091 "B<int getchar_unlocked(void);>\n"
14092 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14093 "B<int putchar_unlocked(int >I<c>B<);>\n"
14094
14095 #. type: Plain text
14096 #: build/C/man3/unlocked_stdio.3:47
14097 #, no-wrap
14098 msgid ""
14099 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14100 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14101 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14102 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14103 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14104 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14105 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14106 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14107 "B<                      FILE *>I<stream>B<);>\n"
14108 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14109 "B<                      FILE *>I<stream>B<);>\n"
14110 msgstr ""
14111 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14112 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14113 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14114 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14115 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14116 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14117 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14118 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14119 "B<                      FILE *>I<stream>B<);>\n"
14120 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14121 "B<                      FILE *>I<stream>B<);>\n"
14122
14123 #. type: Plain text
14124 #: build/C/man3/unlocked_stdio.3:50
14125 #, no-wrap
14126 msgid ""
14127 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14128 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14129 msgstr ""
14130 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14131 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14132
14133 #. type: Plain text
14134 #: build/C/man3/unlocked_stdio.3:61
14135 #, no-wrap
14136 msgid ""
14137 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14138 "B<wint_t getwchar_unlocked(void);>\n"
14139 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14140 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14141 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14142 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14143 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14144 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14145 msgstr ""
14146 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14147 "B<wint_t getwchar_unlocked(void);>\n"
14148 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14149 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14150 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14151 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14152 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14153 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14154
14155 #. type: Plain text
14156 #: build/C/man3/unlocked_stdio.3:73
14157 msgid ""
14158 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14159 "B<putchar_unlocked>():"
14160 msgstr ""
14161 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14162 "B<putchar_unlocked>():"
14163
14164 #. type: Plain text
14165 #: build/C/man3/unlocked_stdio.3:76
14166 msgid ""
14167 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14168 "_BSD_SOURCE || _SVID_SOURCE"
14169 msgstr ""
14170 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14171 "_BSD_SOURCE || _SVID_SOURCE"
14172
14173 #. type: Plain text
14174 #: build/C/man3/unlocked_stdio.3:87
14175 msgid ""
14176 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14177 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14178 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14179 msgstr ""
14180 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14181 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14182 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14183
14184 #. type: Plain text
14185 #: build/C/man3/unlocked_stdio.3:89
14186 msgid "_BSD_SOURCE || _SVID_SOURCE"
14187 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14188
14189 #. type: Plain text
14190 #: build/C/man3/unlocked_stdio.3:100
14191 msgid ""
14192 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14193 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14194 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14195 msgstr ""
14196 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14197 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14198 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14199
14200 #. type: Plain text
14201 #: build/C/man3/unlocked_stdio.3:111
14202 msgid ""
14203 "Each of these functions has the same behavior as its counterpart without the "
14204 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14205 "locks themselves, and do not test for the presence of locks set by others) "
14206 "and hence are thread-unsafe.  See B<flockfile>(3)."
14207 msgstr ""
14208 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14209 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14210 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14211 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14212 "B<flockfile>(3)  を参照のこと。"
14213
14214 #. type: Plain text
14215 #: build/C/man3/unlocked_stdio.3:118
14216 msgid ""
14217 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14218 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14219 msgstr ""
14220 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14221 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14222
14223 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14224 #.  moved to a compatibility library.
14225 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14226 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14227 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14228 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14229 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14230 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14231 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14232 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14233 #.  ungetc_unlocked, ungetwc_unlocked.
14234 #. type: Plain text
14235 #: build/C/man3/unlocked_stdio.3:134
14236 msgid ""
14237 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14238 "are available in recent glibc.  They should probably not be used."
14239 msgstr ""
14240 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14241 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14242
14243 #. type: Plain text
14244 #: build/C/man3/unlocked_stdio.3:136
14245 msgid "B<flockfile>(3), B<stdio>(3)"
14246 msgstr "B<flockfile>(3), B<stdio>(3)"
14247
14248 #. type: TH
14249 #: build/C/man3/wprintf.3:14
14250 #, no-wrap
14251 msgid "WPRINTF"
14252 msgstr "WPRINTF"
14253
14254 #. type: TH
14255 #: build/C/man3/wprintf.3:14
14256 #, no-wrap
14257 msgid "2011-09-17"
14258 msgstr "2011-09-17"
14259
14260 #. type: Plain text
14261 #: build/C/man3/wprintf.3:18
14262 msgid ""
14263 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14264 "character output conversion"
14265 msgstr ""
14266 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14267 "フォーマットして出力する"
14268
14269 #. type: Plain text
14270 #: build/C/man3/wprintf.3:22
14271 #, no-wrap
14272 msgid ""
14273 "B<#include E<lt>stdio.hE<gt>>\n"
14274 "B<#include E<lt>wchar.hE<gt>>\n"
14275 msgstr ""
14276 "B<#include E<lt>stdio.hE<gt>>\n"
14277 "B<#include E<lt>wchar.hE<gt>>\n"
14278
14279 #. type: Plain text
14280 #: build/C/man3/wprintf.3:27
14281 #, no-wrap
14282 msgid ""
14283 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14284 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14285 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14286 "B<             const wchar_t *>I<format>B<, ...);>\n"
14287 msgstr ""
14288 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14289 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14290 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14291 "B<             const wchar_t *>I<format>B<, ...);>\n"
14292
14293 #. type: Plain text
14294 #: build/C/man3/wprintf.3:32
14295 #, no-wrap
14296 msgid ""
14297 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14298 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14299 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14300 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14301 msgstr ""
14302 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14303 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14304 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14305 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14306
14307 #.  .BR wprintf (),
14308 #.  .BR fwprintf (),
14309 #.  .BR swprintf (),
14310 #.  .BR vwprintf (),
14311 #.  .BR vfwprintf (),
14312 #.  .BR vswprintf ():
14313 #. type: Plain text
14314 #: build/C/man3/wprintf.3:49
14315 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14316 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14317
14318 #. type: Plain text
14319 #: build/C/man3/wprintf.3:51
14320 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14321 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14322
14323 #. type: Plain text
14324 #: build/C/man3/wprintf.3:53
14325 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14326 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14327
14328 #. type: Plain text
14329 #: build/C/man3/wprintf.3:56
14330 msgid "or I<cc\\ -std=c99>"
14331 msgstr "or I<cc\\ -std=c99>"
14332
14333 #. type: Plain text
14334 #: build/C/man3/wprintf.3:67
14335 msgid ""
14336 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14337 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14338 "characters."
14339 msgstr ""
14340 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14341 "版である。これらはワイド文字をフォーマットして出力する。"
14342
14343 #. type: Plain text
14344 #: build/C/man3/wprintf.3:77
14345 msgid ""
14346 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14347 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14348 "more information."
14349 msgstr ""
14350 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14351 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14352 "ること。"
14353
14354 #. type: Plain text
14355 #: build/C/man3/wprintf.3:87
14356 msgid ""
14357 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14358 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14359 "for more information."
14360 msgstr ""
14361 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14362 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14363 "B<fwide>(3)  を参照すること。"
14364
14365 #. type: Plain text
14366 #: build/C/man3/wprintf.3:98
14367 msgid ""
14368 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14369 "output to an array of wide characters.  The programmer must ensure that "
14370 "there is room for at least I<maxlen> wide characters at I<wcs>."
14371 msgstr ""
14372 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14373 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14374 "空きがあることを保証しなければ ならない。"
14375
14376 #. type: Plain text
14377 #: build/C/man3/wprintf.3:109
14378 msgid ""
14379 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14380 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14381 "following differences:"
14382 msgstr ""
14383 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14384 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14385
14386 #. type: TP
14387 #: build/C/man3/wprintf.3:109 build/C/man3/wprintf.3:112
14388 #: build/C/man3/wprintf.3:115
14389 #, no-wrap
14390 msgid "B<\\(bu>"
14391 msgstr "B<\\(bu>"
14392
14393 #. type: Plain text
14394 #: build/C/man3/wprintf.3:112
14395 msgid "The I<format> string is a wide-character string."
14396 msgstr "I<format> がワイド文字列で与えられる。"
14397
14398 #. type: Plain text
14399 #: build/C/man3/wprintf.3:115
14400 msgid "The output consists of wide characters, not bytes."
14401 msgstr "出力がバイトではなくワイド文字で構成される。"
14402
14403 #. type: Plain text
14404 #: build/C/man3/wprintf.3:130
14405 msgid ""
14406 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14407 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14408 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14409 "overflow on Linux.)"
14410 msgstr ""
14411 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14412 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14413 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14414 "も -1 を返さない)。"
14415
14416 #. type: Plain text
14417 #: build/C/man3/wprintf.3:132
14418 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14419 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14420
14421 #. type: Plain text
14422 #: build/C/man3/wprintf.3:146
14423 msgid ""
14424 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14425 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14426 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14427 "character) argument is written."
14428 msgstr ""
14429 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14430 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14431 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14432
14433 #. type: Plain text
14434 #: build/C/man3/wprintf.3:185
14435 msgid ""
14436 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14437 "to be a pointer to an array of character type (pointer to a string) "
14438 "containing a multibyte character sequence beginning in the initial shift "
14439 "state.  Characters from the array are converted to wide characters (each by "
14440 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14441 "the initial state before the first byte).  The resulting wide characters are "
14442 "written up to (but not including) the terminating null wide character.  If a "
14443 "precision is specified, no more wide characters than the number specified "
14444 "are written.  Note that the precision determines the number of I<wide "
14445 "characters> written, not the number of I<bytes> or I<screen positions>.  The "
14446 "array must contain a terminating null byte, unless a precision is given and "
14447 "it is so small that the number of converted wide characters reaches it "
14448 "before the end of the array is reached.  If an B<l> modifier is present: The "
14449 "I<const\\ wchar_t\\ *> argument is expected to be a pointer to an array of "
14450 "wide characters.  Wide characters from the array are written up to (but not "
14451 "including) a terminating null wide character.  If a precision is specified, "
14452 "no more than the number specified are written.  The array must contain a "
14453 "terminating null wide character, unless a precision is given and it is "
14454 "smaller than or equal to the number of wide characters in the array."
14455 msgstr ""
14456 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14457 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポイン"
14458 "タ)とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それ"
14459 "ぞれの文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイ"
14460 "ド文字は終端の ナルワイド文字の手前までが書き込まれる。精度(precision)が指定"
14461 "された 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込"
14462 "まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字> の数を指定するこ"
14463 "とに注意すること。 精度がない場合には配列の終端にナル文字を含む必要がある。 "
14464 "精度を指定する場合には、配列の最後に到着する前に変換されたワイド文字の 数がそ"
14465 "れに到達するよう、精度は十分に小さな数でなければならない。 もし B<l> 修飾子が"
14466 "存在する場合、 I<const\\ wchar_t\\ *> 引き数はワイド文字の配列へのポインタ"
14467 "とみなされる。 配列のワイド文字列は終端のナルワイド文字の手間まで出力され"
14468 "る。 もし精度が指定された場合には指定された精度以上の文字は出力されない。 精"
14469 "度を指定しない場合には終端のナルワイド文字を含む必要がある。 精度を指定する場"
14470 "合にはそれはワイド文字の配列の大きさよりも小さくな ければならない。"
14471
14472 #. type: Plain text
14473 #: build/C/man3/wprintf.3:193
14474 msgid ""
14475 "The functions return the number of wide characters written, excluding the "
14476 "terminating null wide character in case of the functions B<swprintf>()  and "
14477 "B<vswprintf>().  They return -1 when an error occurs."
14478 msgstr ""
14479 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14480 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14481 "場合は -1 を返す。"
14482
14483 #. type: Plain text
14484 #: build/C/man3/wprintf.3:195
14485 msgid "C99."
14486 msgstr "C99."
14487
14488 #. type: Plain text
14489 #: build/C/man3/wprintf.3:203
14490 msgid ""
14491 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14492 "the current locale."
14493 msgstr ""
14494 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14495
14496 #. type: Plain text
14497 #: build/C/man3/wprintf.3:229
14498 msgid ""
14499 "If the I<format> string contains non-ASCII wide characters, the program will "
14500 "only work correctly if the B<LC_CTYPE> category of the current locale at run "
14501 "time is the same as the B<LC_CTYPE> category of the current locale at "
14502 "compile time.  This is because the I<wchar_t> representation is platform- "
14503 "and locale-dependent.  (The glibc represents wide characters using their "
14504 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14505 "the use of C99 universal character names of the form \\eunnnn does not solve "
14506 "this problem.)  Therefore, in internationalized programs, the I<format> "
14507 "string should consist of ASCII wide characters only, or should be "
14508 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14509 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14510 msgstr ""
14511 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14512 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14513 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14514 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14515 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14516 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14517 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14518 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14519 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14520
14521 #. type: Plain text
14522 #: build/C/man3/wprintf.3:234
14523 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14524 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14525
14526 #. type: TH
14527 #: build/C/man2/write.2:39
14528 #, no-wrap
14529 msgid "WRITE"
14530 msgstr "WRITE"
14531
14532 #. type: TH
14533 #: build/C/man2/write.2:39
14534 #, no-wrap
14535 msgid "2010-08-29"
14536 msgstr "2010-08-29"
14537
14538 #. type: Plain text
14539 #: build/C/man2/write.2:42
14540 msgid "write - write to a file descriptor"
14541 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14542
14543 #. type: Plain text
14544 #: build/C/man2/write.2:46
14545 msgid ""
14546 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14547 msgstr ""
14548 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14549
14550 #. type: Plain text
14551 #: build/C/man2/write.2:54
14552 msgid ""
14553 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14554 "the file referred to by the file descriptor I<fd>."
14555 msgstr ""
14556 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が"
14557 "参照するファイルへ、最大 I<count> バイトを書き込む。"
14558
14559 #. type: Plain text
14560 #: build/C/man2/write.2:68
14561 msgid ""
14562 "The number of bytes written may be less than I<count> if, for example, there "
14563 "is insufficient space on the underlying physical medium, or the "
14564 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14565 "call was interrupted by a signal handler after having written less than "
14566 "I<count> bytes.  (See also B<pipe>(7).)"
14567 msgstr ""
14568 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14569 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14570 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14571 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14572 "(7)  も参照のこと。)"
14573
14574 #. type: Plain text
14575 #: build/C/man2/write.2:82
14576 msgid ""
14577 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14578 "example, a regular file)  writing takes place at the current file offset, "
14579 "and the file offset is incremented by the number of bytes actually written.  "
14580 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14581 "to the end of the file before writing.  The adjustment of the file offset "
14582 "and the write operation are performed as an atomic step."
14583 msgstr ""
14584 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14585 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイル"
14586 "オフセットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14587 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に "
14588 "ファイルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアト"
14589 "ミックな処理として 実行される。"
14590
14591 #. type: Plain text
14592 #: build/C/man2/write.2:89
14593 msgid ""
14594 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14595 "B<write>()  has returned returns the new data.  Note that not all file "
14596 "systems are POSIX conforming."
14597 msgstr ""
14598 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14599 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意"
14600 "すること。"
14601
14602 #. type: Plain text
14603 #: build/C/man2/write.2:94
14604 msgid ""
14605 "On success, the number of bytes written is returned (zero indicates nothing "
14606 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14607 msgstr ""
14608 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14609 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
14610
14611 #. type: Plain text
14612 #: build/C/man2/write.2:107
14613 msgid ""
14614 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
14615 "return a failure status if one of the errors below is detected.  If no "
14616 "errors are detected, 0 will be returned without causing any other effect.  "
14617 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
14618 "the results are not specified."
14619 msgstr ""
14620 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
14621 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
14622 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
14623 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
14624 "その結果は規定されていない。"
14625
14626 #. type: Plain text
14627 #: build/C/man2/write.2:115
14628 msgid ""
14629 "The file descriptor I<fd> refers to a file other than a socket and has been "
14630 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
14631 msgstr ""
14632 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停"
14633 "止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停"
14634 "止する状況にある。"
14635
14636 #.  Actually EAGAIN on Linux
14637 #. type: Plain text
14638 #: build/C/man2/write.2:126
14639 msgid ""
14640 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
14641 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
14642 "error to be returned for this case, and does not require these constants to "
14643 "have the same value, so a portable application should check for both "
14644 "possibilities."
14645 msgstr ""
14646 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 "
14647 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
14648 "する状況にある。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めて"
14649 "おり、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性"
14650 "が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
14651
14652 #. type: Plain text
14653 #: build/C/man2/write.2:130
14654 msgid "I<fd> is not a valid file descriptor or is not open for writing."
14655 msgstr ""
14656 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン "
14657 "(open) されていない。"
14658
14659 #. type: TP
14660 #: build/C/man2/write.2:130
14661 #, no-wrap
14662 msgid "B<EDESTADDRREQ>"
14663 msgstr "B<EDESTADDRREQ>"
14664
14665 #. type: Plain text
14666 #: build/C/man2/write.2:135
14667 msgid ""
14668 "I<fd> refers to a datagram socket for which a peer address has not been set "
14669 "using B<connect>(2)."
14670 msgstr ""
14671 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
14672 "グラムソケットを 参照している。"
14673
14674 #. type: Plain text
14675 #: build/C/man2/write.2:144
14676 msgid ""
14677 "An attempt was made to write a file that exceeds the implementation-defined "
14678 "maximum file size or the process's file size limit, or to write at a "
14679 "position past the maximum allowed offset."
14680 msgstr ""
14681 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
14682 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
14683 "書き込もうとした。"
14684
14685 #. type: Plain text
14686 #: build/C/man2/write.2:148
14687 msgid ""
14688 "The call was interrupted by a signal before any data was written; see "
14689 "B<signal>(7)."
14690 msgstr ""
14691 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
14692 "(7)  参照。"
14693
14694 #. type: Plain text
14695 #: build/C/man2/write.2:159
14696 msgid ""
14697 "I<fd> is attached to an object which is unsuitable for writing; or the file "
14698 "was opened with the B<O_DIRECT> flag, and either the address specified in "
14699 "I<buf>, the value specified in I<count>, or the current file offset is not "
14700 "suitably aligned."
14701 msgstr ""
14702 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
14703 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
14704 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
14705 "メントが不適切である。"
14706
14707 #. type: Plain text
14708 #: build/C/man2/write.2:162
14709 msgid "A low-level I/O error occurred while modifying the inode."
14710 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
14711
14712 #. type: Plain text
14713 #: build/C/man2/write.2:167
14714 msgid ""
14715 "The device containing the file referred to by I<fd> has no room for the data."
14716 msgstr ""
14717 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
14718
14719 #. type: TP
14720 #: build/C/man2/write.2:167
14721 #, no-wrap
14722 msgid "B<EPIPE>"
14723 msgstr "B<EPIPE>"
14724
14725 #. type: Plain text
14726 #: build/C/man2/write.2:176
14727 msgid ""
14728 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
14729 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
14730 "(Thus, the write return value is seen only if the program catches, blocks or "
14731 "ignores this signal.)"
14732 msgstr ""
14733 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
14734 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
14735 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
14736 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
14737 "write の返り値を参照できる。)"
14738
14739 #. type: Plain text
14740 #: build/C/man2/write.2:179
14741 msgid "Other errors may occur, depending on the object connected to I<fd>."
14742 msgstr ""
14743 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
14744
14745 #. type: Plain text
14746 #: build/C/man2/write.2:188
14747 msgid ""
14748 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
14749 "just before any data is written."
14750 msgstr ""
14751 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
14752 "で B<EINTR> が返る。"
14753
14754 #. type: Plain text
14755 #: build/C/man2/write.2:197
14756 msgid ""
14757 "A successful return from B<write>()  does not make any guarantee that data "
14758 "has been committed to disk.  In fact, on some buggy implementations, it does "
14759 "not even guarantee that space has successfully been reserved for the data.  "
14760 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
14761 "all your data."
14762 msgstr ""
14763 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
14764 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
14765 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
14766 "write した後に B<fsync>(2)  を呼び出すことである。"
14767
14768 #. type: Plain text
14769 #: build/C/man2/write.2:205
14770 msgid ""
14771 "If a B<write>()  is interrupted by a signal handler before any bytes are "
14772 "written, then the call fails with the error B<EINTR>; if it is interrupted "
14773 "after at least one byte has been written, the call succeeds, and returns the "
14774 "number of bytes written."
14775 msgstr ""
14776 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
14777 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
14778 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
14779
14780 #. type: Plain text
14781 #: build/C/man2/write.2:216
14782 msgid ""
14783 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
14784 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
14785 msgstr ""
14786 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
14787 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
14788
14789 #~ msgid "COLOPHON"
14790 #~ msgstr "この文書について"
14791
14792 #~ msgid ""
14793 #~ "This page is part of release 3.38 of the Linux I<man-pages> project.  A "
14794 #~ "description of the project, and information about reporting bugs, can be "
14795 #~ "found at http://www.kernel.org/doc/man-pages/."
14796 #~ msgstr ""
14797 #~ "この man ページは Linux I<man-pages> プロジェクトのリリース 3.38 の一部である。\n"
14798 #~ "プロジェクトの説明とバグ報告に関する情報は\n"
14799 #~ "http://www.kernel.org/doc/man-pages/ に書かれている。"
14800
14801 #~ msgid ""
14802 #~ "C89, C99, POSIX.1-2001.  LSB deprecates B<gets>().  POSIX.1-2008 marks "
14803 #~ "B<gets>()  obsolescent."
14804 #~ msgstr ""
14805 #~ "C89, C99, POSIX.1-2001.  LSB では B<gets>()  は非推奨である。 "
14806 #~ "POSIX.1-2008 では B<gets>()  は廃止予定であるとされている。"
14807
14808 #~ msgid ""
14809 #~ "This document's use of I<whence> is incorrect English, but maintained for "
14810 #~ "historical reasons."
14811 #~ msgstr ""
14812 #~ "この文章で使用した I<whence> は英語として正しくないが、 歴史的理由によりそ"
14813 #~ "のまま使われている。"
14814
14815 #~ msgid "B<EBUSY> (not on Linux)"
14816 #~ msgstr "B<EBUSY> (Linux 以外)"